@object-ui/types 3.0.3 → 3.1.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 (85) hide show
  1. package/dist/app.d.ts +217 -0
  2. package/dist/app.d.ts.map +1 -1
  3. package/dist/app.js +85 -1
  4. package/dist/complex.d.ts +118 -0
  5. package/dist/complex.d.ts.map +1 -1
  6. package/dist/data-display.d.ts +105 -1
  7. package/dist/data-display.d.ts.map +1 -1
  8. package/dist/data.d.ts +45 -0
  9. package/dist/data.d.ts.map +1 -1
  10. package/dist/designer.d.ts +197 -35
  11. package/dist/designer.d.ts.map +1 -1
  12. package/dist/designer.js +11 -1
  13. package/dist/index.d.ts +21 -10
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +2 -0
  16. package/dist/layout.d.ts +39 -2
  17. package/dist/layout.d.ts.map +1 -1
  18. package/dist/navigation.d.ts +27 -0
  19. package/dist/navigation.d.ts.map +1 -1
  20. package/dist/objectql.d.ts +641 -7
  21. package/dist/objectql.d.ts.map +1 -1
  22. package/dist/record-components.d.ts +160 -0
  23. package/dist/record-components.d.ts.map +1 -0
  24. package/dist/record-components.js +8 -0
  25. package/dist/reports.d.ts +37 -0
  26. package/dist/reports.d.ts.map +1 -1
  27. package/dist/theme.d.ts +5 -0
  28. package/dist/theme.d.ts.map +1 -1
  29. package/dist/views.d.ts +257 -3
  30. package/dist/views.d.ts.map +1 -1
  31. package/dist/workflow.d.ts +198 -0
  32. package/dist/workflow.d.ts.map +1 -1
  33. package/dist/zod/app.zod.d.ts +42 -2
  34. package/dist/zod/app.zod.d.ts.map +1 -1
  35. package/dist/zod/app.zod.js +61 -1
  36. package/dist/zod/complex.zod.d.ts +122 -0
  37. package/dist/zod/complex.zod.d.ts.map +1 -1
  38. package/dist/zod/complex.zod.js +57 -0
  39. package/dist/zod/data-display.zod.d.ts +4 -0
  40. package/dist/zod/data-display.zod.d.ts.map +1 -1
  41. package/dist/zod/data-display.zod.js +2 -0
  42. package/dist/zod/form.zod.d.ts +6 -6
  43. package/dist/zod/index.zod.d.ts +364 -41
  44. package/dist/zod/index.zod.d.ts.map +1 -1
  45. package/dist/zod/index.zod.js +2 -2
  46. package/dist/zod/layout.zod.d.ts +6 -6
  47. package/dist/zod/navigation.zod.d.ts +58 -12
  48. package/dist/zod/navigation.zod.d.ts.map +1 -1
  49. package/dist/zod/navigation.zod.js +21 -9
  50. package/dist/zod/objectql.zod.d.ts +515 -27
  51. package/dist/zod/objectql.zod.d.ts.map +1 -1
  52. package/dist/zod/objectql.zod.js +162 -0
  53. package/dist/zod/reports.zod.d.ts +38 -38
  54. package/dist/zod/views.zod.d.ts +161 -7
  55. package/dist/zod/views.zod.d.ts.map +1 -1
  56. package/dist/zod/views.zod.js +21 -2
  57. package/package.json +2 -2
  58. package/src/__tests__/app-creation-types.test.ts +177 -0
  59. package/src/__tests__/dashboard-config.test.ts +208 -0
  60. package/src/__tests__/examples-metadata-compliance.test.ts +264 -0
  61. package/src/__tests__/navigation-model.test.ts +406 -0
  62. package/src/__tests__/p1-spec-alignment.test.ts +660 -0
  63. package/src/__tests__/p2-spec-exports.test.ts +312 -0
  64. package/src/__tests__/phase2-schemas.test.ts +108 -0
  65. package/src/app.ts +377 -0
  66. package/src/complex.ts +120 -0
  67. package/src/data-display.ts +107 -0
  68. package/src/data.ts +49 -0
  69. package/src/designer.ts +219 -30
  70. package/src/index.ts +192 -3
  71. package/src/layout.ts +55 -2
  72. package/src/navigation.ts +20 -0
  73. package/src/objectql.ts +757 -8
  74. package/src/record-components.ts +188 -0
  75. package/src/reports.ts +43 -0
  76. package/src/theme.ts +6 -0
  77. package/src/views.ts +275 -3
  78. package/src/workflow.ts +226 -0
  79. package/src/zod/app.zod.ts +74 -1
  80. package/src/zod/complex.zod.ts +59 -0
  81. package/src/zod/data-display.zod.ts +2 -0
  82. package/src/zod/index.zod.ts +5 -0
  83. package/src/zod/navigation.zod.ts +22 -10
  84. package/src/zod/objectql.zod.ts +167 -0
  85. package/src/zod/views.zod.ts +21 -2
