@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
@@ -4,7 +4,7 @@ declare function personActor(userId: Uuid | null | undefined): RecordsActor;
4
4
  declare function recordsDataSource(client: object, fallbackSchema?: string): RecordsDataSource;
5
5
 
6
6
  /** What the roster can tell us about a user id. `null` when it cannot. */
7
- type ResolveName = (userId: Uuid) => string | null;
7
+ type ResolveName = (userId: Uuid) => null | string;
8
8
  /** The honest stand-in when nobody and nothing can put a name to the author. */
9
9
  declare const SOMEBODY = "somebody in this organization";
10
10
  /** The platform's own word for itself. Never "null", never "system_user". */
@@ -4,7 +4,7 @@ declare function personActor(userId: Uuid | null | undefined): RecordsActor;
4
4
  declare function recordsDataSource(client: object, fallbackSchema?: string): RecordsDataSource;
5
5
 
6
6
  /** What the roster can tell us about a user id. `null` when it cannot. */
7
- type ResolveName = (userId: Uuid) => string | null;
7
+ type ResolveName = (userId: Uuid) => null | string;
8
8
  /** The honest stand-in when nobody and nothing can put a name to the author. */
9
9
  declare const SOMEBODY = "somebody in this organization";
10
10
  /** The platform's own word for itself. Never "null", never "system_user". */
@@ -8,16 +8,16 @@ import * as react from 'react';
8
8
  * hosts: matrx-frontend's run pages and record panels, and workflow-studio's question form.
9
9
  * Contract: common-docs/systems/workflows/human-gates/FEATURE.md.
10
10
  */
11
- type DecisionChoice = "confirm" | "not_true" | "edit" | "pick_one" | "pick_many" | "custom";
11
+ type DecisionChoice = "confirm" | "custom" | "edit" | "not_true" | "pick_many" | "pick_one";
12
12
  /** Verdicts that carry a value the person typed or picked. */
13
13
  declare const VALUE_VERDICTS: ReadonlySet<DecisionChoice>;
