@nocopypaste/vue-grid 0.3.0 → 0.3.2

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 (119) hide show
  1. package/AGENTS.md +249 -84
  2. package/CHANGELOG.md +27 -0
  3. package/README.md +412 -228
  4. package/agent/api.json +89 -89
  5. package/agent/api.md +84 -84
  6. package/agent/grid-config.schema.json +11 -5
  7. package/dist/agent/api.js +89 -89
  8. package/dist/agent/index.js.map +1 -1
  9. package/dist/agent/validate.js.map +1 -1
  10. package/dist/base.css +1 -1
  11. package/dist/components/VGrid.vue_vue_type_script_setup_true_lang.js +1 -1
  12. package/dist/components/VGrid.vue_vue_type_script_setup_true_lang.js.map +1 -1
  13. package/dist/components/VGridCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  14. package/dist/components/VGridColumnMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
  15. package/dist/components/VGridFilterInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  16. package/dist/components/VGridFilterPanel.vue_vue_type_script_setup_true_lang.js +1 -1
  17. package/dist/components/VGridFilterPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  18. package/dist/components/VGridFilterPopover.vue_vue_type_script_setup_true_lang.js.map +1 -1
  19. package/dist/components/VGridGroupCells.vue_vue_type_script_setup_true_lang.js +9 -4
  20. package/dist/components/VGridGroupCells.vue_vue_type_script_setup_true_lang.js.map +1 -1
  21. package/dist/components/VGridGroupRow.vue_vue_type_script_setup_true_lang.js.map +1 -1
  22. package/dist/components/VGridHeader.vue_vue_type_script_setup_true_lang.js.map +1 -1
  23. package/dist/components/VGridMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
  24. package/dist/components/VGridPagination.vue_vue_type_script_setup_true_lang.js +4 -4
  25. package/dist/components/VGridPagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
  26. package/dist/components/VGridPinnedRows.vue_vue_type_script_setup_true_lang.js.map +1 -1
  27. package/dist/components/VGridRows.vue_vue_type_script_setup_true_lang.js +1 -1
  28. package/dist/components/VGridRows.vue_vue_type_script_setup_true_lang.js.map +1 -1
  29. package/dist/components/VGridSearch.vue_vue_type_script_setup_true_lang.js.map +1 -1
  30. package/dist/components/VGridSelectionBanner.vue_vue_type_script_setup_true_lang.js +2 -2
  31. package/dist/components/VGridSelectionBanner.vue_vue_type_script_setup_true_lang.js.map +1 -1
  32. package/dist/components/VGridTotalCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  33. package/dist/composables/useColumnDrag.js.map +1 -1
  34. package/dist/composables/useColumnResize.js.map +1 -1
  35. package/dist/composables/useDataSource.js.map +1 -1
  36. package/dist/composables/useGridExport.js.map +1 -1
  37. package/dist/composables/useGridFilters.js.map +1 -1
  38. package/dist/composables/useGridKeyboard.js +46 -36
  39. package/dist/composables/useGridKeyboard.js.map +1 -1
  40. package/dist/composables/useGridMenus.js.map +1 -1
  41. package/dist/composables/useGridSelection.js.map +1 -1
  42. package/dist/composables/usePinnedRows.js.map +1 -1
  43. package/dist/composables/useRowGrouping.js.map +1 -1
  44. package/dist/composables/useTotals.js.map +1 -1
  45. package/dist/composables/useVirtualRows.js.map +1 -1
  46. package/dist/core/aggregate.js.map +1 -1
  47. package/dist/core/columns.js.map +1 -1
  48. package/dist/core/csv.js.map +1 -1
  49. package/dist/core/filter.js.map +1 -1
  50. package/dist/core/grouping.js.map +1 -1
  51. package/dist/core/pagination.js.map +1 -1
  52. package/dist/core/patch.js.map +1 -1
  53. package/dist/core/selection.js.map +1 -1
  54. package/dist/core/sort.js.map +1 -1
  55. package/dist/core/storage.js.map +1 -1
  56. package/dist/core/value.js.map +1 -1
  57. package/dist/core.css +1 -1
  58. package/dist/features/aggregation.js.map +1 -1
  59. package/dist/features/columnGroups.js.map +1 -1
  60. package/dist/features/columnVisibility.js.map +1 -1
  61. package/dist/features/filtering.js.map +1 -1
  62. package/dist/features/keyboardNavigation.js.map +1 -1
  63. package/dist/features/menus.js.map +1 -1
  64. package/dist/features/rowGrouping.js.map +1 -1
  65. package/dist/features/rowPinning.js.map +1 -1
  66. package/dist/features/selection.js.map +1 -1
  67. package/dist/features/virtualScrolling.js.map +1 -1
  68. package/dist/internal/RenderSlot.js.map +1 -1
  69. package/dist/internal/anchor.js +20 -21
  70. package/dist/internal/anchor.js.map +1 -1
  71. package/dist/internal/context.js.map +1 -1
  72. package/dist/internal/supports.js +2 -2
  73. package/dist/internal/supports.js.map +1 -1
  74. package/dist/internal/touchHold.js.map +1 -1
  75. package/dist/registry/plugin.js.map +1 -1
  76. package/dist/registry/registry.js.map +1 -1
  77. package/dist/renderers/ActionButtonCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  78. package/dist/renderers/ActionsMenuCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  79. package/dist/renderers/BooleanCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  80. package/dist/renderers/ButtonGroupCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  81. package/dist/renderers/ChangeCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  82. package/dist/renderers/ChipCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  83. package/dist/renderers/CodeCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  84. package/dist/renderers/CopyCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  85. package/dist/renderers/DateCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  86. package/dist/renderers/DateTimeCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  87. package/dist/renderers/DetailsCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  88. package/dist/renderers/EditCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  89. package/dist/renderers/IconCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  90. package/dist/renderers/IconToggleCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  91. package/dist/renderers/JsonCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  92. package/dist/renderers/LinkCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  93. package/dist/renderers/MultiLineCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  94. package/dist/renderers/NumberCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  95. package/dist/renderers/StatusCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  96. package/dist/renderers/TextCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  97. package/dist/renderers/ToggleTextCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  98. package/dist/renderers/format.js.map +1 -1
  99. package/dist/renderers/index.js.map +1 -1
  100. package/dist/renderers/options.js.map +1 -1
  101. package/dist/renderers/parts/CopyButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
  102. package/dist/renderers/parts/NumberValue.vue_vue_type_script_setup_true_lang.js.map +1 -1
  103. package/dist/renderers/parts/ValueBadge.vue_vue_type_script_setup_true_lang.js.map +1 -1
  104. package/dist/renderers/parts/icons.js.map +1 -1
  105. package/dist/renderers/parts/useToggleControl.js.map +1 -1
  106. package/dist/renderers/plainText.js.map +1 -1
  107. package/dist/renderers/text.js.map +1 -1
  108. package/dist/theme.css +1 -1
  109. package/dist/types/agent/index.d.ts +2 -2
  110. package/dist/types/internal/anchor.d.ts +10 -2
  111. package/dist/types/internal/supports.d.ts +0 -5
  112. package/dist/types/renderers/NumberCell.vue.d.ts +2 -4
  113. package/dist/types/renderers/index.d.ts +3 -5
  114. package/dist/types/renderers/options.d.ts +45 -0
  115. package/dist/types/renderers/plainText.d.ts +2 -4
  116. package/dist/types/types.d.ts +35 -0
  117. package/dist/vue-grid.css +1 -1
  118. package/llms-full.txt +745 -396
  119. package/package.json +1 -1
