@homepages/concrete 6.1.0 → 7.0.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 (87) hide show
  1. package/CHANGELOG.md +166 -0
  2. package/codemods/manifest.json +17 -0
  3. package/codemods/object-form-only.mjs +39 -0
  4. package/codemods/steps/list-object-form.mjs +688 -0
  5. package/codemods/steps/select-object-form.mjs +210 -0
  6. package/dist/artifact/playground/client/assets/index-D8eepVr-.js +1101 -0
  7. package/dist/artifact/playground/client/index.html +1 -1
  8. package/dist/artifact/playground/host.mjs +14 -14
  9. package/dist/asset-modules.d.ts +2 -1
  10. package/dist/cli/check/stages/render.js +1 -1
  11. package/dist/cli/check/stages/sections.js +1 -1
  12. package/dist/fixtures/canonical.d.ts +2 -5
  13. package/dist/fixtures/media.js +11 -25
  14. package/dist/fixtures/property.js +28 -16
  15. package/dist/fixtures/resolve.js +75 -32
  16. package/dist/fixtures/rows.js +3 -83
  17. package/dist/fixtures.d.ts +17 -9
  18. package/dist/index.d.ts +9 -9
  19. package/dist/packages/external/concrete/package.js +1 -1
  20. package/dist/packages/internal/fill-bake/dist/bake-property-ref.js +31 -8
  21. package/dist/packages/internal/fill-bake/dist/derive-source.js +15 -4
  22. package/dist/packages/internal/fill-bake/dist/index.js +2 -2
  23. package/dist/packages/internal/fill-vocabulary/dist/origination.js +6 -1
  24. package/dist/packages/internal/fill-vocabulary/dist/row-reads.js +15 -0
  25. package/dist/packages/internal/property-facts/dist/index.js +1 -1
  26. package/dist/packages/internal/property-facts/dist/{property-facts-5pxZnlkh.js → property-facts-Cy7-O4p0.js} +2 -5
  27. package/dist/packages/internal/section-contracts/dist/catalog.js +0 -4
  28. package/dist/packages/internal/section-contracts/dist/choose-select-contract.js +4 -4
  29. package/dist/packages/internal/section-contracts/dist/display-evidence-contract.js +2 -1
  30. package/dist/packages/internal/section-contracts/dist/fill-spec-view.js +5 -1
  31. package/dist/packages/internal/section-contracts/dist/group-contract.js +1 -3
  32. package/dist/packages/internal/section-contracts/dist/index.js +0 -1
  33. package/dist/packages/internal/section-contracts/dist/list-fill-contract.js +3 -3
  34. package/dist/packages/internal/section-contracts/dist/list-scalar-contract.js +1 -5
  35. package/dist/packages/internal/section-contracts/dist/name-title-contract.js +2 -2
  36. package/dist/packages/internal/section-contracts/dist/pooling-field-contract.js +3 -1
  37. package/dist/packages/internal/section-contracts/dist/row-fill-contract.js +14 -0
  38. package/dist/packages/internal/section-contracts/dist/runners.js +0 -5
  39. package/dist/packages/internal/section-contracts/dist/source-contract.js +80 -4
  40. package/dist/packages/internal/section-contracts/dist/writer-reads-fact-contract.js +12 -6
  41. package/dist/packages/internal/source-resolution/dist/index.js +57 -20
  42. package/dist/packages/internal/template-contracts/dist/facts-view.d.ts +16 -17
  43. package/dist/packages/internal/template-contracts/dist/facts-view.js +6 -18
  44. package/dist/packages/internal/template-contracts/dist/row-sources.js +26 -0
  45. package/dist/packages/internal/template-contracts/dist/slot-catalog.d.ts +362 -380
  46. package/dist/packages/internal/template-contracts/dist/slot-catalog.js +289 -289
  47. package/dist/primitives/slot-bindings.d.ts +7 -40
  48. package/dist/primitives/slot-bindings.js +10 -12
  49. package/dist/schema/define-schema.d.ts +1 -1
  50. package/dist/schema/define-schema.js +32 -17
  51. package/dist/schema/extract-fill-spec.js +15 -13
  52. package/dist/schema/fact.d.ts +2 -19
  53. package/dist/schema/fill-builders.d.ts +4 -3
  54. package/dist/schema/fill-spec.js +9 -1
  55. package/dist/schema/layout.d.ts +6 -8
  56. package/dist/schema/layout.js +3 -9
  57. package/dist/schema/property-facts.d.ts +16 -47
  58. package/dist/schema/row-fields.js +88 -0
  59. package/dist/schema/row-ref.d.ts +59 -0
  60. package/dist/schema/row-ref.js +28 -0
  61. package/dist/schema/runtime-values.d.ts +8 -13
  62. package/dist/schema/section-props.d.ts +19 -26
  63. package/dist/schema/section-schema.d.ts +6 -6
  64. package/dist/schema/section-schema.js +2 -2
  65. package/dist/schema/slot-builders.d.ts +222 -117
  66. package/dist/schema/slot-builders.js +57 -28
  67. package/dist/schema/slot-ref.d.ts +18 -2
  68. package/dist/schema/slot-ref.js +11 -3
  69. package/dist/schema/slot-types.d.ts +7 -7
  70. package/dist/schema/slot-types.js +55 -19
  71. package/dist/section/declare.d.ts +1 -1
  72. package/dist/section/section.d.ts +3 -3
  73. package/dist/template/logic-shim.d.ts +1 -1
  74. package/guide/reference/cli/INDEX.md +2 -2
  75. package/guide/reference/cli/build.md +1 -1
  76. package/guide/reference/cli/check.md +1 -1
  77. package/guide/reference/cli/dev.md +1 -1
  78. package/guide/reference/cli/property-add.md +1 -1
  79. package/guide/reference/cli/property-list.md +1 -1
  80. package/guide/reference/cli/publish.md +1 -1
  81. package/guide/reference/cli/upgrade.md +1 -1
  82. package/guide/reference/rules/INDEX.md +1 -2
  83. package/package.json +1 -1
  84. package/tsconfig.base.json +1 -0
  85. package/dist/artifact/playground/client/assets/index-Cqz-jjVw.js +0 -1101
  86. package/dist/packages/internal/section-contracts/dist/row-contract.js +0 -37
  87. package/dist/packages/internal/template-contracts/dist/layout.js +0 -10
@@ -1,17 +1,31 @@
1
1
  //#region ../../internal/template-contracts/dist/slot-catalog.d.ts
