viewkitjs 0.31.0 → 0.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (449) hide show
  1. package/CHANGELOG.md +198 -0
  2. package/MIGRATION.md +40 -6
  3. package/README.md +1 -1
  4. package/fields/dist/index.d.ts +1 -1
  5. package/fields/dist/index.js +1 -1
  6. package/fields/dist/query/evaluate.d.ts +7 -0
  7. package/fields/dist/query/exact-number.d.ts +8 -2
  8. package/fields/dist/query/exact-number.js +14 -1
  9. package/fields/dist/query/index.d.ts +2 -0
  10. package/fields/dist/query/index.js +2 -0
  11. package/fields/dist/query/list-request.d.ts +148 -0
  12. package/fields/dist/query/list-request.js +125 -0
  13. package/fields/dist/query/saved-view.d.ts +15 -0
  14. package/fields/dist/query/saved-view.js +11 -0
  15. package/fields/dist/query/settings.d.ts +9 -0
  16. package/fields/dist/query/settings.js +9 -0
  17. package/fields/dist/query/sort.js +13 -10
  18. package/fields/dist/registry.js +5 -1
  19. package/fields/dist/types.d.ts +4 -1
  20. package/fields/dist/zod.d.ts +5 -0
  21. package/fields/dist/zod.js +10 -1
  22. package/fields/docs/guides/contact-values.md +12 -0
  23. package/fields/docs/guides/field-types.md +1 -1
  24. package/fields/docs/guides/queries.md +3 -1
  25. package/fields/docs/reference/fields.md +1 -0
  26. package/fields/docs/reference/query.md +66 -0
  27. package/package.json +5 -1
  28. package/postgres/README.md +1 -0
  29. package/postgres/dist/check.js +4 -1
  30. package/postgres/dist/definitions/formula-forms.js +3 -1
  31. package/postgres/dist/definitions/money.js +2 -1
  32. package/postgres/dist/handler.d.ts +53 -0
  33. package/postgres/dist/handler.js +211 -0
  34. package/postgres/dist/ids.d.ts +1 -1
  35. package/postgres/dist/ids.js +19 -1
  36. package/postgres/dist/index.d.ts +1 -0
  37. package/postgres/dist/index.js +1 -0
  38. package/postgres/dist/limits.d.ts +3 -1
  39. package/postgres/dist/limits.js +1 -1
  40. package/postgres/dist/list-fields.d.ts +10 -0
  41. package/postgres/dist/list-fields.js +36 -0
  42. package/postgres/dist/page.js +6 -3
  43. package/postgres/dist/readable.d.ts +4 -0
  44. package/postgres/dist/readable.js +4 -0
  45. package/postgres/dist/refusals.d.ts +9 -2
  46. package/postgres/dist/refusals.js +6 -0
  47. package/postgres/dist/rules.d.ts +15 -1
  48. package/postgres/dist/rules.js +16 -0
  49. package/postgres/dist/sort.js +7 -2
  50. package/postgres/docs/guides/definitions.md +1 -1
  51. package/postgres/docs/guides/field-map.md +3 -3
  52. package/postgres/docs/guides/list-handler.md +99 -0
  53. package/postgres/docs/index.md +1 -0
  54. package/postgres/docs/reference/definitions.md +1 -1
  55. package/postgres/docs/reference/postgres.md +12 -4
  56. package/views/README.md +2 -2
  57. package/views/dist/atoms/RowMenu.d.ts +7 -0
  58. package/views/dist/atoms/RowMenu.js +18 -16
  59. package/views/dist/atoms/ToolbarButton.d.ts +1 -1
  60. package/views/dist/atoms/ToolbarButton.js +4 -3
  61. package/views/dist/atoms/carried.d.ts +5 -0
  62. package/views/dist/atoms/carried.js +7 -0
  63. package/views/dist/atoms/frame-parts.d.ts +6 -0
  64. package/views/dist/atoms/frame-parts.js +15 -0
  65. package/views/dist/atoms/types.d.ts +19 -7
  66. package/views/dist/cells/cell-title.d.ts +3 -1
  67. package/views/dist/cells/cell-title.js +2 -2
  68. package/views/dist/cells/cell-values.js +2 -2
  69. package/views/dist/contract.d.ts +56 -11
  70. package/views/dist/contract.js +148 -0
  71. package/views/dist/controls/alert-dialog/alert-dialog.js +2 -1
  72. package/views/dist/controls/atoms.d.ts +2 -0
  73. package/views/dist/controls/atoms.js +2 -0
  74. package/views/dist/controls/avatar/avatar.d.ts +3 -3
  75. package/views/dist/controls/avatar/avatar.js +1 -1
  76. package/views/dist/controls/avatar/tokens.d.ts +44 -0
  77. package/views/dist/controls/avatar/tokens.js +11 -0
  78. package/views/dist/controls/avatar.css +22 -5
  79. package/views/dist/controls/button/map-button.js +2 -0
  80. package/views/dist/controls/checkbox/checkbox.d.ts +3 -2
  81. package/views/dist/controls/checkbox/checkbox.js +2 -2
  82. package/views/dist/controls/choice/tokens.d.ts +0 -4
  83. package/views/dist/controls/choice/tokens.js +0 -1
  84. package/views/dist/controls/choice.css +3 -3
  85. package/views/dist/controls/compound-editor/compound-editor.d.ts +1 -1
  86. package/views/dist/controls/compound-editor/name-parts.js +4 -4
  87. package/views/dist/controls/compound-editor/place-parts.js +19 -19
  88. package/views/dist/controls/compound-editor/range-parts.js +14 -14
  89. package/views/dist/controls/compound-editor/row.d.ts +3 -1
  90. package/views/dist/controls/compound-editor/row.js +2 -2
  91. package/views/dist/controls/controls.d.ts +8 -0
  92. package/views/dist/controls/controls.js +12 -2
  93. package/views/dist/controls/customize/customize.js +37 -35
  94. package/views/dist/controls/customize/map-customize-body.d.ts +2 -0
  95. package/views/dist/controls/customize/map-customize-body.js +5 -1
  96. package/views/dist/controls/date-editor/date-days.js +2 -2
  97. package/views/dist/controls/date-editor/date-editor.js +18 -18
  98. package/views/dist/controls/date-editor/date-parts.js +6 -6
  99. package/views/dist/controls/date-editor/map-calendar.js +1 -1
  100. package/views/dist/controls/date-editor.css +2 -2
  101. package/views/dist/controls/field/field.d.ts +22 -4
  102. package/views/dist/controls/field/field.js +63 -5
  103. package/views/dist/controls/field/tokens.d.ts +4 -0
  104. package/views/dist/controls/field/tokens.js +1 -0
  105. package/views/dist/controls/field.css +41 -16
  106. package/views/dist/controls/filter-editor/block.d.ts +2 -2
  107. package/views/dist/controls/filter-editor/block.js +5 -5
  108. package/views/dist/controls/filter-editor/filter-editor.js +31 -33
  109. package/views/dist/controls/filter-editor/how.d.ts +3 -1
  110. package/views/dist/controls/filter-editor/map-filter-body.d.ts +1 -0
  111. package/views/dist/controls/filter-editor/map-filter-body.js +7 -3
  112. package/views/dist/controls/filter-editor/map-rules.js +1 -1
  113. package/views/dist/controls/filter-editor/parts.js +2 -1
  114. package/views/dist/controls/glyphs/glyphs.d.ts +10 -0
  115. package/views/dist/controls/glyphs/glyphs.js +173 -0
  116. package/views/dist/controls/group-editor/group-editor.js +15 -13
  117. package/views/dist/controls/index.d.ts +4 -1
  118. package/views/dist/controls/index.js +3 -1
  119. package/views/dist/controls/input/input.js +6 -3
  120. package/views/dist/controls/input/map-input.js +2 -0
  121. package/views/dist/controls/input/tokens.d.ts +4 -0
  122. package/views/dist/controls/input/tokens.js +1 -0
  123. package/views/dist/controls/input.css +31 -3
  124. package/views/dist/controls/internal/editor-parts.js +1 -1
  125. package/views/dist/controls/internal/icons.js +10 -0
  126. package/views/dist/controls/internal/keep-focus.d.ts +2 -0
  127. package/views/dist/controls/internal/keep-focus.js +17 -0
  128. package/views/dist/controls/internal/map-panel-controls.d.ts +8 -0
  129. package/views/dist/controls/internal/map-panel-controls.js +20 -0
  130. package/views/dist/controls/internal/panel-controls.d.ts +50 -0
  131. package/views/dist/controls/internal/panel-controls.js +197 -0
  132. package/views/dist/controls/internal/part-slot.d.ts +12 -0
  133. package/views/dist/controls/internal/part-slot.js +5 -0
  134. package/views/dist/controls/internal/watch-frame.d.ts +2 -0
  135. package/views/dist/controls/internal/watch-frame.js +33 -0
  136. package/views/dist/controls/links-editor/links-editor.d.ts +1 -1
  137. package/views/dist/controls/links-editor/links-editor.js +27 -27
  138. package/views/dist/controls/markdown/map-markdown.d.ts +4 -0
  139. package/views/dist/controls/markdown/map-markdown.js +5 -0
  140. package/views/dist/controls/menu/map-menu.d.ts +2 -2
  141. package/views/dist/controls/menu/map-menu.js +15 -12
  142. package/views/dist/controls/menu/menu.d.ts +2 -0
  143. package/views/dist/controls/menu/menu.js +3 -3
  144. package/views/dist/controls/menu-list/menu-list.d.ts +17 -4
  145. package/views/dist/controls/menu-list/menu-list.js +27 -25
  146. package/views/dist/controls/modal/modal.js +5 -1
  147. package/views/dist/controls/notice/notice.d.ts +3 -1
  148. package/views/dist/controls/notice/notice.js +2 -2
  149. package/views/dist/controls/number-editor/number-editor.d.ts +1 -1
  150. package/views/dist/controls/number-editor/number-editor.js +13 -13
  151. package/views/dist/controls/number-field/number-field.js +5 -3
  152. package/views/dist/controls/pane/pane.d.ts +4 -2
  153. package/views/dist/controls/pane/pane.js +6 -5
  154. package/views/dist/controls/phone-header/header-bar.d.ts +5 -1
  155. package/views/dist/controls/phone-header/header-bar.js +2 -2
  156. package/views/dist/controls/phone-header.css +11 -1
  157. package/views/dist/controls/picker/map-picker.js +3 -0
  158. package/views/dist/controls/picker/picker.d.ts +16 -0
  159. package/views/dist/controls/picker/picker.js +61 -40
  160. package/views/dist/controls/picker/rows.d.ts +4 -0
  161. package/views/dist/controls/picker.css +2 -0
  162. package/views/dist/controls/popover/map-popover.d.ts +1 -1
  163. package/views/dist/controls/popover/map-popover.js +4 -2
  164. package/views/dist/controls/popover/popover.js +2 -1
  165. package/views/dist/controls/quick-filters/quick-filters.js +4 -4
  166. package/views/dist/controls/radio/radio.d.ts +8 -3
  167. package/views/dist/controls/radio/radio.js +22 -5
  168. package/views/dist/controls/radio/tokens.d.ts +44 -0
  169. package/views/dist/controls/radio/tokens.js +11 -0
  170. package/views/dist/controls/radio.css +79 -1
  171. package/views/dist/controls/select/map-select.d.ts +3 -0
  172. package/views/dist/controls/select/map-select.js +8 -0
  173. package/views/dist/controls/select/select.d.ts +7 -0
  174. package/views/dist/controls/select/select.js +12 -6
  175. package/views/dist/controls/select/tokens.d.ts +8 -0
  176. package/views/dist/controls/select/tokens.js +2 -0
  177. package/views/dist/controls/select.css +17 -0
  178. package/views/dist/controls/setting-row/looks.d.ts +1 -1
  179. package/views/dist/controls/setting-row/looks.js +9 -4
  180. package/views/dist/controls/setting-row/setting-row.d.ts +45 -10
  181. package/views/dist/controls/setting-row/setting-row.js +82 -15
  182. package/views/dist/controls/setting-row/tokens.d.ts +74 -2
  183. package/views/dist/controls/setting-row/tokens.js +19 -1
  184. package/views/dist/controls/setting-row.css +135 -14
  185. package/views/dist/controls/sheet/bottom-sheet.d.ts +14 -2
  186. package/views/dist/controls/sheet/bottom-sheet.js +6 -3
  187. package/views/dist/controls/sheet/map-sheet.js +1 -1
  188. package/views/dist/controls/sheet.css +4 -1
  189. package/views/dist/controls/sort-editor/map-sort-body.d.ts +1 -0
  190. package/views/dist/controls/sort-editor/map-sort-body.js +7 -3
  191. package/views/dist/controls/sort-editor/sort-editor.js +25 -26
  192. package/views/dist/controls/sort-editor.css +13 -2
  193. package/views/dist/controls/switch-row/tokens.d.ts +0 -12
  194. package/views/dist/controls/switch-row/tokens.js +0 -3
  195. package/views/dist/controls/switch-row.css +3 -7
  196. package/views/dist/controls/switch.css +17 -7
  197. package/views/dist/controls/tag/tag.d.ts +3 -1
  198. package/views/dist/controls/tag/tag.js +2 -2
  199. package/views/dist/controls/tag/tokens.d.ts +4 -0
  200. package/views/dist/controls/tag/tokens.js +1 -0
  201. package/views/dist/controls/tag-field/tag-field.d.ts +5 -1
  202. package/views/dist/controls/tag-field/tag-field.js +11 -5
  203. package/views/dist/controls/tag-field/tokens.d.ts +16 -0
  204. package/views/dist/controls/tag-field/tokens.js +4 -0
  205. package/views/dist/controls/tag-field.css +19 -0
  206. package/views/dist/controls/tag.css +2 -0
  207. package/views/dist/controls/text-editor/text-editor.d.ts +1 -1
  208. package/views/dist/controls/text-editor/text-editor.js +8 -8
  209. package/views/dist/controls/toolbar/toolbar.d.ts +15 -3
  210. package/views/dist/controls/toolbar/toolbar.js +22 -15
  211. package/views/dist/controls/toolbar-button/atom-toolbar-button.d.ts +14 -0
  212. package/views/dist/controls/toolbar-button/atom-toolbar-button.js +52 -0
  213. package/views/dist/controls/toolbar-button/toolbar-button.d.ts +1 -1
  214. package/views/dist/controls/toolbar-button/toolbar-button.js +2 -3
  215. package/views/dist/controls/toolbar-button.css +4 -0
  216. package/views/dist/controls/toolbar.css +5 -0
  217. package/views/dist/controls/values-editor/values-editor.d.ts +1 -1
  218. package/views/dist/controls/values-editor/values-editor.js +22 -22
  219. package/views/dist/controls/views-list/map-view-menu.d.ts +3 -0
  220. package/views/dist/controls/views-list/map-view-menu.js +25 -0
  221. package/views/dist/controls/views-list/map-views-list-body.d.ts +28 -1
  222. package/views/dist/controls/views-list/map-views-list-body.js +39 -21
  223. package/views/dist/controls/views-list/rules.d.ts +2 -0
  224. package/views/dist/controls/views-list/view-menu.d.ts +7 -0
  225. package/views/dist/controls/views-list/view-menu.js +33 -29
  226. package/views/dist/controls/views-list/views-list.js +4 -4
  227. package/views/dist/controls/views-list/words.d.ts +2 -0
  228. package/views/dist/controls/views-list/words.js +1 -1
  229. package/views/dist/editors/EditorPanel.js +3 -2
  230. package/views/dist/editors/edit-session.js +2 -5
  231. package/views/dist/field-row/FieldRow.d.ts +4 -2
  232. package/views/dist/field-row/FieldRow.js +80 -20
  233. package/views/dist/field-row/FieldRowLane.d.ts +7 -2
  234. package/views/dist/field-row/FieldRowLane.js +4 -3
  235. package/views/dist/field-row/editors/RowEditor.d.ts +12 -0
  236. package/views/dist/field-row/editors/RowEditor.js +31 -1
  237. package/views/dist/field-row/editors/RowValueListEditor.d.ts +5 -1
  238. package/views/dist/field-row/editors/RowValueListEditor.js +4 -1
  239. package/views/dist/field-row/field-row-button.d.ts +5 -0
  240. package/views/dist/field-row/field-row-button.js +2 -0
  241. package/views/dist/fields/binding.d.ts +3 -2
  242. package/views/dist/fields/binding.js +38 -5
  243. package/views/dist/fields/money.d.ts +5 -2
  244. package/views/dist/fields/money.js +14 -2
  245. package/views/dist/grid/chrome/GridColumnMenu.d.ts +4 -2
  246. package/views/dist/grid/chrome/GridColumnMenu.js +3 -2
  247. package/views/dist/grid/chrome/GridGroupMenu.d.ts +4 -1
  248. package/views/dist/grid/chrome/GridGroupMenu.js +4 -3
  249. package/views/dist/grid/chrome/GridHeader.d.ts +4 -1
  250. package/views/dist/grid/chrome/GridHeader.js +2 -2
  251. package/views/dist/grid/chrome/GridRow.js +6 -5
  252. package/views/dist/grid/chrome/GridRowCells.js +6 -9
  253. package/views/dist/grid/chrome/GridStructure.d.ts +4 -1
  254. package/views/dist/grid/chrome/GridStructure.js +4 -4
  255. package/views/dist/grid/chrome/GridTable.js +9 -3
  256. package/views/dist/grid/chrome/cell-clipboard.d.ts +4 -2
  257. package/views/dist/grid/chrome/cell-clipboard.js +2 -2
  258. package/views/dist/grid/chrome/cells.js +3 -1
  259. package/views/dist/grid/chrome/grid-column-menu-items.js +1 -1
  260. package/views/dist/grid/chrome/grid-row-menu-items.d.ts +27 -3
  261. package/views/dist/grid/chrome/grid-row-menu-items.js +93 -7
  262. package/views/dist/grid/chrome/grid-row-props.d.ts +7 -2
  263. package/views/dist/grid/chrome/grid-rows-menu.js +34 -6
  264. package/views/dist/grid/chrome/grid-table-props.d.ts +38 -7
  265. package/views/dist/grid/chrome/useGridBatchApi.d.ts +3 -1
  266. package/views/dist/grid/chrome/useGridBatchApi.js +4 -2
  267. package/views/dist/grid/chrome/useGridKeyboard.d.ts +7 -2
  268. package/views/dist/grid/chrome/useGridKeyboard.js +43 -14
  269. package/views/dist/grid/chrome/useGridPendingReconciliation.js +1 -2
  270. package/views/dist/grid/chrome/useGridTableInteractionModel.d.ts +1 -1
  271. package/views/dist/grid/chrome/useGridTableInteractionModel.js +20 -7
  272. package/views/dist/grid/core/clipboard-model.d.ts +3 -1
  273. package/views/dist/grid/core/clipboard-model.js +9 -8
  274. package/views/dist/grid/core/commit-model.d.ts +20 -2
  275. package/views/dist/grid/core/editing-controller.d.ts +21 -0
  276. package/views/dist/grid/core/editing-controller.js +194 -42
  277. package/views/dist/grid/core/editing-model.d.ts +3 -0
  278. package/views/dist/grid/core/editing-model.js +3 -0
  279. package/views/dist/grid/core/edits-sink.d.ts +19 -0
  280. package/views/dist/grid/core/edits-sink.js +2 -0
  281. package/views/dist/grid/core/save-path.d.ts +24 -0
  282. package/views/dist/grid/core/save-path.js +122 -0
  283. package/views/dist/grid/core/spreadsheet-operations.d.ts +3 -0
  284. package/views/dist/grid/core/spreadsheet-operations.js +24 -1
  285. package/views/dist/grid/core/useGridEditing.d.ts +5 -0
  286. package/views/dist/grid/core/useGridEditing.js +6 -0
  287. package/views/dist/grid/index.d.ts +3 -2
  288. package/views/dist/grid/index.js +1 -0
  289. package/views/dist/internal/field-rows.d.ts +26 -0
  290. package/views/dist/internal/field-rows.js +8 -0
  291. package/views/dist/internal/page-close.d.ts +7 -0
  292. package/views/dist/internal/page-close.js +43 -0
  293. package/views/dist/list/answer.d.ts +40 -0
  294. package/views/dist/list/answer.js +43 -0
  295. package/views/dist/list/browser-views-store.d.ts +10 -0
  296. package/views/dist/list/browser-views-store.js +182 -0
  297. package/views/dist/list/bulk-bar.d.ts +7 -0
  298. package/views/dist/list/bulk-bar.js +10 -0
  299. package/views/dist/list/columns.d.ts +24 -0
  300. package/views/dist/list/columns.js +27 -0
  301. package/views/dist/list/edits.d.ts +19 -0
  302. package/views/dist/list/edits.js +56 -0
  303. package/views/dist/list/grid.d.ts +11 -0
  304. package/views/dist/list/grid.js +76 -0
  305. package/views/dist/list/index.d.ts +36 -0
  306. package/views/dist/list/index.js +11 -0
  307. package/views/dist/list/link.d.ts +8 -0
  308. package/views/dist/list/link.js +78 -0
  309. package/views/dist/list/list.d.ts +70 -0
  310. package/views/dist/list/list.js +14 -0
  311. package/views/dist/list/menu.d.ts +31 -0
  312. package/views/dist/list/menu.js +76 -0
  313. package/views/dist/list/parts.d.ts +6 -0
  314. package/views/dist/list/parts.js +66 -0
  315. package/views/dist/list/registry.d.ts +11 -0
  316. package/views/dist/list/registry.js +31 -0
  317. package/views/dist/list/root-base.d.ts +46 -0
  318. package/views/dist/list/root-base.js +137 -0
  319. package/views/dist/list/root.d.ts +41 -0
  320. package/views/dist/list/root.js +168 -0
  321. package/views/dist/list/slot.d.ts +14 -0
  322. package/views/dist/list/slot.js +22 -0
  323. package/views/dist/list/source-answers.d.ts +39 -0
  324. package/views/dist/list/source-answers.js +225 -0
  325. package/views/dist/list/source.d.ts +11 -0
  326. package/views/dist/list/source.js +31 -0
  327. package/views/dist/list/store.d.ts +119 -0
  328. package/views/dist/list/store.js +146 -0
  329. package/views/dist/list/toolbar.d.ts +7 -0
  330. package/views/dist/list/toolbar.js +371 -0
  331. package/views/dist/list/views-axis.d.ts +5 -0
  332. package/views/dist/list/views-axis.js +98 -0
  333. package/views/dist/list/views-store.d.ts +41 -0
  334. package/views/dist/list/views-store.js +1 -0
  335. package/views/dist/list/views.d.ts +72 -0
  336. package/views/dist/list/views.js +411 -0
  337. package/views/dist/model/column-capabilities.d.ts +13 -0
  338. package/views/dist/model/column-capabilities.js +23 -2
  339. package/views/dist/model/column-schema.d.ts +11 -1
  340. package/views/dist/model/preferences.js +1 -1
  341. package/views/dist/model/prefs-buckets.js +1 -1
  342. package/views/dist/model/view-rules.js +1 -0
  343. package/views/dist/panels/index.d.ts +3 -1
  344. package/views/dist/panels/index.js +1 -0
  345. package/views/dist/panels/model.d.ts +2 -0
  346. package/views/dist/panels/react/customize-body.js +1 -0
  347. package/views/dist/panels/react/toolbar/ReadyToolbar.d.ts +47 -4
  348. package/views/dist/panels/react/toolbar/ReadyToolbar.js +6 -326
  349. package/views/dist/panels/react/toolbar/Toolbar.d.ts +17 -2
  350. package/views/dist/panels/react/toolbar/Toolbar.js +43 -23
  351. package/views/dist/panels/react/toolbar/ToolbarAdvancedFilters.js +1 -1
  352. package/views/dist/panels/react/toolbar/ToolbarAsideFilter.js +2 -2
  353. package/views/dist/panels/react/toolbar/ToolbarBarFilter.js +4 -4
  354. package/views/dist/panels/react/toolbar/ToolbarButton.js +7 -1
  355. package/views/dist/panels/react/toolbar/ToolbarFilter.js +1 -1
  356. package/views/dist/panels/react/toolbar/ToolbarFilterAdd.js +1 -1
  357. package/views/dist/panels/react/toolbar/ToolbarFilterSheet.js +1 -1
  358. package/views/dist/panels/react/toolbar/ToolbarFilters.js +2 -2
  359. package/views/dist/panels/react/toolbar/ToolbarNew.js +2 -2
  360. package/views/dist/panels/react/toolbar/ToolbarOptions.js +1 -1
  361. package/views/dist/panels/react/toolbar/ToolbarQuickFilters.d.ts +2 -2
  362. package/views/dist/panels/react/toolbar/ToolbarQuickFilters.js +3 -1
  363. package/views/dist/panels/react/toolbar/ToolbarSearch.js +1 -1
  364. package/views/dist/panels/react/toolbar/ToolbarSort.js +2 -2
  365. package/views/dist/panels/react/toolbar/ToolbarSortPill.js +6 -4
  366. package/views/dist/panels/react/toolbar/context.d.ts +20 -3
  367. package/views/dist/panels/react/toolbar/context.js +3 -1
  368. package/views/dist/panels/react/toolbar/panel-part.d.ts +4 -1
  369. package/views/dist/panels/react/toolbar/panel-part.js +5 -3
  370. package/views/dist/panels/react/views-row/FoldingViewRow.d.ts +1 -1
  371. package/views/dist/panels/react/views-row/FoldingViewRow.js +15 -4
  372. package/views/dist/panels/react/views-row/PillGroup.d.ts +5 -2
  373. package/views/dist/panels/react/views-row/PillGroup.js +16 -7
  374. package/views/dist/panels/react/views-row/ViewPicker.js +2 -12
  375. package/views/dist/panels/react/views-row/ViewPickerRow.d.ts +4 -2
  376. package/views/dist/panels/react/views-row/ViewPickerRow.js +9 -5
  377. package/views/dist/panels/react.d.ts +2 -2
  378. package/views/dist/panels/settings/filter-groups.js +6 -1
  379. package/views/dist/panels/toolbar/edit-view.d.ts +7 -1
  380. package/views/dist/panels/toolbar/edit-view.js +14 -0
  381. package/views/dist/panels/toolbar/model.d.ts +5 -0
  382. package/views/dist/panels/toolbar/model.js +7 -3
  383. package/views/dist/panels/view-state.d.ts +5 -3
  384. package/views/dist/panels/views-row/model.d.ts +19 -2
  385. package/views/dist/panels/views-row/model.js +14 -0
  386. package/views/dist/provider/ViewsProvider.d.ts +21 -8
  387. package/views/dist/provider/ViewsProvider.js +40 -5
  388. package/views/dist/provider/components.d.ts +102 -2
  389. package/views/dist/provider/components.js +1 -1
  390. package/views/dist/provider/context.d.ts +6 -2
  391. package/views/dist/provider/context.js +1 -1
  392. package/views/dist/provider/own-control.d.ts +4 -0
  393. package/views/dist/provider/own-control.js +7 -0
  394. package/views/dist/provider/ports.d.ts +19 -12
  395. package/views/dist/provider/ports.js +69 -1
  396. package/views/dist/provider/select-items.d.ts +3 -0
  397. package/views/dist/provider/select-items.js +6 -0
  398. package/views/dist/react.d.ts +4 -2
  399. package/views/dist/react.js +2 -0
  400. package/views/dist/styles.css +503 -136
  401. package/views/dist/styles.unlayered.css +503 -136
  402. package/views/docs/contract.md +292 -34
  403. package/views/docs/controls/avatar.md +11 -0
  404. package/views/docs/controls/choice.md +0 -1
  405. package/views/docs/controls/compound-editor.md +4 -0
  406. package/views/docs/controls/customize.md +6 -0
  407. package/views/docs/controls/date-editor.md +4 -0
  408. package/views/docs/controls/field.md +7 -0
  409. package/views/docs/controls/filter-editor.md +8 -0
  410. package/views/docs/controls/group-editor.md +6 -0
  411. package/views/docs/controls/input.md +5 -0
  412. package/views/docs/controls/links-editor.md +4 -0
  413. package/views/docs/controls/menu-list.md +8 -0
  414. package/views/docs/controls/menu.md +4 -0
  415. package/views/docs/controls/notice.md +4 -0
  416. package/views/docs/controls/number-editor.md +4 -0
  417. package/views/docs/controls/pane.md +4 -0
  418. package/views/docs/controls/picker.md +8 -0
  419. package/views/docs/controls/quick-filters.md +6 -0
  420. package/views/docs/controls/radio.md +20 -1
  421. package/views/docs/controls/select.md +10 -0
  422. package/views/docs/controls/setting-row.md +18 -0
  423. package/views/docs/controls/sheet.md +4 -0
  424. package/views/docs/controls/sort-editor.md +8 -0
  425. package/views/docs/controls/switch-row.md +0 -3
  426. package/views/docs/controls/tag-field.md +4 -0
  427. package/views/docs/controls/tag.md +1 -0
  428. package/views/docs/controls/text-editor.md +4 -0
  429. package/views/docs/controls/values-editor.md +4 -0
  430. package/views/docs/controls/views-list.md +6 -0
  431. package/views/docs/getting-started.md +2 -2
  432. package/views/docs/guides/atoms.md +2 -2
  433. package/views/docs/guides/columns.md +1 -1
  434. package/views/docs/guides/ports.md +1 -1
  435. package/views/docs/guides/the-grid.md +36 -9
  436. package/views/docs/guides/the-provider.md +22 -3
  437. package/views/docs/index.md +1 -0
  438. package/views/docs/reference/controls.md +41 -29
  439. package/views/docs/reference/editors-session.md +1 -1
  440. package/views/docs/reference/field-row.md +9 -1
  441. package/views/docs/reference/grid.md +15 -9
  442. package/views/docs/reference/list.md +357 -0
  443. package/views/docs/reference/looks.md +1 -1
  444. package/views/docs/reference/panels-react.md +17 -12
  445. package/views/docs/reference/panels.md +8 -5
  446. package/views/docs/reference/react.md +24 -16
  447. package/views/docs/reference/views.md +10 -6
  448. package/views/docs/reshaping.md +6 -1
  449. package/views/skills/views/SKILL.md +9 -6