package/agent/api.md CHANGED
@@ -1,4 +1,4 @@
1
- # @nocopypaste/vue-grid 0.3.0 — API reference
1
+ # @nocopypaste/vue-grid 0.3.2 — API reference
2
2
 
3
3
  > Generated from the TypeScript sources (`scripts/gen-agent.mjs`). Machine-readable: `agent/api.json`, `agent/grid-config.schema.json`.
4
4
 
@@ -191,16 +191,16 @@ Text, the default renderer (the only one `<VGrid>` bundles): ellipsis, line clam
191
191
  |---|---|---|
192
192
  | `ellipsis` | `boolean` | Single line with ellipsis (full text in a tooltip). |
193
193
  | `lines` | `number` | Clamp to N lines. |
194
- | `maxWidth` | `string` | |
194
+ | `maxWidth` | `string` | CSS max width of the text, e.g. `'16rem'`: longer text wraps or, with `ellipsis`, is cut. |
195
195
  | `preserveNewlines` | `boolean` | Keep line breaks in the value (`white-space: pre-line`). |
196
196
  | `tooltip` | `boolean \| RowFn<string \| undefined>` | `true` = value as tooltip; a function computes it. |
197
197
  | `placeholder` | `string` | Shown when the value is empty. |
198
- | `tone` | `RowOption<Tone \| undefined>` | |
198
+ | `tone` | `RowOption<Tone \| undefined>` | Colour of the text (`success`, `danger`, `warning`, `info`, `neutral`, `accent`), or `(value, row) => tone`. |
199
199
  | `toneMode` | `'text' \| 'fill'` | `text` (default) colours the text; `fill` colours the badge-like background. |
