viewkitjs 0.37.0 → 0.39.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 (220) hide show
  1. package/CHANGELOG.md +95 -0
  2. package/MIGRATION.md +7 -0
  3. package/fields/dist/query/figure-kinds.d.ts +2 -2
  4. package/fields/dist/query/figure-kinds.js +3 -0
  5. package/fields/dist/query/figures.d.ts +5 -3
  6. package/fields/dist/query/figures.js +13 -0
  7. package/fields/docs/reference/query.md +3 -3
  8. package/package.json +1 -1
  9. package/postgres/docs/guides/field-map.md +1 -1
  10. package/views/dist/atoms/HeaderChrome.d.ts +7 -0
  11. package/views/dist/atoms/HeaderChrome.js +15 -0
  12. package/views/dist/atoms/ToolbarButton.d.ts +1 -1
  13. package/views/dist/atoms/ToolbarButton.js +2 -2
  14. package/views/dist/atoms/defaults.js +4 -0
  15. package/views/dist/atoms/types.d.ts +39 -2
  16. package/views/dist/contract.d.ts +25 -11
  17. package/views/dist/contract.js +41 -6
  18. package/views/dist/controls/field/looks.d.ts +1 -1
  19. package/views/dist/controls/field/looks.js +9 -3
  20. package/views/dist/controls/field/tokens.d.ts +4 -0
  21. package/views/dist/controls/field/tokens.js +1 -0
  22. package/views/dist/controls/field.css +93 -1
  23. package/views/dist/controls/filter-editor/block.d.ts +3 -1
  24. package/views/dist/controls/filter-editor/block.js +4 -3
  25. package/views/dist/controls/filter-editor/filter-editor.d.ts +13 -2
  26. package/views/dist/controls/filter-editor/filter-editor.js +45 -15
  27. package/views/dist/controls/filter-editor/how.d.ts +3 -1
  28. package/views/dist/controls/filter-editor/map-filter-body.js +5 -4
  29. package/views/dist/controls/filter-editor/map-rules.d.ts +2 -1
  30. package/views/dist/controls/filter-editor/map-rules.js +3 -3
  31. package/views/dist/controls/glyphs/glyphs.js +2 -0
  32. package/views/dist/controls/inline-input.css +3 -2
  33. package/views/dist/controls/internal/menu-items.d.ts +2 -0
  34. package/views/dist/controls/internal/menu-items.js +1 -1
  35. package/views/dist/controls/internal/part-slot.d.ts +1 -1
  36. package/views/dist/controls/internal/part-slot.js +1 -1
  37. package/views/dist/controls/internal/read-token.d.ts +2 -1
  38. package/views/dist/controls/internal/read-token.js +2 -1
  39. package/views/dist/controls/internal/row-actions.d.ts +33 -0
  40. package/views/dist/controls/internal/row-actions.js +28 -0
  41. package/views/dist/controls/menu/map-menu.js +1 -1
  42. package/views/dist/controls/number-editor/tokens.d.ts +8 -0
  43. package/views/dist/controls/number-editor/tokens.js +2 -0
  44. package/views/dist/controls/number-editor.css +20 -0
  45. package/views/dist/controls/popover/map-popover.d.ts +1 -1
  46. package/views/dist/controls/popover/map-popover.js +2 -2
  47. package/views/dist/controls/sheet/map-sheet.js +9 -6
  48. package/views/dist/controls/sort-editor/map-sort-body.js +1 -0
  49. package/views/dist/controls/sort-editor/sort-editor.d.ts +5 -1
  50. package/views/dist/controls/sort-editor/sort-editor.js +41 -13
  51. package/views/dist/controls/text-editor/tokens.d.ts +8 -0
  52. package/views/dist/controls/text-editor/tokens.js +2 -0
  53. package/views/dist/controls/text-editor.css +44 -2
  54. package/views/dist/controls/toolbar-button/atom-toolbar-button.d.ts +1 -1
  55. package/views/dist/controls/toolbar-button/atom-toolbar-button.js +2 -2
  56. package/views/dist/controls/tooltip/tooltip.js +2 -1
  57. package/views/dist/editors/EditorPanel.js +1 -1
  58. package/views/dist/field-row/FieldRow.js +46 -15
  59. package/views/dist/field-row/editors/RowChipsEditor.js +3 -1
  60. package/views/dist/field-row/editors/RowDateEditor.js +3 -1
  61. package/views/dist/field-row/editors/RowNameEditor.js +3 -1
  62. package/views/dist/field-row/editors/RowPlaceEditor.js +4 -2
  63. package/views/dist/field-row/editors/RowRangeEditor.js +3 -1
  64. package/views/dist/field-row/editors/RowRelationEditor.js +5 -2
  65. package/views/dist/field-row/editors/RowSelectEditor.js +3 -1
  66. package/views/dist/field-row/editors/RowTextEditor.d.ts +7 -1
  67. package/views/dist/field-row/editors/RowTextEditor.js +25 -4
  68. package/views/dist/field-row/editors/RowValueListEditor.js +4 -4
  69. package/views/dist/field-row/editors/row-place.d.ts +33 -0
  70. package/views/dist/field-row/editors/row-place.js +141 -0
  71. package/views/dist/field-row/field-row-button.d.ts +21 -6
  72. package/views/dist/field-row/field-row-button.js +8 -3
  73. package/views/dist/field-row/row-target.d.ts +4 -1
  74. package/views/dist/field-row/row-target.js +1 -1
  75. package/views/dist/fields/binding.d.ts +4 -0
  76. package/views/dist/grid/chrome/GridAggregateMenu.d.ts +12 -11
  77. package/views/dist/grid/chrome/GridAggregateMenu.js +4 -3
  78. package/views/dist/grid/chrome/GridCellEditors.d.ts +1 -1
  79. package/views/dist/grid/chrome/GridCellOutline.d.ts +13 -1
  80. package/views/dist/grid/chrome/GridCellOutline.js +17 -0
  81. package/views/dist/grid/chrome/GridFooter.d.ts +12 -4
  82. package/views/dist/grid/chrome/GridFooter.js +11 -9
  83. package/views/dist/grid/chrome/GridHeader.js +4 -3
  84. package/views/dist/grid/chrome/GridNumberEditor.js +2 -1
  85. package/views/dist/grid/chrome/GridResizeHandle.d.ts +7 -3
  86. package/views/dist/grid/chrome/GridResizeHandle.js +2 -3
  87. package/views/dist/grid/chrome/GridRowCells.js +1 -1
  88. package/views/dist/grid/chrome/GridStructure.js +3 -3
  89. package/views/dist/grid/chrome/GridTable.js +1 -1
  90. package/views/dist/grid/chrome/GridTableSurface.js +1 -1
  91. package/views/dist/grid/chrome/GridTextEditor.js +3 -1
  92. package/views/dist/grid/chrome/grid-body-place.d.ts +2 -4
  93. package/views/dist/grid/chrome/grid-body-place.js +4 -4
  94. package/views/dist/grid/chrome/grid-edit-session.d.ts +7 -3
  95. package/views/dist/grid/chrome/grid-edit-session.js +12 -3
  96. package/views/dist/grid/chrome/grid-editor-layer.d.ts +5 -4
  97. package/views/dist/grid/chrome/grid-figure-value.js +10 -4
  98. package/views/dist/grid/chrome/grid-row-props.d.ts +1 -1
  99. package/views/dist/grid/chrome/grid-table-props.d.ts +11 -3
  100. package/views/dist/grid/chrome/useGridKeyboard.d.ts +5 -1
  101. package/views/dist/grid/chrome/useGridKeyboard.js +9 -5
  102. package/views/dist/grid/chrome/useGridTableInteractionModel.d.ts +1 -1
  103. package/views/dist/grid/chrome/useGridTableInteractionModel.js +8 -3
  104. package/views/dist/grid/grid.css +7 -3
  105. package/views/dist/internal/length.d.ts +2 -0
  106. package/views/dist/internal/length.js +16 -0
  107. package/views/dist/internal/over-cell.d.ts +8 -0
  108. package/views/dist/internal/over-cell.js +5 -0
  109. package/views/dist/list/bar-keys.d.ts +5 -0
  110. package/views/dist/list/bar-keys.js +2 -0
  111. package/views/dist/list/bar-parts.d.ts +27 -0
  112. package/views/dist/list/bar-parts.js +38 -0
  113. package/views/dist/list/buttons/clear-save.d.ts +7 -0
  114. package/views/dist/list/buttons/clear-save.js +15 -0
  115. package/views/dist/list/buttons/customize.d.ts +28 -0
  116. package/views/dist/list/buttons/customize.js +31 -0
  117. package/views/dist/list/buttons/filter.d.ts +32 -0
  118. package/views/dist/list/buttons/filter.js +60 -0
  119. package/views/dist/list/buttons/new.d.ts +18 -0
  120. package/views/dist/list/buttons/new.js +9 -0
  121. package/views/dist/list/buttons/quick.d.ts +15 -0
  122. package/views/dist/list/buttons/quick.js +24 -0
  123. package/views/dist/list/buttons/search.d.ts +18 -0
  124. package/views/dist/list/buttons/search.js +17 -0
  125. package/views/dist/list/buttons/shared.d.ts +91 -0
  126. package/views/dist/list/buttons/shared.js +131 -0
  127. package/views/dist/list/buttons/sort-filter.d.ts +6 -0
  128. package/views/dist/list/buttons/sort-filter.js +16 -0
  129. package/views/dist/list/buttons/sort.d.ts +17 -0
  130. package/views/dist/list/buttons/sort.js +34 -0
  131. package/views/dist/list/buttons/views.d.ts +21 -0
  132. package/views/dist/list/buttons/views.js +36 -0
  133. package/views/dist/list/editor-menus.d.ts +13 -0
  134. package/views/dist/list/editor-menus.js +13 -0
  135. package/views/dist/list/index.d.ts +41 -0
  136. package/views/dist/list/index.js +19 -0
  137. package/views/dist/list/line.d.ts +55 -0
  138. package/views/dist/list/line.js +221 -0
  139. package/views/dist/list/pane-box.d.ts +6 -0
  140. package/views/dist/list/pane-box.js +15 -0
  141. package/views/dist/list/panels/customize.d.ts +8 -0
  142. package/views/dist/list/panels/customize.js +23 -0
  143. package/views/dist/list/panels/filter-bar.d.ts +12 -0
  144. package/views/dist/list/panels/filter-bar.js +67 -0
  145. package/views/dist/list/panels/filter.d.ts +8 -0
  146. package/views/dist/list/panels/filter.js +23 -0
  147. package/views/dist/list/panels/quick.d.ts +7 -0
  148. package/views/dist/list/panels/quick.js +16 -0
  149. package/views/dist/list/panels/shared.d.ts +25 -0
  150. package/views/dist/list/panels/shared.js +33 -0
  151. package/views/dist/list/panels/sort.d.ts +8 -0
  152. package/views/dist/list/panels/sort.js +19 -0
  153. package/views/dist/list/panels/views.d.ts +13 -0
  154. package/views/dist/list/panels/views.js +27 -0
  155. package/views/dist/list/ready.d.ts +35 -0
  156. package/views/dist/list/ready.js +7 -0
  157. package/views/dist/list/root-base.d.ts +17 -0
  158. package/views/dist/list/root-base.js +9 -1
  159. package/views/dist/list/root.js +2 -2
  160. package/views/dist/list/store.d.ts +19 -0
  161. package/views/dist/list/store.js +40 -1
  162. package/views/dist/list/toolbar-model.d.ts +95 -0
  163. package/views/dist/list/toolbar-model.js +177 -0
  164. package/views/dist/list/toolbar.js +140 -328
  165. package/views/dist/list/views-axis.js +15 -4
  166. package/views/dist/model/aggregates.d.ts +18 -8
  167. package/views/dist/model/aggregates.js +16 -22
  168. package/views/dist/panels/react/filter/FilterEditor.d.ts +3 -1
  169. package/views/dist/panels/react/filter/FilterEditor.js +2 -2
  170. package/views/dist/panels/react/filter/filter-body.d.ts +3 -1
  171. package/views/dist/panels/react/filter/filter-body.js +2 -2
  172. package/views/dist/panels/react/sort/SortEditor.d.ts +3 -1
  173. package/views/dist/panels/react/sort/SortEditor.js +4 -4
  174. package/views/dist/panels/react/toolbar/Toolbar.d.ts +80 -3
  175. package/views/dist/panels/react/toolbar/Toolbar.js +85 -52
  176. package/views/dist/panels/react/toolbar/ToolbarBarSorts.d.ts +9 -0
  177. package/views/dist/panels/react/toolbar/ToolbarBarSorts.js +57 -0
  178. package/views/dist/panels/react/toolbar/ToolbarFilterAdd.d.ts +4 -1
  179. package/views/dist/panels/react/toolbar/ToolbarFilterAdd.js +2 -2
  180. package/views/dist/panels/react/toolbar/ToolbarOptions.d.ts +30 -0
  181. package/views/dist/panels/react/toolbar/ToolbarOptions.js +6 -1
  182. package/views/dist/panels/react/toolbar/ToolbarSortPill.d.ts +5 -0
  183. package/views/dist/panels/react/toolbar/ToolbarSortPill.js +6 -4
  184. package/views/dist/panels/react/toolbar/ToolbarViews.d.ts +7 -1
  185. package/views/dist/panels/react/toolbar/ToolbarViews.js +4 -4
  186. package/views/dist/panels/react/toolbar/sheet-host.d.ts +3 -0
  187. package/views/dist/panels/react/toolbar/sheet-host.js +6 -0
  188. package/views/dist/panels/react/toolbar/use-give-way.d.ts +6 -0
  189. package/views/dist/panels/react/toolbar/use-give-way.js +8 -1
  190. package/views/dist/panels/react/views-row/ViewPicker.d.ts +8 -1
  191. package/views/dist/panels/react/views-row/ViewPicker.js +12 -7
  192. package/views/dist/panels/settings/filter-groups.js +7 -0
  193. package/views/dist/provider/components.d.ts +38 -3
  194. package/views/dist/react.d.ts +1 -1
  195. package/views/dist/selection/bar-overflow.d.ts +2 -0
  196. package/views/dist/selection/bar-overflow.js +2 -1
  197. package/views/dist/selection/bar-props.d.ts +1 -1
  198. package/views/dist/selection/verbs.d.ts +2 -2
  199. package/views/dist/styles.css +268 -5
  200. package/views/dist/styles.unlayered.css +268 -5
  201. package/views/docs/contract.md +29 -15
  202. package/views/docs/controls/field.md +1 -0
  203. package/views/docs/controls/filter-editor.md +1 -1
  204. package/views/docs/controls/menu.md +1 -1
  205. package/views/docs/controls/number-editor.md +2 -0
  206. package/views/docs/controls/sort-editor.md +1 -1
  207. package/views/docs/controls/text-editor.md +2 -0
  208. package/views/docs/guides/atoms.md +1 -0
  209. package/views/docs/guides/selection.md +1 -1
  210. package/views/docs/guides/the-grid.md +3 -3
  211. package/views/docs/reference/controls.md +3 -3
  212. package/views/docs/reference/field-row.md +1 -1
  213. package/views/docs/reference/grid.md +4 -4
  214. package/views/docs/reference/list.md +168 -6
  215. package/views/docs/reference/looks.md +1 -1
  216. package/views/docs/reference/panels-react.md +7 -7
  217. package/views/docs/reference/react.md +13 -10
  218. package/views/docs/reference/selection.md +1 -1
  219. package/views/docs/reference/views.md +9 -7
  220. package/views/skills/views/SKILL.md +2 -1
@@ -68,9 +68,10 @@ use; the prefix keeps that selector from reaching an element of the app's own.
68
68
  | `data-slot="vk-grid-group-dot"` | the · before a group's figure |
69
69
  | `data-slot="vk-grid-footer"` | the footer row |
70
70
  | `data-slot="vk-grid-footer-cell"` | one column's figure |
71
- | `data-slot="vk-grid-figure-label"` | a footer figure's kind ("Sum"), drawn before its value; none on a figure the app draws |
71
+ | `data-slot="vk-grid-figure-label"` | a footer figure's word ("sum", `views.grid.figure-word`), drawn before its value, after it under Figures Value first; none on a figure the app draws |
72
72
  | `data-slot="vk-grid-figure-value"` | a footer figure's value, its suffix inside it |