@@ -4,7 +4,7 @@ Every view reads what it takes from its app, other than its own props, from one
4
4
 
5
5
  ## Mount it once
6
6
 
7
- `ViewsProvider` sits once at your app's client root, above every view. It takes four things and the children: `components` (your primitives), `icons` (your glyphs by meaning), `ports` (your haptics, clipboard and per-device store, and, optionally, a toast and a confirm dialog; [ports](ports.md)) and `conventions`. Ten more are optional: `atoms`, `messages`, `presentation`, `desktopQuery`, `sheetActions`, `escape`, `oneValue`, `severalValues`, `selectionBar` and `datePicks`.
7
+ `ViewsProvider` sits once at your app's client root, above every view. It needs one thing and the children: `components` (your primitives; `components={CONTROLS}` is ViewKit's own, every slot filled). Three more have defaults, so you hand them only to draw your own: `icons` (your glyphs by meaning; absent, each drawn through your `AppIcon` by its name, which `CONTROLS.AppIcon` draws with ViewKit's own glyphs), `ports` (your haptics, clipboard, per-device store, toast and confirm dialog, each optional; [ports](ports.md)) and `conventions` (absent, `en-US` in `UTC`). Eleven more are optional: `atoms`, `messages`, `presentation`, `desktopQuery`, `sheetActions`, `escape`, `oneValue`, `severalValues`, `selectionBar`, `datePicks` and `panelControls` (your own controls inside ViewKit's panels, below).
8
8
 
