viewkitjs 0.39.0 → 0.40.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 (179) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/MIGRATION.md +25 -0
  3. package/fields/dist/derived.d.ts +7 -0
  4. package/fields/dist/derived.js +4 -0
  5. package/fields/dist/index.d.ts +1 -1
  6. package/fields/dist/index.js +1 -1
  7. package/fields/dist/messages.d.ts +5 -1
  8. package/fields/dist/messages.js +3 -0
  9. package/fields/dist/query/evaluate.d.ts +7 -1
  10. package/fields/dist/query/evaluate.js +8 -5
  11. package/fields/dist/query/filter.d.ts +7 -0
  12. package/fields/dist/query/filter.js +7 -1
  13. package/fields/dist/query/kit.d.ts +3 -2
  14. package/fields/dist/query/kit.js +1 -1
  15. package/fields/dist/query/layer.d.ts +6 -0
  16. package/fields/dist/query/layer.js +3 -0
  17. package/fields/dist/query/number.d.ts +3 -2
  18. package/fields/dist/query/number.js +5 -3
  19. package/fields/dist/query/read-rule.d.ts +1 -1
  20. package/fields/dist/query/read-rule.js +3 -0
  21. package/fields/docs/guides/queries.md +28 -24
  22. package/fields/docs/reference/fields.md +1 -0
  23. package/fields/docs/reference/query.md +6 -4
  24. package/package.json +2 -4
  25. package/postgres/dist/check.js +3 -1
  26. package/postgres/dist/definitions/storage.d.ts +3 -1
  27. package/postgres/dist/definitions/storage.js +3 -1
  28. package/postgres/dist/definitions/stored.js +13 -2
  29. package/postgres/dist/map.d.ts +5 -1
  30. package/postgres/dist/map.js +4 -0
  31. package/postgres/dist/records.js +6 -1
  32. package/postgres/docs/guides/definitions.md +1 -1
  33. package/postgres/docs/guides/field-map.md +2 -2
  34. package/postgres/docs/reference/postgres.md +1 -1
  35. package/views/dist/contract.d.ts +20 -2
  36. package/views/dist/contract.js +27 -0
  37. package/views/dist/controls/avatar.css +1 -1
  38. package/views/dist/controls/customize/map-customize-body.js +1 -1
  39. package/views/dist/controls/field/field.d.ts +2 -14
  40. package/views/dist/controls/field/field.js +4 -9
  41. package/views/dist/controls/filter-editor/filter-editor.d.ts +2 -0
  42. package/views/dist/controls/filter-editor/filter-editor.js +5 -2
  43. package/views/dist/controls/filter-editor/how.d.ts +8 -0
  44. package/views/dist/controls/filter-editor/map-filter-body.d.ts +4 -2
  45. package/views/dist/controls/filter-editor/map-filter-body.js +17 -8
  46. package/views/dist/controls/filter-editor/map-rules.d.ts +4 -3
  47. package/views/dist/controls/filter-editor/map-rules.js +5 -2
  48. package/views/dist/controls/filter-editor/parts.d.ts +14 -1
  49. package/views/dist/controls/filter-editor/parts.js +14 -0
  50. package/views/dist/controls/filter-editor.css +4 -1
  51. package/views/dist/controls/index.d.ts +0 -3
  52. package/views/dist/controls/index.js +0 -3
  53. package/views/dist/controls/input.css +1 -1
  54. package/views/dist/controls/menu-list.css +1 -1
  55. package/views/dist/controls/picker/looks.d.ts +1 -1
  56. package/views/dist/controls/picker.css +2 -2
  57. package/views/dist/controls/press.css +0 -1
  58. package/views/dist/controls/radio/radio.d.ts +1 -1
  59. package/views/dist/controls/radio/radio.js +1 -16
  60. package/views/dist/controls/sheet/bottom-sheet.d.ts +2 -2
  61. package/views/dist/controls/sheet/bottom-sheet.js +31 -24
  62. package/views/dist/controls/text-editor.css +5 -3
  63. package/views/dist/controls/tokens.js +0 -6
  64. package/views/dist/controls/toolbar/toolbar.js +2 -2
  65. package/views/dist/field-row/editors/RowTextEditor.js +4 -1
  66. package/views/dist/filters/duration-bound.d.ts +7 -0
  67. package/views/dist/filters/duration-bound.js +9 -0
  68. package/views/dist/filters/filter-model.d.ts +4 -0
  69. package/views/dist/filters/number-refused.d.ts +8 -0
  70. package/views/dist/filters/number-refused.js +4 -0
  71. package/views/dist/grid/chrome/grid-table-props.d.ts +4 -1
  72. package/views/dist/grid/chrome/useGridTableInteractionModel.js +12 -2
  73. package/views/dist/grid/core/clipboard-model.js +42 -8
  74. package/views/dist/grid/core/commit-model.d.ts +3 -0
  75. package/views/dist/grid/core/editing-controller.d.ts +29 -1
  76. package/views/dist/grid/core/editing-controller.js +142 -12
  77. package/views/dist/grid/core/pending-reconciliation.d.ts +14 -0
  78. package/views/dist/grid/core/pending-reconciliation.js +20 -8
  79. package/views/dist/grid/core/save-path.d.ts +4 -2
  80. package/views/dist/grid/core/save-path.js +1 -1
  81. package/views/dist/grid/core/spreadsheet-operations.js +43 -5
  82. package/views/dist/grid/core/useGridEditing.d.ts +5 -1
  83. package/views/dist/grid/core/useGridEditing.js +4 -4
  84. package/views/dist/grid/core/written-alongside.d.ts +16 -0
  85. package/views/dist/grid/core/written-alongside.js +30 -0
  86. package/views/dist/grid/grid.css +1 -1
  87. package/views/dist/grid/index.d.ts +1 -1
  88. package/views/dist/grid/looks.d.ts +2 -2
  89. package/views/dist/internal/before-paint.d.ts +5 -0
  90. package/views/dist/internal/before-paint.js +17 -0
  91. package/views/dist/internal/field-rows.d.ts +0 -8
  92. package/views/dist/internal/field-rows.js +1 -3
  93. package/views/dist/list/bar-keys.d.ts +3 -0
  94. package/views/dist/list/bar-keys.js +1 -0
  95. package/views/dist/list/buttons/clear-save.js +6 -2
  96. package/views/dist/list/buttons/new.d.ts +1 -1
  97. package/views/dist/list/buttons/new.js +14 -2
  98. package/views/dist/list/buttons/shared.d.ts +7 -1
  99. package/views/dist/list/buttons/shared.js +8 -2
  100. package/views/dist/list/buttons/views.js +6 -4
  101. package/views/dist/list/edits.d.ts +3 -1
  102. package/views/dist/list/layer.d.ts +13 -3
  103. package/views/dist/list/layer.js +13 -3
  104. package/views/dist/list/line.d.ts +5 -2
  105. package/views/dist/list/line.js +11 -3
  106. package/views/dist/list/list.d.ts +7 -1
  107. package/views/dist/list/list.js +2 -2
  108. package/views/dist/list/panels/filter-bar.d.ts +1 -1
  109. package/views/dist/list/panels/filter-bar.js +9 -3
  110. package/views/dist/list/panels/shared.d.ts +3 -2
  111. package/views/dist/list/panels/shared.js +5 -2
  112. package/views/dist/list/root-base.d.ts +2 -1
  113. package/views/dist/list/root-base.js +5 -3
  114. package/views/dist/list/root.d.ts +1 -1
  115. package/views/dist/list/store.d.ts +10 -0
  116. package/views/dist/list/store.js +8 -1
  117. package/views/dist/list/toolbar-model.d.ts +4 -0
  118. package/views/dist/list/toolbar-model.js +19 -1
  119. package/views/dist/list/toolbar.js +2 -1
  120. package/views/dist/list/views.d.ts +1 -1
  121. package/views/dist/list/views.js +4 -1
  122. package/views/dist/looks/index.d.ts +0 -1
  123. package/views/dist/looks/index.js +0 -1
  124. package/views/dist/looks/looks.d.ts +1 -1
  125. package/views/dist/looks/pieces.js +0 -2
  126. package/views/dist/model/column-filters.js +10 -3
  127. package/views/dist/model/view-rules.js +1 -0
  128. package/views/dist/panels/filter/NumberFilterBody.js +6 -8
  129. package/views/dist/panels/labels.js +7 -2
  130. package/views/dist/panels/model.d.ts +3 -0
  131. package/views/dist/panels/react/filter/filter-body.js +5 -1
  132. package/views/dist/panels/react/toolbar/ToolbarBarSorts.js +28 -1
  133. package/views/dist/panels/react/toolbar/ToolbarButton.d.ts +1 -1
  134. package/views/dist/panels/react/toolbar/ToolbarButton.js +5 -3
  135. package/views/dist/panels/react/toolbar/context.d.ts +4 -0
  136. package/views/dist/panels/react/toolbar/context.js +1 -0
  137. package/views/dist/panels/react/toolbar/use-give-way.js +2 -2
  138. package/views/dist/panels/settings/filter-groups.js +5 -0
  139. package/views/dist/panels/settings/input.d.ts +11 -0
  140. package/views/dist/panels/settings/layout.js +26 -0
  141. package/views/dist/panels/settings/person.d.ts +15 -0
  142. package/views/dist/panels/settings/person.js +6 -0
  143. package/views/dist/panels/toolbar/page-resets.js +14 -3
  144. package/views/dist/provider/components.d.ts +12 -3
  145. package/views/dist/styles.css +16 -260
  146. package/views/dist/styles.unlayered.css +16 -260
  147. package/views/docs/contract.md +9 -7
  148. package/views/docs/controls/field.md +1 -1
  149. package/views/docs/guides/looks.md +1 -1
  150. package/views/docs/guides/the-grid.md +4 -2
  151. package/views/docs/guides/toolbar-parts.md +337 -0
  152. package/views/docs/index.md +4 -0
  153. package/views/docs/reference/controls.md +3 -41
  154. package/views/docs/reference/grid.md +4 -3
  155. package/views/docs/reference/list.md +24 -13
  156. package/views/docs/reference/looks.md +12 -15
  157. package/views/docs/reference/panels.md +1 -1
  158. package/views/docs/reference/react.md +3 -3
  159. package/views/docs/reference/views.md +1 -1
  160. package/views/dist/controls/setting-row/looks.d.ts +0 -10
  161. package/views/dist/controls/setting-row/looks.js +0 -22
  162. package/views/dist/controls/setting-row/setting-row.d.ts +0 -102
  163. package/views/dist/controls/setting-row/setting-row.js +0 -135
  164. package/views/dist/controls/setting-row/tokens.d.ts +0 -156
  165. package/views/dist/controls/setting-row/tokens.js +0 -41
  166. package/views/dist/controls/setting-row.css +0 -216
  167. package/views/dist/controls/switch-row/switch-row.d.ts +0 -1
  168. package/views/dist/controls/switch-row/switch-row.js +0 -1
  169. package/views/dist/controls/switch-row/tokens.d.ts +0 -39
  170. package/views/dist/controls/switch-row/tokens.js +0 -12
  171. package/views/dist/controls/switch-row.css +0 -35
  172. package/views/dist/controls/tag-field/tag-field.d.ts +0 -24
  173. package/views/dist/controls/tag-field/tag-field.js +0 -25
  174. package/views/dist/controls/tag-field/tokens.d.ts +0 -23
  175. package/views/dist/controls/tag-field/tokens.js +0 -8
  176. package/views/dist/controls/tag-field.css +0 -32
  177. package/views/docs/controls/setting-row.md +0 -44
  178. package/views/docs/controls/switch-row.md +0 -15
  179. package/views/docs/controls/tag-field.md +0 -11
