viewkitjs 0.29.0 → 0.30.1

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 (289) hide show
  1. package/CHANGELOG.md +127 -6
  2. package/MIGRATION.md +97 -8
  3. package/package.json +1 -1
  4. package/views/dist/cells/cell-format.d.ts +2 -2
  5. package/views/dist/cells/cell-values.js +0 -2
  6. package/views/dist/contract.d.ts +15 -18
  7. package/views/dist/contract.js +13 -27
  8. package/views/dist/controls/button/map-button.d.ts +5 -3
  9. package/views/dist/controls/button/map-button.js +14 -7
  10. package/views/dist/controls/controls.d.ts +2 -4
  11. package/views/dist/controls/controls.js +2 -2
  12. package/views/dist/controls/customize/customize.d.ts +51 -0
  13. package/views/dist/controls/customize/customize.js +128 -23
  14. package/views/dist/controls/customize/map-customize-body.d.ts +0 -3
  15. package/views/dist/controls/customize/map-customize-body.js +46 -11
  16. package/views/dist/controls/customize/map-ranges.d.ts +23 -0
  17. package/views/dist/controls/customize/map-ranges.js +41 -0
  18. package/views/dist/controls/customize/rules.d.ts +17 -1
  19. package/views/dist/controls/customize/rules.js +2 -0
  20. package/views/dist/controls/customize/words.d.ts +7 -0
  21. package/views/dist/controls/customize/words.js +5 -0
  22. package/views/dist/controls/customize.css +3 -0
  23. package/views/dist/controls/filter-editor/filter-editor.d.ts +2 -0
  24. package/views/dist/controls/filter-editor/filter-editor.js +1 -0
  25. package/views/dist/controls/filter-editor/rules.d.ts +1 -2
  26. package/views/dist/controls/index.d.ts +8 -8
  27. package/views/dist/controls/index.js +8 -8
  28. package/views/dist/controls/menu-list/menu-list.d.ts +16 -1
  29. package/views/dist/controls/menu-list/menu-list.js +26 -8
  30. package/views/dist/controls/menu-list.css +8 -0
  31. package/views/dist/controls/quick-filters/map-quick-filters-body.d.ts +1 -1
  32. package/views/dist/controls/quick-filters/map-quick-filters-body.js +6 -3
  33. package/views/dist/controls/sheet/map-sheet.js +1 -1
  34. package/views/dist/controls/text-editor/map-text-body.d.ts +1 -1
  35. package/views/dist/controls/text-editor/map-text-body.js +2 -2
  36. package/views/dist/controls/text-editor/text-editor.d.ts +3 -0
  37. package/views/dist/controls/text-editor/text-editor.js +16 -2
  38. package/views/dist/controls/text-editor.css +11 -0
  39. package/views/dist/controls/values-editor/values.js +6 -2
  40. package/views/dist/display/options.d.ts +1 -1
  41. package/views/dist/display/rich-text.js +0 -1
  42. package/views/dist/editors/ChipsEditor.d.ts +4 -5
  43. package/views/dist/editors/ChipsEditor.js +12 -78
  44. package/views/dist/editors/DateEditor.d.ts +12 -16
  45. package/views/dist/editors/DateEditor.js +40 -191
  46. package/views/dist/editors/EditorPanel.d.ts +2 -6
  47. package/views/dist/editors/EditorPanel.js +2 -2
  48. package/views/dist/editors/LocationEditor.d.ts +11 -19
  49. package/views/dist/editors/LocationEditor.js +19 -211
  50. package/views/dist/editors/NameEditor.d.ts +8 -16
  51. package/views/dist/editors/NameEditor.js +11 -100
  52. package/views/dist/editors/NumberEditor.d.ts +14 -21
  53. package/views/dist/editors/NumberEditor.js +22 -49
  54. package/views/dist/editors/RangeEditor.d.ts +9 -33
  55. package/views/dist/editors/RangeEditor.js +12 -97
  56. package/views/dist/editors/RelationEditor.d.ts +6 -9
  57. package/views/dist/editors/RelationEditor.js +11 -30
  58. package/views/dist/editors/RelationSetEditor.d.ts +13 -24
  59. package/views/dist/editors/RelationSetEditor.js +33 -101
  60. package/views/dist/editors/SelectEditor.d.ts +15 -17
  61. package/views/dist/editors/SelectEditor.js +15 -94
  62. package/views/dist/editors/TextEditor.d.ts +23 -26
  63. package/views/dist/editors/TextEditor.js +11 -48
  64. package/views/dist/editors/ValueListEditor.d.ts +14 -23
  65. package/views/dist/editors/ValueListEditor.js +16 -202
  66. package/views/dist/editors/body-panel.d.ts +13 -7
  67. package/views/dist/editors/body-panel.js +3 -7
  68. package/views/dist/editors/edit-cores.d.ts +15 -15
  69. package/views/dist/editors/edit-cores.js +14 -14
  70. package/views/dist/editors/number-body.d.ts +1 -1
  71. package/views/dist/editors/number-step.d.ts +0 -34
  72. package/views/dist/editors/number-step.js +0 -37
  73. package/views/dist/editors/option-add-flow.d.ts +1 -13
  74. package/views/dist/editors/option-add-flow.js +0 -22
  75. package/views/dist/editors/relation-links-body.d.ts +2 -3
  76. package/views/dist/editors/relation-picker.d.ts +13 -3
  77. package/views/dist/editors/relation-source.d.ts +0 -22
  78. package/views/dist/editors/relation-source.js +0 -21
  79. package/views/dist/field-row/FieldRow.js +5 -6
  80. package/views/dist/field-row/FieldRowLane.js +0 -1
  81. package/views/dist/field-row/editors/RowChipsEditor.js +2 -2
  82. package/views/dist/field-row/editors/RowDateEditor.d.ts +2 -2
  83. package/views/dist/field-row/editors/RowDateEditor.js +2 -2
  84. package/views/dist/field-row/editors/RowNameEditor.d.ts +2 -5
  85. package/views/dist/field-row/editors/RowNameEditor.js +7 -12
  86. package/views/dist/field-row/editors/RowNumberEditor.d.ts +1 -1
  87. package/views/dist/field-row/editors/RowNumberEditor.js +4 -4
  88. package/views/dist/field-row/editors/RowPlaceEditor.js +3 -3
  89. package/views/dist/field-row/editors/RowRangeEditor.d.ts +2 -5
  90. package/views/dist/field-row/editors/RowRangeEditor.js +7 -14
  91. package/views/dist/field-row/editors/RowRelationEditor.js +3 -3
  92. package/views/dist/field-row/editors/RowSelectEditor.js +2 -2
  93. package/views/dist/field-row/editors/RowTextEditor.d.ts +1 -1
  94. package/views/dist/field-row/editors/RowTextEditor.js +3 -4
  95. package/views/dist/field-row/editors/RowValueListEditor.js +5 -5
  96. package/views/dist/field-row/field-row-button.d.ts +6 -9
  97. package/views/dist/field-row/field-row-button.js +1 -6
  98. package/views/dist/field-row/field-row-checkbox.d.ts +1 -1
  99. package/views/dist/field-row/row-target.d.ts +0 -7
  100. package/views/dist/field-row/row-target.js +0 -2
  101. package/views/dist/grid/chrome/GridAddColumn.d.ts +2 -1
  102. package/views/dist/grid/chrome/GridAddColumn.js +8 -66
  103. package/views/dist/grid/chrome/GridAggregateMenu.d.ts +5 -7
  104. package/views/dist/grid/chrome/GridAggregateMenu.js +20 -39
  105. package/views/dist/grid/chrome/GridCellEditors.d.ts +2 -2
  106. package/views/dist/grid/chrome/GridCellEditors.js +12 -12
  107. package/views/dist/grid/chrome/GridChipsEditor.js +3 -3
  108. package/views/dist/grid/chrome/GridColumnMenu.d.ts +11 -12
  109. package/views/dist/grid/chrome/GridColumnMenu.js +32 -93
  110. package/views/dist/grid/chrome/GridDateEditor.d.ts +6 -6
  111. package/views/dist/grid/chrome/GridDateEditor.js +3 -3
  112. package/views/dist/grid/chrome/GridGroupMenu.d.ts +4 -6
  113. package/views/dist/grid/chrome/GridGroupMenu.js +21 -62
  114. package/views/dist/grid/chrome/GridHeader.d.ts +1 -2
  115. package/views/dist/grid/chrome/GridHeader.js +2 -2
  116. package/views/dist/grid/chrome/GridLongTextEditor.d.ts +17 -38
  117. package/views/dist/grid/chrome/GridLongTextEditor.js +6 -7
  118. package/views/dist/grid/chrome/GridNameEditor.js +4 -4
  119. package/views/dist/grid/chrome/GridNumberEditor.d.ts +4 -5
  120. package/views/dist/grid/chrome/GridNumberEditor.js +3 -4
  121. package/views/dist/grid/chrome/GridPlaceEditor.d.ts +2 -5
  122. package/views/dist/grid/chrome/GridPlaceEditor.js +5 -5
  123. package/views/dist/grid/chrome/GridRangeEditor.d.ts +6 -12
  124. package/views/dist/grid/chrome/GridRangeEditor.js +7 -15
  125. package/views/dist/grid/chrome/GridRelationEditor.js +5 -5
  126. package/views/dist/grid/chrome/GridRow.js +0 -3
  127. package/views/dist/grid/chrome/GridRowActions.d.ts +1 -1
  128. package/views/dist/grid/chrome/GridRowActions.js +0 -5
  129. package/views/dist/grid/chrome/GridRowCells.js +9 -6
  130. package/views/dist/grid/chrome/GridSelectEditor.js +3 -3
  131. package/views/dist/grid/chrome/GridStructure.js +0 -1
  132. package/views/dist/grid/chrome/GridTable.js +1 -1
  133. package/views/dist/grid/chrome/GridTextEditor.d.ts +5 -7
  134. package/views/dist/grid/chrome/GridTextEditor.js +4 -17
  135. package/views/dist/grid/chrome/GridValueListEditor.js +4 -4
  136. package/views/dist/grid/chrome/grid-body-place.d.ts +2 -3
  137. package/views/dist/grid/chrome/grid-body-place.js +4 -8
  138. package/views/dist/grid/chrome/grid-button.d.ts +7 -10
  139. package/views/dist/grid/chrome/grid-button.js +1 -6
  140. package/views/dist/grid/chrome/grid-cell-classes.js +1 -1
  141. package/views/dist/grid/chrome/grid-column-menu-items.d.ts +4 -4
  142. package/views/dist/grid/chrome/grid-column-menu-items.js +10 -6
  143. package/views/dist/grid/chrome/grid-group-menu-parts.d.ts +5 -9
  144. package/views/dist/grid/chrome/grid-group-menu-parts.js +1 -3
  145. package/views/dist/grid/chrome/grid-hover.js +0 -1
  146. package/views/dist/grid/chrome/grid-menu-focus.d.ts +7 -31
  147. package/views/dist/grid/chrome/grid-menu-focus.js +7 -47
  148. package/views/dist/grid/chrome/grid-styles.d.ts +0 -3
  149. package/views/dist/grid/chrome/grid-styles.js +0 -1
  150. package/views/dist/grid/chrome/grid-table-props.d.ts +6 -10
  151. package/views/dist/grid/chrome/useGridTableInteractionModel.js +2 -4
  152. package/views/dist/grid/core/editing-controller.d.ts +2 -1
  153. package/views/dist/grid/core/editing-controller.js +10 -2
  154. package/views/dist/grid/core/refusal-sentence.d.ts +3 -0
  155. package/views/dist/grid/core/refusal-sentence.js +2 -2
  156. package/views/dist/grid/core/write-states.d.ts +3 -1
  157. package/views/dist/grid/core/write-states.js +6 -2
  158. package/views/dist/grid/grid.css +1 -1
  159. package/views/dist/model/body-frame.d.ts +0 -32
  160. package/views/dist/model/body-frame.js +1 -15
  161. package/views/dist/model/column-inspect.d.ts +5 -5
  162. package/views/dist/model/column-inspect.js +2 -2
  163. package/views/dist/panels/customize-body.d.ts +1 -10
  164. package/views/dist/panels/customize-body.js +0 -3
  165. package/views/dist/panels/filter/MenuSelect.js +0 -5
  166. package/views/dist/panels/filter/RangeFilterBody.js +0 -1
  167. package/views/dist/panels/filter/details.d.ts +1 -5
  168. package/views/dist/panels/filter/details.js +0 -13
  169. package/views/dist/panels/filter/filter-list.d.ts +0 -1
  170. package/views/dist/panels/filter/filter-list.js +1 -1
  171. package/views/dist/panels/panel-button.d.ts +10 -12
  172. package/views/dist/panels/panel-button.js +1 -6
  173. package/views/dist/panels/react/chrome.d.ts +0 -17
  174. package/views/dist/panels/react/chrome.js +0 -8
  175. package/views/dist/panels/react/customize-body.d.ts +9 -12
  176. package/views/dist/panels/react/customize-body.js +57 -11
  177. package/views/dist/panels/react/customize.d.ts +9 -12
  178. package/views/dist/panels/react/customize.js +3 -112
  179. package/views/dist/panels/react/filter/FilterEditor.d.ts +4 -18
  180. package/views/dist/panels/react/filter/FilterEditor.js +6 -330
  181. package/views/dist/panels/react/filter/FilterFieldList.d.ts +1 -1
  182. package/views/dist/panels/react/filter/FilterFieldList.js +27 -59
  183. package/views/dist/panels/react/filter/PhoneFilterEditor.d.ts +1 -11
  184. package/views/dist/panels/react/filter/PhoneFilterEditor.js +8 -144
  185. package/views/dist/panels/react/filter/editor-ctx.d.ts +1 -33
  186. package/views/dist/panels/react/filter/editor-ctx.js +5 -33
  187. package/views/dist/panels/react/filter/filter-part-body.d.ts +3 -6
  188. package/views/dist/panels/react/filter/filter-part-body.js +0 -5
  189. package/views/dist/panels/react/filter/rule-writes.d.ts +1 -26
  190. package/views/dist/panels/react/filter/rule-writes.js +4 -95
  191. package/views/dist/panels/react/order-details.d.ts +1 -26
  192. package/views/dist/panels/react/order-details.js +3 -69
  193. package/views/dist/panels/react/panel-header.js +0 -1
  194. package/views/dist/panels/react/popover.d.ts +4 -7
  195. package/views/dist/panels/react/quick/QuickFiltersPanel.d.ts +2 -4
  196. package/views/dist/panels/react/quick/QuickFiltersPanel.js +16 -137
  197. package/views/dist/panels/react/sort/SortEditor.d.ts +4 -4
  198. package/views/dist/panels/react/sort/SortEditor.js +8 -245
  199. package/views/dist/panels/react/sort/SortFieldList.d.ts +1 -1
  200. package/views/dist/panels/react/sort/SortFieldList.js +11 -25
  201. package/views/dist/panels/react/toolbar/ToolbarAdvancedFilters.js +2 -2
  202. package/views/dist/panels/react/toolbar/ToolbarBarFilter.js +4 -16
  203. package/views/dist/panels/react/toolbar/ToolbarQuickFilters.js +1 -1
  204. package/views/dist/panels/react/toolbar/ToolbarSave.js +0 -4
  205. package/views/dist/panels/react/toolbar/ToolbarSearch.js +0 -1
  206. package/views/dist/panels/react/toolbar/ToolbarSortPill.js +3 -3
  207. package/views/dist/panels/react/view-actions.js +0 -1
  208. package/views/dist/panels/react/views-row/FoldingViewRow.js +5 -9
  209. package/views/dist/panels/react/views-row/ViewCreatePill.js +0 -1
  210. package/views/dist/panels/react/views-row/ViewPicker.js +7 -43
  211. package/views/dist/panels/react/views-row/ViewPickerRow.js +0 -2
  212. package/views/dist/panels/react/views-row/menu-classes.d.ts +0 -4
  213. package/views/dist/panels/react/views-row/menu-classes.js +0 -2
  214. package/views/dist/panels/react.d.ts +5 -12
  215. package/views/dist/panels/react.js +5 -12
  216. package/views/dist/provider/ViewsProvider.d.ts +2 -46
  217. package/views/dist/provider/ViewsProvider.js +2 -22
  218. package/views/dist/provider/components.d.ts +153 -106
  219. package/views/dist/provider/context.d.ts +1 -21
  220. package/views/dist/provider/missing-slot.d.ts +3 -7
  221. package/views/dist/provider/missing-slot.js +2 -9
  222. package/views/dist/react.d.ts +1 -2
  223. package/views/dist/selection/SelectionBar.js +2 -3
  224. package/views/dist/styles.css +40 -168
  225. package/views/dist/styles.unlayered.css +40 -168
  226. package/views/docs/contract.md +99 -123
  227. package/views/docs/getting-started.md +222 -2
  228. package/views/docs/guides/cells.md +222 -2
  229. package/views/docs/guides/display.md +1 -1
  230. package/views/docs/guides/editors.md +235 -20
  231. package/views/docs/guides/ports.md +1 -1
  232. package/views/docs/guides/selection.md +1 -1
  233. package/views/docs/guides/the-grid.md +14 -16
  234. package/views/docs/guides/the-provider.md +9 -15
  235. package/views/docs/reference/cells.md +1 -1
  236. package/views/docs/reference/controls.md +28 -15
  237. package/views/docs/reference/editors-chips.md +2 -2
  238. package/views/docs/reference/editors-date.md +4 -4
  239. package/views/docs/reference/editors-location.md +4 -7
  240. package/views/docs/reference/editors-name.md +3 -5
  241. package/views/docs/reference/editors-number.md +10 -10
  242. package/views/docs/reference/editors-panel.md +3 -3
  243. package/views/docs/reference/editors-range.md +3 -5
  244. package/views/docs/reference/editors-relation.md +4 -4
  245. package/views/docs/reference/editors-select.md +3 -3
  246. package/views/docs/reference/editors-text.md +3 -4
  247. package/views/docs/reference/editors-value-list.md +3 -3
  248. package/views/docs/reference/field-row.md +1 -1
  249. package/views/docs/reference/grid.md +2 -2
  250. package/views/docs/reference/panels-react.md +20 -34
  251. package/views/docs/reference/react.md +11 -18
  252. package/views/docs/reference/views.md +5 -5
  253. package/views/skills/views/SKILL.md +1 -1
  254. package/views/dist/editors/relation-panel.d.ts +0 -69
  255. package/views/dist/editors/relation-panel.js +0 -46
  256. package/views/dist/grid/chrome/GridColumnColorSection.d.ts +0 -13
  257. package/views/dist/grid/chrome/GridColumnColorSection.js +0 -40
  258. package/views/dist/grid/chrome/GridColumnDateSection.d.ts +0 -28
  259. package/views/dist/grid/chrome/GridColumnDateSection.js +0 -23
  260. package/views/dist/grid/chrome/GridColumnDurationSection.d.ts +0 -23
  261. package/views/dist/grid/chrome/GridColumnDurationSection.js +0 -24
  262. package/views/dist/grid/chrome/GridColumnNumberSection.d.ts +0 -29
  263. package/views/dist/grid/chrome/GridColumnNumberSection.js +0 -27
  264. package/views/dist/grid/chrome/GridColumnPercentSection.d.ts +0 -16
  265. package/views/dist/grid/chrome/GridColumnPercentSection.js +0 -16
  266. package/views/dist/grid/chrome/GridColumnSortSection.d.ts +0 -38
  267. package/views/dist/grid/chrome/GridColumnSortSection.js +0 -33
  268. package/views/dist/grid/chrome/GridFlyout.d.ts +0 -44
  269. package/views/dist/grid/chrome/GridFlyout.js +0 -80
  270. package/views/dist/grid/chrome/GridMenuRow.d.ts +0 -15
  271. package/views/dist/grid/chrome/GridMenuRow.js +0 -15
  272. package/views/dist/grid/chrome/grid-menu-search.d.ts +0 -7
  273. package/views/dist/grid/chrome/grid-menu-search.js +0 -7
  274. package/views/dist/panels/react/GroupBucketsList.d.ts +0 -16
  275. package/views/dist/panels/react/GroupBucketsList.js +0 -44
  276. package/views/dist/panels/react/LayoutColumnsList.d.ts +0 -24
  277. package/views/dist/panels/react/LayoutColumnsList.js +0 -101
  278. package/views/dist/panels/react/PopoverColumnDetail.d.ts +0 -11
  279. package/views/dist/panels/react/PopoverColumnDetail.js +0 -24
  280. package/views/dist/panels/react/drag.d.ts +0 -2
  281. package/views/dist/panels/react/drag.js +0 -5
  282. package/views/dist/panels/react/layout-detail.d.ts +0 -4
  283. package/views/dist/panels/react/layout-detail.js +0 -29
  284. package/views/dist/panels/react/root-list.d.ts +0 -6
  285. package/views/dist/panels/react/root-list.js +0 -31
  286. package/views/dist/panels/react/sort/use-sort-drag.d.ts +0 -17
  287. package/views/dist/panels/react/sort/use-sort-drag.js +0 -39
  288. package/views/dist/panels/react/view-footer.d.ts +0 -20
  289. package/views/dist/panels/react/view-footer.js +0 -41