2
2
  /**
3
- * The asset-pool filters an `image` slot's `sourceFilter` may name — the tag that narrows the candidate pool the editor offers for that slot.
3
+ * The askable units a fact can belong to — the key space of `FACT_GRAPH`'s
4
+ * `input_group`, and the vocabulary the app's input-group registry implements.
4
5
  *
5
6
  * @remarks
6
- * `"floorplans"` routes the slot to the per-unit floor-plan picker rather than
7
- * the property photo pool. The vocabulary is closed and checked at authoring
8
- * time (`assertSourceFilterContract`) because an unrecognized tag is invisible:
9
- * the editor simply falls through to the ordinary photo pool, with no error
10
- * anywhere and no way to tell that from an author who meant that pool.
7
+ * A VOCABULARY, not an order. Which question comes before which is pure
8
+ * presentation and stays app-owned (the ordered registry that renders the
9
+ * intake steps and the Details sections); the server never needs it, so
10
+ * declaring an order here would be a second, drifting copy of one.
11
+ *
12
+ * Only groups a FACT can belong to are members. `domain` is absent because a
13
+ * web address is a website input rather than a property fact and never enters
14
+ * the graph; the template selection is absent for the same reason — nothing
15
+ * about it is a fact about the property.
16
+ */
17
+ declare const INPUT_GROUPS: readonly ["address", "type", "intent", "describe", "uploads", "units", "comparables", "contacts"];
18
+ /** An askable unit's key — one of `INPUT_GROUPS`. */
19
+ type InputGroupKey = (typeof INPUT_GROUPS)[number];
20
+ /**
21
+ * How hard collecting a fact gates Generate, once its group is required: `"optional"` is asked but never blocks, `"blocking"` blocks until answered.
22
+ *
23
+ * @remarks
24
+ * A per-fact property, never a per-template one: a template author summons a
25
+ * question by using a fact, but does not get to decide that intake refuses to
26
+ * submit without it.
11
27
  */
12
- declare const SOURCE_FILTERS: readonly ["floorplans"];
13
- /** An asset-pool filter tag — one of `SOURCE_FILTERS`. */
14
- type SourceFilter = (typeof SOURCE_FILTERS)[number];
28
+ type FactStrength = "optional" | "blocking";
15
29
  /**
16
30
  * Where in the property fact graph a `SOURCE_FIELDS` entry's value lives: the property root, a unit row, or a contact card.
17
31
  */
@@ -35,23 +49,30 @@ type WritebackTarget = {
35
49
  field: string;
36
50
  };
37
51
  /**
38
- * Where a writable ROW MEMBER's edited value lands — a column of the row's own table.
52
+ * Where a writable ROW MEMBER's edited value lands — a column of the row's own table (for a library contact, the contact field it updates).
39
53
  *
40
54
  * @remarks
41
55
  * The column and nothing else, because the table is the collection's: a member
42
56
  * is addressed as `<collection>.row.<member>`, and whichever layer holds the
43
- * write already knows which collection it dispatched on.
44
- *
45
- * Declared only on a collection whose rows are NOT projected from catalog
46
- * fields — `comparables`, where a row field names a member by key and carries
47
- * no `source`, so the member is the whole story. `units` and `contacts` must
48
- * never carry one: there, writability belongs to the `SOURCE_FIELDS` entry each
49
- * row field binds and is answered per section by the slot's own `writeback`
50
- * declaration, which a marker here would silently overrule.
57
+ * write already knows which collection it dispatched on. A member of `units` or
58
+ * `contacts` carries it into the `writeback` of the `fact.unit.*` /
59
+ * `fact.contact.*` entry generated from it.
51
60
  */
52
61
  type RowMemberWriteback = {
53
62
  column: string;
54
63
  };
64
+ /**
65
+ * The media pools a row member's editor may pick from.
66
+ *
67
+ * @remarks
68
+ * `"floor_plans"` is the property's floor-plan uploads, `"library"` the account
69
+ * media a library contact's images come from. A media member naming no pool is
70
+ * upload-only: a comparable's photo belongs to the comp, and no pool offers
71
+ * another property's house.
72
+ */
73
+ declare const ROW_MEDIA_POOLS: readonly ["floor_plans", "library"];
74
+ /** A row member's media pool — one of `ROW_MEDIA_POOLS`. */
75
+ type RowMediaPool = (typeof ROW_MEDIA_POOLS)[number];
55
76
  /**
56
77
  * The value shape a fact graph entry carries — every `SourceFieldValueType` a slot may bind, widened with the shapes only a derive-time reader sees.
57
78
  *
@@ -61,7 +82,7 @@ type RowMemberWriteback = {
61
82
  * historical `"unit_list"`/`"contact_list"` spellings rather than collapsing
62
83
  * into `"row_list"`, because resolution branches on those two names.
63
84
  */
64
- type FactValueType = SourceFieldValueType | "boolean" | "text_list" | "row" | "row_list" | "object";
85
+ type FactValueType = SourceFieldValueType | "boolean" | "text_list" | "image_list" | "row" | "row_list" | "object";
65
86
  /** One member of a fact graph entry's row (an array element) or object shape, itself typed and possibly nested. */