200
- | `bold` | `RowOption<boolean>` | |
200
+ | `bold` | `RowOption<boolean>` | Bold text, for every row or `(value, row) => boolean`. |
201
201
  | `secondary` | `RowFn<string \| null \| undefined>` | Muted text after the value, e.g. a half-time score: `2:1 (1:0)`. |
202
202
  | `badge` | `RowFn<BadgeSpec \| string \| null \| undefined>` | Badge before (default) or after the value. |
203
- | `badgePosition` | `'start' \| 'end'` | |
203
+ | `badgePosition` | `'start' \| 'end'` | Where `badge` goes: `start` (default, before the value) or `end`. |
204
204
  | `icon` | `RowFn<IconSpec \| null \| undefined>` | Icon before the value, e.g. `{ icon: BellIcon, tone: 'warning', label: 'Notify' }`. |
205
205
  | `copyable` | `boolean` | Adds a copy-to-clipboard button; emits `copy` with the copied text. |
206
206
  | `copyValue` | `RowFn<string>` | What gets copied (default: the displayed text). |
@@ -212,7 +212,7 @@ Text that toggles a highlight when clicked. Emits `toggle` (with `clickable`). A
212
212
  | Option | Type | Description |
213
213
  |---|---|---|
214
214
  | `clickable` | `boolean \| RowFn<boolean>` | When true, the text is a button that emits action `toggle`. |
215
- | `highlighted` | `boolean \| RowFn<boolean>` | |
215
+ | `highlighted` | `boolean \| RowFn<boolean>` | Shown as switched on (highlighted, `aria-pressed`), e.g. `(v, row) => row.starred`. |
216
216
  | `placeholder` | `string` | Shown when the value is empty. |
217
217
 
218
218
  ### `number` — `numberRenderer`
@@ -231,10 +231,10 @@ Numbers that always show their sign (+ / −). With `clickable`, emits `click`.
231
231
 
232
232
  | Option | Type | Description |
233
233
  |---|---|---|
234
+ | `signed` | `boolean` | Always show the sign (`+3`, `−2`). Default `true` for `signed-number`; `false` formats like `number`. |
234
235
  | `format` | `Intl.NumberFormatOptions` | `Intl.NumberFormat` options, e.g. `{ maximumFractionDigits: 0 }` or `{ style: 'percent' }`. |
235
236
  | `placeholder` | `string` | Shown when the value is empty. |
236
237
  | `clickable` | `RowOption<boolean>` | Renders the number as a link-style button that emits `click` (drill-down). |
237
- | `signed` | `boolean` | |
238
238
 
239
239
  ### `currency` — `currencyRenderer`
240
240
 
@@ -275,7 +275,7 @@ Date and time, on two lines by default. Align: `start` · filter type: `date`.
275
275
 
276
276
  | Option | Type | Description |
277
277
  |---|---|---|
278
- | `milliseconds` | `boolean` | |
278
+ | `milliseconds` | `boolean` | Show milliseconds in the time (`12:30:05.123`). |
279
279
  | `twoLines` | `boolean` | Date and time on two lines (default true). |
280
280
  | `format` | `Intl.DateTimeFormatOptions` | `Intl.DateTimeFormat` options, e.g. `{ dateStyle: 'medium' }`. |
281
281
  | `placeholder` | `string` | Shown when the value is empty. |
@@ -286,9 +286,9 @@ Yes / no as text labels or icons. Align: `start` · filter type: `boolean`.
286
286
 
287
287
  | Option | Type | Description |
288
288
  |---|---|---|
289
- | `trueLabel` | `string` | |
290
- | `falseLabel` | `string` | |
291
- | `nullLabel` | `string` | |
289
+ | `trueLabel` | `string` | Text for `true` (and its accessible name in icon mode). Default “Yes”. |
290
+ | `falseLabel` | `string` | Text for `false`. Default “No”. |
291
+ | `nullLabel` | `string` | Text for `null` / `undefined`. Default: nothing. |
292
292
  | `display` | `'text' \| 'icon'` | `text` (default): labels. `icon`: a check for true, nothing (or a cross) for false. |
293
293
  | `falseIcon` | `boolean` | In icon mode, show a cross for false (default: nothing). |
294
294
 