14
14
  interface DecisionItemView {
15
15
  key: string;
16
16
  label: string;
17
17
  value: unknown;
18
- source: string | null;
18
+ source: null | string;
19
19
  /** 0..1, or null when nobody measured it. */
20
- confidence: number | null;
20
+ confidence: null | number;
21
21
  choices: DecisionChoice[];
22
22
  options: {
23
23
  value: unknown;
@@ -31,7 +31,7 @@ interface DecisionSpecView {
31
31
  submitLabel: string;
32
32
  /** A gate addressed to an org-chart seat: the engine's words for who it asks
33
33
  * ("Waiting on Arman (Brand owner)" / "No one holds Brand owner"). */
34
- seatNotice: string | null;
34
+ seatNotice: null | string;
35
35
  /** False when nobody held the seat as the gate opened. */
36
36
  seatFilled: boolean;
37
37
  }
@@ -8,16 +8,16 @@ import * as react from 'react';
8
8
  * hosts: matrx-frontend's run pages and record panels, and workflow-studio's question form.
9
9
  * Contract: common-docs/systems/workflows/human-gates/FEATURE.md.
10
10
  */
11
- type DecisionChoice = "confirm" | "not_true" | "edit" | "pick_one" | "pick_many" | "custom";
11
+ type DecisionChoice = "confirm" | "custom" | "edit" | "not_true" | "pick_many" | "pick_one";
12
12
  /** Verdicts that carry a value the person typed or picked. */
13
13
  declare const VALUE_VERDICTS: ReadonlySet<DecisionChoice>;
14
14
  interface DecisionItemView {
15
15
  key: string;
16
16
  label: string;
17
17
  value: unknown;
18
- source: string | null;
18
+ source: null | string;
19
19
  /** 0..1, or null when nobody measured it. */
20
- confidence: number | null;
20
+ confidence: null | number;
21
21
  choices: DecisionChoice[];
22
22
  options: {
23
23
  value: unknown;
@@ -31,7 +31,7 @@ interface DecisionSpecView {
31
31
  submitLabel: string;
32
32
  /** A gate addressed to an org-chart seat: the engine's words for who it asks
33
33
  * ("Waiting on Arman (Brand owner)" / "No one holds Brand owner"). */
34
- seatNotice: string | null;
34
+ seatNotice: null | string;
35
35
  /** False when nobody held the seat as the gate opened. */
36
36
  seatFilled: boolean;
37
37
  }
@@ -29,7 +29,7 @@ export { isUuidValue } from '@ai-matrx/kit/uuid';
29
29
 
30
30
  interface EntityDoors {
31
31
  /** Canonical route to the record, or null when the token has no `hrefFor`. */
32
- href: string | null;
32
+ href: null | string;
33
33
  /** True when a peek is registered for this token. */
34
34
  canPeek: boolean;
35
35
  /** Catalog key to hand `<ResourcePeekHost kind=…>`. */
@@ -39,7 +39,7 @@ interface EntityDoors {
39
39
  className?: string;
40
40
  }> | null;
41
41
  /** Singular display label ("Agent", "Note"), or null for unknown tokens. */
42
- label: string | null;
42
+ label: null | string;
43
43
  }
44
44
  /**
45
45
  * Resolve every door we can open for one record.
@@ -54,7 +54,7 @@ interface EntityDoors {
54
54
  * Unknown tokens degrade to "no doors", never throw: a surface passing a token
55
55
  * we don't register yet must still render its text.
56
56
  */
57
- declare function resolveEntityDoors(token: string, id: string, hrefOverride?: string | null): EntityDoors;
57
+ declare function resolveEntityDoors(token: string, id: string, hrefOverride?: null | string): EntityDoors;
58
58
  /**
59
59
  * Resolve an FK COLUMN NAME to a canonical entity token — `agent_id` → `agent`,
60
60
  * `task_id` → `task`. Deliberately strict: exact `<token>_id` only, and only
@@ -65,7 +65,7 @@ declare function resolveEntityDoors(token: string, id: string, hrefOverride?: st
65
65
  * Used by generic surfaces that render a row's raw columns (the data-table row
66
66
  * inspector) and therefore can't be told each column's target by hand.
67
67
  */
68
- declare function doorTokenFromColumnName(column: string): string | null;
68
+ declare function doorTokenFromColumnName(column: string): null | string;
69
69
  /**
70
70
  * True when the platform can open this token at all (route or peek).
71
71
  * Use it to decide whether a bare id is worth rendering as a door — never to
@@ -82,21 +82,21 @@ declare function hasAnyDoor(token: string): boolean;
82
82
  * `/agents/<a workflow id>`: a door onto the wrong record, which reads as a
83
83
  * fact and is a lie.
84
84
  */
85
- declare function tokenFromPrecedingWords(preceding: string): string | null;
85
+ declare function tokenFromPrecedingWords(preceding: string): null | string;
86
86
  /**
87
87
  * One piece of a sentence: plain prose, an id we can open a door on, or a run
88
88
  * the author marked as CODE with markdown backticks.
89
89
  */
90
90
  type SentenceSegment = {
91
- kind: "text";
92
- text: string;
93
- } | {
94
91
  kind: "code";
95
92
  text: string;
96
93
  } | {
97
94
  kind: "ref";
98
95
  id: string;
99
96
  token: string;
97
+ } | {
98
+ kind: "text";
99
+ text: string;
100
100
  };
101
101
  /**
102
102
  * INLINE CODE, THE WAY ITS AUTHOR WROTE IT.
@@ -130,7 +130,7 @@ type SentenceSegment = {
130
130
  * wrote to say "this is code" and were never words meant to be read. A caller
131
131
  * that joins the segments back together gets the server's words unchanged.
132
132
  */
133
- declare function segmentSentenceIds(text: string, defaultToken?: string | null): SentenceSegment[];
133
+ declare function segmentSentenceIds(text: string, defaultToken?: null | string): SentenceSegment[];
134
134
 
135
135
  /**
136
136
  * src/entity-ref/slot.ts — @ai-matrx/records-ui/entity-doors (no "use client": pure, server-safe)
@@ -173,7 +173,7 @@ interface EntityRefDescriptor {
173
173
  /** Canonical route to one record, or null when the type has no page. */
174
174
  hrefFor: ((id: string) => string) | null;
175
175
  /** The column a generic quick-look reads the title from; null = no generic quick-look. */
176
- titleColumn: string | null;
176
+ titleColumn: null | string;
177
177
  /**
178
178
  * True when the type's table is NOT browser-readable (a candidates lister stands in), so a
179
179
  * generic quick-look would always fail and is not offered.
@@ -193,27 +193,23 @@ interface EntityRefPeekAsk {
193
193
  kind: string;
194
194
  id: string;
195
195
  /** The destination the CALLER resolved, when a token alone cannot name it. */
196
- href?: string | null | undefined;
196
+ href?: null | string | undefined;
197
197
  anchor?: Element | null | undefined;
198
- trigger?: "hover" | "click" | undefined;
198
+ trigger?: "click" | "hover" | undefined;
199
199
  /** Where the record opens when the host has no quick-look surface mounted. */
200
- fallbackHref?: string | null | undefined;
200
+ fallbackHref?: null | string | undefined;
201
201
  }
202
202
  /** An address resolved by the host's `useAddress` hook. */
203
203
  type EntityAddress = {
204
204
  state: "ready";
205
205
  href: string;
206
- }
207
- /** A REAL href that works while resolving (a server-side redirect route). */
208
- | {
209
- state: "resolving";
210
- href: string;
211
- }
212
- /** The record genuinely cannot be reached; `reason` is the sentence the UI says. */
213
- | {
206
+ } /** A REAL href that works while resolving (a server-side redirect route). */ | {
214
207
  state: "refused";
215
208
  reason: string;
216
- };
209
+ } | {
210
+ state: "resolving";
211
+ href: string;
212
+ } /** The record genuinely cannot be reached; `reason` is the sentence the UI says. */;
217
213
  interface EntityRefLinkProps {
218
214
  href: string;
219
215
  target?: string | undefined;
@@ -229,21 +225,21 @@ interface EntityRefLinkProps {
229
225
  }
230
226
  /** A person as an identity resolver answers them (UserIdentity-compatible). */
231
227
  interface EntityRefPerson {
232
- id?: string | null;
233
- email?: string | null;
234
- displayName?: string | null;
235
- avatarUrl?: string | null;
228
+ id?: null | string;
229
+ email?: null | string;
230
+ displayName?: null | string;
231
+ avatarUrl?: null | string;
236
232
  }
237
233
  interface EntityRefHost {
238
234
  registry: EntityRefRegistry;
239
- adminHref?: ((token: string, id: string) => string | null) | undefined;
235
+ adminHref?: ((token: string, id: string) => null | string) | undefined;
240
236
  hasPeek?: ((kind: string) => boolean) | undefined;
241
237
  openPeek?: ((ask: EntityRefPeekAsk) => void) | undefined;
242
238
  /**
243
239
  * A HOOK, called on every render of every reference: `id` is null for the tokens the host does
244
240
  * not resolve itself, and the hook returns null for them. Must call the same hooks every time.
245
241
  */
246
- useAddress?: ((token: string, id: string | null, context: string) => EntityAddress | null) | undefined;
242
+ useAddress?: ((token: string, id: null | string, context: string) => EntityAddress | null) | undefined;
247
243
  Link?: ComponentType<EntityRefLinkProps> | undefined;
248
244
  ErrorMenu?: ComponentType<{
249
245
  error: string;
@@ -29,7 +29,7 @@ export { isUuidValue } from '@ai-matrx/kit/uuid';
29
29
 
30
30
  interface EntityDoors {
31
31
  /** Canonical route to the record, or null when the token has no `hrefFor`. */
32
- href: string | null;
32
+ href: null | string;
33
33
  /** True when a peek is registered for this token. */
34
34
  canPeek: boolean;
35
35
  /** Catalog key to hand `<ResourcePeekHost kind=…>`. */
@@ -39,7 +39,7 @@ interface EntityDoors {
39
39
  className?: string;
40
40
  }> | null;
41
41
  /** Singular display label ("Agent", "Note"), or null for unknown tokens. */
42
- label: string | null;
42
+ label: null | string;
43
43
  }
44
44
  /**
45
45
  * Resolve every door we can open for one record.
@@ -54,7 +54,7 @@ interface EntityDoors {
54
54
  * Unknown tokens degrade to "no doors", never throw: a surface passing a token
55
55
  * we don't register yet must still render its text.
56
56
  */
57
- declare function resolveEntityDoors(token: string, id: string, hrefOverride?: string | null): EntityDoors;
57
+ declare function resolveEntityDoors(token: string, id: string, hrefOverride?: null | string): EntityDoors;
58
58
  /**
59
59
  * Resolve an FK COLUMN NAME to a canonical entity token — `agent_id` → `agent`,
60
60
  * `task_id` → `task`. Deliberately strict: exact `<token>_id` only, and only
@@ -65,7 +65,7 @@ declare function resolveEntityDoors(token: string, id: string, hrefOverride?: st
65
65
  * Used by generic surfaces that render a row's raw columns (the data-table row
66
66
  * inspector) and therefore can't be told each column's target by hand.
67
67
  */
68
- declare function doorTokenFromColumnName(column: string): string | null;
68
+ declare function doorTokenFromColumnName(column: string): null | string;
69
69
  /**
70
70
  * True when the platform can open this token at all (route or peek).
71
71
  * Use it to decide whether a bare id is worth rendering as a door — never to
@@ -82,21 +82,21 @@ declare function hasAnyDoor(token: string): boolean;
82
82
  * `/agents/<a workflow id>`: a door onto the wrong record, which reads as a
83
83
  * fact and is a lie.
84
84
  */
85
- declare function tokenFromPrecedingWords(preceding: string): string | null;
85
+ declare function tokenFromPrecedingWords(preceding: string): null | string;
86
86
  /**
87
87
  * One piece of a sentence: plain prose, an id we can open a door on, or a run
88
88
  * the author marked as CODE with markdown backticks.
89
89
  */
90
90
  type SentenceSegment = {
91
- kind: "text";
92
- text: string;
93
- } | {
94
91
  kind: "code";
95
92
  text: string;
96
93
  } | {
97
94
  kind: "ref";
98
95
  id: string;
99
96
  token: string;
97
+ } | {
98
+ kind: "text";
99
+ text: string;
100
100
  };
101
101
  /**
102
102
  * INLINE CODE, THE WAY ITS AUTHOR WROTE IT.
@@ -130,7 +130,7 @@ type SentenceSegment = {
130
130
  * wrote to say "this is code" and were never words meant to be read. A caller
131
131
  * that joins the segments back together gets the server's words unchanged.
132
132
  */
133
- declare function segmentSentenceIds(text: string, defaultToken?: string | null): SentenceSegment[];
133
+ declare function segmentSentenceIds(text: string, defaultToken?: null | string): SentenceSegment[];
134
134
 
135
135
  /**
136
136
  * src/entity-ref/slot.ts — @ai-matrx/records-ui/entity-doors (no "use client": pure, server-safe)
@@ -173,7 +173,7 @@ interface EntityRefDescriptor {
173
173
  /** Canonical route to one record, or null when the type has no page. */
174
174
  hrefFor: ((id: string) => string) | null;
175
175
  /** The column a generic quick-look reads the title from; null = no generic quick-look. */
176
- titleColumn: string | null;
176
+ titleColumn: null | string;
177
177
  /**
178
178
  * True when the type's table is NOT browser-readable (a candidates lister stands in), so a
179
179
  * generic quick-look would always fail and is not offered.
@@ -193,27 +193,23 @@ interface EntityRefPeekAsk {
193
193
  kind: string;
194
194
  id: string;
195
195
  /** The destination the CALLER resolved, when a token alone cannot name it. */
196
- href?: string | null | undefined;
196
+ href?: null | string | undefined;
197
197
  anchor?: Element | null | undefined;
198
- trigger?: "hover" | "click" | undefined;
198
+ trigger?: "click" | "hover" | undefined;
199
199
  /** Where the record opens when the host has no quick-look surface mounted. */
200
- fallbackHref?: string | null | undefined;
200
+ fallbackHref?: null | string | undefined;
201
201
  }
202
202
  /** An address resolved by the host's `useAddress` hook. */
203
203
  type EntityAddress = {
204
204
  state: "ready";
205
205
  href: string;
206
- }
207
- /** A REAL href that works while resolving (a server-side redirect route). */
208
- | {
209
- state: "resolving";
210
- href: string;
211
- }
212
- /** The record genuinely cannot be reached; `reason` is the sentence the UI says. */
213
- | {
206
+ } /** A REAL href that works while resolving (a server-side redirect route). */ | {
214
207
  state: "refused";
215
208
  reason: string;
216
- };
209
+ } | {
210
+ state: "resolving";
211
+ href: string;
212
+ } /** The record genuinely cannot be reached; `reason` is the sentence the UI says. */;
217
213
  interface EntityRefLinkProps {
218
214
  href: string;
219
215
  target?: string | undefined;
@@ -229,21 +225,21 @@ interface EntityRefLinkProps {
229
225
  }
230
226
  /** A person as an identity resolver answers them (UserIdentity-compatible). */
231
227
  interface EntityRefPerson {
232
- id?: string | null;
233
- email?: string | null;
234
- displayName?: string | null;
235
- avatarUrl?: string | null;
228
+ id?: null | string;
229
+ email?: null | string;
230
+ displayName?: null | string;
231
+ avatarUrl?: null | string;
236
232
  }
237
233
  interface EntityRefHost {
238
234
  registry: EntityRefRegistry;
239
- adminHref?: ((token: string, id: string) => string | null) | undefined;
235
+ adminHref?: ((token: string, id: string) => null | string) | undefined;
240
236
  hasPeek?: ((kind: string) => boolean) | undefined;
241
237
  openPeek?: ((ask: EntityRefPeekAsk) => void) | undefined;
242
238
  /**
243
239
  * A HOOK, called on every render of every reference: `id` is null for the tokens the host does
244
240
  * not resolve itself, and the hook returns null for them. Must call the same hooks every time.
245
241
  */
246
- useAddress?: ((token: string, id: string | null, context: string) => EntityAddress | null) | undefined;
242
+ useAddress?: ((token: string, id: null | string, context: string) => EntityAddress | null) | undefined;
247
243
  Link?: ComponentType<EntityRefLinkProps> | undefined;
248
244
  ErrorMenu?: ComponentType<{
249
245
  error: string;
@@ -30,7 +30,7 @@ export { isUuidValue } from '@ai-matrx/kit/uuid';
30
30
 
31
31
  interface EntityDoors {
32
32
  /** Canonical route to the record, or null when the token has no `hrefFor`. */
33
- href: string | null;
33
+ href: null | string;
34
34
  /** True when a peek is registered for this token. */
35
35
  canPeek: boolean;
36
36
  /** Catalog key to hand `<ResourcePeekHost kind=…>`. */
@@ -40,7 +40,7 @@ interface EntityDoors {
40
40
  className?: string;
41
41
  }> | null;
42
42
  /** Singular display label ("Agent", "Note"), or null for unknown tokens. */
43
- label: string | null;
43
+ label: null | string;
44
44
  }
45
45
  /**
46
46
  * Resolve every door we can open for one record.
@@ -55,7 +55,7 @@ interface EntityDoors {
55
55
  * Unknown tokens degrade to "no doors", never throw: a surface passing a token
56
56
  * we don't register yet must still render its text.
57
57
  */
58
- declare function resolveEntityDoors(token: string, id: string, hrefOverride?: string | null): EntityDoors;
58
+ declare function resolveEntityDoors(token: string, id: string, hrefOverride?: null | string): EntityDoors;
59
59
  /**
60
60
  * Resolve an FK COLUMN NAME to a canonical entity token — `agent_id` → `agent`,
61
61
  * `task_id` → `task`. Deliberately strict: exact `<token>_id` only, and only
@@ -66,7 +66,7 @@ declare function resolveEntityDoors(token: string, id: string, hrefOverride?: st
66
66
  * Used by generic surfaces that render a row's raw columns (the data-table row
67
67
  * inspector) and therefore can't be told each column's target by hand.
68
68
  */
69
- declare function doorTokenFromColumnName(column: string): string | null;
69
+ declare function doorTokenFromColumnName(column: string): null | string;
70
70
  /**
71
71
  * True when the platform can open this token at all (route or peek).
72
72
  * Use it to decide whether a bare id is worth rendering as a door — never to
@@ -83,21 +83,21 @@ declare function hasAnyDoor(token: string): boolean;
83
83
  * `/agents/<a workflow id>`: a door onto the wrong record, which reads as a
84
84
  * fact and is a lie.
85
85
  */
86
- declare function tokenFromPrecedingWords(preceding: string): string | null;
86
+ declare function tokenFromPrecedingWords(preceding: string): null | string;
87
87
  /**
88
88
  * One piece of a sentence: plain prose, an id we can open a door on, or a run
89
89
  * the author marked as CODE with markdown backticks.
90
90
  */
91
91
  type SentenceSegment = {
92
- kind: "text";
93
- text: string;
94
- } | {
95
92
  kind: "code";
96
93
  text: string;
97
94
  } | {
98
95
  kind: "ref";
99
96
  id: string;
100
97
  token: string;
98
+ } | {
99
+ kind: "text";
100
+ text: string;
101
101
  };
102
102
  /**
103
103
  * INLINE CODE, THE WAY ITS AUTHOR WROTE IT.
@@ -131,7 +131,7 @@ type SentenceSegment = {
131
131
  * wrote to say "this is code" and were never words meant to be read. A caller
132
132
  * that joins the segments back together gets the server's words unchanged.
133
133
  */
134
- declare function segmentSentenceIds(text: string, defaultToken?: string | null): SentenceSegment[];
134
+ declare function segmentSentenceIds(text: string, defaultToken?: null | string): SentenceSegment[];
135
135
 
136
136
  /**
137
137
  * src/entity-ref/slot.ts — @ai-matrx/records-ui/entity-doors (no "use client": pure, server-safe)
@@ -174,7 +174,7 @@ interface EntityRefDescriptor {
174
174
  /** Canonical route to one record, or null when the type has no page. */
175
175
  hrefFor: ((id: string) => string) | null;
176
176
  /** The column a generic quick-look reads the title from; null = no generic quick-look. */
177
- titleColumn: string | null;
177
+ titleColumn: null | string;
178
178
  /**
179
179
  * True when the type's table is NOT browser-readable (a candidates lister stands in), so a
180
180
  * generic quick-look would always fail and is not offered.
@@ -194,27 +194,23 @@ interface EntityRefPeekAsk {
194
194
  kind: string;
195
195
  id: string;
196
196
  /** The destination the CALLER resolved, when a token alone cannot name it. */
197
- href?: string | null | undefined;
197
+ href?: null | string | undefined;
198
198
  anchor?: Element | null | undefined;
199
- trigger?: "hover" | "click" | undefined;
199
+ trigger?: "click" | "hover" | undefined;
200
200
  /** Where the record opens when the host has no quick-look surface mounted. */
201
- fallbackHref?: string | null | undefined;
201
+ fallbackHref?: null | string | undefined;
202
202
  }
203
203
  /** An address resolved by the host's `useAddress` hook. */
204
204
  type EntityAddress = {
205
205
  state: "ready";
206
206
  href: string;
207
- }
208
- /** A REAL href that works while resolving (a server-side redirect route). */
209
- | {
210
- state: "resolving";
211
- href: string;
212
- }
213
- /** The record genuinely cannot be reached; `reason` is the sentence the UI says. */
214
- | {
207
+ } /** A REAL href that works while resolving (a server-side redirect route). */ | {
215
208
  state: "refused";
216
209
  reason: string;
217
- };
210
+ } | {
211
+ state: "resolving";
212
+ href: string;
213
+ } /** The record genuinely cannot be reached; `reason` is the sentence the UI says. */;
218
214
  interface EntityRefLinkProps {
219
215
  href: string;
220
216
  target?: string | undefined;
@@ -230,21 +226,21 @@ interface EntityRefLinkProps {
230
226
  }
231
227
  /** A person as an identity resolver answers them (UserIdentity-compatible). */
232
228
  interface EntityRefPerson {
233
- id?: string | null;
234
- email?: string | null;
235
- displayName?: string | null;
236
- avatarUrl?: string | null;
229
+ id?: null | string;
230
+ email?: null | string;
231
+ displayName?: null | string;
232
+ avatarUrl?: null | string;
237
233
  }
238
234
  interface EntityRefHost {
239
235
  registry: EntityRefRegistry;
240
- adminHref?: ((token: string, id: string) => string | null) | undefined;
236
+ adminHref?: ((token: string, id: string) => null | string) | undefined;
241
237
  hasPeek?: ((kind: string) => boolean) | undefined;
242
238
  openPeek?: ((ask: EntityRefPeekAsk) => void) | undefined;
243
239
  /**
244
240
  * A HOOK, called on every render of every reference: `id` is null for the tokens the host does
245
241
  * not resolve itself, and the hook returns null for them. Must call the same hooks every time.
246
242
  */
247
- useAddress?: ((token: string, id: string | null, context: string) => EntityAddress | null) | undefined;
243
+ useAddress?: ((token: string, id: null | string, context: string) => EntityAddress | null) | undefined;
248
244
  Link?: ComponentType<EntityRefLinkProps> | undefined;
249
245
  ErrorMenu?: ComponentType<{
250
246
  error: string;
@@ -304,7 +300,7 @@ interface EntityRefProps {
304
300
  * Display name. When omitted the id is shown truncated — acceptable only
305
301
  * when the name genuinely isn't loaded; prefer passing it.
306
302
  */
307
- name?: string | null;
303
+ name?: null | string;
308
304
  /** Override the registry route (e.g. an admin-side route for the same record). */
309
305
  href?: string;
310
306
  /** Show the entity's registry icon before the name. Default true. */
@@ -352,7 +348,7 @@ interface EntityRefProps {
352
348
  * `"lines"`: a title a person reads (a list of found items) wraps at word boundaries, at most
353
349
  * two lines, then ellipsis — never cut to a few characters, never broken mid-word.
354
350
  */
355
- wrap?: boolean | "lines";
351
+ wrap?: "lines" | boolean;
356
352
  /**
357
353
  * The NAME control stretches to fill the width, instead of hugging its text.
358
354
  *
@@ -493,12 +489,12 @@ interface EntityDoorControlsProps {
493
489
  /** The record's id. */
494
490
  id: string;
495
491
  /** Display name — used only for the control labels/tooltips. */
496
- name?: string | null;
492
+ name?: null | string;
497
493
  /**
498
494
  * Override the registry route. Honored exactly: `null` means "this record
499
495
  * has no door" and must not fall through to the registry; omit to defer.
500
496
  */
501
- href?: string | null;
497
+ href?: null | string;
502
498
  /** Hide the peek control even when one is registered. */
503
499
  disablePeek?: boolean;
504
500
  /** Hide the new-tab control. */
@@ -516,10 +512,10 @@ interface EntityDoorControlsProps {
516
512
  * any bar of 28px controls (card hover bars, attach-menu rows) so the bar
517
513
  * never mixes sizes. `sm` = the compact inline 20px door beside text.
518
514
  */
519
- size?: "sm" | "md";
515
+ size?: "md" | "sm";
520
516
  className?: string;
521
517
  }
522
- declare function EntityDoorControls({ token, id, name, href, disablePeek, disableNewTab, showOpen, alwaysShowActions, revealOnHover, extraActions, size, className, }: EntityDoorControlsProps): react__default.JSX.Element | null;
518
+ declare function EntityDoorControls({ token, id, name, href, disablePeek, disableNewTab, showOpen, alwaysShowActions, revealOnHover, extraActions, size, className, }: EntityDoorControlsProps): null | react__default.JSX.Element;
523
519
 
524
520
  /**
525
521
  * NewTabLink — THE box-with-arrow (lucide `ExternalLink`) control.
@@ -540,7 +536,7 @@ declare function EntityDoorControls({ token, id, name, href, disablePeek, disabl
540
536
  declare const NEW_TAB_CONTROL_CLASS: string;
541
537
  interface NewTabLinkProps {
542
538
  /** Where the new tab goes. Absent/empty → the control is absent. */
543
- href: string | null | undefined;
539
+ href: null | string | undefined;
544
540
  /** What opens, for the tooltip and screen readers ("Deep Research"). */
545
541
  label: string;
546
542
  className?: string;
@@ -550,7 +546,7 @@ interface NewTabLinkProps {
550
546
  /** Runs after the tab opens (e.g. close the palette that held the link). */
551
547
  onOpen?: () => void;
552
548
  }
553
- declare function NewTabLink({ href, label, className, iconClassName, children, onOpen, }: NewTabLinkProps): react__default.JSX.Element | null;
549
+ declare function NewTabLink({ href, label, className, iconClassName, children, onOpen, }: NewTabLinkProps): null | react__default.JSX.Element;
554
550
 
555
551
  /**
556
552
  * TextWithDoors — THE way to print a sentence somebody else wrote.
@@ -588,13 +584,13 @@ declare function NewTabLink({ href, label, className, iconClassName, children, o
588
584
 
589
585
  interface TextWithDoorsProps {
590
586
  /** The sentence, exactly as its author wrote it. */
591
- text: string | null | undefined;
587
+ text: null | string | undefined;
592
588
  /**
593
589
  * The entity type this surface KNOWS its sentences are about, used only when
594
590
  * the prose names nothing openable — a mandate-resolution refusal is always
595
591
  * about an agent, and its screen may say so.
596
592
  */
597
- defaultToken?: string | null;
593
+ defaultToken?: null | string;
598
594
  /**
599
595
  * Ids open in a NEW TAB (default). These sentences live in banners, panels
600
596
  * and sheets over work in progress; navigating the tab away to go read the
@@ -604,7 +600,7 @@ interface TextWithDoorsProps {
604
600
  /** Classes for each id's `EntityRef` wrapper. */
605
601
  refClassName?: string;
606
602
  }
607
- declare function TextWithDoors({ text, defaultToken, openInNewTab, refClassName, }: TextWithDoorsProps): react__default.JSX.Element | null;
603
+ declare function TextWithDoors({ text, defaultToken, openInNewTab, refClassName, }: TextWithDoorsProps): null | react__default.JSX.Element;
608
604
 
609
605
  /**
610
606
  * toastDoor — the door for a record a TOAST just told you about.
@@ -640,19 +636,19 @@ interface ToastDoorOptions {
640
636
  * Override the registry route. Honored exactly: `null` means "no door" and
641
637
  * must not fall through to the registry.
642
638
  */
643
- href?: string | null;
639
+ href?: null | string;
644
640
  }
645
- declare function toastDoor(token: string, id: string | null | undefined, options?: ToastDoorOptions): react__default.ReactNode | undefined;
641
+ declare function toastDoor(token: string, id: null | string | undefined, options?: ToastDoorOptions): react__default.ReactNode | undefined;
646
642
 
647
643
  interface EntityHrefResult {
648
644
  /** The href, or null while resolving / when the record cannot be placed. */
649
- href: string | null;
645
+ href: null | string;
650
646
  /**
651
647
  * Set only when the record genuinely cannot be reached. The UI must SAY
652
648
  * this, not render a link that 404s and not render a dead-looking control
653
649
  * with no explanation.
654
650
  */
655
- refusal: string | null;
651
+ refusal: null | string;
656
652
  /** True while an address is still being resolved — not a refusal. */
657
653
  resolving: boolean;
658
654
  }
@@ -667,25 +663,25 @@ interface RecordStampActor {
667
663
  loading: boolean;
668
664
  }
669
665
  interface RecordStampsProps {
670
- organizationId?: string | null;
671
- createdAt?: string | null;
666
+ organizationId?: null | string;
667
+ createdAt?: null | string;
672
668
  /**
673
669
  * The row's creator. OMIT for a COMPONENT row (one that takes its access
674
670
  * from a parent): there the database rewrites `created_by` to the PARENT's
675
671
  * owner (db-rules §6d-1), so it is not who created this row — pass
676
672
  * `component` instead and the Created stamp shows the time only.
677
673
  */
678
- createdBy?: string | null;
674
+ createdBy?: null | string;
679
675
  /** A component row: the Created stamp carries no actor (see `createdBy`). */
680
676
  component?: boolean;
681
- updatedAt?: string | null;
682
- updatedBy?: string | null;
683
- deletedAt?: string | null;
684
- version?: number | null;
677
+ updatedAt?: null | string;
678
+ updatedBy?: null | string;
679
+ deletedAt?: null | string;
680
+ version?: null | number;
685
681
  /** Formatter for a timestamp — pass the surface's own (e.g. `formatDate`). */
686
- formatTimestamp: (value: string | null) => string;
682
+ formatTimestamp: (value: null | string) => string;
687
683
  /** Resolver from `useRecordActors` — call the hook in the parent. */
688
- resolveActor: ((id: string | null | undefined) => RecordStampActor | null) | null;
684
+ resolveActor: ((id: null | string | undefined) => RecordStampActor | null) | null;
689
685
  className?: string;
690
686
  }
691
687
  declare function RecordStamps({ createdAt, createdBy, component, updatedAt, updatedBy, deletedAt, version, formatTimestamp, resolveActor, className, }: RecordStampsProps): react.JSX.Element;