66
87
  interface FactMemberDescriptor {
67
88
  value_type: FactValueType;
@@ -75,37 +96,87 @@ interface FactMemberDescriptor {
75
96
  * and a row with none declared is complete the moment it exists.
76
97
  */
77
98
  required?: true;
78
- /**
79
- * Set on a row member the editor may write back from the canvas — the column
80
- * it lands in on the collection's own table. Absent means read-only, which is
81
- * every member of a collection whose rows project from catalog fields; see
82
- * `RowMemberWriteback` for why only `comparables` declares these.
83
- */
84
- writeback?: RowMemberWriteback;
85
99
  }
86
100
  /** The typed member shape of an array element or object-valued fact — member name to its descriptor. */
87
101
  type FactShapeDescriptor = Readonly<Record<string, FactMemberDescriptor>>;
88
102
  /**
89
- * The single description of every fact an author can reach — the whole property fact graph, bindable and readable-only alike.
103
+ * One member of a collection's row (`units`, `contacts`, `comparables`) — the member as an author names it, and where its value lives.
90
104
  *
91
105
  * @remarks
92
- * Every canonical `property_facts.facts` path is either an entry here (or a
93
- * member of one) or carries a stated reason on `FACT_GRAPH_EXCLUSIONS`; a
94
- * completeness gate holds that exactly, top level and row level.
95
- * Each entry's own doc comment is the hover text an author sees on the
96
- * matching `fact.*` entry elsewhere in the schema layer, so keep every entry
97
- * documented — that sentence is the only way an author distinguishes
98
- * `fact.unit.beds` from `fact.property.property_type` without opening this file.
99
- * The bindable entries are declared in the order `fact.*` presents them.
106
+ * The member's key in its row descriptor is its author-facing name; `path` is
107
+ * the key it is stored under in the canonical row, which differs where storage
108
+ * kept an older spelling (`website` reads `website_url`, a contact's
109
+ * `headshot` reads `avatar_upload_id`).
110
+ */
111
+ interface CollectionMemberDescriptor extends FactMemberDescriptor {
112
+ /** The member's key in the canonical row. */
113
+ path: string;
114
+ /** Set on a member the editor may write back — see `RowMemberWriteback`. Absent means read-only. */
115
+ writeback?: RowMemberWriteback;
116
+ /** Set on an image member the editor offers a pool for — see `RowMediaPool`. */
117
+ pool?: RowMediaPool;
118
+ /**
119
+ * How hard the member's question gates Generate. Declared exactly on the
120
+ * members the collection's primary-row namespace offers (`fact.unit.*`,
121
+ * `fact.contact.*`), each of which becomes a bindable fact of its own; absent
122
+ * on every other member, and on every member of a collection with no primary
123
+ * row.
124
+ */
125
+ strength?: FactStrength;
126
+ }
127
+ /** A collection's row descriptor — author-facing member name to its descriptor. */
128
+ type CollectionRowDescriptor = Readonly<Record<string, CollectionMemberDescriptor>>;
129
+ /**
130
+ * A fact graph entry a slot's `direct` source may bind to.
100
131
  *
101
- * It is also where a fact's CONDITIONAL axis is declared — `input_group` (the
102
- * askable unit whose question produces it) and `strength` (whether that
103
- * question gates Generate). Both live on the fact rather than on the template
104
- * that uses it, which is what lets a fact be re-grouped or re-weighted without
105
- * republishing a single template: a published template stores only the fact
106
- * KEYS it uses, and the group and strength are joined from here at read time.
132
+ * @remarks
133
+ * Its container, value type and writeback carry over verbatim into the
134
+ * `SOURCE_FIELDS` projection; `role`, `path` and the shape descriptors do not.
135
+ */
136
+ interface BindableFactEntry {
137
+ role: "bindable";
138
+ /**
139
+ * Where the value lives in `property_facts.facts` — dotted, with `[]` for an
140
+ * array hop. Never null: a binding no canonical fact backs resolves to null
141
+ * for every property, which is a slot that silently renders nothing rather
142
+ * than a fact an author can reach.
143
+ */
144
+ path: string;
145
+ container: SourceFieldContainer;
146
+ value_type: SourceFieldValueType;
147
+ image?: true;
148
+ writeback?: WritebackTarget;
149
+ /**
150
+ * The askable unit this fact belongs to — a template needing any fact in the
151
+ * group summons the whole group's question. Absent on exactly the entries
152
+ * nobody can be asked for: the primary-of-array conveniences.
153
+ */
154
+ input_group?: InputGroupKey;
155
+ /** How hard this fact gates Generate once its group is required. Declared with `input_group` and absent with it. */
156
+ strength?: FactStrength;
157
+ fields?: FactShapeDescriptor;
158
+ row?: FactShapeDescriptor;
159
+ }
160
+ /**
161
+ * Author-facing aliases over the registry's flat key space, per container —
162
+ * alias name → the registry key it projects. One table serves every derived
163
+ * fact surface (`fact.*` and the derive-time view).
107
164
  */
108
- declare const FACT_GRAPH: {
165
+ declare const FACT_PROJECTIONS: {
166
+ readonly property: {
167
+ /** Property latitude, projected from the geocode. Read-only; null until the property is geocoded. */
168
+ readonly latitude: "lat";
169
+ /** Property longitude, projected from the geocode. Read-only; null until the property is geocoded. */
170
+ readonly longitude: "lon";
171
+ };
172
+ readonly contact: {
173
+ /** The primary contact's address exactly as entered, on one line. **Writable** — the editor offers "Update everywhere". */
174
+ readonly address: "contact_address";
175
+ };
176
+ };
177
+ /** The alias table's own type — consumed by both derived fact surfaces. */
178
+ type FactProjections = typeof FACT_PROJECTIONS;
179
+ declare const PROPERTY_ROOT_FACTS: {
109
180
  /** Street address, resolved to its display form. Read-only. */
110
181
  readonly address: {
111
182
  readonly role: "bindable";
@@ -230,71 +301,8 @@ declare const FACT_GRAPH: {
230
301
  readonly input_group: "address";
231
302
  readonly strength: "blocking";
232
303
  };
233
- /** Unit label, resolved against the primary unit (or the current row of a record list). **Writable** — the editor offers "Update everywhere". */
234
- readonly unit_label: {
235
- readonly role: "bindable";
236
- readonly path: "units[].unit_label";
237
- readonly container: "unit";
238
- readonly value_type: "text";
239
- readonly input_group: "units";
240
- readonly strength: "optional";
241
- readonly writeback: {
242
- readonly kind: "unit";
243
- readonly column: "unit_label";
244
- };
245
- };
246
- /** Bedroom count, resolved against the primary unit (or the current row of a record list). **Writable** — the editor offers "Update everywhere". */
247
- readonly beds: {
248
- readonly role: "bindable";
249
- readonly path: "units[].beds";
250
- readonly container: "unit";
251
- readonly value_type: "number";
252
- readonly input_group: "units";
253
- readonly strength: "blocking";
254
- readonly writeback: {
255
- readonly kind: "unit";
256
- readonly column: "beds";
257
- };
258
- };
259
- /** Bathroom count, resolved against the primary unit (or the current row of a record list). **Writable** — the editor offers "Update everywhere". */
260
- readonly baths: {
261
- readonly role: "bindable";
262
- readonly path: "units[].baths";
263
- readonly container: "unit";
264
- readonly value_type: "number";
265
- readonly input_group: "units";
266
- readonly strength: "blocking";
267
- readonly writeback: {
268
- readonly kind: "unit";
269
- readonly column: "baths";
270
- };
271
- };
272
- /** Interior square footage, resolved against the primary unit (or the current row of a record list). **Writable** — the editor offers "Update everywhere". */
273
- readonly sqft: {
274
- readonly role: "bindable";
275
- readonly path: "units[].sqft";
276
- readonly container: "unit";
277
- readonly value_type: "number";
278
- readonly input_group: "units";
279
- readonly strength: "blocking";
280
- readonly writeback: {
281
- readonly kind: "unit";
282
- readonly column: "sqft";
283
- };
284
- };
285
- /** Price as a flex value (digits or a text override such as "Sold"), resolved against the primary unit (or the current row of a record list). **Writable** — the editor offers "Update everywhere". */
286
- readonly price: {
287
- readonly role: "bindable";
288
- readonly path: "units[].price";
289
- readonly container: "unit";
290
- readonly value_type: "text";
291
- readonly input_group: "units";
292
- readonly strength: "blocking";
293
- readonly writeback: {
294
- readonly kind: "unit";
295
- readonly column: "price";
296
- };
297
- };
304
+ };
305
+ declare const COLLECTION_FACTS: {
298
306
  /** Every unit, baked verbatim as a record list. Read-only as a whole; the per-row fields under `fact.unit` stay writable. */
299
307
  readonly units: {
300
308
  readonly role: "bindable";
@@ -306,35 +314,19 @@ declare const FACT_GRAPH: {
306
314
  readonly row: {
307
315
  /** Durable unit identity, stable across edits — what a baked row is addressed by. */
308
316
  readonly unit_id: {
309
- readonly value_type: "text";
310
- };
311
- /** The unit's label, or null when the listing never asked for one. */
312
- readonly unit_label: {
313
- readonly value_type: "text";
314
- };
315
- /** Bedroom count. */
316
- readonly beds: {
317
- readonly value_type: "number";
318
- };
319
- /** Bathroom count. */
320
- readonly baths: {
321
- readonly value_type: "number";
322
- };
323
- /** Interior square footage. */
324
- readonly sqft: {
325
- readonly value_type: "number";
326
- };
327
- /** Price as a flex value — digits when numeric, the verbatim text override otherwise. */
328
- readonly price: {
317
+ readonly path: "unit_id";
329
318
  readonly value_type: "text";
330
319
  };
331
320
  /** Display order within the property. */
332
321
  readonly position: {
322
+ readonly path: "position";
333
323
  readonly value_type: "number";
334
324
  };
335
- /** The floor plans assigned to this unit, in display order. */
325
+ /** The floor plans assigned to this unit, in display order. Picked from the property's floor-plan uploads. */
336
326
  readonly floor_plans: {
337
- readonly value_type: "row_list";
327
+ readonly path: "floor_plans";
328
+ readonly value_type: "image_list";
329
+ readonly pool: "floor_plans";
338
330
  readonly row: {
339
331
  /** Identity of the floor-plan image (its upload id). */
340
332
  readonly id: {
@@ -350,6 +342,51 @@ declare const FACT_GRAPH: {
350
342
  };
351
343
  };
352
344
  };
345
+ /** The unit's label, or null when the listing never asked for one. **Writable** — the editor offers "Update everywhere". */
346
+ readonly unit_label: {
347
+ readonly path: "unit_label";
348
+ readonly value_type: "text";
349
+ readonly strength: "optional";
350
+ readonly writeback: {
351
+ readonly column: "unit_label";
352
+ };
353
+ };
354
+ /** Bedroom count. **Writable** — the editor offers "Update everywhere". */
355
+ readonly beds: {
356
+ readonly path: "beds";
357
+ readonly value_type: "number";
358
+ readonly strength: "blocking";
359
+ readonly writeback: {
360
+ readonly column: "beds";
361
+ };
362
+ };
363
+ /** Bathroom count. **Writable** — the editor offers "Update everywhere". */
364
+ readonly baths: {
365
+ readonly path: "baths";
366
+ readonly value_type: "number";
367
+ readonly strength: "blocking";
368
+ readonly writeback: {
369
+ readonly column: "baths";
370
+ };
371
+ };
372
+ /** Interior square footage. **Writable** — the editor offers "Update everywhere". */
373
+ readonly sqft: {
374
+ readonly path: "sqft";
375
+ readonly value_type: "number";
376
+ readonly strength: "blocking";
377
+ readonly writeback: {
378
+ readonly column: "sqft";
379
+ };
380
+ };
381
+ /** Price as a flex value — digits when numeric, the verbatim text override (such as "Sold") otherwise. **Writable** — the editor offers "Update everywhere". */
382
+ readonly price: {
383
+ readonly path: "price";
384
+ readonly value_type: "text";
385
+ readonly strength: "blocking";
386
+ readonly writeback: {
387
+ readonly column: "price";
388
+ };
389
+ };
353
390
  };
354
391
  };
355
392
  /** Every comparable property — recently sold or currently listed homes similar to the subject — baked verbatim as a record list, in display order. The array itself is read-only (every market number a slide shows is a `compute()` over these rows), but the members marked writable below are edited on the canvas like a unit's. */
@@ -363,49 +400,60 @@ declare const FACT_GRAPH: {
363
400
  readonly row: {
364
401
  /** Durable row identity, stable across edits — what a baked row is addressed by. */
365
402
  readonly id: {
403
+ readonly path: "id";
366
404
  readonly value_type: "text";
367
405
  };
368
406
  /** Street line of the comparable's address ("12 Oak St"). Part of what makes a row complete. */
369
407
  readonly address_street: {
408
+ readonly path: "address_street";
370
409
  readonly value_type: "text";
371
410
  readonly required: true;
372
411
  };
373
412
  /** City of the comparable's address. */
374
413
  readonly address_city: {
414
+ readonly path: "address_city";
375
415
  readonly value_type: "text";
376
416
  };
377
417
  /** State of the comparable's address. */
378
418
  readonly address_state: {
419
+ readonly path: "address_state";
379
420
  readonly value_type: "text";
380
421
  };
381
422
  /** Postal code of the comparable's address. */
382
423
  readonly address_postal: {
424
+ readonly path: "address_postal";
383
425
  readonly value_type: "text";
384
426
  };
385
427
  /** The comparable's address as one display line, assembled at projection. */
386
428
  readonly address: {
429
+ readonly path: "address";
387
430
  readonly value_type: "text";
388
431
  };
389
432
  /** Latitude of the comparable. Part of what makes a row complete — the comps map pins on it. */
390
433
  readonly lat: {
434
+ readonly path: "lat";
391
435
  readonly value_type: "number";
392
436
  readonly required: true;
393
437
  };
394
438
  /** Longitude of the comparable. Part of what makes a row complete. */
395
439
  readonly lng: {
440
+ readonly path: "lng";
396
441
  readonly value_type: "number";
397
442
  readonly required: true;
398
443
  };
399
444
  /** Great-circle distance from the subject property in meters, computed at projection; null while either side lacks coordinates. */
400
445
  readonly distance_m: {
446
+ readonly path: "distance_m";
401
447
  readonly value_type: "number";
402
448
  };
403
449
  /** Where the comparable stands on the market: `"sold"` when the row carries a sale date, `"active"` when it does not. Derived rather than answered, which is why it is not a completeness member; it is what disambiguates `price`. */
404
450
  readonly status: {
451
+ readonly path: "status";
405
452
  readonly value_type: "text";
406
453
  };
407
454
  /** One integer in dollars. It takes two members to read: `status` says sale price versus list price, and `price_period` says total versus monthly rent. Part of what makes a row complete. **Writable** from the canvas. */
408
455
  readonly price: {
456
+ readonly path: "price";
409
457
  readonly value_type: "number";
410
458
  readonly required: true;
411
459
  readonly writeback: {
@@ -414,10 +462,12 @@ declare const FACT_GRAPH: {
414
462
  };
415
463
  /** What `price` is denominated in: `"monthly"` on a `for_rent` property (a rent per month), `"total"` on any other listing intent. Derived at projection from the SUBJECT's listing intent rather than stored per row, and never null — print a comp's price through it or a $2,400 rent renders as a sale. */
416
464
  readonly price_period: {
465
+ readonly path: "price_period";
417
466
  readonly value_type: "text";
418
467
  };
419
468
  /** The closing date (ISO `YYYY-MM-DD`) when sold; null otherwise. The one market fact the user answers — `status` is read off it. **Writable** from the canvas, and the write moves `status` with it. */
420
469
  readonly sale_date: {
470
+ readonly path: "sale_date";
421
471
  readonly value_type: "text";
422
472
  readonly writeback: {
423
473
  readonly column: "sale_date";
@@ -425,6 +475,7 @@ declare const FACT_GRAPH: {
425
475
  };
426
476
  /** Bedroom count. Part of what makes a row complete — every comps slide prints it. **Writable** from the canvas. */
427
477
  readonly beds: {
478
+ readonly path: "beds";
428
479
  readonly value_type: "number";
429
480
  readonly required: true;
430
481
  readonly writeback: {
@@ -433,6 +484,7 @@ declare const FACT_GRAPH: {
433
484
  };
434
485
  /** Bathroom count. Part of what makes a row complete. **Writable** from the canvas. */
435
486
  readonly baths: {
487
+ readonly path: "baths";
436
488
  readonly value_type: "number";
437
489
  readonly required: true;
438
490
  readonly writeback: {
@@ -441,66 +493,66 @@ declare const FACT_GRAPH: {
441
493
  };
442
494
  /** Interior square footage. Part of what makes a row complete — the comps table divides the price by it. **Writable** from the canvas. */
443
495
  readonly sqft: {
496
+ readonly path: "sqft";
444
497
  readonly value_type: "number";
445
498
  readonly required: true;
446
499
  readonly writeback: {
447
500
  readonly column: "sqft";
448
501
  };
449
502
  };
450
- /** A photo of the comparable, as an absolute URL rather than an upload id — comparables are not property uploads. A mirrored photo is a URL here too: the mirror writes its served URL into the column, so a template never holds a storage key. */
451
- readonly photo_url: {
452
- readonly value_type: "text";
453
- };
454
- /** Where the row's facts were read from — the listing's detail page. */
455
- readonly source_url: {
456
- readonly value_type: "text";
457
- };
458
- /** The name of that source ("Redfin", an MLS). */
459
- readonly source_name: {
460
- readonly value_type: "text";
503
+ /** The comparable's photo — an upload the comp itself owns, never one of the property's own photos, so no media pool offers it. Stored as the upload's id (`photo_upload_id`); a `compute()` over `fact.property.comparables` reads that id as `photo` (`photo_upload_id` too, for computes written before rows took author names) and renders it through an `image` value (`{ photo_id, url: "", alt }`). An `image` row field bound to this member receives it already as a media reference. Null when the user uploaded none. */
504
+ readonly photo: {
505
+ readonly path: "photo_upload_id";
506
+ readonly value_type: "image";
461
507
  };
462
508
  /** The year the comparable was built. */
463
509
  readonly year_built: {
510
+ readonly path: "year_built";
464
511
  readonly value_type: "number";
465
512
  };
466
513
  /** Lot size in square feet. */
467
514
  readonly lot_sqft: {
515
+ readonly path: "lot_sqft";
468
516
  readonly value_type: "number";
469
517
  };
470
518
  /** How many storeys the comparable has. */
471
519
  readonly stories: {
520
+ readonly path: "stories";
472
521
  readonly value_type: "number";
473
522
  };
474
523
  /** How many units the comparable's building holds — a multifamily figure, and nothing to do with the SUBJECT's units. */
475
524
  readonly units: {
525
+ readonly path: "units";
476
526
  readonly value_type: "number";
477
527
  };
478
528
  /** Monthly HOA dues in dollars. */
479
529
  readonly hoa_monthly: {
480
- readonly value_type: "number";
481
- };
482
- /** How long the comparable has been on the market. Live listings only; null on a closed sale, where it would mean nothing. */
483
- readonly days_on_market: {
530
+ readonly path: "hoa_monthly";
484
531
  readonly value_type: "number";
485
532
  };
486
533
  /** The asking price in dollars, beside `price`. On a sold row the pair is what "sold over asking" is read from; on a live one they are usually the same figure. */
487
534
  readonly list_price: {
535
+ readonly path: "list_price";
488
536
  readonly value_type: "number";
489
537
  };
490
538
  /** When the listing went live (ISO `YYYY-MM-DD`) — not when it closed, which is `sale_date`. */
491
539
  readonly listed_date: {
540
+ readonly path: "listed_date";
492
541
  readonly value_type: "text";
493
542
  };
494
543
  /** The listing's MLS number. */
495
544
  readonly mls_number: {
545
+ readonly path: "mls_number";
496
546
  readonly value_type: "text";
497
547
  };
498
548
  /** The listing remarks, verbatim from the source. */
499
549
  readonly description: {
550
+ readonly path: "description";
500
551
  readonly value_type: "text";
501
552
  };
502
553
  /** The comparable's property type in OUR vocabulary, mapped by the provider rather than the portal's own wording — which is what lets a slide compare it with the subject's. Null on a public-record stub, which often states none. */
503
554
  readonly property_type: {
555
+ readonly path: "property_type";
504
556
  readonly value_type: "text";
505
557
  };
506
558
  };
@@ -516,260 +568,147 @@ declare const FACT_GRAPH: {
516
568
  readonly row: {
517
569
  /** Stable identity of the contact card. */
518
570
  readonly id: {
571
+ readonly path: "id";
519
572
  readonly value_type: "text";
520
573
  };
521
574
  /** Whether this is the property's primary contact — the one lead routing and the brand marks resolve from. */
522
575
  readonly primary: {
576
+ readonly path: "primary";
523
577
  readonly value_type: "boolean";
524
578
  };
525
- /** Contact name. */
579
+ /** Contact name. **Writable** — the editor offers "Update everywhere". */
526
580
  readonly name: {
581
+ readonly path: "name";
527
582
  readonly value_type: "text";
583
+ readonly strength: "optional";
584
+ readonly writeback: {
585
+ readonly column: "name";
586
+ };
528
587
  };
529
- /** Contact job title. */
588
+ /** Contact job title. **Writable** — the editor offers "Update everywhere". */
530
589
  readonly title: {
590
+ readonly path: "title";
531
591
  readonly value_type: "text";
592
+ readonly strength: "optional";
593
+ readonly writeback: {
594
+ readonly column: "title";
595
+ };
532
596
  };
533
- /** The organization the contact belongs to. */
597
+ /** The organization the contact belongs to — the brokerage a branded deliverable paints as its wordmark. **Writable** — the editor offers "Update everywhere". */
534
598
  readonly org_name: {
599
+ readonly path: "org_name";
535
600
  readonly value_type: "text";
601
+ readonly strength: "optional";
602
+ readonly writeback: {
603
+ readonly column: "org_name";
604
+ };
536
605
  };
537
- /** Contact biography. */
606
+ /** Contact biography. **Writable** — the editor offers "Update everywhere". */
538
607
  readonly bio: {
608
+ readonly path: "bio";
539
609
  readonly value_type: "text";
610
+ readonly strength: "optional";
611
+ readonly writeback: {
612
+ readonly column: "bio";
613
+ };
540
614
  };
541
- /** Contact email address. */
542
- readonly email: {
543
- readonly value_type: "text";
544
- };
545
- /** Contact phone number. */
546
- readonly phone: {
547
- readonly value_type: "text";
548
- };
549
- /** The contact's address exactly as entered, on one line. */
615
+ /** The contact's address exactly as entered, on one line. **Writable** — the editor offers "Update everywhere". Its flat fact key is `contact_address`, because the property already owns `address`. */
550
616
  readonly address: {
617
+ readonly path: "address";
551
618
  readonly value_type: "text";
619
+ readonly strength: "optional";
620
+ readonly writeback: {
621
+ readonly column: "address";
622
+ };
552
623
  };
553
- /** Contact website URL. */
554
- readonly website_url: {
624
+ /** Contact email address. **Writable** — the editor offers "Update everywhere". */
625
+ readonly email: {
626
+ readonly path: "email";
555
627
  readonly value_type: "text";
628
+ readonly strength: "optional";
629
+ readonly writeback: {
630
+ readonly column: "email";
631
+ };
556
632
  };
557
- /** The contact's headshot, as an upload id rather than a URL. */
558
- readonly avatar_upload_id: {
633
+ /** Contact phone number. **Writable** — the editor offers "Update everywhere". */
634
+ readonly phone: {
635
+ readonly path: "phone";
559
636
  readonly value_type: "text";
637
+ readonly strength: "optional";
638
+ readonly writeback: {
639
+ readonly column: "phone";
640
+ };
560
641
  };
561
- /** The contact's logo for dark backgrounds, as an upload id rather than a URL. */
562
- readonly logo_dark_upload_id: {
642
+ /** Contact website URL. **Writable** — the editor offers "Update everywhere". */
643
+ readonly website: {
644
+ readonly path: "website_url";
563
645
  readonly value_type: "text";
646
+ readonly strength: "optional";
647
+ readonly writeback: {
648
+ readonly column: "website";
649
+ };
564
650
  };
565
- /** The contact's logo for light backgrounds, as an upload id rather than a URL. */
566
- readonly logo_light_upload_id: {
651
+ /** Contact Instagram URL. **Writable** — the editor offers "Update everywhere". */
652
+ readonly instagram: {
653
+ readonly path: "instagram_url";
567
654
  readonly value_type: "text";
655
+ readonly strength: "optional";
656
+ readonly writeback: {
657
+ readonly column: "socials.instagram";
658
+ };
568
659
  };
569
- /** Contact Instagram URL. */
570
- readonly instagram_url: {
660
+ /** Contact LinkedIn URL. **Writable** — the editor offers "Update everywhere". */
661
+ readonly linkedin: {
662
+ readonly path: "linkedin_url";
571
663
  readonly value_type: "text";
664
+ readonly strength: "optional";
665
+ readonly writeback: {
666
+ readonly column: "socials.linkedin";
667
+ };
572
668
  };
573
- /** Contact LinkedIn URL. */
574
- readonly linkedin_url: {
669
+ /** Contact X URL. **Writable** — the editor offers "Update everywhere". */
670
+ readonly x: {
671
+ readonly path: "x_url";
575
672
  readonly value_type: "text";
673
+ readonly strength: "optional";
674
+ readonly writeback: {
675
+ readonly column: "socials.x";
676
+ };
576
677
  };
577
- /** Contact X URL. */
578
- readonly x_url: {
678
+ /** Contact Facebook URL. **Writable** — the editor offers "Update everywhere". */
679
+ readonly facebook: {
680
+ readonly path: "facebook_url";
579
681
  readonly value_type: "text";
682
+ readonly strength: "optional";
683
+ readonly writeback: {
684
+ readonly column: "socials.facebook";
685
+ };
580
686
  };
581
- /** Contact Facebook URL. */
582
- readonly facebook_url: {
583
- readonly value_type: "text";
687
+ /** The contact's headshot, picked from the account's media library. Read-only; belongs on an `image` slot. */
688
+ readonly headshot: {
689
+ readonly path: "avatar_upload_id";
690
+ readonly value_type: "image";
691
+ readonly strength: "optional";
692
+ readonly pool: "library";
693
+ };
694
+ /** The contact's logo for dark backgrounds, picked from the account's media library; a slot bound to it falls back to a silhouette of the light logo. Read-only; belongs on an `image` slot. */
695
+ readonly logo_dark: {
696
+ readonly path: "logo_dark_upload_id";
697
+ readonly value_type: "image";
698
+ readonly strength: "optional";
699
+ readonly pool: "library";
700
+ };
701
+ /** The contact's logo for light backgrounds, picked from the account's media library; a slot bound to it falls back to a silhouette of the dark logo. Read-only; belongs on an `image` slot. */
702
+ readonly logo_light: {
703
+ readonly path: "logo_light_upload_id";
704
+ readonly value_type: "image";
705
+ readonly strength: "optional";
706
+ readonly pool: "library";
584
707
  };
585
708
  };
586
709
  };
587
- /** Contact name, resolved against the primary contact card (or the current row of a record list). **Writable** — the editor offers "Update everywhere". */
588
- readonly name: {
589
- readonly role: "bindable";
590
- readonly path: "contacts[].name";
591
- readonly container: "contact";
592
- readonly value_type: "text";
593
- readonly input_group: "contacts";
594
- readonly strength: "optional";
595
- readonly writeback: {
596
- readonly kind: "contact";
597
- readonly field: "name";
598
- };
599
- };
600
- /** Contact job title, resolved against the primary contact card (or the current row of a record list). **Writable** — the editor offers "Update everywhere". */
601
- readonly title: {
602
- readonly role: "bindable";
603
- readonly path: "contacts[].title";
604
- readonly container: "contact";
605
- readonly value_type: "text";
606
- readonly input_group: "contacts";
607
- readonly strength: "optional";
608
- readonly writeback: {
609
- readonly kind: "contact";
610
- readonly field: "title";
611
- };
612
- };
613
- /** The organization the contact belongs to — the brokerage a branded deliverable paints as its wordmark. Resolved against the primary contact card (or the current row of a record list). **Writable** — the editor offers "Update everywhere". */
614
- readonly org_name: {
615
- readonly role: "bindable";
616
- readonly path: "contacts[].org_name";
617
- readonly container: "contact";
618
- readonly value_type: "text";
619
- readonly input_group: "contacts";
620
- readonly strength: "optional";
621
- readonly writeback: {
622
- readonly kind: "contact";
623
- readonly field: "org_name";
624
- };
625
- };
626
- /** Contact biography, resolved against the primary contact card (or the current row of a record list). **Writable** — the editor offers "Update everywhere". */
627
- readonly bio: {
628
- readonly role: "bindable";
629
- readonly path: "contacts[].bio";
630
- readonly container: "contact";
631
- readonly value_type: "text";
632
- readonly input_group: "contacts";
633
- readonly strength: "optional";
634
- readonly writeback: {
635
- readonly kind: "contact";
636
- readonly field: "bio";
637
- };
638
- };
639
- /** The contact's address exactly as entered, on one line. **Writable** — the editor offers "Update everywhere". Reachable as `fact.contact.address` — the key is prefixed because this catalog is one FLAT name space shared by all three containers, and the property already owns `address`. */
640
- readonly contact_address: {
641
- readonly role: "bindable";
642
- readonly path: "contacts[].address";
643
- readonly container: "contact";
644
- readonly value_type: "text";
645
- readonly input_group: "contacts";
646
- readonly strength: "optional";
647
- readonly writeback: {
648
- readonly kind: "contact";
649
- readonly field: "address";
650
- };
651
- };
652
- /** Contact email address, resolved against the primary contact card (or the current row of a record list). **Writable** — the editor offers "Update everywhere". */
653
- readonly email: {
654
- readonly role: "bindable";
655
- readonly path: "contacts[].email";
656
- readonly container: "contact";
657
- readonly value_type: "text";
658
- readonly input_group: "contacts";
659
- readonly strength: "optional";
660
- readonly writeback: {
661
- readonly kind: "contact";
662
- readonly field: "email";
663
- };
664
- };
665
- /** Contact phone number, resolved against the primary contact card (or the current row of a record list). **Writable** — the editor offers "Update everywhere". */
666
- readonly phone: {
667
- readonly role: "bindable";
668
- readonly path: "contacts[].phone";
669
- readonly container: "contact";
670
- readonly value_type: "text";
671
- readonly input_group: "contacts";
672
- readonly strength: "optional";
673
- readonly writeback: {
674
- readonly kind: "contact";
675
- readonly field: "phone";
676
- };
677
- };
678
- /** Contact website URL, resolved against the primary contact card (or the current row of a record list). **Writable** — the editor offers "Update everywhere". */
679
- readonly website: {
680
- readonly role: "bindable";
681
- readonly path: "contacts[].website_url";
682
- readonly container: "contact";
683
- readonly value_type: "text";
684
- readonly input_group: "contacts";
685
- readonly strength: "optional";
686
- readonly writeback: {
687
- readonly kind: "contact";
688
- readonly field: "website";
689
- };
690
- };
691
- /** Contact Instagram URL, resolved against the primary contact card (or the current row of a record list). **Writable** — the editor offers "Update everywhere". */
692
- readonly instagram: {
693
- readonly role: "bindable";
694
- readonly path: "contacts[].instagram_url";
695
- readonly container: "contact";
696
- readonly value_type: "text";
697
- readonly input_group: "contacts";
698
- readonly strength: "optional";
699
- readonly writeback: {
700
- readonly kind: "contact";
701
- readonly field: "socials.instagram";
702
- };
703
- };
704
- /** Contact LinkedIn URL, resolved against the primary contact card (or the current row of a record list). **Writable** — the editor offers "Update everywhere". */
705
- readonly linkedin: {
706
- readonly role: "bindable";
707
- readonly path: "contacts[].linkedin_url";
708
- readonly container: "contact";
709
- readonly value_type: "text";
710
- readonly input_group: "contacts";
711
- readonly strength: "optional";
712
- readonly writeback: {
713
- readonly kind: "contact";
714
- readonly field: "socials.linkedin";
715
- };
716
- };
717
- /** Contact X URL, resolved against the primary contact card (or the current row of a record list). **Writable** — the editor offers "Update everywhere". */
718
- readonly x: {
719
- readonly role: "bindable";
720
- readonly path: "contacts[].x_url";
721
- readonly container: "contact";
722
- readonly value_type: "text";
723
- readonly input_group: "contacts";
724
- readonly strength: "optional";
725
- readonly writeback: {
726
- readonly kind: "contact";
727
- readonly field: "socials.x";
728
- };
729
- };
730
- /** Contact Facebook URL, resolved against the primary contact card (or the current row of a record list). **Writable** — the editor offers "Update everywhere". */
731
- readonly facebook: {
732
- readonly role: "bindable";
733
- readonly path: "contacts[].facebook_url";
734
- readonly container: "contact";
735
- readonly value_type: "text";
736
- readonly input_group: "contacts";
737
- readonly strength: "optional";
738
- readonly writeback: {
739
- readonly kind: "contact";
740
- readonly field: "socials.facebook";
741
- };
742
- };
743
- /** Contact headshot, resolved against the primary contact card (or the current row of a record list). Read-only; belongs on an `image` slot. */
744
- readonly headshot: {
745
- readonly role: "bindable";
746
- readonly path: "contacts[].avatar_upload_id";
747
- readonly container: "contact";
748
- readonly value_type: "image";
749
- readonly input_group: "contacts";
750
- readonly strength: "optional";
751
- readonly image: true;
752
- };
753
- /** Contact logo for dark backgrounds, falling back to a silhouette of the light logo. Read-only; belongs on an `image` slot. */
754
- readonly logo_dark: {
755
- readonly role: "bindable";
756
- readonly path: "contacts[].logo_dark_upload_id";
757
- readonly container: "contact";
758
- readonly value_type: "image";
759
- readonly input_group: "contacts";
760
- readonly strength: "optional";
761
- readonly image: true;
762
- };
763
- /** Contact logo for light backgrounds, falling back to a silhouette of the dark logo. Read-only; belongs on an `image` slot. */
764
- readonly logo_light: {
765
- readonly role: "bindable";
766
- readonly path: "contacts[].logo_light_upload_id";
767
- readonly container: "contact";
768
- readonly value_type: "image";
769
- readonly input_group: "contacts";
770
- readonly strength: "optional";
771
- readonly image: true;
772
- };
710
+ };
711
+ declare const READABLE_FACTS: {
773
712
  /** The property's always-on prose description, the substrate every text decision is grounded in. */
774
713
  readonly description: {
775
714
  readonly role: "readable";
@@ -955,27 +894,70 @@ declare const FACT_GRAPH: {
955
894
  readonly primary_of: "contacts";
956
895
  };
957
896
  };
958
- /** A fact graph entry's name — a key of `FACT_GRAPH`. */
959
- type FactGraphName = keyof typeof FACT_GRAPH;
897
+ type CollectionFactEntry = BindableFactEntry & {
898
+ row: CollectionRowDescriptor;
899
+ };
900
+ type CollectionFacts = typeof COLLECTION_FACTS;
901
+ /** A container whose facts are generated from a collection's primary row. */
902
+ type PrimaryRowContainer = "unit" | "contact";
903
+ type AliasedMember<C extends PrimaryRowContainer> = C extends keyof FactProjections ? keyof FactProjections[C] : never;
904
+ type PrimaryRowWriteback<C extends PrimaryRowContainer, Column extends string> = C extends "unit" ? {
905
+ readonly kind: "unit";
906
+ readonly column: Column;
907
+ } : {
908
+ readonly kind: "contact";
909
+ readonly field: Column;
910
+ };
911
+ type PrimaryRowFact<E extends CollectionFactEntry, D extends CollectionMemberDescriptor, C extends PrimaryRowContainer> = {
912
+ readonly role: "bindable";
913
+ readonly path: `${E["path"]}[].${D["path"]}`;
914
+ readonly container: C;
915
+ readonly value_type: D["value_type"];
916
+ readonly input_group: E["input_group"];
917
+ readonly strength: D["strength"];
918
+ } & (D["value_type"] extends "image" ? {
919
+ readonly image: true;
920
+ } : unknown) & (D extends {
921
+ writeback: {
922
+ column: infer Column extends string;
923
+ };
924
+ } ? {
925
+ readonly writeback: PrimaryRowWriteback<C, Column>;
926
+ } : unknown);
927
+ type PrimaryRowFacts<E extends CollectionFactEntry, C extends PrimaryRowContainer> = { readonly [M in keyof E["row"] as E["row"][M] extends {
928
+ strength: FactStrength;
929
+ } ? M extends AliasedMember<C> ? never : M : never]: PrimaryRowFact<E, E["row"][M], C>; } & { readonly [M in keyof E["row"] as E["row"][M] extends {
930
+ strength: FactStrength;
931
+ } ? M extends AliasedMember<C> ? FactProjections[C & keyof FactProjections][M & keyof FactProjections[C & keyof FactProjections]] : never : never]: PrimaryRowFact<E, E["row"][M], C>; };
932
+ type FactGraph = typeof PROPERTY_ROOT_FACTS & PrimaryRowFacts<CollectionFacts[(typeof READABLE_FACTS)["unit"]["primary_of"]], "unit"> & CollectionFacts & PrimaryRowFacts<CollectionFacts[(typeof READABLE_FACTS)["contact"]["primary_of"]], "contact"> & typeof READABLE_FACTS;
960
933
  /**
961
- * Author-facing aliases over the registry's flat key space, per container —
962
- * alias name → the registry key it projects. One table serves every derived
963
- * fact surface (`fact.*` and the derive-time view).
934
+ * The single description of every fact an author can reach — the whole property fact graph, bindable and readable-only alike.
935
+ *
936
+ * @remarks
937
+ * Every canonical `property_facts.facts` path is either an entry here (or a
938
+ * member of one) or carries a stated reason on `FACT_GRAPH_EXCLUSIONS`; a
939
+ * completeness gate holds that exactly, top level and row level.
940
+ * Each entry's own doc comment is the hover text an author sees on the
941
+ * matching `fact.*` entry elsewhere in the schema layer, so keep every entry
942
+ * documented — that sentence is the only way an author distinguishes
943
+ * `fact.unit.beds` from `fact.property.property_type` without opening this file.
944
+ * The bindable entries are ordered as `fact.*` presents them.
945
+ *
946
+ * The unit and contact facts are not declared one by one: they are the members
947
+ * of the `units` and `contacts` row descriptors that declare a `strength`,
948
+ * generated from those descriptors, so a row member and the `fact.unit.*` /
949
+ * `fact.contact.*` entry reading the primary row are one declaration.
950
+ *
951
+ * It is also where a fact's CONDITIONAL axis is declared — `input_group` (the
952
+ * askable unit whose question produces it) and `strength` (whether that
953
+ * question gates Generate). Both live on the fact rather than on the template
954
+ * that uses it, which is what lets a fact be re-grouped or re-weighted without
955
+ * republishing a single template: a published template stores only the fact
956
+ * KEYS it uses, and the group and strength are joined from here at read time.
964
957
  */
965
- declare const FACT_PROJECTIONS: {
966
- readonly property: {
967
- /** Property latitude, projected from the geocode. Read-only; null until the property is geocoded. */
968
- readonly latitude: "lat";
969
- /** Property longitude, projected from the geocode. Read-only; null until the property is geocoded. */
970
- readonly longitude: "lon";
971
- };
972
- readonly contact: {
973
- /** The primary contact's address exactly as entered, on one line. **Writable** — the editor offers "Update everywhere". */
974
- readonly address: "contact_address";
975
- };
976
- };
977
- /** The alias table's own type — consumed by both derived fact surfaces. */
978
- type FactProjections = typeof FACT_PROJECTIONS;
958
+ declare const FACT_GRAPH: FactGraph;
959
+ /** A fact graph entry's name — a key of `FACT_GRAPH`. */
960
+ type FactGraphName = keyof typeof FACT_GRAPH;
979
961
  /**
980
962
  * The bindable slice of a fact graph, each entry narrowed to its `SourceFieldDescriptor` members.
981
963
  *
@@ -1131,4 +1113,4 @@ declare const VIDEO_SOURCES: readonly ["upload", "link"];
1131
1113
  /** A video's storage/origin kind — one of `VIDEO_SOURCES`. */
1132
1114
  type VideoSource = (typeof VIDEO_SOURCES)[number];
1133
1115
  //#endregion
1134
- export { BindableFacts, COLLECTIONS, CollectionField, FACT_GRAPH, FACT_PROJECTIONS, FactGraphName, FactMemberDescriptor, FactProjections, FactShapeDescriptor, FactValueType, LINK_KINDS, LINK_PROVIDERS, LinkKind, LinkProviderId, RowMemberWriteback, SOURCE_FIELDS, SOURCE_FILTERS, SourceFieldContainer, SourceFieldName, SourceFieldValueType, SourceFilter, VIDEO_SOURCES, VideoSource, WritableSourceFieldName, WritebackTarget };
1116
+ export { BindableFactEntry, BindableFacts, COLLECTIONS, CollectionField, CollectionMemberDescriptor, CollectionRowDescriptor, FACT_GRAPH, FACT_PROJECTIONS, FactGraphName, FactMemberDescriptor, FactProjections, FactShapeDescriptor, FactStrength, FactValueType, INPUT_GROUPS, InputGroupKey, LINK_KINDS, LINK_PROVIDERS, LinkKind, LinkProviderId, ROW_MEDIA_POOLS, RowMediaPool, RowMemberWriteback, SOURCE_FIELDS, SourceFieldContainer, SourceFieldName, SourceFieldValueType, VIDEO_SOURCES, VideoSource, WritableSourceFieldName, WritebackTarget };