@@ -298,9 +298,9 @@ A coloured status badge (tone from a map, a function or a constant). With `click
298
298
 
299
299
  | Option | Type | Description |
300
300
  |---|---|---|
301
- | `tone` | `ToneOption` | |
301
+ | `tone` | `ToneOption` | Badge colour: one tone, a value → tone map (`{ Paid: 'success', Open: 'info' }`), or `(value, row) => tone`. Default `neutral`. |
302
302
  | `label` | `RowFn<string> \| Record<string, string>` | Label from a function, or a value → label map. |
303
- | `dot` | `boolean` | |
303
+ | `dot` | `boolean` | A coloured dot before the label. Default `true`; `false` hides it. |
304
304
  | `variant` | `'soft' \| 'solid' \| 'outline'` | `soft` (default, tinted), `solid` (filled) or `outline`. |
305
305
  | `placeholder` | `string` | Shown when the value is empty. |
306
306
  | `clickable` | `RowOption<boolean>` | Badge becomes a button that emits `click`. |
@@ -311,11 +311,11 @@ A safe link (http(s), mailto, tel only), or a `<RouterLink>` with `to` when vue-
311
311
 
312
312
  | Option | Type | Description |
313
313
  |---|---|---|
314
- | `href` | `RowFn<string \| undefined>` | |
314
+ | `href` | `RowFn<string \| undefined>` | The URL, from the value and row (default: the value). Only http(s), mailto and tel are linked; wins over `to`. |
315
315
  | `to` | `RowFn<RouteTarget \| null \| undefined>` | Router location; rendered with `<RouterLink>` when vue-router is installed, else as an href. |
316
- | `label` | `RowFn<string>` | |
317
- | `target` | `'_self' \| '_blank'` | |
318
- | `tooltip` | `RowFn<string \| undefined>` | |
316
+ | `label` | `RowFn<string>` | Link text (default: the value). |
317
+ | `target` | `'_self' \| '_blank'` | `_blank` opens a new tab (with `rel="noopener noreferrer"`). |
318
+ | `tooltip` | `RowFn<string \| undefined>` | Hover text of the link. |
319
319
 
320
320
  ### `icon` — `iconRenderer`
321
321
 
@@ -325,9 +325,9 @@ An icon component, fixed or picked per row. Align: `center` · filter type: `tex
325
325
  |---|---|---|
326
326
  | `icon` | `Component` | Static icon component. |
327
327
  | `iconFor` | `RowFn<Component \| undefined>` | Picks the icon per row (wins over `icon`). Kept separate because functional components are functions too. |
328
- | `show` | `RowFn<boolean>` | |
329
- | `label` | `string \| RowFn<string>` | |
330
- | `tone` | `Tone \| RowFn<Tone \| undefined>` | |
328
+ | `show` | `RowFn<boolean>` | Show the icon for this row (default: always). A hidden icon keeps its space, so columns stay aligned. |
329
+ | `label` | `string \| RowFn<string>` | Accessible name and tooltip. Without one the icon is decorative. |
330
+ | `tone` | `Tone \| RowFn<Tone \| undefined>` | Icon colour, or `(value, row) => tone`. |
331
331
 
332
332
  ### `json` — `jsonRenderer`
333
333
 
@@ -335,8 +335,8 @@ A button that opens the value as escaped JSON in a dialog. Align: `start` · fil
335
335
 
336
336
  | Option | Type | Description |
337
337
  |---|---|---|
338
- | `label` | `string` | |
339
- | `dialogTitle` | `string \| RowFn<string>` | |
338
+ | `label` | `string` | Text of the button that opens the JSON in a dialog. Default “View”. |
339
+ | `dialogTitle` | `string \| RowFn<string>` | Heading of the dialog (default: the column header). |
340
340
 
341
341
  ### `json-tree` — `jsonTreeRenderer`
342
342
 
@@ -348,7 +348,7 @@ A collapsible tree of nested data. Align: `start` · filter type: `text`.
348
348
  | `maxDepth` | `number` | Deeper nodes are summarised (“3 items”) instead of expanded. Default unlimited. |
349
349
  | `parseNested` | `boolean` | String values that contain JSON are shown as nested trees. |
350
350
  | `collapsed` | `boolean` | Starts hidden behind a toggle button (labelled `toggleLabel`, default “More info”). |
351
- | `toggleLabel` | `string` | |
351
+ | `toggleLabel` | `string` | Text of the `collapsed` toggle. Default “More info”. |
352
352
  | `emptyText` | `string` | Shown for null / empty values. Default: nothing. |
353
353
 
354
354
  ### `actions-menu` — `actionsMenuRenderer`
@@ -358,7 +358,7 @@ A `⋯` button with a keyboard-friendly menu. Emits the chosen item's `name`. Al
358
358
  | Option | Type | Description |
359
359
  |---|---|---|
360
360
  | `actions` | `MenuItem[] \| ((row: any) => MenuItem[])` | Menu items (actions and `{ separator: true }`), or a function of the row. |
361
- | `label` | `string` | |
361
+ | `label` | `string` | Accessible name of the `⋯` button and the menu. Default “Actions”. |
362
362
 
363
363
  ### `action-button` — `actionButtonRenderer`
364
364
 