package/src/objectql.ts CHANGED
@@ -78,8 +78,32 @@ import type {
78
78
  PaginationConfig,
79
79
  GroupingConfig,
80
80
  RowColorConfig,
81
+ GalleryConfig,
82
+ TimelineConfig,
81
83
  } from '@objectstack/spec/ui';
82
84
 
85
+ /**
86
+ * Gallery configuration extended with legacy fields for backward compatibility.
87
+ * Spec fields from GalleryConfigSchema take priority; legacy fields serve as fallbacks.
88
+ */
89
+ export type ListViewGalleryConfig = GalleryConfig & {
90
+ /** Legacy: image field (deprecated, use coverField) */
91
+ imageField?: string;
92
+ /** Legacy: subtitle field */
93
+ subtitleField?: string;
94
+ [key: string]: any;
95
+ };
96
+
97
+ /**
98
+ * Timeline configuration extended with legacy fields for backward compatibility.
99
+ * Spec fields from TimelineConfigSchema take priority; legacy fields serve as fallbacks.
100
+ */
101
+ export type ListViewTimelineConfig = TimelineConfig & {
102
+ /** Legacy: date field (deprecated, use startDateField) */
103
+ dateField?: string;
104
+ [key: string]: any;
105
+ };
106
+
83
107
  /**
84
108
  * Kanban Configuration
85
109
  * Canonical definition from @objectstack/spec/ui (KanbanConfigSchema).
@@ -137,6 +161,95 @@ export interface SortConfig {
137
161
  order: 'asc' | 'desc';
138
162
  }
139
163
 
164
+ // ============================================================================
165
+ // QuickFilter Types — Dual-format support
166
+ // ============================================================================
167
+
168
+ /**
169
+ * ObjectUI-native QuickFilter format.
170
+ * Each quick filter renders as a toggle button with explicit id, label, and filter conditions.
171
+ */
172
+ export interface ObjectUIQuickFilterItem {
173
+ /** Unique identifier for this quick filter */
174
+ id: string;
175
+ /** Display label for the filter button */
176
+ label: string;
177
+ /** Filter conditions to apply when activated */
178
+ filters: Array<any[] | string>;
179
+ /** Icon name (Lucide icon identifier) */
180
+ icon?: string;
181
+ /** Default active state */
182
+ defaultActive?: boolean;
183
+ }
184
+
185
+ /**
186
+ * Spec-format QuickFilter item (from @objectstack/spec).
187
+ * A single field-level predicate: `{ field, operator, value }`.
188
+ * Automatically converted to ObjectUI format at runtime.
189
+ */
190
+ export interface SpecQuickFilterItem {
191
+ /** Field name to filter on */
192
+ field: string;
193
+ /** Filter operator (e.g. 'eq', 'equals', 'contains', 'gt', etc.) */
194
+ operator: string;
195
+ /** Value to compare against */
196
+ value: unknown;
197
+ /** Optional display label (auto-generated if omitted) */
198
+ label?: string;
199
+ /** Icon name (Lucide icon identifier) */
200
+ icon?: string;
201
+ /** Default active state */
202
+ defaultActive?: boolean;
203
+ }
204
+
205
+ /**
206
+ * Union type for QuickFilter items — accepts both ObjectUI and Spec formats.
207
+ */
208
+ export type QuickFilterItem = ObjectUIQuickFilterItem | SpecQuickFilterItem;
209
+
210
+ // ============================================================================
211
+ // ConditionalFormatting Types — Dual-format support
212
+ // ============================================================================
213
+
214
+ /**
215
+ * ObjectUI-native ConditionalFormatting rule.
216
+ * Uses field/operator/value for declarative comparisons.
217
+ */
218
+ export interface ObjectUIConditionalFormattingRule {
219
+ /** Field name to evaluate */
220
+ field: string;
221
+ /** Comparison operator */
222
+ operator: 'equals' | 'not_equals' | 'contains' | 'greater_than' | 'less_than' | 'in';
223
+ /** Value to compare against */
224
+ value: unknown;
225
+ /** CSS-compatible background color */
226
+ backgroundColor?: string;
227
+ /** CSS-compatible text color */
228
+ textColor?: string;
229
+ /** CSS-compatible border color */
230
+ borderColor?: string;
231
+ /** Template expression override (e.g., '${data.amount > 1000}') */
232
+ expression?: string;
233
+ }
234
+
235
+ /**
236
+ * Spec-format ConditionalFormatting rule (from @objectstack/spec).
237
+ * Uses a plain expression string with a style map.
238
+ * Automatically evaluated at runtime via ExpressionEvaluator.
239
+ */
240
+ export interface SpecConditionalFormattingRule {
241
+ /** Plain condition expression (e.g., "status == 'overdue'") or template expression (e.g., "${data.amount > 1000}") */
242
+ condition: string;
243
+ /** Style map to apply when condition matches (e.g., { backgroundColor: '#fee2e2', color: '#991b1b' }) */
244
+ style: Record<string, string>;
245
+ }
246
+
247
+ /**
248
+ * Union type for ConditionalFormatting rules — accepts both ObjectUI and Spec formats.
249
+ * Rules are evaluated in order; first matching rule wins.
250
+ */
251
+ export type ConditionalFormattingRule = ObjectUIConditionalFormattingRule | SpecConditionalFormattingRule;
252
+
140
253
  /**
141
254
  * ObjectGrid Schema
142
255
  * A specialized grid component that automatically fetches and displays data from ObjectQL objects.
@@ -384,6 +497,13 @@ export interface ObjectGridSchema extends BaseSchema {
384
497
  * @default false
385
498
  */