9
9
  `desktopQuery` says which screens are desktops: there an editor opens as a popover, and elsewhere as a sheet; so do the toolbar's panels and the views picker outside a `Toolbar` (inside one, the toolbar's phone form decides), and the grid's own chrome: a row's and a group's ⋯ and the row actions show on hover on a desktop, and a row's and a group's ⋯ always elsewhere, where the row actions don't show. It defaults to `DEFAULT_DESKTOP_QUERY`, `(min-width: 1024px)`; hand in the query your own shell switches on, so the editors and your layout change at the same width. A server render counts as a desktop.
10
10
 
@@ -59,7 +59,7 @@ The provider hands its views one value for each distinct set of inputs, so pass
59
59
 
60
60
  ## Conventions
61
61
 
62
- `conventions` is the same `FieldConventions` object you hand `viewkitjs/fields`. Every value a view draws reads through it: numbers, dates and durations in its `locale`, instants in its `timeZone`, a phone of its `region` written as at home. Fields' own words, such as how long ago something was, resolve through its `messages`; only the strings the views package owns go through the provider's `messages` (below).
62
+ `conventions` is the same `FieldConventions` object you hand `viewkitjs/fields`; hand none and the provider reads `en-US` in `UTC`, one object, the same on the server and in the browser. Every value a view draws reads through it: numbers, dates and durations in its `locale`, instants in its `timeZone`, a phone of its `region` written as at home. Fields' own words, such as how long ago something was, resolve through its `messages`; only the strings the views package owns go through the provider's `messages` (below).
63
63
 
64
64
  A request that carries its own locale adds it with `with`, which returns a new object and keeps everything it doesn't name:
65
65
 
@@ -73,7 +73,7 @@ assert.equal(conventions.locale, "en-GB"); // the app's own, untouched
73
73
 
74
74
  ## The components map
75
75
 
