viewkitjs 0.27.0 → 0.29.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 (469) hide show
  1. package/CHANGELOG.md +178 -0
  2. package/MIGRATION.md +123 -5
  3. package/fields/dist/derived.d.ts +2 -1
  4. package/fields/dist/derived.js +9 -3
  5. package/fields/dist/entities.js +41 -3
  6. package/fields/dist/index.d.ts +1 -1
  7. package/fields/dist/index.js +1 -1
  8. package/fields/dist/messages.d.ts +8 -2
  9. package/fields/dist/messages.js +3 -0
  10. package/fields/dist/range.d.ts +6 -0
  11. package/fields/dist/range.js +8 -0
  12. package/fields/dist/registry.js +11 -1
  13. package/fields/dist/spec-changes.js +1 -0
  14. package/fields/dist/types.d.ts +23 -1
  15. package/fields/docs/guides/derived-fields.md +7 -5
  16. package/fields/docs/guides/field-types.md +2 -2
  17. package/fields/docs/guides/the-index.md +1 -1
  18. package/fields/docs/reference/fields.md +3 -1
  19. package/fields/docs/reference/types.md +3 -1
  20. package/fields/skills/viewkit/SKILL.md +1 -1
  21. package/package.json +2 -1
  22. package/postgres/dist/definitions/build.js +29 -5
  23. package/postgres/dist/definitions/label.d.ts +7 -0
  24. package/postgres/dist/definitions/label.js +9 -1
  25. package/postgres/dist/definitions/lookup.js +6 -2
  26. package/postgres/dist/definitions/place.d.ts +6 -3
  27. package/postgres/dist/definitions/rollup.js +5 -1
  28. package/postgres/dist/definitions/storage.d.ts +15 -0
  29. package/postgres/dist/definitions/storage.js +52 -1
  30. package/postgres/dist/definitions/stored.js +21 -0
  31. package/postgres/dist/phone.d.ts +13 -1
  32. package/postgres/dist/phone.js +23 -3
  33. package/postgres/dist/search-indexes.d.ts +6 -1
  34. package/postgres/dist/search-indexes.js +71 -25
  35. package/postgres/dist/search.js +3 -3
  36. package/postgres/docs/guides/definitions.md +22 -5
  37. package/postgres/docs/guides/field-map.md +5 -4
  38. package/postgres/docs/reference/definitions.md +3 -3
  39. package/postgres/docs/reference/postgres.md +1 -1
  40. package/views/dist/cells/cell-format.d.ts +3 -1
  41. package/views/dist/cells/cell-format.js +3 -3
  42. package/views/dist/cells/cell-values.js +9 -10
  43. package/views/dist/cells/use-cell-format.d.ts +8 -1
  44. package/views/dist/cells/use-cell-format.js +13 -2
  45. package/views/dist/contract.d.ts +218 -5
  46. package/views/dist/contract.js +233 -1
  47. package/views/dist/controls/alert/alert.d.ts +46 -0
  48. package/views/dist/controls/alert/alert.js +11 -0
  49. package/views/dist/controls/alert/looks.d.ts +4 -0
  50. package/views/dist/controls/alert/looks.js +19 -0
  51. package/views/dist/controls/alert/tokens.d.ts +92 -0
  52. package/views/dist/controls/alert/tokens.js +25 -0
  53. package/views/dist/controls/alert-dialog/alert-dialog.d.ts +50 -0
  54. package/views/dist/controls/alert-dialog/alert-dialog.js +67 -0
  55. package/views/dist/controls/alert-dialog/confirm.d.ts +13 -0
  56. package/views/dist/controls/alert-dialog/confirm.js +11 -0
  57. package/views/dist/controls/alert-dialog/looks.d.ts +4 -0
  58. package/views/dist/controls/alert-dialog/looks.js +17 -0
  59. package/views/dist/controls/alert-dialog/tokens.d.ts +119 -0
  60. package/views/dist/controls/alert-dialog/tokens.js +32 -0
  61. package/views/dist/controls/alert-dialog.css +95 -0
  62. package/views/dist/controls/alert.css +51 -0
  63. package/views/dist/controls/bulk-bar/bulk-bar-of.d.ts +66 -0
  64. package/views/dist/controls/bulk-bar/bulk-bar-of.js +22 -0
  65. package/views/dist/controls/bulk-bar/bulk-bar.d.ts +40 -0
  66. package/views/dist/controls/bulk-bar/bulk-bar.js +278 -0
  67. package/views/dist/controls/bulk-bar/looks.d.ts +10 -0
  68. package/views/dist/controls/bulk-bar/looks.js +14 -0
  69. package/views/dist/controls/bulk-bar/map-selection-bar.d.ts +19 -0
  70. package/views/dist/controls/bulk-bar/map-selection-bar.js +57 -0
  71. package/views/dist/controls/bulk-bar/tokens.d.ts +136 -0
  72. package/views/dist/controls/bulk-bar/tokens.js +36 -0
  73. package/views/dist/controls/bulk-bar/words.d.ts +50 -0
  74. package/views/dist/controls/bulk-bar/words.js +19 -0
  75. package/views/dist/controls/bulk-bar.css +96 -0
  76. package/views/dist/controls/button/button.js +3 -1
  77. package/views/dist/controls/button.css +5 -4
  78. package/views/dist/controls/checkbox/checkbox.js +3 -1
  79. package/views/dist/controls/checkbox.css +1 -1
  80. package/views/dist/controls/choice/tokens.d.ts +79 -0
  81. package/views/dist/controls/choice/tokens.js +22 -0
  82. package/views/dist/controls/choice.css +31 -0
  83. package/views/dist/controls/collapsible/collapsible.d.ts +39 -0
  84. package/views/dist/controls/collapsible/collapsible.js +18 -0
  85. package/views/dist/controls/collapsible/looks.d.ts +4 -0
  86. package/views/dist/controls/collapsible/looks.js +5 -0
  87. package/views/dist/controls/collapsible/map-collapse.d.ts +2 -0
  88. package/views/dist/controls/collapsible/map-collapse.js +6 -0
  89. package/views/dist/controls/collapsible/tokens.d.ts +68 -0
  90. package/views/dist/controls/collapsible/tokens.js +19 -0
  91. package/views/dist/controls/collapsible.css +83 -0
  92. package/views/dist/controls/compound-editor/looks.js +1 -1
  93. package/views/dist/controls/compound-editor/place-parts.js +5 -1
  94. package/views/dist/controls/controls.d.ts +19 -0
  95. package/views/dist/controls/controls.js +17 -0
  96. package/views/dist/controls/customize/customize.d.ts +125 -0
  97. package/views/dist/controls/customize/customize.js +243 -0
  98. package/views/dist/controls/customize/glide.d.ts +10 -0
  99. package/views/dist/controls/customize/glide.js +55 -0
  100. package/views/dist/controls/customize/looks.d.ts +13 -0
  101. package/views/dist/controls/customize/looks.js +11 -0
  102. package/views/dist/controls/customize/map-customize-body.d.ts +18 -0
  103. package/views/dist/controls/customize/map-customize-body.js +160 -0
  104. package/views/dist/controls/customize/rules.d.ts +23 -0
  105. package/views/dist/controls/customize/rules.js +19 -0
  106. package/views/dist/controls/customize/tokens.d.ts +40 -0
  107. package/views/dist/controls/customize/tokens.js +12 -0
  108. package/views/dist/controls/customize/words.d.ts +58 -0
  109. package/views/dist/controls/customize/words.js +37 -0
  110. package/views/dist/controls/customize.css +54 -0
  111. package/views/dist/controls/date-editor/date-editor.d.ts +2 -1
  112. package/views/dist/controls/date-editor/looks.js +1 -1
  113. package/views/dist/controls/date-editor/map-calendar.js +3 -1
  114. package/views/dist/controls/filter-editor/block.d.ts +31 -0
  115. package/views/dist/controls/filter-editor/block.js +27 -0
  116. package/views/dist/controls/filter-editor/filter-editor.d.ts +58 -0
  117. package/views/dist/controls/filter-editor/filter-editor.js +250 -0
  118. package/views/dist/controls/filter-editor/how.d.ts +23 -0
  119. package/views/dist/controls/filter-editor/how.js +14 -0
  120. package/views/dist/controls/filter-editor/map-filter-body.d.ts +33 -0
  121. package/views/dist/controls/filter-editor/map-filter-body.js +190 -0
  122. package/views/dist/controls/filter-editor/map-rules.d.ts +101 -0
  123. package/views/dist/controls/filter-editor/map-rules.js +304 -0
  124. package/views/dist/controls/filter-editor/parts.d.ts +46 -0
  125. package/views/dist/controls/filter-editor/parts.js +75 -0
  126. package/views/dist/controls/filter-editor/rules.d.ts +142 -0
  127. package/views/dist/controls/filter-editor/rules.js +201 -0
  128. package/views/dist/controls/filter-editor/tokens.d.ts +83 -0
  129. package/views/dist/controls/filter-editor/tokens.js +23 -0
  130. package/views/dist/controls/filter-editor/words.d.ts +74 -0
  131. package/views/dist/controls/filter-editor/words.js +46 -0
  132. package/views/dist/controls/filter-editor.css +142 -0
  133. package/views/dist/controls/group-editor/group-editor.d.ts +56 -0
  134. package/views/dist/controls/group-editor/group-editor.js +126 -0
  135. package/views/dist/controls/group-editor/map-group-body.d.ts +19 -0
  136. package/views/dist/controls/group-editor/map-group-body.js +106 -0
  137. package/views/dist/controls/group-editor/rules.d.ts +48 -0
  138. package/views/dist/controls/group-editor/rules.js +41 -0
  139. package/views/dist/controls/group-editor/tokens.d.ts +15 -0
  140. package/views/dist/controls/group-editor/tokens.js +6 -0
  141. package/views/dist/controls/group-editor/words.d.ts +39 -0
  142. package/views/dist/controls/group-editor/words.js +21 -0
  143. package/views/dist/controls/group-editor.css +20 -0
  144. package/views/dist/controls/index.d.ts +45 -3
  145. package/views/dist/controls/index.js +44 -3
  146. package/views/dist/controls/inline-input/looks.js +1 -1
  147. package/views/dist/controls/input/input.js +10 -4
  148. package/views/dist/controls/internal/editor-parts.d.ts +8 -1
  149. package/views/dist/controls/internal/editor-parts.js +5 -0
  150. package/views/dist/controls/internal/phone.d.ts +5 -4
  151. package/views/dist/controls/internal/phone.js +7 -7
  152. package/views/dist/controls/internal/scroll.js +5 -1
  153. package/views/dist/controls/internal/step-return.d.ts +9 -0
  154. package/views/dist/controls/internal/step-return.js +27 -0
  155. package/views/dist/controls/internal/typed-run.d.ts +2 -0
  156. package/views/dist/controls/internal/typed-run.js +5 -0
  157. package/views/dist/controls/links-editor/links-editor.d.ts +5 -3
  158. package/views/dist/controls/links-editor/links-editor.js +38 -17
  159. package/views/dist/controls/links-editor/map-links-body.js +4 -1
  160. package/views/dist/controls/links-editor.css +1 -1
  161. package/views/dist/controls/menu/map-menu.js +2 -2
  162. package/views/dist/controls/menu-list/menu-list.d.ts +17 -2
  163. package/views/dist/controls/menu-list/menu-list.js +25 -16
  164. package/views/dist/controls/modal/looks.d.ts +4 -0
  165. package/views/dist/controls/modal/looks.js +25 -0
  166. package/views/dist/controls/modal/modal.d.ts +69 -0
  167. package/views/dist/controls/modal/modal.js +62 -0
  168. package/views/dist/controls/modal/tokens.d.ts +192 -0
  169. package/views/dist/controls/modal/tokens.js +50 -0
  170. package/views/dist/controls/modal.css +130 -0
  171. package/views/dist/controls/notice/notice.d.ts +49 -0
  172. package/views/dist/controls/notice/notice.js +35 -0
  173. package/views/dist/controls/notice/tokens.d.ts +99 -0
  174. package/views/dist/controls/notice/tokens.js +27 -0
  175. package/views/dist/controls/notice.css +100 -0
  176. package/views/dist/controls/number-editor/looks.js +1 -1
  177. package/views/dist/controls/number-editor/number-editor.js +1 -1
  178. package/views/dist/controls/option/option.js +3 -1
  179. package/views/dist/controls/option.css +1 -1
  180. package/views/dist/controls/pane/looks.d.ts +4 -0
  181. package/views/dist/controls/pane/looks.js +11 -0
  182. package/views/dist/controls/pane/pane.d.ts +67 -0
  183. package/views/dist/controls/pane/pane.js +99 -0
  184. package/views/dist/controls/pane/state.d.ts +14 -0
  185. package/views/dist/controls/pane/state.js +7 -0
  186. package/views/dist/controls/pane/tokens.d.ts +79 -0
  187. package/views/dist/controls/pane/tokens.js +22 -0
  188. package/views/dist/controls/pane.css +104 -0
  189. package/views/dist/controls/picker/looks.js +1 -1
  190. package/views/dist/controls/picker/map-picker.d.ts +6 -2
  191. package/views/dist/controls/picker/map-picker.js +4 -2
  192. package/views/dist/controls/picker/picker.d.ts +7 -0
  193. package/views/dist/controls/picker/picker.js +57 -8
  194. package/views/dist/controls/picker/rows.d.ts +4 -2
  195. package/views/dist/controls/picker/rows.js +4 -3
  196. package/views/dist/controls/popover/map-popover.d.ts +1 -1
  197. package/views/dist/controls/popover/map-popover.js +2 -2
  198. package/views/dist/controls/popover/popover.js +2 -1
  199. package/views/dist/controls/popover.css +3 -0
  200. package/views/dist/controls/ports-host/map-ports-host.d.ts +7 -0
  201. package/views/dist/controls/ports-host/map-ports-host.js +43 -0
  202. package/views/dist/controls/press/tokens.d.ts +8 -0
  203. package/views/dist/controls/press/tokens.js +4 -0
  204. package/views/dist/controls/press.css +44 -0
  205. package/views/dist/controls/quick-filters/looks.d.ts +11 -0
  206. package/views/dist/controls/quick-filters/looks.js +9 -0
  207. package/views/dist/controls/quick-filters/map-quick-filters-body.d.ts +31 -0
  208. package/views/dist/controls/quick-filters/map-quick-filters-body.js +56 -0
  209. package/views/dist/controls/quick-filters/quick-filters.d.ts +37 -0
  210. package/views/dist/controls/quick-filters/quick-filters.js +89 -0
  211. package/views/dist/controls/quick-filters/reminder.d.ts +18 -0
  212. package/views/dist/controls/quick-filters/reminder.js +41 -0
  213. package/views/dist/controls/quick-filters/rules.d.ts +89 -0
  214. package/views/dist/controls/quick-filters/rules.js +52 -0
  215. package/views/dist/controls/quick-filters/tokens.d.ts +112 -0
  216. package/views/dist/controls/quick-filters/tokens.js +30 -0
  217. package/views/dist/controls/quick-filters/words.d.ts +25 -0
  218. package/views/dist/controls/quick-filters/words.js +13 -0
  219. package/views/dist/controls/quick-filters.css +118 -0
  220. package/views/dist/controls/sheet/bottom-sheet.d.ts +9 -4
  221. package/views/dist/controls/sheet/bottom-sheet.js +4 -4
  222. package/views/dist/controls/sheet/map-sheet.d.ts +4 -1
  223. package/views/dist/controls/sheet/map-sheet.js +19 -6
  224. package/views/dist/controls/sheet/sheet-parts.d.ts +10 -0
  225. package/views/dist/controls/sheet/sheet-parts.js +2 -0
  226. package/views/dist/controls/sort-editor/map-sort-body.d.ts +9 -0
  227. package/views/dist/controls/sort-editor/map-sort-body.js +81 -0
  228. package/views/dist/controls/sort-editor/rules.d.ts +48 -0
  229. package/views/dist/controls/sort-editor/rules.js +24 -0
  230. package/views/dist/controls/sort-editor/sort-editor.d.ts +58 -0
  231. package/views/dist/controls/sort-editor/sort-editor.js +180 -0
  232. package/views/dist/controls/sort-editor/tokens.d.ts +79 -0
  233. package/views/dist/controls/sort-editor/tokens.js +22 -0
  234. package/views/dist/controls/sort-editor/words.d.ts +48 -0
  235. package/views/dist/controls/sort-editor/words.js +25 -0
  236. package/views/dist/controls/sort-editor.css +96 -0
  237. package/views/dist/controls/switch-row/switch-row.d.ts +15 -0
  238. package/views/dist/controls/switch-row/switch-row.js +9 -0
  239. package/views/dist/controls/switch-row/tokens.d.ts +51 -0
  240. package/views/dist/controls/switch-row/tokens.js +15 -0
  241. package/views/dist/controls/switch-row.css +39 -0
  242. package/views/dist/controls/switch.css +1 -1
  243. package/views/dist/controls/tag/tag.js +3 -1
  244. package/views/dist/controls/tag-field/tag-field.d.ts +20 -0
  245. package/views/dist/controls/tag-field/tag-field.js +19 -0
  246. package/views/dist/controls/tag-field/tokens.d.ts +7 -0
  247. package/views/dist/controls/tag-field/tokens.js +4 -0
  248. package/views/dist/controls/tag-field.css +13 -0
  249. package/views/dist/controls/text-editor/looks.js +1 -1
  250. package/views/dist/controls/text-editor/text-editor.js +1 -5
  251. package/views/dist/controls/toast/toast.d.ts +79 -0
  252. package/views/dist/controls/toast/toast.js +101 -0
  253. package/views/dist/controls/toast/tokens.d.ts +100 -0
  254. package/views/dist/controls/toast/tokens.js +27 -0
  255. package/views/dist/controls/toast.css +93 -0
  256. package/views/dist/controls/tokens.js +38 -0
  257. package/views/dist/controls/toolbar/keys.d.ts +3 -0
  258. package/views/dist/controls/toolbar/keys.js +11 -0
  259. package/views/dist/controls/toolbar/looks.d.ts +10 -0
  260. package/views/dist/controls/toolbar/looks.js +40 -0
  261. package/views/dist/controls/toolbar/tokens.d.ts +28 -0
  262. package/views/dist/controls/toolbar/tokens.js +9 -0
  263. package/views/dist/controls/toolbar/toolbar.d.ts +111 -0
  264. package/views/dist/controls/toolbar/toolbar.js +370 -0
  265. package/views/dist/controls/toolbar/words.d.ts +28 -0
  266. package/views/dist/controls/toolbar/words.js +17 -0
  267. package/views/dist/controls/toolbar-button/looks.d.ts +4 -0
  268. package/views/dist/controls/toolbar-button/looks.js +21 -0
  269. package/views/dist/controls/toolbar-button/tokens.d.ts +103 -0
  270. package/views/dist/controls/toolbar-button/tokens.js +28 -0
  271. package/views/dist/controls/toolbar-button/toolbar-button.d.ts +66 -0
  272. package/views/dist/controls/toolbar-button/toolbar-button.js +51 -0
  273. package/views/dist/controls/toolbar-button.css +75 -0
  274. package/views/dist/controls/toolbar.css +65 -0
  275. package/views/dist/controls/tooltip/map-tooltip.d.ts +1 -1
  276. package/views/dist/controls/tooltip/map-tooltip.js +2 -2
  277. package/views/dist/controls/tooltip/tooltip.d.ts +3 -1
  278. package/views/dist/controls/tooltip/tooltip.js +2 -2
  279. package/views/dist/controls/values-editor/looks.js +1 -1
  280. package/views/dist/controls/values-editor/values-editor.js +7 -1
  281. package/views/dist/controls/views-list/map-views-list-body.d.ts +4 -1
  282. package/views/dist/controls/views-list/map-views-list-body.js +128 -4
  283. package/views/dist/controls/views-list/rules.d.ts +26 -0
  284. package/views/dist/controls/views-list/rules.js +63 -0
  285. package/views/dist/controls/views-list/view-menu.d.ts +84 -0
  286. package/views/dist/controls/views-list/view-menu.js +201 -0
  287. package/views/dist/controls/views-list/views-list.d.ts +8 -1
  288. package/views/dist/controls/views-list/views-list.js +18 -3
  289. package/views/dist/controls/views-list/words.d.ts +54 -0
  290. package/views/dist/controls/views-list/words.js +10 -1
  291. package/views/dist/controls/views-list.css +5 -1
  292. package/views/dist/display/date.js +5 -5
  293. package/views/dist/display/format.d.ts +6 -0
  294. package/views/dist/display/format.js +13 -2
  295. package/views/dist/display/index.d.ts +1 -1
  296. package/views/dist/display/index.js +1 -1
  297. package/views/dist/display/options.d.ts +3 -1
  298. package/views/dist/display/range.d.ts +2 -1
  299. package/views/dist/display/range.js +4 -1
  300. package/views/dist/display/use-display-options.d.ts +3 -0
  301. package/views/dist/display/use-display-options.js +10 -2
  302. package/views/dist/display/viewer.d.ts +1 -1
  303. package/views/dist/display/viewer.js +1 -1
  304. package/views/dist/editors/DateEditor.js +11 -9
  305. package/views/dist/editors/relation-panel.js +7 -1
  306. package/views/dist/editors/relation-picker.d.ts +2 -1
  307. package/views/dist/editors/relation-picker.js +4 -3
  308. package/views/dist/editors/relation-source.d.ts +4 -1
  309. package/views/dist/editors/relation-source.js +5 -2
  310. package/views/dist/field-row/editors/RowNumberEditor.js +2 -2
  311. package/views/dist/fields/number-edit.d.ts +6 -0
  312. package/views/dist/fields/number-edit.js +8 -1
  313. package/views/dist/grid/chrome/GridCellEditors.js +2 -2
  314. package/views/dist/grid/chrome/GridColumnDateSection.d.ts +4 -3
  315. package/views/dist/grid/chrome/GridColumnDateSection.js +4 -4
  316. package/views/dist/grid/chrome/GridColumnDurationSection.js +2 -2
  317. package/views/dist/grid/chrome/GridColumnMenu.js +6 -4
  318. package/views/dist/grid/chrome/GridFooter.js +2 -2
  319. package/views/dist/grid/chrome/GridHeader.js +2 -1
  320. package/views/dist/grid/chrome/GridNumberEditor.js +2 -2
  321. package/views/dist/grid/chrome/GridRowCells.js +2 -1
  322. package/views/dist/grid/chrome/GridTextEditor.js +2 -2
  323. package/views/dist/grid/chrome/grid-column-menu-items.js +4 -2
  324. package/views/dist/grid/chrome/grid-editor-layer.d.ts +5 -1
  325. package/views/dist/grid/chrome/grid-editor-layer.js +1 -0
  326. package/views/dist/grid/chrome/grid-fitted-box.d.ts +7 -1
  327. package/views/dist/grid/chrome/grid-fitted-box.js +4 -4
  328. package/views/dist/grid/chrome/useGridBandFigures.js +2 -2
  329. package/views/dist/grid/chrome/useGridFittedWidths.d.ts +3 -0
  330. package/views/dist/grid/chrome/useGridFittedWidths.js +9 -3
  331. package/views/dist/grid/chrome/useGridKeyboard.d.ts +4 -1
  332. package/views/dist/grid/chrome/useGridKeyboard.js +5 -2
  333. package/views/dist/grid/chrome/useGridTableInteractionModel.js +2 -1
  334. package/views/dist/grid/core/clipboard-model.js +9 -4
  335. package/views/dist/grid/core/commit-model.d.ts +7 -0
  336. package/views/dist/grid/core/commit-model.js +5 -1
  337. package/views/dist/grid/core/editing-controller.js +10 -2
  338. package/views/dist/grid/core/editing-model.js +3 -7
  339. package/views/dist/grid/core/undo-owner.d.ts +6 -0
  340. package/views/dist/grid/core/undo-owner.js +13 -0
  341. package/views/dist/grid/core/useGridEditing.d.ts +2 -0
  342. package/views/dist/grid/core/useGridEditing.js +4 -0
  343. package/views/dist/grid/grid.css +240 -0
  344. package/views/dist/grid/looks.d.ts +5 -1
  345. package/views/dist/grid/looks.js +20 -12
  346. package/views/dist/grid-tokens.d.ts +109 -0
  347. package/views/dist/grid-tokens.js +29 -0
  348. package/views/dist/looks/index.d.ts +10 -0
  349. package/views/dist/looks/index.js +10 -0
  350. package/views/dist/looks/pieces.js +20 -0
  351. package/views/dist/model/column-capabilities.d.ts +2 -0
  352. package/views/dist/model/column-filters.d.ts +2 -1
  353. package/views/dist/model/column-from.js +2 -2
  354. package/views/dist/model/relation-filters.d.ts +2 -0
  355. package/views/dist/panels/index.d.ts +2 -2
  356. package/views/dist/panels/index.js +2 -2
  357. package/views/dist/panels/labels.d.ts +4 -0
  358. package/views/dist/panels/labels.js +8 -0
  359. package/views/dist/panels/model.d.ts +14 -1
  360. package/views/dist/panels/quick/model.d.ts +4 -0
  361. package/views/dist/panels/react/customize-body.d.ts +12 -5
  362. package/views/dist/panels/react/customize-body.js +41 -13
  363. package/views/dist/panels/react/customize.d.ts +8 -1
  364. package/views/dist/panels/react/customize.js +11 -6
  365. package/views/dist/panels/react/filter/FilterEditor.js +6 -6
  366. package/views/dist/panels/react/filter/FilterFieldList.js +10 -2
  367. package/views/dist/panels/react/filter/PhoneFilterEditor.d.ts +8 -2
  368. package/views/dist/panels/react/filter/PhoneFilterEditor.js +12 -9
  369. package/views/dist/panels/react/filter/filter-body.d.ts +8 -5
  370. package/views/dist/panels/react/filter/filter-body.js +21 -7
  371. package/views/dist/panels/react/filter/filter-part-body.d.ts +4 -1
  372. package/views/dist/panels/react/filter/filter-part-body.js +3 -1
  373. package/views/dist/panels/react/panel-sheet.d.ts +5 -1
  374. package/views/dist/panels/react/panel-sheet.js +6 -2
  375. package/views/dist/panels/react/panel-step.d.ts +15 -0
  376. package/views/dist/panels/react/panel-step.js +27 -0
  377. package/views/dist/panels/react/quick/QuickFiltersPanel.js +1 -0
  378. package/views/dist/panels/react/sort/SortEditor.d.ts +4 -0
  379. package/views/dist/panels/react/sort/SortEditor.js +5 -2
  380. package/views/dist/panels/react/toolbar/ReadyToolbar.d.ts +18 -0
  381. package/views/dist/panels/react/toolbar/ReadyToolbar.js +93 -4
  382. package/views/dist/panels/react/toolbar/Toolbar.js +1 -1
  383. package/views/dist/panels/react/toolbar/ToolbarAsideFilter.js +2 -2
  384. package/views/dist/panels/react/toolbar/ToolbarBarFilter.js +15 -5
  385. package/views/dist/panels/react/toolbar/ToolbarFilterAdd.d.ts +16 -0
  386. package/views/dist/panels/react/toolbar/ToolbarFilterAdd.js +50 -0
  387. package/views/dist/panels/react/toolbar/ToolbarFilterSheet.js +3 -1
  388. package/views/dist/panels/react/toolbar/ToolbarFilters.d.ts +4 -1
  389. package/views/dist/panels/react/toolbar/ToolbarFilters.js +38 -23
  390. package/views/dist/panels/react/toolbar/ToolbarOptions.d.ts +12 -4
  391. package/views/dist/panels/react/toolbar/ToolbarOptions.js +6 -2
  392. package/views/dist/panels/react/toolbar/ToolbarQuickFilters.d.ts +4 -1
  393. package/views/dist/panels/react/toolbar/ToolbarQuickFilters.js +2 -2
  394. package/views/dist/panels/react/toolbar/ToolbarSortPill.d.ts +5 -0
  395. package/views/dist/panels/react/toolbar/ToolbarSortPill.js +15 -6
  396. package/views/dist/panels/react/toolbar/panel-part.d.ts +5 -1
  397. package/views/dist/panels/react/toolbar/panel-part.js +2 -2
  398. package/views/dist/panels/react/toolbar/use-filter-add.d.ts +16 -0
  399. package/views/dist/panels/react/toolbar/use-filter-add.js +32 -0
  400. package/views/dist/panels/react/view-footer.d.ts +1 -1
  401. package/views/dist/panels/react/views-row/ViewPicker.js +25 -4
  402. package/views/dist/panels/react.d.ts +1 -0
  403. package/views/dist/panels/react.js +1 -0
  404. package/views/dist/panels/settings/filter-groups.d.ts +3 -0
  405. package/views/dist/panels/settings/filter-groups.js +72 -7
  406. package/views/dist/panels/settings/filters.d.ts +5 -0
  407. package/views/dist/panels/settings/filters.js +12 -6
  408. package/views/dist/panels/settings/group-buckets.js +1 -0
  409. package/views/dist/panels/views-row/model.d.ts +10 -1
  410. package/views/dist/provider/ViewsProvider.d.ts +7 -1
  411. package/views/dist/provider/ViewsProvider.js +50 -6
  412. package/views/dist/provider/components.d.ts +178 -11
  413. package/views/dist/provider/context.d.ts +6 -0
  414. package/views/dist/provider/moment.d.ts +6 -0
  415. package/views/dist/provider/moment.js +10 -0
  416. package/views/dist/provider/ports.d.ts +18 -6
  417. package/views/dist/provider/ports.js +2 -1
  418. package/views/dist/react.d.ts +2 -2
  419. package/views/dist/react.js +1 -1
  420. package/views/dist/selection/SelectionBar.d.ts +2 -16
  421. package/views/dist/selection/SelectionBar.js +4 -1
  422. package/views/dist/selection/bar-props.d.ts +26 -0
  423. package/views/dist/selection/bar-props.js +1 -0
  424. package/views/dist/selection/index.d.ts +1 -1
  425. package/views/dist/selection/verbs.d.ts +32 -5
  426. package/views/dist/styles.css +1499 -73
  427. package/views/dist/styles.unlayered.css +1497 -70
  428. package/views/docs/contract.md +56 -23
  429. package/views/docs/controls/alert-dialog.md +37 -0
  430. package/views/docs/controls/alert.md +30 -0
  431. package/views/docs/controls/bulk-bar.md +41 -0
  432. package/views/docs/controls/choice.md +25 -0
  433. package/views/docs/controls/collapsible.md +22 -0
  434. package/views/docs/controls/customize.md +17 -0
  435. package/views/docs/controls/filter-editor.md +28 -0
  436. package/views/docs/controls/group-editor.md +11 -0
  437. package/views/docs/controls/modal.md +55 -0
  438. package/views/docs/controls/notice.md +32 -0
  439. package/views/docs/controls/pane.md +25 -0
  440. package/views/docs/controls/popover.md +2 -0
  441. package/views/docs/controls/press.md +9 -0
  442. package/views/docs/controls/quick-filters.md +35 -0
  443. package/views/docs/controls/radio.md +1 -1
  444. package/views/docs/controls/sort-editor.md +27 -0
  445. package/views/docs/controls/switch-row.md +18 -0
  446. package/views/docs/controls/tag-field.md +7 -0
  447. package/views/docs/controls/toast.md +32 -0
  448. package/views/docs/controls/toolbar-button.md +31 -0
  449. package/views/docs/controls/toolbar.md +14 -0
  450. package/views/docs/guides/atoms.md +2 -2
  451. package/views/docs/guides/cells.md +3 -3
  452. package/views/docs/guides/display.md +3 -3
  453. package/views/docs/guides/looks.md +8 -2
  454. package/views/docs/guides/ports.md +6 -6
  455. package/views/docs/guides/selection.md +5 -1
  456. package/views/docs/guides/the-grid.md +2 -2
  457. package/views/docs/guides/the-provider.md +21 -2
  458. package/views/docs/install.md +4 -1
  459. package/views/docs/reference/cells.md +3 -3
  460. package/views/docs/reference/controls.md +403 -16
  461. package/views/docs/reference/display.md +3 -2
  462. package/views/docs/reference/editors-relation.md +1 -1
  463. package/views/docs/reference/looks.md +35 -11
  464. package/views/docs/reference/panels-react.md +11 -10
  465. package/views/docs/reference/panels.md +9 -7
  466. package/views/docs/reference/react.md +20 -13
  467. package/views/docs/reference/selection.md +4 -2
  468. package/views/docs/reference/views.md +8 -6
  469. package/views/skills/views/SKILL.md +2 -2