386
499
  editable?: boolean;
500
+
501
+ /**
502
+ * Enable single-click editing mode
503
+ * When true with editable, clicking a cell enters edit mode (instead of double-click)
504
+ * @default false
505
+ */
506
+ singleClickEdit?: boolean;
387
507
 
388
508
  /**
389
509
  * Grouping Configuration (Airtable-style)
@@ -415,6 +535,30 @@ export interface ObjectGridSchema extends BaseSchema {
415
535
  */
416
536
  frozenColumns?: number;
417
537
 
538
+ /**
539
+ * Row height preset for the grid.
540
+ * Controls the density of grid rows.
541
+ * Aligned with @objectstack/spec RowHeight enum.
542
+ * @default 'compact'
543
+ */
544
+ rowHeight?: 'compact' | 'short' | 'medium' | 'tall' | 'extra_tall';
545
+
546
+ /**
547
+ * Export options configuration for exporting grid data.
548
+ * Supports csv, xlsx, json, and pdf formats.
549
+ * Aligned with @objectstack/spec ListViewSchema.exportOptions.
550
+ */
551
+ exportOptions?: {
552
+ /** Formats available for export */
553
+ formats?: Array<'csv' | 'xlsx' | 'json' | 'pdf'>;
554
+ /** Maximum number of records to export (0 = unlimited) */
555
+ maxRecords?: number;
556
+ /** Include column headers in export */
557
+ includeHeaders?: boolean;
558
+ /** Custom file name prefix */
559
+ fileNamePrefix?: string;
560
+ };
561
+
418
562
  /**
419
563
  * Navigation configuration for row click behavior.
420
564
  * Controls how record detail is displayed when a row is clicked.
@@ -427,6 +571,45 @@ export interface ObjectGridSchema extends BaseSchema {
427
571
  * Called with recordId and action ('view' | 'edit').
428
572
  */
429
573
  onNavigate?: (recordId: string | number, action?: string) => void;
574
+
575
+ /**
576
+ * Conditional formatting rules for row/cell styling.
577
+ * Aligned with @objectstack/spec ListViewSchema.conditionalFormatting.
578
+ * Supports both ObjectUI field/operator/value rules and Spec expression-based { condition, style } rules.
579
+ */
580
+ conditionalFormatting?: ConditionalFormattingRule[];
581
+
582
+ /**
583
+ * Enable virtual scrolling for large datasets.
584
+ * Aligned with @objectstack/spec ListViewSchema.virtualScroll.
585
+ * @default false
586
+ */
587
+ virtualScroll?: boolean;
588
+
589
+ /**
590
+ * Row action identifiers (action names from ActionSchema).
591
+ * Aligned with @objectstack/spec ListViewSchema.rowActions.
592
+ */
593
+ rowSpecActions?: string[];
594
+
595
+ /**
596
+ * Bulk action identifiers (action names from ActionSchema).
597
+ * Aligned with @objectstack/spec ListViewSchema.bulkActions.
598
+ */
599
+ bulkSpecActions?: string[];
600
+
601
+ /**
602
+ * Empty state configuration shown when no data is available.
603
+ * Aligned with @objectstack/spec ListViewSchema.emptyState.
604
+ */
605
+ emptyState?: {
606
+ /** Title text for the empty state */
607
+ title?: string;
608
+ /** Message/description for the empty state */
609
+ message?: string;
610
+ /** Icon name (Lucide icon identifier) */
611
+ icon?: string;
612
+ };
430
613
  }
431
614
 
432
615
  /**
@@ -835,6 +1018,12 @@ export interface ObjectViewSchema extends BaseSchema {
835
1018
  */
836
1019
  showFilters?: boolean;
837
1020
 
1021
+ /**
1022
+ * Show sort controls
1023
+ * @default true
1024
+ */
1025
+ showSort?: boolean;
1026
+
838
1027
  /**
839
1028
  * Show create button
840
1029
  * @default true
@@ -849,7 +1038,7 @@ export interface ObjectViewSchema extends BaseSchema {
849
1038
 
850
1039
  /**
851
1040
  * Show view switcher (for multi-view)
852
- * When false (default), view type is fixed at creation in ViewDesigner
1041
+ * When false (default), view type is fixed at creation in ViewConfigPanel
853
1042
  * @default false
854
1043
  */
855
1044
  showViewSwitcher?: boolean;
