viewkitjs 0.35.0 → 0.37.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 (256) hide show
  1. package/CHANGELOG.md +112 -0
  2. package/MIGRATION.md +7 -0
  3. package/package.json +1 -1
  4. package/views/dist/atoms/types.d.ts +32 -4
  5. package/views/dist/contract.d.ts +32 -9
  6. package/views/dist/contract.js +35 -1
  7. package/views/dist/controls/avatar/avatar.d.ts +3 -1
  8. package/views/dist/controls/avatar/avatar.js +2 -2
  9. package/views/dist/controls/button/own-look-moved.d.ts +11 -0
  10. package/views/dist/controls/button/own-look-moved.js +3 -0
  11. package/views/dist/controls/compound-editor/map-parts-body.js +2 -0
  12. package/views/dist/controls/compound-editor/name-parts.js +1 -1
  13. package/views/dist/controls/compound-editor/place-parts.js +1 -1
  14. package/views/dist/controls/compound-editor/range-parts.js +1 -1
  15. package/views/dist/controls/compound-editor/words.d.ts +3 -0
  16. package/views/dist/controls/compound-editor/words.js +2 -0
  17. package/views/dist/controls/customize/customize.d.ts +10 -3
  18. package/views/dist/controls/customize/customize.js +147 -63
  19. package/views/dist/controls/customize/items.d.ts +49 -0
  20. package/views/dist/controls/customize/items.js +104 -0
  21. package/views/dist/controls/customize/map-customize-body.js +7 -4
  22. package/views/dist/controls/customize/words.d.ts +2 -0
  23. package/views/dist/controls/customize/words.js +1 -0
  24. package/views/dist/controls/date-editor/date-behaviour.d.ts +80 -0
  25. package/views/dist/controls/date-editor/date-behaviour.js +187 -0
  26. package/views/dist/controls/date-editor/date-editor.d.ts +3 -2
  27. package/views/dist/controls/date-editor/date-editor.js +29 -166
  28. package/views/dist/controls/field/field.d.ts +3 -2
  29. package/views/dist/controls/field/field.js +7 -2
  30. package/views/dist/controls/field/looks.d.ts +1 -1
  31. package/views/dist/controls/field/looks.js +5 -4
  32. package/views/dist/controls/field.css +4 -0
  33. package/views/dist/controls/filter-editor/block.js +5 -2
  34. package/views/dist/controls/filter-editor/filter-editor.d.ts +14 -1
  35. package/views/dist/controls/filter-editor/filter-editor.js +21 -13
  36. package/views/dist/controls/filter-editor/map-filter-body.d.ts +3 -2
  37. package/views/dist/controls/filter-editor/map-filter-body.js +16 -2
  38. package/views/dist/controls/filter-editor/map-rules.d.ts +9 -2
  39. package/views/dist/controls/filter-editor/map-rules.js +18 -13
  40. package/views/dist/controls/filter-editor/parts.d.ts +2 -0
  41. package/views/dist/controls/filter-editor/parts.js +13 -12
  42. package/views/dist/controls/filter-editor/rules.d.ts +4 -4
  43. package/views/dist/controls/filter-editor/rules.js +6 -3
  44. package/views/dist/controls/filter-editor/words.d.ts +2 -0
  45. package/views/dist/controls/filter-editor/words.js +1 -0
  46. package/views/dist/controls/group-editor/group-editor.d.ts +3 -0
  47. package/views/dist/controls/group-editor/group-editor.js +21 -15
  48. package/views/dist/controls/group-editor/map-group-body.js +1 -0
  49. package/views/dist/controls/index.d.ts +4 -2
  50. package/views/dist/controls/index.js +3 -1
  51. package/views/dist/controls/inline-input.css +9 -0
  52. package/views/dist/controls/internal/kit-words.d.ts +11 -0
  53. package/views/dist/controls/internal/kit-words.js +7 -0
  54. package/views/dist/controls/internal/map-panel-controls.d.ts +4 -1
  55. package/views/dist/controls/internal/map-panel-controls.js +14 -1
  56. package/views/dist/controls/internal/menu-items.d.ts +9 -0
  57. package/views/dist/controls/internal/menu-items.js +97 -0
  58. package/views/dist/controls/internal/panel-controls.js +1 -1
  59. package/views/dist/controls/internal/phone.d.ts +1 -1
  60. package/views/dist/controls/internal/phone.js +3 -2
  61. package/views/dist/controls/list/tokens.d.ts +1 -1
  62. package/views/dist/controls/list/tokens.js +1 -1
  63. package/views/dist/controls/list.css +5 -2
  64. package/views/dist/controls/menu/menu.d.ts +1 -1
  65. package/views/dist/controls/menu/menu.js +1 -1
  66. package/views/dist/controls/menu-list/menu-list.js +3 -2
  67. package/views/dist/controls/menu.css +4 -4
  68. package/views/dist/controls/number-editor/map-number-body.js +2 -0
  69. package/views/dist/controls/number-editor/number-editor.js +1 -1
  70. package/views/dist/controls/number-editor/words.d.ts +3 -0
  71. package/views/dist/controls/number-editor/words.js +2 -0
  72. package/views/dist/controls/pane.css +1 -1
  73. package/views/dist/controls/picker/fields-frame.d.ts +5 -0
  74. package/views/dist/controls/picker/fields-frame.js +30 -0
  75. package/views/dist/controls/picker/map-fields-body.js +3 -26
  76. package/views/dist/controls/picker/map-picker.d.ts +2 -1
  77. package/views/dist/controls/picker/map-picker.js +4 -2
  78. package/views/dist/controls/picker/picker.js +9 -2
  79. package/views/dist/controls/picker/rows.d.ts +3 -1
  80. package/views/dist/controls/picker.css +7 -3
  81. package/views/dist/controls/popover/looks.d.ts +1 -1
  82. package/views/dist/controls/popover/looks.js +5 -0
  83. package/views/dist/controls/popover/tokens.d.ts +13 -1
  84. package/views/dist/controls/popover/tokens.js +4 -1
  85. package/views/dist/controls/popover.css +59 -8
  86. package/views/dist/controls/select/map-select.d.ts +1 -1
  87. package/views/dist/controls/select/map-select.js +4 -1
  88. package/views/dist/controls/select/select.d.ts +2 -0
  89. package/views/dist/controls/select/select.js +4 -2
  90. package/views/dist/controls/sheet/bottom-sheet.d.ts +6 -1
  91. package/views/dist/controls/sheet/bottom-sheet.js +3 -3
  92. package/views/dist/controls/sort-editor/map-sort-body.js +1 -0
  93. package/views/dist/controls/sort-editor/sort-editor.d.ts +3 -1
  94. package/views/dist/controls/sort-editor/sort-editor.js +6 -4
  95. package/views/dist/controls/sort-editor.css +4 -2
  96. package/views/dist/controls/tag/tag.js +4 -2
  97. package/views/dist/controls/text-editor/map-text-body.js +4 -1
  98. package/views/dist/controls/text-editor/text-editor.js +2 -2
  99. package/views/dist/controls/text-editor/words.d.ts +3 -0
  100. package/views/dist/controls/text-editor/words.js +1 -1
  101. package/views/dist/controls/text-editor.css +6 -0
  102. package/views/dist/controls/toolbar/toolbar.d.ts +12 -4
  103. package/views/dist/controls/toolbar/toolbar.js +7 -2
  104. package/views/dist/controls/toolbar-button/atom-toolbar-button.js +1 -1
  105. package/views/dist/controls/toolbar.css +5 -0
  106. package/views/dist/controls/tooltip/tokens.d.ts +1 -1
  107. package/views/dist/controls/tooltip/tokens.js +1 -1
  108. package/views/dist/controls/tooltip.css +5 -3
  109. package/views/dist/controls/values-editor.css +20 -5
  110. package/views/dist/controls/views-list/map-views-list-body.js +9 -1
  111. package/views/dist/controls/views-list/rules.d.ts +1 -0
  112. package/views/dist/controls/views-list/rules.js +2 -2
  113. package/views/dist/controls/views-list/view-menu.js +2 -2
  114. package/views/dist/controls/views-list/words.d.ts +4 -0
  115. package/views/dist/controls/views-list/words.js +2 -1
  116. package/views/dist/display/entity-chip.d.ts +7 -1
  117. package/views/dist/display/entity-chip.js +2 -1
  118. package/views/dist/display/option-badges.d.ts +3 -2
  119. package/views/dist/display/option-badges.js +2 -2
  120. package/views/dist/field-row/FieldRow.js +12 -8
  121. package/views/dist/grid/chrome/GridAddColumn.d.ts +7 -2
  122. package/views/dist/grid/chrome/GridAddColumn.js +5 -4
  123. package/views/dist/grid/chrome/GridCellEditors.d.ts +4 -1
  124. package/views/dist/grid/chrome/GridCellEditors.js +3 -2
  125. package/views/dist/grid/chrome/GridCellOutline.d.ts +3 -5
  126. package/views/dist/grid/chrome/GridCellOutline.js +3 -5
  127. package/views/dist/grid/chrome/GridChipsEditor.js +1 -1
  128. package/views/dist/grid/chrome/GridDateEditor.d.ts +1 -1
  129. package/views/dist/grid/chrome/GridDateEditor.js +1 -1
  130. package/views/dist/grid/chrome/GridHeader.js +3 -1
  131. package/views/dist/grid/chrome/GridLongTextEditor.d.ts +1 -1
  132. package/views/dist/grid/chrome/GridLongTextEditor.js +8 -5
  133. package/views/dist/grid/chrome/GridNameEditor.d.ts +1 -1
  134. package/views/dist/grid/chrome/GridNameEditor.js +1 -1
  135. package/views/dist/grid/chrome/GridNumberEditor.d.ts +1 -1
  136. package/views/dist/grid/chrome/GridNumberEditor.js +2 -2
  137. package/views/dist/grid/chrome/GridPlaceEditor.d.ts +1 -1
  138. package/views/dist/grid/chrome/GridPlaceEditor.js +1 -1
  139. package/views/dist/grid/chrome/GridRangeEditor.d.ts +2 -2
  140. package/views/dist/grid/chrome/GridRangeEditor.js +1 -1
  141. package/views/dist/grid/chrome/GridRelationEditor.js +2 -2
  142. package/views/dist/grid/chrome/GridRow.js +7 -1
  143. package/views/dist/grid/chrome/GridRowCells.js +6 -5
  144. package/views/dist/grid/chrome/GridSelectEditor.js +1 -1
  145. package/views/dist/grid/chrome/GridTable.d.ts +2 -1
  146. package/views/dist/grid/chrome/GridTable.js +7 -2
  147. package/views/dist/grid/chrome/GridTableSurface.js +2 -1
  148. package/views/dist/grid/chrome/GridTextEditor.d.ts +1 -1
  149. package/views/dist/grid/chrome/GridTextEditor.js +2 -2
  150. package/views/dist/grid/chrome/GridValueListEditor.d.ts +1 -1
  151. package/views/dist/grid/chrome/GridValueListEditor.js +1 -1
  152. package/views/dist/grid/chrome/grid-body-place.d.ts +7 -2
  153. package/views/dist/grid/chrome/grid-body-place.js +8 -4
  154. package/views/dist/grid/chrome/grid-cell-classes.js +2 -2
  155. package/views/dist/grid/chrome/grid-edit-session.d.ts +4 -0
  156. package/views/dist/grid/chrome/grid-edit-session.js +10 -1
  157. package/views/dist/grid/chrome/grid-editor-layer.d.ts +10 -0
  158. package/views/dist/grid/chrome/grid-editor-layer.js +1 -0
  159. package/views/dist/grid/chrome/grid-fitted-box.d.ts +9 -6
  160. package/views/dist/grid/chrome/grid-fitted-box.js +15 -7
  161. package/views/dist/grid/chrome/grid-hover.d.ts +3 -3
  162. package/views/dist/grid/chrome/grid-hover.js +2 -3
  163. package/views/dist/grid/chrome/grid-row-props.d.ts +6 -2
  164. package/views/dist/grid/chrome/grid-styles.d.ts +1 -5
  165. package/views/dist/grid/chrome/grid-styles.js +0 -1
  166. package/views/dist/grid/chrome/grid-table-props.d.ts +6 -2
  167. package/views/dist/grid/chrome/useGridKeyboard.d.ts +0 -1
  168. package/views/dist/grid/chrome/useGridKeyboard.js +2 -10
  169. package/views/dist/grid/chrome/useGridScaleStyles.d.ts +9 -1
  170. package/views/dist/grid/chrome/useGridScaleStyles.js +1 -4
  171. package/views/dist/grid/chrome/useGridTableInteractionModel.d.ts +3 -1
  172. package/views/dist/grid/chrome/useGridTableInteractionModel.js +24 -1
  173. package/views/dist/grid/core/useGridEditing.d.ts +3 -0
  174. package/views/dist/grid/core/useGridEditing.js +2 -0
  175. package/views/dist/grid/grid-format-props.d.ts +1 -1
  176. package/views/dist/grid/grid-format-props.js +18 -5
  177. package/views/dist/grid/grid.css +9 -20
  178. package/views/dist/grid/useGridTablePrefs.d.ts +1 -1
  179. package/views/dist/grid/useGridTableSettings.d.ts +1 -1
  180. package/views/dist/internal/screen-forms.d.ts +11 -0
  181. package/views/dist/internal/screen-forms.js +31 -0
  182. package/views/dist/list/list.js +4 -3
  183. package/views/dist/list/menu.d.ts +5 -4
  184. package/views/dist/list/parts.d.ts +8 -2
  185. package/views/dist/list/parts.js +31 -7
  186. package/views/dist/list/toolbar.js +11 -5
  187. package/views/dist/looks/index.d.ts +1 -0
  188. package/views/dist/looks/index.js +1 -0
  189. package/views/dist/panels/customize-body.d.ts +1 -1
  190. package/views/dist/panels/customize-body.js +8 -1
  191. package/views/dist/panels/model.d.ts +5 -0
  192. package/views/dist/panels/react/customize-body.js +11 -2
  193. package/views/dist/panels/react/customize.d.ts +3 -0
  194. package/views/dist/panels/react/filter/FilterFieldList.d.ts +3 -1
  195. package/views/dist/panels/react/filter/FilterFieldList.js +2 -2
  196. package/views/dist/panels/react/filter/filter-body.js +3 -1
  197. package/views/dist/panels/react/filter/filter-part-body.d.ts +3 -1
  198. package/views/dist/panels/react/filter/filter-part-body.js +2 -2
  199. package/views/dist/panels/react/popover.d.ts +3 -1
  200. package/views/dist/panels/react/popover.js +2 -2
  201. package/views/dist/panels/react/sort/SortEditor.js +3 -1
  202. package/views/dist/panels/react/toolbar/ReadyToolbar.d.ts +15 -4
  203. package/views/dist/panels/react/toolbar/Toolbar.d.ts +12 -1
  204. package/views/dist/panels/react/toolbar/Toolbar.js +5 -1
  205. package/views/dist/panels/react/toolbar/ToolbarAdvancedFilters.js +1 -1
  206. package/views/dist/panels/react/toolbar/ToolbarBarFilter.js +5 -3
  207. package/views/dist/panels/react/toolbar/ToolbarButton.js +3 -2
  208. package/views/dist/panels/react/toolbar/ToolbarFilterAdd.js +1 -3
  209. package/views/dist/panels/react/toolbar/ToolbarOptions.d.ts +4 -1
  210. package/views/dist/panels/react/toolbar/ToolbarOptions.js +2 -2
  211. package/views/dist/panels/react/toolbar/ToolbarQuickFilters.d.ts +1 -1
  212. package/views/dist/panels/react/toolbar/ToolbarQuickFilters.js +1 -1
  213. package/views/dist/panels/react/toolbar/ToolbarSave.d.ts +3 -1
  214. package/views/dist/panels/react/toolbar/ToolbarSave.js +28 -20
  215. package/views/dist/panels/react/toolbar/ToolbarSearch.js +1 -1
  216. package/views/dist/panels/react/toolbar/context.d.ts +3 -2
  217. package/views/dist/panels/react/toolbar/editor-menus.d.ts +8 -0
  218. package/views/dist/panels/react/toolbar/editor-menus.js +3 -0
  219. package/views/dist/panels/react/views-row/FoldingViewRow.js +26 -11
  220. package/views/dist/panels/react/views-row/HScrollRow.d.ts +4 -2
  221. package/views/dist/panels/react/views-row/HScrollRow.js +6 -2
  222. package/views/dist/panels/react/views-row/ViewAxes.js +6 -1
  223. package/views/dist/panels/react/views-row/ViewPicker.js +7 -10
  224. package/views/dist/panels/react/views-row/more-views.d.ts +2 -0
  225. package/views/dist/panels/react/views-row/more-views.js +3 -0
  226. package/views/dist/panels/react/views-row/new-view.d.ts +11 -0
  227. package/views/dist/panels/react/views-row/new-view.js +21 -0
  228. package/views/dist/panels/react.d.ts +1 -1
  229. package/views/dist/panels/toolbar/model.d.ts +2 -2
  230. package/views/dist/provider/components.d.ts +88 -8
  231. package/views/dist/provider/desktop.d.ts +2 -1
  232. package/views/dist/provider/desktop.js +5 -2
  233. package/views/dist/react.d.ts +1 -1
  234. package/views/dist/styles.css +198 -84
  235. package/views/dist/styles.unlayered.css +198 -84
  236. package/views/docs/contract.md +87 -32
  237. package/views/docs/controls/list.md +2 -0
  238. package/views/docs/controls/menu.md +2 -0
  239. package/views/docs/controls/picker.md +2 -0
  240. package/views/docs/controls/popover.md +7 -0
  241. package/views/docs/controls/tooltip.md +2 -0
  242. package/views/docs/guides/atoms.md +11 -10
  243. package/views/docs/guides/the-grid.md +7 -5
  244. package/views/docs/guides/the-provider.md +2 -2
  245. package/views/docs/reference/controls.md +24 -18
  246. package/views/docs/reference/display.md +1 -1
  247. package/views/docs/reference/field-row.md +1 -1
  248. package/views/docs/reference/grid.md +4 -4
  249. package/views/docs/reference/list.md +30 -11
  250. package/views/docs/reference/looks.md +4 -1
  251. package/views/docs/reference/panels-react.md +7 -6
  252. package/views/docs/reference/panels.md +2 -2
  253. package/views/docs/reference/react.md +22 -10
  254. package/views/docs/reference/views.md +2 -2
  255. package/views/docs/reshaping.md +2 -2
  256. package/views/skills/views/SKILL.md +1 -1