@@ -366,13 +366,13 @@ One button per row. Emits its `action` (default `click`). Align: `start` · filt
366
366
 
367
367
  | Option | Type | Description |
368
368
  |---|---|---|
369
- | `label` | `string \| RowFn<string>` | |
369
+ | `label` | `string \| RowFn<string>` | Button text (default: the value), or `(value, row) => text`. |
370
370
  | `action` | `string` | Action name emitted on click. Default `click`. |
371
- | `icon` | `Component` | |
372
- | `tone` | `Tone` | |
373
- | `disabled` | `RowFn<boolean>` | |
371
+ | `icon` | `Component` | An icon component before the label. |
372
+ | `tone` | `Tone` | Button colour, e.g. `danger` for a delete button. |
373
+ | `disabled` | `RowFn<boolean>` | Disable the button for some rows: `(value, row) => boolean`. |
374
374
  | `visible` | `RowFn<boolean>` | Hide the button for some rows. |
375
- | `variant` | `ButtonVariant` | |
375
+ | `variant` | `ButtonVariant` | `outline` (default), `solid` or `ghost`. |
376
376
  | `iconOnly` | `boolean` | Only the icon; the label becomes its accessible name and tooltip. |
377
377
 
378
378
  ### `multi-line` — `multiLineRenderer`
@@ -384,7 +384,7 @@ Stacked lines, each with its own style, link, badge, trend or action. Align: `st
384
384
  | `lines` | `RowFn<LineInput[] \| null \| undefined>` | Builds the lines; default: the value itself when it's an array. |
385
385
  | `boldLines` | `number[]` | Indexes of lines to show in bold. |
386
386
  | `ellipsis` | `boolean` | Each line on one row with ellipsis (default true). |
387
- | `target` | `'_self' \| '_blank'` | |
387
+ | `target` | `'_self' \| '_blank'` | `_blank` opens linked lines in a new tab. |
388
388
  | `placeholder` | `string` | Shown when the value is empty. |
389
389
 
390
390
  ### `copy` — `copyRenderer`
@@ -407,9 +407,9 @@ A chip in any colour (readable text picked by contrast), square, circle or pill.
407
407
  |---|---|---|
408
408
  | `color` | `RowOption<string \| null \| undefined>` | Any CSS colour (e.g. from an API); text colour is picked for contrast. |
409
409
  | `tone` | `ToneOption` | Named tone instead of a raw colour. |
410
- | `label` | `RowFn<string>` | |
411
- | `tooltip` | `RowFn<string \| null \| undefined>` | |
412
- | `shape` | `'square' \| 'circle' \| 'pill'` | |
410
+ | `label` | `RowFn<string>` | Chip text (default: the value, or its `label` / `name` / `text` field). A tone map is keyed by this label. |
411
+ | `tooltip` | `RowFn<string \| null \| undefined>` | Hover text (default: the value's `description` field, if any). |
412
+ | `shape` | `'square' \| 'circle' \| 'pill'` | `square` (default), `circle` or `pill`. |
413
413
  | `size` | `string` | Box size for square/circle. Default `1.75rem`. |
414
414
  | `placeholder` | `string` | Shown when the value is empty. |
415
415
 
@@ -420,7 +420,7 @@ A controlled checkbox, with a tooltip when disabled. Emits `change` with the req
420
420
  | Option | Type | Description |
421
421
  |---|---|---|
422
422
  | `checked` | `RowFn<boolean>` | Default: the value is truthy. |
423
- | `disabled` | `RowOption<boolean>` | |
423
+ | `disabled` | `RowOption<boolean>` | Disabled for every row, or `(value, row) => boolean`. |
424
424
  | `disabledReason` | `RowFn<string \| null \| undefined>` | Tooltip explaining why it's disabled. |
425
425
  | `label` | `RowOption<string>` | Accessible name. Default: the column header. |
426
426
 
@@ -431,7 +431,7 @@ A controlled on / off switch. Emits `change` with the requested state. Align: `c
431
431
  | Option | Type | Description |
432
432
  |---|---|---|
433
433
  | `checked` | `RowFn<boolean>` | Default: the value is truthy. |
434
- | `disabled` | `RowOption<boolean>` | |
434
+ | `disabled` | `RowOption<boolean>` | Disabled for every row, or `(value, row) => boolean`. |
435
435
  | `disabledReason` | `RowFn<string \| null \| undefined>` | Tooltip explaining why it's disabled. |
436
436
  | `label` | `RowOption<string>` | Accessible name. Default: the column header. |
437
437
 
@@ -443,7 +443,7 @@ One selected row across the column (controlled). Emits `select`. Align: `center`
443
443
  |---|---|---|
444
444
  | `name` | `string` | Radio group name. Default: the column key. |