@@ -873,6 +1062,50 @@ export interface ObjectViewSchema extends BaseSchema {
873
1062
  * Custom CSS class
874
1063
  */
875
1064
  className?: string;
1065
+
1066
+ /**
1067
+ * View tab bar UX configuration (inline add, context menu, overflow, indicators).
1068
+ */
1069
+ viewTabBar?: ViewTabBarConfig;
1070
+
1071
+ /**
1072
+ * Show "+" button in ViewSwitcher to create a new view.
1073
+ * Typically gated on admin permission.
1074
+ */
1075
+ allowCreateView?: boolean;
1076
+
1077
+ /**
1078
+ * Per-view action icons shown in ViewSwitcher (e.g., share, settings, duplicate, delete).
1079
+ */
1080
+ viewActions?: Array<{
1081
+ type: 'share' | 'settings' | 'duplicate' | 'delete';
1082
+ icon?: string;
1083
+ }>;
1084
+ }
1085
+
1086
+ /**
1087
+ * View Tab Bar Configuration
1088
+ * Controls the UX of the view tab bar (inline add, context menu, overflow, indicators).
1089
+ */
1090
+ export interface ViewTabBarConfig {
1091
+ /** Show inline "+" button to create new views @default true */
1092
+ showAddButton?: boolean;
1093
+ /** Allow inline renaming by double-clicking tab @default true */
1094
+ inlineRename?: boolean;
1095
+ /** Show context menu on right-click @default true */
1096
+ contextMenu?: boolean;
1097
+ /** Allow drag-reorder of view tabs @default false */
1098
+ reorderable?: boolean;
1099
+ /** Max visible tabs before overflow → "More" dropdown @default 6 */
1100
+ maxVisibleTabs?: number;
1101
+ /** Show filter/sort indicator badges on tabs @default true */
1102
+ showIndicators?: boolean;
1103
+ /** Show "Save as View" when filters differ from saved @default true */
1104
+ showSaveAsView?: boolean;
1105
+ /** Show pinned views section @default true */
1106
+ showPinnedSection?: boolean;
1107
+ /** Group tabs by personal/shared @default false */
1108
+ showVisibilityGroups?: boolean;
876
1109
  }
877
1110
 
878
1111
  /**
@@ -897,6 +1130,158 @@ export interface NamedListView {
897
1130
 
898
1131
  /** Type-specific options (kanban groupField, calendar startDateField, etc.) */
899
1132
  options?: Record<string, any>;
1133
+
1134
+ /** Show search box in toolbar @default true */
1135
+ showSearch?: boolean;
1136
+
1137
+ /** Show sort controls in toolbar @default true */
1138
+ showSort?: boolean;
1139
+
1140
+ /** Show filter controls in toolbar @default true */
1141
+ showFilters?: boolean;
1142
+
1143
+ /** Show hide-fields button in toolbar @default false */
1144
+ showHideFields?: boolean;
1145
+
1146
+ /** Show group button in toolbar @default true */
1147
+ showGroup?: boolean;
1148
+
1149
+ /** Show color button in toolbar @default false */
1150
+ showColor?: boolean;
1151
+
1152
+ /** Show density/row-height button in toolbar @default false */
1153
+ showDensity?: boolean;
1154
+
1155
+ /** Allow data export @default undefined */
1156
+ allowExport?: boolean;
1157
+
1158
+ /** Show alternating row colors @default false */
1159
+ striped?: boolean;
1160
+
1161
+ /** Show cell borders @default false */
1162
+ bordered?: boolean;
1163
+
1164
+ /** Color field for row/card coloring */
1165
+ color?: string;
1166
+
1167
+ /** Enable inline editing @default false */
1168
+ inlineEdit?: boolean;
1169
+
1170
+ /** Wrap column headers in grid view @default false */
1171
+ wrapHeaders?: boolean;
1172
+
1173
+ /** Navigate to record detail view when row is clicked @default true */
1174
+ clickIntoRecordDetails?: boolean;
1175
+
1176
+ /** Add records via a form dialog @default false */
1177
+ addRecordViaForm?: boolean;
1178
+
1179
+ /** Enable inline add/delete of records @default false */
1180
+ addDeleteRecordsInline?: boolean;
1181
+
1182
+ /** Collapse all grouped sections by default @default false */
1183
+ collapseAllByDefault?: boolean;
1184
+
1185
+ /** Field name for custom text color */
1186
+ fieldTextColor?: string;
1187
+
1188
+ /** Prefix field displayed before the main title */
1189
+ prefixField?: string;
1190
+
1191
+ /** View description */
1192
+ description?: string;
1193
+
1194
+ /** Show field descriptions below headers @default false */
1195
+ showDescription?: boolean;
1196
+
1197
+ /** Navigation configuration for row click behavior */
1198
+ navigation?: ViewNavigationConfig;
1199
+
1200
+ /** Row selection mode */
1201
+ selection?: { type: 'none' | 'single' | 'multiple' };
1202
+
1203
+ /** Pagination configuration */
1204
+ pagination?: { pageSize: number; pageSizeOptions?: number[] };
1205
+
1206
+ /** Fields that support text search */
1207
+ searchableFields?: string[];
1208
+
1209
+ /** Fields available for filter UI */
1210
+ filterableFields?: string[];
1211
+
1212
+ /** Allow column resizing @default false */
1213
+ resizable?: boolean;
1214
+
1215
+ /** Density mode for controlling row/item spacing */
1216
+ densityMode?: 'compact' | 'comfortable' | 'spacious';
1217
+
1218
+ /**
1219
+ * Row height for list/grid view rows.
1220
+ * Aligned with @objectstack/spec RowHeight enum.
1221
+ */
1222
+ rowHeight?: 'compact' | 'short' | 'medium' | 'tall' | 'extra_tall';
1223
+
1224
+ /** Fields to hide from the current view */
1225
+ hiddenFields?: string[];
1226
+
1227
+ /** Export options configuration */
1228
+ exportOptions?: {
1229
+ formats?: Array<'csv' | 'xlsx' | 'json' | 'pdf'>;
1230
+ maxRecords?: number;
1231
+ includeHeaders?: boolean;
1232
+ fileNamePrefix?: string;
1233
+ };
1234
+
1235
+ /** Row action identifiers */
1236
+ rowActions?: string[];
1237
+
1238
+ /** Bulk action identifiers */
1239
+ bulkActions?: string[];
1240
+
1241
+ /** View sharing configuration */
1242
+ sharing?: {
1243
+ visibility?: 'private' | 'team' | 'organization' | 'public';
1244
+ enabled?: boolean;
1245
+ };
1246
+
1247
+ /** Add record configuration */
1248
+ addRecord?: {
1249
+ enabled?: boolean;
1250
+ position?: string;
1251
+ mode?: string;
1252
+ formView?: string;
1253
+ };
1254
+
1255
+ /** Conditional formatting rules.
1256
+ * Supports both ObjectUI field/operator/value rules and Spec expression-based { condition, style } rules. */
1257
+ conditionalFormatting?: ConditionalFormattingRule[];
1258
+
1259
+ /** Quick filter buttons for predefined filter presets.
1260
+ * Supports both ObjectUI format and Spec format (auto-converted at runtime). */
1261
+ quickFilters?: QuickFilterItem[];
1262
+
1263
+ /** Show total record count @default false */
1264
+ showRecordCount?: boolean;
1265
+
1266
+ /** Allow printing the view @default false */
1267
+ allowPrinting?: boolean;
1268
+
1269
+ /** Enable virtual scrolling for large datasets @default false */
1270
+ virtualScroll?: boolean;
1271
+
1272
+ /** Empty state configuration */
1273
+ emptyState?: {
1274
+ title?: string;
1275
+ message?: string;
1276
+ icon?: string;
1277
+ };
1278
+
1279
+ /** ARIA attributes for accessibility */
1280
+ aria?: {
1281
+ label?: string;
1282
+ describedBy?: string;
1283
+ live?: 'polite' | 'assertive' | 'off';
1284
+ };
900
1285
  }
