viewkitjs 0.32.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 (245) hide show
  1. package/CHANGELOG.md +69 -0
  2. package/fields/dist/index.d.ts +1 -1
  3. package/fields/dist/index.js +1 -1
  4. package/fields/dist/query/evaluate.d.ts +7 -0
  5. package/fields/dist/query/exact-number.d.ts +8 -2
  6. package/fields/dist/query/exact-number.js +14 -1
  7. package/fields/dist/query/sort.js +13 -10
  8. package/fields/dist/registry.js +5 -1
  9. package/fields/dist/types.d.ts +4 -1
  10. package/fields/dist/zod.d.ts +5 -0
  11. package/fields/dist/zod.js +10 -1
  12. package/fields/docs/guides/contact-values.md +12 -0
  13. package/fields/docs/guides/field-types.md +1 -1
  14. package/fields/docs/guides/queries.md +3 -1
  15. package/fields/docs/reference/fields.md +1 -0
  16. package/package.json +1 -1
  17. package/postgres/dist/check.js +4 -1
  18. package/postgres/dist/definitions/formula-forms.js +3 -1
  19. package/postgres/dist/definitions/money.js +2 -1
  20. package/postgres/dist/page.js +6 -3
  21. package/postgres/dist/rules.d.ts +15 -1
  22. package/postgres/dist/rules.js +16 -0
  23. package/postgres/dist/sort.js +7 -2
  24. package/postgres/docs/guides/definitions.md +1 -1
  25. package/postgres/docs/guides/field-map.md +1 -1
  26. package/postgres/docs/reference/definitions.md +1 -1
  27. package/postgres/docs/reference/postgres.md +1 -1
  28. package/views/dist/atoms/ToolbarButton.d.ts +1 -1
  29. package/views/dist/atoms/ToolbarButton.js +4 -3
  30. package/views/dist/atoms/frame-parts.d.ts +6 -0
  31. package/views/dist/atoms/frame-parts.js +15 -0
  32. package/views/dist/atoms/types.d.ts +16 -7
  33. package/views/dist/cells/cell-title.d.ts +3 -1
  34. package/views/dist/cells/cell-title.js +2 -2
  35. package/views/dist/cells/cell-values.js +2 -2
  36. package/views/dist/contract.d.ts +31 -6
  37. package/views/dist/contract.js +123 -0
  38. package/views/dist/controls/button/map-button.js +2 -0
  39. package/views/dist/controls/checkbox/checkbox.d.ts +3 -2
  40. package/views/dist/controls/checkbox/checkbox.js +2 -2
  41. package/views/dist/controls/compound-editor/compound-editor.d.ts +1 -1
  42. package/views/dist/controls/compound-editor/name-parts.js +4 -4
  43. package/views/dist/controls/compound-editor/place-parts.js +19 -19
  44. package/views/dist/controls/compound-editor/range-parts.js +14 -14
  45. package/views/dist/controls/compound-editor/row.d.ts +3 -1
  46. package/views/dist/controls/compound-editor/row.js +2 -2
  47. package/views/dist/controls/controls.d.ts +2 -0
  48. package/views/dist/controls/controls.js +2 -0
  49. package/views/dist/controls/customize/customize.js +37 -35
  50. package/views/dist/controls/customize/map-customize-body.d.ts +2 -0
  51. package/views/dist/controls/customize/map-customize-body.js +4 -0
  52. package/views/dist/controls/date-editor/date-days.js +2 -2
  53. package/views/dist/controls/date-editor/date-editor.js +18 -18
  54. package/views/dist/controls/date-editor/date-parts.js +6 -6
  55. package/views/dist/controls/date-editor/map-calendar.js +1 -1
  56. package/views/dist/controls/date-editor.css +2 -2
  57. package/views/dist/controls/field/field.d.ts +3 -0
  58. package/views/dist/controls/field/field.js +6 -6
  59. package/views/dist/controls/filter-editor/block.d.ts +2 -2
  60. package/views/dist/controls/filter-editor/block.js +5 -5
  61. package/views/dist/controls/filter-editor/filter-editor.js +31 -33
  62. package/views/dist/controls/filter-editor/how.d.ts +3 -1
  63. package/views/dist/controls/filter-editor/map-filter-body.d.ts +1 -0
  64. package/views/dist/controls/filter-editor/map-filter-body.js +7 -3
  65. package/views/dist/controls/filter-editor/map-rules.js +1 -1
  66. package/views/dist/controls/filter-editor/parts.js +2 -1
  67. package/views/dist/controls/group-editor/group-editor.js +15 -13
  68. package/views/dist/controls/index.d.ts +2 -0
  69. package/views/dist/controls/index.js +1 -0
  70. package/views/dist/controls/input/input.js +2 -2
  71. package/views/dist/controls/input/map-input.js +2 -0
  72. package/views/dist/controls/internal/editor-parts.js +1 -1
  73. package/views/dist/controls/internal/map-panel-controls.d.ts +8 -0
  74. package/views/dist/controls/internal/map-panel-controls.js +20 -0
  75. package/views/dist/controls/internal/panel-controls.d.ts +50 -0
  76. package/views/dist/controls/internal/panel-controls.js +197 -0
  77. package/views/dist/controls/internal/part-slot.d.ts +12 -0
  78. package/views/dist/controls/internal/part-slot.js +5 -0
  79. package/views/dist/controls/links-editor/links-editor.d.ts +1 -1
  80. package/views/dist/controls/links-editor/links-editor.js +27 -27
  81. package/views/dist/controls/menu/map-menu.d.ts +2 -2
  82. package/views/dist/controls/menu/map-menu.js +15 -12
  83. package/views/dist/controls/menu/menu.d.ts +2 -0
  84. package/views/dist/controls/menu/menu.js +3 -3
  85. package/views/dist/controls/menu-list/menu-list.d.ts +14 -4
  86. package/views/dist/controls/menu-list/menu-list.js +23 -22
  87. package/views/dist/controls/notice/notice.d.ts +3 -1
  88. package/views/dist/controls/notice/notice.js +2 -2
  89. package/views/dist/controls/number-editor/number-editor.d.ts +1 -1
  90. package/views/dist/controls/number-editor/number-editor.js +13 -13
  91. package/views/dist/controls/number-field/number-field.js +5 -3
  92. package/views/dist/controls/pane/pane.d.ts +4 -2
  93. package/views/dist/controls/pane/pane.js +4 -4
  94. package/views/dist/controls/picker/picker.d.ts +2 -0
  95. package/views/dist/controls/picker/picker.js +37 -36
  96. package/views/dist/controls/picker/rows.d.ts +4 -0
  97. package/views/dist/controls/popover/map-popover.d.ts +1 -1
  98. package/views/dist/controls/popover/map-popover.js +4 -2
  99. package/views/dist/controls/quick-filters/quick-filters.js +4 -4
  100. package/views/dist/controls/radio/radio.d.ts +3 -0
  101. package/views/dist/controls/radio/radio.js +4 -3
  102. package/views/dist/controls/select/map-select.d.ts +3 -0
  103. package/views/dist/controls/select/map-select.js +8 -0
  104. package/views/dist/controls/select/select.d.ts +3 -0
  105. package/views/dist/controls/select/select.js +3 -3
  106. package/views/dist/controls/sheet/bottom-sheet.d.ts +5 -1
  107. package/views/dist/controls/sheet/bottom-sheet.js +2 -2
  108. package/views/dist/controls/sheet/map-sheet.js +1 -1
  109. package/views/dist/controls/sort-editor/map-sort-body.d.ts +1 -0
  110. package/views/dist/controls/sort-editor/map-sort-body.js +7 -3
  111. package/views/dist/controls/sort-editor/sort-editor.js +24 -26
  112. package/views/dist/controls/sort-editor.css +5 -0
  113. package/views/dist/controls/text-editor/text-editor.d.ts +1 -1
  114. package/views/dist/controls/text-editor/text-editor.js +8 -8
  115. package/views/dist/controls/toolbar-button/atom-toolbar-button.d.ts +3 -3
  116. package/views/dist/controls/toolbar-button/atom-toolbar-button.js +7 -6
  117. package/views/dist/controls/values-editor/values-editor.d.ts +1 -1
  118. package/views/dist/controls/values-editor/values-editor.js +22 -22
  119. package/views/dist/controls/views-list/map-view-menu.js +1 -1
  120. package/views/dist/controls/views-list/view-menu.js +6 -6
  121. package/views/dist/controls/views-list/views-list.js +4 -4
  122. package/views/dist/editors/EditorPanel.js +1 -1
  123. package/views/dist/field-row/FieldRow.js +13 -0
  124. package/views/dist/fields/money.d.ts +5 -2
  125. package/views/dist/fields/money.js +14 -2
  126. package/views/dist/grid/chrome/GridTable.js +4 -1
  127. package/views/dist/grid/chrome/cell-clipboard.d.ts +4 -2
  128. package/views/dist/grid/chrome/cell-clipboard.js +2 -2
  129. package/views/dist/grid/chrome/cells.js +3 -1
  130. package/views/dist/grid/chrome/grid-row-menu-items.js +1 -1
  131. package/views/dist/grid/chrome/useGridKeyboard.d.ts +4 -1
  132. package/views/dist/grid/chrome/useGridKeyboard.js +29 -6
  133. package/views/dist/grid/chrome/useGridTableInteractionModel.js +9 -2
  134. package/views/dist/grid/core/clipboard-model.d.ts +3 -1
  135. package/views/dist/grid/core/clipboard-model.js +9 -8
  136. package/views/dist/grid/core/editing-controller.d.ts +3 -0
  137. package/views/dist/grid/core/editing-controller.js +6 -0
  138. package/views/dist/grid/core/edits-sink.d.ts +19 -0
  139. package/views/dist/grid/core/edits-sink.js +2 -0
  140. package/views/dist/grid/core/spreadsheet-operations.js +1 -1
  141. package/views/dist/grid/core/useGridEditing.d.ts +5 -0
  142. package/views/dist/grid/core/useGridEditing.js +6 -0
  143. package/views/dist/list/answer.d.ts +40 -0
  144. package/views/dist/list/answer.js +43 -0
  145. package/views/dist/list/bulk-bar.d.ts +7 -0
  146. package/views/dist/list/bulk-bar.js +10 -0
  147. package/views/dist/list/columns.d.ts +24 -0
  148. package/views/dist/list/columns.js +27 -0
  149. package/views/dist/list/edits.d.ts +19 -0
  150. package/views/dist/list/edits.js +56 -0
  151. package/views/dist/list/grid.d.ts +11 -0
  152. package/views/dist/list/grid.js +76 -0
  153. package/views/dist/list/index.d.ts +14 -1
  154. package/views/dist/list/index.js +4 -1
  155. package/views/dist/list/link.d.ts +8 -0
  156. package/views/dist/list/link.js +78 -0
  157. package/views/dist/list/list.d.ts +70 -0
  158. package/views/dist/list/list.js +14 -0
  159. package/views/dist/list/parts.js +10 -3
  160. package/views/dist/list/root-base.d.ts +46 -0
  161. package/views/dist/list/root-base.js +137 -0
  162. package/views/dist/list/root.d.ts +35 -34
  163. package/views/dist/list/root.js +153 -113
  164. package/views/dist/list/source-answers.d.ts +39 -0
  165. package/views/dist/list/source-answers.js +225 -0
  166. package/views/dist/list/store.d.ts +37 -5
  167. package/views/dist/list/store.js +31 -0
  168. package/views/dist/list/toolbar.d.ts +3 -2
  169. package/views/dist/list/toolbar.js +14 -2
  170. package/views/dist/list/views-axis.js +4 -2
  171. package/views/dist/list/views.d.ts +7 -2
  172. package/views/dist/list/views.js +16 -5
  173. package/views/dist/model/column-capabilities.d.ts +13 -0
  174. package/views/dist/model/column-capabilities.js +23 -2
  175. package/views/dist/model/column-schema.d.ts +11 -1
  176. package/views/dist/model/view-rules.js +1 -0
  177. package/views/dist/panels/model.d.ts +2 -0
  178. package/views/dist/panels/react/toolbar/ReadyToolbar.d.ts +8 -2
  179. package/views/dist/panels/react/toolbar/ReadyToolbar.js +2 -2
  180. package/views/dist/panels/react/toolbar/Toolbar.d.ts +8 -1
  181. package/views/dist/panels/react/toolbar/Toolbar.js +12 -3
  182. package/views/dist/panels/react/toolbar/ToolbarAdvancedFilters.js +1 -1
  183. package/views/dist/panels/react/toolbar/ToolbarAsideFilter.js +2 -2
  184. package/views/dist/panels/react/toolbar/ToolbarBarFilter.js +4 -4
  185. package/views/dist/panels/react/toolbar/ToolbarButton.js +4 -1
  186. package/views/dist/panels/react/toolbar/ToolbarFilter.js +1 -1
  187. package/views/dist/panels/react/toolbar/ToolbarFilterAdd.js +1 -1
  188. package/views/dist/panels/react/toolbar/ToolbarFilterSheet.js +1 -1
  189. package/views/dist/panels/react/toolbar/ToolbarFilters.js +2 -2
  190. package/views/dist/panels/react/toolbar/ToolbarNew.js +1 -1
  191. package/views/dist/panels/react/toolbar/ToolbarOptions.js +1 -1
  192. package/views/dist/panels/react/toolbar/ToolbarQuickFilters.js +1 -1
  193. package/views/dist/panels/react/toolbar/ToolbarSearch.js +1 -1
  194. package/views/dist/panels/react/toolbar/ToolbarSort.js +2 -2
  195. package/views/dist/panels/react/toolbar/ToolbarSortPill.js +6 -4
  196. package/views/dist/panels/react/toolbar/context.d.ts +10 -1
  197. package/views/dist/panels/react/toolbar/panel-part.d.ts +4 -1
  198. package/views/dist/panels/react/toolbar/panel-part.js +5 -3
  199. package/views/dist/panels/settings/filter-groups.js +6 -1
  200. package/views/dist/provider/ViewsProvider.d.ts +6 -2
  201. package/views/dist/provider/ViewsProvider.js +18 -1
  202. package/views/dist/provider/components.d.ts +59 -0
  203. package/views/dist/provider/components.js +1 -1
  204. package/views/dist/provider/context.d.ts +4 -1
  205. package/views/dist/provider/own-control.d.ts +4 -0
  206. package/views/dist/provider/own-control.js +7 -0
  207. package/views/dist/provider/select-items.d.ts +3 -0
  208. package/views/dist/provider/select-items.js +6 -0
  209. package/views/dist/react.d.ts +4 -2
  210. package/views/dist/react.js +2 -0
  211. package/views/dist/styles.css +86 -78
  212. package/views/dist/styles.unlayered.css +86 -78
  213. package/views/docs/contract.md +252 -5
  214. package/views/docs/controls/compound-editor.md +4 -0
  215. package/views/docs/controls/customize.md +6 -0
  216. package/views/docs/controls/date-editor.md +4 -0
  217. package/views/docs/controls/field.md +4 -0
  218. package/views/docs/controls/filter-editor.md +8 -0
  219. package/views/docs/controls/group-editor.md +6 -0
  220. package/views/docs/controls/input.md +4 -0
  221. package/views/docs/controls/links-editor.md +4 -0
  222. package/views/docs/controls/menu-list.md +8 -0
  223. package/views/docs/controls/menu.md +4 -0
  224. package/views/docs/controls/notice.md +4 -0
  225. package/views/docs/controls/number-editor.md +4 -0
  226. package/views/docs/controls/pane.md +4 -0
  227. package/views/docs/controls/picker.md +8 -0
  228. package/views/docs/controls/quick-filters.md +6 -0
  229. package/views/docs/controls/radio.md +4 -0
  230. package/views/docs/controls/select.md +8 -0
  231. package/views/docs/controls/sheet.md +4 -0
  232. package/views/docs/controls/sort-editor.md +8 -0
  233. package/views/docs/controls/text-editor.md +4 -0
  234. package/views/docs/controls/values-editor.md +4 -0
  235. package/views/docs/controls/views-list.md +6 -0
  236. package/views/docs/guides/the-grid.md +2 -2
  237. package/views/docs/guides/the-provider.md +19 -2
  238. package/views/docs/reference/controls.md +7 -5
  239. package/views/docs/reference/field-row.md +1 -1
  240. package/views/docs/reference/grid.md +1 -1
  241. package/views/docs/reference/list.md +141 -11
  242. package/views/docs/reference/panels-react.md +2 -2
  243. package/views/docs/reference/react.md +15 -9
  244. package/views/docs/reference/views.md +8 -4
  245. package/views/docs/reshaping.md +6 -1