445
445
  | `checked` | `RowFn<boolean>` | Default: the value is truthy. |
446
- | `disabled` | `RowOption<boolean>` | |
446
+ | `disabled` | `RowOption<boolean>` | Disabled for every row, or `(value, row) => boolean`. |
447
447
  | `disabledReason` | `RowFn<string \| null \| undefined>` | Tooltip explaining why it's disabled. |
448
448
  | `label` | `RowOption<string>` | Accessible name. Default: the column header. |
449
449
 
@@ -456,8 +456,8 @@ A value with an edit button, for opening your own editor. Emits `edit`. Align: `
456
456
  | `format` | `RowFn<string>` | Text shown next to the edit button (default: the value). |
457
457
  | `placeholder` | `string` | Shown when the value is empty. |
458
458
  | `label` | `string` | Accessible name of the button. Default “Edit”. |
459
- | `disabled` | `RowOption<boolean>` | |
460
- | `bold` | `boolean` | |
459
+ | `disabled` | `RowOption<boolean>` | Disables the edit button, for every row or `(value, row) => boolean`. |
460
+ | `bold` | `boolean` | Bold text. |
461
461
 
462
462
  ### `image` — `imageRenderer`
463
463
 
@@ -467,10 +467,10 @@ A thumbnail, with a placeholder when empty or broken. Align: `center` · filter
467
467
  |---|---|---|
468
468
  | `src` | `RowFn<string \| null \| undefined>` | Default: the value. |
469
469
  | `baseUrl` | `string` | Prefixed to relative paths (e.g. a CDN). |
470
- | `alt` | `RowOption<string>` | |
470
+ | `alt` | `RowOption<string>` | Alternative text (default: none, a decorative image), or `(value, row) => text`. |
471
471
  | `size` | `string` | Default `2.5rem`. |
472
- | `fit` | `'contain' \| 'cover'` | |
473
- | `shape` | `'rounded' \| 'circle' \| 'square'` | |
472
+ | `fit` | `'contain' \| 'cover'` | `contain` (default) shows the whole image; `cover` fills the box and crops. |
473
+ | `shape` | `'rounded' \| 'circle' \| 'square'` | `rounded` (default), `circle` (avatars) or `square`. |
474
474
 
475
475
  ### `code` — `codeRenderer`
476
476
 
@@ -489,7 +489,7 @@ Several buttons, fixed or per row. Emits the clicked button's `name`. Align: `st
489
489
 
490
490
  | Option | Type | Description |
491
491
  |---|---|---|
492
- | `buttons` | `ButtonSpec[] \| ((row: any) => ButtonSpec[])` | |
492
+ | `buttons` | `ButtonSpec[] \| ((row: any) => ButtonSpec[])` | The buttons (`{ name, label, tone?, variant?, disabled?, icon?, hidden? }`), or a function of the row. A click emits the button's `name`. |
493
493
 
494
494
  ### `icon-toggle` — `iconToggleRenderer`
495
495
 
@@ -502,7 +502,7 @@ A star / flag style on-off button (controlled). Emits `toggle`. Align: `center`
502
502
  | `activeIcon` | `Component` | Default: a filled star (or `icon`). |
503
503
  | `label` | `RowOption<string>` | Accessible name. Default “Toggle”. |
504
504
  | `activeTone` | `Tone` | Tone when active. Default `warning`. |
505
- | `disabled` | `RowOption<boolean>` | |
505
+ | `disabled` | `RowOption<boolean>` | Disabled for every row, or `(value, row) => boolean`. |
506
506
 
507
507
  ### `details` — `detailsRenderer`
508
508
 
@@ -511,7 +511,7 @@ A status badge plus an info button with an anchored popover of label / value row
511
511
  | Option | Type | Description |
512
512
  |---|---|---|
513
513
  | `tone` | `ToneOption` | Summary badge tone, like `status`. |
514
- | `label` | `RowFn<string>` | |
514
+ | `label` | `RowFn<string>` | Badge text (default: the value). |
515
515
  | `items` | `RowFn<DetailItem[] \| null \| undefined>` | Popover rows. Empty → no info button. |
516
516
  | `title` | `RowOption<string>` | Popover heading. Default: the column header. |
517
517
  | `triggerLabel` | `string` | Accessible name of the info button. Default “Details”. |
@@ -523,7 +523,7 @@ The first items of a list, with a “+N more” toggle. Emits `expand`. Align: `
523
523
  | Option | Type | Description |
524
524
  |---|---|---|
525
525
  | `items` | `RowFn<unknown[] \| null \| undefined>` | Default: the value when it's an array. |
526
- | `itemLabel` | `RowFn<string>` | |
526
+ | `itemLabel` | `RowFn<string>` | Text of one item, `(item, row) => string` (default: the item, objects as JSON). |
527
527
  | `max` | `number` | Items shown before “+N more”. Default 1. |
528
528
  | `placeholder` | `string` | Shown when the value is empty. |
529
529
 
@@ -541,8 +541,8 @@ The first items of a list, with a “+N more” toggle. Emits `expand`. Align: `
541
541
 