@@ -8,9 +8,9 @@ The spreadsheet. The door carries no client directive; every rendering file behi
8
8
  - `GridTableProps` — what `GridTable` takes, flat, typed over your row. Five are required: `groups` (the rows, as the model's `ListGroup`s), `grouped` (whether they draw as group bands), `getRowId`, `columns` (the model's `ListColumn`s) and `onOpenRow` (what opening a row does: the title's text opens it; it receives the row and a `GridRowOpenedFrom`, which brings the focus back to the row's cell once what it opened closes). The rest are optional:
9
9
  - Rows and groups: `rowHref`, `onPrefetchRow` (warm a row's detail on a pointer's intent), `rowClassName`, `rowIcon` and `showRowIcon` (the title cell's glyph, as a descriptor the grid sizes and colours, or the row's picture through your `Avatar` atom when the descriptor hands an `avatar`), `onOpenRelation` and `entityIcon` (opening the record a relation cell points at, and the glyph for a kind; without `onOpenRelation`, relation cells are inert), `isCollapsed` and `onToggleGroup` (your group collapse), `oneHeader` (a grouped grid draws one row of column names, pinned at the top over every group, in place of each group's own; each group's bar pins under it, and the row's checkbox picks every row; off by default, when each group draws its own with the box that picks its rows), `pinFooter` (the footer pins at the foot of the grid's scroll area, `--vk-scroll-inset-bottom` above its edge and, while rows are selected, a step above the bar `renderBar` draws, on a phone the rows then ending at the footer's bottom (measured where it stands; on the foot when it draws none), the rows passing under it, painted the ground and `data-stuck` only while they do; an ungrouped grid's stands at the foot even when its rows don't fill the area, in pages just above the pager, and a grouped grid's each pin while their group's rows run past the foot and close their group otherwise; off by default, when the footer stands after the last row), `renderGroupLabel`, `renderGroupFooter` (a group's paged continuation after its loaded rows), `onHideGroup`, `countOf`, `loadMore` (`hasMore`, `onReveal` and a `label`), `pages` (`GridPages`: `page` from 1, `size`, `total`, the view's count, `exact`, false for a capped count, `sizes`, the page-size pick's choices, default 25, 50 and 100, and `onPage` and `onSize`: an ungrouped grid draws the page you hand and the pager part `vk-grid-pager` under it, `loadMore` is then not drawn, picks clear on a page or size change, and the footer shows only the figures a group carries in `figures`; a grouped grid draws no pager; absent by default), `emptyState`, and `transitionKey`, `transitionPending` and `transitionLabel` (a view change: the wait paints before the new rows mount).
10
10
  - Row actions and menus: `rowMenu` (a row's items, on right-click and in its ⋯ tail; the same builder a list takes), `contextMenu` (a right-click menu that differs from it), `rowActions` (buttons in the title cell's action lane, before the grid's own Edit), `onRowDelete` and `deleteLabel` (a delete row in the row's menu), `commands` (the verbs a `command` column's cell opens, by field key; without it a command column is a read-only badge) and `selection` (the list's selection; its optional `renderBar` draws the bar it opens, `SelectionBar` with your verbs, and without one the rows still tick and no bar is drawn).