@@ -7,17 +7,20 @@ Import from `viewkitjs/views/react` in a client component: the door opens with t
7
7
  Guide: [the provider](../guides/the-provider.md).
8
8
 
9
9
  - `ViewsProvider` — the provider every view reads: mount it once at your app's client root, above every view: `<ViewsProvider components={CONTROLS}>` at the least, and whatever of its icons, ports and conventions your app draws its own. It lays your atoms over the defaults (handed `CONTROLS` as it stands, over `CONTROL_ATOMS`, which it carries), hands your `Menu` its items with every row under a disabled group already disabled, and fills in the browser's own confirm where your ports carry no `confirm`. It hands its views one context value per distinct set of inputs, so pass module-level objects: a new one on each render re-renders every view.
10
- - `ViewsProviderProps` — what the provider takes. Its optional `desktopQuery` is the media query that means a desktop, so an editor opens as a popover there and as a sheet elsewhere, the default controls take their phone form below it (`PhoneLine`), as do the toolbar's panels and the views picker outside a `Toolbar`, and the grid's own chrome takes its desktop form there (the grid's frame carries `data-desktop`); hand in the one your own shell switches on. Default `DEFAULT_DESKTOP_QUERY`. Its optional `sheetActions` (`ViewsSheetActionsPlace`, default `bar`) says where an editor's ✕ and ✓, and a toolbar panel's ✕, stand in that sheet. Its optional `escape` (`ViewsEscapeRules`) says what Escape does in an editor of each field type on a desktop, `"keep"` or `"cancel"`, a type left out cancelling. Its optional `selectionBar` (`ViewsSelectionBarSettings`) says where the selection bar sits. Its optional `oneValue` (`ViewsOneValueEditors`) says whether a single email or domain opens the text box in its cell (the default) or the value list holding one value, in the grid and a field row alike. Its optional `datePicks` (`ViewsDatePicks`) names the quick days the date editors offer, in order; absent, today, tomorrow and next Monday. Its optional `now` (a `Date`) is the moment every date counts from; absent, the provider reads the clock after mount, then once a minute and when the tab comes back into view, never while rendering, and a date that needs it draws its full form until the first read.
10
+ - `ViewsProviderProps` — what the provider takes. Its optional `desktopQuery` is the media query that means a desktop, so an editor opens as a popover there and as a sheet elsewhere, the default controls take their phone form below it (`PhoneLine`), as do the toolbar's panels and the views picker outside a `Toolbar`, and the grid's own chrome takes its desktop form there (the grid's frame carries `data-desktop`); hand in the one your own shell switches on. Default `DEFAULT_DESKTOP_QUERY`. Its optional `sheetActions` (`ViewsSheetActionsPlace`, default `bar`) says where an editor's ✕ and ✓, and a toolbar panel's ✕, stand in that sheet. Its optional `escape` (`ViewsEscapeRules`) says what Escape does in an editor of each field type on a desktop, `"keep"` or `"cancel"`, a type left out cancelling. Its optional `selectionBar` (`ViewsSelectionBarSettings`) says where the selection bar sits. Its optional `oneValue` (`ViewsOneValueEditors`) says whether a single email or domain opens the text box in its cell (the default) or the value list holding one value, in the grid and a field row alike. Its optional `datePicks` (`ViewsDatePicks`) names the quick days the date editors offer, in order; absent, today, tomorrow and next Monday. Its optional `now` (a `Date`) is the moment every date counts from; absent, the provider reads the clock after mount, then once a minute and when the tab comes back into view, never while rendering, and a date that needs it draws its full form until the first read. Its optional `panelControls` (`true`, or the names among `Button`, `Select`, `Menu`, `Popover` and `Input`, `PanelControlName`) says which of your own controls ViewKit's sort and filter panels draw inside them (VK-1013), each handed the map's props and the part's `data-slot` and `data-key`; a control of `CONTROLS`' stays ViewKit's whatever it says, and without it the panels draw ViewKit's own, as before.
11
11
  - `EditEscape` — `"cancel" | "keep"`: what Escape does in an edit session (`viewkitjs/views/editors/session` hands it on too).
12
12
  - `ViewsEscapeRules` — the provider's `escape`: an `EditEscape` per field type, and for `email`, `phone`, `url` and `domain` either one `EditEscape`, which covers both of their editors, or an `EditEscapeByEditor`.
13
13
  - `EditEscapeByEditor` — `{ box?: EditEscape; list?: EditEscape }`: what Escape does in an email, phone, link or domain field by the editor it opens, `box` its text box (a single value) and `list` the value list (several values, or a single one `oneValue` opens as a list of one). One left out throws the edit away.
14
14
  - `ViewsOneValueEditors` — `Partial<Record<"email" | "domain", "text" | "list">>`, the provider's `oneValue`.
15
+ - `PANEL_CONTROL_NAMES` — `Button`, `Select`, `Menu`, `Popover` and `Input`: the controls the provider's `panelControls` can name.
16
+ - `PanelControlName` — one member of `PANEL_CONTROL_NAMES`.
17
+ - `flatSelectItems` — a Select's rows (`ViewsSelectItem[]`) with every `level` flattened, each row one level in standing in its parent's place, named by its path ("Company › Region"), its value as handed: for a `Select` of yours that draws no levels.
15
18
  - `DEFAULT_DESKTOP_QUERY` — `(min-width: 1024px)`: the width a desktop starts at when the provider is handed no `desktopQuery`, the default controls' phone line too (`PhoneLine`, in controls.md). Where the screen can't be asked (a server render, a browser with no `matchMedia`), it is a desktop.
16
19
  - Required: `components` (your primitives, `ViewsComponents`: `CONTROLS`, or it with your own spread after it, or every one of your own) and `children`.
17
20
  - Defaulted (VK-198): `icons` (your glyphs by meaning, `ViewsIcons`; absent, each meaning drawn through your `AppIcon` by its name, which `CONTROLS.AppIcon` draws with ViewKit's own glyphs); `ports` (your runtime services, `ViewsPorts`, each optional: absent, haptics that do nothing, the browser's clipboard, a store on `localStorage` at the package's `vk:` keys, and the toast and confirm `PortsHost` draws); `conventions` (the `FieldConventions` of `viewkitjs/fields` every value is read with; absent, `en-US` in `UTC`, the same on the server and in the browser). What you hand wins.
18
21
  - Optional: `atoms`, any of your own atoms, each laid over the default of its name, or over `CONTROL_ATOMS`' where `components` is `CONTROLS` as it stands (a map spread from it carries none); `messages`, your wording for the package's own messages, defaulting to `resolveViewsMessage` (the package's English); `presentation`, `(defaults: FieldPresentation) => FieldPresentation`, how your numbers, dates and durations read: given the package's defaults in the conventions' locale, return yours. It is called where a value is drawn, so your provider imports none of the display.
19
22
  - `useViews` — reads the nearest provider's value inside a view or an atom of your own. It throws an error that says where to mount one when no `ViewsProvider` is above it.
20
- - `ViewsContextValue` — what `useViews` returns: the `components` (your `Menu` wrapped to settle disabled groups), the merged `atoms`, the `icons`, the `ports` as `ViewsResolvedPorts` (every port there, yours or its default), the `messages` resolver, the `conventions`, your `presentation` when you handed one, and the `desktopQuery` in force (yours or `DEFAULT_DESKTOP_QUERY`); `escape` and `oneValue` when you handed them; `selectionBar` and `datePicks` when you handed them. The provider's moment (`now`) isn't in it: what draws a date reads it, so a new moment redraws only those.
23
+ - `ViewsContextValue` — what `useViews` returns: the `components` (your `Menu` wrapped to settle disabled groups), the merged `atoms`, the `icons`, the `ports` as `ViewsResolvedPorts` (every port there, yours or its default), the `messages` resolver, the `conventions`, your `presentation` when you handed one, and the `desktopQuery` in force (yours or `DEFAULT_DESKTOP_QUERY`); `escape` and `oneValue` when you handed them; `selectionBar` and `datePicks` when you handed them; and `panelControls`, the set of names the panels draw as yours (opted in, and not one of `CONTROLS`'), empty unless you opt in. The provider's moment (`now`) isn't in it: what draws a date reads it, so a new moment redraws only those.
21
24
  - `NOOP_PORTS` — ports that do nothing, for a server render, a test or an app without a device: the toasts and haptics are empty, the clipboard writes nothing (resolving `false`) and reads `null`, and the prefs store keeps nothing. It carries no `confirm`, so the provider falls back to `PortsHost`'s or the browser's.
22
25
  - `NOOP_TOAST` — the toast that draws nothing, `NOOP_PORTS`' own: what `useViews().ports.toast` is where an app hands no toast and no `PortsHost` stands.
23
26
 
@@ -27,8 +30,8 @@ The primitives your app hands in, modelled on Base UI's shapes: a controlled `op
27
30
 
28
31
  - `ViewsComponents` — the map itself, one key per name of the contract's components: `Button`, `Popover`, `Tooltip`, `Checkbox`, `Menu`, `Collapse`, `Sheet`, `AppIcon`, `Markdown`, `TextBody` (a whole body for a text typed as one string: the text editors open it; `CONTROLS.TextBody` is ViewKit's), `NumberBody` (a whole body for a number, money or a percent: the number editors open it, a duration excepted; `CONTROLS.NumberBody` is ViewKit's), `Picker` (a whole pick list: the select, several-values and relation editors open it; `CONTROLS.Picker` is ViewKit's), `LinksBody` (a whole links body: the set editor of a relation whose field declares `links` opens it, handed each link's roles, the lead and the field's roles; `CONTROLS.LinksBody` is ViewKit's), `DateBody` (a whole date body: the date editors open it; `CONTROLS.DateBody` is ViewKit's), `PartsBody` (a whole body for a name, a place or a range: the name, place and range editors open it; `CONTROLS.PartsBody` is ViewKit's), `ValuesBody` (a whole body for several emails, phones, links or domains: the value list editors open it; `CONTROLS.ValuesBody` is ViewKit's), and the toolbar panels' bodies: `SortBody` (the sort editor's whole body: the sort pill opens it on a computer and in the phone's Sheet; `CONTROLS.SortBody` is ViewKit's), `FilterBody` (the filter editor's whole body: an advanced filter's pill opens it on a computer and Filter in the phone's Sheet; `CONTROLS.FilterBody` is ViewKit's), `FilterPartBody` (a filter rule's way and value: a filter on the bar opens it; `CONTROLS.FilterPartBody` is ViewKit's), `FieldsBody` (the field list's whole body: every sort and filter field list opens it; `CONTROLS.FieldsBody` is ViewKit's), `QuickFiltersBody` (the quick filters' whole body: the quick filters' button opens it on a computer and in the phone's Sheet; `CONTROLS.QuickFiltersBody` is ViewKit's), `ViewsListBody` (the views list's whole body: the view picker's chip opens it on a computer and in the phone's Sheet; `CONTROLS.ViewsListBody` is ViewKit's) and `CustomizeBody` (Customize's whole body: Options and everything else that draws Customize open it on a computer and in the phone's Sheet; `CONTROLS.CustomizeBody` is ViewKit's). `AppIcon` is your own icon component, taking `name` and `className`, for the glyphs a host declares (a row's icon, a binding's icon); it draws on the first paint, because rows are measured as they mount, so map its names from a static record. `Markdown` is your markdown renderer, handed the stored text whole as `source`; the package parses no markdown itself. Eight keys are optional: `Input` (leave it out and the editors draw a plain `<input>`), `Command` (deprecated: the command list's parts, read by nothing), `Calendar` (the filter panel's month; reached without one, it throws an error naming it; `CONTROLS.Calendar` is ViewKit's), `RowsWait` (wraps a grid's rows; handed one, a grid that already shows rows keeps them, inert, as its children while new ones load, its column names and footer outside; left out, the grid draws Loading in place of its body), `GroupBody` (deprecated: read by nothing; a `CustomizeBody` holds its own group editor), `SearchField` (the toolbar's search box; handed one, the search opens it in place of its own field on a computer and on a phone), `PortsHost` (what draws the `toast` and `confirm` ports an app leaves out) and `SelectionBar` (the selection bar; handed one, ViewKit draws it in its own place).
29
32
  - `ViewsResolvedComponents` — the map as `useViews()` hands it on: yours, with `Input` always there, your own or the plain one, and `Calendar` always there, yours or a stand-in that throws an error naming the slot when it is reached.
30
- - `ViewsButtonProps` — a button: its `children`, `onClick`, `disabled`, a `variant` (`default`, `secondary`, `ghost`, `outline`, `destructive`; `secondary` only for the views picker's chip), a `size` (`default`, `sm`, `icon`), its `type`, a class, `aria-label` and `title`; and a `ref`, `tabIndex`, `aria-haspopup`, `aria-expanded`, `data-slot` and `data-open`, which the grid hands its own buttons: forward each to your element; and `aria-disabled`, which a field row's edit target is handed while its write is pending; and `aria-pressed`, `role`, `aria-selected`, `data-state` and `data-vs-row`, which the panels' own buttons are handed (the new-line mark, a view's row in the picker, the views row's chips and a view's ⋯, Export).
31
- - `ViewsPopoverProps` — a popover opened at an `anchor`, controlled by `open` and `onOpenChange`, placed by `side`, `align`, `sideOffset` and `alignOffset`.
33
+ - `ViewsButtonProps` — a button: its `children`, `onClick`, `disabled`, a `variant` (`default`, `secondary`, `ghost`, `outline`, `destructive`; `secondary` only for the views picker's chip), a `size` (`default`, `sm`, `icon`), its `type`, a class, `aria-label` and `title`; and a `ref`, `tabIndex`, `aria-haspopup`, `aria-expanded`, `data-slot` and `data-open`, which the grid hands its own buttons: forward each to your element; and `aria-disabled`, which a field row's edit target is handed while its write is pending; and `aria-pressed`, `role`, `aria-selected`, `data-state` and `data-vs-row`, which the panels' own buttons are handed (the new-line mark, a view's row in the picker, the views row's chips and a view's ⋯, Export); and `data-key`, which one of a part that repeats, beside its `data-slot`, inside the sort and filter panels under `panelControls`. There a ViewKit part may hand it more props than these (a tooltip's handlers, a `data-*` the panel finds it by again): forward the rest to your element.
34
+ - `ViewsPopoverProps` — a popover opened at an `anchor`, controlled by `open` and `onOpenChange`, placed by `side`, `align`, `sideOffset` and `alignOffset`; its `label`, where ViewKit names it (a panel's popover under `panelControls`), is its name to a screen reader, your popup's `aria-label`.
32
35
  - Focus: `initialFocus` false keeps focus where it was when the popup opens, for an editor that focuses its own input (with `preventScroll`). Default true.
33
36
  - Vetoes: `onOutsidePress` is handed the pointer press, its `target` where it landed, and returns `false` to keep the popup open, also against the focus that press moves; focus leaving by keyboard closes without asking. `onEscape` does the same for Escape.
34
37
  - Look: `chrome` is `panel` (your card popover, the default) or `menu` (your menu panel's surface, for a popover that holds a list: no inset, no card width). `onPanelClick` takes a click inside the popup, `panelData` sets `data-*` attributes on it, and `style` carries what a class cannot say, such as a width that follows a cell.
@@ -36,8 +39,8 @@ The primitives your app hands in, modelled on Base UI's shapes: a controlled `op
36
39
  - `ViewsSelectionBarProps` — what the components map's `SelectionBar` is handed: `SelectionBar`'s own props, at every count.
37
40
  - `ViewsTooltipProps` — a tooltip around the element it wraps (`children`), showing `content`, with `side`, `align`, `delayMs` and a class. Your app mounts one tooltip provider above the views; a tooltip never mounts its own.
38
41
  - `ViewsCheckboxProps` — a checkbox: `checked`, and `indeterminate` for a box ticked partly, whose press hands `true` while `checked` is false. `onCheckedChange` hands the new value and, where your library reports it, `{ event }`, the press that changed it (a list reads its shift key for a range). `partialTone` colours the partial mark, `muted` by default or `brand` for a select-all with a live selection; with `disabled`, `readOnly` (shown as it is and not pressable: a yes/no the grid or a field row can't write), a class, `tabIndex` and `aria-label`.
39
- - `ViewsMenuProps` — a menu opened at an `anchor`, with no trigger child (a group opens beside it only where it asks to and your menu can), controlled by `open` and `onOpenChange`, drawing its `items`, placed by `side` and `align`, and named by `label`, its accessible name, which every menu the package opens hands. On Base UI it is the menu's root, positioner and popup, the anchor handed to the positioner.
40
- - `ViewsMenuItem` — one row of a menu, as data your `Menu` draws: its `key`, `label` (always words), `icon`, `onSelect`, `disabled` with an optional `disabledReason` (why, for you to show), and `destructive`, a `separatorBefore`, a `shortcut` hint drawn at its end and never bound, and an `href` that makes it a link (with `onSelect` still firing). A `checked` row is checkable and closes the menu like any row, unless it carries `keepOpen`. A row with `children` is a group: its rows drawn in place under its label, unless it carries `beside` (open them one level in), its own `onSelect`, `href` and `checked` ignored; a disabled group's rows reach your `Menu` already `disabled`, with the group's reason where they give none. Any row may carry `detail`, its current value in words, for its end. A plain row may carry `render`, which draws its inside in place of its icon, words, keys and count (`label` still its name; called while the menu draws, so it may call no hooks). All three are hints: a menu that draws none of them keeps every group in place and every row closing.
42
+ - `ViewsMenuProps` — a menu opened at an `anchor`, with no trigger child (a group opens beside it only where it asks to and your menu can), controlled by `open` and `onOpenChange`, drawing its `items`, placed by `side` and `align`, and named by `label`, its accessible name, which every menu the package opens hands; `data-slot`, its public name where ViewKit names it (a view's menu, `vk-view-menu`, VK-988), for your menu to draw on its popup. On Base UI it is the menu's root, positioner and popup, the anchor handed to the positioner.
43
+ - `ViewsMenuItem` — one row of a menu, as data your `Menu` draws: its `key`, `label` (always words), `icon`, `onSelect`, `disabled` with an optional `disabledReason` (why, for you to show), and `destructive`, a `separatorBefore`, a `shortcut` hint drawn at its end and never bound, and an `href` that makes it a link (with `onSelect` still firing). A `checked` row is checkable and closes the menu like any row, unless it carries `keepOpen`. A row with `children` is a group: its rows drawn in place under its label, unless it carries `beside` (open them one level in), its own `onSelect`, `href` and `checked` ignored; a disabled group's rows reach your `Menu` already `disabled`, with the group's reason where they give none. Any row may carry `detail`, its current value in words, for its end. A plain row may carry `render`, which draws its inside in place of its icon, words, keys and count (`label` still its name; called while the menu draws, so it may call no hooks). All three are hints: a menu that draws none of them keeps every group in place and every row closing. A row's `slot`, where ViewKit names it (a panel's menu under `panelControls`: `vk-sort-rule-action`), is its public name, `key` saying which: draw them on your row as `data-slot` and `data-key`.
41
44
  - `ViewsCommandParts` — the command list's parts, the shape cmdk-based copies already have: `Root` (taking `label`, `shouldFilter` false to hand filtering to the host, a scoring `filter`, `loop` to wrap the arrows, and `defaultValue`, the value of the item highlighted as the list opens, none while no item has it), `Input` (a controlled `value` with `onValueChange`, a `placeholder`, `autoFocus`, a `ref`, `onKeyDown`, and `chrome` `search` for your search row or `bare` for the input alone), `List`, `Empty`, `Group` (with a `heading`) and `Item` (a `value`, `onSelect`, `disabled`, and `chosen`, which you colour as your chosen row while the package's row inside draws the check).
42
45
  - `ViewsPickerProps` — a whole pick list your app draws, its search, rows, empty row and create row: its `label` (the field's name), `items`, `multiple`, `value` (one value or `null`; several, a list), `onValueChange` (the pick, `null` for the empty row, or the whole new list on every change; nothing is saved until the editor closes), `onDone` (a pick of one is made), `empty` (the empty row's words; absent, a value of one can't be emptied), `search` (its words before anything is typed), `onCreate` (handed what was typed, returns the value it makes, which you then pick or add), `typed` (what was typed on what opened it: on a computer, light its first match, so Enter picks it), `autoFocus`, `keyed` (opened by a key: on a computer, light the held row as it opens and let ↓ go on from it to the next), `fromHeld` (opened by a press, before a row is lit: ↓ and ↑ go on from the held row, to the next or the one before, nothing drawn lit until then), `form`, `computer` or `phone` (on a phone, draw no ✕, ✓ or Cancel of your own and hand every change as it is made), and for a relation `onSearch` (the editor filters or fetches: hand it every typed query and draw `items` as handed), `doing` (`searching` or `failed`; `searching` from the keystroke until the typed query answers, its `items` meanwhile the held records that match it alone), `onRetry`, `onMore`, `actions` (`ViewsPickerAction` rows after the rows) and `lead` (which held value leads, `onLead`, `label` and `makeLabel`); and, where your app adds options to a select's or multiselect's list, `onAdd` (draw an add row after the matches and call it with the typed text; handed instead of `onCreate`), `adding` (the text being added: draw its row as waiting, not pressable) and `addRefused` (your app's refusal, or the failure's words, to show where the add row was). A body that draws none of them offers no add. A status field's `steps`: its active steps by value, in order, so a held archived option is placed nowhere, as its cell places it.
43
46
  - `ViewsPickerItem` — one row of a picker body, as data: its `value` and `label`, a status `slot` (draw your status badge) or a category `color` (draw your option chip), an `icon` (your glyph's name, as `AppIcon` draws it), a quieter `line`, the `group` it stands under, `disabled`, and for a relation's record a `badge` (a word telling kinds apart), a `glyph` (the record's own, unsized), an `avatarUrl` and its `kind`.
@@ -58,7 +61,7 @@ The primitives your app hands in, modelled on Base UI's shapes: a controlled `op
58
61
  - `ViewsSortBodyProps` — the sort editor's whole body your app draws: `label`, `options` (the fields it sorts by, each its `value`, `label` and `defaultDir`, and, as the grid's header marks its column, its field's `type`, its `part` and the header's `glyph`), `rules` (in order, the first sorting first), `setAside` (the set-aside sorts, `[]` when none), `max`, `form`, `addSort` (on a computer, Add sort at its foot), `onStepChange` (on a phone: a step of your body's own, its title and Back, `null` once back), `onRulesChange` (the whole rules and, when handed, the set-aside sorts kept; every change as it is made; a list that breaks the rules writes nothing), `onDone` (what holds it closes) and, on a phone where the sheet's head doesn't draw them, `actions` (the ✕, taking the rules back to what they were as it opened, and ✓). ViewKit keeps the check, the latest rules between renders, the close on the last rule and what ✕ takes back to.
59
62
  - `ViewsQuickFiltersBodyProps` — the quick filters' whole body your app draws: `label`, `fields` (each its `key`, `label`, `searchPlaceholder`, its `options` as the quick filter field hands them (each value's mark is its option's), and `values` in the order to show them, each value its key, its words, its `count` where counts show and whether it is `held`; a held value no count lists is among them, drawn from the hold and worded by the config's `heldLabels` else its key; after the fields offered, each other field holding a value, its held values alone), `hold` (each held field once, its values), `several`, `showCounts`, `form`, `onHoldChange` (the whole hold, every change as it is made; one that holds a field twice, more than one value where `several` is false, or a value added on a field the strip doesn't offer writes nothing), `onDone` (what holds it closes) and, on a phone where the sheet's head doesn't draw it, `actions` (the ✕, closing it).
60
63
  - `ViewsFilterBodyProps` — the filter editor's whole body your app draws: `label`, `fields` (the fields a rule may name, `ViewsFilterBodyField`s, each column the list can't filter among them in its place, greyed by its `disabled`), `filter` (the level it is open on, a `FilterGroup`: an advanced filter's group on a computer, the whole filter on a phone), `levels` (how deep its rules may stand, its own the first), `excludable` (whether it may be `not`), `relation` (where the level is a relation's where edited in place: its field key, words and quantifier, and `gone`, why in words, where the list no longer lists the relation: there a level that adds or changes a rule writes nothing), `form`, `onFilterChange` (the whole level and, at a relation, its quantifier; every change as it is made; a level that breaks the rules writes nothing; an empty one on a computer takes its advanced filter away), `ruleValue` (a rule's value in ViewKit's own body for its type, each change handed back as the rule), `onDone` (what holds it closes) and, on a phone where the sheet's head doesn't draw them, `actions` (the ✕, taking the filter back to what it was as it opened, and ✓). ViewKit keeps the check, the Or top's wrap, the pills' keys and what ✕ takes back to.
61
- - `ViewsFilterBodyField` — a field a filter body's rule may name: `key`, `label`, `fieldKey`, `part`, `type` (its value type, which says its ways), `far` (a relation's fields one level in) and `disabled` (on a column the list can't filter, why in words: draw it greyed and never name it in a rule).
64
+ - `ViewsFilterBodyField` — a field a filter body's rule may name: `key`, `label`, `fieldKey`, `part`, `type` (its value type, which says its ways), `far` (a relation's fields one level in), `integer` (`true` on a number field that holds whole numbers only: its box takes whole numbers) and `disabled` (on a column the list can't filter, why in words: draw it greyed and never name it in a rule).
62
65
  - `ViewsFieldsBodyProps` — the field list's whole body your app draws: `purpose` (`sort` or `filter`), `label`, `search` (its search's words), `fields` (each a `ViewsFieldsBodyField`), `own` (the field being changed; absent where a pick adds), `form`, `onPick` (the key picked, and a far field's key for a far field; a key not handed, or handed `disabled`, writes nothing) and `onDone` (what holds it closes, or on a phone the page turns back).
63
66
  - `ViewsFieldsBodyField` — a field as the field list's body is handed it: `key`, `label`, `type` and `part` (its field's type and the part it reads, as the grid's header reads them), `glyph` (its column's glyph, drawn as the header draws it), `disabled` (why it can't be picked) and, for a filter's relation, `far` (its far fields, one level in).
64
67
  - `ViewsFilterPartBodyProps` — a filter rule's way or value your app draws: `part` (`way` or `value`), `label`, `rule` (the rule as data), `field` (the field it names, a `ViewsFilterBodyField` with no `far`), `ways` (each its operator and its words), `own` (ViewKit's own value body; null at `way`), `form`, `onRuleChange` (the rule with its new way, written as ViewKit's own writes one, or its new value; another field or part, a way its field doesn't offer or a value its way can't hold writes nothing) and `onDone` (what holds it closes).
@@ -95,6 +98,8 @@ The primitives your app hands in, modelled on Base UI's shapes: a controlled `op
95
98
  - `ViewsBarPlacement` — where the selection bar's fixed box sits on one form: `bottom` (a CSS length, default `calc(1rem + env(safe-area-inset-bottom))`), `zIndex` (default 50) and `className` (your own classes on the box).
96
99
  - `ViewsSheetActionsPlace` — where the ✕ and ✓ stand on a phone, the provider's `sheetActions`: `bar` (the default, the panel's own bar, or a toolbar panel's own ✕, inside your sheet) or `head` (handed to your sheet as `actions`, and none drawn inside; a toolbar panel hands `close` alone, but the sort editor hands `close`, which takes its rules back, and `done`).
97
100
  - `ViewsInputProps` — a single-line text box: every prop of an `<input>`, `ref` included, which your element must receive, and `chrome`, `bare` (the default: a grid cell, a panel that frames the box) or `field` (your field's frame).
101
+ - `ViewsSelectItem` — one row of a `Select`'s list: its `value`, `label`, an `icon`, a second `line`, the `group` it stands under, `disabled`, and `level`, the rows one level in under a row never picked itself (draw them in place, or flatten them with `flatSelectItems`).
102
+ - `ViewsSelectProps` — the components map's `Select`, which ViewKit's sort and filter panels draw under `panelControls` for their boxes that pick: its `items`, its `value` (one, several with `multiple`, or none) and `onValueChange`, a `placeholder`, `disabled`, `open` and `onOpenChange` (on a phone a panel holds it shut and turns its sheet to a step of its own on `onOpenChange(true)`: honour both when handed), `search` (the words of the search ViewKit's own shows over a long list), `size` (`sm` or `default`), a class, `aria-label`, and the part's `data-slot` and `data-key`, to draw on the box a person presses. Forward any other prop to your box.
98
103
  - `ViewsAnchor` — where a floating part attaches: an element, a ref to one, a point `{ x, y }` (a context menu), or `null`.
99
104
  - `ViewsSide` — the side a floating part opens on: `top`, `right`, `bottom` or `left`.
100
105
  - `ViewsAlign` — how a floating part lines up along that side: `start`, `center` or `end`.
@@ -139,8 +144,9 @@ The pieces the rendering is built from, and your app's own pieces it cannot draw
139
144
  - `ViewsToggleRowProps` — a boolean flipped in place: `icon`, `label`, `active`, `disabled` and the `disabledReason` your `Tooltip` shows, `onClick`, and `reset` (`{ onReset }`), the way back to the reader's default.
140
145
  - `ViewsPanelSearchProps` — a panel's text box: `value`, `onChange`, `onClear`, `placeholder`, `autoFocus`, `onKeyDown`, `onFocus`, `inputRef`, `leading` (`null` drops the magnifier), `suffix` and `inputMode`.
141
146
  - `ViewsPillProps` — one option of a row of pills: `active`, `variant` (`solid` or `plain`), `size` (`default` or `sm`), `leading` and `leadingSlot`, your own `activeClassName` and `hoverClassName`, `onClick`, `onContextMenu`, `onPointerDown`, `menuOpen` (it opens a menu) and `ref`.
142
- - `ViewsToolbarButtonProps` — a toolbar's button: its `icon`, its `label` (its name, and the word a dress shows unless `word` says another, or `null` for none), a `count` in its corner that becomes a ✕ badge clearing what it counts when handed `onClear`, a `dot` drawn instead of a count, `open`, `changed`, `edge` (the row's outermost button), `disabled`, `size` (`md` or `sm`), `popup` (`menu` or `dialog`, with `aria-expanded` from `open`), `joined` (`start`, `middle` or `end`: one of buttons joined as one, its outer corners alone rounded, `data-joined`), `waits` (its words say what it waits for, in the placeholder's colour, `data-waits`), `onClick`, `onPointerDown` and `ref`; its own words (`children`) keep to one line, cut with "…" where a holder caps its width.
143
- - `ViewsToolbarButtonPart` — which of the toolbar's own buttons a `ToolbarButton` stands for, where your own toolbar frame draws it: `views-chip`, `views-tab`, `views-more`, `views-add`, `clear` or `save`, handed as `part` with `current` (a view tab; `true`, the open one) and `onContextMenu` (a tab's verbs); draw it as its `data-slot` (`vk-views-chip`, `vk-views-tab`, `vk-views-more`, `vk-views-add`, `vk-toolbar-clear`, `vk-toolbar-save-button`).
147
+ - `ViewsToolbarButtonProps` — a toolbar's button: its `icon`, its `label` (its name, and the word a dress shows unless `word` says another, or `null` for none), a `count` in its corner that becomes a ✕ badge clearing what it counts when handed `onClear`, a `dot` drawn instead of a count, `open`, `changed`, `edge` (the row's outermost button), `disabled`, `size` (`md` or `sm`), `popup` (`menu` or `dialog`, with `aria-expanded` from `open`), `joined` (`start`, `middle` or `end`: one of buttons joined as one, its outer corners alone rounded, `data-joined`), `waits` (its words say what it waits for, in the placeholder's colour, `data-waits`), `part` (which button it is, below), `className` (its toolbar place's class: put it on the button), `onClick`, `onPointerDown` and `ref`; its own words (`children`) keep to one line, cut with "…" where a holder caps its width.
148
+ - `ViewsToolbarButtonPart` — which of the toolbar's buttons a `ToolbarButton` stands for, handed as `part` by every button the toolbar draws: named after the `toolbarParts` place it stands in (`options`, `search`, `quick`, `new`, `sort`, `filter`, `filter-add`, `filters`, `advanced-filters`, `sort-pill`), a place's second kind of button by a name of its own (`sort-add`, Sort's +; `more-filters`, "+N filters"), ⋯ `more`, and the frame's parts (`ViewsFramePart`). Which place draws which is [`/list`'s Default keys](./list.md#default-keys). An atom that spreads its leftover props onto its element takes `part` out first.
149
+ - `ViewsFramePart` — the six a `ToolbarButton` is handed only where your own toolbar frame draws them: `views-chip`, `views-tab`, `views-more`, `views-add`, `clear` or `save`, with `current` (a view tab; `true`, the open one) and `onContextMenu` (a tab's verbs); draw each as its `data-slot` (`vk-views-chip`, `vk-views-tab`, `vk-views-more`, `vk-views-add`, `vk-toolbar-clear`, `vk-toolbar-save-button`). Dress by these, not by any `part`: `if (part && FRAME.has(part))`.
144
150
  - `ViewsListProps` — the rows' container, the inset a run of rows sits in inside a panel or a command list's group: its `children` and a class.
145
151
  - `ViewsRowContentProps` — a row's inside, all the row is inside a command list's item, which owns the element, the highlight and the keyboard.
146
152
  - What it says: a `label` (text truncates to one line, any other node is laid out in a row so it centres; `wrap` lets a long label break), a `description` line under it, a `leading` glyph (with `leadingLane` to keep its width when there is none), `trailing` content after the label, and a `detail` at its right edge in the subtle colour, such as a setting's current choice.
@@ -34,13 +34,16 @@ Guide: [the provider](../guides/the-provider.md).
34
34
  - `VK_CONTROL_PRIVATE_FAMILIES` — the prefixes of the controls' own machinery, set and read by a control alone (the smooth corner's, the pressing room's, and each control's own): not public, and your app neither sets nor reads them.
35
35
  - `COMPONENT_NAMES` — the primitives your app hands in through the provider: `Button`, `Popover`, `Tooltip`, `Checkbox`, `Menu`, `Collapse`, `Sheet`, `AppIcon`, `Markdown`, `TextBody`, `NumberBody`, `Picker`, `LinksBody`, `DateBody`, `PartsBody`, `ValuesBody`, `SortBody`, `FilterBody`, `FilterPartBody`, `FieldsBody`, `QuickFiltersBody`, `ViewsListBody` and `CustomizeBody` ([the components map](../contract.md#the-components-map)).
36
36
  - `ComponentName` — one member of `COMPONENT_NAMES`.
37
- - `OPTIONAL_COMPONENT_NAMES` — the primitives your app may leave out: `Input` (a plain default), `Command` (deprecated: read by nothing), `Calendar` (reached without one, it throws an error naming it), `RowsWait` (without one, a grid waiting for new rows draws Loading in place of its body), `GroupBody` (deprecated: read by nothing), `SearchField` (without one, the toolbar's search draws its own field), `PortsHost` (without one, an app that hands no `confirm` gets the browser's and one that hands no `toast` sees nothing) and `SelectionBar` (without one, a selection draws ViewKit's own bar) ([the components map](../contract.md#the-components-map)).
37
+ - `OPTIONAL_COMPONENT_NAMES` — the primitives your app may leave out: `Input` (a plain default), `Select` (drawn only inside the sort and filter panels, under the provider's `panelControls`), `Command` (deprecated: read by nothing), `Calendar` (reached without one, it throws an error naming it), `RowsWait` (without one, a grid waiting for new rows draws Loading in place of its body), `GroupBody` (deprecated: read by nothing), `SearchField` (without one, the toolbar's search draws its own field), `PortsHost` (without one, an app that hands no `confirm` gets the browser's and one that hands no `toast` sees nothing) `SelectionBar` (without one, a selection draws ViewKit's own bar) and `ViewMenu` (without one, a views row's pill opens its view's `menu` rows) ([the components map](../contract.md#the-components-map)).
38
38
  - `OptionalComponentName` — one member of `OPTIONAL_COMPONENT_NAMES`.
39
39
  - `ATOM_NAMES` — the pieces the rendering is built from, and the pieces of your app's own it cannot draw itself (a command cell's verb menu, the row's right-click menu, where a relation goes, a wait, how a list asks for more), and the panels' rows. Each ships as a default, and your app swaps any of them through the provider's `atoms` ([the atoms](../contract.md#the-atoms)).
40
40
  - `AtomName` — one member of `ATOM_NAMES`.
41
41
  - `ATOM_SLOTS` — the `data-slot` values the default atoms mark themselves with, prefixed like the grid's (`vk-row`, `vk-tick`, `vk-status`, `vk-row-menu` …) ([the atoms](../contract.md#the-atoms)).
42
42
  - `AtomSlot` — one member of `ATOM_SLOTS`.
43
- - `EDITOR_SLOTS` — the `data-slot` values the editor panel marks its parts with, prefixed like the grid's (`vk-editor-panel`, `vk-editor-bar`, `vk-editor-refusal`) ([the editor panel](../contract.md#the-editor-panel)).
43
+ - `PANEL_SLOTS` — the `data-slot` names of the parts inside the default panels, by panel (`sort`, `filter`, `group`, `customize`, `viewsList`, `viewMenu`, `quick`): a sort rule, Add sort, a filter rule, one Customize section … (VK-988, [the panels' parts](../contract.md#the-atoms)). Each is in `ATOM_SLOTS` too.
44
+ - `PanelSlot` — one member of `PANEL_SLOTS`.
45
+ - `EDITOR_PART_SLOTS` — the `data-slot` names of the parts inside the default field editors, by editor (`shared`, `date`, `text`, `number`, `parts`, `values`, `links`, `picker`): the date editor's quick picks, the Picker's search and + Add, a values row, a link's field … (VK-989, [the field editors' parts](../contract.md#the-field-editors-parts-vk-989)). Each is in `EDITOR_SLOTS` too.
46
+ - `EDITOR_SLOTS` — the `data-slot` values the editor panel marks its parts with, prefixed like the grid's (`vk-editor-panel`, `vk-editor-bar`, `vk-editor-refusal`), the frames an editor's body stands in, and every field editor part's ([the editor panel](../contract.md#the-editor-panel)).
44
47
  - `EditorSlot` — one member of `EDITOR_SLOTS`.
45
48
  - `EDITOR_STATES` — the states the editor panel's popover carries: `vk-body`, the app's own body it holds (`picker`, `parts`, `values` or `links`).
46
49
  - `EditorState` — one member of `EDITOR_STATES`.
@@ -69,7 +72,7 @@ Guide: [columns](../guides/columns.md).
69
72
  A column is plain data: what a list shows in one place for every row, how it reads the row, and what may be done to it. The grid, the board and the other views all read the same `ListColumn`.
70
73
 
71
74
  - `ListColumn` — one column's declaration, generic over your row type. It requires `id`, `header` (a node) and `width` (the starting width every columnar view sizes from; what a person drags it to lives in their preferences). The optional members, by what they are for:
72
- - Reading the row: `accessor` (the value the cell draws, compares and copies), `editAccessor` (the stored value an editor opens on, where the display read carries fallbacks), `aggAccessor` (the number the footer totals), `render` (a custom cell, handed the row and a `RenderedValue`), `indicator`, `actions` (buttons on the cell, `ListCellAction`).
75
+ - Reading the row: `accessor` (the value the cell draws, compares and copies), `editAccessor` (the stored value an editor opens on, where the display read carries fallbacks), `aggAccessor` (the number the footer totals), `render` (a custom cell, handed the row and a `RenderedValue`), `indicator` (an adornment beside the value, handed the row and a `RenderedValue` holding the value the cell shows: a write still saving while it saves, else the accessor's), `actions` (buttons on the cell, `ListCellAction`).
73
76
  - What the value is: `type` (`ListColumnType`), `options` (`ListColumnOption`), `multiple` (the cell holds several values), `labels: false` (a list whose rows keep only values, so its editor offers no label box), `region` (the record's country read off the row, where a phone typed, pasted or filled without its country code is read), `chips.normalize` (the rule that turns typed text into a stored multiselect value), `relation` (a relation's candidates: a `source`, or static `options`, and the default `entity` kind), `nameFallback` (the words a name column draws for a row with an empty name), `format` (`ListColumnFormat`), `align`, `icon`.
74
77
  - Money: `currencyAccessor` (each row's own currency code, winning over `format.currency`), `surfaceOwnsCurrency` (the column, not the row, says which currency every figure is in), `money` and `reading` (a convertible column's declaration and the reading in force), `editUnit` (the unit picker beside the number editor).
75
78
  - The footer: `defaultAggregate`, `footerKinds` (the picks the footer offers, `none` always among them), `footerField` (the field whose figures the footer reads when it is not the column's own), `aggregateSuffix` (the unit drawn after a figure), `ratio` (a ratio's numerator and denominator, summed and divided once).
@@ -142,6 +145,7 @@ Three layers decide a write, and each may only take away from the one before: th
142
145
  - `toggleListReadOnly` — returns a new `ListSettingsConfig` with the whole list's read-only lock turned on or off (off is the key absent).
143
146
  - `lockKeyOf` — the key a column's lock is stored under: its field's key, so one lock holds on every surface that draws the field; a column with no field keeps its own id.
144
147
  - `gridColumnLocked` — whether the workspace's settings lock a column: the list is read-only, or the column's key is locked. False with no config.
148
+ - `withEditThroughLocks` — a `ListSettingsConfig` with each edit-through pair locked together: a lock under a worked-out field edited through a stored one (`editThrough`), or under that stored field, holds under both keys. Takes the config and the fields to read the pairs from; gives back the same config when no pair widens it. The grid checks its `listConfig` through it with its columns' fields; a surface that checks a lock by field key (a record's `LockedResolver`) passes its own fields, so it agrees with the grid. The stored config is untouched, so each field keeps its own toggle.
145
149
  - `columnEffectiveWritable` — `columnWritable` and not locked: the writable answer every gate site uses.
146
150
  - `gridColumnEffectiveClearable` — whether a column accepts Clear, Cut or Delete-to-empty: effectively writable and `clearable`.
147
151
  - `gridClearRefusal` — why a clear was refused, as the toast says it: the lock (`views.grid.locked`) when the declaration would allow the clear but the workspace locks the column, otherwise `columnClearRefusal`'s sentence. Takes the column, the config and a resolver that defaults to `resolveViewsMessage`.
@@ -358,7 +362,7 @@ Money is stored in the currency each row was entered in, and a column is read ei
358
362
  - `MoneyColumn` — the members a money column carries: a `DenominatedColumn` with its `money` declaration, the `reading` in force, its `accessor`, its `aggAccessor` and its `editAccessor`. Structural, so a grid column and a server-side source column both satisfy it.
359
363
  - `convertMoney` — a row's figure in a display currency, from its declaration: null for a value that is not a number, null for a row whose rates are null (a row with no currency), and the `FxRateError` of `convertRowAmount` for a row with a currency and no rate.
360
364
  - `readMoneyColumn` — returns the column read the given way. Original sets the accessor to the amount, the total to its own figure and the currency to the row's code; a display currency converts the accessor and the total, sets the column's currency and marks the column as owning it. In every reading the `editAccessor` reads the row's own amount (one the column already has is kept), so an edit, an undo, a copy and a fill work on what the row stores, in its own currency, while the cell shows the converted figure. Every derivation starts from the declaration, so reading twice is reading once; a column with no declaration comes back unchanged.
361
- - `readMoneyColumns` — reads every money column the reader's way: their chosen reading by field key, else the optional legacy reader's choice, else what the column opens on for the reader's default currency. A column with no declaration or no field comes back unchanged.
365
+ - `readMoneyColumns` — reads every money column the reader's way: their chosen reading by field key, else the optional legacy reader's choice, else what the column opens on for the reader's default currency. A column read in Original also gets its `sortAccessor`: each row's figure in the reader's default currency (null with no rate), which the grid's reader answers the sort with, so rows in different currencies order as one number. A column with no declaration or no field comes back unchanged.
362
366
  - `moneyReadingOf` — the reading in force on a money column: the one it was read with, else its declared reading; undefined for a column with no declaration, or one declared `"default"` and not yet read.
363
367
  - `convertedFromOf` — the currency a column's figure was converted from for a row: the row's own code, when the column is read in a currency other than Original, the row has a figure to draw (it has rates) and stores another currency than the reading's; null otherwise. What `renderTypedCellValue` marks with ≈, and what a money editor names under the row's own amount.
364
368
  - `shownCodeOf` — the code a cell draws for a row: a per-row column's row code, a converted column's one code, undefined for a column that is not money. Never `COLUMN_WIDE_CODE`.
@@ -10,7 +10,12 @@ Cheapest change first. Each step reaches further and costs more to keep current.
10
10
  3. **Wrappers and slots.** Every part carries a `data-slot`; every state a `data-*`. A stylesheet or a
11
11
  wrapper styles `[data-slot="vk-grid-row"][data-selected]` without touching the package.
12
12
  4. **Your own primitives.** The components map is yours: the popover, the menu, the calendar inside
13
- the grid are your copies, so their look is already yours.
13
+ the grid are your copies, so their look is already yours. Inside the sort and filter panels they are
14
+ yours too where the provider's `panelControls` says so (VK-1013): your Button, Select, Menu, Popover and
15
+ Input, each handed its part's name. The other panels follow (VK-1014), and the field editors (VK-991);
16
+ the Tooltip, the Picker, ViewKit's menu rows, the sort's grip, the filter's number boxes and the filter
17
+ bar's way-and-value box stay ViewKit's. The sort's direction box keeps, out of sight, ViewKit's two
18
+ words drawn in its own classes, which size the box round your Select so the row never moves on a turn.
14
19
  5. **A copy of the rendering.** When the copy mode ships, a view's default rendering is a registry
15
20
  item you copy into your app and own from then on, updated by a three-way merge against the tag you
16
21
  copied. Reach for it only when the structure itself must differ.