542
542
  | Field | Type | Description |
543
543
  |---|---|---|
544
- | `top`? | `RowKey[]` | |
545
- | `bottom`? | `RowKey[]` | |
544
+ | `top`? | `RowKey[]` | Keys of the rows pinned above the body, in display order. |
545
+ | `bottom`? | `RowKey[]` | Keys of the rows pinned below the body, in display order. |
546
546
 
547
547
  ### `ColumnState`
548
548
 
@@ -557,14 +557,14 @@ The first items of a list, with a “+N more” toggle. Emits `expand`. Align: `
557
557
 
558
558
  | Field | Type | Description |
559
559
  |---|---|---|
560
- | `key` | `string` | |
561
- | `dir` | `SortDir` | |
560
+ | `key` | `string` | The sorted column’s `key`. |
561
+ | `dir` | `SortDir` | `asc` or `desc`. |
562
562
 
563
563
  ### `ColumnFilterOptions`
564
564
 
565
565
  | Field | Type | Description |
566
566
  |---|---|---|
567
- | `type`? | `FilterType` | |
567
+ | `type`? | `FilterType` | `text`, `number`, `date`, `boolean` or `set` (default: from the renderer). |
568
568
  | `options`? | `readonly FilterOption[] \| FilterOptionsLoader` | Choices for a `set` filter: a list, or a loader called with the search text (e.g. from a backend — honour `signal`). Default: distinct values from the rows. |
569
569
  | `placeholder`? | `string` | Placeholder of the filter-row input. |
570
570
 
@@ -572,8 +572,8 @@ The first items of a list, with a “+N more” toggle. Emits `expand`. Align: `
572
572
 
573
573
  | Field | Type | Description |
574
574
  |---|---|---|
575
- | `value` | `unknown` | |
576
- | `label`? | `string` | |
575
+ | `value` | `unknown` | The value rows are matched against. |
576
+ | `label`? | `string` | Text shown for the option (default: the value). |
577
577
  | `count`? | `number` | Shown next to the option (e.g. number of rows). |
578
578
 
579
579
  ### `MenuAction`