11
- - Sort, group and figures: `sort` (`GridSortState`), `sortMark` (a sorted column's header wears `icons.sortAsc` or `icons.sortDesc` after its name; off by default, `aria-sort` saying it either way), `groupBy` (`GridGroupByState`), `sortOptions` (the group band menu's sort, as `GridGroupSortOption`s), `groupMenu` (the parts a group band's ⋯ holds, as `GridGroupMenuPart`s: `"select"` (Select all in group, on a grid with a `selection`), `"sort"`, `"figures"`, `"hide"`; with it the sort list always searches through your `Command` on the `popover` route), `groupSummary` and `onGroupSummaryChange` (which figures ride beside a group's name), `groupFigures` (`GridGroupFigure`s), `countNoun` (`GroupCountNoun`), `aggregates`, `onAggregateChange` and `renderAggregate` (the footer's figure per column), `viewBacked` (a saved view, which changes figures only for field-backed columns) and `defaultCurrency` (the reader's currency, which a money column read as it was entered totals in).
11
+ - Sort, group and figures: `sort` (`GridSortState`), `sortMark` (a sorted column's header wears `icons.sortAsc` or `icons.sortDesc` after its name; off by default, `aria-sort` saying it either way), `groupBy` (`GridGroupByState`), `sortOptions` (the group band menu's sort, as `GridGroupSortOption`s), `groupMenu` (the parts a group band's ⋯ holds, as `GridGroupMenuPart`s: `"select"` (Select all in group, on a grid with a `selection`), `"sort"`, `"figures"`, `"hide"`), `groupSummary` and `onGroupSummaryChange` (which figures ride beside a group's name), `groupFigures` (`GridGroupFigure`s), `countNoun` (`GroupCountNoun`), `aggregates`, `onAggregateChange` and `renderAggregate` (the footer's figure per column), `viewBacked` (a saved view, which changes figures only for field-backed columns) and `defaultCurrency` (the reader's currency, which a money column read as it was entered totals in).
12
12
  - Format overrides and their handlers, every map keyed by field key: `optionColors`, `dateStyles`, `durationStyles`, `numberFormats` (decimals null is the field's own), `showTimeOverrides` and `percentDisplays`, each with its `on…Change` handler taking the field key first, and `formatsWritable` (false hides the stored format knobs from the column menu; default true).
13
- - Columns and preferences: `columnState` and `onColumnStateChange` (order, widths, and which columns show), `renderAddColumn` (your own add-column cell at the header's end, or in the title column's header under `addColumnAt`; without it, or answering `undefined`, `false` or `""`, the grid's own lists the hidden columns; answering `null`, none is drawn and no room is kept for it), `addColumnOnPhone` ("+ Add column" on a phone too, its list in your `Sheet`, or your `Menu` on the `menu` route; off by default), `addColumnAt` (`"title"` stands "+ Add column" as a lone + at the right edge of the title column's header, in reach while the columns scroll, and the tail keeps no room for it; `"end"`, the default, the header row's last cell; with no title column shown it stands at the end), `phonePicking` (a phone picks rows by a long press, the boxes inside the name column before the picture, and always shown on a grouped grid, its titles row's box in the name column's head; needs `selection`; off by default), `parts` (a column per part of a name, a place or a range, offered under its field in "+ Add column"; off by default), `renderColumnMenuRows` (your rows in a column's menu, above Hide), `columnMenuItems` (the same rows as data, on the `menu` route), and the per-user toggles `freezeIdentity` (true on the bare prop, but a grid wired through `useGridTablePrefs` takes the preference `gridFreezeIdentity`, false in `LIST_VIEW_PREF_DEFAULTS`, so its identity columns start unfrozen until the person turns it on; start your prefs with `gridFreezeIdentity: true` to open it frozen), `alwaysCheckboxes`, `verticalBorders` and `scale`; and `headerVerticalBorders` (the header's columns ruled as the rows' are under `verticalBorders`, the last bare; off by default); and `fillWidth` (the columns share the grid's whole width, each in proportion to its own width and never below it, a column the person resized or one with a `grid.maxWidth` keeping its width; a table wider than the grid scrolls sideways as without it; off by default).
13
+ - Columns and preferences: `columnState` and `onColumnStateChange` (order, widths, and which columns show), `renderAddColumn` (your own add-column cell at the header's end, or in the title column's header under `addColumnAt`; without it, or answering `undefined`, `false` or `""`, the grid's own lists the hidden columns; answering `null`, none is drawn and no room is kept for it), `addColumnOnPhone` ("+ Add column" on a phone too, its list in your `Menu`; off by default), `addColumnAt` (`"title"` stands "+ Add column" as a lone + at the right edge of the title column's header, in reach while the columns scroll, and the tail keeps no room for it; `"end"`, the default, the header row's last cell; with no title column shown it stands at the end), `phonePicking` (a phone picks rows by a long press, the boxes inside the name column before the picture, and always shown on a grouped grid, its titles row's box in the name column's head; needs `selection`; off by default), `parts` (a column per part of a name, a place or a range, offered under its field in "+ Add column"; off by default), `renderColumnMenuRows` (deprecated, read by nothing: hand `columnMenuItems`), `columnMenuItems` (your rows in a column's menu, as data, above Hide), and the per-user toggles `freezeIdentity` (true on the bare prop, but a grid wired through `useGridTablePrefs` takes the preference `gridFreezeIdentity`, false in `LIST_VIEW_PREF_DEFAULTS`, so its identity columns start unfrozen until the person turns it on; start your prefs with `gridFreezeIdentity: true` to open it frozen), `alwaysCheckboxes`, `verticalBorders` and `scale`; and `headerVerticalBorders` (the header's columns ruled as the rows' are under `verticalBorders`, the last bare; off by default); and `fillWidth` (the columns share the grid's whole width, each in proportion to its own width and never below it, a column the person resized or one with a `grid.maxWidth` keeping its width; a table wider than the grid scrolls sideways as without it; off by default).
14
14
  - Writes: `onCellCommit` (`GridCellCommitFn`) and `onCellsCommit` (`GridCellsCommitFn`).
15
15
  - States held from outside, each off when left out, as a page that shows the grid's states side by side needs them: `hoveredRow` (a row, by its id, drawn as under the pointer: its tint, its rail's box, its ⋯ and the name's actions, and `data-hovered`, while a real pointer still hovers any row beside it; drawn, as a hover is, only on a screen whose pointer hovers) and `onHoveredRowChange` (the row a person's pointer moves onto, or null off it); `cellPick` (a `GridCellPick` drawn as picked, placed each time its value changes without taking the page's focus; while it is given, null included, a press outside the grid lets go of nothing, and a person's click, drag, keys and Escape move it as always) and `onCellPickChange` (each change a person makes, or null); `openColumnMenu` (the column, by its id, whose menu stands open on the first row of column names, its header cell `data-open`; while it is given, null included, the menus open and close only as it says) and `onOpenColumnMenuChange` (the column a person's press opens, or null when a press, a row of the menu or a press outside closes it, for you to answer).
16
16
  - List config: `listConfig` (the settings layer every user of the list inherits, which may only take away from what the columns declare: the table read-only, per-column locks; a constraint on the screen, while your API guards its own writes). The grid only reads it: a surface of your own changes it.
@@ -5,7 +5,6 @@ Import from `viewkitjs/views/panels/react` for the panels as they draw: each is
5
5
  ## The filter panel
6
6
 
7
7
  - `CompactFilterList` — the Filter drill-in: a row per filter, grouped under each filter's `section`, then the time scope and the date ranges; a press opens that row's detail through `onOpenPanel`.
8
- - `dimensionRows` — the same rows without the scroll box, for a root list that shows them unfolded.
9
8
  - `FilterSectionHeading` — a section's rule and heading in the filter panel, and the Where heading inside a relation's filter.
10
9
  - `FilterIcon` — a filter row's glyph: the filter's own `icon`, else its kind's (`filterStatus`, `filterCategory`, `filterMetric`), else `filter`.
11
10
  - `CompactFilterDetail` — one filter's page: the body for its type, an unavailable filter's reason and its Clear saved filter, a multi filter's ticked options, or a single filter's options after its All row. A relation's Where row opens its far field through `onOpenField`. Handed `onConverted`, a filter whose rule can turn advanced (its `convert`, with and/or groups) shows Convert to advanced filter at its foot (`data-slot="vk-filter-convert"`); pressed, it converts, then calls `onConverted`. `FilterPanelContent` hands its own `onConverted` through; the toolbar's Filter and Customize hand one on a computer only.
@@ -20,7 +19,6 @@ Import from `viewkitjs/views/panels/react` for the panels as they draw: each is
20
19
  - `DateFilterCalendar` — the date filter's month, through `RangeCalendar`: a press sets the end being picked and hands the caret to the other end's box; a relative rule paints its window and takes no press.
21
20
  - `DateFilterEditingEnd` — which end a press sets, `from` or `to`.
22
21
  - `DateFilterInput` — one end's typed date, committed once it reads as a whole day, or on its clear.
23
- - `CompactToggleDetail` — a toggle's On and Off; a pick goes back.
24
22
  - `CompactDateRangeDetail` — a date range's month, with a Clear under it while either end is set.
25
23
  - `CompactTimeScopeDetail` — a time scope's presets and its Custom row, which opens a month; a press on a finished custom range starts a new one, and your popover's back arrow steps from the month to the presets through `registerBackHandler`.
26
24
 
@@ -34,36 +32,26 @@ The row of views over a list, and any row of pills: each pill is your `Pill` ato
34
32
  - `ViewTabs` — one axis as plain pills on a scroll rail.
35
33
  - `toPillOptions` — views turned into pill options: the label and count joined by `views.panels.view-count`, a slot's colours, the glyph by your `AppIcon`.
36
34
  - `FoldingViewRow` — the saved-views row that folds what doesn't fit into a "+N" chip, never folding the active view, and closes with the + when the axis grows. Handed `folded`, as a folding toolbar line hands it, it folds that many tabs and measures nothing of its own.
37
- - `ViewPicker` — the same axis as one chip naming the active view, its views in a list: shared, then personal, a search past five, and "New view…" last. The list opens 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`), its search not taking the focus. Handed a `ViewsListBody` in your components map, the chip opens it in place of its own list, in the same `Popover` and `Sheet`: it 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)).
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)).
38
36
  - `ViewPickerRow` — one view as a row of a list, with the active view's `⋮`.
39
37
  - `ViewCreatePill` — the + that creates a view.
40
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`.
41
39
 
42
- ## The Sort and Group panels
40
+ ## The Sort panel
43
41
 
44
- A panel's list keeps `--vk-panel-padding` from its edge ([Tokens](../contract.md#tokens)). Each panel's root is a `data-vs-detail` list and each row a `data-vs-row`, so a host that frames a panel styles it through those. This is the one door that may reach dnd-kit, the package's optional peers: the Columns list, the group order, the view pills and the sort's rules drag through it. What a screen reader hears of their drags, the keyboard instructions and each pick-up, move, drop and cancel, is worded through your `messages` (`views.panels.drag-*`), naming the row by its label. It reaches them only through `import()`, started as it loads, so the door itself loads without them; an app that renders a part that drags installs `@dnd-kit/core`, `@dnd-kit/sortable` and `@dnd-kit/utilities`, and an app that takes only the grid, or only the panels' pure door, never does.
42
+ A panel's list keeps `--vk-panel-padding` from its edge ([Tokens](../contract.md#tokens)). Each panel's root is a `data-vs-detail` list and each row a `data-vs-row`, so a host that frames a panel styles it through those. This is the one door that may reach dnd-kit, the package's optional peers: the view pills and the sort's rules drag through it. What a screen reader hears of their drags, the keyboard instructions and each pick-up, move, drop and cancel, is worded through your `messages` (`views.panels.drag-*`), naming the row by its label. It reaches them only through `import()`, started as it loads, so the door itself loads without them; an app that renders a part that drags installs `@dnd-kit/core`, `@dnd-kit/sortable` and `@dnd-kit/utilities`, and an app that takes only the grid, or only the panels' pure door, never does.
45
43
 
46
44
  - `CompactSortDetail` — Sort's page: every option the list sorts by, the current one ticked with its direction arrow, and a search once there are more than eight (`GROUP_BY_SEARCH_AFTER`). Takes `sort` (`SortConfig`); a pick sorts by that option in its own direction.
47
- - `CompactGroupDetail` — the Group panel: Group by, Sort and Date by as rows that open pages of their own, Hide empty groups as a switch, the Groups to show, hide and drag, and Remove grouping. Takes `group` (`GroupConfig`) and `onOpenPanel`, called with `{ type: "groupBy" }`, `{ type: "groupSort" }` or `{ type: "groupDateBy" }`. A `group` with no `hideEmpty` or `groups` draws no such section.
48
- - `CompactGroupByDetail` — Group by's page: None and every dimension, the current one checked, a search past eight. Takes `group` and `onBack`, called after a pick.
49
- - `CompactGroupSortDetail` — the Group panel's Sort page: the dimension's orders both ways, then Manual where its groups can be dragged. Takes `group` and `onBack`.
50
- - `CompactGroupDateByDetail` — Date by's page: a date dimension's granularities. Takes `group` and `onBack`.
51
- - `GroupBucketsList` — the group order: every group with a grip to drag it and an eye to show or hide it, an empty group dimmed and the empty one named `views.panels.group-empty`. Takes `groups` (`GroupConfig["groups"]`) and `variant`, `"compact"` (a panel's row) or `"comfortable"` (a phone sheet's taller row). It drags by mouse after 8 px, by a long press of 250 ms that gives up past 5 px, and by the keyboard (Space or Enter lifts a focused grip, the arrows move it); the grip carries `data-base-ui-swipe-ignore`, so a drawer that honours it keeps still while a row inside it is dragged.
52
45
 
53
- ## The Layout panel and the columns
46
+ ## The field editor
54
47
 
55
- - `CompactLayoutDetail` — the Layout panel: the layouts a list can draw, the ones it refuses greyed with their reason on a resting pointer, then the active layout's Options, its own pick-one settings, Density and the reader's For you section. Takes `layout` (`LayoutConfig`).
56
- - `LayoutColumnsList` — the Columns list: a grip to reorder, an eye to show or hide, the row's body to open a column's settings, a board card's new-line toggle, and Reset when a column differs from the view. Takes `columns` (`LayoutColumnsConfig`), `variant`, `onOpenColumn`, `canOpen` (which rows open; every row when absent), `showNewLine` and `fieldEditor`. It drags as `GroupBucketsList` does; a `fixed` column has no grip and no eye.
57
- - `PopoverColumnDetail` — one column's settings: Visible, its pick-one settings and toggles under their sections, and the field editor's rows for its field. Takes `column`, `columns`, `onDone` (called once a field editor's row has opened its window) and `fieldEditor`.
58
- - `PanelFieldEditor` — what an app's field editor adds to the panels: `columnMenu(fieldKey, close)`, the rows a column's settings show for its field (`null` for a field it does not change), and `fieldsFooter(columns)`, what the Columns list shows under its rows. Without one, both draw as they always have.
48
+ - `PanelFieldEditor` — what an app's field editor adds to Customize: `columnMenu(fieldKey, close)`, the rows a column's settings show for its field (`null` for a field it does not change), and `fieldsFooter(columns)`, what Columns shows under its rows. A `CustomizeBody` is handed them as its columns' `columnMenu` and `footer`.
59
49
 
60
50
  ## Customize
61
51
 
62
- The panel a list's Options button opens, put together from the panels above: one header frame (a back arrow only when deep, the title, Clear all at the root without a shared view, a ✕ when the host can close it) over the root list or the page a row opened, and, at the root of a shared view, its footer. Its root is a `data-vs-detail` list, its header `data-vs-header`, its footer `data-vs-footer` with `data-vs-inset` and each actions row a `data-vs-row`, so a drawer of your own insets them through those; the root's rows carry `data-vs-row` when your `MenuRow` and `ToggleRow` atoms do. Your app hosts it: in a popover, or in a full-height drawer with `fill`.
52
+ The panel a list's Options button opens: your components map's `CustomizeBody` (`CONTROLS.CustomizeBody`, or your own), handed the view's settings as data, wherever the panel hangs ([the components map](../contract.md#the-components-map)). ViewKit draws no Customize of its own. Your app hosts it: in a popover, or in a drawer of its own.
63
53
 
64
- - `ViewOptionsPanelContent` — the panel. Takes the list's `filters`, `sort`, `group`, `timeScopeConfig`, `dateRangeConfigs`, `toggles` and `layout` (`ViewOptionInputs`; its `sorts` and `filterTree` reach a `CustomizeBody` as its sort and filter), `activePanel` and `onOpenPanel`, `anyActive` and `clearAll`, and optionally `view` (`CollectionViewState`), `foldFilters` (one Filter row, on by default; off, every filter is a root row), `onClose`, `closeButton` (whether its header draws the ✕, default true; false in a sheet whose head draws it, `onClose` still closing it from inside, as a column's Done does), `fill`, `fieldEditor` (`PanelFieldEditor`), and `viewName`, `onRenameView`, `onCopyLink`, `onExport` and `exportCount`, handed on to a `CustomizeBody` as `ToolbarOptions` hands them. Back walks one level: a relation's Where field to its filter, a folded filter to the Filter list, a column to the Columns list, Group's own Group by, Sort and Date by pages to Group (with an app's `GroupBody`, a level it tells goes back to its settings first, its name in the head), anything else to the root. Handed a `GroupBody` in your components map, Group (and its own pages) draws it, handed the group as data; handed a `CustomizeBody`, the whole panel is it, handed the view's settings as data, wherever the panel hangs, except for a list whose filter is only per-field values, with no `filterTree`, which keeps the panel ([the components map](../contract.md#the-components-map)).
65
- - `PopoverRootList` — the root: Layout, Columns (`views.panels.columns-shown`), Filter (or each filter, unfolded), Sort, Group and the toggles, each opening its page through `onOpenPanel`.
66
- - `ViewFooter` — Reset · Save for everyone on a shared view this person has drifted from; a member sees Reset alone, and nothing draws while `changes` is 0. `words: "kit"` says Clear and Save instead. With no `view` and an `onClear`, Clear alone, which takes the list back to its default. `className` replaces its side inset. `ToolbarOptions` and `ViewOptionsPanelContent` take `viewFoot` (`"kit"` for those words, `"none"` for no foot) and `footClear` (the foot's Clear with no shared view).
54
+ - `ViewOptionsPanelContent` — the panel: your `CustomizeBody`, handed the view's settings as data. Takes the list's `filters`, `sort`, `group`, `timeScopeConfig`, `dateRangeConfigs`, `toggles` and `layout` (`ViewOptionInputs`; its `sorts` and `filterTree` reach the body as its sort and filter), `activePanel` and `onOpenPanel` (the body's `page` and `onPageChange`), `anyActive` and `clearAll`, and optionally `view` (`CollectionViewState`), `viewFoot` (the body's `foot`: `kit` for Clear and Save, `none` where they stand elsewhere), `footClear` (with no shared view, the foot's Clear), `foldFilters` (the body's `fields` folded behind one Filter row, on by default; off, each is a row of its own), `onClose` (the body's `onDone`), `closeButton` (whether a phone's body is handed its ✕, default true; false in a sheet whose head draws it), `fieldEditor` (`PanelFieldEditor`), and `viewName`, `onRenameView`, `onCopyLink`, `onExport` and `exportCount`, handed on to the body as `ToolbarOptions` hands them. `fill` is deprecated and read by nothing: the body sizes itself in its host.
67
55
  - `ViewOptionsActions` — the actions row: Copy link and Share parked, Export CSV live when `exportCsv` (`CollectionExportCsv`) is handed in, its count on the row and one export at a time behind the `loading` glyph, which your app draws turning.
68
56
  - `ViewOptionsPopoverPanel` — the panel for a popover: `ViewOptionsPanelContent` with `setActivePanel` for `onOpenPanel`, its `sorts` and `filterTree` handed on; a `CustomizeBody` in your map opens in its place.
69
57
  - `useViewOptionsPopover` — the state the trigger and the popover share (`ViewOptionsPopoverState`): `open`, the page it is on, the trigger's `badge` (the drift from everyone's view on a shared view, else the active options) and its `clearAll` (Reset, else clear them), and `handleOpenChange`, which forgets the page on a close. The trigger's own look is yours.
@@ -144,30 +132,28 @@ Options, Sort and Filter each open their panel from their own button, and each t
144
132
 
145
133
  - `ToolbarOptions` — Customize behind its own button, named and worded `views.panels.toolbar-options`: the builder's `filters`, `sort`, `group` and `layout` (and its `filterTree`, with and/or groups: its count and default Clear then read the advanced filters), your `toggles`, `timeScopeConfig` and `dateRangeConfigs` (a `ViewOptionInputs`), and optionally `view` (a shared view: the drift dot on the button instead of a count, and the panel's footer), `fieldEditor`, `foldFilters` (true by default), `onClear` (the ✕ and the panel's Clear all; by default each active option cleared through its own `onChange`, the builder's filter rows adding up so every filter clears, or Reset on a shared view; for one change, `settingsCleared(…, "options")`), `widthClassName` (`w-75` by default: 300 px, the Pane Customize was designed in), `host`, and what your `CustomizeBody` draws only where you hand it: `viewName` with `onRenameView` (the view's name, renamed in place), `onCopyLink`, and `onExport` with `exportCount` (what it takes, in words). On a phone, while your body stands on a level of its own inside a section (`onStepChange`), the sheet's Escape goes back a level instead of closing. Its button counts the active options (`countActiveViewOptions`) with a ✕ that clears them. Draws nothing when there is nothing to customize. A `CustomizeBody` in your components map opens in place of the panel, in the same popover, `host` or phone `Sheet`.
146
134
  - `ToolbarSort` — the sort panel behind its own button, named `views.panels.sort`: the builder's `sort`, lit (`changed`) while the list sorts other than its default. Draws nothing when nothing sorts. Handed the builder's `sorts` too (with `severalSorts`), it is Sort on the row's right as the kit draws it there: "Sort", counted once there are two rules, opening the fields (`SortFieldList`), a pick adding a rule at the end, ascending; at three it can't be used, saying why (`views.panels.sort-max`).
147
- - `ToolbarSortPill` — the sort as up to 3 rules, the kit's sort on its filter bar, in `data-slot="vk-toolbar-sort-pill"`: takes the builder's `sorts`, and optionally `open` and `onOpenChange` (to hold its state yourself), `host` and `addAfter` (default true). On a computer, "Sorted by" its first rule's field, in weight, with the rest counted (+1), opening the sort editor in your `Popover`; after it a + (`data-slot="vk-toolbar-sort-add"`, named `views.panels.sort-add-one`) while there are fewer than three, opening the fields, a pick adding a rule; with no rule, an empty place, "Sort", opening the fields. Handed `addAfter={false}` (the kit's bar), it draws no +, and its editor, or your `SortBody` (handed `addSort`), has Add sort at its foot. Handed `row`, it is Sort on a toolbar row (`data-slot="vk-toolbar-sort-row"`, as `ReadyToolbar`'s default stands it): its word "Sort", lit while a rule stands and counted from two; however it opens (a press, or ⋯ when it folded) it shows the sort editor, Add sort at its foot, while a rule or a set-aside sort stands, else the fields; it draws no + and `addAfter` means nothing to it. The fields are your `FieldsBody` where you hand one. × on the editor's last rule closes it. On a phone, "Sort" with its rules counted, opening the sort editor in your `Sheet`, its ✕ taking back what changed since it opened and its ✓ keeping it; a swipe, the dim or Escape close it and keep the changes; while your `SortBody` stands on a step of its own (`onStepChange`), Escape goes back a step instead, and under `sheetActions: "head"` your sheet's head shows the step's title. Its popovers, or its sheet, are one of the toolbar's panels.
148
- - `SortEditor` — the sort editor's body alone, for a holder of your own (a popover): `sorts`, `form` (`"computer"` or `"phone"`), and optionally `open`, `onDone` and `addSort`. On a computer each rule (`data-slot="vk-sort-rule"`) is its grip, its field, its direction (Ascending, Descending, your `Menu`) and ×, inside `data-slot="vk-sort-editor"`, with no Add sort unless handed `addSort`: then Add sort (`data-slot="vk-sort-add"`) stands at its foot, after the set-aside sorts, opening the fields in your `Popover`, a pick adding a rule at the end, ascending, and at three, a set-aside sort holding one of the places, it can't be used and says why (`views.panels.sort-max`); on a phone each rule is a row, its direction under its field, a press opening its directions and ⋯ holding Delete, then Add sort (which turns the body to the fields, never a sheet on top; three at most) and Clear all, and "No sorting set up yet" with none. Every change goes out through `sorts.onChange` as it is made. A rule moves by its grip: dragged by the mouse after 8 px or a long press of 250 ms (a phone's row moves by itself), or ↑ and ↓ on its grip, the focus staying on that grip; the grip carries `data-base-ui-swipe-ignore`.
149
- - `useSortEditor` — the sort editor's state for a sheet's holder (`SortEditorOptions`: `sorts`, `form`, `open`, `onDone`, `addSort`): `{ body, head, title, escapeBack }`. `body(closeButton)` draws it, on a phone with its own ✕ and ✓ when `closeButton` is true (no head of your sheet draws them: your provider's `sheetActions` is `bar`, or a host of yours holds it); `head` is the ✕ (named `views.panels.close`) and ✓ (`views.panels.sort-done`) for your sheet's head, as its `actions`. ✕ takes the rules back, in one change, to what they were when `open` last turned true. Handed a `SortBody` in your components map, `SortEditor` and `useSortEditor`'s `body` open it in place of their own rows, in every holder: it is handed the rules as data, its whole list is written once it fits the rules, its `onDone` calls the `onDone` you hand, and on a phone it gets `head` as its `actions` only when `closeButton` is true ([the components map](../contract.md#the-components-map)). On a phone it is also handed `onStepChange`: while it stands on a step of its own, `title` is the step's (your sheet's title in place of the sort's), `head` gains `back` (Back, for `close`'s place), and `escapeBack()` goes back a step and says it did, so your sheet's Escape calls it first and closes only when it returns false.
150
- - `SortEditorOptions` — what `useSortEditor` takes.
151
- - `ToolbarQuickFilters` — the quick filters' button (`data-slot="vk-toolbar-quick"`), named `views.panels.quick-filters` (or the config's `label`), lit (`changed`) while a value is held: takes `quickFilters` (a `QuickFiltersConfig`, [`/panels`](./panels.md#quick-filters)), and optionally `open` and `onOpenChange` (to hold its state yourself), `host`, `icon` (its glyph; the `filterCategory` icon when absent) and `word` (`null`: its icon alone, its name its label to a screen reader, as `ReadyToolbar`'s default draws it on a computer). It opens `QuickFiltersPanel` in your `Popover` (`data-slot="vk-toolbar-quick-panel"`), in `host`, or on a phone in your `Sheet`, and is one of the toolbar's panels. With no field to offer it draws nothing.
152
- - `QuickFiltersPanel` — the quick filters' panel alone, for a holder of your own: `quickFilters`, `form` (`"computer"` or `"phone"`), and optionally `onDone`, `closeButton` (its own ✕; false where your sheet's head draws one) and `fill` (it fills a host, its values scrolling). Handed a `QuickFiltersBody` in your components map, it opens that, handed the fields as the strip shows them (`quickFieldsShown`) with their values as they show (`quickValuesShown`, worded by the config's `heldLabels`) and writing its hold once `quickHoldFits` takes it ([the components map](../contract.md#the-components-map)). Without, it draws its own (`data-slot="vk-quick-filters"`): a header with the panel's name; a strip of the fields (`data-slot="vk-quick-filters-field"`, `aria-pressed` on the open one), then each other field holding a value, named by the config's `heldLabels` (it leaves the strip once its last value is let go, the focus moving to the field open in its place), the first holding a value open first; the open field's values as a list box (`data-slot="vk-quick-filters-value"`, `aria-selected` and `data-chosen` while held), with Show counts the most first and each count drawn and read with its value (`views.panels.quick-value`), a held value no value lists drawn from the hold, worded by the config's `heldLabels` else its key; a press holds a value, and a press on a held one lets it go (with `several`, each press adds or lets go one value); one Tab stop, ↑ ↓ Home End between the values, Enter or Space holding; past eight values a search (`views.panels.quick-search`, or the field's `searchPlaceholder`), ↓ from it reaching the first value and ↑ from the first going back, a search of its own for each field, and "Nothing matches." (`views.panels.quick-none`, `data-slot="vk-quick-filters-none"`) when it finds none; a field with nothing to hold says "Nothing to pick.". At `form: "phone"` (in a phone's Sheet) it carries `data-form="phone"`, its values take the phone sheet's taller rows, and with one value held at a time a press, by touch or by key, holds it and closes the Sheet through `onDone` (`quickPressCloses`); with `several` the Sheet stays open.
135
+ - `ToolbarSortPill` — the sort as up to 3 rules, the kit's sort on its filter bar, in `data-slot="vk-toolbar-sort-pill"`: takes the builder's `sorts`, and optionally `open` and `onOpenChange` (to hold its state yourself), `host` and `addAfter` (default true). On a computer, "Sorted by" its first rule's field, in weight, with the rest counted (+1), opening the sort editor in your `Popover`; after it a + (`data-slot="vk-toolbar-sort-add"`, named `views.panels.sort-add-one`) while there are fewer than three, opening the fields, a pick adding a rule; with no rule, an empty place, "Sort", opening the fields. Handed `addAfter={false}` (the kit's bar), it draws no +, and its editor, or your `SortBody` (handed `addSort`), has Add sort at its foot. Handed `row`, it is Sort on a toolbar row (`data-slot="vk-toolbar-sort-row"`, as `ReadyToolbar`'s default stands it): its word "Sort", lit while a rule stands and counted from two; however it opens (a press, or ⋯ when it folded) it shows the sort editor, Add sort at its foot, while a rule or a set-aside sort stands, else the fields; it draws no + and `addAfter` means nothing to it. The fields are your `FieldsBody`. × on the editor's last rule closes it. On a phone, "Sort" with its rules counted, opening the sort editor in your `Sheet`, its ✕ taking back what changed since it opened and its ✓ keeping it; a swipe, the dim or Escape close it and keep the changes; while your `SortBody` stands on a step of its own (`onStepChange`), Escape goes back a step instead, and under `sheetActions: "head"` your sheet's head shows the step's title. Its popovers, or its sheet, are one of the toolbar's panels.
136
+ - `SortEditorHost` — the host of your sort body alone, for a holder of your own (a popover; ViewKit's own body is `SortEditor`, on `viewkitjs/views/controls`): `sorts`, `form` (`"computer"` or `"phone"`), and optionally `open`, `onDone` and `addSort` (Add sort at a computer's body's foot, for a holder with no + of its own). It opens your `SortBody` (`CONTROLS.SortBody` is ViewKit's own), handed the rules as data, its whole list written once it fits the rules; every change goes out through `sorts.onChange` as it is made.
137
+ - `useSortEditorHost` — the sort editor's state for a sheet's holder (`SortEditorOptions`: `sorts`, `form`, `open`, `onDone`, `addSort`): `{ body, head, title, escapeBack }`. `body(closeButton)` draws your `SortBody`, on a phone handed `head` as its `actions` when `closeButton` is true (no head of your sheet draws them: your provider's `sheetActions` is `bar`, or a host of yours holds it); `head` is the ✕ (named `views.panels.close`) and ✓ (`views.panels.sort-done`) for your sheet's head, as its `actions`. ✕ takes the rules back, in one change, to what they were when `open` last turned true; the body's `onDone` calls the `onDone` you hand ([the components map](../contract.md#the-components-map)). On a phone the body is also handed `onStepChange`: while it stands on a step of its own, `title` is the step's (your sheet's title in place of the sort's), `head` gains `back` (Back, for `close`'s place), and `escapeBack()` goes back a step and says it did, so your sheet's Escape calls it first and closes only when it returns false.
138
+ - `SortEditorOptions` — what `useSortEditorHost` takes.
139
+ - `ToolbarQuickFilters` — the quick filters' button (`data-slot="vk-toolbar-quick"`), named `views.panels.quick-filters` (or the config's `label`), lit (`changed`) while a value is held: takes `quickFilters` (a `QuickFiltersConfig`, [`/panels`](./panels.md#quick-filters)), and optionally `open` and `onOpenChange` (to hold its state yourself), `host`, `icon` (its glyph; the `filterCategory` icon when absent) and `word` (`null`: its icon alone, its name its label to a screen reader, as `ReadyToolbar`'s default draws it on a computer). It opens your `QuickFiltersBody` (through `QuickFiltersPanel`) in your `Popover` (`data-slot="vk-toolbar-quick-panel"`), in `host`, or on a phone in your `Sheet`, and is one of the toolbar's panels. With no field to offer it draws nothing.
140
+ - `QuickFiltersPanel` — the quick filters' panel alone, for a holder of your own: `quickFilters`, `form` (`"computer"` or `"phone"`), and optionally `onDone` and `closeButton` (false where your sheet's head draws the ✕). It opens your `QuickFiltersBody` (`CONTROLS.QuickFiltersBody` is ViewKit's own), handed the fields as the strip shows them (`quickFieldsShown`) with their values as they show (`quickValuesShown`, worded by the config's `heldLabels`), and writes its hold once `quickHoldFits` takes it; on a phone the body gets the ✕ as its `actions` when `closeButton` is true ([the components map](../contract.md#the-components-map)).
153
141
  - `QuickFiltersReminder` — on a phone, the reminder that a hold stands while the quick filters are closed: takes `quickFilters` (the same `QuickFiltersConfig`), `onOpen` (a press on its names: open the quick filters, whose open state you hold through `ToolbarQuickFilters`' `open`, or `ReadyToolbar`'s `quickFiltersOpen`) and optionally `hidden` (it steps aside: hand whether rows are selected or the quick filters are open, so it never stands with your selection bar or over the open quick filters), and `holder` (a ref to your list's box: leaving with the focus in it, by its ✕ or by stepping aside as the quick filters open, it hands the focus there, giving a box that takes no focus `tabindex="-1"`, so the focus never falls to the page and a sheet opened from its names hands it back into the box; with none, the focus goes where the browser drops it; it never searches the page for one). Place it once at your list's foot. It is portalled to the body where the selection bar's phone pill stands (the provider's `selectionBar.phone`: its `bottom`, `zIndex` and `className`), a pill (`data-slot="vk-quick-filters-reminder"`) holding the held values' names, each by its words and never its key (`quickHeldNames`), the first two and "+N" for the rest (`quickReminderWords`, `views.panels.quick-more`), a press on them (`data-slot="vk-quick-filters-reminder-open"`, named `views.panels.quick-reminder` with every name once) calling `onOpen`; then ✕ (`data-slot="vk-quick-filters-reminder-clear"`, `views.panels.quick-clear`), letting every hold go. It draws nothing on a computer, while nothing is held, or while `hidden`. An app that wears its own reminder places that one instead, fed by `quickHeldNames`.
154
- - `SortFieldList` — the fields a rule is picked from (`data-slot="vk-sort-fields"`): `sorts`, `onPick`, and optionally `own` (a rule whose field it changes, ticked), `onDone` (done with no pick) and `form`. A field already sorted, but `own`, is greyed and says "Sorted"; a search past eight. Handed a `FieldsBody` in your components map, it opens that in place of its rows, in every holder, handed the options as data, each marked as the grid's header marks its column, a sorted one `disabled` with why; a pick of a key it didn't offer, or offered disabled, writes nothing ([the components map](../contract.md#the-components-map)).
142
+ - `SortFieldList` — the fields a rule is picked from: `sorts`, `onPick`, and optionally `own` (a rule whose field it changes), `onDone` (done with no pick) and `form`. It opens your `FieldsBody` (`CONTROLS.FieldsBody` is ViewKit's own), in every holder, handed the options as data, each marked as the grid's header marks its column, a field already sorted, but `own`, `disabled` with why ("Sorted"); a pick of a key it didn't offer, or offered disabled, writes nothing ([the components map](../contract.md#the-components-map)).
155
143
  - `ToolbarAdvancedFilters` — the advanced filters' pills, with and/or groups (`data-slot="vk-toolbar-advanced-filter"`): takes the builder's `filterTree`, and optionally `host`. One pill for each advanced filter (each group at the filter's top, or the whole of a top joined by Or), "Advanced filter" with its rules counted (one whose rules are all set aside drawn set aside instead, the button's `aside` with no count, naming why in your `Tooltip`: `views.panels.advanced-filter-set-aside`), its words kept however tight the row, opening the filter editor on its own rules in your `Popover` (`data-slot="vk-toolbar-advanced-filter-panel"`) or in `host`. A pill whose filter empties leaves the row; the others keep their own state. Each is one of the toolbar's panels; in a folding line its place carries `data-open` while it is open, so the line holds still. On a phone it draws nothing.
156
- - `ToolbarFilters` — each filter on a filter bar, as the kit's draws them (`data-slot="vk-toolbar-filters"`): takes the builder's `filterTree` (with `filterGroups`), and optionally `open` and `onOpenChange` (whether Filter and + list the fields: hold it to open them from ⋯), `held` and `onHeldChange` (the rule held until whole: hold it to count it as the bar folds) and `host`. Every filter at the view's own level, in its order: a filter as four joined parts (`data-slot="vk-toolbar-filter-rule"`, named by its sentence), its field, how it compares in lower case, its value (capped at 240 and cut with "…", saying what it waits for until it is picked) and ⋯ (Convert to advanced filter, Delete filter), each opening its own list; a related record's field drawn as one ("Company › Industry"); an advanced filter as its pill (`ToolbarAdvancedFilters`'); then + (`data-slot="vk-toolbar-filter-add"`, `views.panels.filter-add-one`). Filter, + and a filter's field open your `FieldsBody` where you hand one, its way and value your `FilterPartBody` ([the components map](../contract.md#the-components-map)); their lists show a column the list can't filter greyed with its reason, in its place, never picked (`filterTree.listed`). A filter whose one value is a key your app hasn't named (a person after a reload) asks that field's `onValuesWanted` once (a related record's field, `farValues.onWanted`), and draws the name once you hand the value in `knownValues` and its name in `knownLabels`. While nothing filters and nothing is held, Filter, an empty place (`data-slot="vk-toolbar-filter"`); handed `emptyPlace={false}`, where Filter stands on the row (`ToolbarFilterAdd`), nothing at all until a filter is set or held. Filter and + open the fields; a pick adds a filter at the end (`addOnBar`, wrapping a top joined by Or into one advanced filter first), a related record's field among them, waiting for its value, or, for a yes/no, the list's own or a related record's, holds it on the bar saying what it waits for, writing nothing until its value is picked; where nothing more can be added they are disabled with why (`barAddRefusal`). In a folding line its last filters fold into "+N filters" (`data-slot="vk-toolbar-more-filters"`, as its slot's `filtersFolded` says), which names each and opens what a pick opens under itself; a held rule, the filter it stands in place of and a filter with a part open never fold. Each filter and "+N filters"' menu is one of the toolbar's panels. Delete filter and Convert move the focus to what stands after the filter: the next filter, "+N filters", + or Filter, or, where Filter stands on the row's right and nothing is left on the bar, that Filter (`ToolbarFilterAdd`). An app placing it in a `Toolbar` of its own places it with `filters: foldableFilters(…)` and never with `shed` while a filter stands: its parts read the slot's `iconAlone`, and would draw no words. A held rule is compared with the tree as written, so your `filterTree.onChange` must hand the tree back unchanged (the same keys in the same order), or the held rule counts as dropped by a write from elsewhere. On a phone it draws nothing.
144
+ - `ToolbarFilters` — each filter on a filter bar, as the kit's draws them (`data-slot="vk-toolbar-filters"`): takes the builder's `filterTree` (with `filterGroups`), and optionally `open` and `onOpenChange` (whether Filter and + list the fields: hold it to open them from ⋯), `held` and `onHeldChange` (the rule held until whole: hold it to count it as the bar folds) and `host`. Every filter at the view's own level, in its order: a filter as four joined parts (`data-slot="vk-toolbar-filter-rule"`, named by its sentence), its field, how it compares in lower case, its value (capped at 240 and cut with "…", saying what it waits for until it is picked) and ⋯ (Convert to advanced filter, Delete filter), each opening its own list; a related record's field drawn as one ("Company › Industry"); an advanced filter as its pill (`ToolbarAdvancedFilters`'); then + (`data-slot="vk-toolbar-filter-add"`, `views.panels.filter-add-one`). Filter, + and a filter's field open your `FieldsBody`, its way and value your `FilterPartBody` ([the components map](../contract.md#the-components-map)); their lists show a column the list can't filter greyed with its reason, in its place, never picked (`filterTree.listed`). A filter whose one value is a key your app hasn't named (a person after a reload) asks that field's `onValuesWanted` once (a related record's field, `farValues.onWanted`), and draws the name once you hand the value in `knownValues` and its name in `knownLabels`. While nothing filters and nothing is held, Filter, an empty place (`data-slot="vk-toolbar-filter"`); handed `emptyPlace={false}`, where Filter stands on the row (`ToolbarFilterAdd`), nothing at all until a filter is set or held. Filter and + open the fields; a pick adds a filter at the end (`addOnBar`, wrapping a top joined by Or into one advanced filter first), a related record's field among them, waiting for its value, or, for a yes/no, the list's own or a related record's, holds it on the bar saying what it waits for, writing nothing until its value is picked; where nothing more can be added they are disabled with why (`barAddRefusal`). In a folding line its last filters fold into "+N filters" (`data-slot="vk-toolbar-more-filters"`, as its slot's `filtersFolded` says), which names each and opens what a pick opens under itself; a held rule, the filter it stands in place of and a filter with a part open never fold. Each filter and "+N filters"' menu is one of the toolbar's panels. Delete filter and Convert move the focus to what stands after the filter: the next filter, "+N filters", + or Filter, or, where Filter stands on the row's right and nothing is left on the bar, that Filter (`ToolbarFilterAdd`). An app placing it in a `Toolbar` of its own places it with `filters: foldableFilters(…)` and never with `shed` while a filter stands: its parts read the slot's `iconAlone`, and would draw no words. A held rule is compared with the tree as written, so your `filterTree.onChange` must hand the tree back unchanged (the same keys in the same order), or the held rule counts as dropped by a write from elsewhere. On a phone it draws nothing.
157
145
  - `foldableFilters` — how many of the bar's filters may fold, for its placement's `filters`: `(tree, held)`, the tree's top-level items less the one a held rule stands in place of; a held rule no longer standing (`held`'s tree changed by a write from elsewhere) counts as gone.
158
- - `ToolbarFilterAdd` — Filter on a toolbar row's right (`data-slot="vk-toolbar-filter-add-row"`, named `views.panels.filter`), as `ReadyToolbar` stands it by default: takes the builder's `filterTree`, and optionally `onHeldChange` (hand the toolbar's held rule's writer, the one you hand `ToolbarFilters`, so a yes/no it holds stands on the bar), `open` and `onOpenChange`, and `host`. It opens the fields as Filter on the bar does (your `FieldsBody` where you hand one), and a pick adds a filter at the bar's end and opens nothing else, or holds a yes/no until its value is picked, which `ToolbarFilters` takes in as its own; where nothing more can be added it is disabled with why. It is one of the toolbar's panels. On a phone, or with no fields, it draws nothing.
146
+ - `ToolbarFilterAdd` — Filter on a toolbar row's right (`data-slot="vk-toolbar-filter-add-row"`, named `views.panels.filter`), as `ReadyToolbar` stands it by default: takes the builder's `filterTree`, and optionally `onHeldChange` (hand the toolbar's held rule's writer, the one you hand `ToolbarFilters`, so a yes/no it holds stands on the bar), `open` and `onOpenChange`, and `host`. It opens the fields as Filter on the bar does (your `FieldsBody`), and a pick adds a filter at the bar's end and opens nothing else, or holds a yes/no until its value is picked, which `ToolbarFilters` takes in as its own; where nothing more can be added it is disabled with why. It is one of the toolbar's panels. On a phone, or with no fields, it draws nothing.
159
147
  - `Pending` — the rule held until whole, as `ToolbarFilters` hands it to `onHeldChange`: its `container`, its `node`, the filter it `replaces`, and what it was held `over`.
160
- - `FilterEditor` — the filter editor on a computer (`data-slot="vk-filter-editor"`): `filterTree`, `at` (the advanced filter's path: a group's, or `[]` for a top joined by Or), and optionally `onDone` (its filter emptied, Clear all filters) and `onRemoved` (a delete took a node away: the outermost that went). Each rule (`data-slot="vk-filter-rule"`) is Where or its level's join, its field, how it compares and its value, each a box of your `Button` opening its list, then ⋮ (Convert to group where it stays within 3 levels, Delete condition); the second rule's join is a button turning every join at its level. A group (`data-slot="vk-filter-group"`) stands on its own ground with its level, Add filter, Delete group and ⋮ (Exclude matches, on a group joined by And; an excluded group is headed "Not all of these" and its join reads And). A relation rule (`data-slot="vk-filter-relation"`) is a block, its relation and Any, None or Every where, its rules on the far fields inside. Add filter opens the fields; a pick adds a rule and opens its value; a far field makes a relation block, written the same way and waiting for its far value; a yes/no, the list's own or a far one, is held in the editor until its value is picked. Each value opens its type's own body with its operator left out (`FilterValueBody`); its box says the value alone, as the bar's value part does, or, until it is whole, what it waits for by its type ("Type a value", "Type a number", "Choose a date", "Choose"). The first edit in a top joined by Or wraps it into one advanced filter. At a top-level relation rule (`at` `[i]`) it edits the relation wrapped in a group of its own; where that would pass 3 levels, it edits the relation in place: its relation and Any, None or Every where head the editor, and its rules and Add filter name the relation's far fields. Every change goes out through `filterTree.onChange` as it is made. Handed a `FilterBody` in your components map, `FilterEditor`, `PhoneFilterEditor` and `usePhoneFilterEditor`'s `body` open it in place of their own rows, in every holder: it is handed the level they stand on as data, its whole level is written once it fits the rules, its `onDone` calls the `onDone` you hand, and on a phone it gets `head` as its `actions` only when `closeButton` is true ([the components map](../contract.md#the-components-map)). Handed a `FilterPartBody` in your components map, a rule's way and value open it in place of its ways menu and value body, never inside a `FilterBody`'s `ruleValue`; its field lists open your `FieldsBody` where you hand one.
161
- - `usePhoneFilterEditor` — the filter editor on a phone, for a sheet's holder (`filterTree`, `open`, `onDone`): `{ body, head }`, as `useSortEditor`'s. `body(closeButton)` draws it on every rule of the view, with its own ✕ and ✓ when `closeButton` is true; `head` is the ✕ (`views.panels.close`) and ✓ (`views.panels.filter-done`) for your sheet's head. Each rule is Where or its join over its boxes, then ⋯ (Convert to group, Delete condition); a group stands on its own ground with Add filter, Delete group and ⋯ (Exclude matches). Each box's list (the field, how it compares, the value), a relation's Any, None or Every and Add filter's fields turn the body behind a back row, never a sheet on top. With no rule it reads `views.panels.filter-empty` and `views.panels.filter-empty-line`, with Add filter; Clear all (`views.panels.filter-clear-all`) empties it and keeps it open. It edits the whole tree in place (`editWhole`). ✕ takes the tree back, in one change, to what it was when `open` last turned true, and drops any write that lands after it (a box writing what was typed as the sheet closes) until `open` turns true again, so close the sheet on its `onDone`; ✓, and your sheet's swipe, dim and Escape, keep it, a value typed just before included. A held rule (a yes/no, the list's own or a relation block's) written from its value page is followed there when your `filterTree.onChange` reaches the tree in the same event, as `useListSettingsState` does; written a render later, the page turns back to the rules.
162
- - `PhoneFilterEditor` — the body `usePhoneFilterEditor` draws: `filterTree`, `head` (the ✕ and ✓ it draws in its own head, or null where your sheet's head draws them), and optionally `onDone` (what an app's own `FilterBody` calls when its job is done). Handed a `FilterPartBody` in your components map, a rule's way and value open it in place of its ways menu and value body, never inside a `FilterBody`'s `ruleValue`; its field lists open your `FieldsBody` where you hand one.
163
- - `FilterFieldList` — the fields a rule names (`data-slot="vk-filter-fields"`): `fields`, `onPick(field, far?)`, and optionally `own` (ticked) and `relations` (false leaves a relation's far fields out). The list's own fields, then under Related records each relation, which turns the list to its far fields behind a back row; a search past eight. It takes `onDone` (done with no pick) and `form` too: handed a `FieldsBody` in your components map, it opens that in place of its rows, in every holder, handed the list's own fields and, where `relations`, each relation with its `far` fields, each marked as the grid's header marks its column; a pick of a key it didn't offer writes nothing ([the components map](../contract.md#the-components-map)).
148
+ - `FilterEditorHost` — the host of your filter body on a computer (ViewKit's own body is `FilterEditor`, on `viewkitjs/views/controls`): `filterTree`, `at` (the advanced filter's path: a group's, or `[]` for a top joined by Or), and optionally `onDone` (its filter emptied) and `onRemoved` (a delete took a node away: the outermost that went). It opens your `FilterBody` (`CONTROLS.FilterBody` is ViewKit's own), handed the level it stands on as data, its whole level written once it fits the rules, its `onDone` calling the `onDone` you hand ([the components map](../contract.md#the-components-map)). The first edit in a top joined by Or wraps it into one advanced filter. At a top-level relation rule (`at` `[i]`) it edits the relation wrapped in a group of its own; where that would pass 3 levels, it edits the relation in place, the body handed the relation. Every change goes out through `filterTree.onChange` as it is made.
149
+ - `FilterFieldList` — the fields a rule names: `fields`, `onPick(field, far?)`, and optionally `own`, `relations` (false leaves a relation's far fields out), `onDone` (done with no pick) and `form`. It opens your `FieldsBody` (`CONTROLS.FieldsBody` is ViewKit's own), in every holder, handed the list's own fields and, where `relations`, each relation with its `far` fields, each marked as the grid's header marks its column; a pick of a key it didn't offer, or a column the list can't filter, writes nothing ([the components map](../contract.md#the-components-map)).
164
150
  - `FilterValueBody` — a rule's value alone: a text, number or range filter's box without its operator rows, a date's boxes and month without its operator's menu, a choice's options.
165
- - `ToolbarFilter` — the filter list and its drill-ins behind its own button, named `views.panels.filter`: the builder's `filters`, and optionally `timeScopeConfig`, `dateRangeConfigs` and `onClear` (by default every applied filter cleared through the builder's rows, which add up, the last change clearing them all; for one change, `settingsCleared(…, "filters")`). Its button counts what is applied (`countActiveFilters`) with a ✕. Draws nothing with nothing to filter. Handed the builder's `filterTree` (with `filterGroups`), on a phone it opens the filter editor on every rule in your `Sheet` (`usePhoneFilterEditor`), its ✕ and ✓ handed to the sheet's head, and its count and ✕ read the advanced filters too; the time range and date ranges aren't drawn there. On a computer `filterTree` changes nothing. On a toolbar's filter bar (the fold arrangement's line 2) it shows its word, an empty place until something is filtered.
151
+ - `ToolbarFilter` — the filter list and its drill-ins behind its own button, named `views.panels.filter`: the builder's `filters`, and optionally `timeScopeConfig`, `dateRangeConfigs` and `onClear` (by default every applied filter cleared through the builder's rows, which add up, the last change clearing them all; for one change, `settingsCleared(…, "filters")`). Its button counts what is applied (`countActiveFilters`) with a ✕. Draws nothing with nothing to filter. Handed the builder's `filterTree` (with `filterGroups`), on a phone it opens your `FilterBody` on every rule in your `Sheet`, its ✕ and ✓ handed to the sheet's head, and its count and ✕ read the advanced filters too; the time range and date ranges aren't drawn there. On a computer `filterTree` changes nothing. On a toolbar's filter bar (the fold arrangement's line 2) it shows its word, an empty place until something is filtered.
166
152
  - `ToolbarPanelHost` — a host for a panel part: a component taking `open`, `onOpenChange`, `title` (the part's name), `opener` (a ref to the part's button, the one the `Popover` would hang at, ⋯ while the part is folded into it) and the panel as `children`. The host gives `opener` the focus back as it closes from inside (Escape, its own close); ViewKit gives it back on the panel's own ✕, once the host has closed. Read `opener` as you open or close, never while drawing.
167
153
  - `useToolbarPanelState` — a panel part's state for your app to hold (`ToolbarPanelState`): `open`, `onOpenChange`, `page` and `onPageChange`; closing forgets the page.
168
154
  - `ToolbarPanelState` — what `useToolbarPanelState` returns.
169
155
  - `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`.
170
- - `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), 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, ViewKit's own buttons or your `Button` with `panelButtons` at `button`.
156
+ - `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), 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`.
171
157
  - `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 }`), `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) 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. Sort holds the sort (`ToolbarSortPill`'s `row`): lit while one stands (a view's saved sort included), 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`) adds a filter to the bar. Under the row the filter bar, a step smaller, is the filters' line: it comes only while a filter stands or is held (or one of its parts is open, or a second axis of views stands there), holding the filters (each as below, + after the last, no empty Filter) and Clear and Save at its end. While it doesn't stand, an unsaved change (a sort, a removed last filter) waits in Customize's foot, Clear and Save (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 holds its panels' state 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`).
172
158
  - `ReadyToolbarProps` — what `ReadyToolbar` takes.
173
159
  - `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`. Each change is applied to the latest settings (`applySettingsChange`), each patch merged into the latest layer.
@@ -7,18 +7,16 @@ Import from `viewkitjs/views/react` in a client component: the door opens with t
7
7
  Guide: [the provider](../guides/the-provider.md).
8
8
 
9
9
  - `ViewsProvider` — the provider every view reads: mount it once at your app's client root, above every view, with its components, icons, ports and conventions. It lays your atoms over the defaults, hands your `Menu` its items with every row under a disabled group already disabled, and fills in the browser's own confirm where your ports carry no `confirm`. It hands its views one context value per distinct set of inputs, so pass module-level objects: a new one on each render re-renders every view.
10
- - `ViewsProviderProps` — what the provider takes. Its optional `desktopQuery` is the media query that means a desktop, so an editor opens as a popover there and as a sheet elsewhere, the default controls take their phone form below it (`PhoneLine`), as do the toolbar's panels and the views picker outside a `Toolbar`, and the grid's own chrome takes its desktop form there (the grid's frame carries `data-desktop`); hand in the one your own shell switches on. Default `DEFAULT_DESKTOP_QUERY`. Its optional `sheetActions` (`ViewsSheetActionsPlace`, default `bar`) says where an editor's ✕ and ✓, and a toolbar panel's ✕, stand in that sheet. Its optional `escape` (`ViewsEscapeRules`) says what Escape does in an editor of each field type on a desktop, `"keep"` or `"cancel"`, a type left out cancelling. Its optional `sayRefusals` (default false) has the grid say, through the toast port's `error`, why your app refused an edit it sent. Its optional `menus` (`ViewsMenuRoute`, default `popover`) says how the grid opens its own menus: in your `Popover` with ViewKit's rows, or through your `Menu`. Its optional `gridButtons` (`ViewsGridButtons`, default `own`) says who draws the buttons the grid draws itself: ViewKit, or your `Button`. Its optional `gridCheckboxes` (`ViewsGridCheckboxes`, default `own`) says who draws a yes/no cell's box in the grid: ViewKit's tick box, or your `Checkbox`. Its optional `fieldRowButtons` (`ViewsFieldRowButtons`, default `own`) and `fieldRowCheckboxes` (`ViewsFieldRowCheckboxes`, default `own`) say the same for a field row's own buttons and its yes/no. Its optional `panelButtons` (`ViewsPanelButtons`, default `own`) says who draws the buttons the toolbar's panels, the search's ✕ and the views row draw themselves: ViewKit, or your `Button`. Its optional `selectionBar` (`ViewsSelectionBarSettings`) says where the selection bar sits. Its optional `oneValue` (`ViewsOneValueEditors`) says whether a single email or domain opens the text box in its cell (the default) or the value list holding one value, in the grid and a field row alike. Its optional `bodyFrame` (`ViewsBodyFrame`, default `views`) says who sets the width and padding of the popover around a whole body your app hands: ViewKit, or, at `popover`, your `Popover`, the popover marked `data-vk-body`. Its optional `gridBodyPlace` (`ViewsGridBodyPlace`, default `under`) says whether a grid editor opens the popover around a body your app hands under the cell or over it. Its optional `datePicks` (`ViewsDatePicks`) names the quick days the date editors offer, in order; absent, today, tomorrow and next Monday. Its optional `now` (a `Date`) is the moment every date counts from; absent, the provider reads the clock after mount, then once a minute and when the tab comes back into view, never while rendering, and a date that needs it draws its full form until the first read.
10
+ - `ViewsProviderProps` — what the provider takes. Its optional `desktopQuery` is the media query that means a desktop, so an editor opens as a popover there and as a sheet elsewhere, the default controls take their phone form below it (`PhoneLine`), as do the toolbar's panels and the views picker outside a `Toolbar`, and the grid's own chrome takes its desktop form there (the grid's frame carries `data-desktop`); hand in the one your own shell switches on. Default `DEFAULT_DESKTOP_QUERY`. Its optional `sheetActions` (`ViewsSheetActionsPlace`, default `bar`) says where an editor's ✕ and ✓, and a toolbar panel's ✕, stand in that sheet. Its optional `escape` (`ViewsEscapeRules`) says what Escape does in an editor of each field type on a desktop, `"keep"` or `"cancel"`, a type left out cancelling. Its optional `selectionBar` (`ViewsSelectionBarSettings`) says where the selection bar sits. Its optional `oneValue` (`ViewsOneValueEditors`) says whether a single email or domain opens the text box in its cell (the default) or the value list holding one value, in the grid and a field row alike. Its optional `datePicks` (`ViewsDatePicks`) names the quick days the date editors offer, in order; absent, today, tomorrow and next Monday. Its optional `now` (a `Date`) is the moment every date counts from; absent, the provider reads the clock after mount, then once a minute and when the tab comes back into view, never while rendering, and a date that needs it draws its full form until the first read.
11
11
  - `EditEscape` — `"cancel" | "keep"`: what Escape does in an edit session (`viewkitjs/views/editors/session` hands it on too).
12
12
  - `ViewsEscapeRules` — the provider's `escape`: an `EditEscape` per field type, and for `email`, `phone`, `url` and `domain` either one `EditEscape`, which covers both of their editors, or an `EditEscapeByEditor`.
13
13
  - `EditEscapeByEditor` — `{ box?: EditEscape; list?: EditEscape }`: what Escape does in an email, phone, link or domain field by the editor it opens, `box` its text box (a single value) and `list` the value list (several values, or a single one `oneValue` opens as a list of one). One left out throws the edit away.
14
14
  - `ViewsOneValueEditors` — `Partial<Record<"email" | "domain", "text" | "list">>`, the provider's `oneValue`.
15
- - `ViewsBodyFrame` — `"views" | "popover"`, the provider's `bodyFrame`.
16
- - `ViewsGridBodyPlace` — `"under" | "over"`, the provider's `gridBodyPlace`.
17
15
  - `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
16
  - Required: `components` (your primitives, `ViewsComponents`), `icons` (your glyphs by meaning, `ViewsIcons`), `ports` (your runtime services, `ViewsPorts`), `conventions` (the `FieldConventions` of `viewkitjs/fields` every value is read with) and `children`.
19
17
  - Optional: `atoms`, any of your own atoms, each laid over the default of its name; `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.
20
18
  - `useViews` — reads the nearest provider's value inside a view or an atom of your own. It throws an error that says where to mount one when no `ViewsProvider` is above it.
21
- - `ViewsContextValue` — what `useViews` returns: the `components` (your `Menu` wrapped to settle disabled groups), the merged `atoms`, the `icons`, the `ports` as `ViewsResolvedPorts` (`confirm` always a function), the `messages` resolver, the `conventions`, your `presentation` when you handed one, and the `desktopQuery` in force (yours or `DEFAULT_DESKTOP_QUERY`); `escape`, `oneValue` and `sayRefusals` when you handed them; and `menus`, how the grid opens its own menus (absent means `popover`); `gridButtons`, who draws the grid's own buttons (absent means `own`); `gridCheckboxes`, who draws a yes/no cell's box (absent means `own`); `fieldRowButtons` and `fieldRowCheckboxes`, the same for a field row (absent means `own`); `panelButtons`, who draws the panels' own buttons (absent means `own`); `selectionBar` and `datePicks` when you handed them. The provider's moment (`now`) isn't in it: what draws a date reads it, so a new moment redraws only those.
19
+ - `ViewsContextValue` — what `useViews` returns: the `components` (your `Menu` wrapped to settle disabled groups), the merged `atoms`, the `icons`, the `ports` as `ViewsResolvedPorts` (`confirm` always a function), the `messages` resolver, the `conventions`, your `presentation` when you handed one, and the `desktopQuery` in force (yours or `DEFAULT_DESKTOP_QUERY`); `escape` and `oneValue` when you handed them; `selectionBar` and `datePicks` when you handed them. The provider's moment (`now`) isn't in it: what draws a date reads it, so a new moment redraws only those.
22
20
  - `NOOP_PORTS` — ports that do nothing, for a server render, a test or an app without a device: the toasts and haptics are empty, the clipboard writes nothing (resolving `false`) and reads `null`, and the prefs store keeps nothing. It carries no `confirm`, so the provider falls back to `PortsHost`'s or the browser's.
23
21
  - `NOOP_TOAST` — the toast that draws nothing, `NOOP_PORTS`' own: what `useViews().ports.toast` is where an app hands no toast and no `PortsHost` stands.
24
22
 
@@ -26,9 +24,9 @@ Guide: [the provider](../guides/the-provider.md).
26
24
 
27
25
  The primitives your app hands in, modelled on Base UI's shapes: a controlled `open` with `onOpenChange(open, details)`, an `anchor` rather than a trigger child on the popover and the menu, and no `asChild`. An adapter on Base UI wraps its copies thinly; one on Radix absorbs the difference. The package ships none of them and depends on neither library. The [contract](../contract.md) says what each slot promises and how to write an adapter.
28
26
 
29
- - `ViewsComponents` — the map itself, one key per name of the contract's components: `Button`, `Popover`, `Tooltip`, `Checkbox`, `Menu`, `Collapse`, `Sheet`, `AppIcon` and `Markdown`. `AppIcon` is your own icon component, taking `name` and `className`, for the glyphs a host declares (a row's icon, a binding's icon); it draws on the first paint, because rows are measured as they mount, so map its names from a static record. `Markdown` is your markdown renderer, handed the stored text whole as `source`; the package parses no markdown itself. Twenty keys are optional: `Input` (leave it out and the editors draw a plain `<input>`), `Command` (the command list's parts; a list reached without one throws an error naming it; with `Picker` and `menus: "menu"`, none is needed), `Picker` (a whole pick list your app draws; leave it out and the select, several-values, place and relation editors draw from `Command`), `LinksBody` (a whole links body your app draws; handed one, the set editor of a relation whose field declares `links` opens it, handed each link's roles, the lead and the field's roles), `Calendar` (the date editor's month and the filter panel's; reached without one, it throws an error naming it; handed `DateBody`, the date editor never reaches it; `CONTROLS.Calendar` is ViewKit's), `DateBody` (a whole date body your app draws; handed one, the date editor opens it) `PartsBody` (a whole body for a field made of parts; handed one, the name, place and range editors open it), `ValuesBody` (a whole body for several emails, phones, links or domains; handed one, the value list editor opens it), `TextBody` (a whole body for a text typed as one string; handed one, the text editors open it) `NumberBody` (a whole body for a number, money or a percent; handed one, the number editors open it) `SortBody` (the sort editor's whole body; handed one, the sort pill opens it on a computer and in the phone's Sheet) `FilterBody` (the filter editor's whole body; handed one, an advanced filter's pill opens it on a computer and Filter in the phone's Sheet), `FieldsBody` (the field list's whole body; handed one, every sort and filter field list ViewKit opens opens it), `FilterPartBody` (a filter rule's way and value; handed one, they open it on the bar and in ViewKit's own filter editor), `RowsWait` (wraps a grid's rows; handed one, a grid that already shows rows keeps them, inert, as its children while new ones load, its column names and footer outside; left out, the grid draws Loading in place of its body), `QuickFiltersBody` (the quick filters' whole body; handed one, the quick filters' button opens it on a computer and in the phone's Sheet) `ViewsListBody` (the views list's whole body; handed one, the view picker's chip opens it on a computer and in the phone's Sheet), `GroupBody` (the group editor's whole body; handed one, Customize's Group opens it on a computer and in the phone's Sheet), `CustomizeBody` (Customize's whole body; handed one, Options and everything else that draws ViewKit's Customize open it on a computer and in the phone's Sheet) and `SearchField` (the toolbar's search box; handed one, the search opens it in place of its own field on a computer and on a phone).
30
- - `ViewsResolvedComponents` — the map as `useViews()` hands it on: yours, with `Input` always there, your own or the plain one, and `Command` and `Calendar` always there, yours or a stand-in that throws an error naming the slot when it is reached.
31
- - `ViewsButtonProps` — a button: its `children`, `onClick`, `disabled`, a `variant` (`default`, `secondary`, `ghost`, `outline`, `destructive`; `secondary` only for the views picker's chip, when the provider's `panelButtons` is `button`), a `size` (`default`, `sm`, `icon`), its `type`, a class, `aria-label` and `title`; and a `ref`, `tabIndex`, `aria-haspopup`, `aria-expanded`, `data-slot` and `data-open`, which the grid hands its own buttons when the provider's `gridButtons` is `button`: forward each to your element; and `aria-disabled`, which a field row's edit target is handed while its write is pending when the provider's `fieldRowButtons` is `button`; and `aria-pressed`, `role`, `aria-selected`, `data-state` and `data-vs-row`, which the panels' own buttons are handed when the provider's `panelButtons` is `button` (the new-line mark, a view's row in the picker, the views row's chips and a view's ⋯, Export).
27
+ - `ViewsComponents` — the map itself, one key per name of the contract's components: `Button`, `Popover`, `Tooltip`, `Checkbox`, `Menu`, `Collapse`, `Sheet`, `AppIcon`, `Markdown`, `TextBody` (a whole body for a text typed as one string: the text editors open it; `CONTROLS.TextBody` is ViewKit's), `NumberBody` (a whole body for a number, money or a percent: the number editors open it, a duration excepted; `CONTROLS.NumberBody` is ViewKit's), `Picker` (a whole pick list: the select, several-values and relation editors open it; `CONTROLS.Picker` is ViewKit's), `LinksBody` (a whole links body: the set editor of a relation whose field declares `links` opens it, handed each link's roles, the lead and the field's roles; `CONTROLS.LinksBody` is ViewKit's), `DateBody` (a whole date body: the date editors open it; `CONTROLS.DateBody` is ViewKit's), `PartsBody` (a whole body for a name, a place or a range: the name, place and range editors open it; `CONTROLS.PartsBody` is ViewKit's), `ValuesBody` (a whole body for several emails, phones, links or domains: the value list editors open it; `CONTROLS.ValuesBody` is ViewKit's), and the toolbar panels' bodies: `SortBody` (the sort editor's whole body: the sort pill opens it on a computer and in the phone's Sheet; `CONTROLS.SortBody` is ViewKit's), `FilterBody` (the filter editor's whole body: an advanced filter's pill opens it on a computer and Filter in the phone's Sheet; `CONTROLS.FilterBody` is ViewKit's), `FilterPartBody` (a filter rule's way and value: a filter on the bar opens it; `CONTROLS.FilterPartBody` is ViewKit's), `FieldsBody` (the field list's whole body: every sort and filter field list opens it; `CONTROLS.FieldsBody` is ViewKit's), `QuickFiltersBody` (the quick filters' whole body: the quick filters' button opens it on a computer and in the phone's Sheet; `CONTROLS.QuickFiltersBody` is ViewKit's), `ViewsListBody` (the views list's whole body: the view picker's chip opens it on a computer and in the phone's Sheet; `CONTROLS.ViewsListBody` is ViewKit's) and `CustomizeBody` (Customize's whole body: Options and everything else that draws Customize open it on a computer and in the phone's Sheet; `CONTROLS.CustomizeBody` is ViewKit's). `AppIcon` is your own icon component, taking `name` and `className`, for the glyphs a host declares (a row's icon, a binding's icon); it draws on the first paint, because rows are measured as they mount, so map its names from a static record. `Markdown` is your markdown renderer, handed the stored text whole as `source`; the package parses no markdown itself. Eight keys are optional: `Input` (leave it out and the editors draw a plain `<input>`), `Command` (deprecated: the command list's parts, read by nothing), `Calendar` (the filter panel's month; reached without one, it throws an error naming it; `CONTROLS.Calendar` is ViewKit's), `RowsWait` (wraps a grid's rows; handed one, a grid that already shows rows keeps them, inert, as its children while new ones load, its column names and footer outside; left out, the grid draws Loading in place of its body), `GroupBody` (deprecated: read by nothing; a `CustomizeBody` holds its own group editor), `SearchField` (the toolbar's search box; handed one, the search opens it in place of its own field on a computer and on a phone), `PortsHost` (what draws the `toast` and `confirm` ports an app leaves out) and `SelectionBar` (the selection bar; handed one, ViewKit draws it in its own place).
28
+ - `ViewsResolvedComponents` — the map as `useViews()` hands it on: yours, with `Input` always there, your own or the plain one, and `Calendar` always there, yours or a stand-in that throws an error naming the slot when it is reached.
29
+ - `ViewsButtonProps` — a button: its `children`, `onClick`, `disabled`, a `variant` (`default`, `secondary`, `ghost`, `outline`, `destructive`; `secondary` only for the views picker's chip), a `size` (`default`, `sm`, `icon`), its `type`, a class, `aria-label` and `title`; and a `ref`, `tabIndex`, `aria-haspopup`, `aria-expanded`, `data-slot` and `data-open`, which the grid hands its own buttons: forward each to your element; and `aria-disabled`, which a field row's edit target is handed while its write is pending; and `aria-pressed`, `role`, `aria-selected`, `data-state` and `data-vs-row`, which the panels' own buttons are handed (the new-line mark, a view's row in the picker, the views row's chips and a view's ⋯, Export).
32
30
  - `ViewsPopoverProps` — a popover opened at an `anchor`, controlled by `open` and `onOpenChange`, placed by `side`, `align`, `sideOffset` and `alignOffset`.
33
31
  - Focus: `initialFocus` false keeps focus where it was when the popup opens, for an editor that focuses its own input (with `preventScroll`). Default true.
34
32
  - Vetoes: `onOutsidePress` is handed the pointer press, its `target` where it landed, and returns `false` to keep the popup open, also against the focus that press moves; focus leaving by keyboard closes without asking. `onEscape` does the same for Escape.
@@ -36,7 +34,7 @@ The primitives your app hands in, modelled on Base UI's shapes: a controlled `op
36
34
  - `ViewsPortsHostProps` — what the components map's `PortsHost` is told: `toast` and `confirm` (which ports the app left out) and `onReady` (hand it the ports once they stand).
37
35
  - `ViewsSelectionBarProps` — what the components map's `SelectionBar` is handed: `SelectionBar`'s own props, at every count.
38
36
  - `ViewsTooltipProps` — a tooltip around the element it wraps (`children`), showing `content`, with `side`, `align`, `delayMs` and a class. Your app mounts one tooltip provider above the views; a tooltip never mounts its own.
39
- - `ViewsCheckboxProps` — a checkbox: `checked`, and `indeterminate` for a box ticked partly, whose press hands `true` while `checked` is false. `onCheckedChange` hands the new value and, where your library reports it, `{ event }`, the press that changed it (a list reads its shift key for a range). `partialTone` colours the partial mark, `muted` by default or `brand` for a select-all with a live selection; with `disabled`, `readOnly` (shown as it is and not pressable: a yes/no the grid or a field row can't write while the provider's `gridCheckboxes` or `fieldRowCheckboxes` is `checkbox`), a class, `tabIndex` and `aria-label`.
37
+ - `ViewsCheckboxProps` — a checkbox: `checked`, and `indeterminate` for a box ticked partly, whose press hands `true` while `checked` is false. `onCheckedChange` hands the new value and, where your library reports it, `{ event }`, the press that changed it (a list reads its shift key for a range). `partialTone` colours the partial mark, `muted` by default or `brand` for a select-all with a live selection; with `disabled`, `readOnly` (shown as it is and not pressable: a yes/no the grid or a field row can't write), a class, `tabIndex` and `aria-label`.
40
38
  - `ViewsMenuProps` — a menu opened at an `anchor`, with no trigger child (a group opens beside it only where it asks to and your menu can), controlled by `open` and `onOpenChange`, drawing its `items`, placed by `side` and `align`, and named by `label`, its accessible name, which every menu the package opens hands. On Base UI it is the menu's root, positioner and popup, the anchor handed to the positioner.
41
39
  - `ViewsMenuItem` — one row of a menu, as data your `Menu` draws: its `key`, `label` (always words), `icon`, `onSelect`, `disabled` with an optional `disabledReason` (why, for you to show), and `destructive`, a `separatorBefore`, a `shortcut` hint drawn at its end and never bound, and an `href` that makes it a link (with `onSelect` still firing). A `checked` row is checkable and closes the menu like any row, unless it carries `keepOpen`. A row with `children` is a group: its rows drawn in place under its label, unless it carries `beside` (open them one level in), its own `onSelect`, `href` and `checked` ignored; a disabled group's rows reach your `Menu` already `disabled`, with the group's reason where they give none. Any row may carry `detail`, its current value in words, for its end. All three are hints: a menu that draws none of them keeps every group in place and every row closing.
42
40
  - `ViewsCommandParts` — the command list's parts, the shape cmdk-based copies already have: `Root` (taking `label`, `shouldFilter` false to hand filtering to the host, a scoring `filter`, `loop` to wrap the arrows, and `defaultValue`, the value of the item highlighted as the list opens, none while no item has it), `Input` (a controlled `value` with `onValueChange`, a `placeholder`, `autoFocus`, a `ref`, `onKeyDown`, and `chrome` `search` for your search row or `bare` for the input alone), `List`, `Empty`, `Group` (with a `heading`) and `Item` (a `value`, `onSelect`, `disabled`, and `chosen`, which you colour as your chosen row while the package's row inside draws the check).
@@ -54,7 +52,7 @@ The primitives your app hands in, modelled on Base UI's shapes: a controlled `op
54
52
  - `ViewsLinksBodyProps` — a whole links body your app draws, for a relation holding several records whose field declares `links`: `label`, `items` (`ViewsPickerItem`s: the linked records first, in the links' order, then the ones to add, filtered or fetched by the editor), `links` and `onLinksChange` over `ViewsLink`s (the whole list, every change as it is made: a record linked, last and holding no role, or unlinked, a link's roles set), `roles` (`ViewsLinkRole`s, the field's, in its order; an archived one offered only on a link that holds it), `lead` (where the field leads: which value leads, `onLead` and its words; making another lead never moves a line), `onDone` (closes and saves the set), `search`, `onSearch`, `doing`, `onRetry`, `onMore`, `actions` (the create rows), `typed`, `autoFocus` and `form`, and, in the phone's sheet, `onStepChange`. The editor keeps the set, Tab, Escape, the save and the phone's ✕ and ✓, drops what it never handed, and saves each link's roles in the key it was stored with.
55
53
  - `ViewsLink` — `{ value, roles }`: one link as a links body draws it, its record's value and the roles it holds, in order.
56
54
  - `ViewsLinkRole` — `{ value, label, archived? }`: a role a link may hold, as a links body offers it.
57
- - `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` and `form` (`phone`: draw no ✕, ✓ or Cancel of your own), 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 ✓.
55
+ - `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 ✓.
58
56
  - `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 ✓.
59
57
  - `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.
60
58
  - `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).
@@ -74,9 +72,11 @@ The primitives your app hands in, modelled on Base UI's shapes: a controlled `op
74
72
  - `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`.
75
73
  - `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).
76
74
  - `ViewsGroupEntry` — one group: `key`, `label`, `empty`, `hidden`, and its `count` where the list counts it.
77
- - `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: `changes`, `stale`, `canPublish`, `pending`, `onReset`, `onPublish`), `foot`, `onClear`, `clearAll`, `form`, `onDone` and, on a phone where the sheet's head doesn't draw it, `actions` (the ✕). No per-field filters: where a list's filter is only per-field values (no filter tree), ViewKit draws its own Customize even with a body handed.
75
+ - `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: `changes`, `stale`, `canPublish`, `pending`, `onReset`, `onPublish`), `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.
78
76
  - `ViewsCustomizePage` — where a Customize body stands: `list`, `layout`, `columns`, `filter`, `sort` or `group`.
79
77
  - `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.
78
+ - `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`.
79
+ - `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`.
80
80
  - `ViewsCustomizeColumns` — the columns (`items`, each a `ViewsCustomizeColumn`), `onColumnsChange` (every column in its order, hidden or not: one reorder or one column shown or hidden is written, anything else nothing), a card's `onStartsLineChange` and `firstFieldId`, `reset`, and your field editor's `columnMenu` and `footer`.
81
81
  - `ViewsCustomizeColumn` — one column: `id`, `label`, `icon`, `hidden`, `hideable`, `fixed`, a card's `startsLine` and its own `settings` (choices and toggles).
82
82
  - `ViewsCustomizeToggle` — a setting turned on or off: `key`, `label`, `value`, `onChange`, `icon`, `reset` and `section`.
@@ -88,15 +88,8 @@ The primitives your app hands in, modelled on Base UI's shapes: a controlled `op
88
88
  - `ViewsSheetActions` — the editor panel's ✕ and ✓, handed to a sheet that draws them in its head: `close`, which throws the edit away as a swipe does, and `done`, which closes it as done, absent where the body saves on its pick. A toolbar panel's sheet is handed `close` alone, which closes it; the sort editor's is handed both, its `close` taking the rules back to what they were as the sheet opened and its `done` keeping them. While an editor's body stands on a step of its own it carries `back` too, to draw in `close`'s place: Back, returning the body to where it was; `close` stays handed, for a head that draws no Back.
89
89
  - `ViewsSheetAction` — one of them: its `label` (the accessible name) and `onPress`. The glyph is yours.
90
90
  - `ViewsBodyStep` — `{ title, onBack }`: a step of an editor body's own on a phone (a list of countries, a label's list), which a `TextBody`, `NumberBody`, `PartsBody`, `ValuesBody` or `LinksBody`, or the sort's `SortBody` (Add sort's fields, a rule's direction), hands the sheet through its `onStepChange`. The sheet's head shows `title` in place of the field's name, and Back and the sheet's Escape call `onBack`; the body hands `null` once it is back. A `GroupBody` hands its level the same way to ViewKit's Customize, on a computer and a phone: Customize's head shows its title and Back calls `onBack` (Escape there still closes the panel).
91
- - `ViewsMenuRoute` — `"popover" | "menu"`, the provider's `menus`: how the grid opens its own menus (a column's, a footer's figure picker, a group's ⋯, Add column). `popover` (the default) draws ViewKit's rows in your `Popover`; `menu` hands your `Menu` its rows as data. The row menu and a command cell's menu always go through your `Menu`.
92
91
  - `ViewsSeveralValues` — `"first" | "fit"`, the provider's `severalValues`: how a cell of several values draws on one line. `fit` (the default) draws as many whole values as fit its width, then the count, following a column resize; `first` draws its first value and a count at any width, as on 0.5.0.
93
- - `ViewsGridButtons` — `"own" | "button"`, the provider's `gridButtons`: who draws the buttons the grid draws itself (a group's fold and ⋯, "+ Add column", a row's ⋯, the name's actions, an action column's buttons, a pick-list cell's ▾, a command cell's ▾ and trigger). `own` (the default) draws ViewKit's own, as on 0.5.0; `button` draws your `Button`, handed the grid's box in `className`.
94
- - `ViewsGridCheckboxes` — `"own" | "checkbox"`, the provider's `gridCheckboxes`: who draws a yes/no cell's box in the grid (the checkbox style). `own` (the default) draws ViewKit's tick box in its own switch button, as on 0.5.0; `checkbox` draws your `Checkbox`, handed `checked`, the column's name, `tabIndex` -1 and `onCheckedChange`, or `readOnly` where the grid can't write.
95
- - `ViewsFieldRowButtons` — `"own" | "button"`, the provider's `fieldRowButtons`: who draws a field row's own buttons (its edit target, the verb trigger around a value, the lane's ▾, rich text's Show more). `own` (the default) draws ViewKit's, as on 0.5.0; `button` draws your `Button`.
96
- - `ViewsPanelButtons` — `"own" | "button"`, the provider's `panelButtons`: who draws the buttons the toolbar's panels, the search's ✕ and the views row draw themselves (a filter's select, a range's presets and clears, the Columns and group lists' eyes and new-line marks, a column's opener, Clear all, Reset, show or hide every group, a panel header's back and ✕, Export, Publish, the "+N" chip, the +, the views picker's chip, rows and ⋯, the quick filters' fields). `own` (the default) draws ViewKit's, as on 0.6.0; `button` draws your `Button`.
97
- - `ViewsFieldRowCheckboxes` — `"own" | "checkbox"`, the provider's `fieldRowCheckboxes`: who draws a field row's yes/no box. `own` (the default) draws ViewKit's tick box in its own switch button; `checkbox` draws your `Checkbox`, a Tab stop, or `readOnly` where the row can't write.
98
- - `ViewsSelectionBarSettings` — the provider's `selectionBar`: `phoneQuery` (the media query under which the bar is the phone's pill; without it, wherever `desktopQuery` does not match), `desktop` and `phone`, each a `ViewsBarPlacement`, and `chip`, a `ViewsSelectionChip`.
99
- - `ViewsSelectionChip` — `"own" | "button"`, the provider's `selectionBar`'s `chip`: who draws the selection bar's count chip on the desktop. `own` (the default) draws ViewKit's own, as on 0.5.0; `button` draws your `Button`, `outline`, `sm`, handed its box in `className`.
92
+ - `ViewsSelectionBarSettings` — the provider's `selectionBar`: `phoneQuery` (the media query under which the bar is the phone's pill; without it, wherever `desktopQuery` does not match), and `desktop` and `phone`, each a `ViewsBarPlacement`.
100
93
  - `ViewsBarPlacement` — where the selection bar's fixed box sits on one form: `bottom` (a CSS length, default `calc(1rem + env(safe-area-inset-bottom))`), `zIndex` (default 50) and `className` (your own classes on the box).
101
94
  - `ViewsSheetActionsPlace` — where the ✕ and ✓ stand on a phone, the provider's `sheetActions`: `bar` (the default, the panel's own bar, or a toolbar panel's own ✕, inside your sheet) or `head` (handed to your sheet as `actions`, and none drawn inside; a toolbar panel hands `close` alone, but the sort editor hands `close`, which takes its rules back, and `done`).
102
95
  - `ViewsInputProps` — a single-line text box: every prop of an `<input>`, `ref` included, which your element must receive, and `chrome`, `bare` (the default: a grid cell, a panel that frames the box) or `field` (your field's frame).
@@ -9,7 +9,7 @@ The rendering itself is behind the other doors: the provider and the atoms at [`
9
9
  Guide: [the provider](../guides/the-provider.md).
10
10
 
11
11
  - `VK_PREFIX` — the prefix `"vk"`, worn by everything that shares a global namespace: the CSS variables (`--vk-*`) and the `data-slot` values (`vk-grid-row`). States are bare `data-*` attributes, and message keys live under `views.*` ([the contract](../contract.md)).
12
- - `GRID_SLOTS` — every `data-slot` value the grid draws, from `vk-grid` (the frame) to `vk-grid-aggregate-menu`, in the order of the [contract's Slots table](../contract.md#slots). A skin styles a part through its slot, never through a class name the package happens to use.
12
+ - `GRID_SLOTS` — every `data-slot` value the grid draws, from `vk-grid` (the frame) to `vk-grid-pager-next`, in the order of the [contract's Slots table](../contract.md#slots). A skin styles a part through its slot, never through a class name the package happens to use.
13
13
  - `GridSlot` — one member of `GRID_SLOTS`.
14
14
  - `GRID_STATES` — the flags the grid styles, each a `data-*` attribute present when true (`focused`, `selected`, `editing`, `in-range`, `range-edge`, `pending`, `invalid`, `dragging`, `empty`, `frozen`, `frozen-edge`, `scrolled`, `parked`, `collapsed`, `stuck`, `open`, `desktop`), as the [contract's States table](../contract.md#states) lists them with where each sits.
15
15
  - `GridState` — one member of `GRID_STATES`.
@@ -32,9 +32,9 @@ Guide: [the provider](../guides/the-provider.md).
32
32
  - `VK_GRID_TOKENS` — every name the grid's look stylesheet (`viewkitjs/views/grid.css`) reads beside the grid's own geometry, each with its `kind` and its Outright token: all optional, the ready stylesheet declaring each at the Outright look's value; all but `--vk-frozen-fade` are the controls' names too ([the grid's look tokens](../contract.md#the-grids-look-tokens)).
33
33
  - `ControlToken` — one name a control reads: `name`, `kind` and `outright`, the Outright token it stands for.
34
34
  - `VK_CONTROL_PRIVATE_FAMILIES` — the prefixes of the controls' own machinery, set and read by a control alone (the smooth corner's, the pressing room's, and each control's own): not public, and your app neither sets nor reads them.
35
- - `COMPONENT_NAMES` — the primitives your app hands in through the provider: `Button`, `Popover`, `Tooltip`, `Checkbox`, `Menu`, `Collapse`, `Sheet`, `AppIcon` and `Markdown` ([the components map](../contract.md#the-components-map)).
35
+ - `COMPONENT_NAMES` — the primitives your app hands in through the provider: `Button`, `Popover`, `Tooltip`, `Checkbox`, `Menu`, `Collapse`, `Sheet`, `AppIcon`, `Markdown`, `TextBody`, `NumberBody`, `Picker`, `LinksBody`, `DateBody`, `PartsBody`, `ValuesBody`, `SortBody`, `FilterBody`, `FilterPartBody`, `FieldsBody`, `QuickFiltersBody`, `ViewsListBody` and `CustomizeBody` ([the components map](../contract.md#the-components-map)).
36
36
  - `ComponentName` — one member of `COMPONENT_NAMES`.
37
- - `OPTIONAL_COMPONENT_NAMES` — the primitives your app may leave out: `Input` (a plain default), `Command` (reached without one, it throws an error naming it), `Picker` (without one, the lists draw from `Command`), `LinksBody` (without one, the set editor of a relation whose field declares `links` opens `Picker`, else its own list), `Calendar` (reached without one, it throws an error naming it), `DateBody` (without one, the date editor draws its own around `Calendar`), `PartsBody` (without one, the name, place and range editors draw their own boxes), `ValuesBody` (without one, the value list editor draws its own rows), `TextBody` (without one, the text editors draw their own box) and `NumberBody` (without one, the number editors draw their own box), `SortBody` (without one, the sort pill opens ViewKit's own sort editor), `FilterBody` (without one, an advanced filter's pill and the phone's Filter open ViewKit's own filter editor), `FieldsBody` (without one, ViewKit's own sort and filter field lists), `FilterPartBody` (without one, a filter rule's way and value open ViewKit's ways menu and value body), `RowsWait` (without one, a grid waiting for new rows draws Loading in place of its body), `QuickFiltersBody` (without one, the quick filters' button opens ViewKit's own quick-filters panel), `ViewsListBody` (without one, the view picker opens ViewKit's own list of views), `GroupBody` (without one, Customize's Group opens ViewKit's own group pages), `CustomizeBody` (without one, Options opens ViewKit's own Customize) and `SearchField` (without one, the toolbar's search draws its own field) ([the components map](../contract.md#the-components-map)).
37
+ - `OPTIONAL_COMPONENT_NAMES` — the primitives your app may leave out: `Input` (a plain default), `Command` (deprecated: read by nothing), `Calendar` (reached without one, it throws an error naming it), `RowsWait` (without one, a grid waiting for new rows draws Loading in place of its body), `GroupBody` (deprecated: read by nothing), `SearchField` (without one, the toolbar's search draws its own field), `PortsHost` (without one, an app that hands no `confirm` gets the browser's and one that hands no `toast` sees nothing) and `SelectionBar` (without one, a selection draws ViewKit's own bar) ([the components map](../contract.md#the-components-map)).
38
38
  - `OptionalComponentName` — one member of `OPTIONAL_COMPONENT_NAMES`.
39
39
  - `ATOM_NAMES` — the pieces the rendering is built from, and the pieces of your app's own it cannot draw itself (a command cell's verb menu, the row's right-click menu, where a relation goes, a wait, how a list asks for more), and the panels' rows. Each ships as a default, and your app swaps any of them through the provider's `atoms` ([the atoms](../contract.md#the-atoms)).
40
40
  - `AtomName` — one member of `ATOM_NAMES`.
@@ -42,7 +42,7 @@ Guide: [the provider](../guides/the-provider.md).
42
42
  - `AtomSlot` — one member of `ATOM_SLOTS`.
43
43
  - `EDITOR_SLOTS` — the `data-slot` values the editor panel marks its parts with, prefixed like the grid's (`vk-editor-panel`, `vk-editor-bar`, `vk-editor-refusal`) ([the editor panel](../contract.md#the-editor-panel)).
44
44
  - `EditorSlot` — one member of `EDITOR_SLOTS`.
45
- - `EDITOR_STATES` — the states the editor panel's popover carries: `vk-body`, the app's own body it holds (`picker`, `parts`, `values` or `links`), set only when the provider's `bodyFrame` is `popover`.
45
+ - `EDITOR_STATES` — the states the editor panel's popover carries: `vk-body`, the app's own body it holds (`picker`, `parts`, `values` or `links`).
46
46
  - `EditorState` — one member of `EDITOR_STATES`.
47
47
  - `SELECTION_SLOTS` — the `data-slot` values the selection bar marks its parts with, prefixed like the grid's (`vk-selection-bar`, `vk-selection-pill`, `vk-selection-chip`) ([slots](../contract.md#slots)).
48
48
  - `SelectionSlot` — one member of `SELECTION_SLOTS`.
@@ -157,7 +157,7 @@ Three layers decide a write, and each may only take away from the one before: th
157
157
  - `isLongTextColumn` — whether a column holds a paragraph rather than a phrase: a `text` column with `format.long`, or a `rich_text` column. It reads and edits in the anchored long-text panel rather than the one-line input.
158
158
  - `gridColumnInspectable` — whether a cell opens a panel to be read in full, whatever its write state, so a long text that can't be edited can still be read. Long text is the one kind that always does; a cut-off line does when its cell cuts it off (`isWholeTextColumn`).
159
159
  - `isWholeTextColumn` — whether a column's text opens whole in that panel when its cell cuts it off: a plain `text` (not a paragraph) and a `title` that is text, not a person's name. Links, emails, phones and domains keep their one-line box.
160
- - `gridTextOpensBox(column, whole, inCell?)` — whether an open text cell is drawn in the panel over the cell rather than in the cell: a paragraph always, a line when it was opened `whole` (cut off when it opened); never with `inCell` (an app's `TextBody` is handed and the cell is writable: the body stands in the cell).
160
+ - `gridTextOpensBox(column, whole, writable?)` — whether an open text cell is drawn in the read-only panel over the cell rather than in the cell: never when `writable` (the text body stands in the cell); otherwise a paragraph always, and a line when it was opened `whole` (cut off when it opened). `writable` defaults to false.
161
161
 
162
162
  ## Column state
163
163
 
@@ -59,7 +59,7 @@ export function AppViews({ children }: { children: ReactNode }) {
59
59
 
60
60
  ## Write the adapter against the contract
61
61
 
62
- `views/docs/contract.md` lists the nine required components and the optional `Input`, `Command`, `Picker`, `LinksBody`, `Calendar`, `DateBody`, `PartsBody`, `ValuesBody`, `TextBody`, `NumberBody`, `SortBody`, `FilterBody`, `FieldsBody`, `FilterPartBody`, `RowsWait`, `QuickFiltersBody`, `ViewsListBody`, `GroupBody`, `CustomizeBody`, `SearchField` and `PortsHost`, the five ports (`toast` and `confirm` optional: with `CONTROLS` spread, a missing one is ViewKit's Toast or alert dialog) and the icon names. Implement
62
+ `views/docs/contract.md` lists the twenty-three required components (`TextBody`, `NumberBody`, `Picker`, `LinksBody`, `DateBody`, `PartsBody`, `ValuesBody`, `SortBody`, `FilterBody`, `FilterPartBody`, `FieldsBody`, `QuickFiltersBody`, `ViewsListBody` and `CustomizeBody` among them: spread `CONTROLS` for ViewKit's own) and the optional `Input`, `Command` (deprecated), `Calendar`, `RowsWait`, `GroupBody` (deprecated), `SearchField`, `PortsHost` and `SelectionBar`, the five ports (`toast` and `confirm` optional: with `CONTROLS` spread, a missing one is ViewKit's Toast or alert dialog) and the icon names. Implement
63
63
  `ViewsComponents` over your own shadcn copies: a controlled `open` with `onOpenChange(open, details)`,
64
64
  an `anchor` element or ref on the popover and the menu, and no `asChild`; `AppIcon` is your own
65
65
  icon component by your own names. The shapes are Base UI's; `views/docs/contract.md`'s "Writing an
@@ -1,69 +0,0 @@
1
- import type { KeyboardEvent as ReactKeyboardEvent, ReactNode, Ref } from "react";
2
- import type { FieldMessageResolver } from "viewkitjs/fields";
3
- import { type RelationCandidate, type RelationSource } from "./relation-source.js";
4
- /**
5
- * A pinned row under the list for "it isn't in the list yet": the host opens
6
- * its own create form with what was typed already filled. Pinned rather than
7
- * appended to the results, because an affordance that only appears below a
8
- * scrolled list is one nobody finds — and a button rather than a command item,
9
- * because the filter would hide an item with no label to match while a query
10
- * is typed, which is exactly when the row is wanted. A click asks the host to
11
- * close (the core says what that close means), then `onCreate` runs.
12
- */
13
- export type RelationCreate = {
14
- /** The row's words; receives the trimmed query. */
15
- label: (query: string) => string;
16
- /** Runs AFTER the host has been asked to close, with the trimmed query. */
17
- onCreate: (query: string) => void;
18
- };
19
- /** The glyph lane every row of one panel shares, so each label starts at the same x. */
20
- export type RelationLane = {
21
- /** Draw the lane: the host named the kind's glyph, or a candidate carries its own. */
22
- glyphs: boolean;
23
- /** A glyph sized to the lane, or nothing. */
24
- glyph: (node?: ReactNode) => ReactNode;
25
- };
26
- /**
27
- * THE list a relation picker shows — one panel under the pick-one core and the
28
- * several-records core. It holds the search box, what the remote branch is
29
- * doing (a first page loading or failed, an empty answer, the next page), the
30
- * candidates with their glyph lane, paging at the end of the list, and the
31
- * pinned create rows. What a click MEANS is the core's: this panel only says
32
- * which candidate was chosen, and draws, above the candidates, whatever rows
33
- * the core puts there (the None row, the linked records).
34
- *
35
- * The candidates are the HOST's, through a discriminated source: a STATIC list
36
- * (every subscription you could link to, preloaded — the grid's shape, and any
37
- * small set's) or a REMOTE search over thousands of rows (a client, a person,
38
- * a deal). The panel owns the remote branch's choreography — when to ask, what
39
- * to drop, what to show meanwhile — and never the asking itself: the search
40
- * function is the host's, which is what keeps workspace tenancy in the host's
41
- * closure and in the routes.
42
- */
43
- export declare function RelationPanel({ candidates, query, onQueryChange, searchRef, onSearchKeyDown, before, drawsBefore, labels, hide, isChosen, onSelect, kindGlyph, message, creates, onCreate, startOn, }: {
44
- candidates: RelationSource;
45
- /** The typed query, controlled by the core: the remote search reads it, the create rows name it. */
46
- query: string;
47
- onQueryChange: (query: string) => void;
48
- searchRef?: Ref<HTMLInputElement>;
49
- onSearchKeyDown?: (event: ReactKeyboardEvent<HTMLInputElement>) => void;
50
- /** Rows drawn above the candidates, in the same list and lane. */
51
- before?: (lane: RelationLane) => ReactNode;
52
- /** The rows drawn above are on screen: a remote search that found nothing doesn't say "nothing matches" over them. */
53
- drawsBefore?: boolean;
54
- /** Labels for the rows drawn above, so a static search matches them as it matches a candidate. */
55
- labels?: ReadonlyMap<string, string>;
56
- /** A candidate already drawn above: left out of the candidates. */
57
- hide?: (id: string) => boolean;
58
- isChosen: (id: string) => boolean;
59
- onSelect: (candidate: RelationCandidate) => void;
60
- /** The kind's glyph, from the host. Worn by every candidate that brought no icon of its own; given, the glyph
61
- * lane is always drawn. */
62
- kindGlyph?: ReactNode;
63
- message?: FieldMessageResolver;
64
- creates?: RelationCreate[];
65
- /** A create row was clicked, with the trimmed query. */
66
- onCreate: (create: RelationCreate, query: string) => void;
67
- /** The row highlighted as the list opens, by its value (a candidate's id); without it, the first row. */
68
- startOn?: string;
69
- }): import("react/jsx-runtime").JSX.Element;