@ai-matrx/records-ui 0.116.122 → 0.116.124

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 (53) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/{SaveToTable-VNAYIDXB.js → SaveToTable-BEKANHD3.js} +4 -3
  3. package/dist/{chunk-KJAVVXRW.js → chunk-5RU7BPCU.js} +8 -230
  4. package/dist/chunk-5RU7BPCU.js.map +1 -0
  5. package/dist/chunk-6DK2DKTD.js +235 -0
  6. package/dist/chunk-6DK2DKTD.js.map +1 -0
  7. package/dist/{chunk-6RFL5KYR.js → chunk-B7A3B6F4.js} +2 -2
  8. package/dist/{chunk-U2B3TLDZ.js → chunk-EB6IVWGJ.js} +193 -77
  9. package/dist/chunk-EB6IVWGJ.js.map +1 -0
  10. package/dist/data-source.d.cts +1 -1
  11. package/dist/data-source.d.ts +1 -1
  12. package/dist/decision-gate.d.cts +4 -4
  13. package/dist/decision-gate.d.ts +4 -4
  14. package/dist/entity-doors.d.cts +24 -28
  15. package/dist/entity-doors.d.ts +24 -28
  16. package/dist/entity-ref.d.cts +48 -52
  17. package/dist/entity-ref.d.ts +48 -52
  18. package/dist/first-page.d.cts +4 -4
  19. package/dist/first-page.d.ts +4 -4
  20. package/dist/helpers.cjs.map +1 -1
  21. package/dist/helpers.d.cts +104 -106
  22. package/dist/helpers.d.ts +104 -106
  23. package/dist/helpers.js.map +1 -1
  24. package/dist/html-frame.d.cts +2 -2
  25. package/dist/html-frame.d.ts +2 -2
  26. package/dist/index.cjs +531 -282
  27. package/dist/index.cjs.map +1 -1
  28. package/dist/index.d.cts +488 -480
  29. package/dist/index.d.ts +488 -480
  30. package/dist/index.js +351 -214
  31. package/dist/index.js.map +1 -1
  32. package/dist/list-dimensions.cjs +203 -7
  33. package/dist/list-dimensions.cjs.map +1 -1
  34. package/dist/list-dimensions.d.cts +8 -8
  35. package/dist/list-dimensions.d.ts +8 -8
  36. package/dist/list-dimensions.js +10 -7
  37. package/dist/list-dimensions.js.map +1 -1
  38. package/dist/objectActions-DeP_tTmc.d.cts +12 -12
  39. package/dist/objectActions-DeP_tTmc.d.ts +12 -12
  40. package/dist/pickers.cjs +179 -55
  41. package/dist/pickers.cjs.map +1 -1
  42. package/dist/pickers.d.cts +13 -13
  43. package/dist/pickers.d.ts +13 -13
  44. package/dist/pickers.js +3 -2
  45. package/dist/skeleton.d.cts +11 -11
  46. package/dist/skeleton.d.ts +11 -11
  47. package/dist/table-shape.d.cts +7 -7
  48. package/dist/table-shape.d.ts +7 -7
  49. package/package.json +2 -2
  50. package/dist/chunk-KJAVVXRW.js.map +0 -1
  51. package/dist/chunk-U2B3TLDZ.js.map +0 -1
  52. /package/dist/{SaveToTable-VNAYIDXB.js.map → SaveToTable-BEKANHD3.js.map} +0 -0
  53. /package/dist/{chunk-6RFL5KYR.js.map → chunk-B7A3B6F4.js.map} +0 -0
@@ -17,8 +17,8 @@ declare function personActor(userId: Uuid | null | undefined): RecordsActor;
17
17
  declare function recordsDataSource(client: object, fallbackSchema?: string): RecordsDataSource;
18
18
 
19
19
  /** The host app's saved zone (IANA). `null` / junk clears it: the device zone applies. */
20
- declare function setPersonTimeZone(next: string | null | undefined): void;
21
- declare function getPersonTimeZone(): string | null;
20
+ declare function setPersonTimeZone(next: null | string | undefined): void;
21
+ declare function getPersonTimeZone(): null | string;
22
22
  /** Calls `listener` whenever the zone changes; returns the unsubscribe. */
23
23
  declare function subscribePersonTimeZone(listener: () => void): () => void;
24
24
  /**
@@ -28,7 +28,7 @@ declare function subscribePersonTimeZone(listener: () => void): () => void;
28
28
  declare function personWallNow(at?: Date): Date;
29
29
 
30
30
  /** The six things a person does to a record or a table, as the screens offer them. */
