viewkitjs 0.28.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 (305) hide show
  1. package/CHANGELOG.md +107 -0
  2. package/MIGRATION.md +85 -4
  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.js +2 -2
  41. package/views/dist/cells/cell-values.js +9 -10
  42. package/views/dist/contract.d.ts +149 -3
  43. package/views/dist/contract.js +157 -1
  44. package/views/dist/controls/bulk-bar/bulk-bar-of.d.ts +66 -0
  45. package/views/dist/controls/bulk-bar/bulk-bar-of.js +22 -0
  46. package/views/dist/controls/bulk-bar/bulk-bar.d.ts +40 -0
  47. package/views/dist/controls/bulk-bar/bulk-bar.js +278 -0
  48. package/views/dist/controls/bulk-bar/looks.d.ts +10 -0
  49. package/views/dist/controls/bulk-bar/looks.js +14 -0
  50. package/views/dist/controls/bulk-bar/map-selection-bar.d.ts +19 -0
  51. package/views/dist/controls/bulk-bar/map-selection-bar.js +57 -0
  52. package/views/dist/controls/bulk-bar/tokens.d.ts +136 -0
  53. package/views/dist/controls/bulk-bar/tokens.js +36 -0
  54. package/views/dist/controls/bulk-bar/words.d.ts +50 -0
  55. package/views/dist/controls/bulk-bar/words.js +19 -0
  56. package/views/dist/controls/bulk-bar.css +96 -0
  57. package/views/dist/controls/button/button.js +3 -1
  58. package/views/dist/controls/button.css +5 -4
  59. package/views/dist/controls/checkbox/checkbox.js +3 -1
  60. package/views/dist/controls/checkbox.css +1 -1
  61. package/views/dist/controls/choice/tokens.d.ts +79 -0
  62. package/views/dist/controls/choice/tokens.js +22 -0
  63. package/views/dist/controls/choice.css +31 -0
  64. package/views/dist/controls/compound-editor/looks.js +1 -1
  65. package/views/dist/controls/controls.d.ts +10 -0
  66. package/views/dist/controls/controls.js +8 -0
  67. package/views/dist/controls/customize/customize.d.ts +125 -0
  68. package/views/dist/controls/customize/customize.js +243 -0
  69. package/views/dist/controls/customize/glide.d.ts +10 -0
  70. package/views/dist/controls/customize/glide.js +55 -0
  71. package/views/dist/controls/customize/looks.d.ts +13 -0
  72. package/views/dist/controls/customize/looks.js +11 -0
  73. package/views/dist/controls/customize/map-customize-body.d.ts +18 -0
  74. package/views/dist/controls/customize/map-customize-body.js +160 -0
  75. package/views/dist/controls/customize/rules.d.ts +23 -0
  76. package/views/dist/controls/customize/rules.js +19 -0
  77. package/views/dist/controls/customize/tokens.d.ts +40 -0
  78. package/views/dist/controls/customize/tokens.js +12 -0
  79. package/views/dist/controls/customize/words.d.ts +58 -0
  80. package/views/dist/controls/customize/words.js +37 -0
  81. package/views/dist/controls/customize.css +54 -0
  82. package/views/dist/controls/date-editor/looks.js +1 -1
  83. package/views/dist/controls/filter-editor/block.d.ts +31 -0
  84. package/views/dist/controls/filter-editor/block.js +27 -0
  85. package/views/dist/controls/filter-editor/filter-editor.d.ts +2 -0
  86. package/views/dist/controls/filter-editor/filter-editor.js +85 -43
  87. package/views/dist/controls/filter-editor/how.d.ts +1 -1
  88. package/views/dist/controls/filter-editor/how.js +1 -0
  89. package/views/dist/controls/filter-editor/map-filter-body.d.ts +16 -1
  90. package/views/dist/controls/filter-editor/map-filter-body.js +39 -13
  91. package/views/dist/controls/filter-editor/map-rules.d.ts +27 -11
  92. package/views/dist/controls/filter-editor/map-rules.js +73 -42
  93. package/views/dist/controls/filter-editor/rules.d.ts +43 -5
  94. package/views/dist/controls/filter-editor/rules.js +55 -2
  95. package/views/dist/controls/filter-editor/words.d.ts +15 -0
  96. package/views/dist/controls/filter-editor/words.js +6 -0
  97. package/views/dist/controls/filter-editor.css +18 -0
  98. package/views/dist/controls/index.d.ts +26 -2
  99. package/views/dist/controls/index.js +25 -2
  100. package/views/dist/controls/inline-input/looks.js +1 -1
  101. package/views/dist/controls/input/input.js +10 -4
  102. package/views/dist/controls/internal/phone.d.ts +5 -4
  103. package/views/dist/controls/internal/phone.js +7 -7
  104. package/views/dist/controls/internal/scroll.js +5 -1
  105. package/views/dist/controls/internal/typed-run.d.ts +2 -0
  106. package/views/dist/controls/internal/typed-run.js +5 -0
  107. package/views/dist/controls/menu/map-menu.js +2 -2
  108. package/views/dist/controls/number-editor/looks.js +1 -1
  109. package/views/dist/controls/option/option.js +3 -1
  110. package/views/dist/controls/option.css +1 -1
  111. package/views/dist/controls/pane/pane.d.ts +4 -0
  112. package/views/dist/controls/pane/pane.js +2 -1
  113. package/views/dist/controls/picker/looks.js +1 -1
  114. package/views/dist/controls/picker/map-picker.d.ts +6 -2
  115. package/views/dist/controls/picker/map-picker.js +4 -2
  116. package/views/dist/controls/picker/picker.d.ts +7 -0
  117. package/views/dist/controls/picker/picker.js +57 -8
  118. package/views/dist/controls/popover/map-popover.d.ts +1 -1
  119. package/views/dist/controls/popover/map-popover.js +2 -2
  120. package/views/dist/controls/popover/popover.js +2 -1
  121. package/views/dist/controls/popover.css +3 -0
  122. package/views/dist/controls/ports-host/map-ports-host.d.ts +7 -0
  123. package/views/dist/controls/ports-host/map-ports-host.js +43 -0
  124. package/views/dist/controls/press/tokens.d.ts +8 -0
  125. package/views/dist/controls/press/tokens.js +4 -0
  126. package/views/dist/controls/press.css +44 -0
  127. package/views/dist/controls/quick-filters/looks.d.ts +11 -0
  128. package/views/dist/controls/quick-filters/looks.js +9 -0
  129. package/views/dist/controls/quick-filters/map-quick-filters-body.d.ts +31 -0
  130. package/views/dist/controls/quick-filters/map-quick-filters-body.js +56 -0
  131. package/views/dist/controls/quick-filters/quick-filters.d.ts +37 -0
  132. package/views/dist/controls/quick-filters/quick-filters.js +89 -0
  133. package/views/dist/controls/quick-filters/reminder.d.ts +18 -0
  134. package/views/dist/controls/quick-filters/reminder.js +41 -0
  135. package/views/dist/controls/quick-filters/rules.d.ts +89 -0
  136. package/views/dist/controls/quick-filters/rules.js +52 -0
  137. package/views/dist/controls/quick-filters/tokens.d.ts +112 -0
  138. package/views/dist/controls/quick-filters/tokens.js +30 -0
  139. package/views/dist/controls/quick-filters/words.d.ts +25 -0
  140. package/views/dist/controls/quick-filters/words.js +13 -0
  141. package/views/dist/controls/quick-filters.css +118 -0
  142. package/views/dist/controls/sheet/bottom-sheet.d.ts +9 -4
  143. package/views/dist/controls/sheet/bottom-sheet.js +4 -4
  144. package/views/dist/controls/sheet/map-sheet.d.ts +4 -1
  145. package/views/dist/controls/sheet/map-sheet.js +19 -6
  146. package/views/dist/controls/sheet/sheet-parts.d.ts +10 -0
  147. package/views/dist/controls/sheet/sheet-parts.js +2 -0
  148. package/views/dist/controls/switch-row/switch-row.d.ts +15 -0
  149. package/views/dist/controls/switch-row/switch-row.js +9 -0
  150. package/views/dist/controls/switch-row/tokens.d.ts +51 -0
  151. package/views/dist/controls/switch-row/tokens.js +15 -0
  152. package/views/dist/controls/switch-row.css +39 -0
  153. package/views/dist/controls/switch.css +1 -1
  154. package/views/dist/controls/tag/tag.js +3 -1
  155. package/views/dist/controls/tag-field/tag-field.d.ts +20 -0
  156. package/views/dist/controls/tag-field/tag-field.js +19 -0
  157. package/views/dist/controls/tag-field/tokens.d.ts +7 -0
  158. package/views/dist/controls/tag-field/tokens.js +4 -0
  159. package/views/dist/controls/tag-field.css +13 -0
  160. package/views/dist/controls/text-editor/looks.js +1 -1
  161. package/views/dist/controls/text-editor/text-editor.js +1 -5
  162. package/views/dist/controls/toast/toast.d.ts +5 -1
  163. package/views/dist/controls/toast/toast.js +5 -3
  164. package/views/dist/controls/tokens.js +18 -0
  165. package/views/dist/controls/toolbar/keys.d.ts +3 -0
  166. package/views/dist/controls/toolbar/keys.js +11 -0
  167. package/views/dist/controls/toolbar/looks.d.ts +10 -0
  168. package/views/dist/controls/toolbar/looks.js +40 -0
  169. package/views/dist/controls/toolbar/tokens.d.ts +28 -0
  170. package/views/dist/controls/toolbar/tokens.js +9 -0
  171. package/views/dist/controls/toolbar/toolbar.d.ts +111 -0
  172. package/views/dist/controls/toolbar/toolbar.js +370 -0
  173. package/views/dist/controls/toolbar/words.d.ts +28 -0
  174. package/views/dist/controls/toolbar/words.js +17 -0
  175. package/views/dist/controls/toolbar-button/looks.d.ts +4 -0
  176. package/views/dist/controls/toolbar-button/looks.js +21 -0
  177. package/views/dist/controls/toolbar-button/tokens.d.ts +103 -0
  178. package/views/dist/controls/toolbar-button/tokens.js +28 -0
  179. package/views/dist/controls/toolbar-button/toolbar-button.d.ts +66 -0
  180. package/views/dist/controls/toolbar-button/toolbar-button.js +51 -0
  181. package/views/dist/controls/toolbar-button.css +75 -0
  182. package/views/dist/controls/toolbar.css +65 -0
  183. package/views/dist/controls/tooltip/map-tooltip.d.ts +1 -1
  184. package/views/dist/controls/tooltip/map-tooltip.js +2 -2
  185. package/views/dist/controls/tooltip/tooltip.d.ts +3 -1
  186. package/views/dist/controls/tooltip/tooltip.js +2 -2
  187. package/views/dist/controls/values-editor/looks.js +1 -1
  188. package/views/dist/controls/views-list/map-views-list-body.d.ts +4 -1
  189. package/views/dist/controls/views-list/map-views-list-body.js +128 -4
  190. package/views/dist/controls/views-list/rules.d.ts +26 -0
  191. package/views/dist/controls/views-list/rules.js +63 -0
  192. package/views/dist/controls/views-list/view-menu.d.ts +84 -0
  193. package/views/dist/controls/views-list/view-menu.js +201 -0
  194. package/views/dist/controls/views-list/views-list.d.ts +8 -1
  195. package/views/dist/controls/views-list/views-list.js +18 -3
  196. package/views/dist/controls/views-list/words.d.ts +54 -0
  197. package/views/dist/controls/views-list/words.js +10 -1
  198. package/views/dist/controls/views-list.css +5 -1
  199. package/views/dist/display/date.js +3 -3
  200. package/views/dist/display/format.d.ts +6 -0
  201. package/views/dist/display/format.js +3 -0
  202. package/views/dist/display/index.d.ts +1 -1
  203. package/views/dist/display/index.js +1 -1
  204. package/views/dist/display/range.d.ts +2 -1
  205. package/views/dist/display/range.js +4 -1
  206. package/views/dist/grid/chrome/GridHeader.js +2 -1
  207. package/views/dist/grid/chrome/GridNumberEditor.js +2 -2
  208. package/views/dist/grid/chrome/GridRowCells.js +2 -1
  209. package/views/dist/grid/chrome/GridTextEditor.js +2 -2
  210. package/views/dist/grid/chrome/grid-editor-layer.d.ts +5 -1
  211. package/views/dist/grid/chrome/grid-editor-layer.js +1 -0
  212. package/views/dist/grid/chrome/grid-fitted-box.d.ts +7 -1
  213. package/views/dist/grid/chrome/grid-fitted-box.js +4 -4
  214. package/views/dist/grid/core/clipboard-model.js +9 -4
  215. package/views/dist/grid/grid.css +240 -0
  216. package/views/dist/grid/looks.d.ts +5 -1
  217. package/views/dist/grid/looks.js +20 -12
  218. package/views/dist/grid-tokens.d.ts +109 -0
  219. package/views/dist/grid-tokens.js +29 -0
  220. package/views/dist/looks/index.d.ts +5 -0
  221. package/views/dist/looks/index.js +5 -0
  222. package/views/dist/looks/pieces.js +10 -0
  223. package/views/dist/model/column-capabilities.d.ts +2 -0
  224. package/views/dist/model/column-filters.d.ts +2 -1
  225. package/views/dist/model/column-from.js +2 -2
  226. package/views/dist/model/relation-filters.d.ts +2 -0
  227. package/views/dist/panels/index.d.ts +2 -2
  228. package/views/dist/panels/index.js +2 -2
  229. package/views/dist/panels/labels.d.ts +4 -0
  230. package/views/dist/panels/labels.js +8 -0
  231. package/views/dist/panels/model.d.ts +10 -2
  232. package/views/dist/panels/quick/model.d.ts +4 -0
  233. package/views/dist/panels/react/customize-body.d.ts +9 -4
  234. package/views/dist/panels/react/customize-body.js +39 -11
  235. package/views/dist/panels/react/customize.d.ts +8 -1
  236. package/views/dist/panels/react/customize.js +9 -6
  237. package/views/dist/panels/react/filter/FilterEditor.js +4 -4
  238. package/views/dist/panels/react/filter/FilterFieldList.js +10 -2
  239. package/views/dist/panels/react/filter/PhoneFilterEditor.js +3 -3
  240. package/views/dist/panels/react/filter/filter-body.js +5 -2
  241. package/views/dist/panels/react/panel-step.d.ts +3 -0
  242. package/views/dist/panels/react/panel-step.js +2 -1
  243. package/views/dist/panels/react/quick/QuickFiltersPanel.js +1 -0
  244. package/views/dist/panels/react/toolbar/ReadyToolbar.d.ts +13 -3
  245. package/views/dist/panels/react/toolbar/ReadyToolbar.js +10 -3
  246. package/views/dist/panels/react/toolbar/Toolbar.js +1 -1
  247. package/views/dist/panels/react/toolbar/ToolbarAsideFilter.js +2 -2
  248. package/views/dist/panels/react/toolbar/ToolbarBarFilter.js +13 -3
  249. package/views/dist/panels/react/toolbar/ToolbarFilterAdd.js +2 -1
  250. package/views/dist/panels/react/toolbar/ToolbarFilters.js +3 -3
  251. package/views/dist/panels/react/toolbar/ToolbarOptions.d.ts +12 -4
  252. package/views/dist/panels/react/toolbar/ToolbarOptions.js +6 -2
  253. package/views/dist/panels/react/view-footer.d.ts +1 -1
  254. package/views/dist/panels/react/views-row/ViewPicker.js +25 -4
  255. package/views/dist/panels/settings/filter-groups.d.ts +3 -0
  256. package/views/dist/panels/settings/filter-groups.js +40 -9
  257. package/views/dist/panels/settings/filters.d.ts +5 -0
  258. package/views/dist/panels/settings/filters.js +12 -6
  259. package/views/dist/panels/views-row/model.d.ts +10 -1
  260. package/views/dist/provider/ViewsProvider.js +29 -5
  261. package/views/dist/provider/components.d.ts +149 -8
  262. package/views/dist/provider/context.d.ts +6 -0
  263. package/views/dist/provider/ports.d.ts +18 -6
  264. package/views/dist/provider/ports.js +2 -1
  265. package/views/dist/react.d.ts +2 -2
  266. package/views/dist/react.js +1 -1
  267. package/views/dist/selection/SelectionBar.d.ts +2 -16
  268. package/views/dist/selection/SelectionBar.js +4 -1
  269. package/views/dist/selection/bar-props.d.ts +26 -0
  270. package/views/dist/selection/bar-props.js +1 -0
  271. package/views/dist/selection/index.d.ts +1 -1
  272. package/views/dist/selection/verbs.d.ts +32 -5
  273. package/views/dist/styles.css +656 -25
  274. package/views/dist/styles.unlayered.css +653 -22
  275. package/views/docs/contract.md +44 -17
  276. package/views/docs/controls/bulk-bar.md +41 -0
  277. package/views/docs/controls/choice.md +25 -0
  278. package/views/docs/controls/customize.md +17 -0
  279. package/views/docs/controls/popover.md +2 -0
  280. package/views/docs/controls/press.md +9 -0
  281. package/views/docs/controls/quick-filters.md +35 -0
  282. package/views/docs/controls/radio.md +1 -1
  283. package/views/docs/controls/switch-row.md +18 -0
  284. package/views/docs/controls/tag-field.md +7 -0
  285. package/views/docs/controls/toolbar-button.md +31 -0
  286. package/views/docs/controls/toolbar.md +14 -0
  287. package/views/docs/guides/atoms.md +2 -2
  288. package/views/docs/guides/cells.md +2 -2
  289. package/views/docs/guides/display.md +2 -2
  290. package/views/docs/guides/looks.md +8 -2
  291. package/views/docs/guides/ports.md +6 -6
  292. package/views/docs/guides/selection.md +5 -1
  293. package/views/docs/guides/the-grid.md +1 -1
  294. package/views/docs/guides/the-provider.md +2 -2
  295. package/views/docs/install.md +4 -1
  296. package/views/docs/reference/cells.md +1 -1
  297. package/views/docs/reference/controls.md +194 -13
  298. package/views/docs/reference/display.md +1 -0
  299. package/views/docs/reference/looks.md +25 -11
  300. package/views/docs/reference/panels-react.md +7 -7
  301. package/views/docs/reference/panels.md +8 -6
  302. package/views/docs/reference/react.md +13 -6
  303. package/views/docs/reference/selection.md +4 -2
  304. package/views/docs/reference/views.md +7 -6
  305. package/views/skills/views/SKILL.md +2 -2