901
1286
 
902
1287
  /**
@@ -949,7 +1334,29 @@ export interface ListViewSchema extends BaseSchema {
949
1334
 
950
1335
  /** View Type (grid, kanban, etc.) @default 'grid' */
951
1336
  viewType?: 'grid' | 'kanban' | 'gallery' | 'calendar' | 'timeline' | 'gantt' | 'map';
952
-
1337
+
1338
+ /**
1339
+ * Data Source Configuration.
1340
+ * Aligned with @objectstack/spec ViewDataSchema.
1341
+ * Supports provider: 'object' (fetch from objectName), 'value' (inline items), 'api' (custom endpoint).
1342
+ * If not provided, defaults to fetching from objectName via dataSource.find().
1343
+ */
1344
+ data?: ViewData;
1345
+
1346
+ /**
1347
+ * Grouping Configuration (Airtable-style).
1348
+ * Groups rows by specified fields with collapsible sections.
1349
+ * Aligned with @objectstack/spec GroupingConfigSchema.
1350
+ */
1351
+ grouping?: GroupingConfig;
1352
+
1353
+ /**
1354
+ * Row Color Configuration (Airtable-style).
1355
+ * Colors rows based on field values.
1356
+ * Aligned with @objectstack/spec RowColorConfigSchema.
1357
+ */
1358
+ rowColor?: RowColorConfig;
1359
+
953
1360
  /** Columns definition (string field names or full column config) */