@@ -22,6 +22,41 @@ function rowWrites(model, row) {
22
22
  function rowRefusal(model) {
23
23
  return (model.messages ?? resolveViewsMessage)({ key: "views.grid.cell-read-only" });
24
24
  }
25
+ function samePlannedValue(a, b) {
26
+ if (a === b)
27
+ return true;
28
+ if (Array.isArray(a) || Array.isArray(b)) {
29
+ return Array.isArray(a) && Array.isArray(b) && a.length === b.length && a.every((item, index) => samePlannedValue(item, b[index]));
30
+ }
31
+ if (a === null || b === null || typeof a !== "object" || typeof b !== "object")
32
+ return false;
33
+ const keys = Object.keys(a);
34
+ return (keys.length === Object.keys(b).length &&
35
+ keys.every((key) => samePlannedValue(a[key], b[key])));
36
+ }
37
+ function foldRecordEdits(edits, refusals, messages) {
38
+ const byCell = new Map();
39
+ for (const edit of edits) {
40
+ const key = JSON.stringify([edit.rowId, edit.columnId]);
41
+ const cell = byCell.get(key);
42
+ if (cell)
43
+ cell.push(edit);
44
+ else
45
+ byCell.set(key, [edit]);
46
+ }
47
+ const kept = new Set();
48
+ let refused = 0;
49
+ for (const cell of byCell.values()) {
50
+ if (cell.every((edit) => samePlannedValue(edit.next, cell[0].next))) {
51
+ kept.add(cell[0]);
52
+ continue;
53
+ }
54
+ for (let i = 0; i < cell.length; i++)
55
+ addRefusal(refusals, messages({ key: "views.grid.paste-two-values" }));
56
+ refused += cell.length;
57
+ }
58
+ return { edits: edits.filter((edit) => kept.has(edit)), refused };
59
+ }
25
60
  export function buildGridCopyMatrix(model, rect) {
26
61
  const matrix = [];
27
62
  for (let r = rect.r1; r <= rect.r2; r++) {
@@ -99,7 +134,7 @@ export function planGridClear(model, rect) {
99
134
  }
100
135
  }
101
136
  return {
102
- edits,
137
+ edits: foldRecordEdits(edits, refusals, model.messages ?? resolveViewsMessage).edits,
103
138
  refusals,
104
139
  required: [...required].sort((a, b) => a - b).map((c) => columnLabel(model.visibleColumns[c])),
105
140
  };
@@ -180,17 +215,19 @@ export function planGridPaste(model, matrix, anchor, activeRect, selectValuesByC
180
215
  maxR = Math.max(maxR, r);
181
216
  maxC = Math.max(maxC, c);
182
217
  }
218
+ const folded = foldRecordEdits(edits, refusals, model.messages ?? resolveViewsMessage);
219
+ skipped += folded.refused;
183
220
  const anchorRowId = model.visibleRowIds[anchor.rowIdx];
184
221
  const anchorColumn = model.visibleColumns[anchor.colIdx];
185
222
  const headRowId = model.visibleRowIds[maxR];
186
223
  const headColumn = model.visibleColumns[maxC];
187
- const selection = !single && edits.length > 0 && anchorRowId && anchorColumn && headRowId && headColumn
224
+ const selection = !single && folded.edits.length > 0 && anchorRowId && anchorColumn && headRowId && headColumn
188
225
  ? {
189
226
  anchor: { rowId: anchorRowId, columnId: anchorColumn.id },
190
227
  head: { rowId: headRowId, columnId: headColumn.id },
191
228
  }
192
229
  : null;
193
- return { edits, skipped, refusals, targetCount: targets.length, selection };
230
+ return { edits: folded.edits, skipped, refusals, targetCount: targets.length, selection };
194
231
  }
195
232
  export function extendGridFillPreview(ranges, targetRowId, visibleRowIds, visibleColIds) {
196
233
  if (!targetRowId || ranges.length === 0)
@@ -295,10 +332,11 @@ export function planGridFill(model, ranges, focused, targetRowId) {
295
332
  });
296
333
  }