@@ -89,7 +89,7 @@ export function OrdersFromAnAction() {
89
89
  - `views`: a `ViewsStore`, or `{ seed }` (your own views, read-only), `{ records }` (what the delete question calls the rows), `{ store }`.
90
90
  - `defaults`: what a list with no saved view shows; by default the fields' columns over `LIST_SETTINGS_DEFAULTS`.
91
91
  - `sortFilter` and `bar`: the toolbar's form on a computer, as `ListRoot` takes them.
92
- - `menus`: every menu as data ([Menus as data](#menus-as-data)): `column`, `row` and `group` reach the grid, `view`, `add` and `more` the toolbar.
92
+ - `menus`: every menu as data ([Menus as data](#menus-as-data)): `column`, `row`, `group` and `addColumn` reach the grid, `view`, `add`, `more`, `customize`, `sortEditor`, `filterEditor` and `groupEditor` the toolbar.
93
93
  - `toolbarParts`: where each of the toolbar's parts stands ([Parts as data](#parts-as-data)).
94
94
  - `customizeIn`: where Customize opens on a computer (VK-1026). `"popover"`, the default, at its button. `"pane"`: in your map's `Pane` (`CONTROLS.Pane`), at the list's right edge under the toolbar and as tall as the grid, over its edge, the grid scrolling and taking presses beside it; the grid then stands in a box of its own, `data-slot="vk-list-box"` (positioned, a flex column that fills the list: give the list its height as a flex column), the Pane's. On a phone Customize keeps its Sheet. An app on `ListRoot` hands its own box to `ListToolbar` as `paneBox`.
95
95
  - `link`: default `true`. The address carries the open view and what changed over it (`view`, `q`, `change`), written in place as it changes, your other parameters and history state kept; an opened link wins over the person's draft; back and forward open what the address says. A link it can't read is said through the toast. Two lists on one page share those parameters: hand the second `link={false}`.
@@ -208,7 +208,7 @@ How the views behave:
208
208
 
209
209
  - **Your own views come first**, shared and read-only: their menu offers Reset, Save as new view, Duplicate and Copy link, never Rename, Delete or Save.
210
210
  - **With the browser store, everything a person saves is their own**, so "Save for everyone" never shows: their own view's Save says "Save" (`views.panels.view-save-own`), in its menu and Customize's foot. A store whose `can.share` is true lets that person save over shared views too.
211
- - **A draft per view.** Each change a person makes is kept as their draft over the open view, never the search, and shows again when they come back. Undoing every change lets the draft go. A draft begun before its view was saved again (another tab, another person) is marked: Customize says "Everyone's view changed since you started." The draft is kept.
211
+ - **A draft per view.** Each change a person makes is kept as their draft over the open view, never the search, and shows again when they come back. Undoing every change lets the draft go. A draft begun before its view was saved again (another tab, another person) is marked: Customize says "Everyone's view changed since you started.", or "This view changed since you started." on a person's own view. The draft is kept.
212
212
  - **A link wins** over the draft: the view it names opens with its change; a view the store doesn't have opens the first listed, with the link's change.
213
213
  - **Delete with Undo.** A deleted view leaves the row at once and ViewKit's toast offers Undo. It is removed from the store once the toast's time ends (`--vk-toast-duration`), or at once when the page closes (`pagehide`). An Undo after that saves it back under its own id.
214
214
  - **Other tabs follow** through the `storage` event: a view saved, renamed, reordered or deleted shows in each tab; the open view gone, the first listed opens.
@@ -225,7 +225,7 @@ Your app's own store implements `ViewsStore` over its API, a server checking eac
225
225
 
226
226
  ## Menus as data
227
227
 
228
- Each of a list's menus below hands you its default items as data, and draws the items your function hands back: drop a row, rename it, move it, add your own, or draw a row's inside yourself. The grid's "+ Add column" menu takes no function yet.
228
+ Each of a list's menus below hands you its default items as data, and draws the items your function hands back: drop a row, rename it, move it, add your own, or draw a row's inside yourself.
229
229
 
230
230
  ```tsx
231
231
  import { GridTable, type GridTableProps } from "viewkitjs/views/grid";
@@ -246,16 +246,31 @@ const menus: ListMenus<Deal> = {
246
246
  export function DealsGrid(grid: GridTableProps<Deal>) {
247
247
  return <GridTable {...grid} menus={menus} />;
248
248
  }
249
+
250
+ // Customize (`customize`, handed to `List`'s or the toolbar's `menus`): Group gone, a page of your own, a Layout toggle dropped.
251
+ const customize: ListMenus<Deal>["customize"] = (items, { page }) =>
252
+ page === "list"
253
+ ? menu.add(menu.drop(items, "group"), { key: "notes", label: "Notes", page: <p>Your notes on this view.</p> })
254
+ : page === "layout"
255
+ ? menu.drop(items, "toggle:verticalBorders")
256
+ : items;
257
+
258
+ // The filter editor (`filterEditor`): a rule's ⋮ without Convert to group, with a row of your own.
259
+ const filterEditor: ListMenus<Deal>["filterEditor"] = (items, ctx) =>
260
+ ctx.menu === "rule" ? menu.add(menu.drop(items, "convert"), { key: "explain", label: "Explain this rule", onSelect: () => console.info(ctx.field, ctx.path) }) : items;
249
261
  ```
250
262
 
251
- - `ListMenus` — every menu of a list as data: `ListMenus<Row>`, six functions, each optional. Each takes the menu's default items (`ViewsMenuItem[]`, every row keyed) and returns the items it shows. A menu with no function is as ViewKit draws it.
263
+ - `ListMenus` — every menu of a list as data: `ListMenus<Row>`, eleven functions, each optional. Each takes the menu's default items (`ViewsMenuItem[]`, or `ViewsCustomizeItem[]` for `customize`, every row keyed) and returns the items it shows. A menu with no function is as ViewKit draws it.
252
264
  - `column(items, { field, column })`: a column's header menu, handed the column (`ListColumn`) and its field (`undefined` for a column with none).
253
265
  - `row(items, { row })`: a row's menu, on a right-click and in its ⋯ tail, handed the row. Its items hold Open page (`row-open`, from `rowHref`) and Delete (`row-delete`, from `onRowDelete`, still asking your `confirm` port): drop `row-delete` for a row that can't be deleted, and your `RowMenu` draws neither of its own. It is asked as the menu opens (a right-click, the ⋯, the menu key), never for a row drawn or pressed, and may answer later: hand back a promise (`async (items, { row }) => …`, one request to your server) and it is asked once per opening, the menu holding one greyed row with your `loading` glyph, "Loading…" (`row-waiting`), and nothing the answer may take away, until it answers. An answer that a later opening has outrun is dropped; one that fails draws the grid's own rows. A host whose delete can be undone leaves out `onRowDelete` and adds its own destructive row, which asks nothing.
254
266
  - `group(items, { group })`: a group band's ⋯, handed the group (`ListGroup`).
267
+ - `addColumn(items, { columns })`: the grid's "+ Add column", handed every column of the list, shown or hidden (`ListColumnItem[]`, the grid's column list): each hidden column a row, a field with parts its own level beside it. A row you add runs its `onSelect` and closes the menu.
255
268
  - `view(items, { view })`: a view's menu, handed the view (`ViewsViewsListItem`): the rows a view's option hands (`menu`, Edit view… among them) and the menu a views list draws from the axis's `verbs` (`ViewsViewVerbs.menu`).
256
269
  - `add(items)`: New's items: your `addItems`, or with `onAdd` alone one row keyed `new` that runs it. New opens what it returns as a menu.
257
270
  - `more(items, { line })`: ⋯, the folded parts' rows, each keyed by its part. Each line folds into its own ⋯, so it is handed which: `"row"` or `"bar"` (the filter bar). A press on any row closes ⋯ first.
258
- - `List` takes `menus` whole and hands each part its own: `GridTable` (and `ListGrid`) takes `column`, `row` and `group` as `menus` ([`/grid`](./grid.md)), and `ReadyToolbar` and `ListToolbar` take `view`, `add` and `more` as `menus` ([`/panels/react`](./panels-react.md)).
271
+ - `customize(items, { page, form, layout })`: Customize's rows (VK-1062), each page's handed in turn: `page` is `"list"` (its sections, a list's per-field filters unless they fold behind Filter, where they aren't handed, and its toggles), `"layout"` (Layout's page: the layout's own settings, under the layout cards, which are your `layouts`) or `"columns"` (Columns' page: none of its own, as the columns are the view's, set by your columns' `hideable` and `fixed`; the rows you hand draw after the columns, before your field editor's rows). Its items are `ViewsCustomizeItem`s ([`/react`](./react.md)): a row keyed by one of Customize's own (below) is ViewKit's row, opening its page, its choices or its field as before, with your item's words, icon, value (`detail`), mark (`inForce`) and divider; its own `onSelect` and `checked` are set aside. A section's rows are always the item's `children`, so `menu.drop` and `menu.add` reach inside it; a section handed back with none draws nothing. Any other key is your row: `checked` with `onSelect` a check, `onSelect` an action (`destructive` drawn as danger), `children` a section of your own, and on the list `page` a page of your own, opened by its row, titled by its `label`, with Back (a function is handed Back, so the page can close itself); the page's place is told as `page:<key>` and held across a change of form. `disabled` draws a row that can't be used, saying `disabledReason`, else "Not available" (`views.panels.customize-unavailable`), and opens nothing. A page whose row you drop, disable or hand back as a section doesn't open, its layout button goes with Layout's row, and a screen whose row goes while it stands is the list again. `beside`, `keepOpen`, `href`, `render` and `shortcut` are set aside here. Layout's and Columns' rows are asked only while their page stands. An app's own `CustomizeBody` is handed the function as `items`; the older popover route (`ViewOptionsPopoverPanel`) hands none.
272
+ - `sortEditor(items, ctx)`, `filterEditor(items, ctx)`, `groupEditor(items, ctx)` (VK-1063): the editors' menus, wherever the toolbar draws them (its Sort and Filter panels, Customize's Sort, Filter and Group pages; the toolbar's Group has no panel of its own, so `groupEditor` reaches Customize's Group page). `ctx.menu` says which: the sort editor's `rule` (a rule's ⋯, on a phone and in the narrow form: a computer's rule has × and no ⋯) and `aside` (a set-aside rule's ⋯); the filter editor's `rule`, `aside` and `group` (a group's actions); the group editor's `settings` and `foot` (Remove grouping). The groups themselves (each group's row) are the list's values, not reshaped. `ctx` names a rule in your terms only, `field` across the three: the sort's key (on `aside`, the rule's stored `fieldKey`), or the filter's `fieldKey` with its `part` and `relation`, and a filter rule or group by its `path` in the filter (`[]` the whole filter, indices through `items` and a relation rule's `where.items`) (the `ViewsSortEditorItemsContext`, `ViewsFilterEditorItemsContext` and `ViewsGroupEditorItemsContext` of [`/react`](./react.md)). A row keyed by one of the menu's own (below) is ViewKit's row with your words and icon, its own `onSelect` set aside; `disabled` greys it, saying `disabledReason`. A default ViewKit doesn't offer this time (Put back while it doesn't fit) draws nothing. The filter's any/none/every is one item, `relation` (its label `views.panels.filter-relation-rows`, "Which related records"), its choices its `children` (`relation:any`, `relation:none`, `relation:every`; the choices' own `data-key` stays `any`, `none`, `every`): drop one, rename one, or hand back none to drop the choice. Any other key is your row: an action (`destructive` drawn as danger), a check (`checked` with `onSelect`) or a group of rows, drawn with the menu's own slot (`vk-sort-rule-action`, `vk-filter-rule-action`, `vk-filter-group-action`, the group editor's `vk-group-row`). No line stands first, last or twice in a row. `beside`, `keepOpen`, `href`, `render`, `shortcut` and `detail` are set aside here. An app with its own toolbar frame (`ToolbarSlotProvider`) can't hand these yet: draw a `SortBody` or `FilterBody` of your own that hands `CONTROLS`' its `items`.
273
+ - `List` takes `menus` whole and hands each part its own: `GridTable` (and `ListGrid`) takes `column`, `row`, `group` and `addColumn` as `menus` ([`/grid`](./grid.md)), and `ReadyToolbar` and `ListToolbar` take `view`, `add`, `more`, `customize`, `sortEditor`, `filterEditor` and `groupEditor` as `menus` ([`/panels/react`](./panels-react.md)).
259
274
  - A menu ViewKit doesn't open stays closed: ⋯ stands only while a part has folded, whatever `more` adds, and New stays a button while `add` hands back its one `new` row. A menu ViewKit opens stays openable: a function that returns `[]` opens an empty menu, so drop what you don't want rather than everything.
260
275
  - Each function is called as ViewKit draws (`view` on every toolbar render, the rest as their menus draw): keep it pure and cheap, and call no hooks in it. `row` alone may answer later, with a promise, asked once per opening.
261
276
  - `menu` — the four changes a menu function makes, each pure: it returns a new list and never changes the one it is handed. A key is found at any depth, a group's rows too. `drop`, `add` and `move` take any list of keyed rows, so they reshape the toolbar's parts too ([Parts as data](#parts-as-data)).
@@ -273,10 +288,15 @@ export function DealsGrid(grid: GridTableProps<Deal>) {
273
288
  Every default row's key is a public name: your function finds rows by it. A key that ends in a value is written here with that value as `<…>`.
274
289
 
275
290
  - A column's menu: `sort-asc`, `sort-desc`, and on a place column `sort-asc:<part>` and `sort-desc:<part>` under them; `sort-clear`; `group-by`, `ungroup`; `percent-display` and `percent-display:<display>`; `date-format` and `date-format:<style>`; `show-time`; `duration-format` and `duration-format:<style>`; `decimals` and `decimals:<decimals>` (`decimals:auto` the field's own); `currency` and `currency:<code>`; `colour:<value>`, under it `colour:<value>:auto` and `colour:<value>:<colour>`, and `colours-reset`; `move-left`, `move-right`; `hide-column`. Your `columnMenuItems` rows keep their keys.
291
+ - "+ Add column": `add:<id>` for each hidden column, `field:<id>` for a field with parts (its level, holding its own `add:<id>` rows), and `all-shown`, the one greyed row when nothing is hidden.
276
292
  - A group band's ⋯: `group-select`; `group-sort` and `group-sort:<value>`; `group-show` and `group-show:<part>`; `group-hide`.
277
293
  - A row's menu: `copy`, `cut`, `paste`, `clear`; `row-select`; `action:<id>` for each of a name column's actions. Your `contextMenu` rows keep their keys, or are keyed by their words. With `row`, also `row-open` (first) and `row-delete` (last), and `row-waiting`, the greyed row drawn while a promise from `row` waits (never handed to `row`).
278
294
  - A view's menu, from the axis's verbs: `rename`, `edit`, `private`, `save`, `reset`, `save-new`, `copy-link`, `favorite`, `duplicate`, `delete`; on a phone `save`, `reset` and `save-new` are under `unsaved`, and `private` and `edit` under `this-view`. A view's own rows keep their keys, `edit-view` (Edit view…) at the head of the open view's.
279
295
  - New: your `addItems`' keys, or `new`.
296
+ - Customize (`customize`): on its list `layout`, `columns`, `filter`, `sort`, `group`; a per-field filter `field:<key>` and a section of them `fields:<section>` (not handed while they fold behind Filter); a toggle `toggle:<key>` (`toggle:show_counts`; Show counts from the view, with no toggles handed, `toggle:counts`) and a section of toggles `toggles:<section>`. On Layout's page a pick-one setting `choice:<key>`, a toggle `toggle:<key>` and a section `toggles:<section>` (with no settings handed, a table's `toggle:freeze` and `toggle:wrap`, from the kit's own `Customize` alone). Columns' page has none. A section's key is its heading's words, so a translated heading is another key, and one heading names one section (a heading among the filter fields and again after Group shares one key: handed any function, the second goes). A `fields:` or `toggles:` key handed back with no rows draws nothing. Your rows draw as `data-slot="vk-customize-row"`, a page of yours as `vk-customize-page`, each with `data-key` its key; ViewKit's rows keep their own names (`vk-customize-section`, `-field`, `-toggle`, `-choice`).
297
+ - The sort editor (`sortEditor`): a rule's ⋯ `delete`; a set-aside rule's `why`, `put-back`, `delete`.
298
+ - The filter editor (`filterEditor`): a rule's ⋮ `convert`, `relation` (with `relation:any`, `relation:none`, `relation:every`), `delete`; a set-aside rule's `why`, `put-back`, `delete`; a group's `exclude`.
299
+ - The group editor (`groupEditor`): its settings `field`, `order`, `direction`, `step`, `empty`; its foot `remove`.
280
300
  - ⋯: the folded parts' keys: `options`, `sort`, `filter`, `filters`, `filter-add`, `quick`.
281
301
 
282
302
  Every toolbar button names itself to your `ToolbarButton` by the same keys (`part`, VK-984): a button is named after the
@@ -288,7 +308,7 @@ place it stands in, and a place's second kind of button by a name of its own. Ea
288
308
  | `sort` | `sort` (Sort, or the sort's pill where it stands in this place); `sort-add`, the + after the pill |
289
309
  | `sort-pill` | `sort-pill`; `sort-add`, the + after it |
290
310
  | `filters` | `filters` (each rule's four joined buttons, told apart by `joined`); `filter` (the bar's Filter while it holds none) or `filter-add` (its + after them); `more-filters` ("+N filters") |
291
- | `views`, `views-stacked`, `save` | none outside your own frame: ViewKit's own pills and your `Button`. In your own frame, `views-chip`, `views-tab`, `views-more`, `views-add`, `clear` and `save` (`ViewsFramePart`) |
311
+ | `views`, `views-stacked`, `clear`, `save` | none outside your own frame: ViewKit's own pills and your `Button` (the views row's "+N" yours through the toolbar's `moreViews`). In your own frame, `views-chip`, `views-tab`, `views-more`, `views-add`, `clear` and `save` (`ViewsFramePart`) |
292
312
  | ⋯ (no place) | `more` |
293
313
 
294
314
  ## Parts as data
@@ -317,16 +337,16 @@ export function DealsToolbar(props: ReadyToolbarProps<Deal>) {
317
337
 
318
338
  - The function, `(parts, ctx) => parts` ([`ToolbarParts`, `ToolbarPartPlace` and `ToolbarPartsContext`, in `/panels/react`](./panels-react.md#the-toolbar)): handed the form's parts in the order they are placed (the row's start, its end, then the bar's start and end, as they draw on a computer; a kit phone's one line as it reads; in the `row` arrangement's narrow and phone forms the search still moves where the form puts it), it hands back the parts drawn, in their order. A part left out isn't drawn; a key the form doesn't hold is skipped, unless it brings its own `node`; a key handed twice counts once. Handed back as it came, the toolbar is exactly as with nothing handed. It is called as the toolbar draws: keep it pure and cheap, and call no hooks in it. Not `parts`, which is the builder's own (a field's part columns in Customize).
319
339
  - A part's place: `{ key, line, side, words, node?, className?, button?, panel? }`.
320
- - `key`: the part's public name: `views` (and `views-stacked`, a second axis of views on the bar), `options` (Customize), `search`, `sort` (on the row, or the bar's sort in the old form), `sort-pill` (the bar's sort in Mihai's look with `bar: "always"`), `filter` and `filter-add` (Filter), `filters` (the filters on the bar), `advanced-filters`, `sep` (the bar's separator), `quick`, `new`, `save` (Clear and Save).
340
+ - `key`: the part's public name: `views` (and `views-stacked`, a second axis of views on the bar), `options` (Customize), `search`, `sort` (on the row, or the bar's sort in the old form), `sort-pill` (the bar's sort in Mihai's look with `bar: "always"`), `filter` and `filter-add` (Filter), `filters` (the filters on the bar), `advanced-filters`, `sep` (the bar's separator), `quick`, `new`, `clear` and `save` (the bar's Clear and Save, handed side by side: back side by side, `clear` first, on one line and side, they draw as one item, as they always stood; parted, reordered or with one left out, each draws on its own where you place it).
321
341
  - `line`: `"row"`, `"bar"` (the filter bar; in the `row` arrangement, the line below the row) or `"foot"` (a kit phone list's foot, New's place; anywhere else it means the row). On a kit phone the row and the bar are one line, so `"bar"` stands a part on it too, and New stands on the line once you place it anywhere but `"foot"`.
322
342
  - `side`: `"start"` or `"end"`.
323
- - `words`: `"both"`, as the look's words say (icon and word where the buttons on the right show theirs), or `"icon"`, its icon alone whatever the look. It means something for a part whose button has an icon and a word: `search`, `quick`, `sort`, `filter`, `filter-add`, `options`, `new`. The search and, in Mihai's look, the quick filters' button are handed `"icon"`, as they always stood; placed `"both"`, they read their word and give it up first as the line narrows, as Sort and Filter do. A button with no icon (Clear, Save) keeps its words.
343
+ - `words`: `"both"`, as the look's words say (icon and word where the buttons on the right show theirs), `"icon"`, its icon alone whatever the look, or `"word"`, its word alone, no icon, whatever the look. It means something for a part whose button has an icon and a word: `search`, `quick`, `sort`, `filter`, `filter-add`, `options`, `new`. The search and, in Mihai's look, the quick filters' button are handed `"icon"`, as they always stood; placed `"both"`, they read their word and give it up first as the line narrows, as Sort and Filter do. Placed `"word"`, every button of the part that has a word draws it with no icon (your `ToolbarButton` handed `icon: null` and the word as its `children`), and never gives it up as the line narrows: the part folds into ⋯ instead. A button whose glyph is its word (Sort's +, the bar's +) and New's round + at a phone list's foot keep their glyph; a button with no icon (Clear, Save) keeps its words.
324
344
  - `node`: a part of your own, under a key of your own, drawn where you place it (it doesn't fold into ⋯). `menu.add` places it. The keys above are the toolbar's, even while a part of theirs isn't handed: don't name your own part by one.
325
345
  - `className`: put on every toolbar button the part draws (each handed its `part`, [Default keys](#default-keys)'s table), on the button itself, through your `ToolbarButton` (ViewKit's own puts it on its `<button>`, `CONTROL_ATOMS`' on the toolbar button or New's `Button`).
326
346
  - `panel`: where what it opens hangs at its button, `{ side?, align?, offset? }` (`ToolbarPanelPlace`), your `Popover`'s `side`, `align` and `sideOffset`: `{ align: "start" }` opens Sort's panel from its button's start wherever Sort stands. Absent, a part on its line's end side opens its panel aligned to its button's end and one on its start side to its start, 8 px below it; a host of yours (`hosts`) or a phone's sheet takes none of it.
327
347
  - `button`: your own button for the part, a component taking `ViewsToolbarButtonProps` ([`/react`](./react.md)), drawn for each of its toolbar buttons in place of your `ToolbarButton` and handed the very props it would get: `part`, `open`, `count`, `onClick`, `ref` and the rest. What it opens stays ViewKit's and hangs at your button through `ref`: put `ref` on the element you draw.
328
348
  - Which form: `ctx` is `{ arrangement, phone }` (`"kit"` or `"row"`, and whether it is a phone's), so one function can place each form its own way.
329
- - A part that comes and goes stays the toolbar's: the bar's `filters`, `save`, `sort-pill` and `sep` are handed only while the bar stands, so find them by key (a move by a key the list doesn't hold changes nothing). A part you place on the bar in Mihai's look at rest brings the bar with it; Clear and Save then still wait in Customize's foot.
349
+ - A part that comes and goes stays the toolbar's: the bar's `filters`, `clear`, `save`, `sort-pill` and `sep` are handed only while the bar stands, so find them by key (a move by a key the list doesn't hold changes nothing). A part you place on the bar in Mihai's look at rest brings the bar with it; Clear and Save then still wait in Customize's foot.
330
350
  - Dressing a place, New your own button, Sort a ghost and Customize outlined by your stylesheet:
331
351
 
332
352
  ```tsx
@@ -351,8 +371,7 @@ const dressedParts: ToolbarParts = (parts) =>
351
371
  ```
352
372
 
353
373
  - What stays fixed:
354
- - Clear and Save move as one part (`save`); a part's words are `both` or `icon`, never its word alone.
355
- - The views row (its chip, tabs, "+N" and "+", and `views-stacked`) and Clear and Save draw ViewKit's own pills and your `Button` in the ready toolbar: they take no `part`, and their place's `className` and `button` don't reach them (in your own frame they draw through your `ToolbarButton`, [`/panels/react`](./panels-react.md#the-toolbar)).
374
+ - The views row (its chip, tabs, "+N" and "+", and `views-stacked`) and Clear and Save draw ViewKit's own pills and your `Button` in the ready toolbar: they take no `part`, and their place's `className` and `button` don't reach them (in your own frame they draw through your `ToolbarButton`, [`/panels/react`](./panels-react.md#the-toolbar)). The views row's "+N" is yours through the toolbar's `moreViews` (`ToolbarMoreViews`, [`/panels/react`](./panels-react.md)): your class on ViewKit's own, or your whole button, handed the props your `ToolbarButton` would get.
356
375
  - ⋯ is named (`more`) but has no place: its look comes through the toolbar's `overflow` (`ToolbarOverflow`, [`/panels/react`](./panels-react.md)), your glyph, your class or your whole button, handed the props your `ToolbarButton` would get; or dress it in your `ToolbarButton` by its `part`.
357
376
  - A place's second buttons (Sort's +, the bar's Filter and +, "+N filters", a rule's four) share their place's one `className` and one `button`; tell them apart by `part` and `joined`.
358
377
  - The kit's own `Toolbar` control ([`/controls`](./controls.md)) still places its parts from its look options, `settings: "right"` included, while the ready toolbar never reads `settings`: Customize's side comes through `toolbarParts`.
@@ -30,6 +30,9 @@ on a frame round the controls as `data-<piece>-*`, which each control's styleshe
30
30
 
31
31
  - `BUTTON_LOOKS` — the Button's: 7 options (`radius`, a scale from `xs` to `full`; `smoothing`; `depth`; `hover`; `press`; `soft`; `weight`) and four looks, `classic` (every option's default), `keycap`, `pill` and `soft-lift`.
32
32
  - `ButtonLookOptionId` — the Button's option ids.
33
+ - `ButtonOwnLook` — a Button's own look, set on one Button: its radius, words, colour, icons, room, hover, open and pressed states and the rest, each an attribute on the Button beside `data-button-own`. It may change before 1.0.
34
+ - `buttonOwnOptions` — each own option, the attribute it sets and its values.
35
+ - `buttonOwnAttrs` — `buttonOwnAttrs(look)`: the attributes of an own look.
33
36
  - `SPINNER_LOOKS` — the Spinner's: 6 options (`kind`, `breath`, `line`, `track`, `bars`, `loading`, the four in the middle meaning nothing under some kinds) and thirteen looks, from `arc` to `pulse`.
34
37
  - `SpinnerLookOptionId` — the Spinner's option ids.
35
38
 
@@ -67,7 +70,7 @@ on a frame round the controls as `data-<piece>-*`, which each control's styleshe
67
70
  - `attioBox` — `attioBox(phone)`: the labelled box's own look, its computer form keeping its own size on a phone.
68
71
  - `INLINE_INPUT_LOOKS` — the inline input's: 4 options (`edge`, `corners` from `none` to `full`, `ground`, `tint` from 10% to 100% under the tint ground) and three looks, `attio`, `mihais` (named Outright) and `tinted`. Nothing picked is the line, `md` corners, on a 20% tint, which no look matches.
69
72
  - `InlineInputLookOptionId` — its option ids.
70
- - `FIELD_LOOKS` — Field rows', the phone's: 5 options (`rows-cards`, `rows-edge`, `rows-height`, `rows-label`, `rows-lines`) and three looks, `card` (every option's default), `each` and `rows`.
73
+ - `FIELD_LOOKS` — Field rows', the phone's: 5 options (`rows-cards`, `rows-edge`, `rows-height`, `rows-label`, `rows-lines`) and three looks, `card` (every option's default), `each` and `rows`; and a computer's field row's: `row-icon` (`on`, `off`), every look keeping it on: off (`data-field-row-icon="off"` on a section or any ancestor), each row draws its label, value and lane with no type icon, the label at the row's start.
71
74
  - `FieldLookOptionId` — its option ids.
72
75
  - `FieldRowsLook` — a card's own look, each option without its `rows-`.
73
76
  - `fieldRowsAttrs` — `fieldRowsAttrs(look)`: a card's own look as its attributes.
@@ -35,7 +35,7 @@ The row of views over a list, and any row of pills: each pill is your `Pill` ato
35
35
  - `ViewPicker` — the same axis as one chip naming the active view, opening your `ViewsListBody` (`CONTROLS.ViewsListBody` is ViewKit's own) in your `Popover` at the chip; on a phone (in a `Toolbar`, its phone form; elsewhere your provider's `desktopQuery`) in your `Sheet` (`snap: "auto"`, titled `views.panels.views-list`). The body is handed the views as data, a pick or an order is written once it fits the axis, its `onDone` closes the list, and on a phone it gets the ✕ (and Back on a step) as its `actions` only where your sheet's head doesn't draw it, and `onStepChange`, whose step's title and Back the sheet shows; the axis's `verbs`, where it hands them, reach it as they are ([the components map](../contract.md#the-components-map)). With no view yet it draws only the axis's +, which opens New view's Modal through your `ViewMenu` where the axis hands `verbs` and your map draws one, as the row's + does, and otherwise calls the axis's `onCreate`.
36
36
  - `ViewPickerRow` — one view as a row of a list, with the active view's `⋮`; handed `viewMenu`, every row's `⋮` opens the view's whole menu through your `ViewMenu`.
37
37
  - `ViewCreatePill` — the + that creates a view.
38
- - `ViewAxes` — an axis or several on one row: one axis at the row's size folds, peer axes share one rail, each in its own track. `folded` is handed on to the one axis's `FoldingViewRow`.
38
+ - `ViewAxes` — an axis or several on one row: one axis at the row's size folds, peer axes share one rail, each in its own track. `folded` is handed on to the one axis's `FoldingViewRow`. The axis that grows closes the row with its +, which, as every views + does (the row's, the picker's), opens New view through your `ViewMenu` where the axis hands `verbs`, else calls its `onCreate`.
39
39
 
40
40
  ## The Sort panel
41
41
 
@@ -65,7 +65,7 @@ The panel a list's Options button opens: your components map's `CustomizeBody` (
65
65
  The frame that holds a list's controls, and the parts that need no list settings. `Toolbar` takes the parts your app hands it, each placed at the start or the end, on the first line or the second, and draws them in one of three forms (`/panels`' [arrangement](panels.md#the-toolbars-arrangement)): `row`, `narrow` (its own box under 700px) or `phone` (your provider's `desktopQuery` says it is not a desktop). Pass `phone` or `narrow` to decide either yourself. A part is any node: the frame tells it where it stands through `useToolbarSlot`, and its buttons draw through the `ToolbarButton` atom at their line's size. A part that opens something (a menu, a panel, a pane your app holds) registers it with `useToolbarPanel`, and opening one closes every other, however it opened. A change of form draws the parts afresh, so keep what must last across it (a search's text, a panel's open state) in your app: a panel part left to hold its own state closes when the box crosses 700px, and one handed its state from `useToolbarPanelState`, held above the `Toolbar`, stays open on its page. The row's end controls float over the views on a fade of `--vk-ground` (`data-toolbar-cluster`), which the folding views row measures. Its look is plain; its pieces carry the `data-slot`s the [contract](../contract.md) lists.
66
66
 
67
67
  - `Toolbar` — the frame (one radio for its parts, or, inside a `ListRoot`, the root's). Takes `parts` (`ToolbarPart[]`), and optionally `phone`, `narrow`, `narrowBelow` (700 by default), `fold`, `more` (`ToolbarMore`, ⋯ as data: handed the folded parts' rows, each keyed by its part, and `{ line }`, `"row"` or `"bar"`, since each line folds into its own ⋯, it returns the rows ⋯ shows; a press on any of them closes ⋯ first), `overflow` (`ToolbarOverflow`, ⋯ as you draw it) and `className`. Each of its lines is a toolbar of its own (`role="toolbar"`): the filter bar (and the three forms' second line) named `views.panels.toolbar-bar` ("Sort and filters"), every other line `views.panels.toolbar-row` ("List tools"). With `fold` it draws the kit's arrangement (`/panels`' fold arrangement): the row and the filter bar under it, each a band with a line across under it (on a computer its padding, the room between its tools and the line are `--vk-toolbar-line-py`, `--vk-toolbar-line-gap` and `--vk-toolbar-line-w`, [Tokens](../contract.md)), or a phone's one line, with no narrow form; each line measures itself and gives way as it narrows (it contains its own inline size, so its width comes from where it stands and never from what its lines hold: in a holder sized from its content, a main beside a sidebar, it still gives way, with no wrapper of yours), a part's words turning to its icon (the `ToolbarButton` atom's `iconAlone`), the views folding tabs into "+N", a part's filters folding into "+N filters", then what may fold going behind ⋯ (`data-slot="vk-toolbar-overflow"`, your `Menu`, each row the folded part's `menu`). A folded part keeps its state, and what it opens hangs under ⋯; while ⋯'s menu, a folded part's panel, the views' "+N" list, a filter with a part open (`data-slot="vk-toolbar-filter-rule"` marked `data-open`), an open advanced filter (`data-slot="vk-toolbar-advanced-filter"` marked `data-open`) or "+N filters"' menu (the button in `data-slot="vk-toolbar-more-filters"`, `aria-expanded`) is open, the line holds still. The frame holds the search's open state: open, the line gives way around it, and on a phone the search takes the line beside the views.
68
- - `ToolbarPart` — a part as your app hands it: a `ToolbarPlacement` (its `key`, `side`, `line`, `role`, in the fold arrangement `shed`, `tabs`, `filters` and `fold`, and `words` and `foot`), its `node`, and for a part that may fold its `menu`: `{ label, icon?, onSelect }`, its row in ⋯. `words`: `"icon"` stands a `ToolbarButton` drawn in it as its icon alone, its words given up (a button with no icon keeps them); `"both"` gives the search's button, and the quick filters' button handed `word={null}`, their word, as the look's words say; absent, each its own. `foot: false` keeps New on a phone's folding line instead of at the list's foot.
68
+ - `ToolbarPart` — a part as your app hands it: a `ToolbarPlacement` (its `key`, `side`, `line`, `role`, in the fold arrangement `shed`, `tabs`, `filters` and `fold`, and `words` and `foot`), its `node`, and for a part that may fold its `menu`: `{ label, icon?, onSelect }`, its row in ⋯. `words`: `"icon"` stands a `ToolbarButton` drawn in it as its icon alone, its words given up (a button with no icon keeps them); `"both"` gives the search's button, and the quick filters' button handed `word={null}`, their word, as the look's words say; `"word"` stands one with a word as its word alone, no icon (handed `icon: null`, its word as its `children`), never turning to its icon as the line narrows (a button handed `word={null}`, a +, and New at a phone's foot keep their glyph); absent, each its own. `foot: false` keeps New on a phone's folding line instead of at the list's foot.
69
69
  - `ToolbarSeparator` — the line between the sort and the filters on a filter bar (or Filter while there is none), placed with `role: "separator"`: drawn only while a part stands drawn on each side of it, and never on a phone's line.
70
70
  - `ToolbarViews` — the views row: `views` (`CollectionViewsInput`) and `viewsLayout`. On the row and in the narrow panel it draws `ViewAxes`, or with `as="picker"` and one axis alone its `ViewPicker`; placed again with `stacked` on the second line, it draws the axes a stacked layout pushes beneath, small. On the phone it draws a `ViewPicker` per axis, every axis, and nothing for `stacked`. With `showCounts` the toolbar owns Show counts (`withCounts`). Place it only when the list has views: the phone's search fills the row when nothing is placed at the start.
71
71
  - `ToolbarSearch` — the search, placed with `role: "search"`: `value`, `onChange`, `placeholder` (`views.panels.search` by default) and `searching` (while true, a spinner, worded `views.panels.searching`, stands where its glass is, on the button and in the field, and the field, marked `aria-busy`, keeps its value and its typing; your app decides when it is true). On the row, and beside the phone's views, a button that opens an inline field; in the narrow panel, and on a phone with no views, a field that fills its line. A field that holds a value shows from the start. Escape and its ✕ clear it and close a field the button opened; a blur with nothing typed closes it. The field is your `Input`, or, handed `SearchField` in your components map, your whole search box: it stands in place of the glass, the field and the ✕, handed the value, the clear and its form, while the button, the open state, the caret on a press, Escape and a blur stay ViewKit's ([the components map](../contract.md#the-components-map)). Shut, its button is its glass alone, reading "Search" beside it only where its part is placed `words: "both"`, as the look's words say.
@@ -154,13 +154,14 @@ Options, Sort and Filter each open their panel from their own button, and each t
154
154
  - `useToolbarPanelState` — a panel part's state for your app to hold (`ToolbarPanelState`): `open`, `onOpenChange`, `page` and `onPageChange`; closing forgets the page.
155
155
  - `ToolbarPanelState` — what `useToolbarPanelState` returns.
156
156
  - `FilterPanelContent` — the Filter panel standing alone, for a host of your own: the filter list at its root (titled `views.panels.filter`, no back arrow) and the pages it opens, with `filters`, `timeScopeConfig`, `dateRangeConfigs`, `page`, `onPageChange`, `onClose` and `fill`.
157
- - `ToolbarSave` — Clear and Save, at the end of a filter bar while the list differs (`data-slot="vk-toolbar-save"`): takes `view` (a `CollectionViewState`: Clear is its `onReset`, Save its `onPublish`, shown only where `canPublish`, both waiting while `pending`, nothing while `changes` is 0 unless `layered`, the reader's own layer holding something, when Clear stands alone to empty it), or with no shared view `onClear`, Clear alone taking the list back to its default; nothing when neither has anything to do. Clear has no ground and Save wears the field's look, each your `Button`.
158
- - `ReadyToolbar` — the toolbar for an app that doesn't arrange its own (`ReadyToolbarProps`): the builder's input (`settings`, `layer`, `columns`, `onChange`, `onLayerChange` and the rest of `SettingsPanelsInput`), and optionally `views`, `viewsLayout`, `onAdd` or `addItems` and `addLabel`, `view`, `toggles`, `fieldEditor`, `searchPlaceholder`, `searching` (handed to its search), `hosts` (`{ options, sort, filter, quick }`), `customizeIn` (`"popover"` by default; `"pane"`: on a computer Customize opens in your map's `Pane`, `CONTROLS.Pane`, at the right edge of `paneBox`, under the toolbar and as tall as the list, the list in use beside it; on a phone its Sheet either way; a map with no `Pane`, or your own `hosts.options`, keeps theirs) and `paneBox` (the list's box the Pane stands in: positioned, holding the grid under the toolbar, never scrolling itself; null until it is on the page; not handed, the popover), `quickFilters` (a `QuickFiltersConfig`: handed, the quick filters' button stands on the row's end before the search, in the row arrangement before Options, folding into ⋯ as the row narrows; its counts follow the toolbar's Show counts unless the config carries its own `showCounts`), `quickFiltersOpen` with `onQuickFiltersOpenChange` (the quick filters' panel open, held by you, so a `QuickFiltersReminder` at your list's foot can open it; absent, the toolbar holds it), `phone`, `narrow`, `severalSorts` (true by default: the sort holds up to 3 rules, the row's Sort opening the sort editor on them, or in the old form the sort pill on the bar; `false` keeps Sort's one rule, which opens its own list whether or not a sort stands), `addAfter` (true by default: the + after the sort pill; `false` draws none, and the pill's editor, or your `SortBody`, has Add sort at its foot, as `ToolbarSortPill`'s), `filterGroups` (true by default: and/or groups, each filter on the filter bar on a computer, in the row arrangement each advanced filter's pill after Filter and Convert to advanced filter on a filter's page, and on a phone Filter opening the filter editor on every rule; `false` keeps Filter, counting what is applied, in either arrangement), `arrangement` (`"kit"` by default, or `"row"`), `sortFilter` (`"right"` by default, or `"bar"`), `bar` (`"added"` by default, or `"always"`: with Sort and Filter on the row's right, the bar then always shows, its empty Sort and Filter included), `viewName`, `onRenameView`, `onCopyLink`, `onExport` and `exportCount` (handed on to Customize, as `ToolbarOptions` takes them), `menus` (`ToolbarMenus`: a view's menu, New's and ⋯ as data), `toolbarParts` (`ToolbarParts`: where each part stands, every form's parts handed as data and drawn as you hand them back, [`/list`'s Parts as data](./list.md#parts-as-data)), `overflow` (`ToolbarOverflow`: ⋯ as you draw it where the parts don't fit) and `className`. It calls the builder and draws its parts in the kit's arrangement (`Toolbar`'s `fold`). By default, on a computer, one row at rest: the views with Customize beside them, then on its right Sort and Filter with their words, the quick filters' button and the search, each its icon alone, and New. The toolbar shows only what differs from the saved view (the open view's `saved`, or with no view the list's defaults; a view handed without `saved` keeps the older lighting, lit while a sort stands, the bar for every filter). Sort holds the sort (`ToolbarSortPill`'s `row`): lit while it differs, counted from two, it opens the sort editor to change or remove the rules, Add sort at its foot; with none, the fields. Filter (`ToolbarFilterAdd`, `opens="filters"`), lit while the filter differs, opens the view's filters, editable, with Add filter under them, as Sort opens its rules (with no filter, the editor's fields); the bar's + adds one filter to the bar. Under the row the filter bar, a step smaller, holds what changed: it comes while the sort or the filter differs, a filter is held (or one of its parts is open), or a second axis of views stands there, holding the changed sort ("Sorted by", a list with one sort's included: `ToolbarSort`'s `bar`), the filters that aren't the saved view's own (an edited one as edited; each as below, + after the last, no empty Filter) and Clear and Save at its end. Something taken away (a saved rule removed) brings Clear and Save alone. Customize's foot holds Reset and Save too while anything differs, the bar standing or not (on a shared view Customize also carries its dot), as on a phone. Each of the row's Sort and Filter is a panel of its own, apart from the bar's, so a press opens one list. `sortFilter: "bar"` with `bar: "always"` draws the kit arrangement's old form: the row, the views with Customize beside them and the search and New at its end, and under it the filter bar, always shown, a step smaller: the sort pill first, a separator, the filters (`ToolbarFilters`: each filter as its four joined parts, each advanced filter's pill, + after the last; while there is none, Filter, an empty place; the rule held until whole is held by the toolbar, so the bar counts it as it folds; with `filterGroups` false, Filter as before, with what is applied counted), and at its end Clear and Save (`ToolbarSave`) while the list differs: on a shared view (`view`) Clear takes it back and Save, where `canPublish`, keeps it for everyone; with no shared view, Clear alone takes the list back to its default (nothing filtered, the default sort, no group: so a list that starts grouped or filtered shows Clear at once); Customize's foot then draws neither. A row with no room folds as the kit's does (words to icons, the view tabs into "+N", the bar's last filters into "+N filters", then into ⋯: by default Customize and the row's Sort and Filter, whatever is set; in the old form Customize, and the sort and Filter while no filter stands), with no narrow form. On a phone one line in either form (the views, the sort, Filter, the quick filters' button when handed, Customize, then the search, which opens across the line), Clear and Save in Customize's foot (`views.panels.view-clear`, `views.panels.view-save`; with no shared view, Clear alone), and New a round + at the list's foot, lifted by `--vk-toolbar-foot`. `arrangement: "row"` draws the order of 12 Nov instead: the views on the left; search, sort, filter, options and new on the right, the narrow form under 700px, and Reset and Save for everyone in Customize's foot. Every change comes back as a `ListSettingsChange` or a layer patch: its search writes the settings' search, its ✕s clear in one change (`settingsCleared`), and the active view's menu gains "Edit view…" (`withEditView`), which opens Customize. It is a `ListRoot` around `ListToolbar` ([`/list`](./list.md)): its panels' state is held in that root, above its frame, so a change of form keeps a panel open on its page, in a sheet once the form is the phone's. Show counts is the view's: read from `settings.showCounts` for the views row and the quick filters, absent meaning on, it joins Customize's toggles where the views carry counts and is written back through `onChange`. Group steps aside on a board (`groupShown`).
157
+ - `ToolbarSave` — Clear and Save, at the end of a filter bar while the list differs (`data-slot="vk-toolbar-save"`): takes `view` (a `CollectionViewState`: Clear is its `onReset`, Save its `onPublish`, shown only where `canPublish`, both waiting while `pending`, nothing while `changes` is 0 unless `layered`, the reader's own layer holding something, when Clear stands alone to empty it), or with no shared view `onClear`, Clear alone taking the list back to its default; nothing when neither has anything to do. Clear has no ground and Save wears the field's look, each your `Button`. `only` (`"clear"` or `"save"`) draws that one button alone, with no `vk-toolbar-save` box around it, as the ready toolbar draws each where an app places Clear and Save apart.
158
+ - `ReadyToolbar` — the toolbar for an app that doesn't arrange its own (`ReadyToolbarProps`): the builder's input (`settings`, `layer`, `columns`, `onChange`, `onLayerChange` and the rest of `SettingsPanelsInput`), and optionally `views`, `viewsLayout`, `onAdd` or `addItems` and `addLabel`, `view`, `toggles`, `fieldEditor`, `searchPlaceholder`, `searching` (handed to its search), `hosts` (`{ options, sort, filter, quick }`), `customizeIn` (`"popover"` by default; `"pane"`: on a computer Customize opens in your map's `Pane`, `CONTROLS.Pane`, at the right edge of `paneBox`, under the toolbar and as tall as the list, the list in use beside it; on a phone its Sheet either way; a map with no `Pane`, or your own `hosts.options`, keeps theirs) and `paneBox` (the list's box the Pane stands in: positioned, holding the grid under the toolbar, never scrolling itself; null until it is on the page; not handed, the popover), `quickFilters` (a `QuickFiltersConfig`: handed, the quick filters' button stands on the row's end before the search, in the row arrangement before Options, folding into ⋯ as the row narrows; its counts follow the toolbar's Show counts unless the config carries its own `showCounts`), `quickFiltersOpen` with `onQuickFiltersOpenChange` (the quick filters' panel open, held by you, so a `QuickFiltersReminder` at your list's foot can open it; absent, the toolbar holds it), `phone`, `narrow`, `severalSorts` (true by default: the sort holds up to 3 rules, the row's Sort opening the sort editor on them, or in the old form the sort pill on the bar; `false` keeps Sort's one rule, which opens its own list whether or not a sort stands), `addAfter` (true by default: the + after the sort pill; `false` draws none, and the pill's editor, or your `SortBody`, has Add sort at its foot, as `ToolbarSortPill`'s), `filterGroups` (true by default: and/or groups, each filter on the filter bar on a computer, in the row arrangement each advanced filter's pill after Filter and Convert to advanced filter on a filter's page, and on a phone Filter opening the filter editor on every rule; `false` keeps Filter, counting what is applied, in either arrangement), `arrangement` (`"kit"` by default, or `"row"`), `sortFilter` (`"right"` by default, or `"bar"`), `bar` (`"added"` by default, or `"always"`: with Sort and Filter on the row's right, the bar then always shows, its empty Sort and Filter included), `viewName`, `onRenameView`, `onCopyLink`, `onExport` and `exportCount` (handed on to Customize, as `ToolbarOptions` takes them), `menus` (`ToolbarMenus`: a view's menu, New's, ⋯, Customize's rows and the sort, filter and group editors' menus as data), `toolbarParts` (`ToolbarParts`: where each part stands, every form's parts handed as data and drawn as you hand them back, [`/list`'s Parts as data](./list.md#parts-as-data)), `overflow` (`ToolbarOverflow`: ⋯ as you draw it where the parts don't fit), `moreViews` (`ToolbarMoreViews`: the views row's "+N" as you draw it) and `className`. It calls the builder and draws its parts in the kit's arrangement (`Toolbar`'s `fold`). By default, on a computer, one row at rest: the views with Customize beside them, then on its right Sort and Filter with their words, the quick filters' button and the search, each its icon alone, and New. The toolbar shows only what differs from the saved view (the open view's `saved`, or with no view the list's defaults; a view handed without `saved` keeps the older lighting, lit while a sort stands, the bar for every filter). Sort holds the sort (`ToolbarSortPill`'s `row`): lit while it differs, counted from two, it opens the sort editor to change or remove the rules, Add sort at its foot; with none, the fields. Filter (`ToolbarFilterAdd`, `opens="filters"`), lit while the filter differs, opens the view's filters, editable, with Add filter under them, as Sort opens its rules (with no filter, the editor's fields); the bar's + adds one filter to the bar. Under the row the filter bar, a step smaller, holds what changed: it comes while the sort or the filter differs, a filter is held (or one of its parts is open), or a second axis of views stands there, holding the changed sort ("Sorted by", a list with one sort's included: `ToolbarSort`'s `bar`), the filters that aren't the saved view's own (an edited one as edited; each as below, + after the last, no empty Filter) and Clear and Save at its end. Something taken away (a saved rule removed) brings Clear and Save alone. Customize's foot holds Reset and Save too while anything differs, the bar standing or not (on a shared view Customize also carries its dot), as on a phone. Each of the row's Sort and Filter is a panel of its own, apart from the bar's, so a press opens one list. `sortFilter: "bar"` with `bar: "always"` draws the kit arrangement's old form: the row, the views with Customize beside them and the search and New at its end, and under it the filter bar, always shown, a step smaller: the sort pill first, a separator, the filters (`ToolbarFilters`: each filter as its four joined parts, each advanced filter's pill, + after the last; while there is none, Filter, an empty place; the rule held until whole is held by the toolbar, so the bar counts it as it folds; with `filterGroups` false, Filter as before, with what is applied counted), and at its end Clear and Save (`ToolbarSave`) while the list differs: on a shared view (`view`) Clear takes it back and Save, where `canPublish`, keeps it for everyone; with no shared view, Clear alone takes the list back to its default (nothing filtered, the default sort, no group: so a list that starts grouped or filtered shows Clear at once); Customize's foot then draws neither. A row with no room folds as the kit's does (words to icons, the view tabs into "+N", the bar's last filters into "+N filters", then into ⋯: by default Customize and the row's Sort and Filter, whatever is set; in the old form Customize, and the sort and Filter while no filter stands), with no narrow form. On a phone one line in either form (the views, the sort, Filter, the quick filters' button when handed, Customize, then the search, which opens across the line), Clear and Save in Customize's foot (`views.panels.view-clear`, `views.panels.view-save`; with no shared view, Clear alone), and New a round + at the list's foot, lifted by `--vk-toolbar-foot`. `arrangement: "row"` draws the order of 12 Nov instead: the views on the left; search, sort, filter, options and new on the right, the narrow form under 700px, and Reset and Save for everyone in Customize's foot. Every change comes back as a `ListSettingsChange` or a layer patch: its search writes the settings' search, its ✕s clear in one change (`settingsCleared`), and the active view's menu gains "Edit view…" (`withEditView`), which opens Customize. It is a `ListRoot` around `ListToolbar` ([`/list`](./list.md)): its panels' state is held in that root, above its frame, so a change of form keeps a panel open on its page, in a sheet once the form is the phone's. Show counts is the view's: read from `settings.showCounts` for the views row and the quick filters, absent meaning on, it joins Customize's toggles where the views carry counts and is written back through `onChange`. Group steps aside on a board (`groupShown`).
159
159
  - `ReadyToolbarProps` — what `ReadyToolbar` takes.
160
160
  - `ToolbarParts` — `ReadyToolbar`'s and `ListToolbar`'s `toolbarParts`: `(parts: ToolbarPartPlace[], ctx: ToolbarPartsContext) => ToolbarPartPlace[]`, handed the form's parts in the order they are placed and handing back the parts drawn, in their order. The rules and an example are [`/list`'s Parts as data](./list.md#parts-as-data).
161
- - `ToolbarPartPlace` — a part's place: `{ key, line, side, words, node?, className?, button?, panel? }`: its public key, its line (`"row"`, `"bar"`, or `"foot"`, New's place at a kit phone list's foot), its side (`"start"` or `"end"`), its words (`"both"` or `"icon"`), `node` for a part of your own under a key of your own, and its look: `className`, put on every toolbar button the part draws, and `button`, your own button drawn for each of them in place of your `ToolbarButton`, handed the same props (`ref` included: put it on your button); and `panel` (`ToolbarPanelPlace`), where what it opens hangs at its button. [`/list`'s Parts as data](./list.md#parts-as-data) lists each place's buttons and what stays fixed.
161
+ - `ToolbarPartPlace` — a part's place: `{ key, line, side, words, node?, className?, button?, panel? }`: its public key, its line (`"row"`, `"bar"`, or `"foot"`, New's place at a kit phone list's foot), its side (`"start"` or `"end"`), its words (`"both"`, `"icon"` or `"word"`, its word alone), `node` for a part of your own under a key of your own, and its look: `className`, put on every toolbar button the part draws, and `button`, your own button drawn for each of them in place of your `ToolbarButton`, handed the same props (`ref` included: put it on your button); and `panel` (`ToolbarPanelPlace`), where what it opens hangs at its button. [`/list`'s Parts as data](./list.md#parts-as-data) lists each place's buttons and what stays fixed.
162
162
  - `ToolbarPartsContext` — which form the parts are for: `{ arrangement, phone }` (`"kit"` or `"row"`, and whether it is a phone's).
163
163
  - `ToolbarMore` — ⋯ as data, `Toolbar`'s `more` and `ToolbarMenus`' `more`: `(items, { line }) => items`.
164
+ - `ToolbarMoreViews` — the views row's "+N" as you draw it, `ReadyToolbar`'s and `ListToolbar`'s `moreViews`, as ⋯ is handed: `className` (put on ViewKit's own "+N") and `button` (your own button in its place, handed the props your `ToolbarButton` would get: `part: "views-more"`, `icon: null`, `word: null`, the count as its `children` ("+2"), its name as `label`, `popup: "dialog"`, `open`, `size` and `ref`, `onClick` and `onPointerDown`: put `ref` on your button, so the folded views' list hangs at it). Absent, ViewKit's own "+N", as before. In your own frame "+N" is your `ToolbarButton` (`part: "views-more"`), whatever you hand here.
164
165
  - `ToolbarOverflow` — ⋯ as you draw it, `Toolbar`'s, `ReadyToolbar`'s and `ListToolbar`'s `overflow`, as a `toolbarParts` place's look is handed: `icon` (your glyph over your `icons.more`), `className` (put on it) and `button` (your own button in place of your `ToolbarButton`, handed the very props it would get, `part: "more"` and `ref` included: put `ref` on your button, so ⋯'s menu hangs at it). Absent, ⋯ is your `ToolbarButton` with `icons.more`, as before.
165
- - `ToolbarMenus` — the toolbar's menus as data, `ReadyToolbar`'s and `ListToolbar`'s `menus`: `view(items, { view })` (a view's menu: an option's own rows, Edit view… among them, and the menu a views list draws from the axis's verbs), `add(items)` (New's items: `addItems`, or with `onAdd` alone one row keyed `new`; New opens what it returns as a menu) and `more(items, { line })` (⋯'s rows, each keyed by its part, on the row's line or the filter bar's). The helpers, the keys and the rules are [`/list`'s Menus as data](./list.md#menus-as-data).
166
+ - `ToolbarMenus` — the toolbar's menus as data, `ReadyToolbar`'s and `ListToolbar`'s `menus`: `view(items, { view })` (a view's menu: an option's own rows, Edit view… among them, and the menu a views list draws from the axis's verbs), `add(items)` (New's items: `addItems`, or with `onAdd` alone one row keyed `new`; New opens what it returns as a menu) `more(items, { line })` (⋯'s rows, each keyed by its part, on the row's line or the filter bar's) `customize(items, { page, form, layout })` (Customize's rows: its list's, Layout's and Columns', a `ViewsCustomizeItems`, VK-1062; the older popover route, `ViewOptionsPopoverPanel`, hands none), and `sortEditor`, `filterEditor` and `groupEditor` (the editors' menus, `ViewsSortEditorItems`, `ViewsFilterEditorItems`, `ViewsGroupEditorItems`, VK-1063, wherever this toolbar draws the editors). The helpers, the keys and the rules are [`/list`'s Menus as data](./list.md#menus-as-data).
166
167
  - `useListSettingsState` — a list's settings and layer held in memory, for an app that keeps none yet (a proof page, a test): `{ settings, layer? }` in, `{ settings, layer, onChange, onLayerChange }` out, ready to spread into `ReadyToolbar` beside its `columns`, or into a `ListRoot` ([`/list`](./list.md)): it is the root's memory mode. Each change is applied to the latest settings (`applySettingsChange`), each patch merged into the latest layer.
@@ -22,7 +22,7 @@ Import from `viewkitjs/views/panels` for what a list's panels read and say: the
22
22
  - `TimeScopeConfig` — a time range's choices, with an optional custom range.
23
23
  - `DateRangeConfig` — a date range a list filters by: `key`, `label`, `value` (`DateRangeValue`) and `onChange`.
24
24
  - `DateRangeValue` — a range's two ends, each a `Date` or `null`.
25
- - `ActivePanel` — which drill-in is open: a filter (and a Where field inside a relation's), group, sort, time scope, a date range, a toggle, layout, the Filter list, Columns, one column, or Group's by, sort and date-by pages.
25
+ - `ActivePanel` — which drill-in is open: a filter (and a Where field inside a relation's), group, sort, time scope, a date range, a toggle, layout, the Filter list, Columns, one column, Group's by, sort and date-by pages, or a Customize page of the app's own (`{ type: "page", key }`, `menus.customize`, VK-1062).
26
26
  - `ViewOptionInputs` — everything a Customize panel is handed: filters, sort, group, time scope, date ranges, toggles and layout; with and/or groups, the builder's `filterTree` too.
27
27
  - `CollectionViewState` — the view on screen, shared or the person's own (`own`): how far what this person sees drifted from it (`changes`, `stale`), whether they may publish, a write in flight, the two verbs that settle the drift, and `saved`, the view's settings as saved, what each Customize page's own Reset goes back to (absent, its pages carry none).
28
28
  - `CollectionExportCsv` — a list's export, when it offers one: `count`, the rows it would take, which the Export CSV row shows, and `run`, which builds and downloads the file and says how it went.
@@ -84,7 +84,7 @@ Which form a toolbar draws and where each part stands in it; [`viewkitjs/views/p
84
84
  The fold arrangement (`arrangeToolbar`'s `{ fold: true }`) is the kit's: on a computer the row (line 1) and, under it, the filter bar (line 2), a step smaller; on a phone one line holding the row's start in the order handed, the bar's start going in right after the views (first where there are none), then the row's and the bar's ends. It has no narrow form: a line with no room folds instead, in steps from its end: the words of every part that may `shed` them turn to its icon, then the view tabs fold into "+N" one at a time, then each part's filters fold into "+N filters" one at a time, then every part that may `fold` goes into ⋯.
85
85
 
86
86
  - `ToolbarForm` — `"row"`, `"narrow"` or `"phone"`.
87
- - `ToolbarPlacement` — where a part stands: its `key`, its `side` (`start`, the default, or `end`), its `line` (`1`, the default, or `2`) and `role: "search"` for the search (a second part marked as the search stands as a plain part) or `role: "separator"` for a line between the parts either side of it. In the fold arrangement, `shed` (its words may turn to its icon), `tabs` (how many of its view tabs may fold into "+N"), `filters` (how many of its filters may fold into "+N filters") and `fold` (it may fold into ⋯). And `words` (`"icon"`: its buttons stand as their icon alone; `"both"`: the search's, and a quick filters' button handed no word, read theirs; absent, each its own) and `foot` (`false` keeps New on a phone's folding line instead of at the list's foot), both reaching the part through its slot.
87
+ - `ToolbarPlacement` — where a part stands: its `key`, its `side` (`start`, the default, or `end`), its `line` (`1`, the default, or `2`) and `role: "search"` for the search (a second part marked as the search stands as a plain part) or `role: "separator"` for a line between the parts either side of it. In the fold arrangement, `shed` (its words may turn to its icon), `tabs` (how many of its view tabs may fold into "+N"), `filters` (how many of its filters may fold into "+N filters") and `fold` (it may fold into ⋯). And `words` (`"icon"`: its buttons stand as their icon alone; `"both"`: the search's, and a quick filters' button handed no word, read theirs; `"word"`: its buttons with a word stand as their word alone, no icon; absent, each its own) and `foot` (`false` keeps New on a phone's folding line instead of at the list's foot), both reaching the part through its slot.
88
88
  - `ToolbarSlot` — one part in a line: its `key`, and `fill` when it takes the line's room (the search as a field); in the fold arrangement also `shed`, `tabs`, `filters`, `fold`, `separator` and `search`, each only where it holds.
89
89
  - `ToolbarLine` — one line: its `kind` (`main`, `search`, `views`, `below`, or the fold arrangement's `bar`), its `start` and `end` slots, and the `size` its buttons take (`md` or `sm`).
90
90
  - `TOOLBAR_NARROW_BELOW` — the box width under which a toolbar is narrow (700).
@@ -15,7 +15,7 @@ Guide: [the provider](../guides/the-provider.md).
15
15
  - `PANEL_CONTROL_NAMES` — `Button`, `Select`, `Menu`, `Popover`, `Input`, `Calendar` and `Avatar` (your `atoms.Avatar`, VK-1044): the controls the provider's `panelControls` can name.
16
16
  - `PanelControlName` — one member of `PANEL_CONTROL_NAMES`.
17
17
  - `flatSelectItems` — a Select's rows (`ViewsSelectItem[]`) with every `level` flattened, each row one level in standing in its parent's place, named by its path ("Company › Region"), its value as handed: for a `Select` of yours that draws no levels.
18
- - `DEFAULT_DESKTOP_QUERY` — `(min-width: 1024px)`: the width a desktop starts at when the provider is handed no `desktopQuery`, the default controls' phone line too (`PhoneLine`, in controls.md). Where the screen can't be asked (a server render, a browser with no `matchMedia`), it is a desktop.
18
+ - `DEFAULT_DESKTOP_QUERY` — `(min-width: 1024px)`: the width a desktop starts at when the provider is handed no `desktopQuery`, the default controls' phone line too (`PhoneLine`, in controls.md). Where the screen can't be asked (a server render, a browser with no `matchMedia`), it is a desktop, except for a list's toolbar and grid and a record's field rows, which a server render draws in both forms, CSS showing the screen's (`VK_INTERNAL_MARKS` in the contract).
19
19
  - Required: `components` (your primitives, `ViewsComponents`: `CONTROLS`, or it with your own spread after it, or every one of your own) and `children`.
20
20
  - Defaulted (VK-198): `icons` (your glyphs by meaning, `ViewsIcons`; absent, each meaning drawn through your `AppIcon` by its name, which `CONTROLS.AppIcon` draws with ViewKit's own glyphs); `ports` (your runtime services, `ViewsPorts`, each optional: absent, haptics that do nothing, the browser's clipboard, a store on `localStorage` at the package's `vk:` keys, and the toast and confirm `PortsHost` draws); `conventions` (the `FieldConventions` of `viewkitjs/fields` every value is read with; absent, `en-US` in `UTC`, the same on the server and in the browser). What you hand wins.
21
21
  - Optional: `atoms`, any of your own atoms, each laid over the default of its name, or over `CONTROL_ATOMS`' where `components` is `CONTROLS` as it stands (a map spread from it carries none); `messages`, your wording for the package's own messages, defaulting to `resolveViewsMessage` (the package's English); `presentation`, `(defaults: FieldPresentation) => FieldPresentation`, how your numbers, dates and durations read: given the package's defaults in the conventions' locale, return yours. It is called where a value is drawn, so your provider imports none of the display.
@@ -59,12 +59,14 @@ The primitives your app hands in, modelled on Base UI's shapes: a controlled `op
59
59
  - `ViewsTextBodyProps` — a whole body for a field typed as one string your app draws: `label`, `kind` (`text`, `url`, `domain`, `email`, `phone` or `rich_text`), `paragraph`, `value` and `onValueChange` (the whole text, every change as it is made), `onDone` (closes as Enter does), `check` (a value's reason, or null), `region` (a phone's country), `typed`, `autoFocus`, `form` (`phone`: draw no ✕, ✓ or Cancel of your own) and `place` (`cell` in a grid cell, `row` in a field row, where it stands in the row's flow; absent, `cell`), and, in the phone's sheet, `onStepChange` (a `ViewsBodyStep` while it stands on a step of its own, `null` once back). The editor keeps the draft, Tab, Escape, ⌘ or Ctrl Enter, the close's tidy, the write check, the save and the phone's ✕ and ✓.
60
60
  - `ViewsNumberBodyProps` — a whole body for a number, money or a percent your app draws: `label`, `kind` (`number`, `money` or `percent`), `value` (a number, `null` empty, `NaN` unreadable) and `onValueChange` (the number and, when it is one of `units`, the unit; every change as it is made), `unit` and `units`, `onDone` (closes as Enter does), `check` (a value's reason, or null), `decimals`, `min`, `max`, `locale`, `decimal`, `empty`, `align`, `typed`, `autoFocus`, `form` (`phone`: draw no ✕, ✓ or Cancel of your own) and, in the phone's sheet, `onStepChange` (a step of its own, money's currencies). The editor keeps the draft, the rounding, Tab, Escape, ⌘ or Ctrl Enter, the write check, the save and the phone's ✕ and ✓.
61
61
  - `ViewsSortBodyProps` — the sort editor's whole body your app draws: `label`, `options` (the fields it sorts by, each its `value`, `label` and `defaultDir`, and, as the grid's header marks its column, its field's `type`, its `part` and the header's `glyph`), `rules` (in order, the first sorting first), `setAside` (the set-aside sorts, `[]` when none), `max`, `form`, `addSort` (on a computer, Add sort at its foot), `onStepChange` (on a phone: a step of your body's own, its title and Back, `null` once back), `onRulesChange` (the whole rules and, when handed, the set-aside sorts kept; every change as it is made; a list that breaks the rules writes nothing), `onDone` (what holds it closes) and, on a phone where the sheet's head doesn't draw them, `actions` (the ✕, taking the rules back to what they were as it opened, and ✓). ViewKit keeps the check, the latest rules between renders, the close on the last rule and what ✕ takes back to.
62
+ - Its `items` (`ViewsSortEditorItems`, from `menus.sortEditor`, VK-1063): its menus as data, `(items, ctx) => items`, `ctx` a `ViewsSortEditorItemsContext`: `{ menu: "rule", field, index }` (a rule's ⋯; `field` the sort's key) or `{ menu: "aside", field }` (a set-aside rule's ⋯; `field` its stored `fieldKey`), with `form`. `CONTROLS.SortBody` draws what it hands back; a body of your own may honour it.
62
63
  - `ViewsQuickFiltersBodyProps` — the quick filters' whole body your app draws: `label`, `fields` (each its `key`, `label`, `searchPlaceholder`, its `options` as the quick filter field hands them (each value's mark is its option's), and `values` in the order to show them, each value its key, its words, its `count` where counts show and whether it is `held`; a held value no count lists is among them, drawn from the hold and worded by the config's `heldLabels` else its key; after the fields offered, each other field holding a value, its held values alone), `hold` (each held field once, its values), `several`, `showCounts`, `form`, `onHoldChange` (the whole hold, every change as it is made; one that holds a field twice, more than one value where `several` is false, or a value added on a field the strip doesn't offer writes nothing), `onDone` (what holds it closes) and, on a phone where the sheet's head doesn't draw it, `actions` (the ✕, closing it).
63
64
  - `ViewsFilterBodyProps` — the filter editor's whole body your app draws: `label`, `fields` (the fields a rule may name, `ViewsFilterBodyField`s, each column the list can't filter among them in its place, greyed by its `disabled`), `filter` (the level it is open on, a `FilterGroup`: an advanced filter's group on a computer, the whole filter on a phone), `levels` (how deep its rules may stand, its own the first), `excludable` (whether it may be `not`), `relation` (where the level is a relation's where edited in place: its field key, words and quantifier, and `gone`, why in words, where the list no longer lists the relation: there a level that adds or changes a rule writes nothing), `form`, `onFilterChange` (the whole level and, at a relation, its quantifier; every change as it is made; a level that breaks the rules writes nothing; an empty one on a computer takes its advanced filter away), `ruleValue` (a rule's value in ViewKit's own body for its type, each change handed back as the rule), `onDone` (what holds it closes) and, on a phone where the sheet's head doesn't draw them, `actions` (the ✕, taking the filter back to what it was as it opened, and ✓). ViewKit keeps the check, the Or top's wrap, the pills' keys and what ✕ takes back to.
65
+ - Its `items` (`ViewsFilterEditorItems`, from `menus.filterEditor`, VK-1063): its menus as data, `ctx` a `ViewsFilterEditorItemsContext`: `{ menu: "rule" | "aside", field, part?, relation?, path }` (a rule's ⋮ or a set-aside rule's: its `fieldKey`, its part, the relation it stands under) or `{ menu: "group", path }` (a group's actions), each with its `path` in the filter the body is handed (indices through `items` and a relation rule's `where.items`; the whole filter `[]`), with `form`.
64
66
  - `ViewsFilterBodyField` — a field a filter body's rule may name: `key`, `label`, `fieldKey`, `part`, `type` (its value type, which says its ways), `far` (a relation's fields one level in), `integer` (`true` on a number field that holds whole numbers only: its box takes whole numbers) and `disabled` (on a column the list can't filter, why in words: draw it greyed and never name it in a rule).
65
- - `ViewsFieldsBodyProps` — the field list's whole body your app draws: `purpose` (`sort` or `filter`), `label`, `search` (its search's words), `fields` (each a `ViewsFieldsBodyField`), `own` (the field being changed; absent where a pick adds), `form`, `onPick` (the key picked, and a far field's key for a far field; a key not handed, or handed `disabled`, writes nothing) and `onDone` (what holds it closes, or on a phone the page turns back).
67
+ - `ViewsFieldsBodyProps` — the field list's whole body your app draws: `purpose` (`sort` or `filter`), `label`, `search` (its search's words), `fields` (each a `ViewsFieldsBodyField`), `own` (the field being changed; absent where a pick adds), `ownRelation` (for a rule on a related record's field, the relation `own` stands under, its key as `onPick` hands it back), `form`, `onPick` (the key picked, and a far field's key for a far field; a key not handed, or handed `disabled`, writes nothing) and `onDone` (what holds it closes, or on a phone the page turns back).
66
68
  - `ViewsFieldsBodyField` — a field as the field list's body is handed it: `key`, `label`, `type` and `part` (its field's type and the part it reads, as the grid's header reads them), `glyph` (its column's glyph, drawn as the header draws it), `disabled` (why it can't be picked) and, for a filter's relation, `far` (its far fields, one level in).
67
- - `ViewsFilterPartBodyProps` — a filter rule's way or value your app draws: `part` (`way` or `value`), `label`, `rule` (the rule as data), `field` (the field it names, a `ViewsFilterBodyField` with no `far`), `ways` (each its operator and its words), `own` (ViewKit's own value body; null at `way`), `form`, `onRuleChange` (the rule with its new way, written as ViewKit's own writes one, or its new value; another field or part, a way its field doesn't offer or a value its way can't hold writes nothing) and `onDone` (what holds it closes).
69
+ - `ViewsFilterPartBodyProps` — a filter rule's way or value your app draws: `part` (`way` or `value`), `label`, `rule` (the rule as data), `field` (the field it names, a `ViewsFilterBodyField` with no `far`), `relation` (for a far rule, the relation's field key it stands under, as `ruleValue` hands it), `ways` (each its operator and its words), `own` (ViewKit's own value body; null at `way`), `form`, `onRuleChange` (the rule with its new way, written as ViewKit's own writes one, or its new value; another field or part, a way its field doesn't offer or a value its way can't hold writes nothing) and `onDone` (what holds it closes).
68
70
  - `ViewsSearchFieldProps` — the toolbar's search box your app draws: `value`, `onChange` (every keystroke), `placeholder`, `label` (its name to a screen reader), `searching` and `searchingLabel` (draw a spinner where your glass is, the box still usable), `onClear` (empties the search, and closes it where `closes`), `clearLabel` (your clear's name: "Close search" where it closes, "Clear" where it only clears), `closes` (opened from its button: your clear stands while it is open, empty or not; filling its line: show it only with a value), `form` (`computer` or `phone`) and `fill` (it fills its line).
69
71
  - `ViewsViewsListBodyProps` — the views list's whole body your app draws: `label`, `views` (each a `ViewsViewsListItem`), `value` (the view in use), `form`, `onViewChange` (a view picked; written when it is one of `views`; it closes nothing), `onCreate` and `createLabel` where the axis grows (what holds it closes first), `onReorder` and `canDrag` where the axis reorders (one whole block, shared or the reader's own, each once; any other order writes nothing), `onDone` (what holds it closes), on a phone where the sheet's head doesn't draw it `actions` (the ✕, and Back while the body stands on a step), on a computer `onHold` (while true, a press outside and Escape close nothing: the body asks outside the list), on a phone `onStepChange` (the body stands on a step of its own: the sheet shows its title and Back), and, where the axis hands them, `verbs` (a view's whole menu's data, `ViewsViewVerbs`).
70
72
  - `ViewsViewsListItem` — one view as the views list's body is handed it: `value`, `label`, `icon`, `count` (absent while counts are hidden), `private`, `menu` (the view's own verbs), and for a view's whole menu `layout`, `changed`, `favorite` and `readOnly` (nothing that changes it).
@@ -75,11 +77,21 @@ The primitives your app hands in, modelled on Base UI's shapes: a controlled `op
75
77
  - `ViewsViewLayout` — a layout a new view can take: `id`, `name`, `icon` (your `AppIcon`'s name), `line`, and `columns` where it asks which field makes its columns.
76
78
  - `ViewsViewRecord` — a view as a restore hands it back: `id`, `name`, `layout`, and `private`, `favorite`, `changed`, `count` where it has them.
77
79
  - `ViewsGroupBodyProps` — the group editor's whole body your app draws: `label`, `dimensions` (each a `ViewsGroupDimension`), `group` (a `ViewsGroupValue`), `manualOrder` (your own order may be picked), `form`, `onGroupChange` (the whole group, every change as it is made; one write for each: a new Group by, order or date step alone, else Hide empty groups, else the groups; a new Group by keeps the order and step handed with it only where the new field offers them; a value that changes two at once, names a field the list doesn't offer, or names an order or step the field grouped by doesn't offer writes nothing), `onDone` (inside Customize, back to its list), `actions` (none inside Customize, whose head holds the ✕) and `onStepChange` (a level of the body's own, Group by's fields or an order's choices, whose name and Back Customize's head shows).
80
+ - Its `items` (`ViewsGroupEditorItems`, from `menus.groupEditor`, VK-1063): its rows as data, `ctx` a `ViewsGroupEditorItemsContext`: `{ menu: "settings", field? }` (Group by, Order, Direction, Date step, Hide empty groups; `field` the field grouped by) or `{ menu: "foot" }` (Remove grouping), with `form`.
81
+ - `ViewsSortEditorItems` — the sort editor's menus reshaped (`menus.sortEditor`, VK-1063): `(items: ViewsMenuItem[], ctx: ViewsSortEditorItemsContext) => ViewsMenuItem[]`.
82
+ - `ViewsSortEditorItemsContext` — which of the sort editor's menus: `{ menu: "rule", field, index }` or `{ menu: "aside", field }`, with `form`.
83
+ - `ViewsFilterEditorItems` — the filter editor's menus reshaped (`menus.filterEditor`): `(items, ctx: ViewsFilterEditorItemsContext) => items`.
84
+ - `ViewsFilterEditorItemsContext` — which of the filter editor's menus: `{ menu: "rule" | "aside", field, part?, relation?, path }` or `{ menu: "group", path }`, with `form`.
85
+ - `ViewsGroupEditorItems` — the group editor's rows reshaped (`menus.groupEditor`): `(items, ctx: ViewsGroupEditorItemsContext) => items`.
86
+ - `ViewsGroupEditorItemsContext` — which of the group editor's rows: `{ menu: "settings", field? }` or `{ menu: "foot" }`, with `form`.
78
87
  - `ViewsGroupDimension` — a field a list can be grouped by: `value`, `label`, `orderOptions` (each its mode, words and `defaultDir`), `defaultOrder`, and a date's `granularities` with `defaultGranularity`.
79
88
  - `ViewsGroupValue` — a list's group as one value: `value` (the field grouped by, or `none`), `order` (the active field's `mode` and `dir`), `granularity`, `hideEmpty` and `groups` (each a `ViewsGroupEntry`, in the order the list shows them).
80
89
  - `ViewsGroupEntry` — one group: `key`, `label`, `empty`, `hidden`, and its `count` where the list counts it.
81
- - `ViewsCustomizeBodyProps` — Customize's whole body your app draws: `label`, `page` and `onPageChange` (a `ViewsCustomizePage`), `layout` (a `ViewsCustomizeLayout`), `columns` (`ViewsCustomizeColumns`), `filter` (`FilterBody`'s props on the whole filter, without `form`, `onDone` and `actions`), `sort` (`SortBody`'s, likewise), `group` (`GroupBody`'s, likewise), `toggles` (each a `ViewsCustomizeToggle`, Show counts among them), `view` (on a shared view, or the person's own with `own`: `changes`, `stale`, `canPublish`, `pending`, `onReset`, `onPublish`, and `layered` while the reader's own layer holds something), `resets` (each page's own Reset, while that page differs), `foot`, `onClear`, `clearAll`, `form`, `onDone` and, on a phone where the sheet's head doesn't draw it, `actions` (the ✕). `fields` (`ViewsCustomizeFields`): a list's per-field filters, its time range and its date ranges.
82
- - `ViewsCustomizePage` — where a Customize body stands: `list`, `layout`, `columns`, `filter`, `sort` or `group`.
90
+ - `ViewsCustomizeBodyProps` — Customize's whole body your app draws: `label`, `page` and `onPageChange` (a `ViewsCustomizePage`), `layout` (a `ViewsCustomizeLayout`), `columns` (`ViewsCustomizeColumns`), `filter` (`FilterBody`'s props on the whole filter, without `form`, `onDone` and `actions`), `sort` (`SortBody`'s, likewise), `group` (`GroupBody`'s, likewise), `toggles` (each a `ViewsCustomizeToggle`, Show counts among them), `view` (on a shared view, or the person's own with `own`: `changes`, `stale`, `canPublish`, `pending`, `onReset`, `onPublish`, and `layered` while the reader's own layer holds something), `resets` (each page's own Reset, while that page differs), `items` (Customize's rows as data, `ViewsCustomizeItems`, handed from `menus.customize`: `CONTROLS.CustomizeBody` draws what it hands back, a body of your own may honour it), `foot`, `onClear`, `clearAll`, `form`, `onDone` and, on a phone where the sheet's head doesn't draw it, `actions` (the ✕). `fields` (`ViewsCustomizeFields`): a list's per-field filters, its time range and its date ranges.
91
+ - `ViewsCustomizePage` — where a Customize body stands: `list`, `layout`, `columns`, `filter`, `sort` or `group`, or `page:<key>`, a page of your own (VK-1062).
92
+ - `ViewsCustomizeItem` — a row of Customize as data (VK-1062): a `ViewsMenuItem` (its `children` Customize items), with `inForce` (its value in the brand) and, on Customize's list alone, `page` (a page of your own, or a function handed its Back), opened by the row and titled by its `label`.
93
+ - `ViewsCustomizeItemsContext` — which rows a Customize function is handed: `page` (`"list"`, `"layout"` or `"columns"`), `form` (`"computer"` or `"phone"`) and `layout` (the layout in use).
94
+ - `ViewsCustomizeItems` — Customize's rows reshaped: `(items, ctx) => items`, `menus.customize` ([`/list`'s Menus as data](./list.md#menus-as-data)).
83
95
  - `ViewsCustomizeLayout` — the layouts (`options`, `refused` with reasons, `value`, `onLayoutChange`) and the layout in use's `toggles`, `choices`, `density` and the reader's own `personal` settings.
84
96
  - `ViewsCustomizeFields` — a list's per-field filters, its time range and its date ranges: `folded` (behind one Filter row, or each its own row) and `items`, each a `ViewsCustomizeField`.
85
97
  - `ViewsCustomizeField` — one of them: `key`, `label`, `icon`, `section`, `says` and `inForce` (what it holds), `disabled` (why it can't open), `place` (`filters`, after Columns, or `after`, after Group), `onOpen` (asked as its screen opens), and its screen's content, one of `pick` (a value, its All choice first), `check` (values), `time` (presets, and `custom`: its days and each press with the day pressed), `dates` (a range of days) and `body` (ViewKit's own body for any other kind); each writes through its own `onChange`.
@@ -136,23 +148,23 @@ Guide: [atoms](../guides/atoms.md).
136
148
  The pieces the rendering is built from, and your app's own pieces it cannot draw itself. Each ships as a default, drawn from your app's colours and marked with its own `data-slot`; your app swaps any of them through the provider's `atoms`, and the rest stay the defaults. A swapped atom marks itself as your app does. The [contract](../contract.md) lists their slots and states.
137
149
 
138
150
  - `DEFAULT_VIEWS_ATOMS` — the atoms every app starts with, one default per name of `ViewsAtoms`; the provider lays your `atoms` over it.
139
- - `ViewsAtoms` — the full set, one component per atom: `List`, `Row`, `RowContent`, `TickBox`, `Avatar`, `StatusBadge`, `StatusMarker`, `Tag`, `CommandMenu`, `RelationLink`, `RelationRoles`, `RelationChip`, `CellMore`, `Loading`, `LoadMore`, `PlatformMark`, `RowMenu`, and the panels' rows `ChoiceRow`, `CheckRow`, `RadioRow`, `DirectionButton`, `MenuRow`, `ToggleRow` and `PanelSearch`, the selection's `SelectionSheet`, the filter panel's month `RangeCalendar`, the views row's `Pill`, and the toolbar's `ToolbarButton`. The provider's `atoms` takes any part of it.
140
- - `ViewsChoiceRowProps` — a panel's value row: `label`, a `description` under it, a right-hand `meta` (a sample, a count; a row with one draws no check), `leading`, `trailing`, `selected`, `onClick`, `onMouseDown`, `disabled`, `role` and `aria-selected`.
151
+ - `ViewsAtoms` — the full set, one component per atom: `List`, `Row`, `RowContent` (deprecated, drawn by nothing), `TickBox`, `Avatar`, `StatusBadge`, `StatusMarker`, `Tag`, `CommandMenu`, `RelationLink`, `RelationRoles`, `RelationChip`, `CellMore`, `Loading`, `LoadMore`, `PlatformMark`, `RowMenu`, and the rows ViewKit's own filter and sort bodies draw, `CheckRow`, `RadioRow`, `DirectionButton`, `MenuRow` and `PanelSearch` (the older panels, `severalSorts: false` or `filterGroups: false`, and the value body a filter rule falls back to), with `ChoiceRow` and `ToggleRow` (deprecated, drawn by nothing), the selection's `SelectionSheet`, the filter panel's month `RangeCalendar`, the views row's `Pill`, and the toolbar's `ToolbarButton`. The provider's `atoms` takes any part of it.
152
+ - `ViewsChoiceRowProps` — deprecated with the `ChoiceRow` atom, which nothing draws; a panel's value row: `label`, a `description` under it, a right-hand `meta` (a sample, a count; a row with one draws no check), `leading`, `trailing`, `selected`, `onClick`, `onMouseDown`, `disabled`, `role` and `aria-selected`.
141
153
  - `ViewsCheckRowProps` — toggles one of many, a tick box on the left: `checked`, `onClick`, its `children`, `leading`, `trailing`, `disabled`.
142
154
  - `ViewsRadioRowProps` — picks one of a set: `selected`, `label`, `onClick`, `leading`, `trailing`, `mark` (`"check"` or `"box"`), `disabled` and the `disabledReason` your `Tooltip` shows, and class hooks for the check and the label.
143
155
  - `ViewsDirectionButtonProps` — a sort's direction arrow: `dir` (`"asc"` or `"desc"`) and `onClick`; a press never reaches the row around it.
144
156
  - `ViewsMenuRowProps` — a drill-in row: `icon`, `label`, `value` (where the section stands), `active`, `disabled` and the `disabledReason` your `Tooltip` shows, `onClick`.
145
- - `ViewsToggleRowProps` — a boolean flipped in place: `icon`, `label`, `active`, `disabled` and the `disabledReason` your `Tooltip` shows, `onClick`, and `reset` (`{ onReset }`), the way back to the reader's default.
157
+ - `ViewsToggleRowProps` — deprecated with the `ToggleRow` atom, which nothing draws; a boolean flipped in place: `icon`, `label`, `active`, `disabled` and the `disabledReason` your `Tooltip` shows, `onClick`, and `reset` (`{ onReset }`), the way back to the reader's default.
146
158
  - `ViewsPanelSearchProps` — a panel's text box: `value`, `onChange`, `onClear`, `placeholder`, `autoFocus`, `onKeyDown`, `onFocus`, `inputRef`, `leading` (`null` drops the magnifier), `suffix` and `inputMode`.
147
159
  - `ViewsPillProps` — one option of a row of pills: `active`, `variant` (`solid` or `plain`), `size` (`default` or `sm`), `leading` and `leadingSlot`, your own `activeClassName` and `hoverClassName`, `onClick`, `onContextMenu`, `onPointerDown`, `menuOpen` (it opens a menu) and `ref`.
148
160
  - `ViewsToolbarButtonProps` — a toolbar's button: its `icon`, its `label` (its name, and the word a dress shows unless `word` says another, or `null` for none), a `count` in its corner that becomes a ✕ badge clearing what it counts when handed `onClear`, a `dot` drawn instead of a count, `open`, `changed`, `edge` (the row's outermost button), `disabled`, `size` (`md` or `sm`), `popup` (`menu` or `dialog`, with `aria-expanded` from `open`), `joined` (`start`, `middle` or `end`: one of buttons joined as one, its outer corners alone rounded, `data-joined`), `waits` (its words say what it waits for, in the placeholder's colour, `data-waits`), `part` (which button it is, below), `className` (its toolbar place's class: put it on the button), `onClick`, `onPointerDown` and `ref`; its own words (`children`) keep to one line, cut with "…" where a holder caps its width.
149
161
  - `ViewsToolbarButtonPart` — which of the toolbar's buttons a `ToolbarButton` stands for, handed as `part` by every button the toolbar draws: named after the `toolbarParts` place it stands in (`options`, `search`, `quick`, `new`, `sort`, `filter`, `filter-add`, `filters`, `advanced-filters`, `sort-pill`), a place's second kind of button by a name of its own (`sort-add`, Sort's +; `more-filters`, "+N filters"), ⋯ `more`, and the frame's parts (`ViewsFramePart`). Which place draws which is [`/list`'s Default keys](./list.md#default-keys). An atom that spreads its leftover props onto its element takes `part` out first.
150
162
  - `ViewsFramePart` — the six a `ToolbarButton` is handed only where your own toolbar frame draws them: `views-chip`, `views-tab`, `views-more`, `views-add`, `clear` or `save`, with `current` (a view tab; `true`, the open one) and `onContextMenu` (a tab's verbs); draw each as its `data-slot` (`vk-views-chip`, `vk-views-tab`, `vk-views-more`, `vk-views-add`, `vk-toolbar-clear`, `vk-toolbar-save-button`). Dress by these, not by any `part`: `if (part && FRAME.has(part))`.
151
163
  - `ViewsListProps` — the rows' container, the inset a run of rows sits in inside a panel or a command list's group: its `children` and a class.
152
- - `ViewsRowContentProps` — a row's inside, all the row is inside a command list's item, which owns the element, the highlight and the keyboard.
164
+ - `ViewsRowContentProps` — a row's inside, what `ViewsRowProps` is built on (the `RowContent` atom that took it alone is deprecated).
153
165
  - What it says: a `label` (text truncates to one line, any other node is laid out in a row so it centres; `wrap` lets a long label break), a `description` line under it, a `leading` glyph (with `leadingLane` to keep its width when there is none), `trailing` content after the label, and a `detail` at its right edge in the subtle colour, such as a setting's current choice.
154
166
  - How it reads: `chosen` draws a trailing check (a chosen row with a `detail` draws the detail in the brand colour and no check), `chosenTint` false keeps a badge label's own colour, `tone` `muted` for a row that offers rather than lists (none, create, add), and `size` `compact` (13px) or `regular` (your menu size, the default).
155
- - `ViewsRowProps` — a whole row: everything `ViewsRowContentProps` takes, as a button, or with `interactive` false a static line. It adds `onClick`, `onMouseDown` (for a row inside an editor that keeps its input focused), `disabled`, `title`, a `role` with `aria-selected`, and `opens` and `open` for a row that opens a flyout beside its menu.
167
+ - `ViewsRowProps` — a whole row: everything `ViewsRowContentProps` takes, as a button, or with `interactive` false a static line. It adds `onClick`, `onMouseDown` (for a row inside an editor that keeps its input focused), `disabled`, `title`, a `role` with `aria-selected`, and `opens` and `open`, deprecated: nothing in ViewKit hands them, since it draws no flyout beside a menu.
156
168
  - `ViewsTickBoxProps` — a paint-only tick box: `checked` and a class. The control around it is the caller's.
157
169
  - `ViewsAvatarProps` — a person's or a record's picture, drawn in a user's, a relation's and an actor's chip (`size: "chip"`) and before the name when the list's `rowIcon` hands the row's `avatar` (`size: "glyph"`, sized by `--vk-glyph`): `label` (whose picture it is, for initials), `avatarUrl` (the picture, when there is one), `kind` (the record's kind as your 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). Where the provider's `panelControls` names `Avatar`, it also draws every record's mark ViewKit's panels draw (the Picker's rows, the links editor's, the bulk bar's choices, the quick filters' values), its `size` then a number in pixels (20, 24, 32 or 40) and its `fallback` ViewKit's own Avatar (VK-1044). The default draws the picture while it loads and the fallback otherwise; yours may hand back the fallback for a kind it doesn't dress. It only paints: what wraps the chip owns the click.
158
170
  - `ViewsStatusBadgeProps` — a pill coloured by a status slot of `viewkitjs/fields`: its `slot` and `label`, a `leading` mark that replaces the slot's own, a `title`, a `size` (`compact`, 11px, the default; `regular`; or `row`, the text size of the row it sits in, which a cell's status value hands) and a class. It is handed `place` wherever a field's option is drawn (a cell, the select editor, the selection bar): where the status stands among the field's steps.
@@ -19,12 +19,12 @@ Guide: [the provider](../guides/the-provider.md).
19
19
  - `VkColour` — one member of `VK_COLOURS`.
20
20
  - `VK_OPTIONAL_COLOURS` — the status hues (`--vk-success`, `--vk-warning`, `--vk-info`) and the category hues (`--vk-label-blue` to `--vk-label-teal`) the default atoms and the display read when your app declares them, each with a built-in fallback; the status washes (`--vk-success-subtlest`, `--vk-warning-subtlest`, `--vk-info-subtlest`), the words on a filled status (`--vk-fg-inverse`, `--vk-fg-warning-inverse`), and each hue's soft fill and the default Tag's pill rungs (`--vk-label-blue-soft`, `--vk-label-blue-fill`, `--vk-label-blue-edge`, `--vk-label-blue-strong` and the same for each hue); beside the shadows, the selected ground and the cell outlines' colours listed under [Tokens](../contract.md#tokens).
21
21
  - `VkOptionalColour` — one member of `VK_OPTIONAL_COLOURS`.
22
- - `VK_OPTIONAL_LAYOUT` — the layout your app may declare, each read with a fallback: `--vk-gutter` (`0px`), the side padding your page gives its content, which the grid's rows line their content up with; `--vk-scroll-inset-bottom` (`0px`), how much of the grid's foot your app covers with something it floats there (a phone's bottom bar), so the grid's scroll area runs underneath it and its last row scrolls clear of it; and `--vk-panel-padding` (`0.375rem`), the inset a panel's list keeps from the panel's edge; and the rail, outline, gap, type, line and timing variables listed under [Tokens](../contract.md#tokens).
22
+ - `VK_OPTIONAL_LAYOUT` — the layout your app may declare, each read with a fallback: `--vk-gutter` (`0px`), the side padding your page gives its content, which the grid's rows line their content up with; `--vk-scroll-inset-bottom` (`0px`), how much of the grid's foot your app covers with something it floats there (a phone's bottom bar), so the grid's scroll area runs underneath it and its last row scrolls clear of it; and `--vk-panel-padding` (`0.375rem`), the inset a panel's list keeps from the panel's edge; and the rail, outline, gap, type, line and timing variables and a popup's motion (`--vk-popup-*`), listed under [Tokens](../contract.md#tokens).
23
23
  - `VkOptionalLayout` — one member of `VK_OPTIONAL_LAYOUT`.
24
24
  - `VK_INTERNAL` — the grid's own variables, set and read by the grid alone: `--vk-drag-shift`, a header cell's offset while its column is dragged. Prefixed because they share the global namespace, and not public: your app neither sets nor reads them, and they may change in any release.
25
25
  - `VkInternal` — one member of `VK_INTERNAL`.
26
26
  - `VK_INTERNAL_FAMILIES` — the grid's internal variable families, a prefix with one variable per key after it: `--vk-col-w-<id>`, one column's resolved width, set on the grid's root for every visible column. Not public, like `VK_INTERNAL`.
27
- - `VK_INTERNAL_MARKS` — the display's own marks, set and read by ViewKit alone: `vk-fit` on a cell fitting its values and `vk-fit-value` on each value's box, which its measure reads. Not public, like `VK_INTERNAL`: your app neither sets, reads nor styles them, and they may change in any release.
27
+ - `VK_INTERNAL_MARKS` — the display's own marks, set and read by ViewKit alone: `vk-fit` on a cell fitting its values and `vk-fit-value` on each value's box, which its measure reads; `vk-screen-forms` on the box a server-rendered list, toolbar, grid, Field rows' card or field row outside one stands in, and `vk-twin` and `vk-twin-line` on its two forms' boxes while the page comes alive. Not public, like `VK_INTERNAL`: your app neither sets, reads nor styles them, and they may change in any release.
28
28
  - `VkInternalMark` — one member of `VK_INTERNAL_MARKS`.
29
29
  - `VK_CONTROL_TOKENS` — every name ViewKit's default controls (`viewkitjs/views/controls`) read, each with its `kind` (`colour`, `shadow`, `size` or `motion`): all optional, the ready stylesheet declaring each at the Outright look's value, and each standing for the Outright token [the controls' tokens](../contract.md#the-controls-tokens) names.
30
30
  - `VkControlToken` — one name of `VK_CONTROL_TOKENS`.
@@ -43,8 +43,8 @@ Cheapest change first. Each step reaches further and costs more to keep current.
43
43
  **What ViewKit draws by itself is yours when you hand it.** ViewKit says which actions exist and what they do; it never
44
44
  decides how your buttons look. Anything it draws on screen of its own accord, the ⋯ a toolbar folds its parts into first,
45
45
  takes yours where you hand one: `overflow` on the list's toolbar (`ReadyToolbar`, `ListToolbar`, `List`'s `toolbar`) and on
46
- the kit's `ToolbarControl`, your glyph, your class or your whole button; on `ToolbarControl` "+N" and "+N filters" too
47
- (`moreViews`, `moreFilters`), your class or your whole button. Hand nothing and it draws its own. The toolbar is the
46
+ the kit's `ToolbarControl`, your glyph, your class or your whole button; the views row's "+N" too, `moreViews` on the list's
47
+ toolbar and on `ToolbarControl`, and "+N filters" on `ToolbarControl` (`moreFilters`), your class or your whole button. Hand nothing and it draws its own. The toolbar is the
48
48
  bar above a list and nothing else: a row of a page's actions (a record's) is yours, on your Button.
49
49
 
50
50
  An `if` in a skin that is not about layout is engine code in the wrong place: file it as a package
@@ -79,7 +79,7 @@ next-intl, scope the translator to the namespace (`useTranslations("views")`; a
79
79
  typed catalog can overflow TypeScript) and read each key without its `views.` prefix:
80
80
  `(m) => { const key = m.key.slice("views.".length); return t.has(key) ? t(key, "values" in m ? m.values : undefined) : resolveViewsMessage(m); }`.
81
81
 
82
- The atoms — `List`, `Row`, `RowContent`, `TickBox`, `StatusBadge`, `StatusMarker`, `Tag`, `CommandMenu`,
82
+ The atoms — `List`, `Row`, `TickBox`, `StatusBadge`, `StatusMarker`, `Tag`, `CommandMenu`,
83
83
  `RelationLink`, `RelationRoles`, `RelationChip`, `Loading`, `LoadMore`, `PlatformMark`, `RowMenu` — ship as defaults drawn from your theme. Swap any of them through `atoms` so the views wear
84
84
  your own menus and pills. `CommandMenu`, `RowMenu` and `RelationLink` are your app's own pieces — the verb menu a
85
85
  command cell opens, the row's right-click menu, and where a relation chip goes; their defaults are the map's menu,