@homepages/concrete 9.0.0 → 10.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.
- package/CHANGELOG.md +69 -0
- package/README.md +3 -3
- package/codemods/manifest.json +14 -0
- package/codemods/registry-keys-only.mjs +113 -0
- package/codemods/steps/list-object-form.mjs +2 -3
- package/codemods/steps/registry-key-reads.mjs +276 -0
- package/dist/artifact/playground/client/assets/index-BFNHB7VM.css +1 -0
- package/dist/artifact/playground/client/assets/index-Div1yo6s.js +1259 -0
- package/dist/artifact/playground/client/index.html +2 -2
- package/dist/artifact/playground/host.mjs +42 -42
- package/dist/cli/build/artifact.js +2 -1
- package/dist/cli/build/fixtures.js +2 -1
- package/dist/cli/check/render/inputs.js +3 -3
- package/dist/cli/check/stages/sections.js +5 -6
- package/dist/cli/check/stages/workspace.js +2 -0
- package/dist/cli/check/template-key.js +16 -0
- package/dist/cli/dev/workspace-reader.js +9 -2
- package/dist/fixtures/media-store.js +3 -3
- package/dist/fixtures/resolve.js +28 -23
- package/dist/fixtures/synthesize-empties.js +3 -1
- package/dist/fixtures.d.ts +1 -1
- package/dist/index.d.ts +3 -4
- package/dist/packages/external/concrete/package.js +1 -1
- package/dist/packages/internal/capture-settle/dist/island-markers.d.ts +1 -1
- package/dist/packages/internal/fill-bake/dist/bake-property-ref.js +15 -27
- package/dist/packages/internal/fill-bake/dist/compute-reads.js +12 -12
- package/dist/packages/internal/fill-bake/dist/derive-source.js +7 -14
- package/dist/packages/internal/fill-bake/dist/index.js +4 -3
- package/dist/packages/internal/fill-bake/dist/item-merge.js +36 -16
- package/dist/packages/internal/fill-bake/dist/item-overrides.js +1 -28
- package/dist/packages/internal/fill-bake/dist/linked-merge.js +5 -7
- package/dist/packages/internal/fill-bake/dist/list-grammar.js +11 -34
- package/dist/packages/internal/fill-bake/dist/stored-row-reader.js +1 -0
- package/dist/packages/internal/fill-vocabulary/dist/resolved-decision.js +12 -39
- package/dist/packages/internal/fill-vocabulary/dist/verbs.js +2 -17
- package/dist/packages/internal/media-resolution/dist/document.js +16 -15
- package/dist/packages/internal/media-resolution/dist/image.js +38 -94
- package/dist/packages/internal/media-resolution/dist/index.js +1 -1
- package/dist/packages/internal/media-resolution/dist/list.js +12 -12
- package/dist/packages/internal/media-resolution/dist/media.js +17 -16
- package/dist/packages/internal/media-resolution/dist/records.js +4 -2
- package/dist/packages/internal/media-resolution/dist/slot.js +9 -6
- package/dist/packages/internal/media-resolution/dist/tour.js +12 -11
- package/dist/packages/internal/media-resolution/dist/video.js +16 -16
- package/dist/packages/internal/property-facts/dist/registry-facts.js +10 -2
- package/dist/packages/internal/section-contracts/dist/catalog.js +2 -10
- package/dist/packages/internal/section-contracts/dist/directly-linked-list-contract.js +5 -12
- package/dist/packages/internal/section-contracts/dist/fill-spec-view.js +1 -5
- package/dist/packages/internal/section-contracts/dist/fill-verb-contract.js +7 -5
- package/dist/packages/internal/section-contracts/dist/grammar-scope.js +1 -1
- package/dist/packages/internal/section-contracts/dist/index.js +0 -2
- package/dist/packages/internal/section-contracts/dist/list-fill-contract.js +0 -29
- package/dist/packages/internal/section-contracts/dist/list-scalar-contract.js +2 -16
- package/dist/packages/internal/section-contracts/dist/nested-slot-contract.js +6 -6
- package/dist/packages/internal/section-contracts/dist/object-contract.js +4 -2
- package/dist/packages/internal/section-contracts/dist/poi-curation-contract.js +6 -2
- package/dist/packages/internal/section-contracts/dist/row-fill-contract.js +1 -15
- package/dist/packages/internal/section-contracts/dist/row-rule-contract.js +6 -7
- package/dist/packages/internal/section-contracts/dist/row-source-contract.js +7 -8
- package/dist/packages/internal/section-contracts/dist/runners.js +5 -17
- package/dist/packages/internal/section-contracts/dist/select-contract.js +7 -1
- package/dist/packages/internal/section-contracts/dist/source-contract.js +20 -79
- package/dist/packages/internal/section-contracts/dist/sources-contract.js +1 -1
- package/dist/packages/internal/section-contracts/dist/table-member.js +5 -8
- package/dist/packages/internal/section-contracts/dist/writer-reads-fact-contract.js +5 -10
- package/dist/packages/internal/source-resolution/dist/index.js +21 -189
- package/dist/packages/internal/template-artifact/dist/index.js +2 -2
- package/dist/packages/internal/template-artifact/dist/layout.js +3 -1
- package/dist/packages/internal/template-artifact/dist/verify.js +32 -16
- package/dist/packages/internal/template-contracts/dist/content-pick.js +24 -1
- package/dist/packages/internal/template-contracts/dist/decision-fills.js +2 -6
- package/dist/packages/internal/template-contracts/dist/document-value.d.ts +2 -2
- package/dist/packages/internal/template-contracts/dist/fact-keys.d.ts +3 -2
- package/dist/packages/internal/template-contracts/dist/fact-keys.js +19 -43
- package/dist/packages/internal/template-contracts/dist/fact-registry.d.ts +24 -3
- package/dist/packages/internal/template-contracts/dist/fact-registry.js +14 -7
- package/dist/packages/internal/template-contracts/dist/fill-builders.d.ts +1 -1
- package/dist/packages/internal/template-contracts/dist/fill-spec-schema.js +3 -68
- package/dist/packages/internal/template-contracts/dist/fill-spec.js +7 -6
- package/dist/packages/internal/template-contracts/dist/list-editing.js +0 -1
- package/dist/packages/internal/template-contracts/dist/list.d.ts +1 -1
- package/dist/packages/internal/template-contracts/dist/list.js +7 -15
- package/dist/packages/internal/template-contracts/dist/media-candidates.js +1 -1
- package/dist/packages/internal/template-contracts/dist/mirror-kind.js +2 -2
- package/dist/packages/internal/template-contracts/dist/object.js +3 -2
- package/dist/packages/internal/template-contracts/dist/primitive-descriptors.js +2 -2
- package/dist/packages/internal/template-contracts/dist/process-builders.d.ts +2 -2
- package/dist/packages/internal/template-contracts/dist/read-graph.js +14 -51
- package/dist/packages/internal/template-contracts/dist/ref-locate.js +15 -27
- package/dist/packages/internal/template-contracts/dist/registry-facts.d.ts +3 -1
- package/dist/packages/internal/template-contracts/dist/registry-facts.js +13 -24
- package/dist/packages/internal/template-contracts/dist/registry-shape.d.ts +20 -4
- package/dist/packages/internal/template-contracts/dist/registry-shape.js +69 -11
- package/dist/packages/internal/template-contracts/dist/row-planners.js +1 -1
- package/dist/packages/internal/template-contracts/dist/row-ref.d.ts +5 -14
- package/dist/packages/internal/template-contracts/dist/row-ref.js +7 -23
- package/dist/packages/internal/template-contracts/dist/row-sources.js +6 -16
- package/dist/packages/internal/template-contracts/dist/row.d.ts +1 -1
- package/dist/packages/internal/template-contracts/dist/row.js +6 -7
- package/dist/packages/internal/template-contracts/dist/runtime-values.d.ts +5 -20
- package/dist/packages/internal/template-contracts/dist/section-schema-types.d.ts +1 -0
- package/dist/packages/internal/template-contracts/dist/slot-builders.d.ts +29 -37
- package/dist/packages/internal/template-contracts/dist/slot-builders.js +4 -7
- package/dist/packages/internal/template-contracts/dist/slot-catalog.d.ts +2 -733
- package/dist/packages/internal/template-contracts/dist/slot-catalog.js +2 -502
- package/dist/packages/internal/template-contracts/dist/slot-overrides.js +4 -1
- package/dist/packages/internal/template-contracts/dist/slot-ref.d.ts +4 -4
- package/dist/packages/internal/template-contracts/dist/slot-types.js +1 -2
- package/dist/packages/internal/template-contracts/dist/slot-value.d.ts +9 -10
- package/dist/packages/internal/template-contracts/dist/table-members.d.ts +5 -12
- package/dist/packages/internal/template-contracts/dist/table-members.js +7 -37
- package/dist/packages/internal/template-contracts/dist/tour-value.d.ts +2 -2
- package/dist/primitives/Image.d.ts +3 -3
- package/dist/primitives/slot-bindings.js +2 -2
- package/dist/primitives/slot-download.d.ts +1 -1
- package/dist/primitives/slot-media.d.ts +1 -1
- package/dist/rules/registry.js +6 -0
- package/dist/schema/fact.d.ts +19 -52
- package/dist/schema/fact.js +6 -25
- package/dist/schema/facts-view.d.ts +1 -2
- package/dist/schema/property-facts.d.ts +1 -62
- package/dist/schema/section-schema.d.ts +2 -2
- package/dist/schema/section-schema.js +1 -1
- package/dist/section/section.d.ts +2 -2
- package/guide/reference/cli/INDEX.md +2 -2
- package/guide/reference/cli/build.md +1 -1
- package/guide/reference/cli/check.md +1 -1
- package/guide/reference/cli/dev.md +1 -1
- package/guide/reference/cli/property-add.md +1 -1
- package/guide/reference/cli/property-list.md +1 -1
- package/guide/reference/cli/publish.md +1 -1
- package/guide/reference/cli/upgrade.md +1 -1
- package/guide/reference/rules/INDEX.md +4 -5
- package/package.json +1 -1
- package/dist/artifact/playground/client/assets/index-BUmdDDX5.js +0 -1259
- package/dist/artifact/playground/client/assets/index-DDOcM0zA.css +0 -1
- package/dist/packages/internal/fill-vocabulary/dist/row-reads.js +0 -15
- package/dist/packages/internal/section-contracts/dist/group-contract.js +0 -19
- package/dist/packages/internal/section-contracts/dist/option-source-contract.js +0 -22
- package/dist/packages/internal/template-contracts/dist/comparable-address.js +0 -19
- package/dist/packages/internal/template-contracts/dist/facts-view.d.ts +0 -62
- package/dist/packages/internal/template-contracts/dist/legacy-facts.js +0 -167
- package/dist/packages/internal/template-contracts/dist/registry-aliases.js +0 -77
|
@@ -24,7 +24,7 @@ type MediaKind = (typeof MEDIA_KINDS)[number];
|
|
|
24
24
|
* background the subject encloses is cleared too (a logo's counters, the default) or kept
|
|
25
25
|
* (a floor plan's rooms); `autocrop` — the master framed as
|
|
26
26
|
* its `brief` directs, at the aspect the holder's `crop` locks (free form where it locks
|
|
27
|
-
* none). Kind site: what every
|
|
27
|
+
* none). Kind site: what every file of a kind gets from birth, on its kind's row; none
|
|
28
28
|
* takes an option today, and none is a holder's to state. Place site: `crop` — the
|
|
29
29
|
* original cut to the place's crop, the `crop` rendition, at every place whose value
|
|
30
30
|
* carries a crop; declared by nobody.
|
|
@@ -120,737 +120,6 @@ type ProcessVerb = keyof typeof PROCESS_CATALOG;
|
|
|
120
120
|
type HolderProcessVerb = { [V in ProcessVerb]: (typeof PROCESS_CATALOG)[V]["site"] extends "holder" ? V : never; }[ProcessVerb];
|
|
121
121
|
/** The holder-site verbs that apply to EVERY kind of `Kinds` — what a declaration of those kinds may `process`. */
|
|
122
122
|
type ProcessOf<Kinds extends MediaKind> = { [V in HolderProcessVerb]: [Kinds] extends [(typeof PROCESS_CATALOG)[V]["kinds"][number]] ? V : never; }[HolderProcessVerb];
|
|
123
|
-
/**
|
|
124
|
-
* Where in the property fact graph a `SOURCE_FIELDS` entry's value lives: the property root, a unit row, or a contact card.
|
|
125
|
-
*/
|
|
126
|
-
type SourceFieldContainer = "property" | "unit" | "contact";
|
|
127
|
-
/** The value shape a `direct`-source field carries. */
|
|
128
|
-
type SourceFieldValueType = "text" | "number" | "image" | "coordinates" | "address" | "unit_list" | "contact_list" | "comparable_list";
|
|
129
|
-
/**
|
|
130
|
-
* Where a writable `SOURCE_FIELDS` entry's edited value is written back to — the target a slot's "Update everywhere" action updates.
|
|
131
|
-
*
|
|
132
|
-
* @remarks
|
|
133
|
-
* A `SourceFieldDescriptor` with no `writeback` is read-only.
|
|
134
|
-
*/
|
|
135
|
-
type WritebackTarget = {
|
|
136
|
-
kind: "property";
|
|
137
|
-
column: "listing_intent";
|
|
138
|
-
} | {
|
|
139
|
-
kind: "unit";
|
|
140
|
-
column: "unit_label" | "beds" | "baths" | "sqft" | "price";
|
|
141
|
-
} | {
|
|
142
|
-
kind: "contact";
|
|
143
|
-
field: string;
|
|
144
|
-
};
|
|
145
|
-
/**
|
|
146
|
-
* 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).
|
|
147
|
-
*
|
|
148
|
-
* @remarks
|
|
149
|
-
* The column and nothing else, because the table is the row's own: a member
|
|
150
|
-
* is addressed as `<table>.row.<member>`, and whichever layer holds the
|
|
151
|
-
* write already knows which table it dispatched on. A member of `units` or
|
|
152
|
-
* `contacts` carries it into the `writeback` of the `fact.unit.*` /
|
|
153
|
-
* `fact.contact.*` entry generated from it.
|
|
154
|
-
*/
|
|
155
|
-
type RowMemberWriteback = {
|
|
156
|
-
column: string;
|
|
157
|
-
};
|
|
158
|
-
/**
|
|
159
|
-
* The value shape a fact graph entry carries — every `SourceFieldValueType` a slot may bind, widened with the shapes only a derive-time reader sees.
|
|
160
|
-
*
|
|
161
|
-
* @remarks
|
|
162
|
-
* `"row_list"` and `"row"` defer their shape to the entry's own `row`
|
|
163
|
-
* descriptor; `"object"` defers to its `fields`. The bindable pools keep their
|
|
164
|
-
* historical `"unit_list"`/`"contact_list"` spellings rather than collapsing
|
|
165
|
-
* into `"row_list"`, because resolution branches on those two names.
|
|
166
|
-
*/
|
|
167
|
-
type FactValueType = SourceFieldValueType | "boolean" | "text_list" | "image_list" | "row" | "row_list" | "object";
|
|
168
|
-
/** One member of a fact graph entry's row (an array element) or object shape, itself typed and possibly nested. */
|
|
169
|
-
interface FactMemberDescriptor {
|
|
170
|
-
value_type: FactValueType;
|
|
171
|
-
/** The element shape, when this member is itself an array. */
|
|
172
|
-
row?: FactShapeDescriptor;
|
|
173
|
-
}
|
|
174
|
-
/** The typed member shape of an array element or object-valued fact — member name to its descriptor. */
|
|
175
|
-
type FactShapeDescriptor = Readonly<Record<string, FactMemberDescriptor>>;
|
|
176
|
-
/**
|
|
177
|
-
* One member of a table's row (`units`, `contacts`, `comparables`) — the member as an author names it, and where its value lives.
|
|
178
|
-
*
|
|
179
|
-
* @remarks
|
|
180
|
-
* The member's key in its row descriptor is its author-facing name; `path` is
|
|
181
|
-
* the key it is stored under in the canonical row, which differs where storage
|
|
182
|
-
* kept an older spelling (`website` reads `website_url`, a contact's
|
|
183
|
-
* `headshot` reads `avatar_upload_id`).
|
|
184
|
-
*/
|
|
185
|
-
interface TableMemberDescriptor extends FactMemberDescriptor {
|
|
186
|
-
/** The member's key in the canonical row. */
|
|
187
|
-
path: string;
|
|
188
|
-
/** Set on a member the editor may write back — see `RowMemberWriteback`. Absent means read-only. */
|
|
189
|
-
writeback?: RowMemberWriteback;
|
|
190
|
-
/**
|
|
191
|
-
* Set exactly on the members the table's primary-row namespace offers
|
|
192
|
-
* (`fact.unit.*`, `fact.contact.*`), each of which becomes a bindable fact of
|
|
193
|
-
* its own; absent on every other member, and on every member of a table with
|
|
194
|
-
* no primary row.
|
|
195
|
-
*/
|
|
196
|
-
primary?: true;
|
|
197
|
-
}
|
|
198
|
-
/** A table's row descriptor — author-facing member name to its descriptor. */
|
|
199
|
-
type TableRowDescriptor = Readonly<Record<string, TableMemberDescriptor>>;
|
|
200
|
-
/**
|
|
201
|
-
* A fact graph entry a slot's `direct` source may bind to.
|
|
202
|
-
*
|
|
203
|
-
* @remarks
|
|
204
|
-
* Its container, value type and writeback carry over verbatim into the
|
|
205
|
-
* `SOURCE_FIELDS` projection; `role` and the shape descriptors do not.
|
|
206
|
-
*/
|
|
207
|
-
interface BindableFactEntry {
|
|
208
|
-
role: "bindable";
|
|
209
|
-
container: SourceFieldContainer;
|
|
210
|
-
value_type: SourceFieldValueType;
|
|
211
|
-
image?: true;
|
|
212
|
-
writeback?: WritebackTarget;
|
|
213
|
-
fields?: FactShapeDescriptor;
|
|
214
|
-
row?: FactShapeDescriptor;
|
|
215
|
-
}
|
|
216
|
-
/**
|
|
217
|
-
* Author-facing aliases over the registry's flat key space, per container —
|
|
218
|
-
* alias name → the registry key it projects. One table serves every derived
|
|
219
|
-
* fact surface (`fact.*` and the derive-time view).
|
|
220
|
-
*/
|
|
221
|
-
declare const FACT_PROJECTIONS: {
|
|
222
|
-
readonly property: {
|
|
223
|
-
/** Property latitude, projected from the geocode. Read-only; null until the property is geocoded. */
|
|
224
|
-
readonly latitude: "lat";
|
|
225
|
-
/** Property longitude, projected from the geocode. Read-only; null until the property is geocoded. */
|
|
226
|
-
readonly longitude: "lon";
|
|
227
|
-
};
|
|
228
|
-
readonly contact: {
|
|
229
|
-
/** The primary contact's address exactly as entered, on one line. **Writable** — the editor offers "Update everywhere". */
|
|
230
|
-
readonly address: "contact_address";
|
|
231
|
-
};
|
|
232
|
-
};
|
|
233
|
-
/** The alias table's own type — consumed by both derived fact surfaces. */
|
|
234
|
-
type FactProjections = typeof FACT_PROJECTIONS;
|
|
235
|
-
declare const PROPERTY_ROOT_FACTS: {
|
|
236
|
-
/** Street address, resolved to its display form. Read-only. */
|
|
237
|
-
readonly address: {
|
|
238
|
-
readonly role: "bindable";
|
|
239
|
-
readonly container: "property";
|
|
240
|
-
readonly value_type: "text";
|
|
241
|
-
readonly fields: {
|
|
242
|
-
/** The address as one display line. */
|
|
243
|
-
readonly display: {
|
|
244
|
-
readonly value_type: "text";
|
|
245
|
-
};
|
|
246
|
-
/** Street line ("123 Main St"). */
|
|
247
|
-
readonly street: {
|
|
248
|
-
readonly value_type: "text";
|
|
249
|
-
};
|
|
250
|
-
/** Street number and name without the type suffix ("1112 Commonwealth"), for a short street label. */
|
|
251
|
-
readonly street_no_type: {
|
|
252
|
-
readonly value_type: "text";
|
|
253
|
-
};
|
|
254
|
-
/** City ("Springfield"). */
|
|
255
|
-
readonly city: {
|
|
256
|
-
readonly value_type: "text";
|
|
257
|
-
};
|
|
258
|
-
/** State ("IL"). */
|
|
259
|
-
readonly state: {
|
|
260
|
-
readonly value_type: "text";
|
|
261
|
-
};
|
|
262
|
-
/** Postal code ("62704"). */
|
|
263
|
-
readonly postal: {
|
|
264
|
-
readonly value_type: "text";
|
|
265
|
-
};
|
|
266
|
-
/** Apartment, suite or unit designator ("Unit 4B"), where the address carries one. */
|
|
267
|
-
readonly unit: {
|
|
268
|
-
readonly value_type: "text";
|
|
269
|
-
};
|
|
270
|
-
};
|
|
271
|
-
};
|
|
272
|
-
/** Street line of the property address ("123 Main St"). Read-only. */
|
|
273
|
-
readonly address_street: {
|
|
274
|
-
readonly role: "bindable";
|
|
275
|
-
readonly container: "property";
|
|
276
|
-
readonly value_type: "text";
|
|
277
|
-
};
|
|
278
|
-
/** Secondary line of the property address — the apartment, suite or unit designator ("Apt 4"). Read-only. Unrelated to the `unit` container, which holds a priced listing unit. */
|
|
279
|
-
readonly address_unit: {
|
|
280
|
-
readonly role: "bindable";
|
|
281
|
-
readonly container: "property";
|
|
282
|
-
readonly value_type: "text";
|
|
283
|
-
};
|
|
284
|
-
/** City of the property address ("Springfield"). Read-only. */
|
|
285
|
-
readonly address_city: {
|
|
286
|
-
readonly role: "bindable";
|
|
287
|
-
readonly container: "property";
|
|
288
|
-
readonly value_type: "text";
|
|
289
|
-
};
|
|
290
|
-
/** State of the property address ("IL"). Read-only. */
|
|
291
|
-
readonly address_state: {
|
|
292
|
-
readonly role: "bindable";
|
|
293
|
-
readonly container: "property";
|
|
294
|
-
readonly value_type: "text";
|
|
295
|
-
};
|
|
296
|
-
/** Postal code of the property address ("62704"). Read-only. */
|
|
297
|
-
readonly address_postal: {
|
|
298
|
-
readonly role: "bindable";
|
|
299
|
-
readonly container: "property";
|
|
300
|
-
readonly value_type: "text";
|
|
301
|
-
};
|
|
302
|
-
/** Whether the property is for sale or for rent. **Writable** — the editor offers "Update everywhere". Also supplies a `select` slot's option vocabulary. */
|
|
303
|
-
readonly listing_intent: {
|
|
304
|
-
readonly role: "bindable";
|
|
305
|
-
readonly container: "property";
|
|
306
|
-
readonly value_type: "text";
|
|
307
|
-
readonly writeback: {
|
|
308
|
-
readonly kind: "property";
|
|
309
|
-
readonly column: "listing_intent";
|
|
310
|
-
};
|
|
311
|
-
};
|
|
312
|
-
/** Property latitude, projected from the geocode. Read-only; null until the property is geocoded. Reachable as `fact.property.latitude`. */
|
|
313
|
-
readonly lat: {
|
|
314
|
-
readonly role: "bindable";
|
|
315
|
-
readonly container: "property";
|
|
316
|
-
readonly value_type: "number";
|
|
317
|
-
};
|
|
318
|
-
/** Property longitude, projected from the geocode. Read-only; null until the property is geocoded. Reachable as `fact.property.longitude`. */
|
|
319
|
-
readonly lon: {
|
|
320
|
-
readonly role: "bindable";
|
|
321
|
-
readonly container: "property";
|
|
322
|
-
readonly value_type: "number";
|
|
323
|
-
};
|
|
324
|
-
};
|
|
325
|
-
declare const TABLE_FACTS: {
|
|
326
|
-
/** Every unit, baked verbatim as a record list. Read-only as a whole; the per-row fields under `fact.unit` stay writable. */
|
|
327
|
-
readonly units: {
|
|
328
|
-
readonly role: "bindable";
|
|
329
|
-
readonly container: "property";
|
|
330
|
-
readonly value_type: "unit_list";
|
|
331
|
-
readonly row: {
|
|
332
|
-
/** Durable unit identity, stable across edits — what a baked row is addressed by. */
|
|
333
|
-
readonly unit_id: {
|
|
334
|
-
readonly path: "unit_id";
|
|
335
|
-
readonly value_type: "text";
|
|
336
|
-
};
|
|
337
|
-
/** Display order within the property. */
|
|
338
|
-
readonly position: {
|
|
339
|
-
readonly path: "position";
|
|
340
|
-
readonly value_type: "number";
|
|
341
|
-
};
|
|
342
|
-
/** The floor plans assigned to this unit, in display order. Picked from the property's floor-plan uploads. */
|
|
343
|
-
readonly floor_plans: {
|
|
344
|
-
readonly path: "floor_plans";
|
|
345
|
-
readonly value_type: "image_list";
|
|
346
|
-
readonly row: {
|
|
347
|
-
/** Identity of the floor-plan image (its upload id). */
|
|
348
|
-
readonly id: {
|
|
349
|
-
readonly value_type: "text";
|
|
350
|
-
};
|
|
351
|
-
/** The floor this plan covers, where one was detected. */
|
|
352
|
-
readonly floor_label: {
|
|
353
|
-
readonly value_type: "text";
|
|
354
|
-
};
|
|
355
|
-
/** Display order within the unit. */
|
|
356
|
-
readonly position: {
|
|
357
|
-
readonly value_type: "number";
|
|
358
|
-
};
|
|
359
|
-
};
|
|
360
|
-
};
|
|
361
|
-
/** The unit's label, or null when the listing never asked for one. **Writable** — the editor offers "Update everywhere". */
|
|
362
|
-
readonly unit_label: {
|
|
363
|
-
readonly path: "unit_label";
|
|
364
|
-
readonly value_type: "text";
|
|
365
|
-
readonly primary: true;
|
|
366
|
-
readonly writeback: {
|
|
367
|
-
readonly column: "unit_label";
|
|
368
|
-
};
|
|
369
|
-
};
|
|
370
|
-
/** Bedroom count. **Writable** — the editor offers "Update everywhere". */
|
|
371
|
-
readonly beds: {
|
|
372
|
-
readonly path: "beds";
|
|
373
|
-
readonly value_type: "number";
|
|
374
|
-
readonly primary: true;
|
|
375
|
-
readonly writeback: {
|
|
376
|
-
readonly column: "beds";
|
|
377
|
-
};
|
|
378
|
-
};
|
|
379
|
-
/** Bathroom count. **Writable** — the editor offers "Update everywhere". */
|
|
380
|
-
readonly baths: {
|
|
381
|
-
readonly path: "baths";
|
|
382
|
-
readonly value_type: "number";
|
|
383
|
-
readonly primary: true;
|
|
384
|
-
readonly writeback: {
|
|
385
|
-
readonly column: "baths";
|
|
386
|
-
};
|
|
387
|
-
};
|
|
388
|
-
/** Interior square footage. **Writable** — the editor offers "Update everywhere". */
|
|
389
|
-
readonly sqft: {
|
|
390
|
-
readonly path: "sqft";
|
|
391
|
-
readonly value_type: "number";
|
|
392
|
-
readonly primary: true;
|
|
393
|
-
readonly writeback: {
|
|
394
|
-
readonly column: "sqft";
|
|
395
|
-
};
|
|
396
|
-
};
|
|
397
|
-
/** Price as a flex value — digits when numeric, the verbatim text override (such as "Sold") otherwise. **Writable** — the editor offers "Update everywhere". */
|
|
398
|
-
readonly price: {
|
|
399
|
-
readonly path: "price";
|
|
400
|
-
readonly value_type: "text";
|
|
401
|
-
readonly primary: true;
|
|
402
|
-
readonly writeback: {
|
|
403
|
-
readonly column: "price";
|
|
404
|
-
};
|
|
405
|
-
};
|
|
406
|
-
};
|
|
407
|
-
};
|
|
408
|
-
/** 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. */
|
|
409
|
-
readonly comparables: {
|
|
410
|
-
readonly role: "bindable";
|
|
411
|
-
readonly container: "property";
|
|
412
|
-
readonly value_type: "comparable_list";
|
|
413
|
-
readonly row: {
|
|
414
|
-
/** Durable row identity, stable across edits — what a baked row is addressed by. */
|
|
415
|
-
readonly id: {
|
|
416
|
-
readonly path: "id";
|
|
417
|
-
readonly value_type: "text";
|
|
418
|
-
};
|
|
419
|
-
/** Street line of the comparable's address ("12 Oak St"). */
|
|
420
|
-
readonly address_street: {
|
|
421
|
-
readonly path: "address_street";
|
|
422
|
-
readonly value_type: "text";
|
|
423
|
-
};
|
|
424
|
-
/** City of the comparable's address. */
|
|
425
|
-
readonly address_city: {
|
|
426
|
-
readonly path: "address_city";
|
|
427
|
-
readonly value_type: "text";
|
|
428
|
-
};
|
|
429
|
-
/** State of the comparable's address. */
|
|
430
|
-
readonly address_state: {
|
|
431
|
-
readonly path: "address_state";
|
|
432
|
-
readonly value_type: "text";
|
|
433
|
-
};
|
|
434
|
-
/** Postal code of the comparable's address. */
|
|
435
|
-
readonly address_postal: {
|
|
436
|
-
readonly path: "address_postal";
|
|
437
|
-
readonly value_type: "text";
|
|
438
|
-
};
|
|
439
|
-
/** The comparable's address as one display line, assembled at projection. */
|
|
440
|
-
readonly address: {
|
|
441
|
-
readonly path: "address";
|
|
442
|
-
readonly value_type: "text";
|
|
443
|
-
};
|
|
444
|
-
/** Latitude of the comparable. The comps map pins on it. */
|
|
445
|
-
readonly lat: {
|
|
446
|
-
readonly path: "lat";
|
|
447
|
-
readonly value_type: "number";
|
|
448
|
-
};
|
|
449
|
-
/** Longitude of the comparable. */
|
|
450
|
-
readonly lng: {
|
|
451
|
-
readonly path: "lng";
|
|
452
|
-
readonly value_type: "number";
|
|
453
|
-
};
|
|
454
|
-
/** Great-circle distance from the subject property in meters, computed at projection; null while either side lacks coordinates. */
|
|
455
|
-
readonly distance_m: {
|
|
456
|
-
readonly path: "distance_m";
|
|
457
|
-
readonly value_type: "number";
|
|
458
|
-
};
|
|
459
|
-
/** Where the comparable stands on the market: `"sold"` when the row carries a sale date, `"active"` when it does not. Derived rather than answered; it is what disambiguates `price`. */
|
|
460
|
-
readonly status: {
|
|
461
|
-
readonly path: "status";
|
|
462
|
-
readonly value_type: "text";
|
|
463
|
-
};
|
|
464
|
-
/** 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. **Writable** from the canvas. */
|
|
465
|
-
readonly price: {
|
|
466
|
-
readonly path: "price";
|
|
467
|
-
readonly value_type: "number";
|
|
468
|
-
readonly writeback: {
|
|
469
|
-
readonly column: "price";
|
|
470
|
-
};
|
|
471
|
-
};
|
|
472
|
-
/** 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. */
|
|
473
|
-
readonly price_period: {
|
|
474
|
-
readonly path: "price_period";
|
|
475
|
-
readonly value_type: "text";
|
|
476
|
-
};
|
|
477
|
-
/** 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. */
|
|
478
|
-
readonly sale_date: {
|
|
479
|
-
readonly path: "sale_date";
|
|
480
|
-
readonly value_type: "text";
|
|
481
|
-
readonly writeback: {
|
|
482
|
-
readonly column: "sale_date";
|
|
483
|
-
};
|
|
484
|
-
};
|
|
485
|
-
/** Bedroom count. Every comps slide prints it. **Writable** from the canvas. */
|
|
486
|
-
readonly beds: {
|
|
487
|
-
readonly path: "beds";
|
|
488
|
-
readonly value_type: "number";
|
|
489
|
-
readonly writeback: {
|
|
490
|
-
readonly column: "beds";
|
|
491
|
-
};
|
|
492
|
-
};
|
|
493
|
-
/** Bathroom count. **Writable** from the canvas. */
|
|
494
|
-
readonly baths: {
|
|
495
|
-
readonly path: "baths";
|
|
496
|
-
readonly value_type: "number";
|
|
497
|
-
readonly writeback: {
|
|
498
|
-
readonly column: "baths";
|
|
499
|
-
};
|
|
500
|
-
};
|
|
501
|
-
/** Interior square footage. The comps table divides the price by it. **Writable** from the canvas. */
|
|
502
|
-
readonly sqft: {
|
|
503
|
-
readonly path: "sqft";
|
|
504
|
-
readonly value_type: "number";
|
|
505
|
-
readonly writeback: {
|
|
506
|
-
readonly column: "sqft";
|
|
507
|
-
};
|
|
508
|
-
};
|
|
509
|
-
/** 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 it as the photo's asset record, and an `image` row field bound to this member receives it as a media reference. Null when the user uploaded none. */
|
|
510
|
-
readonly photo: {
|
|
511
|
-
readonly path: "photo_upload_id";
|
|
512
|
-
readonly value_type: "image";
|
|
513
|
-
};
|
|
514
|
-
/** The year the comparable was built. */
|
|
515
|
-
readonly year_built: {
|
|
516
|
-
readonly path: "year_built";
|
|
517
|
-
readonly value_type: "number";
|
|
518
|
-
};
|
|
519
|
-
/** Lot size in square feet. */
|
|
520
|
-
readonly lot_sqft: {
|
|
521
|
-
readonly path: "lot_sqft";
|
|
522
|
-
readonly value_type: "number";
|
|
523
|
-
};
|
|
524
|
-
/** How many storeys the comparable has. */
|
|
525
|
-
readonly stories: {
|
|
526
|
-
readonly path: "stories";
|
|
527
|
-
readonly value_type: "number";
|
|
528
|
-
};
|
|
529
|
-
/** How many units the comparable's building holds — a multifamily figure, and nothing to do with the SUBJECT's units. */
|
|
530
|
-
readonly units: {
|
|
531
|
-
readonly path: "units";
|
|
532
|
-
readonly value_type: "number";
|
|
533
|
-
};
|
|
534
|
-
/** Monthly HOA dues in dollars. */
|
|
535
|
-
readonly hoa_monthly: {
|
|
536
|
-
readonly path: "hoa_monthly";
|
|
537
|
-
readonly value_type: "number";
|
|
538
|
-
};
|
|
539
|
-
/** 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. */
|
|
540
|
-
readonly list_price: {
|
|
541
|
-
readonly path: "list_price";
|
|
542
|
-
readonly value_type: "number";
|
|
543
|
-
};
|
|
544
|
-
/** When the listing went live (ISO `YYYY-MM-DD`) — not when it closed, which is `sale_date`. */
|
|
545
|
-
readonly listed_date: {
|
|
546
|
-
readonly path: "listed_date";
|
|
547
|
-
readonly value_type: "text";
|
|
548
|
-
};
|
|
549
|
-
/** The listing's MLS number. */
|
|
550
|
-
readonly mls_number: {
|
|
551
|
-
readonly path: "mls_number";
|
|
552
|
-
readonly value_type: "text";
|
|
553
|
-
};
|
|
554
|
-
/** The listing remarks, verbatim from the source. */
|
|
555
|
-
readonly description: {
|
|
556
|
-
readonly path: "description";
|
|
557
|
-
readonly value_type: "text";
|
|
558
|
-
};
|
|
559
|
-
};
|
|
560
|
-
};
|
|
561
|
-
/** Every contact card, baked verbatim as a record list. Read-only as a whole; the per-row fields under `fact.contact` stay writable. */
|
|
562
|
-
readonly contacts: {
|
|
563
|
-
readonly role: "bindable";
|
|
564
|
-
readonly container: "property";
|
|
565
|
-
readonly value_type: "contact_list";
|
|
566
|
-
readonly row: {
|
|
567
|
-
/** Stable identity of the contact card. */
|
|
568
|
-
readonly id: {
|
|
569
|
-
readonly path: "id";
|
|
570
|
-
readonly value_type: "text";
|
|
571
|
-
};
|
|
572
|
-
/** Whether this is the property's first contact (position 0) — the one the brand marks resolve from. */
|
|
573
|
-
readonly primary: {
|
|
574
|
-
readonly path: "primary";
|
|
575
|
-
readonly value_type: "boolean";
|
|
576
|
-
};
|
|
577
|
-
/** Contact name. **Writable** — the editor offers "Update everywhere". */
|
|
578
|
-
readonly name: {
|
|
579
|
-
readonly path: "name";
|
|
580
|
-
readonly value_type: "text";
|
|
581
|
-
readonly primary: true;
|
|
582
|
-
readonly writeback: {
|
|
583
|
-
readonly column: "name";
|
|
584
|
-
};
|
|
585
|
-
};
|
|
586
|
-
/** Contact job title. **Writable** — the editor offers "Update everywhere". */
|
|
587
|
-
readonly title: {
|
|
588
|
-
readonly path: "title";
|
|
589
|
-
readonly value_type: "text";
|
|
590
|
-
readonly primary: true;
|
|
591
|
-
readonly writeback: {
|
|
592
|
-
readonly column: "title";
|
|
593
|
-
};
|
|
594
|
-
};
|
|
595
|
-
/** The organization the contact belongs to — the brokerage a branded deliverable paints as its wordmark. **Writable** — the editor offers "Update everywhere". */
|
|
596
|
-
readonly org_name: {
|
|
597
|
-
readonly path: "org_name";
|
|
598
|
-
readonly value_type: "text";
|
|
599
|
-
readonly primary: true;
|
|
600
|
-
readonly writeback: {
|
|
601
|
-
readonly column: "org_name";
|
|
602
|
-
};
|
|
603
|
-
};
|
|
604
|
-
/** Contact biography. **Writable** — the editor offers "Update everywhere". */
|
|
605
|
-
readonly bio: {
|
|
606
|
-
readonly path: "bio";
|
|
607
|
-
readonly value_type: "text";
|
|
608
|
-
readonly primary: true;
|
|
609
|
-
readonly writeback: {
|
|
610
|
-
readonly column: "bio";
|
|
611
|
-
};
|
|
612
|
-
};
|
|
613
|
-
/** The contact's address as one display line, assembled at projection. Read-only: the contact stores its address as parts and a pin, edited whole as an `address`. Its flat fact key is `contact_address`, because the property already owns `address`. */
|
|
614
|
-
readonly address: {
|
|
615
|
-
readonly path: "address";
|
|
616
|
-
readonly value_type: "text";
|
|
617
|
-
readonly primary: true;
|
|
618
|
-
};
|
|
619
|
-
/** Contact email address. **Writable** — the editor offers "Update everywhere". */
|
|
620
|
-
readonly email: {
|
|
621
|
-
readonly path: "email";
|
|
622
|
-
readonly value_type: "text";
|
|
623
|
-
readonly primary: true;
|
|
624
|
-
readonly writeback: {
|
|
625
|
-
readonly column: "email";
|
|
626
|
-
};
|
|
627
|
-
};
|
|
628
|
-
/** Contact phone number. **Writable** — the editor offers "Update everywhere". */
|
|
629
|
-
readonly phone: {
|
|
630
|
-
readonly path: "phone";
|
|
631
|
-
readonly value_type: "text";
|
|
632
|
-
readonly primary: true;
|
|
633
|
-
readonly writeback: {
|
|
634
|
-
readonly column: "phone";
|
|
635
|
-
};
|
|
636
|
-
};
|
|
637
|
-
/** Contact website URL. **Writable** — the editor offers "Update everywhere". */
|
|
638
|
-
readonly website: {
|
|
639
|
-
readonly path: "website_url";
|
|
640
|
-
readonly value_type: "text";
|
|
641
|
-
readonly primary: true;
|
|
642
|
-
readonly writeback: {
|
|
643
|
-
readonly column: "website";
|
|
644
|
-
};
|
|
645
|
-
};
|
|
646
|
-
/** Contact Instagram URL. **Writable** — the editor offers "Update everywhere". */
|
|
647
|
-
readonly instagram: {
|
|
648
|
-
readonly path: "instagram_url";
|
|
649
|
-
readonly value_type: "text";
|
|
650
|
-
readonly primary: true;
|
|
651
|
-
readonly writeback: {
|
|
652
|
-
readonly column: "socials.instagram";
|
|
653
|
-
};
|
|
654
|
-
};
|
|
655
|
-
/** Contact LinkedIn URL. **Writable** — the editor offers "Update everywhere". */
|
|
656
|
-
readonly linkedin: {
|
|
657
|
-
readonly path: "linkedin_url";
|
|
658
|
-
readonly value_type: "text";
|
|
659
|
-
readonly primary: true;
|
|
660
|
-
readonly writeback: {
|
|
661
|
-
readonly column: "socials.linkedin";
|
|
662
|
-
};
|
|
663
|
-
};
|
|
664
|
-
/** Contact X URL. **Writable** — the editor offers "Update everywhere". */
|
|
665
|
-
readonly x: {
|
|
666
|
-
readonly path: "x_url";
|
|
667
|
-
readonly value_type: "text";
|
|
668
|
-
readonly primary: true;
|
|
669
|
-
readonly writeback: {
|
|
670
|
-
readonly column: "socials.x";
|
|
671
|
-
};
|
|
672
|
-
};
|
|
673
|
-
/** Contact Facebook URL. **Writable** — the editor offers "Update everywhere". */
|
|
674
|
-
readonly facebook: {
|
|
675
|
-
readonly path: "facebook_url";
|
|
676
|
-
readonly value_type: "text";
|
|
677
|
-
readonly primary: true;
|
|
678
|
-
readonly writeback: {
|
|
679
|
-
readonly column: "socials.facebook";
|
|
680
|
-
};
|
|
681
|
-
};
|
|
682
|
-
/** The contact's headshot — an upload the contact itself owns, so no media pool offers it. Read-only; belongs on an `image` slot. */
|
|
683
|
-
readonly headshot: {
|
|
684
|
-
readonly path: "avatar_upload_id";
|
|
685
|
-
readonly value_type: "image";
|
|
686
|
-
readonly primary: true;
|
|
687
|
-
};
|
|
688
|
-
/** The contact's logo for dark backgrounds — an upload the contact itself owns; a slot bound to it falls back to a silhouette of the light logo. Read-only; belongs on an `image` slot. */
|
|
689
|
-
readonly logo_dark: {
|
|
690
|
-
readonly path: "logo_dark_upload_id";
|
|
691
|
-
readonly value_type: "image";
|
|
692
|
-
readonly primary: true;
|
|
693
|
-
};
|
|
694
|
-
/** The contact's logo for light backgrounds — an upload the contact itself owns; a slot bound to it falls back to a silhouette of the dark logo. Read-only; belongs on an `image` slot. */
|
|
695
|
-
readonly logo_light: {
|
|
696
|
-
readonly path: "logo_light_upload_id";
|
|
697
|
-
readonly value_type: "image";
|
|
698
|
-
readonly primary: true;
|
|
699
|
-
};
|
|
700
|
-
};
|
|
701
|
-
};
|
|
702
|
-
};
|
|
703
|
-
declare const READABLE_FACTS: {
|
|
704
|
-
/** The property's always-on prose description, the substrate every text decision is grounded in. */
|
|
705
|
-
readonly description: {
|
|
706
|
-
readonly role: "readable";
|
|
707
|
-
readonly path: "narrative.description";
|
|
708
|
-
readonly value_type: "text";
|
|
709
|
-
};
|
|
710
|
-
/** The primary unit — the lowest-positioned one — or null when the property has no units. */
|
|
711
|
-
readonly unit: {
|
|
712
|
-
readonly role: "readable";
|
|
713
|
-
readonly path: "units";
|
|
714
|
-
readonly value_type: "row";
|
|
715
|
-
readonly primary_of: "units";
|
|
716
|
-
};
|
|
717
|
-
/** The primary contact card, or null when the property has no contacts. */
|
|
718
|
-
readonly contact: {
|
|
719
|
-
readonly role: "readable";
|
|
720
|
-
readonly path: "contacts";
|
|
721
|
-
readonly value_type: "row";
|
|
722
|
-
readonly primary_of: "contacts";
|
|
723
|
-
};
|
|
724
|
-
};
|
|
725
|
-
type TableFactEntry = BindableFactEntry & {
|
|
726
|
-
row: TableRowDescriptor;
|
|
727
|
-
};
|
|
728
|
-
type TableFacts = typeof TABLE_FACTS;
|
|
729
|
-
/** A container whose facts are generated from a table's primary row. */
|
|
730
|
-
type PrimaryRowContainer = "unit" | "contact";
|
|
731
|
-
type AliasedMember<C extends PrimaryRowContainer> = C extends keyof FactProjections ? keyof FactProjections[C] : never;
|
|
732
|
-
type PrimaryRowWriteback<C extends PrimaryRowContainer, Column extends string> = C extends "unit" ? {
|
|
733
|
-
readonly kind: "unit";
|
|
734
|
-
readonly column: Column;
|
|
735
|
-
} : {
|
|
736
|
-
readonly kind: "contact";
|
|
737
|
-
readonly field: Column;
|
|
738
|
-
};
|
|
739
|
-
type PrimaryRowFact<E extends TableFactEntry, D extends TableMemberDescriptor, C extends PrimaryRowContainer> = {
|
|
740
|
-
readonly role: "bindable";
|
|
741
|
-
readonly container: C;
|
|
742
|
-
readonly value_type: D["value_type"];
|
|
743
|
-
} & (D["value_type"] extends "image" ? {
|
|
744
|
-
readonly image: true;
|
|
745
|
-
} : unknown) & (D extends {
|
|
746
|
-
writeback: {
|
|
747
|
-
column: infer Column extends string;
|
|
748
|
-
};
|
|
749
|
-
} ? {
|
|
750
|
-
readonly writeback: PrimaryRowWriteback<C, Column>;
|
|
751
|
-
} : unknown);
|
|
752
|
-
type PrimaryRowFacts<E extends TableFactEntry, C extends PrimaryRowContainer> = { readonly [M in keyof E["row"] as E["row"][M] extends {
|
|
753
|
-
primary: true;
|
|
754
|
-
} ? M extends AliasedMember<C> ? never : M : never]: PrimaryRowFact<E, E["row"][M], C>; } & { readonly [M in keyof E["row"] as E["row"][M] extends {
|
|
755
|
-
primary: true;
|
|
756
|
-
} ? M extends AliasedMember<C> ? FactProjections[C & keyof FactProjections][M & keyof FactProjections[C & keyof FactProjections]] : never : never]: PrimaryRowFact<E, E["row"][M], C>; };
|
|
757
|
-
type FactGraph = typeof PROPERTY_ROOT_FACTS & PrimaryRowFacts<TableFacts[(typeof READABLE_FACTS)["unit"]["primary_of"]], "unit"> & TableFacts & PrimaryRowFacts<TableFacts[(typeof READABLE_FACTS)["contact"]["primary_of"]], "contact"> & typeof READABLE_FACTS;
|
|
758
|
-
/**
|
|
759
|
-
* The single description of every fact an author can reach — the whole property fact graph, bindable and readable-only alike.
|
|
760
|
-
*
|
|
761
|
-
* @remarks
|
|
762
|
-
* Each entry's own doc comment is the hover text an author sees on the
|
|
763
|
-
* matching `fact.*` entry elsewhere in the schema layer, so keep every entry
|
|
764
|
-
* documented — that sentence is the only way an author distinguishes
|
|
765
|
-
* `fact.unit.beds` from `fact.property.listing_intent` without opening this file.
|
|
766
|
-
* The bindable entries are ordered as `fact.*` presents them.
|
|
767
|
-
*
|
|
768
|
-
* The unit and contact facts are not declared one by one: they are the members
|
|
769
|
-
* of the `units` and `contacts` row descriptors marked `primary`,
|
|
770
|
-
* generated from those descriptors, so a row member and the `fact.unit.*` /
|
|
771
|
-
* `fact.contact.*` entry reading the primary row are one declaration.
|
|
772
|
-
*/
|
|
773
|
-
declare const FACT_GRAPH: FactGraph;
|
|
774
|
-
/** A fact graph entry's name — a key of `FACT_GRAPH`. */
|
|
775
|
-
type FactGraphName = keyof typeof FACT_GRAPH;
|
|
776
|
-
/**
|
|
777
|
-
* The bindable slice of a fact graph, each entry narrowed to its `SourceFieldDescriptor` members.
|
|
778
|
-
*
|
|
779
|
-
* @remarks
|
|
780
|
-
* Key remapping rather than a filter over `Record<string, …>`: it is what
|
|
781
|
-
* carries every entry's own doc sentence through to the binding catalog and on
|
|
782
|
-
* into the `fact.*` namespace, where hovering a binding is how an author reads
|
|
783
|
-
* it.
|
|
784
|
-
*/
|
|
785
|
-
type BindableFacts<G> = { [K in keyof G as G[K] extends {
|
|
786
|
-
role: "bindable";
|
|
787
|
-
} ? K : never]: Omit<G[K], "role" | "fields" | "row">; };
|
|
788
|
-
/**
|
|
789
|
-
* The catalog of every canonical field a slot's `direct` source may bind to — property, unit, and contact scalars, plus the read-only array sources (`units`, `contacts`).
|
|
790
|
-
*
|
|
791
|
-
* @remarks
|
|
792
|
-
* Not a list of its own: it is exactly the bindable half of the property fact
|
|
793
|
-
* graph, stripped to the descriptor a resolver and the editor read. Each entry
|
|
794
|
-
* declares its container, value type, and (if writable) writeback target, and
|
|
795
|
-
* carries its doc sentence through to `fact.*` — where the fact namespace
|
|
796
|
-
* reference lists every binding this yields, with that prose.
|
|
797
|
-
* Computed/aggregated values are never here — a section authors those with
|
|
798
|
-
* `compute()`.
|
|
799
|
-
*/
|
|
800
|
-
declare const SOURCE_FIELDS: BindableFacts<typeof FACT_GRAPH>;
|
|
801
|
-
/** A canonical field name a `direct` source may bind to — a key of `SOURCE_FIELDS`. */
|
|
802
|
-
type SourceFieldName = keyof typeof SOURCE_FIELDS;
|
|
803
|
-
/**
|
|
804
|
-
* The registry of tables a slot may be directly linked to (a slot is a directly linked list iff `source.kind === "home"` and `source.key` is a key here).
|
|
805
|
-
*
|
|
806
|
-
* @remarks
|
|
807
|
-
* The single home for per-kind mechanics; other layers implement their
|
|
808
|
-
* operations keyed by these entries rather than restating them. `idKey`
|
|
809
|
-
* names the stable canonical row id (used for merge, markers, and editor
|
|
810
|
-
* identity). `cap`/`min`, when present, are the membership ceiling/floor a
|
|
811
|
-
* directly linked list inherits: declared, not enforced (a list is stored at
|
|
812
|
-
* any count). `ownership` is the property-owned vs. library-shared
|
|
813
|
-
* discriminator that gates writeback/fan-out strategy per layer — never a
|
|
814
|
-
* shared physical table.
|
|
815
|
-
*/
|
|
816
|
-
declare const TABLES: {
|
|
817
|
-
readonly units: {
|
|
818
|
-
readonly idKey: "unit_id";
|
|
819
|
-
readonly ownership: "property";
|
|
820
|
-
};
|
|
821
|
-
readonly contacts: {
|
|
822
|
-
readonly idKey: "id";
|
|
823
|
-
readonly cap: 12;
|
|
824
|
-
readonly min: 1;
|
|
825
|
-
readonly ownership: "library";
|
|
826
|
-
};
|
|
827
|
-
readonly comparables: {
|
|
828
|
-
readonly idKey: "id";
|
|
829
|
-
readonly ownership: "property";
|
|
830
|
-
};
|
|
831
|
-
};
|
|
832
|
-
/** A table name a list may bind to — one of `TABLES`' keys. */
|
|
833
|
-
type TableField = keyof typeof TABLES;
|
|
834
|
-
/** Each registry table's key — the table's path in the registry, home first. */
|
|
835
|
-
declare const REGISTRY_TABLE_KEYS: {
|
|
836
|
-
readonly units: "property.units";
|
|
837
|
-
readonly contacts: "property.contacts";
|
|
838
|
-
readonly comparables: "property.comparables";
|
|
839
|
-
readonly commercial_spaces: "property.commercial_spaces";
|
|
840
|
-
};
|
|
841
|
-
/** A registry table's name — one of `REGISTRY_TABLE_KEYS`' keys: every legacy table, and the tables only the registry holds. */
|
|
842
|
-
type RegistryTable = keyof typeof REGISTRY_TABLE_KEYS;
|
|
843
|
-
/**
|
|
844
|
-
* The library home's list facts whose items are a table's rows — `library.contacts`,
|
|
845
|
-
* the contacts the property's `contacts` page picks from. The same table as the
|
|
846
|
-
* property's key names, under the registry reading: a row `from` it offers the same
|
|
847
|
-
* members.
|
|
848
|
-
*/
|
|
849
|
-
declare const LIBRARY_TABLE_KEYS: {
|
|
850
|
-
readonly contacts: "library.contacts";
|
|
851
|
-
};
|
|
852
|
-
/** A table's registry key — one of `REGISTRY_TABLE_KEYS`' or `LIBRARY_TABLE_KEYS`' values. */
|
|
853
|
-
type RegistryTableKey = (typeof REGISTRY_TABLE_KEYS)[RegistryTable] | (typeof LIBRARY_TABLE_KEYS)[keyof typeof LIBRARY_TABLE_KEYS];
|
|
854
123
|
/**
|
|
855
124
|
* The single source of truth for "what kind of link is this URL". A `url`
|
|
856
125
|
* slot names one of these — or a single provider id — in its `accepts`
|
|
@@ -972,4 +241,4 @@ declare const VIDEO_SOURCES: readonly ["upload", "link"];
|
|
|
972
241
|
/** A video's storage/origin kind — one of `VIDEO_SOURCES`. */
|
|
973
242
|
type VideoSource = (typeof VIDEO_SOURCES)[number];
|
|
974
243
|
//#endregion
|
|
975
|
-
export {
|
|
244
|
+
export { HolderProcessVerb, LINK_KINDS, LINK_PROVIDERS, LinkKind, LinkProviderId, MEDIA_KINDS, MediaKind, OBJECT_BINDING_OWN_KEYS, ObjectBindingOwnKey, PROCESS_CATALOG, ProcessOf, ProcessVerb, VIDEO_SOURCES, VideoSource };
|