76
- The package draws nothing with a UI library of its own. `ViewsComponents`, from `viewkitjs/views/react`, is the map you hand it: `Button`, `Popover`, `Tooltip`, `Checkbox`, `Menu`, `Collapse`, `Sheet`, `AppIcon`, `Markdown`, `TextBody` (a whole body for a text typed as one string), `NumberBody` (a whole body for a number, money or a percent), `Picker` (a whole pick list), `LinksBody` (a whole links body: each link's roles and its lead), `DateBody` (a whole date body), `PartsBody` (a whole body for a name, a place or a range) and `ValuesBody` (a whole body for several emails, phones, links or domains), `SortBody` (the sort editor's whole body), `FilterBody` (the filter editor's whole body), `FilterPartBody` (a filter rule's way and value), `FieldsBody` (the field list's whole body), `QuickFiltersBody` (the quick filters' whole body), `ViewsListBody` (the views list's whole body) and `CustomizeBody` (Customize's whole body), and eight you may leave out: `Input`, `Command` (the command list's parts, for the grid's menus on the popover route), `Calendar` (the filter panel's month), `RowsWait` (what a grid's rows wait in while new ones load), `GroupBody` (deprecated: read by nothing), `SearchField` (the toolbar's search box), `PortsHost` (what draws the `toast` and `confirm` ports you leave out) and `SelectionBar` (the selection bar). The [contract](../contract.md#the-components-map) says what each slot must accept; the [`viewkitjs/views/react` reference](../reference/react.md) lists every prop.
76
+ The package draws nothing with a UI library of its own. `ViewsComponents`, from `viewkitjs/views/react`, is the map you hand it: `Button`, `Popover`, `Tooltip`, `Checkbox`, `Menu`, `Collapse`, `Sheet`, `AppIcon`, `Markdown`, `TextBody` (a whole body for a text typed as one string), `NumberBody` (a whole body for a number, money or a percent), `Picker` (a whole pick list), `LinksBody` (a whole links body: each link's roles and its lead), `DateBody` (a whole date body), `PartsBody` (a whole body for a name, a place or a range) and `ValuesBody` (a whole body for several emails, phones, links or domains), `SortBody` (the sort editor's whole body), `FilterBody` (the filter editor's whole body), `FilterPartBody` (a filter rule's way and value), `FieldsBody` (the field list's whole body), `QuickFiltersBody` (the quick filters' whole body), `ViewsListBody` (the views list's whole body) and `CustomizeBody` (Customize's whole body), and ten you may leave out: `Input`, `Select` (the panels' boxes that pick, drawn only under `panelControls`), `Command` (the command list's parts, for the grid's menus on the popover route), `Calendar` (the filter panel's month), `RowsWait` (what a grid's rows wait in while new ones load), `GroupBody` (deprecated: read by nothing), `SearchField` (the toolbar's search box), `PortsHost` (what draws the `toast` and `confirm` ports you leave out), `SelectionBar` (the selection bar) and `ViewMenu` (a view's whole menu). The [contract](../contract.md#the-components-map) says what each slot must accept; the [`viewkitjs/views/react` reference](../reference/react.md) lists every prop.
77
77
 
78
78
  The shapes are Base UI's, and the types promise three things:
79
79
 
@@ -83,6 +83,23 @@ The shapes are Base UI's, and the types promise three things:
83
83
 
84
84
  So an app on Base UI wraps its own copies thinly, and an app on Radix maps the difference in its adapter. The package's own defaults are `CONTROLS`, from `viewkitjs/views/controls`, on Base UI, an optional peer: spread it first and your own controls after. Every other door depends on neither library.
85
85
 
86
+ ### Your own controls inside the panels
87
+
88
+ Your `Button`, `Popover` and `Menu` draw the grid's chrome and the toolbar's frame as soon as you hand them. Inside ViewKit's own panels they draw only where you say so, so an app that hands its own for the grid sees no panel change on upgrade:
89
+
90
+ ```tsx
91
+ declare const CONTROLS: ViewsComponents; // from viewkitjs/views/controls
92
+ declare const yourControls: Pick<ViewsComponents, "Button" | "Select" | "Menu" | "Popover" | "Input">; // your own
93
+
94
+ export function ViewsWithYourControls({ children }: { children: ReactNode }) {
95
+ return <ViewsProvider components={{ ...CONTROLS, ...yourControls }} panelControls>{children}</ViewsProvider>;
96
+ }
97
+ ```
98
+
99
+ `panelControls` takes `true` (all five) or the names you want (`["Button", "Select"]`). The sort and filter panels then draw every button, box that picks, menu, popover and text box with yours (VK-1013; the group editor, Customize, the views list and the quick filters follow in VK-1014). Each is handed the map's props, never ViewKit's own look: your Button a `variant` from what it is (an outlined Add sort `outline`, a quiet × `ghost` at `size="icon"`), its icon and words as its children, `aria-disabled` where it can't be used but keeps its focus; your Select its rows, value and pick, `open` and `onOpenChange`, the search's words; your Menu its rows as data, opened at the button that opens it; your Popover its anchor, its close and its `label`; your Input its typing as `onChange`, in your field's frame (`chrome="field"`). Each part's name rides with it as `data-slot` and `data-key`, so your control and your stylesheet meet on one name. A control of `CONTROLS`' stays ViewKit's whatever `panelControls` says. A `Select` of your own that `panelControls` doesn't name is never drawn, and ViewKit says so once in development.
100
+
101
+ Still ViewKit's inside the panels: the Tooltip, the Picker (the field lists), the menu rows of ViewKit's own menus, the sort's grip, the filter's number and range boxes (ViewKit's Number field), and the filter bar's way-and-value box (`FilterPartBody`, VK-1014). A filter rule's value box is named by what holds it (`vk-filter-value`), not on the box your Select or Input draws.
102
+
86
103
  ### An adapter over Radix
87
104
 
88
105
  Radix opens a popover from a trigger and reports no close reasons. The adapter answers both. It hands Radix's `Anchor` a virtual ref, an object whose `getBoundingClientRect` measures the package's anchor, whichever of the three it is. It records the reason in the handler Radix calls just before it closes. And it turns the package's two vetoes, `onOutsidePress` and `onEscape`, into `preventDefault` on the event Radix hands that handler.
@@ -331,6 +348,8 @@ The contract's [Writing an adapter](../contract.md#writing-an-adapter) holds the
331
348
 
332
349
  The rendering asks for its glyphs by what they mean (`sortAsc`, `relation`, `more`, `warning`), never by a library's name. `ICON_NAMES`, from `viewkitjs/views`, lists them all, and `ViewsIcons` is a record with one component per name, each taking a `className`. Because it is a full record, a meaning the contract adds fails your compile until you map it.
333
350
 
351
+ Hand none and the provider draws each meaning through your components map's `AppIcon` by its name: `CONTROLS.AppIcon` draws ViewKit's own glyphs, Tabler's as the Outright kit draws them (`CONTROL_ICONS`, from `viewkitjs/views/controls`). An app with icons of its own maps them as below; one with its own `AppIcon` that keeps ViewKit's glyphs hands `icons={CONTROL_ICONS}`.
352
+
334
353
  Most libraries name many of these the same way; spell out the ones yours names differently.
335
354
 
336
355
  ```tsx
@@ -55,3 +55,4 @@ One page per door. Each lists every name the door exports.
55
55
  - [`viewkitjs/views/controls`](reference/controls.md): ViewKit's default controls on Base UI, the Button and the Spinner, and `CONTROLS` for the components map
56
56
  - [`viewkitjs/views/panels`](reference/panels.md): what a list's panels read and say, built from its settings, and the toolbar's arrangement, with no React
57
57
  - [`viewkitjs/views/panels/react`](reference/panels-react.md): the panels as they draw, the toolbar's frame, its parts and the ready toolbar
58
+ - [`viewkitjs/views/list`](reference/list.md): a list's source, the request it sends and the answer it reads; its root, which holds its state, and the toolbar that reads it
@@ -4,7 +4,8 @@ Import from `viewkitjs/views/controls` to draw ViewKit's default controls: the O
4
4
 
5
5
  ## The defaults
6
6
 
7
- - `CONTROLS` — the components map's defaults, for each control an app leaves out: each control below that fills a slot of the map. An app spreads it first and its own controls after, `components={{ ...CONTROLS, ...own }}`. Its `Button` draws ViewKit's buttons (`variant`, `size`) as the kit's Button's kinds and sizes, stands a glyph handed before the words as the Button's icon, and one handed after them as its end icon.
7
+ - `CONTROLS` — the components map's defaults, for each control an app leaves out: each control below that fills a slot of the map. An app spreads it first and its own controls after, `components={{ ...CONTROLS, ...own }}`. Handed as it stands, `components={CONTROLS}`, it brings `CONTROL_ATOMS` too, under the provider's `atoms`; a map spread from it brings none. Its `Button` draws ViewKit's buttons (`variant`, `size`) as the kit's Button's kinds and sizes, stands a glyph handed before the words as the Button's icon, and one handed after them as its end icon. Its `AppIcon` draws ViewKit's own glyph of each name (`CONTROL_ICONS`), and nothing for a name it doesn't draw; a provider handed no `icons` draws every meaning through it. Its `Markdown` draws the stored text as it stands, its line breaks kept, with no renderer. Its `Button`, `Select`, `Menu`, `Popover` and `Input` are ViewKit's own: named in the provider's `panelControls`, they still draw the panels exactly as without it.
8
+ - `CONTROL_ICONS` — ViewKit's default glyphs by meaning, a `ViewsIcons` over every `ICON_NAMES` meaning, each a Tabler icon as the Outright kit draws it (a line of 2 in the colour of its words; the carets filled; `loading` the Spinner): what `CONTROLS.AppIcon` draws, for an app with an `AppIcon` of its own that keeps ViewKit's glyphs, `icons={CONTROL_ICONS}`.
8
9
  - `leadingGlyph` — `leadingGlyph(children, glyphs)`: a glyph before a button's words (an svg, or one of the app's icons or its `AppIcon` in `glyphs`) as `icon`, one after them as `iconEnd`, and the words as `label`; a glyph alone, or another component, stays `{ label }`.
9
10
 
10
11
  <!-- One block per lane of control moves, each opened by its comment: a move adds its controls' sections inside its own block alone. -->
@@ -76,7 +77,7 @@ Import from `viewkitjs/views/controls` to draw ViewKit's default controls: the O
76
77
 
77
78
  ## The phone's header bar
78
79
 
79
- - `HeaderBar` — the phone's one header row, on a page and in a sheet's head: a `left` place, the `title` (centred, or `titleAt` `left`), an optional `description` under it (drawn by `descriptionRender` when it must be the caller's element), and a `right` place, which is the Glass button group. It stands on the soft edge under Glass, the frame's `data-phone-header-surface` (Glass unless it says `flat`); `--hd-bar-room` says how much room stands over it.
80
+ - `HeaderBar` — the phone's one header row, on a page and in a sheet's head: a `left` place, the `title` (centred, or `titleAt` `left`), an optional `mark` beside it (a record's Avatar at 24, never shrinking while the title cuts with …), an optional `description` under it (drawn by `descriptionRender` when it must be the caller's element), and a `right` place, which is the Glass button group. It stands on the soft edge under Glass, the frame's `data-phone-header-surface` (Glass unless it says `flat`); `--hd-bar-room` says how much room stands over it.
80
81
  - `HeaderBarProps` — its props.
81
82
  - `SoftEdge` — what a floating head stands on, so what passes under it melts away with no line; what it stands in sets its height and, in `--soft-edge-ground`, its ground.
82
83
 
@@ -88,7 +89,7 @@ Import from `viewkitjs/views/controls` to draw ViewKit's default controls: the O
88
89
  - `SheetForm` — `full`, `floating`, `blend` or `edge`.
89
90
  - `SheetStop` — a height it rests at: a share of the window up to 1, px above it, or `mark`, measured under what it holds.
90
91
  - `STOPS` — the stops a sheet may be given: `small`, `middle` and `full`.
91
- - `SheetHead` — its head, the phone's header bar under its handle: Glass, its X or Back on the left, or Flat; or `left` and `right` of its own.
92
+ - `SheetHead` — its head, the phone's header bar under its handle: Glass, its X or Back on the left, or Flat; or `left` and `right` of its own; a `mark` beside its title, as `HeaderBar`'s; a `step` (`{ id, back }`, as its body's `SheetStep`) it heads, so its row is drawn afresh for each step and what stands in it slides in with it, from the left going back.
92
93
  - `SheetHeadProps` — its props.
93
94
  - `SheetBody` — what scrolls under its head; at a lower stop a drag raises the sheet instead.
94
95
  - `SheetFoot` — its foot, at the screen's foot at every stop.
@@ -134,7 +135,7 @@ Import from `viewkitjs/views/controls` to draw ViewKit's default controls: the O
134
135
  - `FieldSet` — fields or choices that answer one question under their own `legend`, with their own note and error; `disabled` reaches every choice in it.
135
136
  - `FieldSetProps` — its props.
136
137
  - `FieldSeparator` — a line between fields, with a word on it.
137
- - `FieldRows` — Field rows' card: fields as rows of one card on a phone, or each its own card; `look` its own, whole.
138
+ - `FieldRows` — Field rows' card: fields as rows of one card on a phone, or each its own card; `look` its own, whole. A `Field` placed in it is the card's row: its label in the row's column, its Input or InputGroup typed in place beside it (no box, the caret in the brand, an InputGroup's start words its prefix and its end button in the brand), `saving` and `saved` at the row's end; its note and error stand under the card, in a foot it draws while any Field in it has one (`o-field-rows-foot`), an error in place of every note, each still describing its control. A Field inside a `FieldRowsRow` is not a row. A `FieldRow` inside it draws as one of its rows on a phone.
138
139
  - `FieldRowsProps` — its props.
139
140
  - `FieldRowsRow` — a row of Field rows: its label beside its control (`as`: `label`, `button`, `div`).
140
141
  - `FieldRowsRowProps` — its props.
@@ -186,12 +187,12 @@ Their stylesheets are `input.css`, `inline-input.css`, `field.css`, `toggle.css`
186
187
 
187
188
  ## The Switch
188
189
 
189
- - `Switch` — turns a setting on or off, at once, on Base UI's switch: `size` `sm`, `md` or `lg` (on a phone `md` takes `lg`'s), `saving` (its thumb turns and a press does nothing), `locked` (a lock in its thumb) and its two `words`. Give it an `aria-label`, or a label round it.
190
+ - `Switch` — turns a setting on or off, at once, on Base UI's switch: `size` `sm`, `md` or `lg` (on a phone `md` takes `lg`'s), `saving` (its thumb turns and a press does nothing), `locked` (a lock in its thumb; on a phone the switch faded, with no lock) and its two `words`. On a phone its Capsule, what nothing picked draws, is iOS 26's 28 × 63, its thumb 24 × 37. Give it an `aria-label`, or a label round it.
190
191
  - `SwitchProps` — its props: Base UI's switch's, with those above.
191
192
 
192
193
  ## The atoms drawn with them
193
194
 
194
- - `CONTROL_ATOMS` — the atoms drawn with the default controls, for an app that takes them: it spreads them over its own, `atoms={{ ...CONTROL_ATOMS, ...own }}`. Taking none keeps ViewKit's own atoms, which need no Base UI. The rows' are `Tag` (a select's value as the Option, in its colour), `StatusBadge` (a status as the Status at its place) and `CellMore` (the rest of a cell's values as the Tag's count).
195
+ - `CONTROL_ATOMS` — the atoms drawn with the default controls, for an app that takes them. `components={CONTROLS}` brings them, its `atoms` laid over them atom by atom; an app that spreads `CONTROLS` into a map of its own spreads them over its own, `atoms={{ ...CONTROL_ATOMS, ...own }}`. Taking none keeps ViewKit's own atoms, which need no Base UI. The rows' are `Tag` (a select's value as the Option, in its colour), `StatusBadge` (a status as the Status at its place) and `CellMore` (the rest of a cell's values as the Tag's count). The panels' is `ToolbarButton`: every button the ready toolbar draws (the search's, New, the sort, Filter, View settings, a filter's joined parts, and in an app's own frame the views chip, the view tabs, "+N", "+", Clear and Save) as the toolbar button, each part dressed as the Toolbar's own and New in the form the Toolbar's New picks, read off the frame around it (nothing set, Outright's), or as its icon alone, named, where its part is placed `words: "icon"` (`word={null}`). Its count is a count, never a ✕ that clears what it counts.
195
196
  - `colourOf` — `colourOf(color)`: a value's colour as ViewKit names it, as the Option's (`gray` is `grey`).
196
197
  - `statusPlaceOf` — `statusPlaceOf(slot)`: where a status of a slot stands on the Status's path (`running` and `primary` are a step between).
197
198
  - `quartersOf` — `quartersOf(steps, at)`: a step between at its quarters (1, 2 or 3) among the steps between, in their order.
@@ -209,7 +210,8 @@ Their stylesheets are `input.css`, `inline-input.css`, `field.css`, `toggle.css`
209
210
  - `MenuListRow` — a name and its value as one row standing alone, at the list's own height and inset.
210
211
  - `MenuScroll` — what scrolls in a menu's panel: its rows alone, the Scrollbar over them.
211
212
  - `MenuEntry` — a row of a menu: an action, a link, a tick, a choice or actions one level in, a pick under a heading, a group, a separator.
212
- - `MenuChoice` — a choice: its value, its name, its mark and its `detail`.
213
+ - `MenuChoice` — a choice: its value, its name, its mark, its `detail` and its public name (`slot`, a `PartSlot`).
214
+ - `PartSlot` — a part's public name (`slot`, its `data-slot`) and which one of its kind it is (`key`, its `data-key`; `index`, its `data-index`): what a `MenuEntry`, a `MenuChoice` and a `PickerItem` carry as `slot`, drawn on the row in every form (VK-988). A `pick` or a `group` names its rows through its choices or entries.
213
215
  - `MenuListEntry` — a menu's entry with what a row adds: a `note` under its name, an `end` on its right, a `grip`.
214
216
  - `MenuListTile` — one of the few done most, as a tile.
215
217
  - `tilesOf` — `tilesOf(entries, allRows?)`: the first four plain actions as tiles when there are three or more, the rest as rows.
@@ -273,12 +275,13 @@ Their stylesheets are `input.css`, `inline-input.css`, `field.css`, `toggle.css`
273
275
  - `ContextMenu` — the same menu at the pointer, from a right-click on what it wraps; on a phone a long press opens the Sheet.
274
276
  - `MenuDots` — the ⋯ button: the Button's quiet icon form at 32px, the neutral fill under the pointer and while its menu is open.
275
277
  - `useSheetMenus` — whether menus are the Sheet here: on a phone, or in a phone's screen standing on a page.
276
- - `MapMenu` — the components map's default `Menu` (`CONTROLS.Menu`): ViewKit's menu rows drawn as the Menu at their anchor.
277
- - `menuEntries` — `menuEntries(items)`: ViewKit's menu rows (`ViewsMenuItem`) as the Menu's own kinds: ticks that close side by side one pick, a group beside its row a level in, a disabled row saying why.
278
+ - `MapMenu` — the components map's default `Menu` (`CONTROLS.Menu`): ViewKit's menu rows drawn as the Menu at their anchor; a row carrying its own `slot` drawn with it as its name.
279
+ - `MapSelect` — the components map's default `Select` (`CONTROLS.Select`): the map's `ViewsSelectProps` drawn as ViewKit's own Select, its list as wide as its rows need, its rows one level in opened in place. The panels draw ViewKit's Select itself unless your own is opted in; hand or wrap this to have ViewKit's back.
280
+ - `menuEntries` — `menuEntries(items, notNow?, rowSlot?)`: ViewKit's menu rows (`ViewsMenuItem`) as the Menu's own kinds: ticks that close side by side one pick, a group beside its row a level in, a disabled row saying why; handed `rowSlot` (VK-988), each row and choice named by it, `data-key` its item's key.
278
281
 
279
282
  ## The Avatar
280
283
 
281
- - `Avatar` — who or what a row is about: a person a circle on their tone, a thing, the workspace or an agent a square, which a `colour` stands on one of the label hues; `size` 16 to 64, a photo or logo by `src`, its kind's `icon`, `presence` or a `badge` on its corner.
284
+ - `Avatar` — who or what a row is about: a person a circle on their tone, a thing, the workspace or an agent a square, which a `colour` stands on one of the label hues (on a phone an agent's bold, the hue under a white letter, as an app's tile); `size` 16 to 64, a photo or logo by `src`, its kind's `icon`, `presence` or a `badge` on its corner.
282
285
  - `AvatarProps` — its props.
283
286
  - `AvatarSize` — its sizes, 16, 20, 24, 32, 40, 56 and 64; a stack takes neither 16 nor 56.
284
287
  - `AvatarColour` — a square's own colour: blue, green, amber, red, purple, pink, teal or grey, the Option's list; the square on the hue's fill, what it holds in its strong ink, with no edge.
@@ -291,19 +294,19 @@ Their stylesheets are `input.css`, `inline-input.css`, `field.css`, `toggle.css`
291
294
 
292
295
  ## The Picker's core
293
296
 
294
- - `usePicker` — `usePicker(props)`: the Picker's parts for a shell to pour in, its body and on a phone the Sheet head's buttons: a list to pick from, with its search, the empty row, Create, several held, a row's own menu (on a phone in a frame of its own by `menuFrame`; its words, and the ⋯'s beside a phone's search, by `menuWords`), levels one in and rows put in order. Its options are read off the frame round it (`pickerWornOf`). ↓ and ↑ pass a greyed row by.
297
+ - `usePicker` — `usePicker(props)`: the Picker's parts for a shell to pour in, its body and on a phone the Sheet head's buttons: a list to pick from, with its search, the empty row, Create, + Add (`onAdd`, `adding`, `addRefused`: a row after the matches that asks the app and picks nothing, Adding… while it answers, its refusal where the row was; on a phone the bar's Add), several held, a row's own menu (on a phone in a frame of its own by `menuFrame`; its words, and the ⋯'s beside a phone's search, by `menuWords`), levels one in and rows put in order. Its options are read off the frame round it (`pickerWornOf`). ↓ and ↑ pass a greyed row by.
295
298
  - `Picker` — the Picker's body alone.
296
299
  - `PickerUnder` — the Picker under a box that opens it, on a computer (the Select's): its root round the box, its list in the box's panel.
297
300
  - `PickerProps` — its props.
298
301
  - `PickerUnderProps` — `PickerUnder`'s props.
299
- - `PickerWords` — every word the Picker draws of its own (what the list is doing, Create, Loading more, the count and Clear all, a phone's Selected card, its bar's Create and ⋯, Cancel and ✓, ‹ and a row's ⋮, and "you"), handed as `words`, each the app's where given.
302
+ - `PickerWords` — every word the Picker draws of its own (what the list is doing, Create, + Add and Adding…, Loading more, the count and Clear all, a phone's Selected card, its bar's Create, Add and ⋯, Cancel and ✓, ‹ and a row's ⋮, and "you"), handed as `words`, each the app's where given.
300
303
  - `PICKER_WORDS` — those words in English, the default.
301
304
  - `PickerParts` — what `usePicker` hands back: the body, and on a phone the Sheet head's props.
302
305
  - `PickerAction` — an action at its foot (New view…).
303
306
  - `PickerDoing` — what its list is doing: `searching` or `failed`.
304
307
  - `PickerLead` — the row that leads, where its field leads several.
305
308
  - `PickerBoxSearch` — what a box that is its search is handed: its keys and what it holds.
306
- - `PickerItem` — a row handed to it: its value, words, second line, group, level, menu, count, and the words its search also finds (`also`).
309
+ - `PickerItem` — a row handed to it: its value, words, second line, group, level, menu, count, the words its search also finds (`also`), and its public name (`slot`, a `PartSlot`, VK-988).
307
310
  - `PickerAs` — what a row is drawn as: an Option, a Status, an Avatar, a sign or a mark.
308
311
  - `PickerRow` — a row its list shows.
309
312
  - `RowsInput` — what its rows are worked out from.
@@ -321,7 +324,7 @@ Their stylesheets are `input.css`, `inline-input.css`, `field.css`, `toggle.css`
321
324
 
322
325
  ## The Select
323
326
 
324
- - `Select` — a field to pick one or several from a closed list: the Input's box, its list the Picker under it on a computer and in the full Sheet on a phone; typed into (`searchIn="field"`), with chips, a search, Create, a server search, a clear row; or alone (`opens`), owning no list.
327
+ - `Select` — a field to pick one or several from a closed list: the Input's box, its list the Picker under it on a computer and in the full Sheet on a phone; typed into (`searchIn="field"`), with chips, a search, Create, a server search, a clear row; or alone (`opens`), owning no list; its label over the box, or inside it before its value on the outline Button (`labelAt`).
325
328
  - `SelectProps` — its props.
326
329
  - `SelectListProps` — its props with a list of its own.
327
330
  - `SelectAloneProps` — its props alone, owning no list.
@@ -356,7 +359,7 @@ A list's panel at its right edge, on a computer, on Base UI's dialog, not modal:
356
359
 
357
360
  ## The toolbar button
358
361
 
359
- What stands in a toolbar: the view switcher, View settings, the sort, each filter on the filter bar, a phone's round buttons. It is the Button, on Base UI's Toolbar button inside a toolbar: its ground picks the Button's kind (ghost the quiet, bordered the outline, filled the soft), its size the Button's height, its words whether it is icon-only, so every Button option an app sets reaches it. Its own options are read off the frame around it (`data-toolbar-button-<option>`), a computer's or a phone's, and change as the frame's attributes change; what it holds can say otherwise for itself. Nothing set, it is bordered, 32, its icon and word on a computer, and filled, 36, round, its icon alone on a phone. Its stylesheet is `viewkitjs/views/controls/toolbar-button.css`, after the Button's; its options and looks are `TOOLBAR_BUTTON_LOOKS`. ViewKit's own toolbar still draws its `ToolbarButton` atom: an app hands this control through its own atom.
362
+ What stands in a toolbar: the view switcher, View settings, the sort, each filter on the filter bar, a phone's round buttons. It is the Button, on Base UI's Toolbar button inside a toolbar: its ground picks the Button's kind (ghost the quiet, bordered the outline, filled the soft), its size the Button's height, its words whether it is icon-only, so every Button option an app sets reaches it. Its own options are read off the frame around it (`data-toolbar-button-<option>`), a computer's or a phone's, and change as the frame's attributes change; what it holds can say otherwise for itself. Nothing set, it is bordered, 32, its icon and word on a computer, and filled, 36, round, its icon alone on a phone. Its stylesheet is `viewkitjs/views/controls/toolbar-button.css`, after the Button's; its options and looks are `TOOLBAR_BUTTON_LOOKS`. ViewKit's own toolbar draws its `ToolbarButton` atom, which `CONTROL_ATOMS.ToolbarButton` draws with this control, under `components={CONTROLS}` or `atoms={CONTROL_ATOMS}`; an app with neither keeps ViewKit's own button.
360
363
 
361
364
  Its name here is `ToolbarButtonControl`: `viewkitjs/views/panels/react` already names the toolbar's part `ToolbarButton`, and one package holds no two public names alike.
362
365
 
@@ -367,13 +370,13 @@ Its name here is `ToolbarButtonControl`: `viewkitjs/views/panels/react` already
367
370
  - `ToolbarButtonSize` — `28`, `32`, `36` or `44`.
368
371
  - `ToolbarButtonSmoothing` — `app`, `smooth` or `round`.
369
372
  - `InToolbar` — the toolbar it stands in: `{ size, form }`, which it takes unless it says its own, and inside which it is one of the toolbar's stops.
370
- - `useToolbarButtonWorn(el, phone)` — its options as worn around `el`, kept up to date: what a toolbar reads for its row's height.
373
+ - `useToolbarButtonWorn(el, phone)` — its options as worn around `el`, kept up to date: what a toolbar reads for its row's height. Every reader on the page shares one observer, so a toolbar of buttons opens one.
371
374
 
372
375
  ## The Radio
373
376
 
374
377
  One of a few choices, all of them in sight, on Base UI's radio group: the arrow keys move the choice, a hidden input carries it in a form, and the label round a ring presses it. Its stylesheet is `viewkitjs/views/controls/radio.css`; the words beside a choice and a card's edge and ground (`o-choice-*`) are drawn by `choice.css`, as the Checkbox's are, and its ring's pressing area by `press.css`. Its group marks a phone from the device (`data-vk-phone`), where marked cards stand one under another and tiles on one card. The Links editor draws a link's lead with it.
375
378
 
376
- - `RadioGroup` — its choices, one under another: its `label` (the group a FieldSet, its name the legend; without one, give it an `aria-label`), `row` for two to four side by side, `tiles` for marked cards three across, and Base UI's group props (`value`, `defaultValue`, `onValueChange`, `disabled`).
379
+ - `RadioGroup` — its choices, one under another: its `label` (the group a FieldSet, its name the legend; without one, give it an `aria-label`), `row` for two to four side by side, `tiles` for marked cards three across, and Base UI's group props (`value`, `defaultValue`, `onValueChange`, `disabled`). At a setting row's end under At the end (a `Field` in a computer's `SettingRows`) it is a Select of its Radios, their words alone, its pick handed to `onValueChange`; a group of swatches stays swatches.
377
380
  - `RadioGroupProps` — its props.
378
381
  - `Radio` — one choice: its `value`, its `label` and `note` beside it, `card` drawn as a card, `mark` a mark in place of the ring on a marked card.
379
382
  - `RadioProps` — its props.
@@ -419,7 +422,7 @@ What the view switcher opens: the Picker over a list's views, each its layout's
419
422
  - `listed` — the views as the list shows them: as they are, or with private views on, the shared ones, then the reader's own.
420
423
  - `SHARED` — the shared views' heading's English ("Shared").
421
424
  - `JUST_ME` — the reader's own views' heading's English ("Just me").
422
- - `ListView` — a view as an app hands it: its `id`, `name`, `layout`, and `private`, `favorite`, `changed` and `count` where it has them.
425
+ - `ListView` — a view as an app hands it: its `id`, `name`, `layout`, and `private`, `favorite`, `changed`, `count` and `readOnly` (no Rename, Private view, Save or Delete in its menu) where it has them.
423
426
  - `ViewsListLayout` — a layout a view takes: its `id`, `name`, `mark`, its one `line`, and `columns` where it asks which field makes its columns.
424
427
  - `ViewsListChange` — what happened, handed on as it happens.
425
428
  - `viewsListWornOf` — the options worn round an element, `{ privateViews, favorites }`.
@@ -449,6 +452,8 @@ A view's menu and what it opens (VK-823), for an app that draws its own menu or
449
452
 
450
453
  `CONTROLS.ViewsListBody`, handed the axis's `verbs`, draws a view's menu through `useViewMenu`: on a computer the delete question goes to your `confirm` port and the deletion to your `toast` port; on a phone a view's ⋯ turns the one Sheet into its menu, with Back, and what it opens turns it again. Without `verbs` a view's menu is its `menu` rows, on a phone a step of the one Sheet too.
451
454
 
455
+ `CONTROLS.ViewMenu` is the same menu at a views row's pill or a folded view's `⋮` (VK-947): one view's items from the axis's `verbs` through `useViewMenu`, reshaped by `verbs.menu`, drawn by your `Menu`, with Rename… and New view in the Modal beside it, the delete question asked through your `confirm` port on a computer and the deletion said through your `toast` port, with Undo. Handed no `view`, it is the views row's +: New view's Modal stands as it mounts, its create handed to `verbs.onChange`.
456
+
452
457
  `CONTROLS.ViewsListBody` draws it where the view switcher opens: the axis's views, each its glyph by your `AppIcon`, its count and its menu rows as the Menu's (a row with no reason it can't be used says your `views.menus.not-now`), New view from `onCreate` in the axis's word, an order handed to `onReorder` as one whole block and never one that moves a view `canDrag` refuses, Shared and the reader's own wherever a view is private, and every word your messages'. It is internal: `CONTROLS` is the way in.
453
458
 
454
459
  ## The filter editor
@@ -577,7 +582,7 @@ What View settings opens: the view's sections as the Menu list's rows, Layout, C
577
582
  - `SheetPartsFrom` — what a Sheet holds for a body that heads it: the body hands its title, Back, ✕ and foot, drawn in place of the Sheet's head. The controls' Sheet holds it; an app's own may too.
578
583
  - `SheetParts` — what a body hands its Sheet.
579
584
 
580
- `CONTROLS.CustomizeBody` draws ViewKit's Customize body with it: the view's columns and layout, each change handed back as one write; the layout's own settings, its toggles, Columns' own Reset and the shared view's foot (Reset and Save for everyone; under the kit's foot, Clear and Save; with no shared view, the foot's Clear); its Filter, Sort and Group through the filter, sort and group editors, narrow on a computer, each step a level under its head on a phone. It draws a column's own settings one level into Columns, your field editor's rows for that column under them and its footer under Columns' rows, and on a card layout each field's new-line toggle. The view's name, Copy link and Export come through the toolbar (`ToolbarOptions`' and `ReadyToolbar`'s `viewName`, `onRenameView`, `onCopyLink`, `onExport`, `exportCount`), each drawn only where handed, and on a phone the level a section stands on (Group by's fields, Add sort's) is told as its step (`onStepChange`), so the sheet's Escape goes back a level. Every word is the app's, from its messages. It is internal: `CONTROLS` is the way in.
585
+ `CONTROLS.CustomizeBody` draws ViewKit's Customize body with it: the view's columns and layout, each change handed back as one write; the layout's own settings, its toggles, Columns' own Reset and the shared view's foot (Reset and Save for everyone, or Save on the person's own view; under the kit's foot, Clear and Save; with no shared view, the foot's Clear); its Filter, Sort and Group through the filter, sort and group editors, narrow on a computer, each step a level under its head on a phone. It draws a column's own settings one level into Columns, your field editor's rows for that column under them and its footer under Columns' rows, and on a card layout each field's new-line toggle. The view's name, Copy link and Export come through the toolbar (`ToolbarOptions`' and `ReadyToolbar`'s `viewName`, `onRenameView`, `onCopyLink`, `onExport`, `exportCount`), each drawn only where handed, and on a phone the level a section stands on (Group by's fields, Add sort's) is told as its step (`onStepChange`), so the sheet's Escape goes back a level. Every word is the app's, from its messages. It is internal: `CONTROLS` is the way in.
581
586
 
582
587
  ## The Modal
583
588
 
@@ -696,21 +701,21 @@ On a phone, a pill at the list's foot naming what quick filters hold while they
696
701
 
697
702
  ## The Toolbar
698
703
 
699
- The Outright kit's Toolbar, on Base UI's toolbar: the row and, under it, the filter bar, a step smaller; on a phone one line. Tab reaches the whole of it once, the arrows run through its lines and loop, Home and End reach its ends; in a text box the arrows move the caret and step out at its ends. Handed a list's places (`views`, `settings`, `search`, `add`, `sort`, `filter`, `filters`, `quick`, `save`), it stands each where its options pick (`TOOLBAR_LOOKS`, worn as `data-toolbar-*` on the frame round it): View settings beside the views or on the row's right, the sort and Filter on the bar or on the row's right, the filter bar always or once something is added (`added`), lines across or none, Clear and Save on the bar or in View settings, New in its form, the quick filters' button or none; on a phone the sort, Filter, the quick filters' icon and View settings beside the views or on the right, the search a button or its own line. A place may be a function of where it stands (`ToolbarAt`: `row`, `right`, `bar`, `phone`). Handed no places, it is its `children` (the row) and `bar` (the filter bar), as any row of controls. What doesn't fit gives way, each line on its own, from its end: words to icons, then the view tabs into "+N", the filters into "+N filters", then the rest into ⋯, a Menu; a line holds while a Menu holding what folded stands open, or while its holder says `holds`. What never folds: a toolbar button marked `stays`, and the Button (New). Each line's height is its toolbar buttons' (the toolbar button's Size, a phone's its own), given to the Buttons, the Toggle group and the text box in it. Every word it says of its own is handed (`words`). Its stylesheet is `viewkitjs/views/controls/toolbar.css` ([its tokens](../controls/toolbar.md)).
704
+ The Outright kit's Toolbar, on Base UI's toolbar: the row and, under it, the filter bar, a step smaller; on a phone one line. Tab reaches the whole of it once, the arrows run through its lines and loop, Home and End reach its ends; in a text box the arrows move the caret and step out at its ends. Handed a list's places (`views`, `settings`, `search`, `add`, `sort`, `filter`, `filters`, `quick`, `save`), it stands each where its options pick (`TOOLBAR_LOOKS`, worn as `data-toolbar-*` on the frame round it): View settings beside the views or on the row's right, the sort and Filter on the bar or on the row's right, the filter bar always or once something is added (`added`), lines across or none, Clear and Save on the bar or in View settings, New in its form, the quick filters' button or none; on a phone the sort, Filter, the quick filters' icon and View settings beside the views or on the right, the search a button or its own line. A place may be a function of where it stands (`ToolbarAt`: `row`, `right`, `bar`, `phone`). Handed no places, it is its `children` (the row) and `bar` (the filter bar), as any row of controls. What doesn't fit gives way, each line on its own, from its end: words to icons, then the view tabs into "+N", the filters into "+N filters", then the rest into ⋯, a Menu; a line holds while a Menu holding what folded stands open, or while its holder says `holds`. What never folds: a toolbar button marked `stays`, and the Button (New). Handed `fill`, the row's worded buttons grow to share it, the square ones keeping their width, and as it narrows the first worded button with an icon keeps its words while the others give theirs up and fold, giving way itself last; the filter bar draws as without. Handed `more`, ⋯ stands at the row's end holding those entries, what folds joining them in the row's order (an empty list: ⋯ there once something folds). Each line's height is its toolbar buttons' (the toolbar button's Size, a phone's its own), given to the Buttons, the Toggle group and the text box in it. Every word it says of its own is handed (`words`). Its stylesheet is `viewkitjs/views/controls/toolbar.css` ([its tokens](../controls/toolbar.md)).
700
705
 
701
706
  Its frame and its separator are `ToolbarControl` and `ToolbarSeparatorControl`: `viewkitjs/views/panels/react` already names the ready toolbar's frame `Toolbar` and its separator `ToolbarSeparator`, and one package holds no two public names alike. The ready toolbar keeps its own frame.
702
707
 
703
- - `ToolbarControl` — the Toolbar. Its props, `ToolbarProps`: `label` (its name to a screen reader), `children` and `bar`, the places above, `added`, `picks` (its options over the frame's), `barLabel`, `size` and `barSize` (`28`, `32` or `36`), `spacing` (in spacing steps), `fold` (default on), `holds`, `form` (`computer` or `phone`; by default a phone's in a phone's window or a `PhoneHost`), `onMoreViews` and `moreViewsOpen` (where its holder opens what "+N" opens), `words`, `className`, `style`, and Base UI's toolbar's own. Its width is its holder's to give: sized from what it holds in a pill (the bulk bar, the quick filters' reminder), so a holder that draws it as a list's toolbar gives it its width (a flex item with `min-width: 0`), or its row never runs out of room to fold.
708
+ - `ToolbarControl` — the Toolbar. Its props, `ToolbarProps`: `label` (its name to a screen reader), `children` and `bar`, the places above, `added`, `picks` (its options over the frame's), `barLabel`, `size` and `barSize` (`28`, `32` or `36`), `spacing` (in spacing steps), `fold` (default on), `holds`, `fill` (the row's worded buttons share it), `more` (Menu entries ⋯ always holds at the row's end), `form` (`computer` or `phone`; by default a phone's in a phone's window or a `PhoneHost`), `onMoreViews` and `moreViewsOpen` (where its holder opens what "+N" opens), `words`, `className`, `style`, and Base UI's toolbar's own. Its width is its holder's to give: sized from what it holds in a pill (the bulk bar, the quick filters' reminder), so a holder that draws it as a list's toolbar gives it its width (a flex item with `min-width: 0`), or its row never runs out of room to fold.
704
709
  - `ToolbarProps` — its props.
705
710
  - `ToolbarPlace` — a place: what it draws, or a function of where it stands.
706
711
  - `ToolbarAt` — where a place stands: `row`, `right`, `bar` or `phone`.
707
712
  - `ToolbarSeparatorControl` — a line between what belongs together and what doesn't.
708
713
  - `ToolbarSpacer` — room that pushes what follows to its line's far end.
709
714
  - `ToolbarInput` — the text box in a line, one of its stops, at its line's height (`icon` at its start side). In the search's place, a button the Toolbar opens: pressed, its box with the caret in it and a ✕; the ✕, Escape or leaving it empty closes it, and Escape brings the focus back to the button.
710
- - `ToolbarInputProps` — its props: the Input's, and `icon`.
715
+ - `ToolbarInputProps` — its props: the Input's, `icon`, and `words`: `"both"` shows "Search" beside the shut search's icon as the buttons on the right show their words (the Toolbar's "Buttons on the right"; on a phone its icon alone); absent or `"icon"`, its icon alone, as Mihai's look stands it.
711
716
  - `ToolbarFolds` — filters or view tabs a holder draws itself, standing in a line: the line folds them one at a time among its own (`kind`, `filters` or `tabs`; `count`) and hands `children` how many are folded.
712
717
  - `ToolbarFoldsProps` — its props.
713
- - `toolbarSteps` — the steps a line takes as it narrows, in order, for a holder's test.
718
+ - `toolbarSteps` — the steps a line takes as it narrows, in order (`fill` as its second argument), for a holder's test.
714
719
  - `useToolbarWorn` — its options as worn round an element, kept up to date as they change.
715
720
  - `toolbarWornOf` — its options as the frame round an element wears them, each its default where nothing sets it.
716
721
  - `TOOLBAR_ATTRS` — the attributes it watches.
@@ -979,27 +984,34 @@ The label beside a Checkbox, a Radio or a Switch in a settings row (`o-choice-la
979
984
 
980
985
  Tags inside the Input's field, before the caret, in a Field with its label, its note and its error: typing and Enter (or a comma) adds one, a tag already there is not added again, Backspace in an empty box takes the last one off, and each tag has its remove button; disabled, nothing is typed in and the tags have none. The field is an InputGroup, so every state and option of the Input draws it, and on a phone it takes the phone's 44. Its stylesheet is `viewkitjs/views/controls/tag-field.css`, in the ready stylesheet; it stands on the Field's, the Input's and the Tag's. Its names are on [its page](../controls/tag-field.md).
981
986
 
982
- - `TagField` — the field. Its words are its props: `placeholder` says "Add a tag" when none is handed, and each tag's remove button "Remove <tag>", as the Tag's does.
987
+ - `TagField` — the field. Placed in `FieldRows` (or a phone's `SettingRows`) it is the card's row, as iOS draws a To field: its tags tokens in the card (30 tall, a pill on `--vk-neutral`, no edge, no icon), wrapping, the caret after the last and the placeholder only while it holds none; its label names the box out of sight, for its place to title the group (`o-tag-field-row`); its note and error under the card. Its words are its props: `placeholder` says "Add a tag" when none is handed, and each tag's remove button "Remove <tag>", as the Tag's does.
983
988
  - `TagFieldProps` — `label`, `note`, `error`, `disabled`, `defaultValue`, `onValueChange`, `placeholder`, `className`.
984
989
 
985
990
  ## The setting row
986
991
 
987
992
  One setting as a row (`SettingRow`): its name and a line under it on the left (the words beside a choice), its control at its end, a mark or an icon at its start. Its kind is the prop it is given:
988
993
 
989
- - A switch, `switch` — the Switch's props: the whole row a label pressing it, the hovered ground under the pointer.
994
+ - A switch, `switch` — the Switch's props: only the Switch switches it, its words, line and mark pressing nothing, as iOS's Settings; the Switch is named by the row's name (`aria-labelledby`) and described by its line (`aria-describedby`).
990
995
  - A select, `select` — a Select with its own list (its props but `label` and `size`): 36 tall, 220 wide.
991
- - A button, `action` — a button (`SettingAction`: `label`, `icon`, `onClick`, `disabled`): the Button's outline kind, 32 tall; in a danger card its danger kind.
996
+ - A button, `action` — a button (`SettingAction`: `label`, `icon`, `onClick`, `disabled`, `kind`): the Button's outline kind, 32 tall; in a danger card its danger kind; `kind` (`outline` or `danger`) says it, an undoable one outline in the danger zone (Leave).
992
997
  - › to its page, `onOpen` — the whole row a button, its `value` before ›.
993
998
 
994
- `locked` (the reason) shuts its control, which stands greyed after the reason; a switch keeps the Switch's own locked state, a lock in its thumb. `alone` stands a lone row bare, with no card. `SettingRows` holds the rows in a card, a line between each, its corners smooth where the browser can draw them; `danger` is the danger zone's, a red edge (`o-setting-rows-danger`). On a phone (a PhoneHost screen, below the app's line, or `form="phone"`) the card and its rows are Field rows' (`field.css`): the name on the left, the value on the right, ›; a select's row opens its list in the full Sheet, a button's row is the button, a danger card's names are red, a locked row's reason stands in place of its line. Its two options, the card and the rows, are on [`viewkitjs/views/looks`](looks.md). Its stylesheet is `viewkitjs/views/controls/setting-row.css`, in the ready stylesheet; it stands on `choice.css`, the Switch's, the Select's, the Button's and the Field's. Its names are on [its page](../controls/setting-row.md).
999
+ A button's `value` stands before it on a computer, as the open kind's (an email before Change); `iconOnly` draws its `icon` alone, its `label` naming it.
1000
+
1001
+ `state` (`SettingState`: `label`, `colour`) is a word of state before its control on a computer, the Option in its colour (Connected, green), before the reason; on a phone the grey value before ›, the row then the press of its action. `locked` (the reason) shuts its control, which stands greyed after the reason; a switch keeps the Switch's own locked state, a lock in its thumb. `alone` stands a lone row bare, with no card; on a phone a card of its own, the row the press, its name in the link colour. `SettingRows` holds the rows in a card, a line between each, its corners smooth where the browser can draw them; `danger` is the danger zone's, a red edge (`o-setting-rows-danger`). On a phone (a PhoneHost screen, below the app's line, or `form="phone"`) the card and its rows are Field rows' (`field.css`): drawn as iOS's Settings draws them: the name on the left; the value in the quietest grey, cut with …, before iOS's ›; a select's row opens its list in the full Sheet; a button's words stand in the link colour at the row's end, a press of their own; in a danger card each row is the press, its action's `icon` first, its name and icon red; a locked row fades by `--vk-opacity-off` but for its line, where its reason stands. A `Field` placed in its card on a phone is one of its rows, as in `FieldRows`, its note and error in a foot after the card; what a `SettingRow` holds is no row of it. Its `icon` is a line icon (the Icon option's Line, nothing picked) or a white glyph on a tile (Tile), the tile on `colour`, a label colour (`OptionColour`), grey when none; `SettingIcon` draws the same icon beside a list's name outside a row. `SettingChevron` draws its phone ›, 9 × 15, at the end of a list's row outside a row, so one › stands on every settings page. One card, one way: where any of its rows has a start (an icon, or a mark), every row keeps the start's room, so their words stand in one line, and each row's rule starts at the words; each row says what starts it (`data-setting-row-start`: `icon` or `mark`). Its ›, 9 × 15, is `--vk-icon-disclosure`. On a computer it reads its options off the frame round it (its card's, or its own when it stands alone), kept up to date as they change (`useSettingRowWorn`). Under the End option's Words an action is its words (`o-setting-row-act`, red with `data-kind="danger"`), a state a dot in its colour and its words (`o-setting-row-said`), and a locked row's reason stands in its control's place, its words greyed. Under the Card option's Edged the card stands on its ground with a firm edge, its danger zone's plain, a lone row a card of its own and an icon on a grey tile; under the Rows option's Inset the rows stand 60 tall at least, the line between them inset at both ends. Under the Fields option's At the end a `Field` placed in a computer's card is one of its rows (`o-setting-row-field`): its label and note on the left, its error in the note's place, its control at the row's end (an Input 256 wide); a `RadioGroup` standing there draws as a Select of its Radios, named by the row's label, unless its Radios are swatches; and every select at a row's end is as wide as its value. `useSettingRowsRow()` tells a part of an app's own placed in such a card that it stands as one of its rows. Under the Fields option's Boxes (nothing picked) a Field in a computer's card stays a box, the rows' room round it. Its options, the card, the rows, the end and the fields (a computer's) and the icon (a phone's), are on [`viewkitjs/views/looks`](looks.md). Its stylesheet is `viewkitjs/views/controls/setting-row.css`, in the ready stylesheet; it stands on `choice.css`, the Switch's, the Select's, the Button's, the Option's and the Field's. Its names are on [its page](../controls/setting-row.md).
995
1002
 
996
1003
  `SwitchRow` and `SwitchRows` are its switch kind, with the props and the classes they always had (`o-switch-row`, `o-switch-rows`), so `switch-row.css` (its names on [its page](../controls/switch-row.md)) still draws them for an app that hasn't moved to `setting-row.css`. `SwitchRows` keeps its computer form on a phone.
997
1004
 
998
1005
  - `SettingRow` — one row.
999
- - `SettingRowProps` — its props: `label`, `note`, `icon`, `mark`, `locked`, `alone`, `className`, and its kind.
1006
+ - `SettingRowProps` — its props: `label`, `note`, `icon`, `colour`, `mark`, `state`, `locked`, `alone`, `className`, and its kind.
1007
+ - `SettingIcon` — a row's icon on its own (`colour`, its glyph as children), for a list that draws its names itself.
1008
+ - `SettingChevron` — the phone row's ›, 9 × 15, on its own, at the end of a list's row that stands beside setting rows.
1000
1009
  - `SettingRows` — the card.
1010
+ - `useSettingRowWorn` — the setting row's options as the frame round an element picks them, kept up to date.
1011
+ - `useSettingRowsRow` — true for a part placed in a computer's card under At the end, which stands as one of its rows.
1001
1012
  - `SettingRowsProps` — the card's props: `danger`, `form`, `className`.
1002
- - `SettingAction` — a row's button.
1013
+ - `SettingAction` — a row's button: `label`, `icon`, `onClick`, `disabled`, `kind`, `iconOnly`.
1014
+ - `SettingState` — a row's word of state.
1003
1015
  - `SwitchRow` — the switch kind.
1004
1016
  - `SwitchRowProps` — its props: every prop of the Switch, and its `label` and `note`.
1005
1017
  - `SwitchRows` — the card round switch rows.
@@ -6,7 +6,7 @@ Import from `viewkitjs/views/editors/session` in a client component: the door op
6
6
  - Admitted, the one to prefer: `onAttempt(answer)` is asked at once whether this answer may close and returns an `EditSessionAttempt`. A refusal keeps the session open for another try, and its `reason` comes back as `refusal` until the next attempt; an acceptance closes it and calls `onClose` after the exit gap, a timer cleared if the host unmounts. While `onAttempt` runs the session counts as answered, so a close that arrives during it (a write that moves the focus, and a box that closes on blur) is ignored; a refusal, or an `onAttempt` that throws, opens it again for the next try.
7
7
  - Deferred: the session closes at once and hands the answer to `onDone` after the exit gap, for a host whose answer still carries the write.
8
8
  - Gap: `exitMs` sets it, defaulting to `EDITOR_EXIT_MS`.
9
- - Leaving: `leave` (`"outside"` or `"discard"`, read once when the session opens; default `"discard"`) says what happens to a session still open when its page goes (`pagehide`: a reload, a closed tab, a removed frame, Back to another document), or when the grid or field row around it goes. `"outside"` asks the editor as for a press outside, so its draft is written by its own rule and a refusal writes nothing; `"discard"` asks nothing, which keeps a host of your own as it was. Pass `"outside"` to have its open editor asked; the grid and the field row pass it on a desktop and `"discard"` in a phone's sheet. Either way an answer already given and waiting out its exit is finished at once, inside the event, and the admitted mode's `onLeave` is called first. A session closed by Escape is never asked again. One `pagehide` listener per session, for its life; a page that comes back from the back-forward cache finds the session closed and its value written.
9
+ - Leaving: `leave` (`"outside"` or `"discard"`, read once when the session opens; default `"discard"`) says what happens to a session still open when its page goes (`pagehide`: a reload, a closed tab, a removed frame, Back to another document), or when the grid or field row around it goes. `"outside"` asks the editor as for a press outside, so its draft is written by its own rule and a refusal writes nothing; `"discard"` asks nothing, which keeps a host of your own as it was. Pass `"outside"` to have its open editor asked; the grid and the field row pass it on a desktop and `"discard"` in a phone's sheet. Either way an answer already given and waiting out its exit is finished at once, inside the event, and the admitted mode's `onLeave` is called first. A session closed by Escape is never asked again. At `pagehide` a session is left in the page close's first pass, before any waiting write the grid sends (an undo still waiting for the edit it takes back), so its draft lands first; a page that comes back from the back-forward cache finds the session closed and its value written.
10
10
  - `EditSession` — what the session hands its host, and what `EditorPanel` (`viewkitjs/views/editors/panel`) takes: `open`, `close(reason)`, and `refusal`, the reason the host gave for the last refused attempt until the next one, `null` otherwise and always in the deferred mode; and `keeps`, optional, true when this session's Escape keeps (an editor that checks its draft before a key closes it, the value list, checks it before Escape too).
11
11
  - `useEscapeRule(type, list?)` — the provider's `escape` for a field type (`ViewsProvider`, `viewkitjs/views/react`): `"keep"` where it names the type keep, else `"cancel"`, and `"cancel"` with no provider. For an email, a phone, a link or a domain whose rule names its editors apart (`{ box, list }`), `list` (default false) says which: true where your host opens the value list (several values, or a single one opened as a list of one), false for the text box. A host of your own reads it and hands it to its session as `escape`.
12
12
  - `EditSessionAttempt` — the host's answer to an attempt: `{ accepted: boolean; reason?: string }`. A refusal may say why; the reason is what `refusal` shows.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Import from `viewkitjs/views/field-row` in a client component, under your `ViewsProvider`: the door opens with the client directive. It holds a record's field row: one field drawn as its label, its value and, on a click, its type's editor in place, and the write path that admits each edit at once, queues one record's writes, settles each on the save's receipt and rolls a failure back. The row knows no entity, only a binding, a value and a commit, so your app builds its record's panel (its sections, its related records) around the rows. It draws with your provider's `Popover`, `Sheet`, `Collapse`, `AppIcon`, icons, `CommandMenu` atom and toast port. The shapes its writes go through (the write target, the receipt, the admission, a value's note, the reconciliation error) are the root door's, described under [A write's target](views.md#a-writes-target), and this door re-exports them. Guide: [editors](../guides/editors.md).
4
4
 
5
- - `FieldRow` — one field of a record: a glyph (the binding's `icon` through your `AppIcon`, else the type's icon), the label, and the value drawn by the display. Below the provider's `desktopQuery` the label stands above the value, which then takes the row's width; at it and above, glyph, label and value share one line. A writable row holding nothing draws your `views.field-row.empty` word, muted; a read-only one draws "—". A writable row's edit button is named by the label, then the value as it is drawn ("Stage, Won"; "Terms, Empty" for a row holding nothing); a row still loading, and a rich text laid over its button, are named by the label alone. A writable row opens its type's editor on a click, through the editor panel and one edit session: a picker (a select, a date, several tags, a relation or a set of records, several values, a place) anchored under the value in your `Popover` on a desktop and in your `Sheet` on a phone, by the provider's `desktopQuery`; a typed value (text, a number, money) in its own box on every width; a name and a range open your `PartsBody` anchored under the value, as a place does; and a single email or domain opens the value list holding one value, anchored, where the provider's `oneValue` says `list` for its type. Escape throws the edit away, unless the provider's `escape` keeps the field's type, on a desktop, where it keeps what was typed and a refusal stays open until a second Escape throws the edit away; a sheet's swipe or ✕ changes nothing. On a desktop the date editor opens with the keyboard in your `DateBody`, as a place's or a long select's does; and with an editor open in its popover, an Escape heard from the page itself or from an element holding the row closes that editor and goes no further, so a drawer around the row hears only the next one. On a desktop, a select gives your Picker the keys however it opened, by Enter, Space or a pointer: the focus in its search, the arrows going on from the value it holds, and Enter picking the one lit (opened by a key, an Enter at once changes nothing). On a desktop, an editor closed by Tab, Shift-Tab, Escape, Enter or a pick puts the focus back on the row's own button, once its exit has played out and a write still saving has saved, so the next Tab moves on from that row; a press or a focus outside an editor's panel since the close lets that go, so a row opened meanwhile keeps its editor, and an outside press leaves the focus where it put it. A relation saves what its row stores (an id, a ref with the picked record's kind, or a set of records with its lead); a date field has no time and offers No date where it may be empty; several values read a phone typed without its code in the binding's `region`. A value of several parts inside a writable row draws its count as plain text: the row's press opens the editor, which lists them all. A single email, phone, link or domain in a writable row reads as plain text too, with an open action beside the row's button (a mail, a call, the site), and a writable rich text lies over its button, so its links and "Show more" keep their own press while a press on its text edits. A money figure its host reads in another currency than the record's own (it hands the converted figure as `value` and that currency as `opts.currency`) is marked ≈ with the currency it came from, and its editor names it under the record's own amount. A boolean commits from its own control, a `command` field opens its verbs, and a read-only row draws a lock with its reason. A refused commit keeps the editor open with the reason under it, a saved value shows at once and stays until the receipt settles it, and a failed save rolls back with a retry. A text, an email, a phone, a link, a domain, long or rich text edits in place in the row; handed the components map's `TextBody`, the row opens it there, at every width, with the field's own check and the record's country. A number, money or a percent edits in place too; handed `NumberBody`, the row opens it there, at every width, with the field's own check and its limits (a duration keeps the editor's own box).
5
+ - `FieldRow` — one field of a record: a glyph (the binding's `icon` through your `AppIcon`, else the type's icon), the label, and the value drawn by the display. Outside a Field rows card (below), below the provider's `desktopQuery` the label stands above the value, which then takes the row's width; at it and above, glyph, label and value share one line. A writable row holding nothing draws your `views.field-row.empty` word, muted; a read-only one draws "—". A writable row's edit button is named by the label, then the value as it is drawn ("Stage, Won"; "Terms, Empty" for a row holding nothing); a row still loading, and a rich text laid over its button, are named by the label alone. A writable row opens its type's editor on a click, through the editor panel and one edit session: a picker (a select, a date, several tags, a relation or a set of records, several values, a place) anchored under the value in your `Popover` on a desktop and in your `Sheet` on a phone, by the provider's `desktopQuery`; a typed value (text, a number, money) in its own box on every width; a name and a range open your `PartsBody` anchored under the value, as a place does; and a single email or domain opens the value list holding one value, anchored, where the provider's `oneValue` says `list` for its type. Escape throws the edit away, unless the provider's `escape` keeps the field's type, on a desktop, where it keeps what was typed and a refusal stays open until a second Escape throws the edit away; a sheet's swipe or ✕ changes nothing. On a desktop the date editor opens with the keyboard in your `DateBody`, as a place's or a long select's does; and with an editor open in its popover, an Escape heard from the page itself or from an element holding the row closes that editor and goes no further, so a drawer around the row hears only the next one. On a desktop, a select gives your Picker the keys however it opened, by Enter, Space or a pointer: the focus in its search, the arrows going on from the value it holds, and Enter picking the one lit (opened by a key, an Enter at once changes nothing). As the editor takes the place of the row's button, the row holds the focus the button held until the editor takes it, so the focus never falls to the page: a dialog around the row that takes such a focus back to itself (Base UI's) leaves a text's or a number's editor open. On a desktop, an editor closed by Tab, Shift-Tab, Escape, Enter or a pick puts the focus back on the row's own button, once its exit has played out and a write still saving has saved, so the next Tab moves on from that row; a press or a focus outside an editor's panel since the close lets that go, so a row opened meanwhile keeps its editor, and an outside press leaves the focus where it put it. A relation saves what its row stores (an id, a ref with the picked record's kind, or a set of records with its lead); a date field has no time and offers No date where it may be empty; several values read a phone typed without its code in the binding's `region`. A value of several parts inside a writable row draws its count as plain text: the row's press opens the editor, which lists them all. A single email, phone, link or domain in a writable row reads as plain text too, with an open action beside the row's button (a mail, a call, the site), and a writable rich text lies over its button, so its links and "Show more" keep their own press while a press on its text edits. A money figure its host reads in another currency than the record's own (it hands the converted figure as `value` and that currency as `opts.currency`) is marked ≈ with the currency it came from, and its editor names it under the record's own amount. A boolean commits from its own control, a `command` field opens its verbs, and a read-only row draws a lock with its reason. A refused commit keeps the editor open with the reason under it, a saved value shows at once and stays until the receipt settles it, and a failed save rolls back with a retry. A text, an email, a phone, a link, a domain, long or rich text edits in place in the row; handed the components map's `TextBody`, the row opens it there, at every width, with the field's own check and the record's country. A number, money or a percent edits in place too; handed `NumberBody`, the row opens it there, at every width, with the field's own check and its limits (a duration keeps the editor's own box).
6
6
  - `FieldRowProps` — the row's props: `binding`, `row`, `value` (the display value), `editValue` (the stored value the editor opens on), `writable`, `ready` (false refuses gestures while the record loads), `unread` (the value isn't read yet, drawn blank), `refusal` (why it's read-only here), `onCommit` (admits or refuses a draft, then settles; an editor still open when the page or the row goes is asked as for a press outside, so it can be called inside `pagehide`), `opts` (display options), `menu` (a `command` field's verbs), `meta` (a few words in the value's line), `note` (a sentence under the value, with an optional quote a tap opens) and `kindIcon` (your icon name for a record kind, the glyph a relation's candidates wear; unanswered, they wear the type's glyph).
7
7
  - `RowEditor` — the editor a row mounts for its field's type, picked from `ROW_HOSTS`.
8
8
  - `ROW_HOSTS` — the host each field type mounts in a row, or `null` for a type the row never opens (a boolean, a derived or system field).
@@ -14,3 +14,11 @@ Import from `viewkitjs/views/field-row` in a client component, under your `Views
14
14
  - `FieldWriteOptions` — `row`, `rowId`, `bindings`, `write` (an `EntityWriteTarget`), `refresh`, and optionally `locked`, `admit`, `conventions` (default: the provider's), `refusalOf` (reads a failed save's own sentence, shown after the toast's failure line and on the row) and `timing` (follows each edit from its commit to the paint, named `<noun> <fieldKey> drawer edit`).
15
15
  - `EditTiming` — what `timing` returns: `mark(step)`, `painted()` and `failed()`.
16
16
  - `FieldWriteRefusal` — the error a write rejects with when it is refused with a sentence of its own: by the server (the sentence `refusalOf` read), or at dispatch, when a queued edit is mapped again and the guard, a lock, a missing binding or the binding's write refuses it. The row shows its message.
17
+
18
+ ## The frame
19
+
20
+ A row's frame is the app's (docs/contract.md, Tokens): its label column on a desktop (`--vk-field-row-label-w`), the gap between its glyph, label, value and lane (`--vk-field-row-gap`), its least height (`--vk-field-row-h`, its content standing in the middle, a wrapped value keeping the label on its first line), its padding above and below (`--vk-field-row-py`), the line under every row but the last (`--vk-field-row-line-w`, `0px` for none, in `--vk-field-row-line`) and its label's colour (`--vk-field-row-label-fg`). Declared round a section, every row in it takes them; undeclared, the row draws as it always has. A row an app draws by hand on the same frame should read `--vk-field-row-label-w` too, so the two still line up.
21
+
22
+ ## In a Field rows card
23
+
24
+ On a phone, a row inside ViewKit's `FieldRows` card is one of the card's rows: its glyph in the card's glyph lane, its label in the card's label column and its value on the same line, the card's height, insets, line and label colour and none of the frame above. A `›` in the lane says its press opens a sheet (a pick, a date, a record, several values); a value typed in place (a text, a figure) shows none, and a read-only row keeps its lock. A press anywhere on the row opens what its edit button opens, except on a control of its own (an open value's action, the lane's `▾`), on a row whose value is a verb menu, while its write is pending or the record is loading. A writable empty row reads `views.field-row.set` ("Set source") in place of "Empty". A row's padding gives a value that wraps room above and below it; a one-line row keeps the card's height. On a computer a card holds today's rows, and ViewKit's own editor panel, Sheet and Modal opened from a card's row draw their rows as rows outside any card (an app's own dialog drawn inside the card keeps the card's form).
@@ -4,16 +4,18 @@ The spreadsheet. The door carries no client directive; every rendering file behi
4
4
 
5
5
  ## The grid
6
6
 
7
- - `GridTable` — draws the spreadsheet: rows in their groups under a header whose column menus sort, group, format and hide, a checkbox rail and a ⋯ tail on each row, editors opened over cells, a selected range with copy, paste and undo, and a footer of figures per column. An edit shows in its cell at once and goes to `onCellCommit` (a batch to `onCellsCommit`); a failed write rolls the cell back. While `transitionPending` is true, or for one commit after `transitionKey` changes, it draws your app's loading atom instead of the rows, or, handed the components map's `RowsWait` and already showing rows, keeps them, inert, as that slot's children, its column names and footer standing outside the slot, as they are. It takes a `GridTableProps`.
7
+ - `GridTable` — draws the spreadsheet: rows in their groups under a header whose column menus sort, group, format and hide, a checkbox rail and a ⋯ tail on each row, editors opened over cells, a selected range with copy, paste and undo, and a footer of figures per column. An edit shows in its cell at once and goes to `onCellCommit` (a batch to `onCellsCommit`); a failed write rolls the cell back. An undo or a redo shows its value, and takes the focus to its cell, as it is pressed; it is sent once the edit it takes back has answered, or at once when the page closes (`pagehide`), an editor still open writing its draft first. Back from the back-forward cache, an undo sent at the close may have reached the server before the edit it takes back: the cell then ends on the edit's stored value while redo still offers the undo. While `transitionPending` is true, or for one commit after `transitionKey` changes, it draws your app's loading atom instead of the rows, or, handed the components map's `RowsWait` and already showing rows, keeps them, inert, as that slot's children, its column names and footer standing outside the slot, as they are. It takes a `GridTableProps`.
8
8
  - `GridTableProps` — what `GridTable` takes, flat, typed over your row. Five are required: `groups` (the rows, as the model's `ListGroup`s), `grouped` (whether they draw as group bands), `getRowId`, `columns` (the model's `ListColumn`s) and `onOpenRow` (what opening a row does: the title's text opens it; it receives the row and a `GridRowOpenedFrom`, which brings the focus back to the row's cell once what it opened closes). The rest are optional:
9
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
- - 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"`), `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).
10
+ - Row actions and menus: `rowMenu` (a row's items, on right-click and in its ⋯ tail; the same builder a list takes), `contextMenu` (a right-click menu that differs from it), `rowActions` (buttons in the title cell's action lane, before the grid's own Edit), `onRowDelete` and `deleteLabel` (a delete row in the row's menu), `menus` (`GridMenus`: each of the grid's menus as data, reshaped by your function; `menus.row` is asked as a row's menu opens and may answer a promise, the menu waiting on one greyed row until it does, and holds Open page and Delete as `row-open` and `row-delete`, so a row's Delete is offered per row; the ready `<List>` (VK-742) hands the same `menus.row` through), `commands` (the verbs a `command` column's cell opens, by field key; without it a command column is a read-only badge) and `selection` (the list's selection; its optional `renderBar` draws the bar it opens, `SelectionBar` with your verbs, and without one the rows still tick and no bar is drawn).
11
+ - Sort, group and figures: `sort` (`GridSortState`), `sortMark` (a sorted column's header wears `icons.sortAsc` or `icons.sortDesc` after its name; off by default, `aria-sort` saying it either way), `groupBy` (`GridGroupByState`: handed, a column's menu offers Group by and Ungroup, saved view or not), `sortOptions` (the group band menu's sort, as `GridGroupSortOption`s), `groupMenu` (the parts a group band's ⋯ holds, as `GridGroupMenuPart`s: `"select"` (Select all in group, on a grid with a `selection`), `"sort"`, `"figures"`, `"hide"`), `groupSummary` and `onGroupSummaryChange` (which figures ride beside a group's name), `groupFigures` (`GridGroupFigure`s), `countNoun` (`GroupCountNoun`), `aggregates`, `onAggregateChange` and `renderAggregate` (the footer's figure per column), `viewBacked` (a saved view: Sort on every bound column, and figures only for field-backed columns; it doesn't decide Group by) and `defaultCurrency` (the reader's currency, which a money column read as it was entered totals in).
12
12
  - Format overrides and their handlers, every map keyed by field key: `optionColors`, `dateStyles`, `durationStyles`, `numberFormats` (decimals null is the field's own), `showTimeOverrides` and `percentDisplays`, each with its `on…Change` handler taking the field key first, and `formatsWritable` (false hides the stored format knobs from the column menu; default true).
13
- - Columns and preferences: `columnState` and `onColumnStateChange` (order, widths, and which columns show), `renderAddColumn` (your own add-column cell at the header's end, or in the title column's header under `addColumnAt`; without it, or answering `undefined`, `false` or `""`, the grid's own lists the hidden columns; answering `null`, none is drawn and no room is kept for it), `addColumnOnPhone` ("+ Add column" on a phone too, its list in your `Menu`; off by default), `addColumnAt` (`"title"` stands "+ Add column" as a lone + at the right edge of the title column's header, in reach while the columns scroll, and the tail keeps no room for it; `"end"`, the default, the header row's last cell; with no title column shown it stands at the end), `phonePicking` (a phone picks rows by a long press, the boxes inside the name column before the picture, and always shown on a grouped grid, its titles row's box in the name column's head; needs `selection`; off by default), `parts` (a column per part of a name, a place or a range, offered under its field in "+ Add column"; off by default), `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).
13
+ - Columns and preferences: `columnState` and `onColumnStateChange` (order, widths, and which columns show), `renderAddColumn` (your own add-column cell at the header's end, or in the title column's header under `addColumnAt`; without it, or answering `undefined`, `false` or `""`, the grid's own lists the hidden columns; answering `null`, none is drawn and no room is kept for it), `addColumnOnPhone` ("+ Add column" on a phone too, its list in your `Menu`; off by default), `addColumnAt` (`"title"` stands "+ Add column" as a lone + at the right edge of the title column's header, in reach while the columns scroll, and the tail keeps no room for it; `"end"`, the default, the header row's last cell; with no title column shown it stands at the end), `phonePicking` (a phone picks rows by a long press, the boxes inside the name column before the picture, and always shown on a grouped grid, its titles row's box in the name column's head; needs `selection`; off by default), `parts` (a column per part of a name, a place or a range, offered under its field in "+ Add column"; off by default), `columnMenuItems` (your rows in a column's menu, as data, above Hide: the old route, which adds rows only; `menus.column` reshapes the whole menu), and the per-user toggles `freezeIdentity` (the identity columns, everything through the title, pinned at the left edge; on by default, on the bare prop, in `LIST_VIEW_PREF_DEFAULTS` (`gridFreezeIdentity`), in a view's look and in the grid's look alike; hand `false`, or start your prefs with `gridFreezeIdentity: false`, to open it unpinned), `alwaysCheckboxes`, `verticalBorders` 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.
17
+ - Per row: `rowWritable` (`(row) => boolean`, whether a row's cells write, for a reader who may edit some records and not others; a row it answers false for opens no editor, takes no typing, paste, fill, clear, cut or bulk-bar write, says "Cell is read-only" (`views.grid.cell-read-only`) when a person tries, and marks its cells `aria-readonly`; it only takes away from what the columns and `listConfig` allow; absent, every row writes as its columns say; called while the grid renders, so keep it pure and cheap; a constraint on the screen, while your API guards its own writes).
18
+ - `GridMenus` — the grid's menus as data, `GridTable`'s `menus`, typed over your row: `column(items, { field, column })`, `row(items, { row })` and `group(items, { group })`, each handed its menu's default items (`ViewsMenuItem[]`, every row keyed) and returning the items it shows. A menu with no function is as before. The helpers, the keys and the rules are [`/list`'s Menus as data](./list.md#menus-as-data).
17
19
  - `useGridTablePrefs` — wires a list's view preferences to the grid. It takes `prefs` (the list's `ListViewPrefs`), `setPrefs` (stores a patch of them), `columns` (whose money reading the number formats read) and `viewBacked`, and returns `{ gridProps }` to spread on `GridTable`: the borders, row icon, frozen identity, checkboxes and scale, the format overrides, the column state, the group figures and the footer figures, each with the handler that writes it back through `setPrefs`.