297
334
  }
335
+ const folded = foldRecordEdits(edits, refusals, model.messages ?? resolveViewsMessage);
298
336
  return {
299
- edits,
337
+ edits: folded.edits,
300
338
  selectionHead: { rowId: targetRowId, columnId: active.head.columnId },
301
- skipped,
339
+ skipped: skipped + folded.refused,
302
340
  refusals,
303
341
  targetCount: targetIndices.length * (rect.c2 - rect.c1 + 1),
304
342
  };
@@ -1,5 +1,6 @@
1
1
  import type { GridCellCommitFn, GridCellsCommitFn, GridCommitRefusal } from "./commit-model.js";
2
2
  import { type GridCellPos } from "./coordinates.js";
3
+ import { type GridEditingCallbacks } from "./editing-controller.js";
3
4
  import { type GridEditCell, type GridSettlementByRow } from "./editing-model.js";
4
5
  import type { GridWriteStateByRow } from "./write-states.js";
5
6
  /** Whether a commit lays an overlay over its cell: `true` draws the value sent, `"figure"` the number a figure's
@@ -79,4 +80,7 @@ export declare function useGridEditing<Row>(onCellCommit?: GridCellCommitFn<Row>
79
80
  /** Told once per write the app refused (`GridEditingCallbacks.onRefused`). */
80
81
  onRefused?: (refusal: GridCommitRefusal) => void,
81
82
  /** Which columns' sent values are kept for a part edit to build on (`GridEditingCallbacks.keepsSent`). */
82
- keepsSent?: (columnId: string) => boolean): GridEditingApi<Row>;
83
+ keepsSent?: (columnId: string) => boolean,
84
+ /** The other columns a save writes, and an undo's check for a value someone wrote since
85
+ * (`GridEditingCallbacks.alongside`, `changedSince`, `onChangedSince`). */
86
+ more?: Pick<GridEditingCallbacks<Row>, "alongside" | "changedSince" | "onChangedSince">): GridEditingApi<Row>;
@@ -5,22 +5,22 @@ import { forgetGridEdited, isLastEditedGrid } from "./undo-owner.js";
5
5
  import { sameListValue } from "viewkitjs/fields";
6
6
  import { prepareGridCommitCells, } from "./editing-model.js";
7
7
  import { gridFigureOf } from "./clipboard-model.js";