73
- | `data-slot="vk-grid-figure-pick"` | an empty footer cell's offer of a figure, shown under the pointer, or at rest under the grid look's `offer` `always` |
73
+ | `data-slot="vk-grid-figure-pick"` | an empty footer cell's offer of a figure ("Add calculation"), shown under the pointer and while its picker is open, or at rest under the grid look's `offer` `always`; cut at the cell's edge |
74
+ | `data-slot="vk-grid-figure-menu"` | a footer cell's calculation picker, your `Menu` opened above the cell with its right edge on the cell's; ViewKit's own names each row by the menu's name and `-row`, `data-key` its figure (`none`, `count`, `empty`, `filled`, `percentEmpty`, `percentFilled`, `sum`, `avg`, `min`, `max`, `ratio`) |
74
75
  | `data-slot="vk-grid-rail"` | the left rail: the checkbox lane |
75
76
  | `data-slot="vk-grid-frozen-shadow"` | the shadow at the pinned columns' edge, shown while they are parked: one down each group's rows, one on the column names' rail and one on the footer's |
76
77
  | `data-slot="vk-grid-name-check"` | a row's or a titles row's box inside the name column, before the picture, on a phone with `phonePicking` |
@@ -357,7 +358,10 @@ between its glyph, label, value and lane (`calc(var(--spacing)*3)`), `--vk-field
357
358
  in the middle of it (`auto`), `--vk-field-row-py` for its padding above and below (`calc(var(--spacing)*2.5)`), `--vk-field-row-line-w`
358
359
  for the line under every row but the last (`1px`; `0px` draws none), `--vk-field-row-line` for that line's colour
359
360
  (`--vk-border`) and `--vk-field-row-label-fg` for its label's colour (`--vk-fg-subtle`). Undeclared, the row draws as
360
- it always has; declared on a section or any ancestor, every row in it takes them. Inside a Field rows card on a phone the
361
+ it always has; declared on a section or any ancestor, every row in it takes them. Under the Field's Box
362
+ (`data-field-row-box="box"`, Looks) and only there, its one box reads `--vk-field-row-box-h` for its height (undeclared
363
+ `calc(var(--vk-spacing) * 8)`, 32), `--vk-field-row-box-x` for how far it reaches past the words (`calc(var(--vk-spacing) * 2)`, 8)
364
+ and `--vk-field-row-box-r` for its corner (`calc(var(--vk-spacing) * 2)`, 8): the Field's stylesheet (`field.css`) reads them. Inside a Field rows card on a phone the
361
365
  row is one of the card's rows, drawn by the card's frame, and none of them apply there.
362
366
 
363
367
  **The toolbar's band is the app's to declare.** On a computer each line of a folding toolbar (the ready toolbar's, or
@@ -552,9 +556,9 @@ peer; the provider and every other door import neither library, so an app that h
552
556
  `TextBody`, required: a whole body for a field typed as one string (a line of text, an email, a phone, a link, a domain, long text or rich text), which your app draws, `ViewsTextBodyProps`; `CONTROLS.TextBody` is ViewKit's own, the Text editor. The grid's and a field row's text editors open it: in a grid cell on a computer, every text the person may write, long text and a line the cell cut off included (lifted over the rows below and the frozen columns as ViewKit's own grown editor is; a body growing past the scroll box at the last row is your body's to handle: open upward, or scroll inside), in the sheet on a phone, and in place in a field row at every width. A text opened only to be read keeps the editor's own panel. It is handed the field's name (`label`), its text type (`kind`: `text`, `url`, `domain`, `email`, `phone` or `rich_text`), whether it is a paragraph (`paragraph`: long text and rich text), the draft (`value`, a string), a phone's country (`region`, where a number typed without its code is read; the phone opens written out), what was typed on what opened it (`typed`, already the draft), `autoFocus`, `form` (`phone` in the sheet, `computer` anywhere in place), `place` (`cell` in a grid cell, where your box may grow over the rows below; `row` in a field row, where it stands in the row's flow, so the row grows with it and a section that clips the row never cuts it; absent, `cell`), and `check`, the host's own reading of a value: its reason in your app's words, or null when it reads, for your body to say as it is typed. The body hands back `onValueChange` (the whole text, every change as it is made) and `onDone` (it closes as Enter does: the grid writes and keeps the cell). The editor keeps the draft, Escape's keep or throw-away by field type, Tab, the close's tidy (a line's line breaks become a space; a phone handed back that reads as the stored number writes nothing), the write check and the save, and it draws the reason a value is refused (under the cell, in the sheet, under a field row's box): draw none of your own at the close. Escape, Tab and ⌘ or Ctrl Enter from inside your body's element are taken before your body hears them (Tab walks your controls and closes from either end; ⌘ or Ctrl Enter closes as Enter; in place, a Tab between your controls moves the focus but your own key handlers don't hear it). Enter and Shift Enter are your body's and do what the editor's own do: on a line they call `onDone()`, in a paragraph they make a new line; a step of your own that lists choices (a phone's countries) may take Enter for its pick. A key that starts in a popup your body draws outside its element (a country list in a portal) is left to your body; that popup carries `EDITOR_INNER_ESCAPE` on its root, takes the focus while it is open, and hands it back to your body when it closes. A level you draw inside your element (a list in your box's place) may carry `EDITOR_INNER_ESCAPE` too: its Escape is your body's, and the editor stays open. Call `preventDefault()` on that Escape as you close your level, so nothing around the editor takes it too (a list's Escape that clears its selection). In place, the focus leaving your body for anywhere else closes the editor as a press outside does; a press on your body's own surface doesn't. At `form: "phone"` your body draws no ✕, ✓ or Cancel of its own: the sheet holds them. In the phone's sheet your body is handed `onStepChange`: hand it a step of your own (`ViewsBodyStep`, its `title` and `onBack`, as for a phone's countries) while you stand on one, and `null` once you are back (*The sheet's head*).
553
557
  `NumberBody`, required: a whole body for a number, money or a percent, which your app draws, `ViewsNumberBodyProps`; `CONTROLS.NumberBody` is ViewKit's own, the Number editor. The grid's and a field row's number editors open it: in the grid cell on a computer (lifted over the rows below and the frozen columns as ViewKit's own grown editor is; a body growing past the scroll box at the last row is your body's to handle), in the sheet on a phone, and in place in a field row at every width. A number formatted as a duration keeps the editor's own box. It is handed the field's name (`label`), its kind (`kind`: `number`, `money` or `percent`; a percent is stored 0 to 100, the value is the percent), the draft (`value`: a number, `null` when empty, `NaN` when what is in the box reads as no number), its unit (`unit`: money's currency code or a number's unit) and the units it may be put in (`units`; absent, the unit is shown with nothing to press), the digits the field keeps (`decimals`), its limits (`min`, `max`; a percent 0 and 100 unless the field widens them), how your people write a number (`locale`, and `decimal`, the separator where your app states one), whether it may be emptied (`empty`), where the figure stands (`align`: `end` in the grid, `start` in a field row), what was typed on what opened it (`typed`; `value` is its reading, or `NaN`), `autoFocus`, `form` (`phone` in the sheet, `computer` anywhere in place), and `check`, the host's own reading of a value and its unit, asked with the value rounded to `decimals`: its reason in your app's words, or null. The body hands back `onValueChange` (a number, never text: `null` when its box is emptied, `NaN` for text that reads as no number, and the unit when it is one of `units`; every change as it is made) and `onDone` (it closes as Enter does: the grid writes and keeps the cell). Read what is typed in your box with `locale` and `decimal`; the editor rounds to `decimals`, so hand what was typed. The editor keeps the draft, the rounding, Escape's keep or throw-away by field type, Tab, the close (`NaN` writes nothing; empty clears only where it may be emptied; a value that rounds to the stored one writes nothing), the write check and the save, and it draws the reason a value is refused: draw none of your own at the close. A unit handed back that isn't one of `units` is ignored. Escape, Tab and ⌘ or Ctrl Enter from inside your body's element are taken before your body hears them (Tab walks your controls and closes from either end; ⌘ or Ctrl Enter closes as Enter). Enter, Shift Enter and Alt Enter are your body's and call `onDone()`, as the editor's own box closes on Enter with any modifier; your own unit list may take Enter for its pick. A key that starts in a popup your body draws outside its element (a unit list in a portal) is left to your body; that popup carries `EDITOR_INNER_ESCAPE` on its root, takes the focus while it is open, and hands it back to your body when it closes. A level you draw inside your element may carry `EDITOR_INNER_ESCAPE` too: its Escape is your body's, and the editor stays open. Call `preventDefault()` on that Escape as you close your level, so nothing around the editor takes it too (a list's Escape that clears its selection). In place, the focus leaving your body for anywhere else closes the editor as a press outside does; a press on your body's own surface doesn't. At `form: "phone"` your body draws no ✕, ✓ or Cancel of its own: the sheet holds them. In the phone's sheet your body is handed `onStepChange`: hand it a step of your own (`ViewsBodyStep`, its `title` and `onBack`, as for money's currencies) while you stand on one, and `null` once you are back (*The sheet's head*).
554
558
 
555
- `SortBody`, required: the sort editor's whole body, which your app draws, `ViewsSortBodyProps`; `CONTROLS.SortBody` is ViewKit's own. The sort pill opens it: in its popover on a computer (or your `host`, where the toolbar is handed one) and in the Sheet on a phone, and so does anything else that opens `SortEditor` or `useSortEditor`'s body. It is handed the sort's name (`label`), the fields the list sorts by (`options`, each its sort key, its words and the direction a new rule takes, and, marked as the grid's header marks its column, its field's `type`, the `part` it sorts by and the header's `glyph`, drawn with your icons; the three absent for an option your app built with no column behind it), the rules in order, the first sorting first (`rules`, each a sort key and `asc` or `desc`), the sorts set aside after them (`setAside`, each holding one of the places until it is put back or deleted; `[]` when there are none), how many rules at most (`max`, a set-aside sort holding one of the places), `form`, and `addSort`, true on a computer where what holds it has no + of its own (the dashed Sort, while only set-aside sorts stand, and a pill handed `addAfter={false}`), so Add sort stands at your body's foot; a phone's body always has one. The body hands back `onRulesChange` (the whole rules in order and, when handed, the set-aside sorts kept, any left out deleted, absent keeping every one; every change as it is made: a move, a direction, a removal, an added rule, a set-aside sort put back or deleted) and `onDone` (the job is done and what holds it closes). On a phone where the sheet's head doesn't draw them (the provider's `sheetActions` at `bar`), it is handed `actions`, the ✕ (`close`, which takes the rules and the set-aside sorts back to what they were as the sheet opened) and ✓ (`done`, which keeps them) for its own head; on a computer, and under `head`, where the sheet holds them, it is handed none. On a phone it is handed `onStepChange`: hand it a step of your own (`ViewsBodyStep`, its `title` and `onBack`: Add sort's fields, a rule's direction) while you stand on one, and `null` once you are back; under `head` the sheet's head shows the step's title and Back in ✕'s place, under `bar` your own head does, and the sheet's Escape goes back a step instead of closing it (a swipe still closes the sheet, keeping the rules). ViewKit keeps the rest: it checks each list against the rules (each rule one of `options`, each field sorted once, each set-aside sort one the list holds, `max` at most, a set-aside sort counted) and writes nothing when one breaks them; it keeps the latest rules between renders, so two changes before the next render both land; on a computer it closes the popover when the last rule goes with no set-aside sort left; and it keeps what ✕ takes back to. The + after the pill, the empty Sort and Sort on the row's right open your `FieldsBody`. A body that ignores `setAside` shows an empty panel at the dashed Sort, where only set-aside sorts stand. `CONTROLS.SortBody` is ViewKit's own, the sort editor: on a computer each rule its grip, its field's and its direction's Select, and ×, then Add sort where `addSort` and Clear all sorts; the set-aside sorts after the rules, each its field's box dashed with why, re-pointed, put back or deleted; on a phone a card per rule, and Add sort, a rule's direction and a set-aside sort's field as a step of the same sheet (`onStepChange`), with its own head under `bar`. Its menus as data come as `items` (`menus.sortEditor`, VK-1063): a rule's ⋯ and a set-aside rule's, reshaped; honour it or not.
559
+ `SortBody`, required: the sort editor's whole body, which your app draws, `ViewsSortBodyProps`; `CONTROLS.SortBody` is ViewKit's own. The sort pill opens it: in its popover on a computer (or your `host`, where the toolbar is handed one) and in the Sheet on a phone, and so does anything else that opens `SortEditor` or `useSortEditor`'s body. It is handed the sort's name (`label`), the fields the list sorts by (`options`, each its sort key, its words and the direction a new rule takes, and, marked as the grid's header marks its column, its field's `type`, the `part` it sorts by and the header's `glyph`, drawn with your icons; the three absent for an option your app built with no column behind it), the rules in order, the first sorting first (`rules`, each a sort key and `asc` or `desc`), the sorts set aside after them (`setAside`, each holding one of the places until it is put back or deleted; `[]` when there are none), how many rules at most (`max`, a set-aside sort holding one of the places), `form`, and `addSort`, true on a computer where what holds it has no + of its own (the dashed Sort, while only set-aside sorts stand, and a pill handed `addAfter={false}`), so Add sort stands at your body's foot; a phone's body always has one. `empty` (VK-1091), handed `"editor"` on a computer where what opened it asks it to say nothing sorts yet (a placed Sort's `empty="editor"`): with no rule and none set aside, `views.panels.sort-empty` and `views.panels.sort-empty-line` over Add sort, and it stays open as its last rule goes; absent, as before. The body hands back `onRulesChange` (the whole rules in order and, when handed, the set-aside sorts kept, any left out deleted, absent keeping every one; every change as it is made: a move, a direction, a removal, an added rule, a set-aside sort put back or deleted) and `onDone` (the job is done and what holds it closes). On a phone where the sheet's head doesn't draw them (the provider's `sheetActions` at `bar`), it is handed `actions`, the ✕ (`close`, which takes the rules and the set-aside sorts back to what they were as the sheet opened) and ✓ (`done`, which keeps them) for its own head; on a computer, and under `head`, where the sheet holds them, it is handed none. On a phone it is handed `onStepChange`: hand it a step of your own (`ViewsBodyStep`, its `title` and `onBack`: Add sort's fields, a rule's direction) while you stand on one, and `null` once you are back; under `head` the sheet's head shows the step's title and Back in ✕'s place, under `bar` your own head does, and the sheet's Escape goes back a step instead of closing it (a swipe still closes the sheet, keeping the rules). ViewKit keeps the rest: it checks each list against the rules (each rule one of `options`, each field sorted once, each set-aside sort one the list holds, `max` at most, a set-aside sort counted) and writes nothing when one breaks them; it keeps the latest rules between renders, so two changes before the next render both land; on a computer it closes the popover when the last rule goes with no set-aside sort left; and it keeps what ✕ takes back to. The + after the pill, the empty Sort and Sort on the row's right open your `FieldsBody`. A body that ignores `setAside` shows an empty panel at the dashed Sort, where only set-aside sorts stand. `CONTROLS.SortBody` is ViewKit's own, the sort editor: on a computer each rule its grip, its field's and its direction's Select, and ×, then Add sort where `addSort` and Clear all sorts; the set-aside sorts after the rules, each its field's box dashed with why, re-pointed, put back or deleted; on a phone a card per rule, and Add sort, a rule's direction and a set-aside sort's field as a step of the same sheet (`onStepChange`), with its own head under `bar`. Its menus as data come as `items` (`menus.sortEditor`, VK-1063): a rule's ⋯ and a set-aside rule's, reshaped; honour it or not.
556
560
 
557
- `FilterBody`, required: the filter editor's whole body, which your app draws, `ViewsFilterBodyProps`; `CONTROLS.FilterBody` is ViewKit's own. An advanced filter's pill opens it on a computer (in its popover, or your `host`), and Filter opens it in the Sheet on a phone, and so does anything else that opens `FilterEditor`. It is handed the filter's name (`label`), the fields a rule may name (`fields`, each its key, words, `fieldKey`, `part` and `type`, a relation with its `far` fields one level in; and, in its place in the column order, each column the list can't filter, why in `disabled`, for your body to draw greyed and never name in a rule or put a set-aside rule back on), the level it is open on (`filter`, `viewkitjs/fields/query`'s `FilterGroup`: on a computer the advanced filter's own group, a top joined by Or as one group of its own; on a phone the whole filter; its items rules, groups and relation rules, a rule or relation rule set aside kept where it sits), how many levels deep its rules may stand (`levels`, its own the first: 2 for an advanced filter's group, 3 on a phone, so the view never stands more than 3 deep), whether it may exclude its matches (`excludable`, `op: "not"`: an advanced filter's own group, never a top or a where), `relation` where the level is a relation rule's where edited in place (its field key, words and quantifier; its rules name its far fields; and `gone`, present only where the list no longer lists the relation: why, in words, "Its relation is no longer in this list", for your Add filter's disabled reason), `form`, and `ruleValue`, a rule's value in ViewKit's own body for its type, for your body to place where a rule's value opens, each change handed back as the rule with its new value (null for a rule set aside or a way taking no value). The body hands back `onFilterChange` (the whole level and, at a relation edited in place, its quantifier; every change as it is made: a rule added, changed or removed, a join turned, a group made, matches excluded) and `onDone` (the job is done and what holds it closes). A rule held until whole is your body's to hold: hand it back once whole. On a phone where the sheet's head doesn't draw them (the provider's `sheetActions` at `bar`), it is handed `actions`, the ✕ (`close`, which takes the filter back to what it was as the sheet opened) and ✓ (`done`, which keeps it); on a computer, and under `head`, it is handed none. ViewKit keeps the rest: it checks each level against the rules (its join `and` or `or`, `not` only where `excludable`; `levels` deep at most; 50 items at most in each container; each rule a field it may name and a way that field offers, with a value that way stores; each relation rule one of the relations, never inside another, `any`, `none` or `every`; each rule still set aside one the level held, unchanged; under a relation the list no longer lists, each rule one the level held, unchanged, so its rules may be deleted and never added or changed) and writes nothing when one breaks them; it writes through its own editor's state, so the first edit in a top joined by Or wraps it into one advanced filter and the pills' keys follow; a level handed back empty on a computer takes its advanced filter away and closes the popover, and on a phone the sheet stays on it; and it keeps what ✕ takes back to. Beside the level it is handed each choice field's values, and a place's country's names (`options` on a field, each as the Picker draws it: a status's step, a person's or a record's avatar, a record's kind), only where ViewKit holds the field's whole list as it opens (its values read on demand and not yet handed by your app, it is absent: open `ruleValue` there; `[]` is a whole list that is empty), ViewKit's own words for a rule (`ruleWords(rule, relation?)`: its field, way and value as the bar words them, for a rule your body has no words of its own for), and, on a phone, `onStepChange`: hand it a step of your own (`ViewsBodyStep`: a box's list, Add filter's fields) while you stand on one, and `null` once you are back; under `head` the sheet's head shows the step's title and Back in ✕'s place, under `bar` your own head does, and the sheet's Escape goes back a step instead of closing it. `CONTROLS.FilterBody` is ViewKit's own, the filter editor: each rule Where or its join, its field, how it compares and its value in its type's own box (a choice's values from `options`), ⋮ to make a group or delete it, groups 3 deep, Add filter and Clear all filters; a relation rule's block (its relation, `any`, `none` or `every` where, its rules on that relation's fields), which a related rule's ⋮ makes with None or Every; a group's ⋮ with Exclude matches, and the level's own where `excludable`; a rule set aside in its place, its field's box dashed saying why, re-pointed, put back where its field is back, or deleted, and a relation rule set aside, or on a relation the list no longer lists, one row in its words; ViewKit's own words and value body (`ruleWords`, `ruleValue`) for a way the kit has no word for, a field it has no type for or a choice with no values, so nothing the level holds is out of sight; open on a relation's where, its relation and quantifier over the rules, the quantifier handed back with the level; on a phone each box's list, a date, a value ViewKit draws, Add filter, a block's quantifier and a rule's or a group's ⋯ as a step of the same sheet (`onStepChange`), with its own head under `bar`. Its menus as data come as `items` (`menus.filterEditor`, VK-1063): a rule's ⋮, a set-aside rule's and a group's actions, reshaped, named by public terms; honour it or not.
561
+ `FilterBody`, required: the filter editor's whole body, which your app draws, `ViewsFilterBodyProps`; `CONTROLS.FilterBody` is ViewKit's own. An advanced filter's pill opens it on a computer (in its popover, or your `host`), and Filter opens it in the Sheet on a phone, and so does anything else that opens `FilterEditor`. It is handed the filter's name (`label`), the fields a rule may name (`fields`, each its key, words, `fieldKey`, `part` and `type`, a relation with its `far` fields one level in; and, in its place in the column order, each column the list can't filter, why in `disabled`, for your body to draw greyed and never name in a rule or put a set-aside rule back on), the level it is open on (`filter`, `viewkitjs/fields/query`'s `FilterGroup`: on a computer the advanced filter's own group, a top joined by Or as one group of its own; on a phone the whole filter; its items rules, groups and relation rules, a rule or relation rule set aside kept where it sits), how many levels deep its rules may stand (`levels`, its own the first: 2 for an advanced filter's group, 3 on a phone, so the view never stands more than 3 deep), whether it may exclude its matches (`excludable`, `op: "not"`: an advanced filter's own group, never a top or a where), `empty` (VK-1091: handed `"editor"` on a computer's top level where what opened it asks it to say nothing filters yet, `views.panels.filter-empty` and `views.panels.filter-empty-line` over Add filter, staying open as its last rule goes; absent, the fields), `relation` where the level is a relation rule's where edited in place (its field key, words and quantifier; its rules name its far fields; and `gone`, present only where the list no longer lists the relation: why, in words, "Its relation is no longer in this list", for your Add filter's disabled reason), `form`, and `ruleValue`, a rule's value in ViewKit's own body for its type, for your body to place where a rule's value opens, each change handed back as the rule with its new value (null for a rule set aside or a way taking no value). The body hands back `onFilterChange` (the whole level and, at a relation edited in place, its quantifier; every change as it is made: a rule added, changed or removed, a join turned, a group made, matches excluded) and `onDone` (the job is done and what holds it closes). A rule held until whole is your body's to hold: hand it back once whole. On a phone where the sheet's head doesn't draw them (the provider's `sheetActions` at `bar`), it is handed `actions`, the ✕ (`close`, which takes the filter back to what it was as the sheet opened) and ✓ (`done`, which keeps it); on a computer, and under `head`, it is handed none. ViewKit keeps the rest: it checks each level against the rules (its join `and` or `or`, `not` only where `excludable`; `levels` deep at most; 50 items at most in each container; each rule a field it may name and a way that field offers, with a value that way stores; each relation rule one of the relations, never inside another, `any`, `none` or `every`; each rule still set aside one the level held, unchanged; under a relation the list no longer lists, each rule one the level held, unchanged, so its rules may be deleted and never added or changed) and writes nothing when one breaks them; it writes through its own editor's state, so the first edit in a top joined by Or wraps it into one advanced filter and the pills' keys follow; a level handed back empty on a computer takes its advanced filter away and closes the popover, and on a phone the sheet stays on it; and it keeps what ✕ takes back to. Beside the level it is handed each choice field's values, and a place's country's names (`options` on a field, each as the Picker draws it: a status's step, a person's or a record's avatar, a record's kind), only where ViewKit holds the field's whole list as it opens (its values read on demand and not yet handed by your app, it is absent: open `ruleValue` there; `[]` is a whole list that is empty), ViewKit's own words for a rule (`ruleWords(rule, relation?)`: its field, way and value as the bar words them, for a rule your body has no words of its own for), and, on a phone, `onStepChange`: hand it a step of your own (`ViewsBodyStep`: a box's list, Add filter's fields) while you stand on one, and `null` once you are back; under `head` the sheet's head shows the step's title and Back in ✕'s place, under `bar` your own head does, and the sheet's Escape goes back a step instead of closing it. `CONTROLS.FilterBody` is ViewKit's own, the filter editor: each rule Where or its join, its field, how it compares and its value in its type's own box (a choice's values from `options`), ⋮ to make a group or delete it, groups 3 deep, Add filter and Clear all filters; a relation rule's block (its relation, `any`, `none` or `every` where, its rules on that relation's fields), which a related rule's ⋮ makes with None or Every; a group's ⋮ with Exclude matches, and the level's own where `excludable`; a rule set aside in its place, its field's box dashed saying why, re-pointed, put back where its field is back, or deleted, and a relation rule set aside, or on a relation the list no longer lists, one row in its words; ViewKit's own words and value body (`ruleWords`, `ruleValue`) for a way the kit has no word for, a field it has no type for or a choice with no values, so nothing the level holds is out of sight; open on a relation's where, its relation and quantifier over the rules, the quantifier handed back with the level; on a phone each box's list, a date, a value ViewKit draws, Add filter, a block's quantifier and a rule's or a group's ⋯ as a step of the same sheet (`onStepChange`), with its own head under `bar`. Its menus as data come as `items` (`menus.filterEditor`, VK-1063): a rule's ⋮, a set-aside rule's and a group's actions, reshaped, named by public terms; honour it or not.
558
562
 
559
563
  `FieldsBody`, required: the field list's whole body, which your app draws, `ViewsFieldsBodyProps`; `CONTROLS.FieldsBody` is ViewKit's own. ViewKit opens it wherever it opens a sort or filter field list: for a sort, the empty Sort, Sort on the row's right and the + after the sort pill; for a filter, Filter and the + on the bar, a filter's field on the bar and a set-aside filter's field. It stands in the popover under what opened it on a computer, and on a phone on a page of the sheet, under the sheet's own head, so it takes no `actions`. It is handed what the pick is for (`purpose`: `sort` or `filter`), the list's name (`label`), its search's words (`search`), the fields in order as `ViewsFieldsBodyField` data (each its `key`, its words, its field's `type`, the `part` it reads and its column's `glyph`, all three as the grid's header marks its column, and, where it can't be picked, why, in `disabled`: a field another rule sorts says "Sorted", and, for a filter, a column the list can't filter says why in your words; for a filter, each relation with its `far` fields one level in, where a rule can name one), the field being changed (`own`, absent where a pick adds; for a rule on a related record's field, the far field's key, with `ownRelation` the relation's key it stands under, as `onPick` hands both back) and `form`. It hands back one pick through `onPick` (the field's key, and for a far field the far field's key too), and `onDone` closes what holds it with no pick. ViewKit writes the pick as its own list's would, and writes nothing for a key it didn't hand or handed `disabled`. `CONTROLS.FieldsBody` is ViewKit's own, the Picker.
560
564
 
@@ -581,7 +585,8 @@ peer; the provider and every other door import neither library, so an app that h
581
585
  The popover takes `alignOffset`, `initialFocus` (false keeps focus where it was when the popup
582
586
  opens; the editor that then takes focus does so with `preventScroll`, so the package's own focus
583
587
  never moves the page while your popup is placed; what your `Command` does as it mounts is yours, in
584
- "Writing an adapter"), and two vetoes, `onOutsidePress`
588
+ "Writing an adapter"), `finalFocus` (false moves no focus as the popup closes: a field row's editor hands it, and the row
589
+ gives the focus back to itself; forward it to your popup's return of focus, or an earlier popup's focus can win), and two vetoes, `onOutsidePress`
585
590
  and `onEscape`, each returning `false` to keep it open. `onOutsidePress` is handed the pointer press, its `target` where the press landed, also when the
586
591
  focus that press moves is what would close the popup: a vetoed press holds against its focus too,
587
592
  and focus leaving by keyboard (a Tab out) closes without asking. Its
@@ -699,7 +704,7 @@ container: the inset a run of rows sits in, inside a panel or a command list's g
699
704
  a button or, with `interactive={false}`, a static line), `RowContent` (deprecated: a row's inside, drawn
700
705
  by nothing, since the default `Row` draws its own), `TickBox` (a paint-only tick box), `Avatar` (a person's or a record's picture, `ViewsAvatarProps`: a user's, a relation's and an actor's chip draw it at `size="chip"`, and the name draws it at `size="glyph"`, sized by `--vk-glyph`, when the list's `rowIcon` hands the row's `avatar`; it is handed `label`, whose picture it is, `avatarUrl`, `kind`, the record's kind as the app names it (a relation's `entity`, `user` for a member, an actor's type), and `fallback`, the glyph the chip or the name draws without a picture; the default draws the picture, marked `data-slot="vk-avatar"`, and the fallback when there is none or it fails to load, so an app that hands none sees its chips and names as before; yours draws initials on a tone, a record in its own shape, or the fallback for a kind it doesn't dress; where the provider's `panelControls` names `Avatar`, every record's mark ViewKit's panels draw is yours too, handed a pixel size, VK-1044: anything ViewKit draws on screen by itself takes your own where you hand it, and ViewKit hands it data only),
701
706
  `StatusBadge` (a pill by status slot), `StatusMarker` (an attention badge that opens its reason) and
702
- `Tag` (a category chip, removable, with an optional leading glyph), `CommandMenu` (a `command` cell's verb menu, opened from the trigger the cell drew; the default is the components map's `Menu`), `RowMenu` (the rows' right-click menu, once around each section's rows' container and aimed at the row a press or a right-click came from, its props that row's: Open page, the rows the rendering builds, Delete, where the grid's `menus.row` makes the first and last rows of `items` instead (`row-open`, `row-delete`), with one disabled `loading` row while it answers; the default is the components map's `Menu` at the pointer, opened by a right-click or the row's ⋯ (`data-slot="vk-grid-row-more"`), wrapped in `data-slot="vk-row-menu"`; the grid's row-menu keys send a cell the same right-click, with no press before it, so a `RowMenu` of your own opens on any `contextmenu` and doesn't wait for a press; its Delete asks the `confirm` port with `views.menus.row-delete-confirm` (the browser's own confirm when you hand none), and a delete that rejects says so through the toast port's `error` with `views.menus.row-delete-failed`; a long-press on a phone opens nothing, and with `GridTable`'s `phonePicking` on the grid's own long press picks the row, an `onToggleSelect` that answers the same held press ticking it with the grid's, once; `onOpenChange`, called as the menu opens and closes, holds the row it is aimed at as under the pointer while it is open, `data-hovered`, its tint and its ⋯, which the default calls) and `RelationLink` (where a relation chip goes, around the chip the display drew; the default goes nowhere), `RelationRoles` (a link's roles, inside its chip after the record's name, on a `many` relation that declares `links`; the default draws their labels in the subtle colour after a middle dot, wrapped in `data-slot="vk-relation-roles"`, and in a narrow cell cuts them, down to nothing, before the name loses a letter), `RelationChip` (a mentioned record, `ViewsRelationChipProps`: every relation ViewKit draws, in a table's cell, one and many and the +N list, a field row's value and `renderFieldValue`, a highlight's, and a user field's chip, where the provider's `panelControls` names `RelationChip` (VK-1053); ViewKit places a mentioned record and hands its data; your app draws it: it is handed `relation` (its `id`, `label`, `entity`, the record's kind as the app names it, `user` for a member, and `avatarUrl`), `roles` (a link's, each its `value` and `label`, on a `many` relation that declares `links`), `size` (`chip` in a cell or a highlight, `row` in a field row), `render`, the host's link where it has one (handed your element's props, it draws the host's element with them: a cell whose host opens its relations a bare `<button data-slot="vk-relation-link" data-no-nav>` whose press is the host's, the app's `RelationLink` or a host's `relationWrap` around a `<span>` holding them; absent for an inert fact and where the host's own element owns the click, `slotOwnsClick`; ViewKit never makes one up), and `fallback`, ViewKit's own chip as it would draw it there; the default draws its `fallback`, so with nothing named every place draws as before, and an app that hands the atom without naming it sees no change; a typed Select's chip is not one: a control stands without the provider), `Loading` (a wait: the list reloading, or more rows arriving; the default is a plain ring) `LoadMore` (how a list asks for its next page; the default watches a sentinel past the last row) and `PlatformMark` (a link's platform, drawn before it, read from its address with the conventions' platforms; the default draws nothing, so a link looks plain, and the package ships no brand art, so an app that wants marks draws its own by the platform's key into `data-slot="vk-platform"`), and the rows ViewKit's own filter and sort bodies draw with, which draw them only in the older panels a list keeps with `severalSorts: false` or `filterGroups: false` and in the value body a filter rule falls back to where the app's `FilterPartBody` or `FilterBody` doesn't draw its type: `ChoiceRow` (deprecated, drawn by nothing: picks a value: its label, a second line, a right-hand meta, the check when chosen), `CheckRow` (toggles one of many, a tick box on the left), `RadioRow` (picks one of a set, its mark a check or, with `mark="box"`, a tick box; a disabled row's reason in your `Tooltip`), `DirectionButton` (a sort's direction arrow, named `views.panels.direction`), `MenuRow` (a drill-in row: a glyph, the section, where it stands, a chevron; a disabled row's reason in your `Tooltip`), `ToggleRow` (deprecated, drawn by nothing: a boolean flipped in place, with a way back named `views.panels.toggle-reset`; a disabled row's reason in your `Tooltip`) and `PanelSearch` (a panel's text box, a filled well with a magnifier), and `Pill` (one option of a row of pills, the views row's and any tab row's: `active`, a `solid` or `plain` variant, a `default` or `sm` size, a leading glyph, the app's own active and hover classes for a status colour; with `menuOpen` it says it opens a menu, `aria-haspopup="menu"` and `aria-expanded`), and `ToolbarButton` (a toolbar's button, the one every toolbar part draws with: its glyph, its name, its word for a dress that shows words, a count in its corner, which becomes a ✕ badge that clears what it counts when handed `onClear`, a dot that says something is applied with no number, `open`, `changed`, `edge` for the row's outermost button, `disabled`, a `md` or `sm` size, and `popup` when it opens one; and, for the sort (VK-188), its own words shown whatever the dress, with their weight, in `data-slot="vk-toolbar-words"` (`children`: "Sorted by **Amount**"), a count in words after them in `data-slot="vk-toolbar-more"` (`more`: "+1"), an empty place with its edge dashed and `data-empty` (`empty`), and a reason it can't be used, `disabledReason` with `disabled`, in your `Tooltip`, the button then `aria-disabled` and still a Tab stop, a press doing nothing; its own words are then its name, with `more` after them, in place of `label`; and, in a folding toolbar line with no room, `iconAlone`, its words given up for its icon, `data-icon-alone`, which you draw as the icon alone whatever your dress says of words; `aside`, what it names left the list, its edge dashed in the warning's colour, `data-aside`; `foot`, New's + standing alone at a phone list's foot, round, a finger's size, on the brand's ground, `data-foot`; `joined` (`start`, `middle` or `end`), one of buttons joined as one (a filter's field, how it compares, its value, its menu), its corners on the outer side alone, no gap, the shared edge drawn once, `data-joined` with the value; and `waits`, its words saying what it waits for (a filter's value not yet picked), drawn in `--vk-fg-subtlest`, the placeholder's colour, `data-waits`; its own words keep to one line and give way to a holder that caps its width, cut with "…", where an icon button keeps its size; and, told what it is where your own toolbar frame draws it (VK-629), `current` (a view tab, `data-tab`; `true` the open one, `data-current` and `aria-current="true"`), `part` (which of the toolbar's own buttons it stands for, drawn as its `data-slot`: `views-chip` `vk-views-chip`, `views-tab` `vk-views-tab`, `views-more` `vk-views-more`, `views-add` `vk-views-add`, `clear` `vk-toolbar-clear`, `save` `vk-toolbar-save-button`; the default draws the chip and "+N" with a chevron after their words, `data-slot="vk-toolbar-chevron"`, and Save on an edge) and `onContextMenu` (a right-click: a tab's verbs open on it); and wherever it stands (VK-984), `part` naming every other button after its toolbar place (`sort`, `filter`, `options`, `search`, `quick`, `new`, `filters`, `filter-add`, `sort-pill`, `sort-add`, `advanced-filters`, `more-filters`, ⋯ `more`), which the default draws as it always did, and `className`, its place's class, put on the button). Each ships as a default, exported as `DEFAULT_VIEWS_ATOMS`, drawn
707
+ `Tag` (a category chip, removable, with an optional leading glyph), `CommandMenu` (a `command` cell's verb menu, opened from the trigger the cell drew; the default is the components map's `Menu`), `RowMenu` (the rows' right-click menu, once around each section's rows' container and aimed at the row a press or a right-click came from, its props that row's: Open page, the rows the rendering builds, Delete, where the grid's `menus.row` makes the first and last rows of `items` instead (`row-open`, `row-delete`), with one disabled `loading` row while it answers; the default is the components map's `Menu` at the pointer, opened by a right-click or the row's ⋯ (`data-slot="vk-grid-row-more"`), wrapped in `data-slot="vk-row-menu"`; the grid's row-menu keys send a cell the same right-click, with no press before it, so a `RowMenu` of your own opens on any `contextmenu` and doesn't wait for a press; its Delete asks the `confirm` port with `views.menus.row-delete-confirm` (the browser's own confirm when you hand none), and a delete that rejects says so through the toast port's `error` with `views.menus.row-delete-failed`; a long-press on a phone opens nothing, and with `GridTable`'s `phonePicking` on the grid's own long press picks the row, an `onToggleSelect` that answers the same held press ticking it with the grid's, once; `onOpenChange`, called as the menu opens and closes, holds the row it is aimed at as under the pointer while it is open, `data-hovered`, its tint and its ⋯, which the default calls) and `RelationLink` (where a relation chip goes, around the chip the display drew; the default goes nowhere), `RelationRoles` (a link's roles, inside its chip after the record's name, on a `many` relation that declares `links`; the default draws their labels in the subtle colour after a middle dot, wrapped in `data-slot="vk-relation-roles"`, and in a narrow cell cuts them, down to nothing, before the name loses a letter), `RelationChip` (a mentioned record, `ViewsRelationChipProps`: every relation ViewKit draws, in a table's cell, one and many and the +N list, a field row's value and `renderFieldValue`, a highlight's, and a user field's chip, where the provider's `panelControls` names `RelationChip` (VK-1053); ViewKit places a mentioned record and hands its data; your app draws it: it is handed `relation` (its `id`, `label`, `entity`, the record's kind as the app names it, `user` for a member, and `avatarUrl`), `roles` (a link's, each its `value` and `label`, on a `many` relation that declares `links`), `size` (`chip` in a cell or a highlight, `row` in a field row), `render`, the host's link where it has one (handed your element's props, it draws the host's element with them: a cell whose host opens its relations a bare `<button data-slot="vk-relation-link" data-no-nav>` whose press is the host's, the app's `RelationLink` or a host's `relationWrap` around a `<span>` holding them; absent for an inert fact and where the host's own element owns the click, `slotOwnsClick`; ViewKit never makes one up), and `fallback`, ViewKit's own chip as it would draw it there; the default draws its `fallback`, so with nothing named every place draws as before, and an app that hands the atom without naming it sees no change; a typed Select's chip is not one: a control stands without the provider), `Loading` (a wait: the list reloading, or more rows arriving; the default is a plain ring) `LoadMore` (how a list asks for its next page; the default watches a sentinel past the last row) and `PlatformMark` (a link's platform, drawn before it, read from its address with the conventions' platforms; the default draws nothing, so a link looks plain, and the package ships no brand art, so an app that wants marks draws its own by the platform's key into `data-slot="vk-platform"`), and the rows ViewKit's own filter and sort bodies draw with, which draw them only in the older panels a list keeps with `severalSorts: false` or `filterGroups: false` and in the value body a filter rule falls back to where the app's `FilterPartBody` or `FilterBody` doesn't draw its type: `ChoiceRow` (deprecated, drawn by nothing: picks a value: its label, a second line, a right-hand meta, the check when chosen), `CheckRow` (toggles one of many, a tick box on the left), `RadioRow` (picks one of a set, its mark a check or, with `mark="box"`, a tick box; a disabled row's reason in your `Tooltip`), `DirectionButton` (a sort's direction arrow, named `views.panels.direction`), `MenuRow` (a drill-in row: a glyph, the section, where it stands, a chevron; a disabled row's reason in your `Tooltip`), `ToggleRow` (deprecated, drawn by nothing: a boolean flipped in place, with a way back named `views.panels.toggle-reset`; a disabled row's reason in your `Tooltip`) and `PanelSearch` (a panel's text box, a filled well with a magnifier), and `Pill` (one option of a row of pills, the views row's and any tab row's: `active`, a `solid` or `plain` variant, a `default` or `sm` size, a leading glyph, the app's own active and hover classes for a status colour; with `menuOpen` it says it opens a menu, `aria-haspopup="menu"` and `aria-expanded`), and `ToolbarButton` (a toolbar's button, the one every toolbar part draws with: its glyph, its name, its word for a dress that shows words, a count in its corner, which becomes a ✕ badge that clears what it counts when handed `onClear`, a dot that says something is applied with no number, `open`, `changed`, `edge` for the row's outermost button, `disabled`, a `md` or `sm` size, and `popup` when it opens one, or `expanded` when it shows and hides a part of the page instead (Sort and filter, VK-1091), drawn as `aria-expanded`; and, for the sort (VK-188), its own words shown whatever the dress, with their weight, in `data-slot="vk-toolbar-words"` (`children`: "Sorted by **Amount**"), a count in words after them in `data-slot="vk-toolbar-more"` (`more`: "+1"), an empty place with its edge dashed and `data-empty` (`empty`), and a reason it can't be used, `disabledReason` with `disabled`, in your `Tooltip`, the button then `aria-disabled` and still a Tab stop, a press doing nothing; its own words are then its name, with `more` after them, in place of `label`; and, in a folding toolbar line with no room, `iconAlone`, its words given up for its icon, `data-icon-alone`, which you draw as the icon alone whatever your dress says of words; `aside`, what it names left the list, its edge dashed in the warning's colour, `data-aside`; `foot`, New's + standing alone at a phone list's foot, round, a finger's size, on the brand's ground, `data-foot`; `joined` (`start`, `middle` or `end`), one of buttons joined as one (a filter's field, how it compares, its value, its menu), its corners on the outer side alone, no gap, the shared edge drawn once, `data-joined` with the value; and `waits`, its words saying what it waits for (a filter's value not yet picked), drawn in `--vk-fg-subtlest`, the placeholder's colour, `data-waits`; its own words keep to one line and give way to a holder that caps its width, cut with "…", where an icon button keeps its size; and, told what it is where your own toolbar frame draws it (VK-629), `current` (a view tab, `data-tab`; `true` the open one, `data-current` and `aria-current="true"`), `part` (which of the toolbar's own buttons it stands for, drawn as its `data-slot`: `views-chip` `vk-views-chip`, `views-tab` `vk-views-tab`, `views-more` `vk-views-more`, `views-add` `vk-views-add`, `clear` `vk-toolbar-clear`, `save` `vk-toolbar-save-button`; the default draws the chip and "+N" with a chevron after their words, `data-slot="vk-toolbar-chevron"`, and Save on an edge) and `onContextMenu` (a right-click: a tab's verbs open on it); and wherever it stands (VK-984), `part` naming every other button after its toolbar place (`sort`, `filter`, `options`, `search`, `quick`, `new`, `filters`, `filter-add`, `sort-pill`, `sort-add`, `advanced-filters`, `more-filters`, ⋯ `more`, and the placed Sort and filter `sort-filter`, VK-1091), which the default draws as it always did, and `className`, its place's class, put on the button), and a grid header cell's chrome (VK-999), each drawn where ViewKit's own stood while the cell, its menu, its drag to reorder and its resize stay ViewKit's: `HeaderGlyph` (the column's type glyph before its name, handed `columnId`, `type`, `fieldKey`, `fallback`, ViewKit's own glyph for the column, null where it has none, and `className`, the class ViewKit's own draws with; the default draws `fallback`), `HeaderSortMark` (a sorted column's mark after its name where the grid's `sortMark` is on, inside ViewKit's `aria-hidden` box, handed `columnId`, `dir` and `className`; the default draws `icons.sortAsc` or `icons.sortDesc`; draw nothing for no mark, `aria-sort` saying it either way) and `HeaderResizeHandle` (what the resize handle shows, inside ViewKit's grab zone, `data-slot="vk-grid-resize-handle"`, which keeps the press, the drag, the double-click that resets the width and the menu kept shut, handed `columnId` and `active`, true while the column is resized; the default is a hairline in `--vk-brand` under the pointer and while `active`; yours may reach past the zone, inside the cell, and a press on it still resizes). Each ships as a default, exported as `DEFAULT_VIEWS_ATOMS`, drawn
703
708
  from the app's colours; an app swaps any of them through the provider's `atoms`, and the rest
704
709
  stay the defaults. `SelectionSheet` is the phone's sheet of a selection's verbs, opened by the
705
710
  selection bar's Actions: the default is the components map's `Sheet` holding the atoms' rows, a group's
@@ -775,7 +780,10 @@ pressable carries `data-slot="vk-relation-link"`, as the default `RelationLink`
775
780
  dressing it by its slot: it reads as text, the same part whichever verb it has, so one rule reaches it in every list.
776
781
  Two of a field row's controls stay ViewKit's own for the same reason, each being the sentence it says: a note with a
777
782
  quote, the disclosure marked by its `[data-field-note]` attribute, and the retry line under a write that failed, `data-slot="vk-field-retry"`;
778
- an app dresses them by those names. The panels' check and radio rows (`CheckRow`, and `RadioRow` with `mark="box"`)
783
+ an app dresses them by those names. Outside a Field rows card, a record's field row's target, your `Button`, carries
784
+ `data-key="vk-field-row-target"` (`vk-field-row-beside` beside a link's action, `vk-field-row-under` under a rich text), and
785
+ the value an open picker keeps in its place `[data-field-row-anchor]`: the Field's Box dresses them by those names, so your
786
+ Button forwards `data-key` to its element, as it does in the panels, and keeps its own `data-slot`. The panels' check and radio rows (`CheckRow`, and `RadioRow` with `mark="box"`)
779
787
  draw the `TickBox` atom, a picture inside a row that is itself the control, so an app hands the picture of its box
780
788
  there, never its `Checkbox`, which can't stand inside the row's button. The status
781
789
  marker, a tag's ✕ and the "+N" are drawn inside the `StatusMarker`, `Tag` and `CellMore` atoms, which an app swaps.
@@ -879,18 +887,21 @@ entry and choice and a Picker's item.
879
887
  key in `data-key` and no place), `data-slot="vk-sort-grip"` (its grip), `data-slot="vk-sort-field"` and
880
888
  `data-slot="vk-sort-direction"` (its two boxes), `data-slot="vk-sort-remove"` (its ×), `data-slot="vk-sort-rule-open"` (a phone's
881
889
  or the narrow form's row, pressed to turn its direction), `data-slot="vk-sort-rule-more"` (its ⋯), `data-slot="vk-sort-rule-action"`
882
- (a row of that menu, `data-key` `delete`, `why` or `put-back`), `data-slot="vk-sort-direction-option"` (a direction to pick on a
890
+ (a row of that menu, `data-key` `delete`, `why` or `put-back`), `data-slot="vk-sort-row-action"` and `data-slot="vk-sort-foot-action"`
891
+ (an app's own button at a rule's end or in the foot, `menus.sortEditor`'s `row` and `foot`, `data-key` its key, VK-1065), `data-slot="vk-sort-direction-option"` (a direction to pick on a
883
892
  phone's step or the narrow form's list, `data-key` `ascending` or `descending`), `data-slot="vk-sort-add"` (Add sort),
884
893
  `data-slot="vk-sort-clear"` (Clear all), `data-slot="vk-sort-foot"` (the row they stand in) and `data-slot="vk-sort-none"`
885
894
  (nothing sorted).
886
895
  - The filter editor (`CONTROLS.FilterBody`): `data-slot="vk-filter"` (the editor), `data-slot="vk-filter-rules"` (a level's list),
887
896
  `data-slot="vk-filter-item"` (a rule's or a group's place in it, `data-index`), `data-slot="vk-filter-rule"` (one rule, `data-key`
888
- its field; a set-aside keeps `data-aside`), `data-slot="vk-filter-where"` (Where), `data-slot="vk-filter-join"` (the And/Or that
897
+ its field, a related record's field its relation and its field joined by a dot, `company.industry`; a set-aside keeps `data-aside`), `data-slot="vk-filter-where"` (Where), `data-slot="vk-filter-join"` (the And/Or that
889
898
  turns its level), `data-slot="vk-filter-joined"` (a later rule's And/Or words), `data-slot="vk-filter-field"` and
890
899
  `data-slot="vk-filter-how"` (its field's and way's boxes, on the box itself, the Select's), `data-slot="vk-filter-value"` (what
891
900
  holds its value's box, its wrapper), `data-slot="vk-filter-rule-more"` (its ⋮),
892
901
  `data-slot="vk-filter-rule-action"` (a row of that menu: Convert to group, the ways a several-values rule matches, Delete, a
893
902
  set-aside's why and Put back, `data-key` `convert`, `any`, `none`, `every`, `delete`, `why`, `put-back`),
903
+ `data-slot="vk-filter-row-action"` and `data-slot="vk-filter-foot-action"` (an app's own button at a rule's end or in a foot,
904
+ `menus.filterEditor`'s `row` and `foot`, `data-key` its key, VK-1065),
894
905
  `data-slot="vk-filter-group"` (a group's well), `data-slot="vk-filter-group-head"` and `data-slot="vk-filter-group-more"` (its head
895
906
  and ⋮), `data-slot="vk-filter-quantifier"` (a related record's group's Any, None or Every, in its head),
896
907
  `data-slot="vk-filter-group-action"` (a row of a group's menu, `data-key` `exclude`), `data-slot="vk-filter-delete"` (Delete at a group's foot), `data-slot="vk-filter-add"` (Add filter),
@@ -1144,7 +1155,7 @@ The glyphs the rendering asks for, by meaning. The app maps each name to a compo
1144
1155
  name, and `CONTROLS.AppIcon` draws ViewKit's own (`CONTROL_ICONS`, Tabler's as the Outright kit draws them). Field types: `text` `longText` `number` `percent` `currency` `date` `datetime` `duration`
1145
1156
  `boolean` `select` `status` `multiselect` `relation` `user` `url` `domain` `email` `phone` `location` `name` `actor`
1146
1157
  `rich_text` `range` `lookup` `rollup` `formula` `computed`. Who did it: `automation` `apiKey` `system` (a member wears `user`). Actions: `add` `edit` `delete` `copy` `cut` `paste` `clear` `hide` `show` `lock`
1147
- `pin` `wrap` `more` `close` `check` `warning` `drag` `resize` `open` `selectRow`. Navigation and order: `chevronDown`
1158
+ `pin` `wrap` `more` `close` `check` `warning` `drag` `resize` `open` `expand` `selectRow`. Navigation and order: `chevronDown`
1148
1159
  `chevronRight` `caretDown` `caretRight` `sortAsc` `sortDesc` `enter`. Figures: `calendar` `time` `progress`.
1149
1160
  The grid's menus: `moveLeft` `moveRight` `group` `clearSort` `sortRowsUp` `sortRowsDown`. `sortRowsUp` and
1150
1161
  `sortRowsDown` are a menu's verbs, sorting the rows by a column; `sortAsc` and `sortDesc` are the mark a
@@ -1203,8 +1214,11 @@ the reasons a disabled row the grid builds hands your `Menu` as its `disabledRea
1203
1214
  `views.menus.range-not-clearable` (a selection's Cut and Clear: "Nothing in this selection can be emptied"),
1204
1215
  `views.menus.add-column-all-shown-reason` ("+ Add column"'s all-shown row: "No hidden column to add") and
1205
1216
  `views.menus.loading` (a field row's verbs while its record loads: "Wait for current data before editing");
1206
- the grid's own: `views.grid.figure` (`{ kind }`, a footer figure's name, `"none"` included: "None", "Sum", "Avg", "Min",
1207
- "Max", "Count", "Filled", "Unique", "Ratio"), `views.grid.figure-pick` ("Calculate", the offer `vk-grid-figure-pick` in an empty footer cell),
1217
+ the grid's own: `views.grid.figure` (`{ kind }`, a footer figure's name, a row of its picker, `"none"` included: "None",
1218
+ "Sum", "Average", "Min", "Max", "Count", "Count filled", "Count empty", "Percent empty", "Percent filled", "Unique", "Ratio"),
1219
+ `views.grid.figure-word` (`{ kind }`, the word after a footer figure's value, `vk-grid-figure-label`: "count", "empty",
1220
+ "filled", "sum", "average", "min", "max", a percent's "empty" or "filled", "unique", "ratio"; `"none"` an empty word),
1221
+ `views.grid.figure-pick` ("Add calculation", the offer `vk-grid-figure-pick` in an empty footer cell),
1208
1222
  the pager's `views.grid.pager` ("Pages", its name), `views.grid.pager-range` (`{ from, to, total, exact }`, `exact` `"true"` or `"false"`: "26–50 of 213",
1209
1223
  "1–25 of 1,000+" under a capped count, "No rows"), `views.grid.pager-size` (`{ size }`: "25 per page"),
1210
1224
  `views.grid.pager-sizes` ("Rows per page", the size menu's name), `views.grid.pager-previous` ("Previous") and
@@ -1301,7 +1315,7 @@ a `ToolbarButton`'s ✕ badge, which clears what it counts); its Search button a
1301
1315
  its ✕ `views.panels.search-close` ("Close search", while a search its button opened stands open, empty or not) or,
1302
1316
  in a field filling its line, `views.panels.search-clear` once something is typed, and its spinner `views.panels.searching` ("Searching").
1303
1317
  The Sort and Group panels' words: `views.panels.search` ("Search", a long list's search box),
1304
- `views.panels.group-by` ("Group by"), `views.panels.sort` ("Sort"), `views.panels.date-by` ("Date by"),
1318
+ `views.panels.group-by` ("Group by"), `views.panels.sort` ("Sort"), `views.panels.sort-filter` ("Sort and filter", the placed button that shows and hides the filter bar, VK-1091), `views.panels.date-by` ("Date by"),
1305
1319
  `views.panels.hide-empty-groups` ("Hide empty groups"), `views.panels.groups` ("Groups", the heading over the
1306
1320
  group order), `views.panels.groups-hide-all` ("Hide all"), `views.panels.groups-show-all` ("Show all"),
1307
1321
  `views.panels.group-remove` ("Remove grouping") and `views.panels.group-empty` ("—", the empty group's name);
@@ -1477,7 +1491,7 @@ A yes/no cell in the grid, the checkbox style, is your `Checkbox`, the box your
1477
1491
  A field row's own buttons are your `Button`: its edit target in its three shapes (around the value, beside a link's open action, under a rich text), the verb trigger around a value, the lane's ▾ and rich text's Show more, `variant` `ghost`, `size` `sm` (`icon` for the ▾), ViewKit's box in `className` (the target's with `[font:inherit]`, so a value keeps the row's type, and a height that grows with a wrapped value), the look yours.
1478
1492
  A field row's yes/no, the checkbox style, is your `Checkbox`, a Tab stop, one press writing once; a row it can't write is handed `readOnly`.
1479
1493
  The buttons ViewKit draws itself in the toolbar's panels, the search's ✕ and the views row are your `Button`: a filter's select, a range's presets, a stale filter's and a date range's Clear, the Columns list's eyes, new-line marks and a column's opener, the group list's eyes, Clear all, the layout's Reset, show or hide every group, a panel header's back and ✕, Export, Publish and Reset, the "+N" chip, the + and the views picker's chip (outside your own toolbar frame; inside one they are your `ToolbarButton`), a view's row and its ⋯, and the quick filters' fields: `variant` `ghost` (`outline` for a range's presets and the date filter's framed select, `secondary` for the views picker's chip, a filled chip with no border), `size` `icon` or `sm`, ViewKit's box in `className` (a row's with `[font:inherit]` or its own type, so it reads as the rows beside it), the look yours. A trigger is handed a ref it anchors its menu or popover on, `aria-haspopup` and `aria-expanded`; the views row's chips and a view's ⋯ `data-state="open"` or `data-state="closed"`; the new-line mark and a quick filters' field `aria-pressed`; a view's row `role="option"` and `aria-selected`; Export `data-vs-row="true"`, so a host's `[data-vs-row]` insets it as it does Copy link and Share; the search's ✕ and the chips their `data-slot`. A press note and the search's caret ride a `display: contents` span around your `Button`, and a view's ⋯ waits for the pointer on a computer through a span around it carrying `data-desktop`. Your `Button` draws `secondary` and forwards each of those to its element. The `ToolbarButton` atom's parts stay the atom's.
1480
- The popover around a whole body the app hands (`Picker`, `PartsBody`, `ValuesBody`, `LinksBody`), in the grid and a field row alike, takes only its layer (and, in a field row, a cap at the screen's width less 2rem), so the app's `Popover` stands at its own width, and `data-vk-body` on it through `panelData`: `picker`, `parts`, `values` or `links`. The phone's sheet takes no class. A grid editor opening a whole body your app hands (`Picker`, `DateBody`, `PartsBody`, `ValuesBody`, `LinksBody`) on a computer hands your `Popover` a `sideOffset` of minus the cell's height and one spacing step (`--vk-spacing`), and an `alignOffset` of minus one step, measured as the editor opens, so a popover placed under its anchor stands a step above the cell's top and a step left of its start, covering the cell and its lines whole rather than doubling them, as long text's panel opens (the kit's `overCell`). Give that popover at least the cell's width and two steps, so it covers the cell's far line too and a press where the cell was lands inside it (ViewKit's own Popover does), and don't let it flip above its anchor: a flipped one takes the same offsets, a step below the cell's bottom. A field row and the phone's sheet open as before.
1494
+ The popover around a whole body the app hands (`Picker`, `PartsBody`, `ValuesBody`, `LinksBody`), in the grid and a field row alike, takes only its layer (and, in a field row, a cap at the screen's width less 2rem), so the app's `Popover` stands at its own width, and `data-vk-body` on it through `panelData`: `picker`, `parts`, `values` or `links`. The phone's sheet takes no class. A grid editor opening a whole body your app hands (`Picker`, `DateBody`, `PartsBody`, `ValuesBody`, `LinksBody`) on a computer hands your `Popover` a `sideOffset` of minus the cell's height and one spacing step (`--vk-spacing`), and an `alignOffset` of minus one step, measured as the editor opens, so a popover placed under its anchor stands a step above the cell's top and a step left of its start, covering the cell and its lines whole rather than doubling them, as long text's panel opens (the kit's `overCell`). Give that popover at least the cell's width and two steps, so it covers the cell's far line too and a press where the cell was lands inside it (ViewKit's own Popover does), and don't let it flip above its anchor: a flipped one takes the same offsets, a step below the cell's bottom. A record's field row under the Field's Open (`data-field-row-open="over"` on a frame round the rows, `FIELD_LOOKS` `row-open: over`; VK-1081) hands your `Popover` a negative `sideOffset`, an `alignOffset` and a `style.minWidth` for every body it opens on a computer: first over the row's box a step up and left of it, as the grid's are, then, once the body is laid out and before it paints, offsets that put the body's first line's words where the value's words were (measured at rest, your popup's opening translate and scale undone by its layout box) and a width that covers the box. It measures again as the popup resizes until the person's first key or input in it, and never while the body holds an `aria-busy="true"` part. Place it as you place any offset; a popup flipped above takes the same offsets. The measure reads the nearest element round the body placed `position: fixed` or `absolute` as your positioner and its child that holds the body as your popup (Base UI's and Radix's popovers both draw them so); with no such element the popover stays a step over the box, its words not aligned. Its first line is the first typed input or visible text in the body, in the order drawn, or the line it marks `data-vk-first-line`. Without the option, and on a phone's sheet, a field row opens as before. A long text under the Field's Long (`data-field-row-long="line"`, `FIELD_LOOKS` `row-long: line`; VK-1082) opens the same way on a computer, whatever the Field's Open says: your `Popover`, marked `data-field-row-long-editor` through `panelData`, holds its textarea, whose first line is its top, border and padding and half its line height; ViewKit's own Popover takes no padding there, and the textarea stops at `--vk-editor-max-h`, then scrolls. Where your `Button` draws a border round the row's value, the textarea stands that border's width in from your popup's edge, taken from that most height, so the popup covers the row's box whole and still stops there (VK-1109).
1481
1495
  And an optional `datePicks` (`ViewsDatePicks`, from `./react`): the quick days the date editors offer, in order, any of
1482
1496
  `today`, `tomorrow`, `next-monday` (the Monday after today, a week on when today is one) and `in-a-week` (today + 7 on
1483
1497
  the conventions' calendar). ViewKit works out each day; the date editor hands exactly these to an app's `DateBody`, `none`
@@ -21,6 +21,7 @@ A row of Field rows may open with a glyph lane (`o-field-row-glyph`), 20 wide, i
21
21
  | `--vk-font-size-xs` | size | `text-xs` | `12px` |
22
22
  | `--vk-font-weight-medium` | size | `font-weight-medium` | `500` |
23
23
  | `--vk-font-weight-normal` | size | `font-weight-normal` | `400` |
24
+ | `--vk-hovered` | colour | `surface-hovered` | `hsl(0 0% 96.5%)` · dark `hsl(210 4% 9.5%)` |
24
25
  | `--vk-line-height-base` | size | `text-base--line-height` | `1.5` |
25
26
  | `--vk-line-height-sm` | size | `text-sm--line-height` | `1.4286` |
26
27
  | `--vk-line-height-xs` | size | `text-xs--line-height` | `1.3333` |
@@ -31,6 +31,6 @@ The Select, the Picker, the Menu, the Button, the Input, the Number field, the D
31
31
 
32
32
  Each part inside it carries a public `data-slot` (VK-988), so your stylesheet dresses one part apart from the rest; a part that repeats also says which one it is (`data-key`, and a rule its place, `data-index`). What each names, and its keys: [the panels' parts](../contract.md#the-atoms).
33
33
 
34
- `vk-filter`, `vk-filter-rules`, `vk-filter-item`, `vk-filter-rule`, `vk-filter-where`, `vk-filter-joined`, `vk-filter-join`, `vk-filter-field`, `vk-filter-how`, `vk-filter-value`, `vk-filter-rule-more`, `vk-filter-rule-action`, `vk-filter-group`, `vk-filter-group-head`, `vk-filter-quantifier`, `vk-filter-group-more`, `vk-filter-group-action`, `vk-filter-delete`, `vk-filter-add`, `vk-filter-clear`, `vk-filter-foot`, `vk-filter-none`, `vk-filter-excluded`, `vk-filter-head`.
34
+ `vk-filter`, `vk-filter-rules`, `vk-filter-item`, `vk-filter-rule`, `vk-filter-where`, `vk-filter-joined`, `vk-filter-join`, `vk-filter-field`, `vk-filter-how`, `vk-filter-value`, `vk-filter-rule-more`, `vk-filter-rule-action`, `vk-filter-row-action`, `vk-filter-foot-action`, `vk-filter-group`, `vk-filter-group-head`, `vk-filter-quantifier`, `vk-filter-group-more`, `vk-filter-group-action`, `vk-filter-delete`, `vk-filter-add`, `vk-filter-clear`, `vk-filter-foot`, `vk-filter-none`, `vk-filter-excluded`, `vk-filter-head`.
35
35
 
36
36
  Under the provider's `panelControls` its buttons, boxes that pick, menus, popovers and text boxes are the app's own, each handed its part's name (VK-1013). The filter bar's own popover (`FilterPartBody`) names its typed value's box `vk-filter-part-value` and a range's two numbers `vk-filter-part-pair` (VK-1003); its words' box is the app's Input there too, and a date part the date editor with the app's controls (VK-1014, VK-1021); its number boxes are the app's Input too, ViewKit reading the number (VK-1018), and its tooltips the app's Tooltip where `panelControls` names it (VK-1015).
@@ -14,6 +14,6 @@ Its size is the app's too, beside these names: `--vk-menu-w` its width and `--vk
14
14
 
15
15
  ## Its name in a panel
16
16
 
17
- A menu a part names takes `data-slot` (VK-988: `vk-view-menu`; VK-1023: the bulk bar's `vk-bulk-menu`), drawn on its popup on a computer and on its sheet on a phone; its rows take theirs from each entry's `slot` (`PartSlot`). ViewKit's own map Menu (`ViewsMenuProps`) names a named menu's rows `<name>-row`, each by its item's `data-key`; a menu nobody names draws as before.
17
+ A menu a part names takes `data-slot` (VK-988: `vk-view-menu`; VK-1023: the bulk bar's `vk-bulk-menu`), drawn on its popup on a computer and on its sheet on a phone; its rows take theirs from each entry's `slot` (`PartSlot`). ViewKit's own map Menu (`ViewsMenuProps`) names a named menu's rows `<name>-row`, each by its item's `data-key`; a menu nobody names draws no `data-slot`, and each of its rows still carries its item's `data-key`.
18
18
 
19
19
  Name a menu under the panels' prefixes (`vk-view-menu`, `vk-bulk-menu`): any other `vk-` name would make its phone sheet a reset root, and ViewKit's reset would reach inside it (VK-1003).
@@ -9,6 +9,8 @@ Every name `number-editor.css` reads (beside the stylesheets of the controls it
9
9
  | `--vk-fg-subtle` | colour | `text-subtle` | `hsl(0 0% 35%)` · dark `hsl(258 4% 72%)` |
10
10
  | `--vk-font-size-base` | size | `text-base` | `16px` |
11
11
  | `--vk-font-size-sm` | size | `text-sm` | `14px` |
12
+ | `--vk-shadow-field-focus` | shadow | `shadow-field-focus` | `0 0 10px 0 hsl(219 90% 65.5% / 0.3)` · dark `0 0 10px 0 hsl(219 66% 45% / 0.42)` |
13
+ | `--vk-shadow-field-focus-danger` | shadow | `shadow-field-focus-danger` | `0 0 10px 0 hsl(3 87% 68% / 0.3)` · dark `0 0 10px 0 hsl(1 55% 46.5% / 0.42)` |
12
14
  | `--vk-spacing` | size | `spacing` | `4px` |
13
15
 
14
16
  ## Its parts
@@ -30,6 +30,6 @@ The Select, the Picker, the Menu, the Button and the Field rows it draws with re
30
30
 
31
31
  Each part inside it carries a public `data-slot` (VK-988), so your stylesheet dresses one part apart from the rest; a part that repeats also says which one it is (`data-key`, and a rule its place, `data-index`). What each names, and its keys: [the panels' parts](../contract.md#the-atoms).
32
32
 
33
- `vk-sort`, `vk-sort-rules`, `vk-sort-rule`, `vk-sort-grip`, `vk-sort-field`, `vk-sort-direction`, `vk-sort-remove`, `vk-sort-rule-open`, `vk-sort-rule-more`, `vk-sort-rule-action`, `vk-sort-direction-option`, `vk-sort-add`, `vk-sort-clear`, `vk-sort-foot`, `vk-sort-none`, `vk-sort-head`.
33
+ `vk-sort`, `vk-sort-rules`, `vk-sort-rule`, `vk-sort-grip`, `vk-sort-field`, `vk-sort-direction`, `vk-sort-remove`, `vk-sort-rule-open`, `vk-sort-rule-more`, `vk-sort-rule-action`, `vk-sort-row-action`, `vk-sort-foot-action`, `vk-sort-direction-option`, `vk-sort-add`, `vk-sort-clear`, `vk-sort-foot`, `vk-sort-none`, `vk-sort-head`.
34
34
 
35
35
  Under the provider's `panelControls` its buttons, boxes that pick, menus, popovers and text boxes are the app's own, each handed its part's name (VK-1013).
@@ -18,6 +18,8 @@ It also reads the inline input's own `--inline-input-ring` and `--inline-input-c
18
18
  | `--vk-line-height-xs` | size | `text-xs--line-height` | `1.3333` |
19
19
  | `--vk-overlay` | colour | `surface-overlay` | `hsl(0 0% 100%)` · dark `hsl(226 10% 10%)` |
20
20
  | `--vk-radius-md` | size | `radius-md` | `7.5px` |
21
+ | `--vk-shadow-field-focus` | shadow | `shadow-field-focus` | `0 0 10px 0 hsl(219 90% 65.5% / 0.3)` · dark `0 0 10px 0 hsl(219 66% 45% / 0.42)` |
22
+ | `--vk-shadow-field-focus-danger` | shadow | `shadow-field-focus-danger` | `0 0 10px 0 hsl(3 87% 68% / 0.3)` · dark `0 0 10px 0 hsl(1 55% 46.5% / 0.42)` |
21
23
  | `--vk-shadow-lg` | shadow | `shadow-lg` | `0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)` |
22
24
  | `--vk-shadow-menu` | shadow | `shadow-menu` | `0 6px 18px hsl(0 0% 0% / 0.06), 0 3px 9px hsl(0 0% 0% / 0.05), 0 1px 1px hsl(0 0% 0% / 0.04)` · dark `0 8px 24px hsl(0 0% 0% / 0.5)` |
23
25
  | `--vk-spacing` | size | `spacing` | `4px` |
@@ -25,6 +25,7 @@ The components map hands the package your primitives: a button, a popover, a men
25
25
  - `CheckRow`, `RadioRow`, `DirectionButton`, `MenuRow` and `PanelSearch`: a tick row, a one-of-a-set row, a sort's direction arrow, a drill-in row and a panel's text box. Only ViewKit's own filter and sort bodies draw them: the older panels a list keeps with `severalSorts: false` or `filterGroups: false`, and the value body a filter rule falls back to where your `FilterPartBody` or `FilterBody` doesn't draw its type. The panels a list opens by default are your bodies (`CustomizeBody`, `SortBody`, `FilterBody` and the rest), handed their rows as data, so swapping these changes only those places.
26
26
  - `Pill`: one option of a row of pills, the views row's (`/panels/react`) and any tab row's.
27
27
  - `RangeCalendar`: the filter panel's month, a day or a range in ISO days. The default is your components map's one-day `Calendar` on the end being picked, and paints no range; hand your own to paint one.
28
+ - `HeaderGlyph`, `HeaderSortMark` and `HeaderResizeHandle`: a grid header cell's chrome, its type glyph before the name, a sorted column's mark after it (where the grid's `sortMark` is on) and what its resize handle shows. Each is drawn where ViewKit's own stood; the cell, its menu, its drag to reorder and the resize's grab zone stay ViewKit's, so sorting from a header, dragging it and resizing it work with yours. `HeaderGlyph` is handed ViewKit's own glyph as `fallback`, to draw, wrap or replace by the column's `type` or `fieldKey`; `HeaderSortMark` the way it sorts, `dir`; `HeaderResizeHandle` whether the column is being resized, `active`. The defaults draw the header as it always was.
28
29
  - `ToolbarButton`: the toolbar's button (`/panels/react`), a glyph in a circle with its word for a dress that shows words, a count that becomes a ✕ badge when it can clear what it counts, and a dot. Hand your own to give the toolbar your buttons' look. `CONTROL_ATOMS.ToolbarButton`, the kit's, draws the count as a count, never that ✕: under it, a part's filters clear from their own panel.
29
30
 
30
31
  The names are `ATOM_NAMES` from `viewkitjs/views`, and the defaults hold exactly those, the deprecated three included.
@@ -199,7 +199,7 @@ function DealList({ deals, filterKey }: { deals: Deal[]; filterKey: string }) {
199
199
 
200
200
  ## The bar
201
201
 
202
- `SelectionBar` is the bar a selection opens: the count, which clears the selection when pressed (Escape does too, where the list wires `useEscapeToClear`, as the grid does), your verbs, a trash when you hand `onDelete`, and More. On a desktop it floats as an island at the foot of the screen, the first four verbs on it and the rest in More (with nothing in it, More stays in its place and says so in your `Tooltip`, "No more actions for these"); on a phone it is a pill reading "3 selected · Actions · ✕", whose Actions open a sheet of every verb. It draws nothing while `count` is zero, so a `renderBar` can always return it.
202
+ `SelectionBar` is the bar a selection opens: the count, which clears the selection when pressed (Escape does too, where the list wires `useEscapeToClear`, as the grid does), your verbs, a trash when you hand `onDelete`, and More. On a desktop it floats as an island at the foot of the screen, the first four verbs not marked `more` on it and the rest in More (with nothing in it, More stays in its place and says so in your `Tooltip`, "No more actions for these"); on a phone it is a pill reading "3 selected · Actions · ✕", whose Actions open a sheet of every verb. It draws nothing while `count` is zero, so a `renderBar` can always return it.
203
203
 
204
204
  What a selection lets a person do (move twelve deals to a stage, export them, delete them) is your app's. You hand the bar its verbs as data, a `SelectionVerb` each, and each verb's handler calls your own action over the selected ids, then `clear`; an agent working through your actions does the same thing. A verb is one of three kinds:
205
205
 
@@ -406,9 +406,9 @@ A row tints under the pointer. `rowHighlight="active"` tints the active row inst
406
406
 
407
407
  ## Figures
408
408
 
409
- Each column's footer shows one figure: the person's pick from what the column offers (sum, average, min, max and count for a number, count, filled and unique for the rest), else the column's `defaultAggregate`. Pass `aggregates`, the picks by column id, and `onAggregateChange`, which makes each footer cell a picker. On a `viewBacked` list only a column with a field can change its pick. With neither `onAggregateChange` nor a `renderAggregate` of your own, the grid draws no footer. An empty cell that can pick a figure offers one ("Calculate", `views.grid.figure-pick`) under the pointer; the grid's look shows it in every empty cell at rest under Add calculation (`offer`), or wear `data-grid-offer="always"` on a frame round the grid. `renderAggregate(columnId, group)` draws a footer cell yourself, with no label.
409
+ Each column's footer shows one figure: the person's pick from what the column offers, else the column's `defaultAggregate`. The first column offers Count alone (a count anywhere else repeats it); every other column offers Count empty, Count filled, Percent empty and Percent filled, and a number or money also Sum, Average, Min and Max (a percent never sums). A pick the column no longer offers, a Count saved on a column that isn't first or a Unique, reads None and stays saved; so does a declared `defaultAggregate` or `footerKinds` naming one, and a column left with nothing but None to pick draws no picker. Pass `aggregates`, the picks by column id, and `onAggregateChange`, which makes each footer cell a picker: it opens above the cell with its right edge on the cell's, its rows keyed by their figure and reshaped by `menus.figure`. On a `viewBacked` list only a column with a field can change its pick. With neither `onAggregateChange` nor a `renderAggregate` of your own, the grid draws no footer. Every cell is right-aligned, whatever its column's alignment, and a result reads its value and its word (`views.grid.figure-word`: "13 count", "20% empty"). An empty cell that can pick a figure offers one ("Add calculation", `views.grid.figure-pick`) under the pointer and while its picker is open, cut at the cell's edge; the grid's look shows it in every empty cell at rest under Add calculation (`offer`), or wear `data-grid-offer="always"` on a frame round the grid. Under Figures Value first (Attio's) the offer and the word are the rows' size, the word after the value in lower case; Word first, the grid's own, keeps them in small capitals before it. `renderAggregate(columnId, group)` draws a footer cell yourself, with no label.
410
410
 
411
- The footer stands after the last row and scrolls with the rows. `pinFooter` pins it at the foot of the grid's scroll area instead, as a phone's table keeps its count in sight: the rows pass under it, it paints `--vk-ground` while they do (and carries `data-stuck` then; at rest it shows what the grid stands on), it stands `--vk-scroll-inset-bottom` above the edge (so what your app floats there doesn't cover it) and, while rows are selected, a step above the bar your `renderBar` draws, measured where it stands (on a phone the rows then end at the footer's bottom, so nothing of them shows in that step or round the bar): on the foot when it draws none, and the last row clears the bar the same way, pinned footer or not. The grid finds the bar in its frame, where it places what `renderBar` returns, or ViewKit's own `SelectionBar` wherever it is portalled; a bar of yours portalled out of the frame isn't seen. An ungrouped grid's footer stands at the foot even when its rows don't fill the area, and in pages it stands just above the pager. A grouped grid's footers each pin while their group's rows run past the foot, and close their group otherwise. Arrowing to a row never leaves it under the footer.
411
+ The footer stands after the last row and scrolls with the rows, a line under it in the rows' colour. `pinFooter` pins it at the foot of the grid's scroll area instead, as a phone's table keeps its count in sight: the rows pass under it, it paints `--vk-ground` and draws a line along its top while they do (and carries `data-stuck` then; at rest it shows what the grid stands on, the last row's line above it), it stands `--vk-scroll-inset-bottom` above the edge (so what your app floats there doesn't cover it) and, while rows are selected, a step above the bar your `renderBar` draws, measured where it stands (on a phone the rows then end at the footer's bottom, so nothing of them shows in that step or round the bar): on the foot when it draws none, and the last row clears the bar the same way, pinned footer or not. The grid finds the bar in its frame, where it places what `renderBar` returns, or ViewKit's own `SelectionBar` wherever it is portalled; a bar of yours portalled out of the frame isn't seen. On a computer it is never pushed below its last row: under a table shorter than the area it stands right after the last row, and sticks to the foot only once the rows run past it. On a phone an ungrouped grid's footer stands at the foot even when its rows don't fill the area, and in pages just above the pager. A grouped grid's footers each pin while their group's rows run past the foot, and close their group otherwise. Arrowing to a row never leaves it under the footer.
412
412
 
413
413
  A group's band shows its count and, beside it, the figures the person turned on. `groupSummary` is that set of parts (`"count"`, `"total"` for the list's first figure, `total:<columnId>` for each one after it), changed through `onGroupSummaryChange`, and `groupFigures` declares which figures a band can show. Declare one by its `column` and `kind` (`"sum"`, `"avg"` and the rest of the footer's picks), and the grid adds it up and writes it as that column's footer does: the same number, in the column's format and currency, a paged group's from your `figures`, or your own footer cell where `renderAggregate` draws one. Its `label` is the column's header unless you give one. To draw a figure yourself, give `label` and `render(group)` in place of `column` and `kind`. `countNoun` words the count ("2 deals"); without it the count is bare. `countOf` answers the count when a group holds more rows than are loaded.
414
414
 
@@ -660,7 +660,7 @@ assert.deepEqual(gridNormalizeWrite(titleColumn, " Acme renewal ", conventions)
660
660
  assert.equal(gridNormalizeWrite(stageColumn, "maybe", conventions).ok, false);
661
661
  ```
662
662
 
663
- **While a cell's editor is open** the cell draws nothing of its own: no ring, no lift and no tint, so under a popover it stays as it was, and a cell typed in shows only the caret. It wears `data-editing` until the editor starts to close, not until its exit is over. Escape, a pick, or Enter after typing closes the editor and keeps the cell selected, its ring back; a second Escape lets it go. A click away closes the editor and lets the cell go (a pick your app holds, `cellPick`, stays); a click on another cell closes it and selects that one, its editor not opened.
663
+ **While a cell's editor is open** the cell draws no lift and no tint. Under a popover (a picker, a date) it draws no ring either, so it stays as it was. A cell typed in (a text, an email, a link, a phone, a number) keeps the selected cell's ring, the same line in the same place, and when what is typed runs past the cell the ring goes round all the box covers, on the plain ground. It wears `data-editing` until the editor starts to close, not until its exit is over. Escape, a pick, or Enter after typing closes the editor and keeps the cell selected, its ring back; a second Escape lets it go. The focus is back on the cell the moment a picker starts to close, so a key pressed while it plays out is the cell's: a second Escape lets it go, an arrow moves the pick, and ⌘Z takes back the pick just made. A key that would open or write the cell (Enter, a letter, Delete) waits for the exit to end. A click away closes the editor and lets the cell go (a pick your app holds, `cellPick`, stays); a click on another cell closes it and selects that one, its editor not opened.
664
664
 
665
665
  **One of a set.** A `select` or a `status` opens the select editor in your `Picker`: its options, the cell's value held, and a pick saves. A column that may be emptied (`clearable`) offers the Picker's empty row, None, while the cell holds a value; a required status offers none. Delete still clears a column that may be emptied. A closed list offers its options, and the cell's own value when no option names it, so a stray value shows on the row that holds it and on no other; an open select offers the values its records hold and creates the typed text. A list of more than 8 options shows the Picker's search, and a letter typed on the cell opens it already filtered by that letter; a shorter list shows its rows alone.
666
666
 
@@ -210,7 +210,7 @@ Their stylesheets are `input.css`, `inline-input.css`, `field.css`, `toggle.css`
210
210
  - `MenuScroll` — what scrolls in a menu's panel: its rows alone, the Scrollbar over them.
211
211
  - `MenuEntry` — a row of a menu: an action, a link, a tick, a choice or actions one level in, a pick under a heading, a group, a separator.
212
212
  - `MenuChoice` — a choice: its value, its name, its mark, its `detail` and its public name (`slot`, a `PartSlot`).
213
- - `PartSlot` — a part's public name (`slot`, its `data-slot`) and which one of its kind it is (`key`, its `data-key`; `index`, its `data-index`): what a `MenuEntry`, a `MenuChoice` and a `PickerItem` carry as `slot`, drawn on the row in every form (VK-988). A `pick` or a `group` names its rows through its choices or entries.
213
+ - `PartSlot` — a part's public name (`slot`, its `data-slot`, optional: a row with a key and no name draws `data-key` alone) and which one of its kind it is (`key`, its `data-key`; `index`, its `data-index`): what a `MenuEntry`, a `MenuChoice` and a `PickerItem` carry as `slot`, drawn on the row in every form (VK-988). A `pick` or a `group` names its rows through its choices or entries.
214
214
  - `MenuListEntry` — a menu's entry with what a row adds: a `note` under its name, an `end` on its right, a `grip`.
215
215
  - `MenuListTile` — one of the few done most, as a tile.
216
216
  - `tilesOf` — `tilesOf(entries, allRows?)`: the first four plain actions as tiles when there are three or more, the rest as rows.
@@ -276,7 +276,7 @@ Their stylesheets are `input.css`, `inline-input.css`, `field.css`, `toggle.css`
276
276
  - `useSheetMenus` — whether menus are the Sheet here: on a phone, or in a phone's screen standing on a page.
277
277
  - `MapMenu` — the components map's default `Menu` (`CONTROLS.Menu`): ViewKit's menu rows drawn as the Menu at their anchor; a row carrying its own `slot` drawn with it as its name.
278
278
  - `MapSelect` — the components map's default `Select` (`CONTROLS.Select`): the map's `ViewsSelectProps` drawn as ViewKit's own Select, its list as wide as its rows need, its rows one level in opened in place. The panels draw ViewKit's Select itself unless your own is opted in; hand or wrap this to have ViewKit's back.
279
- - `menuEntries` — `menuEntries(items, notNow?, rowSlot?)`: ViewKit's menu rows (`ViewsMenuItem`) as the Menu's own kinds: ticks that close side by side one pick, a group beside its row a level in, a disabled row saying why; handed `rowSlot` (VK-988), each row and choice named by it, `data-key` its item's key.
279
+ - `menuEntries` — `menuEntries(items, notNow?, rowSlot?)`: ViewKit's menu rows (`ViewsMenuItem`) as the Menu's own kinds: ticks that close side by side one pick, a group beside its row a level in, a disabled row saying why; each row and choice keyed by its item (`slot: { key }`, drawn `data-key`), and handed `rowSlot` (VK-988) named by it too.
280
280
 
281
281
  ## The Avatar
282
282
 
@@ -476,7 +476,7 @@ What an advanced filter opens on a computer and Filter on a phone, Attio's: the
476
476
  - `HOW` — each type's ways, in the order they are offered, the first a new rule's.
477
477
  - `CHECKED` — a yes/no's two values, Checked and Unchecked.
478
478
  - `wayOf` — a type's way by its value.
479
- - `FilterField` — a field a list filters by: a Picker row with its type, a choice's values, a related record's fields one level in.
479
+ - `FilterField` — a field a list filters by: a Picker row with its type, a choice's values, a related record's fields one level in, and its public name `key`, the `data-key` a rule on it draws where its `value` can't be one (absent, its `value`).
480
480
  - `FilterWay` — one way a type compares: its value, its words, what it takes.
481
481
  - `Takes` — what a way takes: one value, several, two, or none.
482
482
  - `FILTER_DEPTH` — how many levels deep rules stand at most: three.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Import from `viewkitjs/views/field-row` in a client component, under your `ViewsProvider`: the door opens with the client directive. It holds a record's field row: one field drawn as its label, its value and, on a click, its type's editor in place, and the write path that admits each edit at once, queues one record's writes, settles each on the save's receipt and rolls a failure back. The row knows no entity, only a binding, a value and a commit, so your app builds its record's panel (its sections, its related records) around the rows. It draws with your provider's `Popover`, `Sheet`, `Collapse`, `AppIcon`, icons, `CommandMenu` atom and toast port. The shapes its writes go through (the write target, the receipt, the admission, a value's note, the reconciliation error) are the root door's, described under [A write's target](views.md#a-writes-target), and this door re-exports them. Guide: [editors](../guides/editors.md).
4
4
 
5
- - `FieldRow` — one field of a record: a glyph (the binding's `icon` through your `AppIcon`, else the type's icon), the label, and the value drawn by the display. Outside a Field rows card (below), below the provider's `desktopQuery` the label stands above the value, which then takes the row's width; at it and above, glyph, label and value share one line. The row says its form in `data-form`: `computer` (one line), `phone` (the label above the value) or `rows` (a Field rows card's row on a phone); outside a card the two forms differ only by what reads it. A server render can't ask the screen, so a row outside a card stands in both forms, and a card stands whole in both, CSS showing the one your `desktopQuery` picks: a phone's first paint is the phone's, and as the page comes alive the screen's form is the one kept, the very elements the person saw. A writable row holding nothing draws your `views.field-row.empty` word, muted; a read-only one draws "—". A writable row's edit button is named by the label, then the value as it is drawn ("Stage, Won"; "Terms, Empty" for a row holding nothing); a row still loading, and a rich text laid over its button, are named by the label alone. A writable row opens its type's editor on a click, through the editor panel and one edit session: a picker (a select, a date, several tags, a relation or a set of records, several values, a place) anchored under the value in your `Popover` on a desktop and in your `Sheet` on a phone, by the provider's `desktopQuery`; a typed value (text, a number, money) in its own box on every width; a name and a range open your `PartsBody` anchored under the value, as a place does; and a single email or domain opens the value list holding one value, anchored, where the provider's `oneValue` says `list` for its type. Escape throws the edit away, unless the provider's `escape` keeps the field's type, on a desktop, where it keeps what was typed and a refusal stays open until a second Escape throws the edit away; a sheet's swipe or ✕ changes nothing. On a desktop the date editor opens with the keyboard in your `DateBody`, as a place's or a long select's does; and with an editor open in its popover, an Escape heard from the page itself or from an element holding the row closes that editor and goes no further, so a drawer around the row hears only the next one. On a desktop, a select gives your Picker the keys however it opened, by Enter, Space or a pointer: the focus in its search, the arrows going on from the value it holds, and Enter picking the one lit (opened by a key, an Enter at once changes nothing). As the editor takes the place of the row's button, the row holds the focus the button held until the editor takes it, so the focus never falls to the page: a dialog around the row that takes such a focus back to itself (Base UI's) leaves a text's or a number's editor open. On a desktop, an editor closed by Tab, Shift-Tab, Escape, Enter or a pick puts the focus back on the row's own button, once its exit has played out and a write still saving has saved, so the next Tab moves on from that row; a press or a focus outside an editor's panel since the close lets that go, so a row opened meanwhile keeps its editor, and an outside press leaves the focus where it put it. A Tab pressed while that exit plays (a Tab at once after a pick by the keys) is the person going on: it is taken from the row's button once the button is back, so the focus lands on the next control after the row (Shift-Tab, the one before), as a later Tab does. A relation saves what its row stores (an id, a ref with the picked record's kind, or a set of records with its lead); a date field has no time and offers No date where it may be empty; several values read a phone typed without its code in the binding's `region`. A value of several parts inside a writable row draws its count as plain text: the row's press opens the editor, which lists them all. A single email, phone, link or domain in a writable row reads as plain text too, with an open action beside the row's button (a mail, a call, the site), and a writable rich text lies over its button, so its links and "Show more" keep their own press while a press on its text edits. A money figure its host reads in another currency than the record's own (it hands the converted figure as `value` and that currency as `opts.currency`) is marked ≈ with the currency it came from, and its editor names it under the record's own amount. A boolean commits from its own control, a `command` field opens its verbs, and a read-only row draws a lock with its reason. A refused commit keeps the editor open with the reason under it, a saved value shows at once and stays until the receipt settles it, and a failed save rolls back with a retry. A text, an email, a phone, a link, a domain, long or rich text edits in place in the row; handed the components map's `TextBody`, the row opens it there, at every width, with the field's own check and the record's country. A number, money or a percent edits in place too; handed `NumberBody`, the row opens it there, at every width, with the field's own check and its limits (a duration keeps the editor's own box).
5
+ - `FieldRow` — one field of a record: a glyph (the binding's `icon` through your `AppIcon`, else the type's icon), the label, and the value drawn by the display. Outside a Field rows card (below), below the provider's `desktopQuery` the label stands above the value, which then takes the row's width; at it and above, glyph, label and value share one line. The row says its form in `data-form`: `computer` (one line), `phone` (the label above the value) or `rows` (a Field rows card's row on a phone); outside a card the two forms differ only by what reads it. A server render can't ask the screen, so a row outside a card stands in both forms, and a card stands whole in both, CSS showing the one your `desktopQuery` picks: a phone's first paint is the phone's, and as the page comes alive the screen's form is the one kept, the very elements the person saw. A writable row holding nothing draws your `views.field-row.empty` word, muted; a read-only one draws "—". A writable row's edit button is named by the label, then the value as it is drawn ("Stage, Won"; "Terms, Empty" for a row holding nothing); a row still loading, and a rich text laid over its button, are named by the label alone. A writable row opens its type's editor on a click, through the editor panel and one edit session: a picker (a select, a date, several tags, a relation or a set of records, several values, a place) anchored under the value in your `Popover` on a desktop (or, under the Field's Open, `data-field-row-open="over"` on a frame round the rows, on top of the row's box, its first line's words where the value's were and covering the box, nothing under it moving; flipped above, it keeps the same offsets; a name's, a range's, a place's and a single email's or domain's body open the same way) and in your `Sheet` on a phone, by the provider's `desktopQuery`; a typed value (text, a number, money) in its own box on every width; a name and a range open your `PartsBody` anchored under the value, as a place does; and a single email or domain opens the value list holding one value, anchored, where the provider's `oneValue` says `list` for its type. Escape throws the edit away, unless the provider's `escape` keeps the field's type, on a desktop, where it keeps what was typed and a refusal stays open until a second Escape throws the edit away; a sheet's swipe or ✕ changes nothing. On a desktop the date editor opens with the keyboard in your `DateBody`, as a place's or a long select's does; and with an editor open in its popover, an Escape heard from the page itself or from an element holding the row closes that editor and goes no further, so a drawer around the row hears only the next one. On a desktop, a select gives your Picker the keys however it opened, by Enter, Space or a pointer: the focus in its search, the arrows going on from the value it holds, and Enter picking the one lit (opened by a key, an Enter at once changes nothing). As the editor takes the place of the row's button, the row holds the focus the button held until the editor takes it, so the focus never falls to the page: a dialog around the row that takes such a focus back to itself (Base UI's) leaves a text's or a number's editor open. On a desktop, an editor closed by Tab, Shift-Tab, Escape, Enter or a pick puts the focus back on the row's own button, once its exit has played out and a write still saving has saved, so the next Tab moves on from that row; a press or a focus outside an editor's panel since the close lets that go, so a row opened meanwhile keeps its editor, and an outside press leaves the focus where it put it. A Tab pressed while that exit plays (a Tab at once after a pick by the keys) is the person going on: it is taken from the row's button once the button is back, so the focus lands on the next control after the row (Shift-Tab, the one before), as a later Tab does. A relation saves what its row stores (an id, a ref with the picked record's kind, or a set of records with its lead); a date field has no time and offers No date where it may be empty; several values read a phone typed without its code in the binding's `region`. A value of several parts inside a writable row draws its count as plain text: the row's press opens the editor, which lists them all. A single email, phone, link or domain in a writable row reads as plain text too, with an open action beside the row's button (a mail, a call, the site), a long one ending before that action; under the Field's Link (`data-field-row-link="words"` on a frame round the rows, `FIELD_LOOKS` `row-link`), outside a phone's Field rows card, its words are the link instead and the rest of its box edits, the row's button laid under them as a rich text's is and named by the label alone, no action beside it; and a writable rich text lies over its button, so its links and "Show more" keep their own press while a press on its text edits. A value asked for one line (`opts.wrap: false`) ends in its "…" before the row's action, or at its box's end. A money figure its host reads in another currency than the record's own (it hands the converted figure as `value` and that currency as `opts.currency`) is marked ≈ with the currency it came from, and its editor names it under the record's own amount. A boolean commits from its own control, a `command` field opens its verbs, and a read-only row draws a lock with its reason. Under the Field's Action (`data-field-row-action="icon"` on a frame round the rows, `FIELD_LOOKS`), a writable row outside a card shows one icon at its box's end on hover and keyboard focus: `edit` where its editor opens in a popover, `expand` for a long text or a rich text, none where the box is the input, or the binding's `action`. A refused commit keeps the editor open with the reason under it, a saved value shows at once and stays until the receipt settles it, and a failed save rolls back with a retry. A text, an email, a phone, a link, a domain, long or rich text edits in place in the row; handed the components map's `TextBody`, the row opens it there, at every width, with the field's own check and the record's country. Under the Field's Long (`data-field-row-long="line"` on a frame round the rows, `FIELD_LOOKS` `row-long`), a writable long or rich text reads one line at rest, its end fading, and a writable text one line ending in "…"; on a desktop the long text's `TextBody` opens on top of the row's box in your `Popover` instead, its first line where the words were, growing down to `--vk-editor-max-h`, then scrolling, the row keeping its value under it; on a phone it stays in place. A number, money or a percent edits in place too; handed `NumberBody`, the row opens it there, at every width, with the field's own check and its limits (a duration keeps the editor's own box).
6
6
  - `FieldRowProps` — the row's props: `binding`, `row`, `value` (the display value), `editValue` (the stored value the editor opens on), `writable`, `ready` (false refuses gestures while the record loads), `unread` (the value isn't read yet, drawn blank), `refusal` (why it's read-only here), `onCommit` (admits or refuses a draft, then settles; an editor still open when the page or the row goes is asked as for a press outside, so it can be called inside `pagehide`), `opts` (display options), `menu` (a `command` field's verbs), `meta` (a few words in the value's line), `note` (a sentence under the value, with an optional quote a tap opens) and `kindIcon` (your icon name for a record kind, the glyph a relation's candidates wear; unanswered, they wear the type's glyph).
7
7
  - `RowEditor` — the editor a row mounts for its field's type, picked from `ROW_HOSTS`.
8
8
  - `ROW_HOSTS` — the host each field type mounts in a row, or `null` for a type the row never opens (a boolean, a derived or system field).
@@ -6,17 +6,17 @@ The spreadsheet. The door carries no client directive; every rendering file behi
6
6
 
7
7
  - `GridTable` — draws the spreadsheet: rows in their groups under a header whose column menus sort, group, format and hide, a checkbox rail and a ⋯ tail on each row (its ⋯ drawn only where the grid was handed something it opens: `selection`, `contextMenu`, `rowMenu`, `menus.row`, `rowHref`, `onRowDelete` or a name action), editors opened over cells, a selected range with copy, paste and undo, and a footer of figures per column. An edit shows in its cell at once and goes to `onCellCommit` (a batch to `onCellsCommit`); a failed write rolls the cell back. An undo or a redo shows its value, and takes the focus to its cell, as it is pressed; it is sent once the edit it takes back has answered, or at once when the page closes (`pagehide`), an editor still open writing its draft first. Back from the back-forward cache, an undo sent at the close may have reached the server before the edit it takes back: the cell then ends on the edit's stored value while redo still offers the undo. While `transitionPending` is true, or for one commit after `transitionKey` changes, it draws your app's loading atom instead of the rows, or, handed the components map's `RowsWait` and already showing rows, keeps them, inert, as that slot's children, its column names and footer standing outside the slot, as they are. It takes a `GridTableProps`.
8
8
  - `GridTableProps` — what `GridTable` takes, flat, typed over your row. Five are required: `groups` (the rows, as the model's `ListGroup`s), `grouped` (whether they draw as group bands), `getRowId`, `columns` (the model's `ListColumn`s) and `onOpenRow` (what opening a row does: the title's text opens it; it receives the row and a `GridRowOpenedFrom`, which brings the focus back to the row's cell once what it opened closes). The rest are optional:
9
- - Rows and groups: `rowHref`, `onPrefetchRow` (warm a row's detail on a pointer's intent), `rowClassName`, `rowIcon` and `showRowIcon` (the title cell's glyph, as a descriptor the grid sizes and colours, or the row's picture through your `Avatar` atom when the descriptor hands an `avatar`), `onOpenRelation` and `entityIcon` (opening the record a relation cell points at, and the glyph for a kind; without `onOpenRelation`, relation cells are inert), `isCollapsed` and `onToggleGroup` (your group collapse), `oneHeader` (a grouped grid draws one row of column names, pinned at the top over every group, in place of each group's own; each group's bar pins under it, and the row's checkbox picks every row; off by default, when each group draws its own with the box that picks its rows), `pinFooter` (the footer pins at the foot of the grid's scroll area, `--vk-scroll-inset-bottom` above its edge and, while rows are selected, a step above the bar `renderBar` draws, on a phone the rows then ending at the footer's bottom (measured where it stands; on the foot when it draws none), the rows passing under it, painted the ground and `data-stuck` only while they do; an ungrouped grid's stands at the foot even when its rows don't fill the area, in pages just above the pager, and a grouped grid's each pin while their group's rows run past the foot and close their group otherwise; off by default, when the footer stands after the last row), `renderGroupLabel`, `renderGroupFooter` (a group's paged continuation after its loaded rows), `onHideGroup`, `countOf`, `loadMore` (`hasMore`, `onReveal` and a `label`), `pages` (`GridPages`: `page` from 1, `size`, `total`, the view's count, `exact`, false for a capped count, `sizes`, the page-size pick's choices, default 25, 50 and 100, and `onPage` and `onSize`: an ungrouped grid draws the page you hand and the pager part `vk-grid-pager` under it, `loadMore` is then not drawn, picks clear on a page or size change, and the footer shows only the figures a group carries in `figures`; a grouped grid draws no pager; absent by default), `emptyState`, and `transitionKey`, `transitionPending` and `transitionLabel` (a view change: the wait paints before the new rows mount).
9
+ - Rows and groups: `rowHref`, `onPrefetchRow` (warm a row's detail on a pointer's intent), `rowClassName`, `rowIcon` and `showRowIcon` (the title cell's glyph, as a descriptor the grid sizes and colours, or the row's picture through your `Avatar` atom when the descriptor hands an `avatar`), `onOpenRelation` and `entityIcon` (opening the record a relation cell points at, and the glyph for a kind; without `onOpenRelation`, relation cells are inert), `isCollapsed` and `onToggleGroup` (your group collapse), `oneHeader` (a grouped grid draws one row of column names, pinned at the top over every group, in place of each group's own; each group's bar pins under it, and the row's checkbox picks every row; off by default, when each group draws its own with the box that picks its rows), `pinFooter` (the footer pins at the foot of the grid's scroll area, `--vk-scroll-inset-bottom` above its edge and, while rows are selected, a step above the bar `renderBar` draws, on a phone the rows then ending at the footer's bottom (measured where it stands; on the foot when it draws none), the rows passing under it, painted the ground and `data-stuck` only while they do; on a computer never pushed below its last row, so under a short table it stands right after it; on a phone an ungrouped grid's stands at the foot even when its rows don't fill the area, in pages just above the pager; a grouped grid's each pin while their group's rows run past the foot and close their group otherwise; a line along its top while rows pass under it; off by default, when the footer stands after the last row), `renderGroupLabel`, `renderGroupFooter` (a group's paged continuation after its loaded rows), `onHideGroup`, `countOf`, `loadMore` (`hasMore`, `onReveal` and a `label`), `pages` (`GridPages`: `page` from 1, `size`, `total`, the view's count, `exact`, false for a capped count, `sizes`, the page-size pick's choices, default 25, 50 and 100, and `onPage` and `onSize`: an ungrouped grid draws the page you hand and the pager part `vk-grid-pager` under it, `loadMore` is then not drawn, picks clear on a page or size change, and the footer shows only the figures a group carries in `figures`; a grouped grid draws no pager; absent by default), `emptyState`, and `transitionKey`, `transitionPending` and `transitionLabel` (a view change: the wait paints before the new rows mount).
10
10
  - Row actions and menus: `rowMenu` (a row's items, on right-click and in its ⋯ tail; the same builder a list takes), `contextMenu` (a right-click menu that differs from it), `rowActions` (buttons in the title cell's action lane, before the grid's own Edit), `onRowDelete` and `deleteLabel` (a delete row in the row's menu), `menus` (`GridMenus`: each of the grid's menus as data, reshaped by your function; `menus.row` is asked as a row's menu opens and may answer a promise, the menu waiting on one greyed row until it does, and holds Open page and Delete as `row-open` and `row-delete`, so a row's Delete is offered per row; the ready `<List>` (VK-742) hands the same `menus.row` through), `commands` (the verbs a `command` column's cell opens, by field key; without it a command column is a read-only badge) and `selection` (the list's selection; its optional `renderBar` draws the bar it opens, `SelectionBar` with your verbs, and without one the rows still tick and no bar is drawn).
11
- - Sort, group and figures: `sort` (`GridSortState`), `sortMark` (a sorted column's header wears `icons.sortAsc` or `icons.sortDesc` after its name; off by default, `aria-sort` saying it either way), `groupBy` (`GridGroupByState`: handed, a column's menu offers Group by and Ungroup, saved view or not), `sortOptions` (the group band menu's sort, as `GridGroupSortOption`s), `groupMenu` (the parts a group band's ⋯ holds, as `GridGroupMenuPart`s: `"select"` (Select all in group, on a grid with a `selection`), `"sort"`, `"figures"`, `"hide"`), `groupSummary` and `onGroupSummaryChange` (which figures ride beside a group's name), `groupFigures` (`GridGroupFigure`s), `countNoun` (`GroupCountNoun`), `aggregates`, `onAggregateChange` and `renderAggregate` (the footer's figure per column), `viewBacked` (a saved view: Sort on every bound column, and figures only for field-backed columns; it doesn't decide Group by) and `defaultCurrency` (the reader's currency, which a money column read as it was entered totals in).
11
+ - Sort, group and figures: `sort` (`GridSortState`), `sortMark` (a sorted column's header wears `icons.sortAsc` or `icons.sortDesc` after its name, or your `HeaderSortMark` atom; off by default, `aria-sort` saying it either way), `groupBy` (`GridGroupByState`: handed, a column's menu offers Group by and Ungroup, saved view or not), `sortOptions` (the group band menu's sort, as `GridGroupSortOption`s), `groupMenu` (the parts a group band's ⋯ holds, as `GridGroupMenuPart`s: `"select"` (Select all in group, on a grid with a `selection`), `"sort"`, `"figures"`, `"hide"`), `groupSummary` and `onGroupSummaryChange` (which figures ride beside a group's name), `groupFigures` (`GridGroupFigure`s), `countNoun` (`GroupCountNoun`), `aggregates`, `onAggregateChange` and `renderAggregate` (the footer's figure per column), `viewBacked` (a saved view: Sort on every bound column, and figures only for field-backed columns; it doesn't decide Group by) and `defaultCurrency` (the reader's currency, which a money column read as it was entered totals in).
12
12
  - Format overrides and their handlers, every map keyed by field key: `optionColors`, `dateStyles`, `durationStyles`, `numberFormats` (decimals null is the field's own), `showTimeOverrides` and `percentDisplays`, each with its `on…Change` handler taking the field key first, and `formatsWritable` (false hides the stored format knobs from the column menu; default true).
13
- - Columns and preferences: `columnState` and `onColumnStateChange` (order, widths, and which columns show), `renderAddColumn` (your own add-column cell at the header's end, or in the title column's header under `addColumnAt`; without it, or answering `undefined`, `false` or `""`, the grid's own lists the hidden columns; answering `null`, none is drawn and no room is kept for it), `addColumnOnPhone` ("+ Add column" on a phone too, its list in your `Menu`; off by default), `addColumnAt` (`"title"` stands "+ Add column" as a lone + at the right edge of the title column's header, in reach while the columns scroll, and the tail keeps no room for it; `"end"`, the default, the header row's last cell; with no title column shown it stands at the end), `phonePicking` (a phone picks rows by a long press, the boxes inside the name column before the picture, and always shown on a grouped grid, its titles row's box in the name column's head; needs `selection`; off by default), `parts` (a column per part of a name, a place or a range, offered under its field in "+ Add column"; off by default), `columnMenuItems` (your rows in a column's menu, as data, above Hide: the old route, which adds rows only; `menus.column` reshapes the whole menu), and the per-user toggles `freezeIdentity` (the identity columns, everything through the title, pinned at the left edge; on by default, on the bare prop, in `LIST_VIEW_PREF_DEFAULTS` (`gridFreezeIdentity`), in a view's look and in the grid's look alike; hand `false`, or start your prefs with `gridFreezeIdentity: false`, to open it unpinned), `alwaysCheckboxes`, `verticalBorders` (the lines between the columns, the last column's closing the table, in the rows and the footer, which then also draws a line under itself, pinned or not) and `scale`; and `headerVerticalBorders` (the header's columns ruled as the rows' are under `verticalBorders`, the last column's included; off by default); and `fillWidth` (the columns share the grid's whole width, each in proportion to its own width and never below it, a column the person resized or one with a `grid.maxWidth` keeping its width; a table wider than the grid scrolls sideways as without it; off by default).
13
+ - Columns and preferences: `columnState` and `onColumnStateChange` (order, widths, and which columns show), `renderAddColumn` (your own add-column cell at the header's end, or in the title column's header under `addColumnAt`; without it, or answering `undefined`, `false` or `""`, the grid's own lists the hidden columns; answering `null`, none is drawn and no room is kept for it), `addColumnOnPhone` ("+ Add column" on a phone too, its list in your `Menu`; off by default), `addColumnAt` (`"title"` stands "+ Add column" as a lone + at the right edge of the title column's header, in reach while the columns scroll, and the tail keeps no room for it; `"end"`, the default, the header row's last cell; with no title column shown it stands at the end), `phonePicking` (a phone picks rows by a long press, the boxes inside the name column before the picture, and always shown on a grouped grid, its titles row's box in the name column's head; needs `selection`; off by default), `parts` (a column per part of a name, a place or a range, offered under its field in "+ Add column"; off by default), `columnMenuItems` (your rows in a column's menu, as data, above Hide: the old route, which adds rows only; `menus.column` reshapes the whole menu), and the per-user toggles `freezeIdentity` (the identity columns, everything through the title, pinned at the left edge; on by default, on the bare prop, in `LIST_VIEW_PREF_DEFAULTS` (`gridFreezeIdentity`), in a view's look and in the grid's look alike; hand `false`, or start your prefs with `gridFreezeIdentity: false`, to open it unpinned), `alwaysCheckboxes`, `verticalBorders` (the lines between the columns, the last column's closing the table, in the rows and the footer; the footer draws a line under itself either way) and `scale`; and `headerVerticalBorders` (the header's columns ruled as the rows' are under `verticalBorders`, the last column's included; off by default); and `fillWidth` (the columns share the grid's whole width, each in proportion to its own width and never below it, a column the person resized or one with a `grid.maxWidth` keeping its width; a table wider than the grid scrolls sideways as without it; off by default).
14
14
  - Writes: `onCellCommit` (`GridCellCommitFn`) and `onCellsCommit` (`GridCellsCommitFn`).
15
15
  - `rowHighlight`: which row the grid tints. `"hover"`, the default, the row under the pointer, as always; `"active"`, the active row alone, `data-active`: the row a person last pressed, anywhere on it, or the picked cell's row, so the keyboard moves it too, kept through a press outside the grid and Escape until another is pressed or picked; no row tints under the pointer then, nor a `hoveredRow`, while the hover's box, ⋯ and the name's actions still show.
16
16
  - States held from outside, each off when left out, as a page that shows the grid's states side by side needs them: `hoveredRow` (a row, by its id, drawn as under the pointer: its tint, its rail's box, its ⋯ and the name's actions, and `data-hovered`, while a real pointer still hovers any row beside it; drawn, as a hover is, only on a screen whose pointer hovers) and `onHoveredRowChange` (the row a person's pointer moves onto, or null off it); `cellPick` (a `GridCellPick` drawn as picked, placed each time its value changes without taking the page's focus; while it is given, null included, a press outside the grid lets go of nothing, and a person's click, drag, keys and Escape move it as always) and `onCellPickChange` (each change a person makes, or null); `openColumnMenu` (the column, by its id, whose menu stands open on the first row of column names, its header cell `data-open`; while it is given, null included, the menus open and close only as it says) and `onOpenColumnMenuChange` (the column a person's press opens, or null when a press, a row of the menu or a press outside closes it, for you to answer).
17
17
  - List config: `listConfig` (the settings layer every user of the list inherits, which may only take away from what the columns declare: the table read-only, per-column locks; a constraint on the screen, while your API guards its own writes). The grid only reads it: a surface of your own changes it.
18
18
  - Per row: `rowWritable` (`(row) => boolean`, whether a row's cells write, for a reader who may edit some records and not others; a row it answers false for opens no editor, takes no typing, paste, fill, clear, cut or bulk-bar write, says "Cell is read-only" (`views.grid.cell-read-only`) when a person tries, and marks its cells `aria-readonly`; it only takes away from what the columns and `listConfig` allow; absent, every row writes as its columns say; called while the grid renders, so keep it pure and cheap; a constraint on the screen, while your API guards its own writes).
19
- - `GridMenus` — the grid's menus as data, `GridTable`'s `menus`, typed over your row: `column(items, { field, column })`, `row(items, { row })`, `group(items, { group })` and `addColumn(items, { columns })`, each handed its menu's default items (`ViewsMenuItem[]`, every row keyed) and returning the items it shows. A menu with no function is as before. The helpers, the keys and the rules are [`/list`'s Menus as data](./list.md#menus-as-data).
19
+ - `GridMenus` — the grid's menus as data, `GridTable`'s `menus`, typed over your row: `column(items, { field, column })`, `row(items, { row })`, `group(items, { group })`, `addColumn(items, { columns })` and `figure(items, { column, group, current })` (a footer cell's calculation picker), each handed its menu's default items (`ViewsMenuItem[]`, every row keyed) and returning the items it shows. A menu with no function is as before. The helpers, the keys and the rules are [`/list`'s Menus as data](./list.md#menus-as-data).
20
20
  - `useGridTablePrefs` — wires a list's view preferences to the grid. It takes `prefs` (the list's `ListViewPrefs`), `setPrefs` (stores a patch of them), `columns` (whose money reading the number formats read) and `viewBacked`, and returns `{ gridProps }` to spread on `GridTable`: the borders, row icon, frozen identity, checkboxes and scale, the format overrides, the column state, the group figures and the footer figures, each with the handler that writes it back through `setPrefs`. A format's patch hands its whole map with the field it changes present: its new setting, or `null` where it has none left (Automatic, Reset colors). A store that writes only the fields a patch names reads `null` as the clear; one that keeps the map as handed keeps the `null`, which the grid reads as no setting.
21
21
  - `useGridTableSettings` — wires a list's settings and a person's layer to the grid, for a list kept as `viewkitjs/fields/query`'s `ListSettings`. It takes `settings`, `layer` (the person's `ListPersonalLayer`), `columns` (the declared ones), `parts` (the same `parts` the grid takes, so a part column the settings place is drawn and moved as the grid draws it), `onChange` (a `ListSettingsChange`, never empty), `onLayerChange` (a layer patch), `defaults` (the reader's `ListDefaults`) and `formats` with `setFormats`, and returns `{ gridProps }` to spread on `GridTable`, as `useGridTablePrefs` does: a column hidden, moved, given a line break or a figure, and a group header's figures, come back through `onChange`; a resize through `onLayerChange` as the person's width (a width taken back by a double-click leaves it); a format through `setFormats`, its patch shaped as `useGridTablePrefs`' is.
22
22
  - `GridFormatPrefs` — how a list's fields read, which `useGridTableSettings` takes apart from its settings: `gridOptionColors`, `gridDateStyles`, `gridDurationStyles`, `gridShowTime`, `gridPercentDisplays`, `gridDecimals` and `gridCurrencies`, each keyed by field key.