@@ -17,6 +17,9 @@ export declare const GridFitContext: import("react").Context<(() => void) | null
17
17
  * A grid drawn where nothing is laid out (under a box `hidden` or `display: none` takes out of the page) reads every
18
18
  * box at 0: it keeps none of those reads, and fits once it is laid out, when its size first changes.
19
19
  *
20
+ * A date column waits for the provider's moment: until it is read its values draw in full ("15 Feb 2026"), then short
21
+ * ("15 Feb"), so it is fitted in the commit that draws them as they stay.
22
+ *
20
23
  * `skip`: columns left at their default (on a phone, the pinned ones). `fit` runs after the grid's own commits and,
21
24
  * through `GridFitContext`, after each group's.
22
25
  */
@@ -2,24 +2,30 @@
2
2
  import { createContext, useCallback, useLayoutEffect, useRef, useState } from "react";
3
3
  import { flushSync } from "react-dom";
4
4
  import { fittedColumnWidth } from "../../model/column-state.js";
5
+ import { fieldTypeOf } from "../../model/field-type-of.js";
6
+ import { useHasMoment } from "../../provider/moment.js";
7
+ const DATED = new Set(["date", "datetime"]);
5
8
  const NATURAL = { width: "max-content", minWidth: "0", maxWidth: "none", flex: "none" };