8
- export function useGridEditing(onCellCommit, onCellsCommit, onRefused, keepsSent) {
8
+ export function useGridEditing(onCellCommit, onCellsCommit, onRefused, keepsSent, more) {
9
9
  const [focused, setFocused] = useState(null);
10
10
  const [editing, setEditing] = useState(null);
11
11
  const [pendingByRow, setPendingByRow] = useState(() => new Map());
12
12
  const [settlementByRow, setSettlementByRow] = useState(() => new Map());
13
13
  const [writeStateByRow, setWriteStateByRow] = useState(() => new Map());
14
- const [controller] = useState(() => new GridEditingController({ onCellCommit, onCellsCommit, onRefused, keepsSent }, (pending, settlement) => {
14
+ const [controller] = useState(() => new GridEditingController({ onCellCommit, onCellsCommit, onRefused, keepsSent, ...more }, (pending, settlement) => {
15
15
  setPendingByRow(pending);
16
16
  setSettlementByRow(settlement);
17
17
  }, setWriteStateByRow));
18
18
  useEffect(() => () => forgetGridEdited(controller), [controller]);
19
19
  const isLastEdited = useCallback(() => isLastEditedGrid(controller), [controller]);
20
20
  useEffect(() => {
21
- const callbacks = { onCellCommit, onCellsCommit, onRefused, keepsSent };
21
+ const callbacks = { onCellCommit, onCellsCommit, onRefused, keepsSent, ...more };
22
22
  controller.setCallbacks(callbacks);
23
- }, [controller, onCellCommit, onCellsCommit, onRefused, keepsSent]);
23
+ }, [controller, onCellCommit, onCellsCommit, onRefused, keepsSent, more]);
24
24
  const focusCell = useCallback((rowId, columnId) => {
25
25
  setFocused({ rowId, columnId });
26
26
  setEditing(null);
@@ -0,0 +1,16 @@
1
+ import type { ListColumn } from "../../model/column-schema.js";
2
+ import type { GridCellValuesFn, GridCommitContext } from "./commit-model.js";
3
+ /** What a cell's change writes into the other columns of its row: each one it changes, with what it reads after the
4
+ * change (`value`) and before it (`baseline`). */
5
+ export type GridAlongside<Row> = (row: Row, columnId: string, value: unknown, context: GridCommitContext) => {
6
+ columnId: string;
7
+ value: unknown;
8
+ baseline: unknown;
9
+ }[];
10
+ /** The columns a cell's values write beside its own, read by each column's `editAccessor`, else its `accessor`: each
11
+ * whose field key the values hold, and each whose read they change. A column the values write may read on the row what
12
+ * they write while the grid draws another value over it (an earlier save's, the rows not yet read again): the grid
13
+ * compares with what it draws (`GridEditingController`). A part column draws from its whole and is never named; a
14
+ * `cellValues` that throws names nothing (the save refuses the cell itself), and a read that throws leaves its column
15
+ * out. Undefined with no `cellValues`. */
16
+ export declare function gridWrittenAlongside<Row>(columns: readonly ListColumn<Row>[], cellValues: GridCellValuesFn<Row> | undefined): GridAlongside<Row> | undefined;
@@ -0,0 +1,30 @@
1
+ import { sameListValue } from "viewkitjs/fields";
2
+ import { fieldKeyOf } from "../../model/view-rules.js";
3
+ export function gridWrittenAlongside(columns, cellValues) {
4
+ if (!cellValues)
5
+ return undefined;
6
+ return (row, columnId, value, context) => {
7
+ let values;
8
+ try {
9
+ values = cellValues(row, columnId, value, context);
10
+ }
11
+ catch {
12
+ return [];
13
+ }
14
+ const written = { ...row, ...values };
15
+ return columns.flatMap((col) => {
16
+ const read = col.editAccessor ?? col.accessor;
17
+ if (col.id === columnId || col.partOf || !read)
18
+ return [];
19
+ try {
20
+ const after = read(written);
21
+ const before = read(row);
22
+ const named = Object.hasOwn(values, fieldKeyOf(col)) || !sameListValue(after, before);
23
+ return named ? [{ columnId: col.id, value: after, baseline: before }] : [];
24
+ }
25
+ catch {
26
+ return [];
27
+ }
28
+ });
29
+ };
30
+ }
@@ -1,6 +1,6 @@
1
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
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
3
+ (`:not([data-grid-<option>] *)`), so an app that wears no picks gets the default look, ViewKit's own. First drawn in the Showcase's ViewKit
4
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
5
  the contract: its named parts (data-slot), its states, the frame's options and the `data-kit` mark of ViewKit's own
6
6
  controls, never a class it happens to use; and it reads only the contract's names (grid-tokens.ts, VK_GRID_TOKENS, beside
@@ -16,7 +16,7 @@ export type { GridGroupSortOption } from "./chrome/GridGroupMenu.js";
16
16
  export type { GridGroupMenuPart } from "./chrome/grid-group-menu-parts.js";
17
17
  export type { GridRowOpenedFrom } from "./core/row-opened-from.js";
18
18
  export type { GridCellAt, GridCellPick, GridDeclaredFigure, GridDrawnFigure, GridGroupFigure, GridMenus, GridPages, GroupCountNoun, } from "./chrome/grid-table-props.js";
19
- export type { GridCellCommitFn, GridCellsCommitFn, GridCommitContext, GridCommitOutcome, ListChange, ListSave, } from "./core/commit-model.js";
19
+ export type { GridCellCommitFn, GridCellValuesFn, GridCellsCommitFn, GridCommitContext, GridCommitOutcome, ListChange, ListSave, } from "./core/commit-model.js";
20
20
  export { gridSave, type GridSaveOptions } from "./core/save-path.js";
21
21
  export { deriveGridRelationValues, deriveGridSelectValues } from "./core/column-values.js";
22
22
  export { cellCopyText, cellEditBaseline } from "./core/clipboard-model.js";
@@ -1,8 +1,8 @@
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" | "highlight" | "frame" | "groups" | "names" | "phones" | "typed" | "figures" | "offer" | "width" | "more" | "wait" | "foot" | "add" | "picking";
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
4
+ /** The grid's options and its two looks, attio and portal. Nothing picked wears each option's default, ViewKit's own grid look
5
+ * (frozen on 5 Dec 2026), which differs from Attio's
6
6
  * in ten options: its column lines all, its pinned edge a line, its checkboxes always, picked rows tinted and lined, round
7
7
  * cell corners, a strong hover frame, groups under their own titles, names and phones as the grid draws them, its figures
8
8
  * word first. */
@@ -0,0 +1,5 @@
1
+ /** Whether a view transition is active on the page (`:active-view-transition`), being prepared or running. False where the
2
+ * browser doesn't know the selector, or there is no page. */
3
+ export declare function moving(): boolean;
4
+ /** `update` rendered before the paint (`flushSync`), or as a plain update while the page is moving. */
5
+ export declare function beforePaint(update: () => void): void;
@@ -0,0 +1,17 @@
1
+ import { flushSync } from "react-dom";
2
+ export function moving() {
3
+ if (typeof document === "undefined")
4
+ return false;
5
+ try {
6
+ return document.documentElement.matches(":active-view-transition");
7
+ }
8
+ catch {
9
+ return false;
10
+ }
11
+ }
12
+ export function beforePaint(update) {
13
+ if (moving())
14
+ update();
15
+ else
16
+ flushSync(update);
17
+ }
@@ -9,14 +9,6 @@ export interface FieldRowsCard {
9
9
  slot(id: string): HTMLElement | null;
10
10
  }
11
11
  export declare const FieldRowsCardContext: React.Context<FieldRowsCard | null>;
12
- /** True inside a computer's SettingRows whose Fields option is At the end (VK-985): a Field placed in it is one of its rows, its
13
- * control at the row's end. */
14
- export declare const SettingRowField: React.Context<boolean>;
15
- /** What stands at the end of such a Field row, and the row's name when its label is words: a RadioGroup there draws as a Select
16
- * of its Radios, named by it. */
17
- export declare const AtSettingRowEnd: React.Context<{
18
- name?: string;
19
- } | null>;
20
12
  /** True inside a Field drawn as a row of Field rows: its Input or InputGroup stands typed in place, with no box. */
21
13
  export declare const InFieldRow: React.Context<boolean>;
22
14
  /** A place of its own: what it holds stands as it does anywhere else, no row of a Field rows card around it, whatever holds it.
@@ -1,8 +1,6 @@
1
1
  import * as React from "react";
2
2
  export const FieldRowsCardContext = React.createContext(null);
3
- export const SettingRowField = React.createContext(false);
4
- export const AtSettingRowEnd = React.createContext(null);
5
3
  export const InFieldRow = React.createContext(false);
6
4
  export function OutOfFieldRows({ children }) {
7
- return React.createElement(FieldRowsCardContext.Provider, { value: null }, React.createElement(InFieldRow.Provider, { value: false }, React.createElement(SettingRowField.Provider, { value: false }, React.createElement(AtSettingRowEnd.Provider, { value: null }, children))));
5
+ return React.createElement(FieldRowsCardContext.Provider, { value: null }, React.createElement(InFieldRow.Provider, { value: false }, children));
8
6
  }
@@ -3,3 +3,6 @@ export declare const FILTER_BAR_KEY = "list-filter-bar";
3
3
  /** What a placed filter bar standing by its button places too (not on the door), so a button's `opens="bar"` asks it open (VK-1092), and a rule
4
4
  * held while it is hidden opens it (VK-1106). */
5
5
  export declare const FILTER_BAR_BUTTON_KEY = "list-filter-bar-button";
6
+ /** What a placed filter bar standing always by the app's word places too (not on the door), so Customize's Filter bar row
7
+ * reads it while the person picked none. */
8
+ export declare const FILTER_BAR_ALWAYS_KEY = "list-filter-bar-always";
@@ -1,2 +1,3 @@
1
1
  export const FILTER_BAR_KEY = "list-filter-bar";
2
2
  export const FILTER_BAR_BUTTON_KEY = "list-filter-bar-button";
3
+ export const FILTER_BAR_ALWAYS_KEY = "list-filter-bar-always";
@@ -4,12 +4,16 @@ import { useContext } from "react";
4
4
  import { ToolbarSave } from "../../panels/react/toolbar/ToolbarSave.js";
5
5
  import { useToolbarModel } from "../toolbar-model.js";
6
6
  import { LineItem } from "../line.js";
7
- import { ReadyPiece } from "../ready.js";
7
+ import { ReadyPiece, useReadyParts } from "../ready.js";
8
8
  import { usePartPhone } from "./shared.js";
9
9
  export function ListClearSave(_props) {
10
- const { view, layered, clearable, resetAll } = useToolbarModel({ phone: usePartPhone(), fromRoot: true });
10
+ const phone = usePartPhone();
11
+ const ready = useReadyParts();
12
+ const { view, layered, clearable, resetAll } = useToolbarModel({ phone, fromRoot: true });
11
13
  const piece = useContext(ReadyPiece);
12
14
  const only = piece === "clear" || piece === "save" ? piece : undefined;
15
+ if (phone && !ready)
16
+ return null;
13
17
  return (_jsx(LineItem, { item: SAVE_ITEM, children: _jsx(ToolbarSave, { view: view, layered: layered, onClear: clearable ? resetAll : undefined, ...(only && { only }) }) }));
14
18
  }
15
19
  export const SAVE_ITEM = { key: "save" };
@@ -1,4 +1,4 @@
1
- import type { ReactNode } from "react";
1
+ import { type ReactNode } from "react";
2
2
  import type { ViewsMenuItem } from "../../provider/components.js";
3
3
  import { type ListWords } from "./shared.js";
4
4
  export type ListNewProps = {
@@ -1,9 +1,21 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { createElement } from "react";
3
4
  import { ToolbarNew } from "../../panels/react/toolbar/ToolbarNew.js";
4
5
  import { LineItem } from "../line.js";
5
- import { PartSlot } from "./shared.js";
6
+ import { ToolbarSlotContext, useToolbarSlot } from "../../panels/react/toolbar/context.js";
7
+ import { useReadyParts } from "../ready.js";
8
+ import { PartSlot, usePartPhone } from "./shared.js";
6
9
  export function ListNew({ onAdd, items, label, words }) {
7
- return (_jsx(LineItem, { item: NEW_ITEM, children: _jsx(PartSlot, { words: words, children: _jsx(ToolbarNew, { onAdd: onAdd, items: items, label: label }) }) }));
10
+ const slot = useToolbarSlot();
11
+ const phone = usePartPhone();
12
+ const ready = useReadyParts();
13
+ const foot = phone && !ready && !slot.fold;
14
+ const added = _jsx(ToolbarNew, { onAdd: onAdd, items: items, label: label });
15
+ return (_jsx(LineItem, { item: NEW_ITEM, children: _jsx(PartSlot, { words: words, children: foot ? _jsx(AtFoot, { children: added }) : added }) }));
16
+ }
17
+ function AtFoot({ children }) {
18
+ const slot = useToolbarSlot();
19
+ return createElement(ToolbarSlotContext.Provider, { value: { ...slot, form: "phone", fold: true } }, children);
8
20
  }
9
21
  export const NEW_ITEM = { key: "new", shed: true };
@@ -33,6 +33,9 @@ export declare function PartSlot({ words, fill, form, children, }: {
33
33
  * picked rule standing on the filter bar, where one is placed under the root (else the popover, said once in development). */
34
34
  export type PartPanel<Row> = {
35
35
  phone: boolean;
36
+ /** `phone` where it stands on a phone outside the ready toolbar (whose form is its own): its slot says so, so its panel opens
37
+ * as a sheet, as the ready toolbar's phone line opens it (VK-1094). */
38
+ form: "phone" | undefined;
36
39
  fielded: boolean;
37
40
  model: ToolbarModel<Row>;
38
41
  state: ToolbarPanelState;
@@ -47,7 +50,7 @@ export type PartPanel<Row> = {
47
50
  export declare function usePartPanel<Row>(part: string, name: PartKeyName, opens: ListOpens | "bar" | undefined): PartPanel<Row>;
48
51
  /** A panel part's place: its words over its slot, and the Pane's box where its panel stands in the Pane. */
49
52
  export declare function PartFrame({ panel, words, form, children, }: {
50
- panel: Pick<PartPanel<unknown>, "paneBox">;
53
+ panel: Pick<PartPanel<unknown>, "paneBox" | "form">;
51
54
  words?: ListWords;
52
55
  form?: "phone";
53
56
  children?: ReactNode;
@@ -73,6 +76,9 @@ export type PlacedPanel = {
73
76
  press: () => void;
74
77
  };
75
78
  export declare function usePlacedPanel(name: PartKeyName): PlacedPanel;
79
+ /** What a button of `name`'s places under the root on a phone (not on the door, VK-1094): a placed panel of the same folds behind
80
+ * it there. The ready toolbar's buttons place it too: they edit the same. */
81
+ export declare function partButtonKey(name: PartKeyName): string;
76
82
  /** A button whose panel is placed (VK-1092): no popover, `aria-expanded` while its panel stands, a press as
77
83
  * `PlacedPanel.press`. */
78
84
  export declare function PlacedButton({ part, icon, label, word, changed, panel, }: {
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import { createContext, createElement, useContext, useMemo, useRef } from "react";
3
+ import { createContext, createElement, useContext, useLayoutEffect, useMemo, useRef } from "react";
4
4
  import { ToolbarSlotContext, useToolbarSlot } from "../../panels/react/toolbar/context.js";
5
5
  import { PaneBox, PaneHost } from "../../panels/react/toolbar/pane-host.js";
6
6
  import { SheetHost } from "../../panels/react/toolbar/sheet-host.js";
@@ -76,6 +76,7 @@ export function usePartPanel(part, name, opens) {
76
76
  const host = ready ? (readyHost && ready.hosts[readyHost]) : opens === "sheet" && !phone ? SheetHost : inPane ? PaneHost : undefined;
77
77
  return {
78
78
  phone,
79
+ form: phone && !ready ? "phone" : undefined,
79
80
  fielded,
80
81
  model,
81
82
  state: opened,
@@ -86,7 +87,7 @@ export function usePartPanel(part, name, opens) {
86
87
  };
87
88
  }
88
89
  export function PartFrame({ panel, words, form, children, }) {
89
- const placed = createElement(PartSlot, { words, form }, children);
90
+ const placed = createElement(PartSlot, { words, form: form ?? panel.form }, children);
90
91
  return panel.paneBox === undefined ? placed : createElement(PaneBox.Provider, { value: panel.paneBox }, placed);
91
92
  }
92
93
  export function PressButton({ part, icon, label, changed, word, onPress, }) {
@@ -98,6 +99,8 @@ export function panelId(listId, key) {
98
99
  export function usePlacedPanel(name) {
99
100
  const key = usePartKey(name);
100
101
  const store = useListStore();
102
+ const phone = usePartPhone();
103
+ useLayoutEffect(() => (phone ? store.get().place(partButtonKey(name)) : undefined), [store, phone, name]);
101
104
  const placed = useList((s) => (s.panels.placed[key] ?? 0) > 0);
102
105
  const stands = useList((s) => s.panels.standing[key] ?? null);
103
106
  const press = () => {
@@ -114,6 +117,9 @@ export function usePlacedPanel(name) {
114
117
  };
115
118
  return { placed, stands, press };
116
119
  }
120
+ export function partButtonKey(name) {
121
+ return `button:${name}`;
122
+ }
117
123
  export function PlacedButton({ part, icon, label, word, changed, panel, }) {
118
124
  return (_jsx(ToolbarButton, { part: part, icon: icon, label: label, ...(changed !== undefined && { changed }), ...(word === null && { word }), open: panel.stands === "shown", expanded: panel.stands !== null, onClick: () => panel.press() }));
119
125
  }
@@ -6,11 +6,11 @@ import { withViewMenu } from "../../panels/toolbar/edit-view.js";
6
6
  import { ToolbarViews } from "../../panels/react/toolbar/ToolbarViews.js";
7
7
  import { MoreViews } from "../../panels/react/views-row/more-views.js";
8
8
  import { splitViewAxes } from "../../panels/views-row/model.js";
9
- import { LineForm, LineItem } from "../line.js";
9
+ import { LineItem, useLineForm } from "../line.js";
10
10
  import { ReadyPiece, useReadyParts } from "../ready.js";
11
11
  import { useList } from "../root-base.js";
12
12
  import { useListViewsAxis } from "../views-axis.js";
13
- import { usePlacedPanel } from "./shared.js";
13
+ import { PartSlot, usePartPhone, usePlacedPanel } from "./shared.js";
14
14
  export function ListViews({ views: handed, layouts, shows, menu, moreViews }) {
15
15
  const stored = useListViewsAxis(layouts);
16
16
  const show = useList((s) => showCountsOf(s.view.settings));
@@ -19,10 +19,12 @@ export function ListViews({ views: handed, layouts, shows, menu, moreViews }) {
19
19
  const piece = useContext(ReadyPiece);
20
20
  const layout = ready?.viewsLayout;
21
21
  const placed = usePlacedPanel("views");
22
- const lineForm = useContext(LineForm);
22
+ const lineForm = useLineForm();
23
+ const phone = usePartPhone() && !ready;
23
24
  if (!views)
24
25
  return null;
25
- const drawn = (node) => (moreViews ? _jsx(MoreViews.Provider, { value: moreViews, children: node }) : node);
26
+ const more = (node) => (moreViews ? _jsx(MoreViews.Provider, { value: moreViews, children: node }) : node);
27
+ const drawn = (node) => (phone ? _jsx(PartSlot, { form: "phone", children: more(node) }) : more(node));
26
28
  if (piece === "stacked")
27
29
  return _jsx(LineItem, { item: STACKED_ITEM, children: drawn(_jsx(ToolbarViews, { views: views, viewsLayout: layout, showCounts: show, stacked: true })) });
28
30
  const tabs = shows === "button" ? 0 : viewsTabs(views, layout, lineForm === "phone");
@@ -1,11 +1,13 @@
1
1
  import type { ListRow } from "viewkitjs/fields/query";
2
2
  import type { FieldBinding } from "../fields/binding.js";
3
- import type { GridCellCommitFn, GridCellsCommitFn, ListSave } from "../grid/core/commit-model.js";
3
+ import type { GridCellCommitFn, GridCellValuesFn, GridCellsCommitFn, ListSave } from "../grid/core/commit-model.js";
4
4
  import type { GridEditsSink } from "../grid/core/edits-sink.js";
5
5
  import type { ListStore } from "./store.js";
6
6
  export type ListCommits<Row> = {
7
7
  onCellCommit: GridCellCommitFn<Row>;
8
8
  onCellsCommit: GridCellsCommitFn<Row>;
9
+ /** What a cell's change writes: the grid shows every column it changes as the save is sent. */
10
+ cellValues: GridCellValuesFn<Row>;
9
11
  };
10
12
  /** The root's commits, for the grid under it; null where the list doesn't write. */
11
13
  export declare const ListCommitsContext: import("react").Context<ListCommits<ListRow> | null>;
@@ -1,8 +1,18 @@
1
1
  import type { ListPersonalLayer } from "viewkitjs/fields/query";
2
+ import { type ListPersonSwitch } from "../panels/settings/person.js";
3
+ import type { ListState } from "./store.js";
4
+ export type { ListPersonSwitch };
2
5
  /** A layer with nothing in it, every key present, so a store that merges a patch clears each one. */
3
6
  export declare const EMPTY_LAYER: ListPersonalLayer;
4
- /** Whether a person's layer holds anything that shows: a width, a fold, a look of their own, and on a phone (`phone`) their
5
- * phone's layout. */
6
- export declare function layerHolds(layer: ListPersonalLayer, { phone }?: {
7
+ /** Whether a person's layer holds anything that shows: a width, a fold, a look of their own, on a phone (`phone`) their
8
+ * phone's layout, and their toolbar where it counts (`person`). */
9
+ export declare function layerHolds(layer: ListPersonalLayer, { phone, person }?: {
7
10
  phone?: boolean;
11
+ person?: ListPersonSwitch;
8
12
  }): boolean;
13
+ /** When the filter bar stands for this person: their pick, where the app lets them set it and on a computer; else
14
+ * undefined, the app's own. */
15
+ export declare function personBar(state: ListState, phone: boolean): "added" | "always" | undefined;
16
+ /** The toolbar buttons' words for this person: undefined where the app doesn't let them set them; else their pick,
17
+ * icon and word (`both`) while they picked none. */
18
+ export declare function personWords(state: ListState): "both" | "icon" | "word" | undefined;
@@ -1,7 +1,17 @@
1
- export const EMPTY_LAYER = { look: {}, widths: {}, folded: [], phoneLayout: undefined };
2
- export function layerHolds(layer, { phone = true } = {}) {
1
+ import { toolbarCounts } from "../panels/settings/person.js";
2
+ export const EMPTY_LAYER = { look: {}, widths: {}, folded: [], phoneLayout: undefined, toolbar: undefined };
3
+ export function layerHolds(layer, { phone = true, person = {} } = {}) {
4
+ const toolbar = toolbarCounts(layer, { phone, person });
3
5
  return (Object.keys(layer.look ?? {}).length > 0 ||
4
6
  Object.keys(layer.widths ?? {}).length > 0 ||
5
7
  (layer.folded ?? []).length > 0 ||
6
- (phone && layer.phoneLayout !== undefined));
8
+ (phone && layer.phoneLayout !== undefined) ||
9
+ toolbar.bar ||
10
+ toolbar.words);
11
+ }
12
+ export function personBar(state, phone) {
13
+ return state.panels.personBar && !phone ? state.view.layer.toolbar?.bar : undefined;
14
+ }
15
+ export function personWords(state) {
16
+ return state.panels.personWords ? (state.view.layer.toolbar?.words ?? "both") : undefined;
7
17
  }
@@ -20,8 +20,11 @@ export type LineItemMeta = Pick<ToolbarPlacement, "shed" | "tabs" | "filters" |
20
20
  key: string;
21
21
  menu?: FoldMenu;
22
22
  };
23
- /** A line's form (not on the door): the row's by default, on every screen; the ready toolbar's phone line sets `phone`. */
24
- export declare const LineForm: import("react").Context<ToolbarForm>;
23
+ /** A line's form, where the ready toolbar says it (not on the door); absent, the screen's (`useLineForm`). */
24
+ export declare const LineForm: import("react").Context<ToolbarForm | null>;
25
+ /** The form of a line here (not on the door): the ready toolbar's, else a phone's off the provider's desktop query, else the
26
+ * row's (VK-1094). */
27
+ export declare function useLineForm(): ToolbarForm;
25
28
  /** An item's place in a line the ready toolbar lays out (not on the door, VK-1106): its key in the line (and the name
26
29
  * `data-toolbar-item` reads), its place's words, foot, class, button and panel, and its `shed` where the app's `toolbarParts`
27
30
  * turned it. */
@@ -4,7 +4,13 @@ import { Children, createContext, isValidElement, useCallback, useContext, useLa
4
4
  import { ToolbarRadioProvider } from "../panels/react/toolbar/context.js";
5
5
  import { FoldItem, FoldOverflow, ToolbarSeparator, foldLineMark, useFoldLine, useLineName, } from "../panels/react/toolbar/Toolbar.js";
6
6
  import { cx } from "../internal/cx.js";
7
- export const LineForm = createContext("row");
7
+ import { useDesktop } from "../provider/desktop.js";
8
+ export const LineForm = createContext(null);
9
+ export function useLineForm() {
10
+ const told = useContext(LineForm);
11
+ const desktop = useDesktop();
12
+ return told ?? (desktop ? "row" : "phone");
13
+ }
8
14
  export const LinePlace = createContext(null);
9
15
  export const LineSeed = createContext(null);
10
16
  export const SEED_GAP = "vk-gap";
@@ -61,7 +67,7 @@ function laidOf(seed) {
61
67
  const seededKey = (id) => `.$${id.replace(/[=:]/g, (c) => (c === "=" ? "=0" : "=2"))}`;
62
68
  const childKey = (child, i) => (isValidElement(child) && child.key !== null ? String(child.key) : `vk-child-${i}`);
63
69
  export function ListLine({ kind = "row", more: reshape, overflow, className, children }) {
64
- const form = useContext(LineForm);
70
+ const form = useLineForm();
65
71
  const seed = useContext(LineSeed);
66
72
  const lineKind = seed?.kind ?? (kind === "bar" ? "bar" : "main");
67
73
  const name = useLineName(lineKind);
@@ -150,13 +156,15 @@ export function ListLine({ kind = "row", more: reshape, overflow, className, chi
150
156
  seeded: seed !== null,
151
157
  };
152
158
  const mark = foldLineMark(lineKind, form, name);
153
- return (_jsx(ToolbarRadioProvider, { children: _jsx(LineContext.Provider, { value: value, children: _jsx("div", { ref: setElement, ...mark, className: cx(mark.className, className), children: kids.flatMap((kid, i) => [
159
+ const hides = !seed && !kids.some((kid) => typeof kid === "string" || typeof kid === "number");
160
+ return (_jsx(ToolbarRadioProvider, { children: _jsx(LineContext.Provider, { value: value, children: _jsx("div", { ref: setElement, ...mark, className: cx(mark.className, hides && EMPTY_LINE, className), children: kids.flatMap((kid, i) => [
154
161
  _jsx(LineChild.Provider, { value: keys[i], children: _jsx(LineSeed.Provider, { value: null, children: kid }) }, keys[i]),
155
162
  ...(keys[i] === afterChild
156
163
  ? [_jsx(FoldOverflow, { view: view, rows: value.rows, reshape: reshape, overflow: overflow }, "vk-overflow")]
157
164
  : []),
158
165
  ]) }) }) }));
159
166
  }
167
+ const EMPTY_LINE = "[&:not(:has(>:not([data-toolbar-spacer],[hidden],[data-toolbar-item]:empty)))]:hidden";
160
168
  export function LineItem({ item, children }) {
161
169
  const around = useContext(LineContext);
162
170
  const placed = useContext(LinePlace);
@@ -42,6 +42,12 @@ type ListPropsCommon<Row extends ListRow> = {
42
42
  /** The toolbar's form on a computer, as `ListRoot` takes them. */
43
43
  sortFilter?: "right" | "bar";
44
44
  bar?: "added" | "always";
45
+ /** What the person may set in their own Customize, kept in their layer: `bar`, when the filter bar stands; `words`,
46
+ * the toolbar buttons' words. Off by default. */
47
+ personSettings?: {
48
+ bar?: boolean;
49
+ words?: boolean;
50
+ };
45
51
  /** Every menu as data: `column`, `row` and `group` reach the grid, `view`, `add` and `more` the toolbar. */
46
52
  menus?: ListMenus<Row>;
47
53
  /** Where each of the toolbar's parts stands (`ReadyToolbar`'s `toolbarParts`). */
@@ -70,5 +76,5 @@ type ListPropsCommon<Row extends ListRow> = {
70
76
  bulk?: ListBulkBarProps;
71
77
  className?: string;
72
78
  };
73
- export declare function List<Row extends ListRow>({ id, fields, rows, source, pageSize, save, columns, views, defaults, sortFilter, bar, menus, toolbarParts, customizeIn, link, can, onOpenRow, rowHref, rowWritable, onAdd, addItems, quickFilters, toolbar, grid, bulk, className, }: ListProps<Row>): ReactNode;
79
+ export declare function List<Row extends ListRow>({ id, fields, rows, source, pageSize, save, columns, views, defaults, sortFilter, bar, personSettings, menus, toolbarParts, customizeIn, link, can, onOpenRow, rowHref, rowWritable, onAdd, addItems, quickFilters, toolbar, grid, bulk, className, }: ListProps<Row>): ReactNode;
74
80
  export {};
@@ -9,11 +9,11 @@ import { ListToolbar } from "./toolbar.js";
9
9
  function handed(from) {
10
10
  return Object.fromEntries(Object.entries(from).filter(([, value]) => value !== undefined));
11
11
  }
12
- export function List({ id, fields, rows, source, pageSize, save, columns, views, defaults, sortFilter, bar, menus, toolbarParts, customizeIn, link = true, can, onOpenRow, rowHref, rowWritable, onAdd, addItems, quickFilters, toolbar, grid, bulk, className, }) {
12
+ export function List({ id, fields, rows, source, pageSize, save, columns, views, defaults, sortFilter, bar, personSettings, menus, toolbarParts, customizeIn, link = true, can, onOpenRow, rowHref, rowWritable, onAdd, addItems, quickFilters, toolbar, grid, bulk, className, }) {
13
13
  const toolbarMenus = { ...toolbar?.menus, ...handed({ view: menus?.view, add: menus?.add, more: menus?.more, customize: menus?.customize, sortEditor: menus?.sortEditor, filterEditor: menus?.filterEditor, groupEditor: menus?.groupEditor }) };
14
14
  const gridMenus = { ...grid?.menus, ...handed({ column: menus?.column, row: menus?.row, group: menus?.group, addColumn: menus?.addColumn }) };
15
15
  const [box, setBox] = useState(null);
16
16
  const inPane = (customizeIn ?? toolbar?.customizeIn) === "pane";
17
17
  const gridOf = (_jsx(ListGrid, { ...grid, ...handed({ onOpenRow, rowHref, rowWritable }), menus: gridMenus, children: grid?.children ?? _jsx(ListBulkBar, { ...bulk }) }));
18
- return (_jsx(ListRoot, { id: id, fields: fields, ...(source ? { source, pageSize } : { rows }), quickFilters: quickFilters, save: save, columns: columns, views: views, defaults: defaults, sortFilter: sortFilter, bar: bar, can: can, link: link, children: _jsx(ScreenForms, { children: _jsxs("div", { "data-slot": "vk-list", className: className, children: [_jsx(ListToolbar, { ...toolbar, ...handed({ toolbarParts, onAdd, addItems, quickFilters, customizeIn }), ...(inPane && { paneBox: box }), menus: toolbarMenus }), inPane ? (_jsx("div", { ref: setBox, "data-slot": "vk-list-box", className: "relative isolate flex min-h-0 flex-1 flex-col", children: gridOf })) : (gridOf)] }) }) }));
18
+ return (_jsx(ListRoot, { id: id, fields: fields, ...(source ? { source, pageSize } : { rows }), quickFilters: quickFilters, save: save, columns: columns, views: views, defaults: defaults, sortFilter: sortFilter, bar: bar, personSettings: personSettings, can: can, link: link, children: _jsx(ScreenForms, { children: _jsxs("div", { "data-slot": "vk-list", className: className, children: [_jsx(ListToolbar, { ...toolbar, ...handed({ toolbarParts, onAdd, addItems, quickFilters, customizeIn }), ...(inPane && { paneBox: box }), menus: toolbarMenus }), inPane ? (_jsx("div", { ref: setBox, "data-slot": "vk-list-box", className: "relative isolate flex min-h-0 flex-1 flex-col", children: gridOf })) : (gridOf)] }) }) }));
19
19
  }
@@ -9,4 +9,4 @@ export type ListFilterBarProps = {
9
9
  /** On its region; in a `ListLine` its pieces stand as the line's items, with no region of their own, so it means nothing. */
10
10
  className?: string;
11
11
  };
12
- export declare function ListFilterBar({ shows, sorts, className }: ListFilterBarProps): ReactNode;
12
+ export declare function ListFilterBar({ shows: own, sorts, className }: ListFilterBarProps): ReactNode;