31
- type Capability = "read" | "comment" | "write" | "organise" | "remove" | "share" | "structure";
31
+ type Capability = "comment" | "organise" | "read" | "remove" | "share" | "structure" | "write";
32
32
  interface WhatYouMayDo {
33
33
  /** The word the store answered, or null when it answered nothing. */
34
34
  level: PermissionLevel | null;
@@ -94,9 +94,9 @@ interface PresenceCell {
94
94
  interface TablePresencePerson {
95
95
  key: string;
96
96
  /** The published user id; the name and picture are resolved from it through the members roster, never taken from the sender. */
97
- userId?: string | null;
97
+ userId?: null | string;
98
98
  name: string;
99
- avatarUrl: string | null;
99
+ avatarUrl: null | string;
100
100
  color: string;
101
101
  cell: PresenceCell | null;
102
102
  }
@@ -129,7 +129,7 @@ interface TableSettingsSnapshot {
129
129
  table_details_draft: {
130
130
  table_name: string;
131
131
  description: string;
132
- row_label: string | null;
132
+ row_label: null | string;
133
133
  };
134
134
  saved_row_actions?: Array<Record<string, unknown>>;
135
135
  editing_row_action?: Record<string, unknown>;
@@ -151,14 +151,14 @@ interface TableSettingsAgent {
151
151
  * Closed on purpose: each renderer maps every member to its own glyph, and a
152
152
  * new member fails that renderer's typecheck until it is mapped.
153
153
  */
154
- type ObjectActionIcon = "folder-open" | "external-link" | "link" | "pencil" | "copy" | "folder-input" | "star" | "star-off" | "share-2" | "download" | "upload" | "columns-3" | "settings" | "history" | "blocks" | "file-text" | "calendar-clock" | "list-checks" | "bell" | "door-open" | "inbox" | "layout-dashboard" | "archive-restore" | "archive" | "link-2" | "layout-grid" | "git-merge" | "split" | "arrow-up-from-line" | "corner-down-right" | "lock" | "lock-open" | "eraser" | "printer";
154
+ type ObjectActionIcon = "archive" | "archive-restore" | "arrow-up-from-line" | "bell" | "blocks" | "calendar-clock" | "columns-3" | "copy" | "corner-down-right" | "door-open" | "download" | "eraser" | "external-link" | "file-text" | "folder-input" | "folder-open" | "git-merge" | "history" | "inbox" | "layout-dashboard" | "layout-grid" | "link" | "link-2" | "list-checks" | "lock" | "lock-open" | "pencil" | "printer" | "settings" | "share-2" | "split" | "star" | "star-off" | "upload";
155
155
  /** The groups, in their one order. Separators fall out of group boundaries. */
156
- type ObjectActionGroup = "open" | "organize" | "share" | "manage" | "built-on" | "danger";
156
+ type ObjectActionGroup = "built-on" | "danger" | "manage" | "open" | "organize" | "share";
157
157
  /**
158
158
  * THE STANDARD VERBS every object's menu shares — what the icon strip draws. One
159
159
  * per meaning; an object maps its action onto the verb, never a second "share".
160
160
  */
161
- type StandardVerbId = "open" | "open-new-tab" | "copy-link" | "rename" | "duplicate" | "move" | "favorite" | "share" | "export" | "import" | "settings" | "history" | "archive";
161
+ type StandardVerbId = "archive" | "copy-link" | "duplicate" | "export" | "favorite" | "history" | "import" | "move" | "open" | "open-new-tab" | "rename" | "settings" | "share";
162
162
  /** One thing a person can do to an object, for any renderer. */
163
163
  interface ObjectAction {
164
164
  /** Stable within the object's list. React key, test handle, future ⌘K id. */
@@ -176,14 +176,14 @@ interface ObjectAction {
176
176
  /** Present = shown disabled with this line (≤ 60 chars). Absent = enabled. */
177
177
  disabledReason?: string;
178
178
  /** Called only when enabled. The host owns the side effect and its feedback. */
179
- run: () => void | Promise<void>;
179
+ run: () => Promise<void> | void;
180
180
  }
181
181
 
182
182
  /** What a door answers when it mints or changes a link. The token is the only time it is seen. */
183
183
  interface CalendarFeedMade {
184
184
  id: string;
185
185
  token: string;
186
- expires_at: string | null;
186
+ expires_at: null | string;
187
187
  }
188
188
  /** One line of the person's list. Never a token — `token_prefix` is its first characters. */
189
189
  interface CalendarFeedRow {
@@ -191,12 +191,12 @@ interface CalendarFeedRow {
191
191
  title: string;
192
192
  organization_id: string;
193
193
  table_id: string;
194
- view_id: string | null;
194
+ view_id: null | string;
195
195
  token_prefix: string;
196
196
  time_zone: string;
197
197
  created_at: string;
198
- expires_at: string | null;
199
- last_read_at: string | null;
198
+ expires_at: null | string;
199
+ last_read_at: null | string;
200
200
  read_count: number;
201
201
  expired: boolean;
202
202
  }
@@ -225,7 +225,7 @@ interface RecordChatEntry {
225
225
  value: unknown;
226
226
  label: string;
227
227
  /** `text` for a scalar, `json` for a structure. The host maps this to its own vocabulary. */
228
- type: "text" | "json";
228
+ type: "json" | "text";
229
229
  /**
230
230
  * DYN: a merge field resolves to a TRIPLE, not a string. The prompt gets the
231
231
  * rendered value; the RUN gets this, and it is the only thing a "where did
@@ -236,7 +236,7 @@ interface RecordChatEntry {
236
236
  record_id: Uuid$1;
237
237
  field_id: Uuid$1;
238
238
  value_version: number;
239
- written_at: string | null;
239
+ written_at: null | string;
240
240
  };
241
241
  }
242
242
  /** A Field the agent was NOT given, named rather than silently dropped. */
@@ -317,9 +317,9 @@ interface FillEstimateAsk {
317
317
  }
318
318
  interface FillEstimate {
319
319
  /** `measured`: the column's own cost per row so far. `estimated`: the model's price over what each row sends. `none`: no figure. */
320
- basis: "measured" | "estimated" | "none";
320
+ basis: "estimated" | "measured" | "none";
321
321
  /** The whole fill, in cents; shown only as points at the host's rate. */
322
- costCents: number | null;
322
+ costCents: null | number;
323
323
  /** True when the column also reads the web or pictures, which cost more than this. */
324
324
  extraReads?: boolean;
325
325
  /** Why there is no figure, in the server's words, when `basis` is `none`. */
@@ -336,9 +336,9 @@ interface GridContextSnapshot {
336
336
  tableId: Uuid;
337
337
  tableName: string;
338
338
  /** The table's own description (`metadata.description`), when it has one. */
339
- tableDescription: string | null;
339
+ tableDescription: null | string;
340
340
  /** The Field key that names each record (`title_field`), or null. */
341
- titleField: string | null;
341
+ titleField: null | string;
342
342
  /** The columns in the order the grid draws them (hidden columns left out). */
343
343
  fields: Field[];
344
344
  /** The table's row actions as the store lists them (update and agent). */
@@ -346,26 +346,26 @@ interface GridContextSnapshot {
346
346
  /** May this person change records here at all. */
347
347
  canWrite: boolean;
348
348
  /** The cell the cursor is on: its record, its Field key and the value drawn in it. */
349
- currentCell: {
349
+ currentCell: null | {
350
350
  rowId: Uuid;
351
351
  key: string;
352
352
  value: unknown;
353
- } | null;
353
+ };
354
354
  /** The record the cursor is on (or whose editor is open). */
355
355
  currentRow: GridContextRecord | null;
356
356
  /** A block of more than one cell: Excel/Sheets TSV with a header line of Field keys. */
357
- selectedRange: {
357
+ selectedRange: null | {
358
358
  tsv: string;
359
359
  cellCount: number;
360
360
  rowIds: Uuid[];
361
361
  keys: string[];
362
- } | null;
362
+ };
363
363
  /** The rows ticked with the row boxes. */
364
364
  selectedRows: GridContextRecord[];
365
365
  /** The page of records on screen, in screen order. */
366
366
  visibleRows: GridContextRecord[];
367
367
  /** How many records match the search and filters, when the store said. */
368
- total: number | null;
368
+ total: null | number;
369
369
  search: string;
370
370
  }
371
371
  /** Where the cursor is, as the data table tells it (`spreadsheet.onSelectionChange`). */
@@ -390,13 +390,13 @@ declare function gridContextSnapshot(args: {
390
390
  canWrite: boolean;
391
391
  cursor: GridCursor | null;
392
392
  /** The cell whose editor is open, which wins over the cursor. */
393
- editing: {
393
+ editing: null | {
394
394
  rowId: Uuid;
395
395
  key: string;
396
396
  draft: unknown;
397
- } | null;
397
+ };
398
398
  selectedIds: readonly string[];
399
- total: number | null;
399
+ total: null | number;
400
400
  search: string;
401
401
  }): GridContextSnapshot;
402
402
 
@@ -419,7 +419,7 @@ interface MapCanvasProps {
419
419
  * grid and the whole-text dialog's preview — the host may return block content there (the grid
420
420
  * clips it to the row); the form slots take phrasing content only.
421
421
  */
422
- type RenderTextSlot = "form-intro" | "form-help" | "form-thank-you" | "cell";
422
+ type RenderTextSlot = "cell" | "form-help" | "form-intro" | "form-thank-you";
423
423
 
424
424
  /** One reference a chip names (`renderReference`). `record` is a relation's value, read side only. */
425
425
  /** What a record page hands the host's rich editor (`editRichText`). */
@@ -443,7 +443,7 @@ interface TextBoxProps {
443
443
  label: string;
444
444
  rows: number;
445
445
  /** Where the box sits: an open grid cell, the whole-text editor, or a record form. */
446
- where: "cell" | "whole-text" | "form";
446
+ where: "cell" | "form" | "whole-text";
447
447
  id?: string | undefined;
448
448
  autoFocus?: boolean | undefined;
449
449
  readOnly?: boolean | undefined;
@@ -453,7 +453,7 @@ interface TextBoxProps {
453
453
  interface ReferenceChipRef {
454
454
  token: string;
455
455
  id: Uuid;
456
- label: string | null;
456
+ label: null | string;
457
457
  /** For `token: "record"`, the Table the relation points into. */
458
458
  tableId?: Uuid | undefined;
459
459
  /**
@@ -462,7 +462,7 @@ interface ReferenceChipRef {
462
462
  */
463
463
  archived?: boolean | undefined;
464
464
  /** The record's (or its table's) icon — an emoji or short glyph — when the host knows one. */
465
- icon?: string | null | undefined;
465
+ icon?: null | string | undefined;
466
466
  }
467
467
  /** One line typed into the table's Ask box, with the view the person was looking at ("" = none). */
468
468
  interface TableAskRequest {
@@ -486,32 +486,30 @@ interface TableAskAgentAnswer {
486
486
  could_not: string[];
487
487
  }
488
488
  type TableAskOutcome = {
489
+ ok: false;
490
+ message: string;
491
+ hint?: string | undefined;
492
+ code?: RecordsErrorCode | undefined;
493
+ } | {
489
494
  ok: true;
490
495
  answer: TableAskAgentAnswer;
491
- }
492
- /** A refusal says the real reason (`message`) and, when the host knows one, what to do (`hint`); no hint, none is invented. */
496
+ } /** A refusal says the real reason (`message`) and, when the host knows one, what to do (`hint`); no hint, none is invented. */
493
497
  /**
494
498
  * `code` is the refusal's kind when the host knows it (`"door"` for an access refusal); without one a failed run
495
499
  * reads as ours ("internal"), never as the person lacking access (live 2026-10-22, CD-AGENT-08).
496
- */
497
- | {
498
- ok: false;
499
- message: string;
500
- hint?: string | undefined;
501
- code?: RecordsErrorCode | undefined;
502
- };
500
+ */;
503
501
  /** What `RecordsUiHost.writeSyncedCell` answers. */
504
502
  type SyncedCellOutcome = {
505
- ok: true;
506
- status: "written";
507
- version?: number | null;
503
+ ok: false;
504
+ message: string;
508
505
  } | {
509
506
  ok: true;
510
507
  status: "conflict";
511
- sheetValue: string | null;
508
+ sheetValue: null | string;
512
509
  } | {
513
- ok: false;
514
- message: string;
510
+ ok: true;
511
+ status: "written";
512
+ version?: null | number;
515
513
  };
516
514
  /** The host's cost door: a quiet "Cost" link that reveals a price on click. Rows carry ready text (this package formats its own points). */
517
515
  interface RecordsCostDoorProps {
@@ -571,10 +569,10 @@ interface RecordsUiHost {
571
569
  * when the lookup could not be made (so the layout says "could not check", not "no such place").
572
570
  * Unbound, a Map built on an address column says so and offers no lookup.
573
571
  */
574
- geocodeAddress?: ((address: string) => Promise<{
572
+ geocodeAddress?: ((address: string) => Promise<null | {
575
573
  lat: number;
576
574
  lng: number;
577
- } | null>) | undefined;
575
+ }>) | undefined;
578
576
  /**
579
577
  * OPTIONAL. THE SWIPE LAYOUT'S LOGIC GRAPH (2026-10-22). Which cards are asked after which answers is
580
578
  * drawn on the platform's ONE diagram canvas, which lives above this package (rich-content's
@@ -788,11 +786,11 @@ interface RecordsUiHost {
788
786
  * names this port. Absent or honest, never dead.
789
787
  */
790
788
  upload?: (file: File) => Promise<{
791
- ok: true;
792
- fileId: Uuid;
793
- } | {
794
789
  ok: false;
795
790
  reason: string;
791
+ } | {
792
+ ok: true;
793
+ fileId: Uuid;
796
794
  }>;
797
795
  /**
798
796
  * OPTIONAL. THE HOST'S OWN FILE WINDOW (one-grid merge, inventory: the older grid's
@@ -852,8 +850,8 @@ interface RecordsUiHost {
852
850
  */
853
851
  openPerson?: (target: {
854
852
  recordId: string;
855
- userId?: string | null;
856
- email?: string | null;
853
+ userId?: null | string;
854
+ email?: null | string;
857
855
  name?: string;
858
856
  }) => void;
859
857
  /**
@@ -975,7 +973,7 @@ interface RecordsUiHost {
975
973
  * OPTIONAL. POINTS PER DOLLAR — the platform's rate. Every cost these screens show is
976
974
  * points at this rate (`costInPoints`); unbound, no cost is shown, never the vendor's money.
977
975
  */
978
- pointsRate?: number | null;
976
+ pointsRate?: null | number;
979
977
  /**
980
978
  * OPTIONAL. WHERE AN OFFLINE CAPTURE WAITS (SCR-30).
981
979
  *
@@ -1019,13 +1017,13 @@ interface RecordsUiHost {
1019
1017
  * page itself) and answers null when there is nothing to show. Unbound, a URL cell is the plain link chip.
1020
1018
  */
1021
1019
  linkPreview?: {
1022
- read: (url: string) => Promise<{
1023
- title: string | null;
1024
- description: string | null;
1025
- siteName: string | null;
1026
- faviconUrl: string | null;
1027
- imageUrl: string | null;
1028
- } | null>;
1020
+ read: (url: string) => Promise<null | {
1021
+ title: null | string;
1022
+ description: null | string;
1023
+ siteName: null | string;
1024
+ faviconUrl: null | string;
1025
+ imageUrl: null | string;
1026
+ }>;
1029
1027
  };
1030
1028
  /**
1031
1029
  * OPTIONAL. WHO CAN SEE AND EDIT ONE COLUMN (access-setup PLAN §12, Store Tables). The column header's
@@ -1049,10 +1047,10 @@ interface RecordsUiHost {
1049
1047
  * unbound, the notice still says the organization is archived and who can restore it, and offers no button.
1050
1048
  */
1051
1049
  archivedOrganization?: {
1052
- state: (organizationId: Uuid) => Promise<{
1050
+ state: (organizationId: Uuid) => Promise<null | {
1053
1051
  mayRestore: boolean;
1054
- name?: string | null;
1055
- } | null>;
1052
+ name?: null | string;
1053
+ }>;
1056
1054
  restore: (organizationId: Uuid) => Promise<void>;
1057
1055
  /** Runs after a restore so the screen reloads; unbound, the page reloads. */
1058
1056
  afterRestore?: () => void;
@@ -1091,13 +1089,13 @@ interface RecordsUiHost {
1091
1089
  * Dashboards area lists no pages and offers no "New page" — absent, never dead.
1092
1090
  */
1093
1091
  pageHref?: (target: {
1094
- pageId: Uuid;
1095
- } | {
1096
- newOnTable: Uuid;
1097
- } | {
1098
1092
  interfaceId: Uuid;
1099
1093
  } | {
1100
1094
  newInterfaceOnTable: Uuid;
1095
+ } | {
1096
+ newOnTable: Uuid;
1097
+ } | {
1098
+ pageId: Uuid;
1101
1099
  }) => string;
1102
1100
  /**
1103
1101
  * OPTIONAL. ASK THE AGENT TO CHANGE THIS DASHBOARD (SCR-16).
@@ -1141,7 +1139,7 @@ interface FormulaHelpAsk {
1141
1139
  /** The table's other columns, the ones the formula may read as {Name}. */
1142
1140
  columns: readonly Field[];
1143
1141
  /** The store's reading of what is wrong with the text, when it does not parse. */
1144
- mistake: string | null;
1142
+ mistake: null | string;
1145
1143
  /** The functions the store works out, as a person types them. */
1146
1144
  functions: readonly string[];
1147
1145
  /** Put a formula into the box (unsaved). */
@@ -1158,7 +1156,7 @@ interface AgentBuildAsk {
1158
1156
  * `column`: a layout needs a column the table lacks (`ViewNeeds`, lane DATA-V2-VIEWS-1) — the
1159
1157
  * agent adds it through the store's field door, held for approval like every agent schema change.
1160
1158
  */
1161
- kind: "form" | "booking" | "portal" | "digest" | "column";
1159
+ kind: "booking" | "column" | "digest" | "form" | "portal";
1162
1160
  tableId: Uuid;
1163
1161
  /** The sentence this package would say. A host opens its composer with it. */
1164
1162
  suggestion: string;
@@ -1181,7 +1179,7 @@ interface ReaskContext {
1181
1179
  tableId: Uuid;
1182
1180
  /** Null while the canvas has no dashboard yet — the answer is the first one. */
1183
1181
  dashboardId: Uuid | null;
1184
- dashboardName: string | null;
1182
+ dashboardName: null | string;
1185
1183
  }
1186
1184
  /**
1187
1185
  * What a host's share dialog is being opened ON. A Table is a record in this
@@ -1224,9 +1222,9 @@ interface OrganizationMember {
1224
1222
  /** The platform's user id. This is what a Person record carries as `user_id`. */
1225
1223
  userId: string;
1226
1224
  /** Their display name, when the platform has one. */
1227
- name?: string | null;
1228
- email?: string | null;
1229
- avatarUrl?: string | null;
1225
+ name?: null | string;
1226
+ email?: null | string;
1227
+ avatarUrl?: null | string;
1230
1228
  }
1231
1229
  /** The durable half of offline capture: read the queue, write it, that is all. */
1232
1230
  interface CaptureQueuePort {
@@ -1247,7 +1245,7 @@ interface PendingCapture {
1247
1245
  device: string;
1248
1246
  /** How many times sending has been tried, and what the store last said. */
1249
1247
  attempts: number;
1250
- lastRefusal?: string | null;
1248
+ lastRefusal?: null | string;
1251
1249
  }
1252
1250
  /** What the Swipe layout hands the host's logic graph: the deck's cards, its answers, and where edits go. */
1253
1251
  interface DeckLogicEditorProps {
@@ -1270,7 +1268,7 @@ declare function tableName(table: Table): string;
1270
1268
  * NOT shown as a truncated uuid: it says it has no name yet, because "8f2c1b0a"
1271
1269
  * tells a person nothing and looks like a bug.
1272
1270
  */
1273
- declare function recordName(document: RecordDocument | undefined, titleKey?: string | null, fallback?: string): string;
1271
+ declare function recordName(document: RecordDocument | undefined, titleKey?: null | string, fallback?: string): string;
1274
1272
  /**
1275
1273
  * Is this string the store's id for something, rather than words a person wrote?
1276
1274
  *
@@ -1279,7 +1277,7 @@ declare function recordName(document: RecordDocument | undefined, titleKey?: str
1279
1277
  */
1280
1278
  declare function looksLikeId(value: unknown): boolean;
1281
1279
  /** The same question for a row the read door returned. */
1282
- declare function rowName(row: ReadRow | undefined, titleKey?: string | null, fallback?: string): string;
1280
+ declare function rowName(row: ReadRow | undefined, titleKey?: null | string, fallback?: string): string;
1283
1281
  /** A Table as far as naming is concerned — its own declared title column (REC-2). */
1284
1282
  type TitledTable = Pick<Table, "title_field"> | null | undefined;
1285
1283
  /**
@@ -1322,10 +1320,10 @@ declare const UNREAD_RECORD_LABEL = "Couldn't load this name";
1322
1320
  * table's own singular ("Visit"), else its name, else the fallback; a Title-case word is written
1323
1321
  * the way a sentence writes it ("visit"), an acronym is kept ("MRI scan").
1324
1322
  */
1325
- declare function singularNoun(table: {
1326
- name?: string | null;
1327
- label_singular?: string | null;
1328
- } | null | undefined, fallback?: string): string;
1323
+ declare function singularNoun(table: null | undefined | {
1324
+ name?: null | string;
1325
+ label_singular?: null | string;
1326
+ }, fallback?: string): string;
1329
1327
  /**
1330
1328
  * THE FIELD A CARD IS TITLED BY — kanban, calendar, gallery and pipeline alike.
1331
1329
  *
@@ -1334,10 +1332,10 @@ declare function singularNoun(table: {
1334
1332
  * checkbox, never the group column, never a system stamp). `undefined` when nothing can, and
1335
1333
  * the card falls back to `rowName`, which says "Untitled" rather than "false".
1336
1334
  */
1337
- declare function cardTitleField(fields: readonly Field[], titleKey: string | null | undefined, exclude?: readonly (string | null | undefined)[]): Field | undefined;
1335
+ declare function cardTitleField(fields: readonly Field[], titleKey: null | string | undefined, exclude?: readonly (null | string | undefined)[]): Field | undefined;
1338
1336
 
1339
1337
  /** What the roster can tell us about a user id. `null` when it cannot. */
1340
- type ResolveName = (userId: Uuid) => string | null;
1338
+ type ResolveName = (userId: Uuid) => null | string;
1341
1339
  /** The honest stand-in when nobody and nothing can put a name to the author. */
1342
1340
  declare const SOMEBODY = "somebody in this organization";
1343
1341
  /** The platform's own word for itself. Never "null", never "system_user". */
@@ -1386,7 +1384,7 @@ declare function withheldSentence(field: Pick<Field, "key" | "label" | "name">,
1386
1384
  * `FIELD_TYPE_CHOICES`'s coverage and as a red `kindsWithNoChoice()` below — never as a
1387
1385
  * silence.
1388
1386
  */
1389
- type PickableFieldType = DeclarableFieldKind | SystemFieldKind | "entity_reference" | NewerFieldKind | LookFieldKind;
1387
+ type PickableFieldType = "entity_reference" | DeclarableFieldKind | LookFieldKind | NewerFieldKind | SystemFieldKind;
1390
1388
  /**
1391
1389
  * A KIND THAT IS A PLAIN COLUMN WEARING A LOOK (grids review 3, lane H item 5). The store keeps a
1392
1390
  * column's "Shows as" on the Field (`display_format`, `custom.display_format_ids()` has `rating` and
@@ -1395,7 +1393,7 @@ type PickableFieldType = DeclarableFieldKind | SystemFieldKind | "entity_referen
1395
1393
  * "Shows as" picker makes one. Offered whenever the store does not yet publish the kind as its own
1396
1394
  * word (`custom.field_kinds()`): a Rating the store publishes goes as `{ type: "rating", max }`.
1397
1395
  */
1398
- type LookFieldKind = "time" | "color_pair" | "measure" | "type_style" | "shadow";
1396
+ type LookFieldKind = "color_pair" | "measure" | "shadow" | "time" | "type_style";
1399
1397
  /**
1400
1398
  * THE STORE'S OWN STAMPS AS COLUMNS (GRID-PRIMITIVES G5; TABLE-PARITY H2 H3, lane
1401
1399
  * DEFAULT-GRID-PARITY). `custom.field_declare` takes these three WORDS and makes each a formula
@@ -1461,16 +1459,16 @@ interface PickerTable {
1461
1459
  /** The Table document's own key for the same fact (`tableList()` spreads the document onto the Table). */
1462
1460
  kept_by_the_app?: boolean | null | undefined;
1463
1461
  /** `custom.table_facts`: which feature keeps it (`choices` for a value set). */
1464
- kept_for?: string | null | undefined;
1462
+ kept_for?: null | string | undefined;
1465
1463
  /** `custom.data_home_tables`: the store's one word for what it is (`list` for a value set). */
1466
- kind?: string | null | undefined;
1464
+ kind?: null | string | undefined;
1467
1465
  /** The table a value set belongs to (`custom.table_facts.used_in_table_id`). */
1468
- used_in_table_id?: string | null | undefined;
1466
+ used_in_table_id?: null | string | undefined;
1469
1467
  /** A checklist's steps, a booking page's slots, a workflow's states. */
1470
1468
  work_kind?: unknown;
1471
- slug?: string | null | undefined;
1469
+ slug?: null | string | undefined;
1472
1470
  /** When the table was made — what tells two lists apart once their column is gone. */
1473
- created_at?: string | null | undefined;
1471
+ created_at?: null | string | undefined;
1474
1472
  }
1475
1473
  /** A value set: the List a choice column keeps its choices in. */
1476
1474
  declare function isValueSet(table: PickerTable): boolean;
@@ -1495,7 +1493,7 @@ interface TablePickerEntries<T extends PickerTable> {
1495
1493
  */
1496
1494
  declare function tablePickerEntries<T extends PickerTable>(tables: readonly T[], options?: {
1497
1495
  showLists?: boolean;
1498
- keep?: string | null | undefined;
1496
+ keep?: null | string | undefined;
1499
1497
  }): TablePickerEntries<T>;
1500
1498
 
1501
1499
  /**
@@ -1562,7 +1560,7 @@ type GridGrouping = {
1562
1560
  /** One crumb of a saved drill trail. `value: null` is "no value". */
1563
1561
  type GridDrillStep = {
1564
1562
  dim: string;
1565
- value: string | null;
1563
+ value: null | string;
1566
1564
  };
1567
1565
  /** One sub-group level: a Field key and its section order. */
1568
1566
  type GridSubGroup = {
@@ -1617,7 +1615,7 @@ type GridPresentation = {
1617
1615
  * The gallery's card size, remembered the same way the grid remembers its
1618
1616
  * row height — a per-view look, not a global default.
1619
1617
  */
1620
- gallerySize?: "small" | "medium" | "large";
1618
+ gallerySize?: "large" | "medium" | "small";
1621
1619
  /**
1622
1620
  * THE BOARD'S OWN LOOK (lane BOARD-SWIMLANES, Notion's board options). All kept on the view, all
1623
1621
  * read only by the kanban layout. Absent means the board's default: columns wear their choice's
@@ -1630,7 +1628,7 @@ type GridPresentation = {
1630
1628
  * boardCounts false = no count beside the heading
1631
1629
  * boardLanesShut the swimlanes kept shut to a strip, by the lane's name
1632
1630
  */
1633
- boardSize?: "small" | "medium" | "large";
1631
+ boardSize?: "large" | "medium" | "small";
1634
1632
  boardPreview?: string;
1635
1633
  boardHideEmpty?: boolean;
1636
1634
  boardColorColumns?: boolean;
@@ -1677,7 +1675,7 @@ type GridPresentation = {
1677
1675
  footer?: FooterPlacement;
1678
1676
  };
1679
1677
  /** Where a grid's footer sits. */
1680
- type FooterPlacement = "sticky" | "inline";
1678
+ type FooterPlacement = "inline" | "sticky";
1681
1679
  /**
1682
1680
  * G1's TABLE-LEVEL COLORS (`custom.table_decorations` / `client.tableDecorations`),
1683
1681
  * TRANSLATED INTO A `TableStyle` — the same document a saved view's own `presentation.style`
@@ -1724,7 +1722,7 @@ declare function isInterface(row: Pick<DashboardSummary, "presentation"> | {
1724
1722
  presentation?: unknown;
1725
1723
  }): boolean;
1726
1724
 
1727
- type TableLane = "mine" | "organization" | "system" | "community" | "app";
1725
+ type TableLane = "app" | "community" | "mine" | "organization" | "system";
1728
1726
  /**
1729
1727
  * WHETHER THE STORE ITSELF KEEPS THIS TABLE FOR THE APP — a choice list made per
1730
1728
  * choice field, for one. The Table record's document carries `kept_by_the_app:
@@ -1749,7 +1747,7 @@ declare function laneFor(table: Table): TableLane;
1749
1747
  */
1750
1748
  declare function bodyFieldOf(fields: readonly Field[]): Field | undefined;
1751
1749
 
1752
- declare const readLooks: (client: Pick<_ai_matrx_records_core.RecordsClient, "viewLookRead">, tableId: _ai_matrx_records.Uuid) => Promise<_ai_matrx_records.RecordsResult<Record<string, Partial<Pick<base.SavedViewSpec<GridPresentation>, "layout" | "groupField" | "swimlaneField" | "collapsedColumns" | "measure" | "dateField" | "startField" | "endField" | "imageField" | "mapField" | "mapLngField" | "parentField" | "answerField" | "conditionField" | "sorts" | "where" | "presentation">>>>>;
1750
+ declare const readLooks: (client: Pick<_ai_matrx_records_core.RecordsClient, "viewLookRead">, tableId: _ai_matrx_records.Uuid) => Promise<_ai_matrx_records.RecordsResult<Record<string, Partial<Pick<base.SavedViewSpec<GridPresentation>, "answerField" | "collapsedColumns" | "conditionField" | "dateField" | "endField" | "groupField" | "imageField" | "layout" | "mapField" | "mapLngField" | "measure" | "parentField" | "presentation" | "sorts" | "startField" | "swimlaneField" | "where">>>>>;
1753
1751
 
1754
1752
  declare const viewFromRow: (row: _ai_matrx_records.SavedViewRow) => base.SavedView<GridPresentation>;
1755
1753
 
@@ -1774,7 +1772,7 @@ declare function isViewAddressEmpty(state: ViewAddressState | null | undefined):
1774
1772
  /** The state as flat address words. Empty parts are left out, so a plain view has a plain address. */
1775
1773
  declare function viewAddressToParams(state: ViewAddressState | null | undefined): Record<string, string>;
1776
1774
  /** The address words back into a state; null when the address says nothing (or only nonsense). */
1777
- declare function viewAddressFromParams(get: (key: string) => string | null | undefined): ViewAddressState | null;
1775
+ declare function viewAddressFromParams(get: (key: string) => null | string | undefined): ViewAddressState | null;
1778
1776
  /** Two states that say the same thing — so a report that changes nothing is never sent. */
1779
1777
  declare function sameViewAddress(a: ViewAddressState | null | undefined, b: ViewAddressState | null | undefined): boolean;
1780
1778
 
@@ -1829,10 +1827,10 @@ interface PlainRefusal {
1829
1827
  declare function refusalForAPerson(error: RecordsError): PlainRefusal;
1830
1828
 
1831
1829
  /** What a "the app's code depends on this table" refusal names, or null for any other refusal. */
1832
- declare function codeDependsRefusal(error: RecordsError | null | undefined): {
1830
+ declare function codeDependsRefusal(error: RecordsError | null | undefined): null | {
1833
1831
  slug: string;
1834
- declaredIn: string | null;
1835
- } | null;
1832
+ declaredIn: null | string;
1833
+ };
1836
1834
 
1837
1835
  interface AnnounceTableArchived {
1838
1836
  notify: RecordsUiHost["notify"];
@@ -1846,10 +1844,10 @@ interface AnnounceTableArchived {
1846
1844
  declare function announceTableArchived({ notify, client, tableId, name, onRestored }: AnnounceTableArchived): void;
1847
1845
 
1848
1846
  /** Every place a records surface shows while its first read is out. */
1849
- type RecordsSkeletonLayout = "grid" | "kanban" | "gallery" | "list" | "calendar" | "timeline" | "map" | "orgchart" | "pivot" | "swipe" | "form" | "record" | "chart" | "home";
1847
+ type RecordsSkeletonLayout = "calendar" | "chart" | "form" | "gallery" | "grid" | "home" | "kanban" | "list" | "map" | "orgchart" | "pivot" | "record" | "swipe" | "timeline";
1850
1848
  declare const RECORDS_SKELETON_LAYOUTS: readonly RecordsSkeletonLayout[];
1851
1849
  /** A layout word the address or a view carries, as the skeleton that stands for it. */
1852
- declare function skeletonLayoutFor(layout: string | null | undefined): RecordsSkeletonLayout;
1850
+ declare function skeletonLayoutFor(layout: null | string | undefined): RecordsSkeletonLayout;
1853
1851
 
1854
1852
  /** What the list needs to know about the record. */
1855
1853
  interface RecordActionSubject {
@@ -1858,7 +1856,7 @@ interface RecordActionSubject {
1858
1856
  /** The record's name as every card reads it (`recordNameIn` / `cardWords`). */
1859
1857
  name: string;
1860
1858
  }
1861
- type RecordHandler = (record: RecordActionSubject) => void | Promise<void>;
1859
+ type RecordHandler = (record: RecordActionSubject) => Promise<void> | void;
1862
1860
  /** THE SIDE EFFECTS THIS LIST CANNOT OWN. A handler left out keeps its action, disabled. */
1863
1861
  interface RecordActionHost {
1864
1862
  /** Origin for Copy link and Open in new tab. Default `https://www.aimatrx.com`. */
@@ -1871,7 +1869,7 @@ interface RecordActionHost {
1871
1869
  open?: RecordHandler;
1872
1870
  openInNewTab?: (url: string, record: RecordActionSubject) => void;
1873
1871
  /** Runs inside the click (the clipboard needs the gesture). */
1874
- copyText?: (text: string, record: RecordActionSubject) => void | Promise<void>;
1872
+ copyText?: (text: string, record: RecordActionSubject) => Promise<void> | void;
1875
1873
  duplicate?: RecordHandler;
1876
1874
  /** Merge another record of the same table into this one (`MergeRecordDialog`). */
1877
1875
  merge?: RecordHandler;