@@ -581,68 +581,68 @@ The first items of a list, with a “+N more” toggle. Emits `expand`. Align: `
581
581
  | Field | Type | Description |
582
582
  |---|---|---|
583
583
  | `name` | `string` | Emitted as the action name. |
584
- | `label` | `string` | |
585
- | `disabled`? | `boolean` | |
586
- | `tone`? | `MenuTone` | |
587
- | `icon`? | `Component` | |
584
+ | `label` | `string` | Text of the item. |
585
+ | `disabled`? | `boolean` | Shown but can’t be chosen. |
586
+ | `tone`? | `MenuTone` | Colour, e.g. `danger` for a delete item. |
587
+ | `icon`? | `Component` | An icon component before the label. |
588
588
  | `hint`? | `string` | Shown right-aligned, e.g. a shortcut hint. |
589
589
 
590
590
  ### `CellContext`
591
591
 
592
592
  | Field | Type | Description |
593
593
  |---|---|---|
594
- | `row` | `T` | |
595
- | `rowKey` | `RowKey` | |
596
- | `column` | `ColumnDef<T>` | |
597
- | `value` | `unknown` | |
594
+ | `row` | `T` | The row the cell belongs to. |
595
+ | `rowKey` | `RowKey` | The row’s key (`row-key`). |
596
+ | `column` | `ColumnDef<T>` | The cell’s column definition. |
597
+ | `value` | `unknown` | The cell value (`value` / `field` / `key`). |
598
598
 
599
599
  ### `CellActionEvent`
600
600
 
601
601
  | Field | Type | Description |
602
602
  |---|---|---|
603
- | `name` | `string` | |
604
- | `payload` | `unknown` | |
605
- | `row` | `T` | |
606
- | `rowKey` | `RowKey` | |
607
- | `column` | `ColumnDef<T>` | |
603
+ | `name` | `string` | The action, e.g. `click`, `change`, `toggle`, `copy` or a button’s `name`. |
604
+ | `payload` | `unknown` | Action data: the new value of a toggle or input, the copied text, a line index… |
605
+ | `row` | `T` | The row the cell belongs to. |
606
+ | `rowKey` | `RowKey` | The row’s key (`row-key`). |
607
+ | `column` | `ColumnDef<T>` | The cell’s column definition. |
608
608
 
609
609
  ### `CellClickEvent`
610
610
 
611
611
  | Field | Type | Description |
612
612
  |---|---|---|
613
- | `row` | `T` | |
614
- | `rowKey` | `RowKey` | |
615
- | `column` | `ColumnDef<T>` | |
616
- | `value` | `unknown` | |
617
- | `event` | `MouseEvent \| KeyboardEvent` | |
613
+ | `row` | `T` | The row the cell belongs to. |
614
+ | `rowKey` | `RowKey` | The row’s key (`row-key`). |
615
+ | `column` | `ColumnDef<T>` | The clicked column (one with `clickable: true`). |
616
+ | `value` | `unknown` | The cell value. |
617
+ | `event` | `MouseEvent \| KeyboardEvent` | The DOM event of the click (Enter on a focused cell clicks it too). |
618
618
 
619
619
  ### `ContextActionEvent`
620
620
 
621
621
  | Field | Type | Description |
622
622
  |---|---|---|
623
- | `name` | `string` | |
624
- | `item` | `MenuAction` | |
625
- | `row` | `T` | |
626
- | `rowKey` | `RowKey` | |
627
- | `column` | `ColumnDef<T>` | |
628
- | `value` | `unknown` | |
623
+ | `name` | `string` | The chosen item’s `name`. |
624
+ | `item` | `MenuAction` | The chosen item. |
625
+ | `row` | `T` | The row the cell belongs to. |
626
+ | `rowKey` | `RowKey` | The row’s key (`row-key`). |
627
+ | `column` | `ColumnDef<T>` | The cell’s column definition. |
628
+ | `value` | `unknown` | The cell value (`value` / `field` / `key`). |
629
629
 
630
630
  ### `HeaderActionEvent`
631
631
 
632
632
  | Field | Type | Description |
633
633
  |---|---|---|
634
- | `name` | `string` | |
635
- | `item` | `MenuAction` | |
636
- | `column` | `ColumnDef<T>` | |
634
+ | `name` | `string` | The chosen item’s `name`. |
635
+ | `item` | `MenuAction` | The chosen item. |
636
+ | `column` | `ColumnDef<T>` | The column whose header menu it was. |
637
637
 
638
638
  ### `VueGridConfig`
639
639
 
640
640
  | Field | Type | Description |
641
641
  |---|---|---|
642
- | `renderers`? | `CellRendererDefinition[]` | |
642
+ | `renderers`? | `CellRendererDefinition[]` | Renderers every grid can use by name (`renderer: 'currency'`); `allRenderers` for all of them. |
643
643
  | `features`? | `readonly GridFeature[]` | Features every grid in the app gets (`allFeatures` for all of them). |
644
- | `locale`? | `string` | |
645
- | `currency`? | `string` | |
646
- | `timeZone`? | `string` | |
647
- | `density`? | `Density` | |
644
+ | `locale`? | `string` | Default locale for number and date renderers (default: the browser’s). |
645
+ | `currency`? | `string` | Default ISO 4217 currency for currency renderers. |
646
+ | `timeZone`? | `string` | Default IANA time zone for date renderers and date filters. |
647
+ | `density`? | `Density` | Default density: `compact`, `cozy` (default) or `comfortable`. |
648
648
 
@@ -274,9 +274,12 @@
274
274
  "type": "object",
275
275
  "properties": {
276
276
  "key": {
277
- "type": "string"
277
+ "type": "string",
278
+ "description": "The sorted column’s `key`."
278
279
  },
279
- "dir": {}
280
+ "dir": {
281
+ "description": "`asc` or `desc`."
282
+ }
280
283
  },
281
284
  "required": [
282
285
  "key",
@@ -373,7 +376,8 @@
373
376
  "string",
374
377
  "number"
375
378
  ]
376
- }
379
+ },
380
+ "description": "Keys of the rows pinned above the body, in display order."
377
381
  },
378
382
  "bottom": {
379
383
  "type": "array",
@@ -382,7 +386,8 @@
382
386
  "string",
383
387
  "number"
384
388
  ]
385
- }
389
+ },
390
+ "description": "Keys of the rows pinned below the body, in display order."
386
391
  }
387
392
  },
388
393
  "required": [],
@@ -581,7 +586,8 @@
581
586
  "date",
582
587
  "boolean",
583
588
  "set"
584
- ]
589
+ ],
590
+ "description": "`text`, `number`, `date`, `boolean` or `set` (default: from the renderer)."
585
591
  },
586
592
  "options": {
587
593
  "description": "Choices for a `set` filter: a list, or a loader called with the search text (e.g. from a backend — honour `signal`). Default: distinct values from the rows."