@@ -4,14 +4,14 @@ import { useCallback, useLayoutEffect } from "react";
4
4
  import { cx } from "../../internal/cx.js";
5
5
  import { GRID_EDITING_SHADOW, GRID_GROUND } from "./grid-styles.js";
6
6
  const FITTED_MAX_PX = 320;
7
- export function GridFittedBox({ boxRef, children, }) {
7
+ export function GridFittedBox({ boxRef, edge = true, room = 0, children, }) {
8
8
  const fit = useCallback(() => {
9
9
  const box = boxRef.current;
10
10
  const input = box?.querySelector("input");
11
11
  if (!box || !input)
12
12
  return;
13
13
  box.style.minWidth = "";
14
- const over = input.scrollWidth - input.clientWidth;
14
+ const over = Math.max(input.scrollWidth, room) - input.clientWidth;
15
15
  const width = over > 0 ? Math.min(box.offsetWidth + over + 1, FITTED_MAX_PX) : 0;
16
16
  if (width > box.offsetWidth) {
17
17
  box.style.minWidth = `${width}px`;
@@ -20,7 +20,7 @@ export function GridFittedBox({ boxRef, children, }) {
20
20
  else {
21
21
  delete box.dataset.grown;
22
22
  }
23
- }, [boxRef]);
23
+ }, [boxRef, room]);
24
24
  useLayoutEffect(fit, [fit]);
25
- return (_jsxs("span", { ref: boxRef, onInput: fit, className: "group/fitted relative flex h-full w-full min-w-0 shrink-0 data-grown:z-2", children: [_jsx("span", { "aria-hidden": true, className: cx("pointer-events-none absolute inset-y-0 -inset-x-(--vk-px) -z-1 hidden rounded-sm border border-(color:--vk-border-brand) group-data-grown/fitted:block", GRID_EDITING_SHADOW, GRID_GROUND) }), children] }));
25
+ return (_jsxs("span", { ref: boxRef, onInput: fit, className: "group/fitted relative flex h-full w-full min-w-0 shrink-0 data-grown:z-2", children: [edge && (_jsx("span", { "aria-hidden": true, className: cx("pointer-events-none absolute inset-y-0 -inset-x-(--vk-px) -z-1 hidden rounded-sm border border-(color:--vk-border-brand) group-data-grown/fitted:block", GRID_EDITING_SHADOW, GRID_GROUND) })), children] }));
26
26
  }
@@ -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) {
@@ -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",
@@ -0,0 +1,109 @@
1
+ export declare const GRID_TOKENS: readonly [{
2
+ readonly name: "--vk-duration-fast";
3
+ readonly kind: "motion";
4
+ readonly outright: "--duration-fast";
5
+ }, {
6
+ readonly name: "--vk-font-size-2xs";
7
+ readonly kind: "size";
8
+ readonly outright: "--text-2xs";
9
+ }, {
10
+ readonly name: "--vk-font-size-sm";
11
+ readonly kind: "size";
12
+ readonly outright: "--text-sm";
13
+ }, {
14
+ readonly name: "--vk-font-weight-medium";
15
+ readonly kind: "size";
16
+ readonly outright: "--font-weight-medium";
17
+ }, {
18
+ readonly name: "--vk-spacing";
19
+ readonly kind: "size";
20
+ readonly outright: "--spacing";
21
+ }, {
22
+ readonly name: "--vk-border-width";
23
+ readonly kind: "size";
24
+ readonly outright: "--border-width";
25
+ }, {
26
+ readonly name: "--vk-focus-width";
27
+ readonly kind: "size";
28
+ readonly outright: "--focus-width";
29
+ }, {
30
+ readonly name: "--vk-radius-xs";
31
+ readonly kind: "size";
32
+ readonly outright: "--radius-xs";
33
+ }, {
34
+ readonly name: "--vk-radius-sm";
35
+ readonly kind: "size";
36
+ readonly outright: "--radius-sm";
37
+ }, {
38
+ readonly name: "--vk-fg";
39
+ readonly kind: "colour";
40
+ readonly outright: "--text";
41
+ }, {
42
+ readonly name: "--vk-fg-subtle";
43
+ readonly kind: "colour";
44
+ readonly outright: "--text-subtle";
45
+ }, {
46
+ readonly name: "--vk-fg-subtlest";
47
+ readonly kind: "colour";
48
+ readonly outright: "--text-subtlest";
49
+ }, {
50
+ readonly name: "--vk-fg-brand";
51
+ readonly kind: "colour";
52
+ readonly outright: "--link";
53
+ }, {
54
+ readonly name: "--vk-ground";
55
+ readonly kind: "colour";
56
+ readonly outright: "--surface";
57
+ }, {
58
+ readonly name: "--vk-pressed";
59
+ readonly kind: "colour";
60
+ readonly outright: "--surface-pressed";
61
+ }, {
62
+ readonly name: "--vk-brand-subtlest";
63
+ readonly kind: "colour";
64
+ readonly outright: "--background-brand-subtlest";
65
+ }, {
66
+ readonly name: "--vk-border";
67
+ readonly kind: "colour";
68
+ readonly outright: "--border";
69
+ }, {
70
+ readonly name: "--vk-border-subtle";
71
+ readonly kind: "colour";
72
+ readonly outright: "--border-subtle";
73
+ }, {
74
+ readonly name: "--vk-border-bold";
75
+ readonly kind: "colour";
76
+ readonly outright: "--border-bold";
77
+ }, {
78
+ readonly name: "--vk-border-brand";
79
+ readonly kind: "colour";
80
+ readonly outright: "--border-focused";
81
+ }, {
82
+ readonly name: "--vk-border-accent";
83
+ readonly kind: "colour";
84
+ readonly outright: "--border-brand";
85
+ }, {
86
+ readonly name: "--vk-border-input";
87
+ readonly kind: "colour";
88
+ readonly outright: "--border-input";
89
+ }, {
90
+ readonly name: "--vk-frozen-fade";
91
+ readonly kind: "colour";
92
+ readonly outright: "--pinned-shadow";
93
+ }, {
94
+ readonly name: "--vk-shadow-sm";
95
+ readonly kind: "shadow";
96
+ readonly outright: "--shadow-sm";
97
+ }, {
98
+ readonly name: "--vk-warning";
99
+ readonly kind: "colour";
100
+ readonly outright: "--text-warning";
101
+ }, {
102
+ readonly name: "--vk-warning-bold";
103
+ readonly kind: "colour";
104
+ readonly outright: "--background-warning-bold";
105
+ }, {
106
+ readonly name: "--vk-warning-subtler";
107
+ readonly kind: "colour";
108
+ readonly outright: "--background-warning-subtler";
109
+ }];
@@ -0,0 +1,29 @@
1
+ export const GRID_TOKENS = [
2
+ { name: "--vk-duration-fast", kind: "motion", outright: "--duration-fast" },
3
+ { name: "--vk-font-size-2xs", kind: "size", outright: "--text-2xs" },
4
+ { name: "--vk-font-size-sm", kind: "size", outright: "--text-sm" },
5
+ { name: "--vk-font-weight-medium", kind: "size", outright: "--font-weight-medium" },
6
+ { name: "--vk-spacing", kind: "size", outright: "--spacing" },
7
+ { name: "--vk-border-width", kind: "size", outright: "--border-width" },
8
+ { name: "--vk-focus-width", kind: "size", outright: "--focus-width" },
9
+ { name: "--vk-radius-xs", kind: "size", outright: "--radius-xs" },
10
+ { name: "--vk-radius-sm", kind: "size", outright: "--radius-sm" },
11
+ { name: "--vk-fg", kind: "colour", outright: "--text" },
12
+ { name: "--vk-fg-subtle", kind: "colour", outright: "--text-subtle" },
13
+ { name: "--vk-fg-subtlest", kind: "colour", outright: "--text-subtlest" },
14
+ { name: "--vk-fg-brand", kind: "colour", outright: "--link" },
15
+ { name: "--vk-ground", kind: "colour", outright: "--surface" },
16
+ { name: "--vk-pressed", kind: "colour", outright: "--surface-pressed" },
17
+ { name: "--vk-brand-subtlest", kind: "colour", outright: "--background-brand-subtlest" },
18
+ { name: "--vk-border", kind: "colour", outright: "--border" },
19
+ { name: "--vk-border-subtle", kind: "colour", outright: "--border-subtle" },
20
+ { name: "--vk-border-bold", kind: "colour", outright: "--border-bold" },
21
+ { name: "--vk-border-brand", kind: "colour", outright: "--border-focused" },
22
+ { name: "--vk-border-accent", kind: "colour", outright: "--border-brand" },
23
+ { name: "--vk-border-input", kind: "colour", outright: "--border-input" },
24
+ { name: "--vk-frozen-fade", kind: "colour", outright: "--pinned-shadow" },
25
+ { name: "--vk-shadow-sm", kind: "shadow", outright: "--shadow-sm" },
26
+ { name: "--vk-warning", kind: "colour", outright: "--text-warning" },
27
+ { name: "--vk-warning-bold", kind: "colour", outright: "--background-warning-bold" },
28
+ { name: "--vk-warning-subtler", kind: "colour", outright: "--background-warning-subtler" },
29
+ ];
@@ -28,11 +28,16 @@ export { PICKER_LOOKS, type PickerOptionId } from "../controls/picker/looks.js";
28
28
  export { AVATAR_LOOKS, type AvatarLookOptionId } from "../controls/avatar/looks.js";
29
29
  export { MENU_LIST_CARD_FRAME } from "../controls/menu-list/looks.js";
30
30
  export { PANE_LOOKS, type PaneOptionId } from "../controls/pane/looks.js";
31
+ export { TOOLBAR_BUTTON_LOOKS, type ToolbarButtonOptionId } from "../controls/toolbar-button/looks.js";
31
32
  export { VIEWS_LIST_LOOKS, type ViewsListOptionId } from "../controls/views-list/looks.js";
33
+ export { CUSTOMIZE_LOOKS, type CustomizeOptionId } from "../controls/customize/looks.js";
32
34
  export { MODAL_LOOKS, type ModalOptionId } from "../controls/modal/looks.js";
33
35
  export { ALERT_DIALOG_LOOKS, type AlertDialogOptionId } from "../controls/alert-dialog/looks.js";
34
36
  export { COLLAPSIBLE_LOOKS, type CollapsibleOptionId } from "../controls/collapsible/looks.js";
35
37
  export { ALERT_LOOKS, type AlertOptionId } from "../controls/alert/looks.js";
38
+ export { QUICK_FILTERS_LOOKS, type QuickFiltersOptionId } from "../controls/quick-filters/looks.js";
39
+ export { TOOLBAR_LOOKS, type ToolbarOptionId, type ToolbarPicks } from "../controls/toolbar/looks.js";
40
+ export { BULK_BAR_LOOKS, type BulkBarOptionId, type BulkBarPicks } from "../controls/bulk-bar/looks.js";
36
41
  export { TEXT_EDITOR_LOOKS, type TextEditorLookOptionId } from "../controls/text-editor/looks.js";
37
42
  export { DATE_EDITOR_LOOKS, type DateEditorLookOptionId } from "../controls/date-editor/looks.js";
38
43
  export { COMPOUND_EDITOR_LOOKS, type CompoundEditorOptionId } from "../controls/compound-editor/looks.js";
@@ -24,11 +24,16 @@ export { PICKER_LOOKS } from "../controls/picker/looks.js";
24
24
  export { AVATAR_LOOKS } from "../controls/avatar/looks.js";
25
25
  export { MENU_LIST_CARD_FRAME } from "../controls/menu-list/looks.js";
26
26
  export { PANE_LOOKS } from "../controls/pane/looks.js";
27
+ export { TOOLBAR_BUTTON_LOOKS } from "../controls/toolbar-button/looks.js";
27
28
  export { VIEWS_LIST_LOOKS } from "../controls/views-list/looks.js";
29
+ export { CUSTOMIZE_LOOKS } from "../controls/customize/looks.js";
28
30
  export { MODAL_LOOKS } from "../controls/modal/looks.js";
29
31
  export { ALERT_DIALOG_LOOKS } from "../controls/alert-dialog/looks.js";
30
32
  export { COLLAPSIBLE_LOOKS } from "../controls/collapsible/looks.js";
31
33
  export { ALERT_LOOKS } from "../controls/alert/looks.js";
34
+ export { QUICK_FILTERS_LOOKS } from "../controls/quick-filters/looks.js";
35
+ export { TOOLBAR_LOOKS } from "../controls/toolbar/looks.js";
36
+ export { BULK_BAR_LOOKS } from "../controls/bulk-bar/looks.js";
32
37
  export { TEXT_EDITOR_LOOKS } from "../controls/text-editor/looks.js";
33
38
  export { DATE_EDITOR_LOOKS } from "../controls/date-editor/looks.js";
34
39
  export { COMPOUND_EDITOR_LOOKS } from "../controls/compound-editor/looks.js";
@@ -21,11 +21,16 @@ import { AVATAR_LOOKS } from "../controls/avatar/looks.js";
21
21
  import { LIST_LOOKS } from "../controls/list/looks.js";
22
22
  import { PICKER_LOOKS } from "../controls/picker/looks.js";
23
23
  import { PANE_LOOKS } from "../controls/pane/looks.js";
24
+ import { TOOLBAR_BUTTON_LOOKS } from "../controls/toolbar-button/looks.js";
24
25
  import { VIEWS_LIST_LOOKS } from "../controls/views-list/looks.js";
26
+ import { CUSTOMIZE_LOOKS } from "../controls/customize/looks.js";
25
27
  import { MODAL_LOOKS } from "../controls/modal/looks.js";
26
28
  import { ALERT_DIALOG_LOOKS } from "../controls/alert-dialog/looks.js";
27
29
  import { COLLAPSIBLE_LOOKS } from "../controls/collapsible/looks.js";
28
30
  import { ALERT_LOOKS } from "../controls/alert/looks.js";
31
+ import { QUICK_FILTERS_LOOKS } from "../controls/quick-filters/looks.js";
32
+ import { TOOLBAR_LOOKS } from "../controls/toolbar/looks.js";
33
+ import { BULK_BAR_LOOKS } from "../controls/bulk-bar/looks.js";
29
34
  import { TEXT_EDITOR_LOOKS } from "../controls/text-editor/looks.js";
30
35
  import { DATE_EDITOR_LOOKS } from "../controls/date-editor/looks.js";
31
36
  import { COMPOUND_EDITOR_LOOKS } from "../controls/compound-editor/looks.js";
@@ -55,11 +60,16 @@ export const LOOKS = [
55
60
  PICKER_LOOKS,
56
61
  AVATAR_LOOKS,
57
62
  PANE_LOOKS,
63
+ TOOLBAR_BUTTON_LOOKS,
58
64
  VIEWS_LIST_LOOKS,
65
+ CUSTOMIZE_LOOKS,
59
66
  MODAL_LOOKS,
60
67
  ALERT_DIALOG_LOOKS,
61
68
  COLLAPSIBLE_LOOKS,
62
69
  ALERT_LOOKS,
70
+ QUICK_FILTERS_LOOKS,
71
+ TOOLBAR_LOOKS,
72
+ BULK_BAR_LOOKS,
63
73
  TEXT_EDITOR_LOOKS,
64
74
  DATE_EDITOR_LOOKS,
65
75
  COMPOUND_EDITOR_LOOKS,
@@ -81,6 +81,8 @@ export declare function columnManagedByView<Row>(col: ListColumn<Row>): boolean;
81
81
  * POR-496). Filtering and totals stay `columnManagedByView`'s: a computed
82
82
  * column never filters, sorts, groups or totals. A part column (`partOf`) is placed as its whole is. */
83
83
  export declare function columnPlacedByView<Row>(col: ListColumn<Row>): boolean;
84
+ /** The English of `views.panels.filter-fieldless`: why a saved view cannot filter on a column with no field. ViewKit's
85
+ * builder words it through your messages (VK-884); this is its default. */
84
86
  export declare const VIEW_FIELDLESS_FILTER_REASON = "Not a field of this list; a view cannot filter on it.";
85
87
  /** Reorder the columns a view places while leaving the rest in their declared
86
88
  * slots. Unknown and omitted ids follow resolveColumnOrder's forgiving
@@ -93,7 +93,8 @@ export declare function buildColumnFilters<Row>({ columns, order, declared, icon
93
93
  /** columnId → value → its name, for a relation's, a user's or an actor's known values (POR-1480): a value the
94
94
  * host did not name is not offered unless it is on screen. */
95
95
  knownLabels?: Record<string, Readonly<Record<string, string>>>;
96
- /** An open field's, a relation's, a user's or an actor's row opened: the host may ask for its values. */
96
+ /** An open field's, a relation's, a user's or an actor's row opened, or a filter on the bar holds a value of it the host
97
+ * hasn't named (asked once, VK-883): the host may ask for its values, their names in `knownLabels`. */
97
98
  onValuesWanted?: (columnId: string) => void;
98
99
  /** One row per part of a value, right under its column (VK-57): "Location · Country", "Name · First name"
99
100
  * (`FILTER_PART_ROWS`). Keyed `partKey(columnId, part)` in `rules`, `onRuleChange`, `selectValues`, `knownValues`
@@ -58,8 +58,8 @@ function formatOf(field) {
58
58
  const out = {};
59
59
  if (def.format?.dateStyle)
60
60
  out.dateStyle = def.format.dateStyle;
61
- if (def.format?.withTime)
62
- out.withTime = true;
61
+ if (def.format?.withTime !== undefined)
62
+ out.withTime = def.format.withTime;
63
63
  return Object.keys(out).length ? out : undefined;
64
64
  }
65
65
  case "boolean":