18
20
  - `useGridTableSettings` — wires a list's settings and a person's layer to the grid, for a list kept as `viewkitjs/fields/query`'s `ListSettings`. It takes `settings`, `layer` (the person's `ListPersonalLayer`), `columns` (the declared ones), `parts` (the same `parts` the grid takes, so a part column the settings place is drawn and moved as the grid draws it), `onChange` (a `ListSettingsChange`, never empty), `onLayerChange` (a layer patch), `defaults` (the reader's `ListDefaults`) and `formats` with `setFormats`, and returns `{ gridProps }` to spread on `GridTable`, as `useGridTablePrefs` does: a column hidden, moved, given a line break or a figure, and a group header's figures, come back through `onChange`; a resize through `onLayerChange` as the person's width (a width taken back by a double-click leaves it); a format through `setFormats`.
19
21
  - `GridFormatPrefs` — how a list's fields read, which `useGridTableSettings` takes apart from its settings: `gridOptionColors`, `gridDateStyles`, `gridDurationStyles`, `gridShowTime`, `gridPercentDisplays`, `gridDecimals` and `gridCurrencies`, each keyed by field key.
@@ -21,7 +23,7 @@ The spreadsheet. The door carries no client directive; every rendering file behi
21
23
  ## Sort, group and figures
22
24
 
23
25
  - `GridSortState` — the list's sort, as the header menu reads and writes it: `value` (the sort key in force; for a place column, the part key `partKey(fieldKey, part)` its menu picked, read with `parsePartKey`), `dir` and `onChange({ value, dir })`. The menu is a second control for the same stored sort your view's options drive.
24
- - `GridGroupByState` — the view's grouping, for the header menu's Group by and Ungroup: `fieldKey` (or null) and `onChange(fieldKey)`, null to ungroup. Present on lists backed by a saved view.
26
+ - `GridGroupByState` — the view's grouping, for the header menu's Group by and Ungroup: `fieldKey` (or null) and `onChange(fieldKey)`, null to ungroup. Wherever you keep the group (a saved view, the page's address), handing it offers Group by and Ungroup.
25
27
  - `GridGroupSortOption` — one sort a group band's menu offers, sorting the rows of every group at once: its `value`, `label` and an optional `defaultDir`.
26
28
  - `GridGroupFigure` — one figure a group's band can show, either a `GridDeclaredFigure` or a `GridDrawnFigure`. Both carry the summary `part` that turns it on.
27
29
  - `GridCellPick` — a picked cell and its ranges, `GridTable`'s `cellPick` and what `onCellPickChange` tells: `cell` (a `GridCellAt`) and `ranges`, optional, each `{ from, to }`, two `GridCellAt` corners, the last the active one, which carries the fill dot and the verbs. A record a grouping draws twice is picked on its first copy; a row or a column the grid doesn't draw waits until it does.
@@ -35,17 +37,21 @@ The spreadsheet. The door carries no client directive; every rendering file behi
35
37
 
36
38
  ## Writes
37
39
 
38
- - `GridCellCommitFn` — writes one cell: `(row, columnId, value, context?)`, returning a promise of nothing or a `GridCommitOutcome`. Nothing counts as confirmed; a rejection rolls the cell back. `context` is present on an undo or a redo.
40
+ - `gridSave` — the two commit functions over the one save your app gives: `gridSave(save, { getRowId, values?, read? })` returns `{ onCellCommit, onCellsCommit }` to spread on `GridTable`. Make it once per grid (at module scope, in a `useState` initializer, or a `useMemo` on a stable `save`): the queues live in what one call returns, so one made in a render starts each render with empty queues. Every write (an edit, a paste, a fill, an undo, a redo) is one `save` call per record, its cells' values merged, records in the order their first cell came. A record has one call in flight at a time; the next waits for it to settle, whatever it answered. When the page goes (`pagehide`), every change still waiting is sent at once, inside the event, with `closing: true`, and a change made while the page goes (an open editor's draft) is sent at once too, after what its record still had waiting; a call already out is not sent again, and may be dropped with the page. `values(row, columnId, value, context)` turns one cell's change into the values sent (default `{ [columnId]: value }`, fields bound by their key; two cells writing one key send the later one's); a throw there or in `getRowId` refuses that cell alone, its message said in the grid's toast, and the rest of its record still saves. A save that resolves `{ stored }` shows, in each cell one of whose keys it holds, what `read({ ...row, ...values, ...stored }, columnId)` reads (default `row[columnId]`; a `read` that throws leaves the cell as sent); a save that rejects, or throws, rolls back its record's cells with its error, the other records' cells standing. Neither function rejects.
41
+ - `GridSaveOptions` — what `gridSave` takes beside the save, typed over your row: `getRowId` (the record's id, sent as `ListChange`'s `id`), `values` (one cell's change as the values sent, `(row, columnId, value, context)`; throw to refuse that cell; default `{ [columnId]: value }`) and `read` (a column's value off a row, to read what `stored` kept; default `row[columnId]`).
42
+ - `ListChange` — one record's change, as `save` receives it: `{ id, row, values, closing? }`; `closing`: the page is going, so send it to outlive the page (`fetch(…, { keepalive: true })`, or a beacon), its request started before `save` awaits anything. Without `keepalive`, a request still waiting for a connection when the page has gone is dropped, and it often waits: the page usually goes while earlier saves still hold the browser's six connections to your server, and an undo of a fill is several saves sent at once. Two saves of one record may then be out together, the earlier one still running: a server that applies a record's writes in the order they arrive keeps the later one, the undo, last.
43
+ - `ListSave` — the save your app gives `gridSave`: `(change) => Promise<void | { stored?: Partial<Row> }>`.
44
+ - `GridCellCommitFn` — writes one cell: `(row, columnId, value, context?)`, returning a promise of nothing or a `GridCommitOutcome`. Nothing counts as confirmed; a rejection rolls the cell back. `context` is present on an undo or a redo, and on any write while the page closes.
39
45
  - `GridCellsCommitFn` — writes several cells at once (a paste, a fill, an undo of several): `(edits)`, each `{ row, columnId, value, context? }`, returning a promise of nothing or one outcome per edit, in order. A failed edit rolls its own cell back. Without it, or for a single cell, the grid calls `GridCellCommitFn` for each.