6
9
  export const GridFitContext = createContext(null);
7
10
  export function useGridFittedWidths({ rootRef, columns, stored, scale, skip, }) {
8
11
  const [fitted, setFitted] = useState({});
9
- const latest = useRef({ columns, stored, scale, skip });
12
+ const moment = useHasMoment();
13
+ const latest = useRef({ columns, stored, scale, skip, moment });
10
14
  const done = useRef({});
11
15
  useLayoutEffect(() => {
12
- latest.current = { columns, stored, scale, skip };
16
+ latest.current = { columns, stored, scale, skip, moment };
13
17
  });
14
18
  const fit = useCallback(() => {
15
19
  const root = rootRef.current;
16
20
  if (!root)
17
21
  return;
18
- const { columns, stored, scale, skip } = latest.current;
22
+ const { columns, stored, scale, skip, moment } = latest.current;
19
23
  const reads = [];
20
24
  for (const col of columns) {
21
25
  if (col.width != null || stored?.[col.id] != null || done.current[col.id] != null || skip?.has(col.id))
22
26
  continue;
27
+ if (!moment && DATED.has(fieldTypeOf(col) ?? ""))
28
+ continue;
23
29
  const id = CSS.escape(col.id);
24
30
  const cells = [...root.querySelectorAll(`[data-col-id="${id}"]`)];
25
31
  if (cells.length > 0)
@@ -5,7 +5,7 @@ import type { ListSettingsConfig } from "../../model/column-capabilities.js";
5
5
  import type { ListColumn } from "../../model/column-schema.js";
6
6
  import type { GridRangeVerbs } from "./useGridRangeActions.js";
7
7
  import { type GridChromeTarget, type GridFocusShape } from "../core/grid-focus.js";
8
- export declare function useGridKeyboard<Row>({ rootRef, focusedCell, editingCell, editingEnabled, listConfig, visibleRowIds, rowByKey, visibleColIds, visibleColumns, rows, getRowId, pendingByRow, rangeVerbsRef, focusCell, clearFocus, startEdit, cancelEdit, commitEdit, refuseEdit, undo, redo, rangeSetRect, rangeExtendTo, ranges, revealCell, releaseToFrame, lastCellRef, chrome, setChrome, shape, toggleGroup, }: {
8
+ export declare function useGridKeyboard<Row>({ rootRef, focusedCell, editingCell, editingEnabled, listConfig, visibleRowIds, rowByKey, visibleColIds, visibleColumns, rows, getRowId, pendingByRow, rangeVerbsRef, focusCell, clearFocus, startEdit, cancelEdit, commitEdit, refuseEdit, undo, redo, isLastEdited, rangeSetRect, rangeExtendTo, ranges, revealCell, releaseToFrame, lastCellRef, chrome, setChrome, shape, toggleGroup, }: {
9
9
  rootRef: RefObject<HTMLDivElement | null>;
10
10
  /** A column name, a footer cell, a bar or a checkbox holding the focus (`useGridFocus`); null: a data cell, or
11
11
  * nothing. */
@@ -58,6 +58,9 @@ export declare function useGridKeyboard<Row>({ rootRef, focusedCell, editingCell
58
58
  refuseEdit: (columnId: string) => boolean;
59
59
  undo: (resolveRow: (rowId: string) => Row | undefined, onApply?: (pos: GridCellPos) => void) => boolean;
60
60
  redo: (resolveRow: (rowId: string) => Row | undefined, onApply?: (pos: GridCellPos) => void) => boolean;
61
+ /** This grid is the one the page edited last (`useGridEditing`'s `isLastEdited`): with the focus in no grid's frame,
62
+ * only it answers ⌘Z. Absent: it always is. */
63
+ isLastEdited?: () => boolean;
61
64
  }): {
62
65
  onEditorTab: (rowId: string, columnId: string, backwards: boolean) => void;
63
66
  onEditorEnter: (rowId: string, columnId: string) => void;
@@ -30,7 +30,7 @@ function eventBelongsElsewhere(target, root) {
30
30
  return true;
31
31
  return !!target.closest(INTERACTIVE) && !root?.contains(target);
32
32
  }
33
- export function useGridKeyboard({ rootRef, focusedCell, editingCell, editingEnabled, listConfig, visibleRowIds, rowByKey, visibleColIds, visibleColumns, rows, getRowId, pendingByRow, rangeVerbsRef, focusCell, clearFocus, startEdit, cancelEdit, commitEdit, refuseEdit, undo, redo, rangeSetRect, rangeExtendTo, ranges, revealCell, releaseToFrame, lastCellRef, chrome = null, setChrome = () => { }, shape, toggleGroup, }) {
33
+ export function useGridKeyboard({ rootRef, focusedCell, editingCell, editingEnabled, listConfig, visibleRowIds, rowByKey, visibleColIds, visibleColumns, rows, getRowId, pendingByRow, rangeVerbsRef, focusCell, clearFocus, startEdit, cancelEdit, commitEdit, refuseEdit, undo, redo, isLastEdited = () => true, rangeSetRect, rangeExtendTo, ranges, revealCell, releaseToFrame, lastCellRef, chrome = null, setChrome = () => { }, shape, toggleGroup, }) {
34
34
  const { ports, messages } = useViews();
35
35
  const navFromEditorRef = useRef({ tab: () => { }, enter: () => { } });
36
36
  const onEditorTab = useCallback((rowId, columnId, backwards) => navFromEditorRef.current.tab(rowId, columnId, backwards), []);
@@ -75,6 +75,9 @@ export function useGridKeyboard({ rootRef, focusedCell, editingCell, editingEnab
75
75
  return;
76
76
  if (eventBelongsElsewhere(event.target, rootRef.current))
77
77
  return;
78
+ const holder = event.target?.closest?.('[data-slot="vk-grid"]') ?? null;
79
+ if (holder ? holder !== rootRef.current : !isLastEdited())
80
+ return;
78
81
  const resolveRow = (rowId) => rows.find((row) => getRowId(row) === rowId);
79
82
  const handled = event.shiftKey
80
83
  ? redo(resolveRow, scrollToCell)
@@ -84,7 +87,7 @@ export function useGridKeyboard({ rootRef, focusedCell, editingCell, editingEnab
84
87
  };
85
88
  window.addEventListener("keydown", onKeyDown, true);
86
89
  return () => window.removeEventListener("keydown", onKeyDown, true);
87
- }, [editingEnabled, focusCell, getRowId, redo, revealCell, rootRef, rowByKey, rows, rowsWait, undo, visibleRowIds]);
90
+ }, [editingEnabled, focusCell, getRowId, isLastEdited, redo, revealCell, rootRef, rowByKey, rows, rowsWait, undo, visibleRowIds]);
88
91
  const entryCell = useCallback(() => {
89
92
  const root = rootRef.current;
90
93
  const columnId = visibleColIds[0];
@@ -35,7 +35,7 @@ export function useGridTableInteractionModel({ rootRef, props, rows, visibleRows
35
35
  const columnById = useMemo(() => new Map([...columns, ...visibleColumns].map((column) => [column.id, column])), [columns, visibleColumns]);
36
36
  const partOfWhole = useCallback((wholeId) => [...columnById.values()].find((column) => column.partOf?.column === wholeId)?.partOf, [columnById]);
37
37
  const keepsSent = useCallback((columnId) => partOfWhole(columnId) != null, [partOfWhole]);
38
- const { focused: focusedCell, editing: editingCell, pendingByRow, pendingOf, settlementByRow, writeStateByRow, focusCell, clearFocus, startEdit, cancelEdit, closeEdit, commitEdit: commitEditRaw, commitBatch: commitBatchRaw, undo, redo, reconcile, hasInflight, pendingBaseline, sent, sentCells, forgetSent, } = useGridEditing(props.onCellCommit, props.onCellsCommit, sayRefusal, keepsSent);
38
+ const { focused: focusedCell, editing: editingCell, pendingByRow, pendingOf, settlementByRow, writeStateByRow, focusCell, clearFocus, startEdit, cancelEdit, closeEdit, commitEdit: commitEditRaw, commitBatch: commitBatchRaw, undo, redo, reconcile, hasInflight, pendingBaseline, sent, sentCells, forgetSent, isLastEdited, } = useGridEditing(props.onCellCommit, props.onCellsCommit, sayRefusal, keepsSent);
39
39
  const wholeStored = useCallback((rowId, wholeId, row) => {
40
40
  const part = partOfWhole(wholeId);
41
41
  const overlay = pendingOf(rowId);
@@ -293,6 +293,7 @@ export function useGridTableInteractionModel({ rootRef, props, rows, visibleRows
293
293
  refuseEdit,
294
294
  undo,
295
295
  redo,
296
+ isLastEdited,
296
297
  rangeSetRect,
297
298
  rangeExtendTo,
298
299
  ranges,
@@ -1,4 +1,4 @@
1
- import { actorLabel, formatLocalMinute, isActorValue, isBreakdown, isRangeValue, isValueItem, listValues, locationText, nameText, parseNumber, rangeText, relationIdOf, relationKey, relationLinksOf, relationStoredOf, utcDay, } from "viewkitjs/fields";
1
+ import { actorLabel, formatLocalMinute, isActorValue, isBreakdown, isRangeValue, isValueItem, listValues, locationText, nameText, parseNumber, rangeShownText, relationIdOf, relationKey, relationLinksOf, relationStoredOf, utcDay, } from "viewkitjs/fields";
2
2
  import { phoneText } from "viewkitjs/fields/phone";
3
3
  import { msToDurationUnit, parseDateInput, parseDurationInput } from "viewkitjs/fields/query";
4
4
  import { calendarDayOf } from "./value-equality.js";
@@ -45,7 +45,7 @@ function cellValueText(col, value) {
45
45
  }
46
46
  if (isRangeValue(value)) {
47
47
  const field = col.field?.type === "range" ? col.field : { key: "", label: "", type: "range", of: "number" };
48
- return rangeText(field, value);
48
+ return rangeShownText(field, value);
49
49
  }
50
50
  if (isActorValue(value))
51
51
  return actorLabel(value);
@@ -326,7 +326,7 @@ export function coercePaste(col, source, opts) {
326
326
  return empty;
327
327
  return { ok: true, next: { low: null, high: null }, overlay };
328
328
  }
329
- const range = parseRangeText(text, opts.conventions);
329
+ const range = parseRangeText(text, opts.conventions, col.field?.type === "range" ? col.field.presets : undefined);
330
330
  if (!range)
331
331
  return { ok: false, reason: messages({ key: "views.grid.paste-not-range" }) };
332
332
  return { ok: true, next: range, overlay };
@@ -360,7 +360,12 @@ function pasteRelationSet(col, field, source, text, messages) {
360
360
  }
361
361
  return { ok: true, next: relationStoredOf(field, links), overlay: false };
362
362
  }
363
- function parseRangeText(text, cv) {
363
+ function parseRangeText(text, cv, presets) {
364
+ const bands = presets?.filter((p) => p.label.trim().toLowerCase() === text.toLowerCase()) ?? [];
365
+ if (bands.length > 1)
366
+ return null;
367
+ if (bands[0])
368
+ return { low: bands[0].low, high: bands[0].high };
364
369
  const num = (part) => parseNumber(part, cv);
365
370
  const upTo = /^up\s+to\s+(.+)$/i.exec(text);
366
371
  if (upTo) {
@@ -45,4 +45,11 @@ export type GridCellsCommitFn<Row> = (edits: {
45
45
  value: unknown;
46
46
  context?: GridCommitContext;
47
47
  }[]) => Promise<void | GridCommitOutcome[]>;
48
+ /** A cell's key: its row and column ids as one JSON pair. It is read back whole (`gridCellFromKey`), never split at a
49
+ * character, so no id can break it, whatever it holds. */
48
50
  export declare function gridCellKey(rowId: string, columnId: string): string;
51
+ /** The row and column a cell's key names (`gridCellKey`). */
52
+ export declare function gridCellFromKey(key: string): {
53
+ rowId: string;
54
+ columnId: string;
55
+ };
@@ -1,3 +1,7 @@
1
1
  export function gridCellKey(rowId, columnId) {
2
- return `${rowId}:${columnId}`;
2
+ return JSON.stringify([rowId, columnId]);
3
+ }
4
+ export function gridCellFromKey(key) {
5
+ const [rowId, columnId] = JSON.parse(key);
6
+ return { rowId, columnId };
3
7
  }
@@ -1,6 +1,7 @@
1
1
  import { gridCellKey, } from "./commit-model.js";
2
2
  import { applyGridPending, carryGridPutBack, createGridHistory, gridEditValue, gridOverlayValue, gridHistoryValue, gridKeptValue, groupGridPendingByRow, groupGridPendingSettlement, keepGridPending, markGridPendingSettlement, planGridPendingAssignments, pressGridHistory, pruneGridEntry, pruneGridHistoryEntry, reconcileGridPending, recordGridHistory, revertGridHistoryPress, rollbackGridPending, } from "./editing-model.js";
3
3
  import { setGridWriteStates } from "./write-states.js";
4
+ import { noteGridEdited } from "./undo-owner.js";
4
5
  const confirmed = (outcome) => outcome ?? { status: "confirmed" };
5
6
  export class GridEditingController {
6
7
  callbacks;
@@ -38,6 +39,7 @@ export class GridEditingController {
38
39
  commit(cells) {
39
40
  if (cells.length === 0)
40
41
  return Promise.resolve(true);
42
+ noteGridEdited(this);
41
43
  const entry = {
42
44
  id: this.nextHistoryId++,
43
45
  edits: cells.map(({ cell }) => cell),
@@ -100,10 +102,16 @@ export class GridEditingController {
100
102
  this.publishPending(next);
101
103
  }
102
104
  undo(resolveRow, onApply) {
103
- return this.canUndo() && this.enqueueApply("undo", resolveRow, onApply);
105
+ const applied = this.canUndo() && this.enqueueApply("undo", resolveRow, onApply);
106
+ if (applied)
107
+ noteGridEdited(this);
108
+ return applied;
104
109
  }
105
110
  redo(resolveRow, onApply) {
106
- return this.canRedo() && this.enqueueApply("redo", resolveRow, onApply);
111
+ const applied = this.canRedo() && this.enqueueApply("redo", resolveRow, onApply);
112
+ if (applied)
113
+ noteGridEdited(this);
114
+ return applied;
107
115
  }
108
116
  reportRefusals(cells, results) {
109
117
  const failed = cells.flatMap(({ cell }, index) => {
@@ -1,4 +1,4 @@
1
- import { gridCellKey } from "./commit-model.js";
1
+ import { gridCellFromKey, gridCellKey } from "./commit-model.js";
2
2
  import { sameListValue } from "viewkitjs/fields";
3
3
  import { markGridKeptValue } from "./value-equality.js";
4
4
  const GRID_UNDO_MAX = 50;
@@ -139,9 +139,7 @@ export function reconcileGridPending(state, matchedKeys) {
139
139
  export function groupGridPendingByRow(state) {
140
140
  const byRow = new Map();
141
141
  for (const [key, entry] of state) {
142
- const separator = key.lastIndexOf(":");
143
- const rowId = key.slice(0, separator);
144
- const columnId = key.slice(separator + 1);
142
+ const { rowId, columnId } = gridCellFromKey(key);
145
143
  const existing = byRow.get(rowId);
146
144
  if (existing)
147
145
  existing[columnId] = entry.value;
@@ -155,9 +153,7 @@ export function groupGridPendingSettlement(state) {
155
153
  for (const [key, entry] of state) {
156
154
  if (!entry.settlement)
157
155
  continue;
158
- const separator = key.lastIndexOf(":");
159
- const rowId = key.slice(0, separator);
160
- const columnId = key.slice(separator + 1);
156
+ const { rowId, columnId } = gridCellFromKey(key);
161
157
  const existing = byRow.get(rowId);
162
158
  if (existing)
163
159
  existing[columnId] = entry.settlement;
@@ -0,0 +1,6 @@
1
+ /** This grid made an edit, an undo or a redo: it is now the page's newest. */
2
+ export declare function noteGridEdited(owner: object): void;
3
+ /** This grid left the page. */
4
+ export declare function forgetGridEdited(owner: object): void;
5
+ /** Whether this grid is the one the page edited last. */
6
+ export declare function isLastEditedGrid(owner: object): boolean;
@@ -0,0 +1,13 @@
1
+ const edited = [];
2
+ export function noteGridEdited(owner) {
3
+ forgetGridEdited(owner);
4
+ edited.push(owner);
5
+ }
6
+ export function forgetGridEdited(owner) {
7
+ const index = edited.indexOf(owner);
8
+ if (index >= 0)
9
+ edited.splice(index, 1);
10
+ }
11
+ export function isLastEditedGrid(owner) {
12
+ return edited.length > 0 && edited[edited.length - 1] === owner;
13
+ }
@@ -64,6 +64,8 @@ type GridEditingApi<Row> = {
64
64
  columnId: string;
65
65
  }[];
66
66
  forgetSent: (rowId: string, columnId: string) => void;
67
+ /** This grid is the one the page edited last (`undo-owner.ts`): ⌘Z with the focus in no grid undoes here. */
68
+ isLastEdited: () => boolean;
67
69
  };
68
70
  export declare function useGridEditing<Row>(onCellCommit?: GridCellCommitFn<Row>, onCellsCommit?: GridCellsCommitFn<Row>,
69
71
  /** Told once per write the app refused (`GridEditingCallbacks.onRefused`). */
@@ -1,6 +1,7 @@
1
1
  import { useCallback, useEffect, useState } from "react";
2
2
  import { gridRowIdFromKey } from "./coordinates.js";
3
3
  import { GridEditingController } from "./editing-controller.js";
4
+ import { forgetGridEdited, isLastEditedGrid } from "./undo-owner.js";
4
5
  import { sameListValue } from "viewkitjs/fields";
5
6
  import { prepareGridCommitCells, } from "./editing-model.js";
6
7
  import { gridFigureOf } from "./clipboard-model.js";
@@ -14,6 +15,8 @@ export function useGridEditing(onCellCommit, onCellsCommit, onRefused, keepsSent
14
15
  setPendingByRow(pending);
15
16
  setSettlementByRow(settlement);
16
17
  }, setWriteStateByRow));
18
+ useEffect(() => () => forgetGridEdited(controller), [controller]);
19
+ const isLastEdited = useCallback(() => isLastEditedGrid(controller), [controller]);
17
20
  useEffect(() => {
18
21
  const callbacks = { onCellCommit, onCellsCommit, onRefused, keepsSent };
19
22
  controller.setCallbacks(callbacks);
@@ -101,5 +104,6 @@ export function useGridEditing(onCellCommit, onCellsCommit, onRefused, keepsSent
101
104
  sent,
102
105
  sentCells,
103
106
  forgetSent,
107
+ isLastEdited,
104
108
  };
105
109
  }
@@ -0,0 +1,240 @@
1
+ /* THE GRID'S LOOK, by its options (GRID_LOOKS, grid/looks.ts): each rule under the option it draws, worn on a frame round the
2
+ grid as `data-grid-<option>="<value>"` (lookAttrs), and each option's default drawn with no frame too
3
+ (`:not([data-grid-<option>] *)`), so an app that wears no picks gets the default look, the Outright look's (My preset's). First drawn in the Showcase's ViewKit
4
+ add-on, after the table's canvas (UI Kit · sketch · table: Attio's look and the portal's). It reaches the grid only through
5
+ the contract: its named parts (data-slot), its states, the frame's options and the `data-kit` mark of ViewKit's own
6
+ controls, never a class it happens to use; and it reads only the contract's names (grid-tokens.ts, VK_GRID_TOKENS, beside
7
+ the grid's own geometry), never a colour or a length written in (grid-css.test.ts holds it to both). Plain CSS in no layer:
8
+ the ready stylesheet puts it after ViewKit's own classes, which it dresses; an app importing it by its door
9
+ (viewkitjs/views/grid.css) places it after them too. */
10
+
11
+ /* What an app may dress that the grid used to fix in its classes, at the Outright look's sizes: its timing the fast one, its
12
+ smallest words the 2xs size, a link's and a chip's underline the line's width 3 under the words (as the names' underline),
13
+ the fill handle's rim the focus width, and the chrome's keyboard focus a ring of the focus width in the focused line's
14
+ colour, in place of the brand's fill. */
15
+ [data-slot="vk-grid"] {
16
+ --vk-duration: var(--vk-duration-fast);
17
+ --vk-caption-text: var(--vk-font-size-2xs);
18
+ --vk-underline-offset: calc(var(--vk-spacing) * 0.75);
19
+ --vk-underline-width: var(--vk-border-width);
20
+ --vk-thick-line: var(--vk-focus-width);
21
+ --vk-focus-ring: inset 0 0 0 var(--vk-focus-width) var(--vk-border-brand);
22
+ }
23
+
24
+ /* Header, Words (Attio's): a taller row, 36 at the default density, its words the text's colour at medium weight and the sm
25
+ size, its glyphs 14. Quiet is the grid's own: 32, its words subtle at 12. A computer's (data-desktop, the app's line): on
26
+ a phone Attio's header is the quiet one at the phone's size, which the grid's scale already draws. Under Words its glyphs stay quiet, the
27
+ subtle colour under the dark words (--vk-head-glyph-fg), read on the header, where --vk-fg-subtle is still the subtle
28
+ one; the grid draws them at 70% of it. */
29
+ [data-grid-header="words"] [data-slot="vk-grid"][data-desktop] [data-slot="vk-grid-header"],
30
+ [data-slot="vk-grid"][data-desktop] [data-slot="vk-grid-header"]:not([data-grid-header] *) {
31
+ --vk-head-h: calc(var(--vk-spacing) * 9 * var(--vk-scale));
32
+ --vk-head-text: calc(var(--vk-font-size-sm) * var(--vk-scale));
33
+ --vk-head-glyph: calc(var(--vk-spacing) * 3.5 * var(--vk-scale));
34
+ --vk-head-glyph-fg: var(--vk-fg-subtle);
35
+ }
36
+ [data-grid-header="words"] [data-slot="vk-grid"][data-desktop] [data-slot="vk-grid-header-cell"],
37
+ [data-slot="vk-grid"][data-desktop] [data-slot="vk-grid-header-cell"]:not([data-grid-header] *) {
38
+ --vk-fg-subtle: var(--vk-fg);
39
+ font-weight: var(--vk-font-weight-medium);
40
+ }
41
+
42
+ /* Column lines: All is the grid's own lines, the rows' and the header's (verticalBorders, headerVerticalBorders). None draws
43
+ none. Pinned only (Attio's): the line All draws, on the pinned name's edge alone, in the header and the rows, on the cells
44
+ the grid marks data-frozen, the grid's own lines off (gridLookProps). */
45
+ [data-grid-columns="pinned"] [data-slot="vk-grid-cell"][data-frozen],
46
+ [data-grid-columns="pinned"] [data-slot="vk-grid-header-cell"][data-frozen] {
47
+ border-right-style: solid;
48
+ border-right-width: var(--vk-border-width);
49
+ border-right-color: var(--vk-border-subtle);
50
+ }
51
+
52
+ /* Pinned edge: how the pinned name marks its edge once the grid is scrolled sideways, at the moment the grid shows its own
53
+ shadow (data-parked), beside Column lines' line, never in its place. Shadow is the grid's own and sets nothing. Fade,
54
+ Attio's at its measure, and Fade out are the grid's shadow itself, its colour and width set through its two variables: a
55
+ soft shade, or the ground the columns fade into. Line and Divider turn the shadow off and rule the last pinned column
56
+ (data-frozen-edge), a firmer line or a thick one. */
57
+ [data-grid-edge="fade"] [data-slot="vk-grid"] { --vk-frozen-shadow: var(--vk-frozen-fade); --vk-frozen-shadow-width: calc(var(--vk-spacing) * 7); }
58
+ [data-grid-edge="mask"] [data-slot="vk-grid"] { --vk-frozen-shadow: var(--vk-ground); --vk-frozen-shadow-width: calc(var(--vk-spacing) * 10); }
59
+ [data-grid-edge="line"] [data-slot="vk-grid"],
60
+ [data-grid-edge="divider"] [data-slot="vk-grid"],
61
+ [data-slot="vk-grid"]:not([data-grid-edge] *) {
62
+ --vk-frozen-shadow-width: 0;
63
+ }
64
+ [data-grid-edge="line"] [data-slot="vk-grid"][data-parked] [data-frozen-edge],
65
+ [data-slot="vk-grid"][data-parked] [data-frozen-edge]:not([data-grid-edge] *) {
66
+ border-right-style: solid;
67
+ border-right-width: var(--vk-border-width);
68
+ border-right-color: var(--vk-border-bold);
69
+ }
70
+ [data-grid-edge="divider"] [data-slot="vk-grid"][data-parked] [data-frozen-edge] {
71
+ border-right-style: solid;
72
+ border-right-width: calc(var(--vk-border-width) * 3);
73
+ border-right-color: var(--vk-border-input);
74
+ }
75
+
76
+ /* Row lines, Off: no line under a row (its cells', its rail's and its tail's), and none where rows aren't drawn yet; the
77
+ header keeps its line, and the columns' lines stand or go by Column lines, so a cell loses only its foot. On is the grid's
78
+ own. */
79
+ [data-grid-lines="off"] [data-slot="vk-grid-row"] [data-slot="vk-grid-cell"] {
80
+ border-bottom-color: transparent;
81
+ }
82
+ [data-grid-lines="off"] [data-slot="vk-grid-row"] [data-slot="vk-grid-rail"],
83
+ [data-grid-lines="off"] [data-slot="vk-grid-row"] [data-slot="vk-grid-tail"],
84
+ [data-grid-lines="off"] [data-slot="vk-grid-gap"] {
85
+ --vk-border-subtle: transparent;
86
+ }
87
+
88
+ /* Picked cell, Wash: the focused cell (data-focused) washed in the brand's lightest ground inside its frame. Ring: the frame
89
+ alone. */
90
+ [data-grid-cell="wash"] [data-slot="vk-grid-cell"][data-focused],
91
+ [data-slot="vk-grid-cell"][data-focused]:not([data-grid-cell] *) {
92
+ background-color: var(--vk-brand-subtlest);
93
+ }
94
+
95
+ /* The two frames the grid draws round a cell, the hovered cell's and the picked cell's, on its four variables. Cell corners:
96
+ both frames' corners, which the grid ties, square or the small corner. Hover frame: the hovered cell's line, none, the
97
+ line's colour or its stronger one. Picked cell frame: the picked cell's line at rest, the brand's or the stronger line;
98
+ under the pointer and while editing it is the brand's either way. */
99
+ [data-grid-corners="square"] [data-slot="vk-grid"] { --vk-outline-radius: 0; }
100
+ [data-grid-corners="round"] [data-slot="vk-grid"],
101
+ [data-slot="vk-grid"]:not([data-grid-corners] *) { --vk-outline-radius: var(--vk-radius-sm); }
102
+ [data-grid-hover="none"] [data-slot="vk-grid"] { --vk-outline-hover: transparent; }
103
+ [data-grid-hover="subtle"] [data-slot="vk-grid"] { --vk-outline-hover: var(--vk-border); }
104
+ [data-grid-hover="strong"] [data-slot="vk-grid"],
105
+ [data-slot="vk-grid"]:not([data-grid-hover] *) { --vk-outline-hover: var(--vk-border-bold); }
106
+ [data-grid-frame="brand"] [data-slot="vk-grid"],
107
+ [data-slot="vk-grid"]:not([data-grid-frame] *) { --vk-outline: var(--vk-border-accent); }
108
+ [data-grid-frame="neutral"] [data-slot="vk-grid"] { --vk-outline: var(--vk-border-bold); }
109
+ [data-slot="vk-grid"] { --vk-outline-active: var(--vk-border-accent); }
110
+
111
+ /* A cell being edited in an editor that draws its own edge shows that edge alone: where ViewKit's Text editor or Number
112
+ editor stands in the cell (data-kit, CONTROLS.TextBody and NumberBody), the input draws the only edge round what is typed,
113
+ so the grid's outline, its brand line and its lift, stands down on the cell being edited (data-editing). Where the grid's
114
+ own editor stands its outline stays, and a cell at rest keeps it. */
115
+ [data-slot="vk-grid-cell"][data-editing]:has([data-kit="text-editor"], [data-kit="number-editor"]) [data-slot="vk-grid-outline"] {
116
+ display: none;
117
+ }
118
+
119
+ /* A body over its cell (gridBodyPlace) has its own edge: while the grid's editor part holds ViewKit's Picker, Compound editor,
120
+ Values editor or Date editor, the cell being edited under it shows no outline, so the brand's line never peeks out under the
121
+ body's rounded corners. The grid's own editors keep it. */
122
+ :root:has([data-slot="vk-grid-editor"] [data-kit="picker"], [data-slot="vk-grid-editor"] [data-kit="compound-editor"], [data-slot="vk-grid-editor"] [data-kit="values-editor"], [data-slot="vk-grid-editor"] [data-kit="date-editor"]) [data-slot="vk-grid-cell"][data-editing] [data-slot="vk-grid-outline"] {
123
+ display: none;
124
+ }
125
+
126
+ /* Picked rows: Tint, Attio's, keeps a picked row's own line, its tint alone saying it is picked (--vk-selection-edge). Tint
127
+ and line, the portal's, is the grid's own: the brand's line over the first picked row and under each. */
128
+ [data-grid-picked="tint"] [data-slot="vk-grid"] {
129
+ --vk-selection-edge: transparent;
130
+ }
131
+
132
+ /* Groups: Compact, Attio's, the groups closing together under the one row of titles (--vk-group-gap); in both ways the group
133
+ after a folded one stands right under it (data-collapsed). A head that rows pass under casts a shadow (data-stuck). */
134
+ [data-grid-groups="compact"] [data-slot="vk-grid"] {
135
+ --vk-group-gap: 0;
136
+ }
137
+ [data-slot="vk-grid-group"][data-collapsed] + [data-slot="vk-grid-group"] {
138
+ --vk-group-gap: 0;
139
+ }
140
+ [data-slot="vk-grid-group-head"][data-stuck] {
141
+ box-shadow: var(--vk-shadow-sm);
142
+ }
143
+
144
+ /* Names, Underlined (Attio's): a record's name underlined at rest and under the pointer, a line of the line's width in the
145
+ strong line colour, 3 under the words (vk-grid-title). On hover is the grid's own. */
146
+ [data-grid-names="underline"] [data-slot="vk-grid-title"] {
147
+ text-decoration-line: underline;
148
+ text-decoration-color: var(--vk-border-bold);
149
+ text-decoration-thickness: var(--vk-border-width);
150
+ text-underline-offset: calc(var(--vk-spacing) * 0.75);
151
+ }
152
+
153
+ /* Phones, Link (Attio's): a checked phone in the link's colour, the brand's as the grid draws a link and a domain, with the
154
+ names' underline at rest, on the display's vk-phone while it is a link (data-cell-link). A phone with nothing to dial is
155
+ text and stays as it is. As text is the grid's own. Under the pointer the grid's own brand underline is drawn over it.
156
+ Before Phones as typed, whose look stands on top of it. */
157
+ [data-grid-phones="link"] [data-slot="vk-phone"][data-cell-link] {
158
+ color: var(--vk-fg-brand);
159
+ text-decoration-line: underline;
160
+ text-decoration-color: var(--vk-border-bold);
161
+ text-decoration-thickness: var(--vk-border-width);
162
+ text-underline-offset: calc(var(--vk-spacing) * 0.75);
163
+ }
164
+
165
+ /* Phones as typed: a phone no parser read, which the display draws as typed and marks data-as-typed on its vk-phone, on top of
166
+ Phones' look. Each value dresses the phone itself, the line and the colour reaching its words: Dotted line, Attio's look's,
167
+ a dotted line in the warning's colour at the focus width; Subtle, the portal's, its words subtle, as the grid draws a value
168
+ that isn't one of its field's options; Dot, the warning's dot before it in the link's own gap, at the grid's scale; Tinted,
169
+ the warning's ground under it. None is the display's own, its title alone. Under the pointer the grid's own look stays the
170
+ one drawn: its brand underline, its brand colour. */
171
+ [data-grid-typed="dotted"] [data-slot="vk-phone"][data-as-typed],
172
+ [data-slot="vk-phone"][data-as-typed]:not([data-grid-typed] *) {
173
+ text-decoration-line: underline;
174
+ text-decoration-style: dotted;
175
+ text-decoration-color: var(--vk-warning);
176
+ text-decoration-thickness: var(--vk-focus-width);
177
+ text-underline-offset: calc(var(--vk-spacing) * 0.75);
178
+ }
179
+ [data-grid-typed="subtle"] [data-slot="vk-phone"][data-as-typed] {
180
+ color: var(--vk-fg-subtle);
181
+ }
182
+ @media (hover: hover) {
183
+ [data-grid-typed="dotted"] [data-slot="vk-phone"][data-as-typed]:hover,
184
+ [data-slot="vk-phone"][data-as-typed]:hover:not([data-grid-typed] *) {
185
+ text-decoration-line: none;
186
+ }
187
+ [data-grid-typed="subtle"] [data-slot="vk-phone"][data-as-typed]:hover {
188
+ color: var(--vk-fg-brand);
189
+ }
190
+ }
191
+ /* Dot: a phone with a digit is the display's link, a flex row whose gap stands after the dot; one with none is its text, a
192
+ block, where the dot is an inline block in the line, as wide as the dot and the link's gap, the dot painted at its start.
193
+ In the link flex-basis holds it to the dot alone, so the gap is the link's own either way. */
194
+ [data-grid-typed="dot"] [data-slot="vk-phone"][data-as-typed]::before {
195
+ content: "";
196
+ display: inline-block;
197
+ vertical-align: middle;
198
+ flex: none;
199
+ flex-basis: calc(var(--vk-spacing) * 1.5 * var(--vk-scale));
200
+ inline-size: calc(var(--vk-spacing) * 1.5 * (var(--vk-scale) + 1));
201
+ block-size: calc(var(--vk-spacing) * 1.5 * var(--vk-scale));
202
+ background: radial-gradient(circle closest-side, var(--vk-warning-bold) 100%, transparent 100%) no-repeat 0 / calc(var(--vk-spacing) * 1.5 * var(--vk-scale)) calc(var(--vk-spacing) * 1.5 * var(--vk-scale));
203
+ }
204
+ [data-grid-typed="tint"] [data-slot="vk-phone"][data-as-typed] {
205
+ background-color: var(--vk-warning-subtler);
206
+ border-radius: var(--vk-radius-xs);
207
+ padding-inline: var(--vk-spacing);
208
+ margin-inline-start: calc(var(--vk-spacing) * -1);
209
+ }
210
+
211
+ /* Figures, Value first (Attio's): the footer's value, then its word in lower case, "13 count", and an empty cell's offer
212
+ "+ Add calculation" under the pointer, its words the app's message (views.grid.figure-pick), its "+" drawn here
213
+ (vk-grid-figure-*). Word first is the grid's own: the word in capitals before the value, "Calculate". */
214
+ [data-grid-figures="value"] [data-slot="vk-grid-figure-value"] {
215
+ order: -1;
216
+ color: var(--vk-fg);
217
+ font-weight: var(--vk-font-weight-medium);
218
+ }
219
+ [data-grid-figures="value"] [data-slot="vk-grid-figure-label"] {
220
+ text-transform: lowercase;
221
+ letter-spacing: normal;
222
+ color: var(--vk-fg-subtlest);
223
+ }
224
+ [data-grid-figures="value"] [data-slot="vk-grid-figure-pick"] {
225
+ text-transform: none;
226
+ letter-spacing: normal;
227
+ }
228
+ [data-grid-figures="value"] [data-slot="vk-grid-figure-pick"]::before {
229
+ content: "+";
230
+ content: "+" / "";
231
+ margin-right: var(--vk-spacing);
232
+ }
233
+
234
+ /* Pressed while its menu is open, in every look: a header cell while its column's menu is, a footer cell while its figure
235
+ picker is, and + Add column's corner of the header while its menu is (data-open). */
236
+ [data-slot="vk-grid-header-cell"][data-open],
237
+ [data-slot="vk-grid-footer-cell"][data-open],
238
+ [data-slot="vk-grid-header"] [data-slot="vk-grid-tail"]:has([data-open]) {
239
+ background-color: var(--vk-pressed);
240
+ }
@@ -1,7 +1,11 @@
1
1
  import type { GridGroupMenuPart } from "./chrome/grid-group-menu-parts.js";
2
2
  import { type LookPicks, type PieceLooks } from "../looks/looks.js";
3
3
  export type GridLookOptionId = "header" | "lines" | "columns" | "density" | "phone" | "name" | "edge" | "boxes" | "icon" | "picked" | "cell" | "corners" | "hover" | "frame" | "groups" | "names" | "phones" | "typed" | "figures" | "width" | "more" | "wait" | "foot" | "add" | "picking";
4
- /** The grid's options and its two looks, attio (every option's default) and portal. */
4
+ /** The grid's options and its two looks, attio and portal. Nothing picked wears each option's default, My preset's grid look
5
+ * (the Decisions of 25 Nov 2026: "My preset from the station is the look and ViewKit's default"), which differs from Attio's
6
+ * in ten options: its column lines all, its pinned edge a line, its checkboxes always, picked rows tinted and lined, round
7
+ * cell corners, a strong hover frame, groups under their own titles, names and phones as the grid draws them, its figures
8
+ * word first. */
5
9
  export declare const GRID_LOOKS: PieceLooks<GridLookOptionId>;
6
10
  /** What the grid's code reads of its options; the rest are its look stylesheet's alone. */
7
11
  export type GridLookWorn = {
@@ -2,23 +2,23 @@ import { lookWorn, lookWornOf } from "../looks/looks.js";
2
2
  const options = [
3
3
  { id: "header", name: "Header", device: "desktop", def: "words", values: [{ id: "words", name: "Words" }, { id: "quiet", name: "Quiet" }] },
4
4
  { id: "lines", name: "Row lines", def: "on", values: [{ id: "on", name: "On" }, { id: "off", name: "Off" }] },
5
- { id: "columns", name: "Column lines", def: "pinned", values: [{ id: "all", name: "All" }, { id: "none", name: "None" }, { id: "pinned", name: "Pinned only" }] },
5
+ { id: "columns", name: "Column lines", def: "all", values: [{ id: "all", name: "All" }, { id: "none", name: "None" }, { id: "pinned", name: "Pinned only" }] },
6
6
  { id: "density", name: "Density", def: "default", values: [{ id: "compact", name: "Compact" }, { id: "default", name: "Default" }, { id: "roomy", name: "Roomy" }] },
7
7
  { id: "phone", name: "Size", device: "phone", def: "attio", values: [{ id: "attio", name: "Attio's" }, { id: "computer", name: "The computer's" }] },
8
8
  { id: "name", name: "Name column", def: "pinned", values: [{ id: "pinned", name: "Pinned" }, { id: "scrolls", name: "Scrolls" }] },
9
- { id: "edge", name: "Pinned edge", def: "fade", values: [{ id: "shadow", name: "Shadow" }, { id: "fade", name: "Fade" }, { id: "line", name: "Line" }, { id: "divider", name: "Divider" }, { id: "mask", name: "Fade out" }] },
10
- { id: "boxes", name: "Checkboxes", def: "hover", values: [{ id: "hover", name: "On hover" }, { id: "always", name: "Always" }] },
9
+ { id: "edge", name: "Pinned edge", def: "line", values: [{ id: "shadow", name: "Shadow" }, { id: "fade", name: "Fade" }, { id: "line", name: "Line" }, { id: "divider", name: "Divider" }, { id: "mask", name: "Fade out" }] },
10
+ { id: "boxes", name: "Checkboxes", def: "always", values: [{ id: "hover", name: "On hover" }, { id: "always", name: "Always" }] },
11
11
  { id: "icon", name: "Row icon", def: "on", values: [{ id: "on", name: "On" }, { id: "off", name: "Off" }] },
12
- { id: "picked", name: "Picked rows", def: "tint", values: [{ id: "tint", name: "Tint" }, { id: "line", name: "Tint and line" }] },
12
+ { id: "picked", name: "Picked rows", def: "line", values: [{ id: "tint", name: "Tint" }, { id: "line", name: "Tint and line" }] },
13
13
  { id: "cell", name: "Picked cell", def: "wash", values: [{ id: "wash", name: "Wash" }, { id: "ring", name: "Ring" }] },
14
- { id: "corners", name: "Cell corners", def: "square", values: [{ id: "square", name: "Square" }, { id: "round", name: "Round" }] },
15
- { id: "hover", name: "Hover frame", def: "subtle", values: [{ id: "none", name: "None" }, { id: "subtle", name: "Subtle" }, { id: "strong", name: "Strong" }] },
14
+ { id: "corners", name: "Cell corners", def: "round", values: [{ id: "square", name: "Square" }, { id: "round", name: "Round" }] },
15
+ { id: "hover", name: "Hover frame", def: "strong", values: [{ id: "none", name: "None" }, { id: "subtle", name: "Subtle" }, { id: "strong", name: "Strong" }] },
16
16
  { id: "frame", name: "Picked cell frame", def: "brand", values: [{ id: "brand", name: "Brand" }, { id: "neutral", name: "Neutral" }] },
17
- { id: "groups", name: "Groups", def: "compact", values: [{ id: "compact", name: "Compact" }, { id: "titles", name: "Own titles" }] },
18
- { id: "names", name: "Names", def: "underline", values: [{ id: "underline", name: "Underlined" }, { id: "hover", name: "On hover" }] },
19
- { id: "phones", name: "Phones", def: "link", values: [{ id: "link", name: "Link" }, { id: "text", name: "As text" }] },
17
+ { id: "groups", name: "Groups", def: "titles", values: [{ id: "compact", name: "Compact" }, { id: "titles", name: "Own titles" }] },
18
+ { id: "names", name: "Names", def: "hover", values: [{ id: "underline", name: "Underlined" }, { id: "hover", name: "On hover" }] },
19
+ { id: "phones", name: "Phones", def: "text", values: [{ id: "link", name: "Link" }, { id: "text", name: "As text" }] },
20
20
  { id: "typed", name: "Phones as typed", def: "dotted", values: [{ id: "none", name: "None" }, { id: "dotted", name: "Dotted line" }, { id: "subtle", name: "Subtle" }, { id: "dot", name: "Dot" }, { id: "tint", name: "Tinted" }] },
21
- { id: "figures", name: "Figures", def: "value", values: [{ id: "value", name: "Value first" }, { id: "word", name: "Word first" }] },
21
+ { id: "figures", name: "Figures", def: "word", values: [{ id: "value", name: "Value first" }, { id: "word", name: "Word first" }] },
22
22
  { id: "width", name: "Width", def: "own", values: [{ id: "own", name: "The columns' own" }, { id: "fill", name: "Fill" }] },
23
23
  { id: "more", name: "More rows", def: "scroll", values: [{ id: "scroll", name: "As you scroll" }, { id: "pages", name: "In pages" }] },
24
24
  { id: "wait", name: "Rows changing", def: "kept", values: [{ id: "kept", name: "Kept" }, { id: "cleared", name: "Cleared" }] },
@@ -26,13 +26,21 @@ const options = [
26
26
  { id: "add", name: "Add column", device: "phone", def: "name", values: [{ id: "name", name: "In the name's header" }, { id: "end", name: "At the end" }] },
27
27
  { id: "picking", name: "Picking rows", device: "phone", def: "press", values: [{ id: "press", name: "Long press" }, { id: "rail", name: "In the rail" }] },
28
28
  ];
29
- const defs = Object.fromEntries(options.map((o) => [o.id, o.def]));
30
29
  export const GRID_LOOKS = {
31
30
  id: "grid",
32
31
  name: "Grid",
33
32
  options,
34
33
  looks: [
35
- { id: "attio", name: "Attio", picks: { ...defs } },
34
+ {
35
+ id: "attio",
36
+ name: "Attio",
37
+ picks: {
38
+ header: "words", lines: "on", columns: "pinned", density: "default", phone: "attio", name: "pinned", edge: "fade",
39
+ boxes: "hover", icon: "on", picked: "tint", cell: "wash", corners: "square", hover: "subtle", frame: "brand",
40
+ groups: "compact", names: "underline", phones: "link", typed: "dotted", figures: "value", width: "own", more: "scroll",
41
+ wait: "kept", foot: "pinned", add: "name", picking: "press",
42
+ },
43
+ },
36
44
  {
37
45
  id: "portal",
38
46
  name: "The portal's",