954
1361
  columns?: string[] | Array<{
955
1362
  field: string;
@@ -963,6 +1370,10 @@ export interface ListViewSchema extends BaseSchema {
963
1370
  type?: string;
964
1371
  link?: boolean;
965
1372
  action?: string;
1373
+ /** Pin column to left or right edge */
1374
+ pinned?: 'left' | 'right';
1375
+ /** Column footer summary/aggregation (e.g., 'count', 'sum', 'avg') */
1376
+ summary?: string | { type: 'count' | 'sum' | 'avg' | 'min' | 'max'; field?: string };
966
1377
  }>;
967
1378
 
968
1379
  /** Fields to fetch/display (alias for simple string[] columns) */
@@ -971,8 +1382,8 @@ export interface ListViewSchema extends BaseSchema {
971
1382
  /** Filter conditions */
972
1383
  filters?: Array<any[] | string>;
973
1384
 
974
- /** Sort order */
975
- sort?: Array<{ field: string; order: 'asc' | 'desc' }>;
1385
+ /** Sort order. Supports array of objects or legacy string format "field desc" */
1386
+ sort?: Array<{ field: string; order: 'asc' | 'desc' } | string>;
976
1387
 
977
1388
  /** Fields that support text search */
978
1389
  searchableFields?: string[];
@@ -994,6 +1405,33 @@ export interface ListViewSchema extends BaseSchema {
994
1405
 
995
1406
  /** Show cell borders @default false */
996
1407
  bordered?: boolean;
1408
+
1409
+ /** Show search box in toolbar @default true */
1410
+ showSearch?: boolean;
1411
+
1412
+ /** Show sort controls in toolbar @default true */
1413
+ showSort?: boolean;
1414
+
1415
+ /** Show filter controls in toolbar @default true */
1416
+ showFilters?: boolean;
1417
+
1418
+ /** Show hide-fields button in toolbar @default false */
1419
+ showHideFields?: boolean;
1420
+
1421
+ /** Show group button in toolbar @default true */
1422
+ showGroup?: boolean;
1423
+
1424
+ /** Show color button in toolbar @default false */
1425
+ showColor?: boolean;
1426
+
1427
+ /** Show density/row-height button in toolbar @default false */
1428
+ showDensity?: boolean;
1429
+
1430
+ /** Allow data export @default undefined */
1431
+ allowExport?: boolean;
1432
+
1433
+ /** Color field for row/card coloring */
1434
+ color?: string;
997
1435
 
998
1436
  /** Navigation config for row click behavior */
999
1437
  navigation?: ViewNavigationConfig;
@@ -1030,14 +1468,283 @@ export interface ListViewSchema extends BaseSchema {
1030
1468
  dependenciesField?: string;
1031
1469
  [key: string]: any;
1032
1470
  };
1471
+
1472
+ /** Gallery-specific configuration. Aligned with @objectstack/spec GalleryConfigSchema. */
1473
+ gallery?: ListViewGalleryConfig;
1474
+
1475
+ /** Timeline-specific configuration. Aligned with @objectstack/spec TimelineConfigSchema. */
1476
+ timeline?: ListViewTimelineConfig;
1033
1477
 
1034
1478
  /** Visual Component overrides (legacy, prefer typed configs above) */
1035
1479
  options?: Record<string, any>;
1036
- }
1480
+
1481
+ /**
1482
+ * Empty state configuration shown when no data is available.
1483
+ * Aligned with @objectstack/spec ListViewSchema.emptyState.
1484
+ */
1485
+ emptyState?: {
1486
+ /** Title text for the empty state */
1487
+ title?: string;
1488
+ /** Message/description for the empty state */
1489
+ message?: string;
1490
+ /** Icon name (Lucide icon identifier) for the empty state */
1491
+ icon?: string;
1492
+ };
1037
1493
 
1038
- /**
1039
- * Object Map Component Schema
1040
- */
1494
+ /**
1495
+ * Quick filter buttons for predefined filter presets.
1496
+ * Supports both ObjectUI format and Spec format (auto-converted at runtime).
1497
+ */
1498
+ quickFilters?: QuickFilterItem[];
1499
+
1500
+ /**
1501
+ * Fields to hide from the current view.
1502
+ * Hides columns in grid view or fields in other view types.
1503
+ */
1504
+ hiddenFields?: string[];
1505
+
1506
+ /**
1507
+ * Custom field display order. Fields listed first appear first.
1508
+ * Fields not listed are appended in their original order.
1509
+ */
1510
+ fieldOrder?: string[];
1511
+
1512
+ /**
1513
+ * Export options configuration for exporting list data.
1514
+ * Supports both ObjectUI object format and spec simple string[] format.
1515
+ * Spec format: ['csv', 'xlsx'] (simple array of format strings)
1516
+ * ObjectUI format: { formats, maxRecords, includeHeaders, fileNamePrefix }
1517
+ */
1518
+ exportOptions?: Array<'csv' | 'xlsx' | 'json' | 'pdf'> | {
1519
+ /** Formats available for export */
1520
+ formats?: Array<'csv' | 'xlsx' | 'json' | 'pdf'>;
1521
+ /** Maximum number of records to export (0 = unlimited) */
1522
+ maxRecords?: number;
1523
+ /** Include column headers in export */
1524
+ includeHeaders?: boolean;
1525
+ /** Custom file name prefix */
1526
+ fileNamePrefix?: string;
1527
+ };
1528
+
1529
+ /**
1530
+ * Density mode for controlling row/item spacing.
1531
+ * Aligned with @objectstack/spec DensityMode.
1532
+ */
1533
+ densityMode?: 'compact' | 'comfortable' | 'spacious';
1534
+
1535
+ /**
1536
+ * Row height for list/grid view rows.
1537
+ * Aligned with @objectstack/spec RowHeight enum.
1538
+ */
1539
+ rowHeight?: 'compact' | 'short' | 'medium' | 'tall' | 'extra_tall';
1540
+
1541
+ /**
1542
+ * Conditional formatting rules for row/cell styling.
1543
+ * Rules are evaluated in order; first matching rule wins.
1544
+ * Supports both ObjectUI field/operator/value rules and spec expression-based { condition, style } rules.
1545
+ */
1546
+ conditionalFormatting?: ConditionalFormattingRule[];
1547
+
1548
+ /**
1549
+ * Enable inline editing for list view fields.
1550
+ * When true, cells become editable on click/double-click.
1551
+ */
1552
+ inlineEdit?: boolean;
1553
+
1554
+ /** Wrap column headers in grid view @default false */
1555
+ wrapHeaders?: boolean;
1556
+
1557
+ /** Navigate to record detail view when row is clicked @default true */
1558
+ clickIntoRecordDetails?: boolean;
1559
+
1560
+ /** Add records via a form dialog @default false */
1561
+ addRecordViaForm?: boolean;
1562
+
1563
+ /** Enable inline add/delete of records @default false */
1564
+ addDeleteRecordsInline?: boolean;
1565
+
1566
+ /** Collapse all grouped sections by default @default false */
1567
+ collapseAllByDefault?: boolean;
1568
+
1569
+ /** Field name for custom text color */
1570
+ fieldTextColor?: string;
1571
+
1572
+ /** Prefix field displayed before the main title */
1573
+ prefixField?: string;
1574
+
1575
+ /** Show field descriptions below headers @default false */
1576
+ showDescription?: boolean;
1577
+
1578
+ /**
1579
+ * ARIA attributes for accessibility.
1580
+ * Applied to the root list container element.
1581
+ */
1582
+ aria?: {
1583
+ /** Accessible label for the list view */
1584
+ label?: string;
1585
+ /** ID of the element that describes the list view */
1586
+ describedBy?: string;
1587
+ /** Live region politeness for dynamic updates */
1588
+ live?: 'polite' | 'assertive' | 'off';
1589
+ };
1590
+
1591
+ /**
1592
+ * View sharing configuration.
1593
+ * Supports both ObjectUI format { visibility, enabled } and spec format { type, lockedBy }.
1594
+ * Controls who can see this view and enables share UI.
1595
+ */
1596
+ sharing?: {
1597
+ /** Visibility level for the view (ObjectUI format) */
1598
+ visibility?: 'private' | 'team' | 'organization' | 'public';
1599
+ /** Whether sharing controls are shown in the toolbar */
1600
+ enabled?: boolean;
1601
+ /** Sharing type (spec format: personal or collaborative) */
1602
+ type?: 'personal' | 'collaborative';
1603
+ /** User who locked the view (spec format) */
1604
+ lockedBy?: string;
1605
+ };
1606
+
1607
+ /**
1608
+ * User Filters Configuration (Airtable Interfaces-style).
1609
+ *
1610
+ * Supports three display modes configured by `element`:
1611
+ * - 'dropdown': Each field renders as a dropdown selector badge (e.g., "Status ∨")
1612
+ * - 'tabs': Named filter presets rendered as a tab bar (e.g., "Tab | my customers | All records")
1613
+ * - 'toggle': Each filter field renders as an on/off toggle button
1614
+ */
1615
+ userFilters?: {
1616
+ /** UI element type for displaying filters */
1617
+ element: 'dropdown' | 'tabs' | 'toggle';
1618
+
1619
+ /**
1620
+ * Field-level filter definitions (used by 'dropdown' and 'toggle' modes).
1621
+ * Each field appears as an independent filter control in the toolbar.
1622
+ */
1623
+ fields?: Array<{
1624
+ /** Field name to filter on */
1625
+ field: string;
1626
+ /** Display label (defaults to field label from objectDef) */
1627
+ label?: string;
1628
+ /** Filter input type */
1629
+ type?: 'select' | 'multi-select' | 'boolean' | 'date-range' | 'text';
1630
+ /** Static options (overrides auto-derived from objectDef) */
1631
+ options?: Array<{
1632
+ label: string;
1633
+ value: string | number | boolean;
1634
+ color?: string;
1635
+ }>;
1636
+ /** Show record count per option */
1637
+ showCount?: boolean;
1638
+ /** Default selected values */
1639
+ defaultValues?: (string | number | boolean)[];
1640
+ }>;
1641
+
1642
+ /**
1643
+ * Named filter presets (used by 'tabs' mode).
1644
+ * Each tab represents a pre-configured filter combination.
1645
+ */
1646
+ tabs?: Array<{
1647
+ /** Unique tab identifier */
1648
+ id: string;
1649
+ /** Tab display label */
1650
+ label: string;
1651
+ /** Filter conditions to apply when this tab is active */
1652
+ filters: Array<any[] | string>;
1653
+ /** Icon name (Lucide icon identifier) */
1654
+ icon?: string;
1655
+ /** Whether this is the default active tab */
1656
+ default?: boolean;
1657
+ }>;
1658
+
1659
+ /** Allow users to add new filter tabs at runtime */
1660
+ allowAddTab?: boolean;
1661
+ /** Show "All records" tab (tabs mode) */
1662
+ showAllRecords?: boolean;
1663
+ };
1664
+
1665
+ /**
1666
+ * Row action identifiers (action names from ActionSchema).
1667
+ * Aligned with @objectstack/spec ListViewSchema.rowActions.
1668
+ */
1669
+ rowActions?: string[];
1670
+
1671
+ /**
1672
+ * Bulk action identifiers (action names from ActionSchema).
1673
+ * Aligned with @objectstack/spec ListViewSchema.bulkActions.
1674
+ */
1675
+ bulkActions?: string[];
1676
+
1677
+ /**
1678
+ * Enable virtual scrolling for large datasets.
1679
+ * Aligned with @objectstack/spec ListViewSchema.virtualScroll.
1680
+ * @default false
1681
+ */
1682
+ virtualScroll?: boolean;
1683
+
1684
+ /**
1685
+ * User actions configuration.
1686
+ * Controls what UI actions are available to end users.
1687
+ * Aligned with @objectstack/spec ListViewSchema.userActions.
1688
+ */
1689
+ userActions?: {
1690
+ sort?: boolean;
1691
+ search?: boolean;
1692
+ filter?: boolean;
1693
+ rowHeight?: boolean;
1694
+ addRecordForm?: boolean;
1695
+ buttons?: string[];
1696
+ };
1697
+
1698
+ /**
1699
+ * Appearance configuration.
1700
+ * Aligned with @objectstack/spec ListViewSchema.appearance.
1701
+ */
1702
+ appearance?: {
1703
+ showDescription?: boolean;
1704
+ allowedVisualizations?: string[];
1705
+ };
1706
+
1707
+ /**
1708
+ * View tabs configuration.
1709
+ * Aligned with @objectstack/spec ListViewSchema.tabs.
1710
+ */
1711
+ tabs?: Array<{
1712
+ name: string;
1713
+ label: string;
1714
+ icon?: string;
1715
+ view?: string;
1716
+ filter?: any;
1717
+ order?: number;
1718
+ pinned?: boolean;
1719
+ isDefault?: boolean;
1720
+ visible?: string;
1721
+ }>;
1722
+
1723
+ /**
1724
+ * Add record configuration.
1725
+ * Aligned with @objectstack/spec ListViewSchema.addRecord.
1726
+ */
1727
+ addRecord?: {
1728
+ enabled?: boolean;
1729
+ position?: string;
1730
+ mode?: string;
1731
+ formView?: string;
1732
+ };
1733
+
1734
+ /**
1735
+ * Show total record count in the view.
1736
+ * Aligned with @objectstack/spec ListViewSchema.showRecordCount.
1737
+ * @default false
1738
+ */
1739
+ showRecordCount?: boolean;
1740
+
1741
+ /**
1742
+ * Allow printing the view.
1743
+ * Aligned with @objectstack/spec ListViewSchema.allowPrinting.
1744
+ * @default false
1745
+ */
1746
+ allowPrinting?: boolean;
1747
+ }
1041
1748
  export interface ObjectMapSchema extends BaseSchema {
1042
1749
  type: 'object-map';
1043
1750
  /** ObjectQL object name */
@@ -1097,6 +1804,48 @@ export interface ObjectKanbanSchema extends BaseSchema {
1097
1804
  titleField?: string;
1098
1805
  /** Fields to display on card */
1099
1806
  cardFields?: string[];
1807
+
1808
+ /**
1809
+ * Enable Quick Add button at the bottom of each column.
1810
+ * When true, a "+" button appears allowing inline card creation.
1811
+ * @default false
1812
+ */
1813
+ quickAdd?: boolean;
1814
+
1815
+ /**
1816
+ * Field name to use as cover image on cards.
1817
+ * The field value should be a URL string or file object with a `url` property.
1818
+ */
1819
+ coverImageField?: string;
1820
+
1821
+ /**
1822
+ * Allow columns to be collapsed/expanded.
1823
+ * Collapsed columns show only the title and card count.
1824
+ * @default false
1825
+ */
1826
+ allowCollapse?: boolean;
1827
+
1828
+ /**
1829
+ * Conditional formatting rules for card coloring.
1830
+ * Cards are colored based on field values matching conditions.
1831
+ */
1832
+ conditionalFormatting?: KanbanConditionalFormattingRule[];
1833
+ }
1834
+
1835
+ /**
1836
+ * Conditional formatting rule for Kanban cards
1837
+ */
1838
+ export interface KanbanConditionalFormattingRule {
1839
+ /** Field name to check */
1840
+ field: string;
1841
+ /** Operator for comparison */
1842
+ operator: 'equals' | 'not_equals' | 'contains' | 'in';
1843
+ /** Value to compare against */
1844
+ value: string | string[];
1845
+ /** Background color to apply (Tailwind class or CSS color) */
1846
+ backgroundColor?: string;
1847
+ /** Border color to apply (Tailwind class or CSS color) */
1848
+ borderColor?: string;
1100
1849
  }
1101
1850
 
1102
1851
  /**