40
- - `GridCommitContext` — what a write is: `{ kind: "commit" }`, with `reload: false` when the caller reloads once after a second write, or `{ kind: "restore", expected }`, an undo or a redo writing a value back, `expected` the value the cell is held to before it.
41
- - `GridCommitOutcome` — how a write ended. `confirmed`, with an optional `history` (false keeps it out of undo, or `{ prev, next }` are the values undo and redo write instead), `settlement` (`requested`: the row holds the value but its provider has not accepted it yet, and the cell says so) and `stored` (what was kept, when it isn't what the cell sent, as the row reads it in this column: the cell shows it in place of what was typed, undo and redo restore from it, and no "changed elsewhere" follows; ignored on an undo or a redo); `unconfirmed`, never in the undo history; or `failed`, with an optional `error`, which rolls the cell back.
46
+ - `GridCommitContext` — what a write is: `{ kind: "commit" }`, with `reload: false` when the caller reloads once after a second write, or `{ kind: "restore", expected }`, an undo or a redo writing a value back, `expected` the value the cell is held to before it. Either carries `closing: true` when it is sent while the page goes (`pagehide`): send it so it outlives the page (`fetch(…, { keepalive: true })`), as `ListChange` says. An `onCellsCommit` call whose edits carry it starts every one's request inside the call, before it awaits anything: a fan-out that sends some rows only after others answer, or one row's cells one after another, sends the rest after the page has gone, where nothing carries them.
47
+ - `GridCommitOutcome` — how a write ended. `confirmed`, with an optional `history` (false keeps it out of undo, or `{ prev, next }` are the values undo and redo write instead), `settlement` (`requested`: the row holds the value but its provider has not accepted it yet, and the cell says so) and `stored` (what was kept, when it isn't what the cell sent, as the row reads it in this column: the cell shows it in place of what was typed, undo and redo restore from it, and no "changed elsewhere" follows; on an undo or a redo the cell shows it until the rows carry it, and the history is left as it was); `unconfirmed`, never in the undo history; or `failed`, with an optional `error`, which rolls the cell back.
42
48
 
43
49
  ## Helpers a binding shares
44
50
 
45
51
  - `deriveGridSelectValues` — the values each select, status and multiselect column offers, given the columns and the rows: column id to values. A status offers its options; a select or multiselect offers its options, then the values the rows hold, each once. Archived values are left out unless `includeArchived` is set, as a filter sets it so a row still holding a retired value can be found.
46
52
  - `deriveGridRelationValues` — the relations present in the loaded rows, given the columns and the rows: column id to `ListRelationValue`s, each once, sorted by label, for every relation, user and actor column (an actor's id is its key). It reads the rows, never the candidates a column can link to, so a filter lists only what the table holds.
47
53
  - `cellEditBaseline` — the value an edit of a cell starts from: the column's pending value when one is given, else the column's `editAccessor`, else its `accessor`.
48
- - `cellCopyText` — a cell's value as copied text, given its column and its baseline (from `cellEditBaseline`), which a CSV export can reuse. Empty for no value; a relation or an actor copies as its name, not its id; a select, status or multiselect copies as its options' labels, not their keys; a place, a name and a range copy as their cells write them; a list copies its items joined by commas, several values of one kind their values, the main one first.
54
+ - `cellCopyText` — a cell's value as copied text, given its column, its baseline (from `cellEditBaseline`) and, optionally, the names language (`conventions.language`) a place's country is named in (English without one), which a CSV export can reuse. Empty for no value; a relation or an actor copies as its name, not its id; a select, status or multiselect copies as its options' labels, not their keys; a place, a name and a range copy as their cells write them; a list copies its items joined by commas, several values of one kind their values, the main one first.
49
55
  - `GRID_TITLE_LINK_CLASS` — the class that dresses the row-open text inside a title cell (the element carrying `data-cell-open`) as a link on its own hover: the brand colour and an underline.
50
56
 
51
57
  ## The lab