@homepages/concrete 8.0.0 → 9.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1005 -0
- package/README.md +20 -9
- package/codemods/list-grammar.mjs +923 -0
- package/codemods/manifest.json +64 -0
- package/codemods/process-builders.mjs +198 -0
- package/codemods/slot-object.mjs +1097 -0
- package/codemods/steps/content-object-fields.mjs +324 -0
- package/codemods/steps/list-object-form.mjs +6 -7
- package/codemods/table-rows.mjs +568 -0
- package/codemods/unwrap-object-fields.mjs +310 -0
- package/codemods/viewer-slot-document.mjs +131 -0
- package/codemods/write-property-as-facts-document.mjs +716 -0
- package/codemods/write-the-address-line.mjs +255 -0
- package/codemods/write-the-registry-members.mjs +653 -0
- package/codemods/write-the-select-from.mjs +141 -0
- package/codemods/write-the-sole-from.mjs +369 -0
- package/codemods/write-the-table-from.mjs +267 -0
- package/codemods/write-the-whole-item.mjs +512 -0
- package/codemods/writeback-drop.mjs +168 -0
- package/codemods/written-contact-address.mjs +162 -0
- package/codemods/written-media-category.mjs +227 -0
- package/codemods/written-ref-kinds-name-the-layer.mjs +172 -0
- package/codemods/written-uploads-replace-pool-reads.mjs +454 -0
- package/codemods/written-uploads-sort-into-lists.mjs +405 -0
- package/codemods/written-uploads-stated-in-sorted-lists.mjs +295 -0
- package/codemods/written-video-sources-drop.mjs +144 -0
- package/codemods/written-without-pick-none.mjs +146 -0
- package/codemods/written-without-retired-knowledge.mjs +223 -0
- package/codemods/written-without-the-media-key.mjs +202 -0
- package/codemods/written-without-the-property-type.mjs +249 -0
- package/dist/artifact/playground/client/assets/index-BOYbgBnP.js +1259 -0
- package/dist/artifact/playground/client/assets/index-DDOcM0zA.css +1 -0
- package/dist/artifact/playground/client/index.html +2 -2
- package/dist/artifact/playground/client/island-canvas-host.mjs +1 -1
- package/dist/artifact/playground/host.mjs +61 -27
- package/dist/base.css +58 -1
- package/dist/cli/build/artifact.js +6 -9
- package/dist/cli/build/captures.js +2 -12
- package/dist/cli/build/esbuild.js +1 -25
- package/dist/cli/build/fixtures.js +2 -1
- package/dist/cli/build/icons.js +1 -1
- package/dist/cli/build/static.js +2 -2
- package/dist/cli/capture/capture.js +8 -9
- package/dist/cli/check/analyze.js +8 -1
- package/dist/cli/check/load-outdir.js +47 -0
- package/dist/cli/check/load-workspace.js +4 -4
- package/dist/cli/check/render/html.js +1 -2
- package/dist/cli/check/render/inputs.js +10 -3
- package/dist/cli/check/render/island-frames.js +2 -1
- package/dist/cli/check/render/marker-coverage.js +23 -15
- package/dist/cli/check/report.js +5 -0
- package/dist/cli/check/stages/bundles.js +1 -1
- package/dist/cli/check/stages/relations.js +1 -1
- package/dist/cli/check/stages/render.js +48 -33
- package/dist/cli/check/stages/sections.js +83 -31
- package/dist/cli/check/stages/workspace.js +2 -0
- package/dist/cli/check/template-key.js +16 -0
- package/dist/cli/commands.js +1 -1
- package/dist/cli/dev/crop.js +1 -1
- package/dist/cli/dev/fixture-ladders.js +96 -0
- package/dist/cli/dev/islands.js +12 -123
- package/dist/cli/dev/listen.js +20 -1
- package/dist/cli/dev/load-template.js +1 -1
- package/dist/cli/dev/server.js +35 -10
- package/dist/cli/dev/vite.js +9 -7
- package/dist/cli/dev/workspace-reader.js +16 -16
- package/dist/cli/media/derive.js +43 -57
- package/dist/cli/media/frame-rung-floor.js +0 -1
- package/dist/cli/property/index.js +1 -6
- package/dist/css/inline.js +1 -22
- package/dist/eslint/rules/no-marker-literal.js +1 -1
- package/dist/fixtures/load.js +16 -7
- package/dist/fixtures/media-plugin.js +17 -12
- package/dist/fixtures/media-store.js +115 -0
- package/dist/fixtures/property.js +345 -126
- package/dist/fixtures/resolve.js +260 -251
- package/dist/fixtures/rows.js +4 -11
- package/dist/fixtures.d.ts +234 -109
- package/dist/index.d.ts +25 -16
- package/dist/index.js +10 -6
- package/dist/islands/marker.js +2 -1
- package/dist/packages/external/concrete/package.js +1 -1
- package/dist/packages/internal/canvas-core/dist/island-host.js +62 -0
- package/dist/packages/internal/canvas-core/dist/island-shields.js +30 -0
- package/dist/packages/internal/capture-settle/dist/index.js +3 -0
- package/dist/packages/internal/capture-settle/dist/island-markers.d.ts +13 -0
- package/dist/packages/internal/capture-settle/dist/island-markers.js +6 -0
- package/dist/packages/internal/capture-settle/dist/settle.js +150 -0
- package/dist/packages/internal/{image-ladder/dist/crop.js → crop-region/dist/index.js} +21 -20
- package/dist/packages/internal/fill-bake/dist/bake-property-ref.js +250 -46
- package/dist/packages/internal/fill-bake/dist/compute-reads.js +361 -4
- package/dist/packages/internal/fill-bake/dist/derive-source.js +25 -18
- package/dist/packages/internal/fill-bake/dist/index.js +9 -3
- package/dist/packages/internal/fill-bake/dist/item-merge.js +113 -0
- package/dist/packages/internal/fill-bake/dist/item-overrides.js +1 -0
- package/dist/packages/internal/fill-bake/dist/linked-merge.js +38 -0
- package/dist/packages/internal/fill-bake/dist/list-grammar.js +174 -0
- package/dist/packages/internal/fill-bake/dist/stored-row-reader.js +1 -0
- package/dist/packages/internal/fill-vocabulary/dist/holder.js +51 -0
- package/dist/packages/internal/fill-vocabulary/dist/resolved-decision.js +363 -0
- package/dist/packages/internal/fill-vocabulary/dist/row-planners.js +1 -23
- package/dist/packages/internal/fill-vocabulary/dist/verbs.js +60 -0
- package/dist/packages/internal/format-geometry/dist/capture.js +11 -147
- package/dist/packages/internal/format-geometry/dist/format.d.ts +8 -2
- package/dist/packages/internal/format-geometry/dist/geometry.js +13 -2
- package/dist/packages/internal/image-ladder/dist/encode.js +27 -14
- package/dist/packages/internal/image-ladder/dist/index.js +3 -3
- package/dist/packages/internal/image-ladder/dist/policy.js +28 -53
- package/dist/packages/internal/island-runtime/dist/capture-holds.js +1 -1
- package/dist/packages/internal/island-runtime/dist/contract.d.ts +3 -12
- package/dist/packages/internal/island-runtime/dist/contract.js +2 -2
- package/dist/packages/internal/island-runtime/dist/index.d.ts +3 -7
- package/dist/packages/internal/island-runtime/dist/index.js +2 -1
- package/dist/packages/internal/island-runtime/dist/viewport-schedule.js +1 -1
- package/dist/packages/internal/media-resolution/dist/crop-key.js +7 -0
- package/dist/packages/internal/media-resolution/dist/document.js +63 -0
- package/dist/packages/internal/media-resolution/dist/image.js +226 -0
- package/dist/packages/internal/media-resolution/dist/index.js +11 -0
- package/dist/packages/internal/media-resolution/dist/list.js +112 -0
- package/dist/packages/internal/media-resolution/dist/media.js +59 -0
- package/dist/packages/internal/media-resolution/dist/records.js +7 -0
- package/dist/packages/internal/media-resolution/dist/slot.js +37 -0
- package/dist/packages/internal/media-resolution/dist/store.js +19 -0
- package/dist/packages/internal/media-resolution/dist/tour.js +59 -0
- package/dist/packages/internal/media-resolution/dist/video.js +93 -0
- package/dist/packages/internal/property-facts/dist/registry-facts.js +245 -0
- package/dist/packages/internal/section-contracts/dist/cap-contract.js +8 -17
- package/dist/packages/internal/section-contracts/dist/catalog.js +34 -14
- package/dist/packages/internal/section-contracts/dist/count-bounds-contract.js +11 -2
- package/dist/packages/internal/section-contracts/dist/directly-linked-list-contract.js +21 -0
- package/dist/packages/internal/section-contracts/dist/fill-options.js +12 -0
- package/dist/packages/internal/section-contracts/dist/fill-spec-view.js +1 -5
- package/dist/packages/internal/section-contracts/dist/fill-verb-contract.js +95 -0
- package/dist/packages/internal/section-contracts/dist/grammar-scope.js +154 -0
- package/dist/packages/internal/section-contracts/dist/index.js +7 -2
- package/dist/packages/internal/section-contracts/dist/list-fill-contract.js +2 -36
- package/dist/packages/internal/section-contracts/dist/list-scalar-contract.js +12 -21
- package/dist/packages/internal/section-contracts/dist/list-source-contract.js +46 -0
- package/dist/packages/internal/section-contracts/dist/nested-slot-contract.js +11 -2
- package/dist/packages/internal/section-contracts/dist/object-contract.js +92 -0
- package/dist/packages/internal/section-contracts/dist/poi-curation-contract.js +9 -5
- package/dist/packages/internal/section-contracts/dist/reads-acyclic-contract.js +63 -0
- package/dist/packages/internal/section-contracts/dist/row-fill-contract.js +6 -17
- package/dist/packages/internal/section-contracts/dist/row-rule-contract.js +80 -0
- package/dist/packages/internal/section-contracts/dist/row-source-contract.js +67 -0
- package/dist/packages/internal/section-contracts/dist/runners.js +77 -18
- package/dist/packages/internal/section-contracts/dist/select-contract.js +0 -8
- package/dist/packages/internal/section-contracts/dist/source-contract.js +89 -95
- package/dist/packages/internal/section-contracts/dist/sources-contract.js +47 -17
- package/dist/packages/internal/section-contracts/dist/table-member.js +16 -0
- package/dist/packages/internal/section-contracts/dist/writer-reads-fact-contract.js +39 -23
- package/dist/packages/internal/source-resolution/dist/index.js +113 -73
- package/dist/packages/internal/static-assets-binding/dist/section-asset-url.js +16 -0
- package/dist/packages/internal/street-address/dist/index.js +72 -0
- package/dist/packages/internal/template-artifact/dist/asset-mime.js +30 -0
- package/dist/packages/internal/template-artifact/dist/layout.js +1 -2
- package/dist/packages/internal/template-artifact/dist/manifest.js +1 -1
- package/dist/packages/internal/template-artifact/dist/verify.js +12 -29
- package/dist/packages/internal/template-contracts/dist/address-value.d.ts +52 -0
- package/dist/packages/internal/template-contracts/dist/address-value.js +90 -0
- package/dist/packages/internal/template-contracts/dist/comparable-address.js +19 -0
- package/dist/{schema → packages/internal/template-contracts/dist}/compute.d.ts +29 -6
- package/dist/{schema → packages/internal/template-contracts/dist}/compute.js +11 -13
- package/dist/packages/internal/template-contracts/dist/content-pick.js +51 -0
- package/dist/packages/internal/template-contracts/dist/decision-fills.js +81 -0
- package/dist/packages/internal/template-contracts/dist/display-overrides.js +7 -0
- package/dist/packages/internal/template-contracts/dist/document-value.d.ts +16 -5
- package/dist/packages/internal/template-contracts/dist/fact-compute.d.ts +24 -0
- package/dist/packages/internal/template-contracts/dist/fact-compute.js +30 -0
- package/dist/packages/internal/template-contracts/dist/fact-keys.d.ts +44 -0
- package/dist/packages/internal/template-contracts/dist/fact-keys.js +88 -0
- package/dist/packages/internal/template-contracts/dist/fact-registry.d.ts +290 -0
- package/dist/packages/internal/template-contracts/dist/fact-registry.js +598 -0
- package/dist/packages/internal/template-contracts/dist/facts-view.d.ts +10 -24
- package/dist/packages/internal/template-contracts/dist/fill-builders.d.ts +157 -0
- package/dist/packages/internal/template-contracts/dist/fill-builders.js +79 -0
- package/dist/packages/internal/template-contracts/dist/fill-declaration.d.ts +14 -0
- package/dist/{schema → packages/internal/template-contracts/dist}/fill-declaration.js +6 -5
- package/dist/packages/internal/template-contracts/dist/fill-spec-schema.js +93 -0
- package/dist/packages/internal/template-contracts/dist/fill-spec.js +291 -0
- package/dist/packages/internal/template-contracts/dist/findable.js +8 -0
- package/dist/packages/internal/template-contracts/dist/floor-presets.js +13 -0
- package/dist/packages/internal/template-contracts/dist/icon-names.d.ts +5 -0
- package/dist/packages/internal/template-contracts/dist/icon-names.js +70 -0
- package/dist/packages/internal/template-contracts/dist/legacy-facts.js +167 -0
- package/dist/packages/internal/template-contracts/dist/list-editing.js +93 -0
- package/dist/packages/internal/template-contracts/dist/list.d.ts +215 -0
- package/dist/packages/internal/template-contracts/dist/list.js +258 -0
- package/dist/packages/internal/template-contracts/dist/markers.d.ts +2 -2
- package/dist/packages/internal/template-contracts/dist/media-candidates.js +38 -0
- package/dist/packages/internal/template-contracts/dist/mirror-kind.js +48 -0
- package/dist/packages/internal/template-contracts/dist/number-display.js +10 -0
- package/dist/packages/internal/template-contracts/dist/object.d.ts +89 -0
- package/dist/packages/internal/template-contracts/dist/object.js +131 -0
- package/dist/packages/internal/template-contracts/dist/poi-row.d.ts +1 -1
- package/dist/packages/internal/template-contracts/dist/primitive-descriptors.d.ts +1 -0
- package/dist/packages/internal/template-contracts/dist/primitive-descriptors.js +162 -0
- package/dist/packages/internal/template-contracts/dist/process-builders.d.ts +77 -0
- package/dist/packages/internal/template-contracts/dist/process-builders.js +73 -0
- package/dist/packages/internal/template-contracts/dist/read-graph.js +240 -0
- package/dist/packages/internal/template-contracts/dist/ref-locate.js +176 -0
- package/dist/packages/internal/template-contracts/dist/registry-aliases.js +77 -0
- package/dist/packages/internal/template-contracts/dist/registry-facts.d.ts +270 -0
- package/dist/packages/internal/template-contracts/dist/registry-facts.js +202 -0
- package/dist/packages/internal/template-contracts/dist/registry-shape.d.ts +41 -0
- package/dist/packages/internal/template-contracts/dist/registry-shape.js +135 -0
- package/dist/packages/internal/template-contracts/dist/resolve-scope.js +103 -0
- package/dist/packages/internal/{image-descriptor/dist/index.d.ts → template-contracts/dist/responsive-image.d.ts} +1 -1
- package/dist/packages/internal/template-contracts/dist/row-planners.js +29 -0
- package/dist/packages/internal/template-contracts/dist/row-ref.d.ts +127 -0
- package/dist/packages/internal/template-contracts/dist/row-ref.js +101 -0
- package/dist/packages/internal/template-contracts/dist/row-sources.js +41 -5
- package/dist/packages/internal/template-contracts/dist/row.d.ts +155 -0
- package/dist/packages/internal/template-contracts/dist/row.js +84 -0
- package/dist/packages/internal/template-contracts/dist/runtime-values.d.ts +97 -0
- package/dist/packages/internal/template-contracts/dist/slot-builders.d.ts +782 -0
- package/dist/packages/internal/template-contracts/dist/slot-builders.js +233 -0
- package/dist/packages/internal/template-contracts/dist/slot-catalog.d.ts +233 -405
- package/dist/packages/internal/template-contracts/dist/slot-catalog.js +331 -227
- package/dist/packages/internal/template-contracts/dist/slot-overrides.js +21 -0
- package/dist/packages/internal/template-contracts/dist/slot-ref.d.ts +155 -0
- package/dist/packages/internal/template-contracts/dist/slot-ref.js +76 -0
- package/dist/packages/internal/template-contracts/dist/slot-types.d.ts +163 -0
- package/dist/packages/internal/template-contracts/dist/slot-types.js +139 -0
- package/dist/packages/internal/template-contracts/dist/slot-value.d.ts +95 -0
- package/dist/packages/internal/template-contracts/dist/table-members.d.ts +25 -0
- package/dist/packages/internal/template-contracts/dist/table-members.js +90 -0
- package/dist/packages/internal/template-contracts/dist/tour-value.d.ts +5 -5
- package/dist/packages/internal/template-contracts/dist/value-contracts.js +15 -0
- package/dist/packages/internal/template-contracts/dist/video-value.d.ts +2 -2
- package/dist/platform/fs.js +5 -2
- package/dist/playground/canvas-island-host.d.ts +11 -0
- package/dist/playground/canvas-island-host.js +29 -0
- package/dist/playground/canvas-markers.js +14 -0
- package/dist/playground-island-runtime.d.ts +3 -2
- package/dist/playground-island-runtime.js +3 -2
- package/dist/primitives/FrameShell.js +0 -1
- package/dist/primitives/Image.d.ts +5 -4
- package/dist/primitives/Tour.d.ts +1 -1
- package/dist/primitives/Video.d.ts +2 -2
- package/dist/primitives/index.d.ts +2 -3
- package/dist/primitives/picture-sources.js +2 -2
- package/dist/primitives/probe-context.js +2 -12
- package/dist/primitives/slot-address.d.ts +44 -0
- package/dist/primitives/slot-address.js +19 -0
- package/dist/primitives/slot-bindings.d.ts +65 -26
- package/dist/primitives/slot-bindings.js +104 -46
- package/dist/primitives/slot-document.d.ts +23 -18
- package/dist/primitives/slot-document.js +39 -14
- package/dist/primitives/slot-download.d.ts +39 -0
- package/dist/primitives/slot-download.js +39 -0
- package/dist/primitives/slot-list.d.ts +3 -3
- package/dist/primitives/slot-list.js +0 -2
- package/dist/primitives/slot-media.d.ts +24 -5
- package/dist/primitives/slot-media.js +6 -9
- package/dist/primitives/slot-object.d.ts +49 -0
- package/dist/primitives/slot-object.js +20 -0
- package/dist/primitives/slot-scalar.d.ts +27 -2
- package/dist/primitives/slot-scalar.js +50 -7
- package/dist/primitives/slot.d.ts +13 -6
- package/dist/primitives/slot.js +10 -3
- package/dist/rules/registry.js +25 -30
- package/dist/schema/define-schema.d.ts +4 -8
- package/dist/schema/define-schema.js +178 -79
- package/dist/schema/extract-fill-spec.js +2 -153
- package/dist/schema/fact.d.ts +57 -15
- package/dist/schema/fact.js +42 -7
- package/dist/schema/facts-view.d.ts +14 -0
- package/dist/schema/format.d.ts +1 -0
- package/dist/schema/format.js +2 -1
- package/dist/schema/manifest.js +24 -0
- package/dist/schema/property-facts.d.ts +8 -12
- package/dist/schema/section-props.d.ts +2 -66
- package/dist/schema/section-schema.d.ts +8 -11
- package/dist/schema/section-schema.js +27 -10
- package/dist/section/declare.d.ts +18 -7
- package/dist/section/declare.js +18 -5
- package/dist/section/materialize.js +3 -8
- package/dist/section/section.d.ts +12 -8
- package/dist/section/section.js +1 -1
- package/dist/template/logic-shim.d.ts +14 -7
- package/dist/template/logic-shim.js +14 -7
- package/dist/template/materialize.js +17 -18
- package/dist/template/mirror-types.js +30 -31
- package/dist/template/section-reads.js +85 -9
- 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 +2 -2
- package/guide/reference/cli/publish.md +1 -1
- package/guide/reference/cli/upgrade.md +1 -1
- package/guide/reference/rules/INDEX.md +29 -25
- package/package.json +9 -8
- package/dist/artifact/playground/client/assets/index-CckS2ONm.css +0 -1
- package/dist/artifact/playground/client/assets/index-Dn_xT16-.js +0 -1101
- package/dist/fixtures/canonical.d.ts +0 -166
- package/dist/fixtures/media.js +0 -163
- package/dist/packages/internal/fill-vocabulary/dist/origination.js +0 -51
- package/dist/packages/internal/fill-vocabulary/dist/row-reads.js +0 -15
- package/dist/packages/internal/format-geometry/dist/index.js +0 -4
- package/dist/packages/internal/property-facts/dist/derive-facts-view.js +0 -10
- package/dist/packages/internal/property-facts/dist/index.js +0 -3
- package/dist/packages/internal/property-facts/dist/property-facts-Cy7-O4p0.js +0 -189
- package/dist/packages/internal/section-contracts/dist/group-contract.js +0 -19
- package/dist/packages/internal/section-contracts/dist/record-collection-contract.js +0 -24
- package/dist/packages/internal/template-contracts/dist/collection-editing.js +0 -22
- package/dist/packages/internal/template-contracts/dist/facts-view.js +0 -104
- package/dist/packages/internal/template-contracts/dist/select-key.js +0 -7
- package/dist/primitives/slot-group.d.ts +0 -40
- package/dist/primitives/slot-group.js +0 -36
- package/dist/schema/extract-used-facts.js +0 -34
- package/dist/schema/fill-builders.d.ts +0 -115
- package/dist/schema/fill-builders.js +0 -25
- package/dist/schema/fill-declaration.d.ts +0 -14
- package/dist/schema/fill-spec.js +0 -98
- package/dist/schema/layout.d.ts +0 -30
- package/dist/schema/layout.js +0 -14
- package/dist/schema/row-fields.js +0 -88
- package/dist/schema/row-ref.d.ts +0 -59
- package/dist/schema/row-ref.js +0 -28
- package/dist/schema/runtime-values.d.ts +0 -71
- package/dist/schema/section-nav.js +0 -14
- package/dist/schema/slot-builders.d.ts +0 -633
- package/dist/schema/slot-builders.js +0 -177
- package/dist/schema/slot-ref.d.ts +0 -79
- package/dist/schema/slot-ref.js +0 -41
- package/dist/schema/slot-types.d.ts +0 -111
- package/dist/schema/slot-types.js +0 -214
- package/dist/section/groups.js +0 -68
|
@@ -1,37 +1,131 @@
|
|
|
1
1
|
//#region ../../internal/template-contracts/dist/slot-catalog.d.ts
|
|
2
2
|
/**
|
|
3
|
-
* The
|
|
4
|
-
* `
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
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.
|
|
3
|
+
* The keys an object's binding owns in a renderer: a top-level object's (`id`, `def`,
|
|
4
|
+
* `value`, `present`) and an object item's (`slot`, `index`, `def`, `value`, `present`,
|
|
5
|
+
* and on an item of an object's list of objects, `enclosing` — the field it marks as).
|
|
6
|
+
* An object's fields are read straight off its binding — `slot.address.street`,
|
|
7
|
+
* `plan.image` — so a field named one of these would be shadowed by the binding's own
|
|
8
|
+
* property. No object may declare a field under one of them; the binding types leave
|
|
9
|
+
* them out of the fields they offer.
|
|
16
10
|
*/
|
|
17
|
-
declare const
|
|
18
|
-
/**
|
|
19
|
-
type
|
|
11
|
+
declare const OBJECT_BINDING_OWN_KEYS: readonly ["id", "slot", "index", "def", "value", "present", "enclosing"];
|
|
12
|
+
/** A key an object's binding owns — one of `OBJECT_BINDING_OWN_KEYS`. */
|
|
13
|
+
type ObjectBindingOwnKey = (typeof OBJECT_BINDING_OWN_KEYS)[number];
|
|
20
14
|
/**
|
|
21
|
-
*
|
|
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.
|
|
15
|
+
* The four kinds of the one media primitive — what a media value holds, and what a
|
|
16
|
+
* media slot's builder is named for.
|
|
27
17
|
*/
|
|
28
|
-
|
|
18
|
+
declare const MEDIA_KINDS: readonly ["image", "video", "tour", "document"];
|
|
19
|
+
/** A media kind — one of `MEDIA_KINDS`. */
|
|
20
|
+
type MediaKind = (typeof MEDIA_KINDS)[number];
|
|
21
|
+
/**
|
|
22
|
+
* Every process, by verb. Holder site: `cutout` — the background removed, producing the
|
|
23
|
+
* `cutout`, `mask_white` and `mask_black` renditions, its `enclosed` saying whether
|
|
24
|
+
* background the subject encloses is cleared too (a logo's counters, the default) or kept
|
|
25
|
+
* (a floor plan's rooms); `autocrop` — the master framed as
|
|
26
|
+
* its `brief` directs, at the aspect the holder's `crop` locks (free form where it locks
|
|
27
|
+
* none). Kind site: what every asset of a kind gets from birth, on its kind's row; none
|
|
28
|
+
* takes an option today, and none is a holder's to state. Place site: `crop` — the
|
|
29
|
+
* original cut to the place's crop, the `crop` rendition, at every place whose value
|
|
30
|
+
* carries a crop; declared by nobody.
|
|
31
|
+
*/
|
|
32
|
+
declare const PROCESS_CATALOG: {
|
|
33
|
+
readonly cutout: {
|
|
34
|
+
readonly label: "Background removed";
|
|
35
|
+
readonly kinds: readonly ["image"];
|
|
36
|
+
readonly site: "holder";
|
|
37
|
+
readonly options: {
|
|
38
|
+
readonly enclosed: {
|
|
39
|
+
readonly required: false;
|
|
40
|
+
readonly type: "string";
|
|
41
|
+
readonly values: readonly ["clear", "keep"];
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
readonly autocrop: {
|
|
46
|
+
readonly label: "Cropped to its subject";
|
|
47
|
+
readonly kinds: readonly ["image"];
|
|
48
|
+
readonly site: "holder";
|
|
49
|
+
readonly options: {
|
|
50
|
+
readonly brief: {
|
|
51
|
+
readonly required: true;
|
|
52
|
+
readonly type: "string";
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
readonly probe: {
|
|
57
|
+
readonly label: "Probed";
|
|
58
|
+
readonly kinds: readonly ["image", "video", "document"];
|
|
59
|
+
readonly site: "kind";
|
|
60
|
+
readonly options: {};
|
|
61
|
+
};
|
|
62
|
+
readonly understand: {
|
|
63
|
+
readonly label: "Understood";
|
|
64
|
+
readonly kinds: readonly ["image", "video", "document", "tour"];
|
|
65
|
+
readonly site: "kind";
|
|
66
|
+
readonly options: {};
|
|
67
|
+
};
|
|
68
|
+
readonly preview: {
|
|
69
|
+
readonly label: "Preview";
|
|
70
|
+
readonly kinds: readonly ["image", "video", "document"];
|
|
71
|
+
readonly site: "kind";
|
|
72
|
+
readonly options: {};
|
|
73
|
+
};
|
|
74
|
+
readonly ladder: {
|
|
75
|
+
readonly label: "Renditions";
|
|
76
|
+
readonly kinds: readonly ["image", "video", "document"];
|
|
77
|
+
readonly site: "kind";
|
|
78
|
+
readonly options: {};
|
|
79
|
+
};
|
|
80
|
+
readonly transcode: {
|
|
81
|
+
readonly label: "Transcoded";
|
|
82
|
+
readonly kinds: readonly ["video"];
|
|
83
|
+
readonly site: "kind";
|
|
84
|
+
readonly options: {};
|
|
85
|
+
};
|
|
86
|
+
readonly poster: {
|
|
87
|
+
readonly label: "Poster";
|
|
88
|
+
readonly kinds: readonly ["video", "document"];
|
|
89
|
+
readonly site: "kind";
|
|
90
|
+
readonly options: {};
|
|
91
|
+
};
|
|
92
|
+
readonly rasterize: {
|
|
93
|
+
readonly label: "Pages rasterized";
|
|
94
|
+
readonly kinds: readonly ["document"];
|
|
95
|
+
readonly site: "kind";
|
|
96
|
+
readonly options: {};
|
|
97
|
+
};
|
|
98
|
+
readonly fetch: {
|
|
99
|
+
readonly label: "Link fetched";
|
|
100
|
+
readonly kinds: readonly ["video", "tour"];
|
|
101
|
+
readonly site: "kind";
|
|
102
|
+
readonly options: {};
|
|
103
|
+
};
|
|
104
|
+
readonly tour_details: {
|
|
105
|
+
readonly label: "Tour details";
|
|
106
|
+
readonly kinds: readonly ["tour"];
|
|
107
|
+
readonly site: "kind";
|
|
108
|
+
readonly options: {};
|
|
109
|
+
};
|
|
110
|
+
readonly crop: {
|
|
111
|
+
readonly label: "Cut to its crop";
|
|
112
|
+
readonly kinds: readonly ["image"];
|
|
113
|
+
readonly site: "place";
|
|
114
|
+
readonly options: {};
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
/** A process's verb — one of `PROCESS_CATALOG`'s keys. */
|
|
118
|
+
type ProcessVerb = keyof typeof PROCESS_CATALOG;
|
|
119
|
+
/** A verb declared on a media holder's `process` — a holder-site entry's. */
|
|
120
|
+
type HolderProcessVerb = { [V in ProcessVerb]: (typeof PROCESS_CATALOG)[V]["site"] extends "holder" ? V : never; }[ProcessVerb];
|
|
121
|
+
/** The holder-site verbs that apply to EVERY kind of `Kinds` — what a declaration of those kinds may `process`. */
|
|
122
|
+
type ProcessOf<Kinds extends MediaKind> = { [V in HolderProcessVerb]: [Kinds] extends [(typeof PROCESS_CATALOG)[V]["kinds"][number]] ? V : never; }[HolderProcessVerb];
|
|
29
123
|
/**
|
|
30
124
|
* Where in the property fact graph a `SOURCE_FIELDS` entry's value lives: the property root, a unit row, or a contact card.
|
|
31
125
|
*/
|
|
32
126
|
type SourceFieldContainer = "property" | "unit" | "contact";
|
|
33
127
|
/** The value shape a `direct`-source field carries. */
|
|
34
|
-
type SourceFieldValueType = "text" | "number" | "image" | "coordinates" | "unit_list" | "contact_list" | "comparable_list";
|
|
128
|
+
type SourceFieldValueType = "text" | "number" | "image" | "coordinates" | "address" | "unit_list" | "contact_list" | "comparable_list";
|
|
35
129
|
/**
|
|
36
130
|
* Where a writable `SOURCE_FIELDS` entry's edited value is written back to — the target a slot's "Update everywhere" action updates.
|
|
37
131
|
*
|
|
@@ -52,27 +146,15 @@ type WritebackTarget = {
|
|
|
52
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).
|
|
53
147
|
*
|
|
54
148
|
* @remarks
|
|
55
|
-
* The column and nothing else, because the table is the
|
|
56
|
-
* is addressed as `<
|
|
57
|
-
* write already knows which
|
|
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
|
|
58
152
|
* `contacts` carries it into the `writeback` of the `fact.unit.*` /
|
|
59
153
|
* `fact.contact.*` entry generated from it.
|
|
60
154
|
*/
|
|
61
155
|
type RowMemberWriteback = {
|
|
62
156
|
column: string;
|
|
63
157
|
};
|
|
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];
|
|
76
158
|
/**
|
|
77
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.
|
|
78
160
|
*
|
|
@@ -88,19 +170,11 @@ interface FactMemberDescriptor {
|
|
|
88
170
|
value_type: FactValueType;
|
|
89
171
|
/** The element shape, when this member is itself an array. */
|
|
90
172
|
row?: FactShapeDescriptor;
|
|
91
|
-
/**
|
|
92
|
-
* Set on the members a row must carry to count as COMPLETE. A pool whose row
|
|
93
|
-
* declares any is answered by at least one complete row rather than by being
|
|
94
|
-
* non-empty — the reading both Generate gates take (`requiredRowMembers`).
|
|
95
|
-
* Absent everywhere else: the registry carries no per-member requiredness,
|
|
96
|
-
* and a row with none declared is complete the moment it exists.
|
|
97
|
-
*/
|
|
98
|
-
required?: true;
|
|
99
173
|
}
|
|
100
174
|
/** The typed member shape of an array element or object-valued fact — member name to its descriptor. */
|
|
101
175
|
type FactShapeDescriptor = Readonly<Record<string, FactMemberDescriptor>>;
|
|
102
176
|
/**
|
|
103
|
-
* One member of a
|
|
177
|
+
* One member of a table's row (`units`, `contacts`, `comparables`) — the member as an author names it, and where its value lives.
|
|
104
178
|
*
|
|
105
179
|
* @remarks
|
|
106
180
|
* The member's key in its row descriptor is its author-facing name; `path` is
|
|
@@ -108,52 +182,34 @@ type FactShapeDescriptor = Readonly<Record<string, FactMemberDescriptor>>;
|
|
|
108
182
|
* kept an older spelling (`website` reads `website_url`, a contact's
|
|
109
183
|
* `headshot` reads `avatar_upload_id`).
|
|
110
184
|
*/
|
|
111
|
-
interface
|
|
185
|
+
interface TableMemberDescriptor extends FactMemberDescriptor {
|
|
112
186
|
/** The member's key in the canonical row. */
|
|
113
187
|
path: string;
|
|
114
188
|
/** Set on a member the editor may write back — see `RowMemberWriteback`. Absent means read-only. */
|
|
115
189
|
writeback?: RowMemberWriteback;
|
|
116
|
-
/** Set on an image member the editor offers a pool for — see `RowMediaPool`. */
|
|
117
|
-
pool?: RowMediaPool;
|
|
118
190
|
/**
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
* row.
|
|
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.
|
|
124
195
|
*/
|
|
125
|
-
|
|
196
|
+
primary?: true;
|
|
126
197
|
}
|
|
127
|
-
/** A
|
|
128
|
-
type
|
|
198
|
+
/** A table's row descriptor — author-facing member name to its descriptor. */
|
|
199
|
+
type TableRowDescriptor = Readonly<Record<string, TableMemberDescriptor>>;
|
|
129
200
|
/**
|
|
130
201
|
* A fact graph entry a slot's `direct` source may bind to.
|
|
131
202
|
*
|
|
132
203
|
* @remarks
|
|
133
204
|
* Its container, value type and writeback carry over verbatim into the
|
|
134
|
-
* `SOURCE_FIELDS` projection; `role
|
|
205
|
+
* `SOURCE_FIELDS` projection; `role` and the shape descriptors do not.
|
|
135
206
|
*/
|
|
136
207
|
interface BindableFactEntry {
|
|
137
208
|
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
209
|
container: SourceFieldContainer;
|
|
146
210
|
value_type: SourceFieldValueType;
|
|
147
211
|
image?: true;
|
|
148
212
|
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
213
|
fields?: FactShapeDescriptor;
|
|
158
214
|
row?: FactShapeDescriptor;
|
|
159
215
|
}
|
|
@@ -180,11 +236,8 @@ declare const PROPERTY_ROOT_FACTS: {
|
|
|
180
236
|
/** Street address, resolved to its display form. Read-only. */
|
|
181
237
|
readonly address: {
|
|
182
238
|
readonly role: "bindable";
|
|
183
|
-
readonly path: "address";
|
|
184
239
|
readonly container: "property";
|
|
185
240
|
readonly value_type: "text";
|
|
186
|
-
readonly input_group: "address";
|
|
187
|
-
readonly strength: "blocking";
|
|
188
241
|
readonly fields: {
|
|
189
242
|
/** The address as one display line. */
|
|
190
243
|
readonly display: {
|
|
@@ -219,98 +272,62 @@ declare const PROPERTY_ROOT_FACTS: {
|
|
|
219
272
|
/** Street line of the property address ("123 Main St"). Read-only. */
|
|
220
273
|
readonly address_street: {
|
|
221
274
|
readonly role: "bindable";
|
|
222
|
-
readonly path: "address.street";
|
|
223
275
|
readonly container: "property";
|
|
224
276
|
readonly value_type: "text";
|
|
225
|
-
readonly input_group: "address";
|
|
226
|
-
readonly strength: "blocking";
|
|
227
277
|
};
|
|
228
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. */
|
|
229
279
|
readonly address_unit: {
|
|
230
280
|
readonly role: "bindable";
|
|
231
|
-
readonly path: "address.unit";
|
|
232
281
|
readonly container: "property";
|
|
233
282
|
readonly value_type: "text";
|
|
234
|
-
readonly input_group: "address";
|
|
235
|
-
readonly strength: "optional";
|
|
236
283
|
};
|
|
237
284
|
/** City of the property address ("Springfield"). Read-only. */
|
|
238
285
|
readonly address_city: {
|
|
239
286
|
readonly role: "bindable";
|
|
240
|
-
readonly path: "address.city";
|
|
241
287
|
readonly container: "property";
|
|
242
288
|
readonly value_type: "text";
|
|
243
|
-
readonly input_group: "address";
|
|
244
|
-
readonly strength: "blocking";
|
|
245
289
|
};
|
|
246
290
|
/** State of the property address ("IL"). Read-only. */
|
|
247
291
|
readonly address_state: {
|
|
248
292
|
readonly role: "bindable";
|
|
249
|
-
readonly path: "address.state";
|
|
250
293
|
readonly container: "property";
|
|
251
294
|
readonly value_type: "text";
|
|
252
|
-
readonly input_group: "address";
|
|
253
|
-
readonly strength: "blocking";
|
|
254
295
|
};
|
|
255
296
|
/** Postal code of the property address ("62704"). Read-only. */
|
|
256
297
|
readonly address_postal: {
|
|
257
298
|
readonly role: "bindable";
|
|
258
|
-
readonly path: "address.postal";
|
|
259
299
|
readonly container: "property";
|
|
260
300
|
readonly value_type: "text";
|
|
261
|
-
readonly input_group: "address";
|
|
262
|
-
readonly strength: "blocking";
|
|
263
301
|
};
|
|
264
302
|
/** Whether the property is for sale or for rent. **Writable** — the editor offers "Update everywhere". Also supplies a `select` slot's option vocabulary. */
|
|
265
303
|
readonly listing_intent: {
|
|
266
304
|
readonly role: "bindable";
|
|
267
|
-
readonly path: "listing_intent";
|
|
268
305
|
readonly container: "property";
|
|
269
306
|
readonly value_type: "text";
|
|
270
|
-
readonly input_group: "intent";
|
|
271
|
-
readonly strength: "blocking";
|
|
272
307
|
readonly writeback: {
|
|
273
308
|
readonly kind: "property";
|
|
274
309
|
readonly column: "listing_intent";
|
|
275
310
|
};
|
|
276
311
|
};
|
|
277
|
-
/** Property type (single family, condo, multi-family, …). Read-only. */
|
|
278
|
-
readonly property_type: {
|
|
279
|
-
readonly role: "bindable";
|
|
280
|
-
readonly path: "property_type";
|
|
281
|
-
readonly container: "property";
|
|
282
|
-
readonly value_type: "text";
|
|
283
|
-
readonly input_group: "type";
|
|
284
|
-
readonly strength: "blocking";
|
|
285
|
-
};
|
|
286
312
|
/** Property latitude, projected from the geocode. Read-only; null until the property is geocoded. Reachable as `fact.property.latitude`. */
|
|
287
313
|
readonly lat: {
|
|
288
314
|
readonly role: "bindable";
|
|
289
|
-
readonly path: "lat";
|
|
290
315
|
readonly container: "property";
|
|
291
316
|
readonly value_type: "number";
|
|
292
|
-
readonly input_group: "address";
|
|
293
|
-
readonly strength: "blocking";
|
|
294
317
|
};
|
|
295
318
|
/** Property longitude, projected from the geocode. Read-only; null until the property is geocoded. Reachable as `fact.property.longitude`. */
|
|
296
319
|
readonly lon: {
|
|
297
320
|
readonly role: "bindable";
|
|
298
|
-
readonly path: "lon";
|
|
299
321
|
readonly container: "property";
|
|
300
322
|
readonly value_type: "number";
|
|
301
|
-
readonly input_group: "address";
|
|
302
|
-
readonly strength: "blocking";
|
|
303
323
|
};
|
|
304
324
|
};
|
|
305
|
-
declare const
|
|
325
|
+
declare const TABLE_FACTS: {
|
|
306
326
|
/** Every unit, baked verbatim as a record list. Read-only as a whole; the per-row fields under `fact.unit` stay writable. */
|
|
307
327
|
readonly units: {
|
|
308
328
|
readonly role: "bindable";
|
|
309
|
-
readonly path: "units";
|
|
310
329
|
readonly container: "property";
|
|
311
330
|
readonly value_type: "unit_list";
|
|
312
|
-
readonly input_group: "units";
|
|
313
|
-
readonly strength: "blocking";
|
|
314
331
|
readonly row: {
|
|
315
332
|
/** Durable unit identity, stable across edits — what a baked row is addressed by. */
|
|
316
333
|
readonly unit_id: {
|
|
@@ -326,7 +343,6 @@ declare const COLLECTION_FACTS: {
|
|
|
326
343
|
readonly floor_plans: {
|
|
327
344
|
readonly path: "floor_plans";
|
|
328
345
|
readonly value_type: "image_list";
|
|
329
|
-
readonly pool: "floor_plans";
|
|
330
346
|
readonly row: {
|
|
331
347
|
/** Identity of the floor-plan image (its upload id). */
|
|
332
348
|
readonly id: {
|
|
@@ -346,7 +362,7 @@ declare const COLLECTION_FACTS: {
|
|
|
346
362
|
readonly unit_label: {
|
|
347
363
|
readonly path: "unit_label";
|
|
348
364
|
readonly value_type: "text";
|
|
349
|
-
readonly
|
|
365
|
+
readonly primary: true;
|
|
350
366
|
readonly writeback: {
|
|
351
367
|
readonly column: "unit_label";
|
|
352
368
|
};
|
|
@@ -355,7 +371,7 @@ declare const COLLECTION_FACTS: {
|
|
|
355
371
|
readonly beds: {
|
|
356
372
|
readonly path: "beds";
|
|
357
373
|
readonly value_type: "number";
|
|
358
|
-
readonly
|
|
374
|
+
readonly primary: true;
|
|
359
375
|
readonly writeback: {
|
|
360
376
|
readonly column: "beds";
|
|
361
377
|
};
|
|
@@ -364,7 +380,7 @@ declare const COLLECTION_FACTS: {
|
|
|
364
380
|
readonly baths: {
|
|
365
381
|
readonly path: "baths";
|
|
366
382
|
readonly value_type: "number";
|
|
367
|
-
readonly
|
|
383
|
+
readonly primary: true;
|
|
368
384
|
readonly writeback: {
|
|
369
385
|
readonly column: "baths";
|
|
370
386
|
};
|
|
@@ -373,7 +389,7 @@ declare const COLLECTION_FACTS: {
|
|
|
373
389
|
readonly sqft: {
|
|
374
390
|
readonly path: "sqft";
|
|
375
391
|
readonly value_type: "number";
|
|
376
|
-
readonly
|
|
392
|
+
readonly primary: true;
|
|
377
393
|
readonly writeback: {
|
|
378
394
|
readonly column: "sqft";
|
|
379
395
|
};
|
|
@@ -382,7 +398,7 @@ declare const COLLECTION_FACTS: {
|
|
|
382
398
|
readonly price: {
|
|
383
399
|
readonly path: "price";
|
|
384
400
|
readonly value_type: "text";
|
|
385
|
-
readonly
|
|
401
|
+
readonly primary: true;
|
|
386
402
|
readonly writeback: {
|
|
387
403
|
readonly column: "price";
|
|
388
404
|
};
|
|
@@ -392,22 +408,18 @@ declare const COLLECTION_FACTS: {
|
|
|
392
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. */
|
|
393
409
|
readonly comparables: {
|
|
394
410
|
readonly role: "bindable";
|
|
395
|
-
readonly path: "comparables";
|
|
396
411
|
readonly container: "property";
|
|
397
412
|
readonly value_type: "comparable_list";
|
|
398
|
-
readonly input_group: "comparables";
|
|
399
|
-
readonly strength: "blocking";
|
|
400
413
|
readonly row: {
|
|
401
414
|
/** Durable row identity, stable across edits — what a baked row is addressed by. */
|
|
402
415
|
readonly id: {
|
|
403
416
|
readonly path: "id";
|
|
404
417
|
readonly value_type: "text";
|
|
405
418
|
};
|
|
406
|
-
/** Street line of the comparable's address ("12 Oak St").
|
|
419
|
+
/** Street line of the comparable's address ("12 Oak St"). */
|
|
407
420
|
readonly address_street: {
|
|
408
421
|
readonly path: "address_street";
|
|
409
422
|
readonly value_type: "text";
|
|
410
|
-
readonly required: true;
|
|
411
423
|
};
|
|
412
424
|
/** City of the comparable's address. */
|
|
413
425
|
readonly address_city: {
|
|
@@ -429,33 +441,30 @@ declare const COLLECTION_FACTS: {
|
|
|
429
441
|
readonly path: "address";
|
|
430
442
|
readonly value_type: "text";
|
|
431
443
|
};
|
|
432
|
-
/** Latitude of the comparable.
|
|
444
|
+
/** Latitude of the comparable. The comps map pins on it. */
|
|
433
445
|
readonly lat: {
|
|
434
446
|
readonly path: "lat";
|
|
435
447
|
readonly value_type: "number";
|
|
436
|
-
readonly required: true;
|
|
437
448
|
};
|
|
438
|
-
/** Longitude of the comparable.
|
|
449
|
+
/** Longitude of the comparable. */
|
|
439
450
|
readonly lng: {
|
|
440
451
|
readonly path: "lng";
|
|
441
452
|
readonly value_type: "number";
|
|
442
|
-
readonly required: true;
|
|
443
453
|
};
|
|
444
454
|
/** Great-circle distance from the subject property in meters, computed at projection; null while either side lacks coordinates. */
|
|
445
455
|
readonly distance_m: {
|
|
446
456
|
readonly path: "distance_m";
|
|
447
457
|
readonly value_type: "number";
|
|
448
458
|
};
|
|
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
|
|
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`. */
|
|
450
460
|
readonly status: {
|
|
451
461
|
readonly path: "status";
|
|
452
462
|
readonly value_type: "text";
|
|
453
463
|
};
|
|
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.
|
|
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. */
|
|
455
465
|
readonly price: {
|
|
456
466
|
readonly path: "price";
|
|
457
467
|
readonly value_type: "number";
|
|
458
|
-
readonly required: true;
|
|
459
468
|
readonly writeback: {
|
|
460
469
|
readonly column: "price";
|
|
461
470
|
};
|
|
@@ -473,34 +482,31 @@ declare const COLLECTION_FACTS: {
|
|
|
473
482
|
readonly column: "sale_date";
|
|
474
483
|
};
|
|
475
484
|
};
|
|
476
|
-
/** Bedroom count.
|
|
485
|
+
/** Bedroom count. Every comps slide prints it. **Writable** from the canvas. */
|
|
477
486
|
readonly beds: {
|
|
478
487
|
readonly path: "beds";
|
|
479
488
|
readonly value_type: "number";
|
|
480
|
-
readonly required: true;
|
|
481
489
|
readonly writeback: {
|
|
482
490
|
readonly column: "beds";
|
|
483
491
|
};
|
|
484
492
|
};
|
|
485
|
-
/** Bathroom count.
|
|
493
|
+
/** Bathroom count. **Writable** from the canvas. */
|
|
486
494
|
readonly baths: {
|
|
487
495
|
readonly path: "baths";
|
|
488
496
|
readonly value_type: "number";
|
|
489
|
-
readonly required: true;
|
|
490
497
|
readonly writeback: {
|
|
491
498
|
readonly column: "baths";
|
|
492
499
|
};
|
|
493
500
|
};
|
|
494
|
-
/** Interior square footage.
|
|
501
|
+
/** Interior square footage. The comps table divides the price by it. **Writable** from the canvas. */
|
|
495
502
|
readonly sqft: {
|
|
496
503
|
readonly path: "sqft";
|
|
497
504
|
readonly value_type: "number";
|
|
498
|
-
readonly required: true;
|
|
499
505
|
readonly writeback: {
|
|
500
506
|
readonly column: "sqft";
|
|
501
507
|
};
|
|
502
508
|
};
|
|
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
|
|
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. */
|
|
504
510
|
readonly photo: {
|
|
505
511
|
readonly path: "photo_upload_id";
|
|
506
512
|
readonly value_type: "image";
|
|
@@ -550,28 +556,20 @@ declare const COLLECTION_FACTS: {
|
|
|
550
556
|
readonly path: "description";
|
|
551
557
|
readonly value_type: "text";
|
|
552
558
|
};
|
|
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. */
|
|
554
|
-
readonly property_type: {
|
|
555
|
-
readonly path: "property_type";
|
|
556
|
-
readonly value_type: "text";
|
|
557
|
-
};
|
|
558
559
|
};
|
|
559
560
|
};
|
|
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. */
|
|
561
562
|
readonly contacts: {
|
|
562
563
|
readonly role: "bindable";
|
|
563
|
-
readonly path: "contacts";
|
|
564
564
|
readonly container: "property";
|
|
565
565
|
readonly value_type: "contact_list";
|
|
566
|
-
readonly input_group: "contacts";
|
|
567
|
-
readonly strength: "blocking";
|
|
568
566
|
readonly row: {
|
|
569
567
|
/** Stable identity of the contact card. */
|
|
570
568
|
readonly id: {
|
|
571
569
|
readonly path: "id";
|
|
572
570
|
readonly value_type: "text";
|
|
573
571
|
};
|
|
574
|
-
/** Whether this is the property's
|
|
572
|
+
/** Whether this is the property's first contact (position 0) — the one the brand marks resolve from. */
|
|
575
573
|
readonly primary: {
|
|
576
574
|
readonly path: "primary";
|
|
577
575
|
readonly value_type: "boolean";
|
|
@@ -580,7 +578,7 @@ declare const COLLECTION_FACTS: {
|
|
|
580
578
|
readonly name: {
|
|
581
579
|
readonly path: "name";
|
|
582
580
|
readonly value_type: "text";
|
|
583
|
-
readonly
|
|
581
|
+
readonly primary: true;
|
|
584
582
|
readonly writeback: {
|
|
585
583
|
readonly column: "name";
|
|
586
584
|
};
|
|
@@ -589,7 +587,7 @@ declare const COLLECTION_FACTS: {
|
|
|
589
587
|
readonly title: {
|
|
590
588
|
readonly path: "title";
|
|
591
589
|
readonly value_type: "text";
|
|
592
|
-
readonly
|
|
590
|
+
readonly primary: true;
|
|
593
591
|
readonly writeback: {
|
|
594
592
|
readonly column: "title";
|
|
595
593
|
};
|
|
@@ -598,7 +596,7 @@ declare const COLLECTION_FACTS: {
|
|
|
598
596
|
readonly org_name: {
|
|
599
597
|
readonly path: "org_name";
|
|
600
598
|
readonly value_type: "text";
|
|
601
|
-
readonly
|
|
599
|
+
readonly primary: true;
|
|
602
600
|
readonly writeback: {
|
|
603
601
|
readonly column: "org_name";
|
|
604
602
|
};
|
|
@@ -607,25 +605,22 @@ declare const COLLECTION_FACTS: {
|
|
|
607
605
|
readonly bio: {
|
|
608
606
|
readonly path: "bio";
|
|
609
607
|
readonly value_type: "text";
|
|
610
|
-
readonly
|
|
608
|
+
readonly primary: true;
|
|
611
609
|
readonly writeback: {
|
|
612
610
|
readonly column: "bio";
|
|
613
611
|
};
|
|
614
612
|
};
|
|
615
|
-
/** The contact's address
|
|
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`. */
|
|
616
614
|
readonly address: {
|
|
617
615
|
readonly path: "address";
|
|
618
616
|
readonly value_type: "text";
|
|
619
|
-
readonly
|
|
620
|
-
readonly writeback: {
|
|
621
|
-
readonly column: "address";
|
|
622
|
-
};
|
|
617
|
+
readonly primary: true;
|
|
623
618
|
};
|
|
624
619
|
/** Contact email address. **Writable** — the editor offers "Update everywhere". */
|
|
625
620
|
readonly email: {
|
|
626
621
|
readonly path: "email";
|
|
627
622
|
readonly value_type: "text";
|
|
628
|
-
readonly
|
|
623
|
+
readonly primary: true;
|
|
629
624
|
readonly writeback: {
|
|
630
625
|
readonly column: "email";
|
|
631
626
|
};
|
|
@@ -634,7 +629,7 @@ declare const COLLECTION_FACTS: {
|
|
|
634
629
|
readonly phone: {
|
|
635
630
|
readonly path: "phone";
|
|
636
631
|
readonly value_type: "text";
|
|
637
|
-
readonly
|
|
632
|
+
readonly primary: true;
|
|
638
633
|
readonly writeback: {
|
|
639
634
|
readonly column: "phone";
|
|
640
635
|
};
|
|
@@ -643,7 +638,7 @@ declare const COLLECTION_FACTS: {
|
|
|
643
638
|
readonly website: {
|
|
644
639
|
readonly path: "website_url";
|
|
645
640
|
readonly value_type: "text";
|
|
646
|
-
readonly
|
|
641
|
+
readonly primary: true;
|
|
647
642
|
readonly writeback: {
|
|
648
643
|
readonly column: "website";
|
|
649
644
|
};
|
|
@@ -652,7 +647,7 @@ declare const COLLECTION_FACTS: {
|
|
|
652
647
|
readonly instagram: {
|
|
653
648
|
readonly path: "instagram_url";
|
|
654
649
|
readonly value_type: "text";
|
|
655
|
-
readonly
|
|
650
|
+
readonly primary: true;
|
|
656
651
|
readonly writeback: {
|
|
657
652
|
readonly column: "socials.instagram";
|
|
658
653
|
};
|
|
@@ -661,7 +656,7 @@ declare const COLLECTION_FACTS: {
|
|
|
661
656
|
readonly linkedin: {
|
|
662
657
|
readonly path: "linkedin_url";
|
|
663
658
|
readonly value_type: "text";
|
|
664
|
-
readonly
|
|
659
|
+
readonly primary: true;
|
|
665
660
|
readonly writeback: {
|
|
666
661
|
readonly column: "socials.linkedin";
|
|
667
662
|
};
|
|
@@ -670,7 +665,7 @@ declare const COLLECTION_FACTS: {
|
|
|
670
665
|
readonly x: {
|
|
671
666
|
readonly path: "x_url";
|
|
672
667
|
readonly value_type: "text";
|
|
673
|
-
readonly
|
|
668
|
+
readonly primary: true;
|
|
674
669
|
readonly writeback: {
|
|
675
670
|
readonly column: "socials.x";
|
|
676
671
|
};
|
|
@@ -679,31 +674,28 @@ declare const COLLECTION_FACTS: {
|
|
|
679
674
|
readonly facebook: {
|
|
680
675
|
readonly path: "facebook_url";
|
|
681
676
|
readonly value_type: "text";
|
|
682
|
-
readonly
|
|
677
|
+
readonly primary: true;
|
|
683
678
|
readonly writeback: {
|
|
684
679
|
readonly column: "socials.facebook";
|
|
685
680
|
};
|
|
686
681
|
};
|
|
687
|
-
/** The contact's headshot
|
|
682
|
+
/** The contact's headshot — an upload the contact itself owns, so no media pool offers it. Read-only; belongs on an `image` slot. */
|
|
688
683
|
readonly headshot: {
|
|
689
684
|
readonly path: "avatar_upload_id";
|
|
690
685
|
readonly value_type: "image";
|
|
691
|
-
readonly
|
|
692
|
-
readonly pool: "library";
|
|
686
|
+
readonly primary: true;
|
|
693
687
|
};
|
|
694
|
-
/** The contact's logo for dark backgrounds
|
|
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. */
|
|
695
689
|
readonly logo_dark: {
|
|
696
690
|
readonly path: "logo_dark_upload_id";
|
|
697
691
|
readonly value_type: "image";
|
|
698
|
-
readonly
|
|
699
|
-
readonly pool: "library";
|
|
692
|
+
readonly primary: true;
|
|
700
693
|
};
|
|
701
|
-
/** The contact's logo for light backgrounds
|
|
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. */
|
|
702
695
|
readonly logo_light: {
|
|
703
696
|
readonly path: "logo_light_upload_id";
|
|
704
697
|
readonly value_type: "image";
|
|
705
|
-
readonly
|
|
706
|
-
readonly pool: "library";
|
|
698
|
+
readonly primary: true;
|
|
707
699
|
};
|
|
708
700
|
};
|
|
709
701
|
};
|
|
@@ -714,170 +706,6 @@ declare const READABLE_FACTS: {
|
|
|
714
706
|
readonly role: "readable";
|
|
715
707
|
readonly path: "narrative.description";
|
|
716
708
|
readonly value_type: "text";
|
|
717
|
-
readonly input_group: "describe";
|
|
718
|
-
readonly strength: "optional";
|
|
719
|
-
};
|
|
720
|
-
/** Every property photo, in candidate order. */
|
|
721
|
-
readonly photos: {
|
|
722
|
-
readonly role: "readable";
|
|
723
|
-
readonly path: "photos";
|
|
724
|
-
readonly value_type: "row_list";
|
|
725
|
-
readonly input_group: "uploads";
|
|
726
|
-
readonly strength: "optional";
|
|
727
|
-
readonly row: {
|
|
728
|
-
/** Identity of the photo. */
|
|
729
|
-
readonly id: {
|
|
730
|
-
readonly value_type: "text";
|
|
731
|
-
};
|
|
732
|
-
/** What the classifier recognized in the photo — the vocabulary image decisions rank on. */
|
|
733
|
-
readonly tags: {
|
|
734
|
-
readonly value_type: "text_list";
|
|
735
|
-
};
|
|
736
|
-
/** The photo's caption, where it has one. */
|
|
737
|
-
readonly caption: {
|
|
738
|
-
readonly value_type: "text";
|
|
739
|
-
};
|
|
740
|
-
};
|
|
741
|
-
};
|
|
742
|
-
/** Every video on the property — hosted uploads and pasted provider links alike, in the order they were added. */
|
|
743
|
-
readonly videos: {
|
|
744
|
-
readonly role: "readable";
|
|
745
|
-
readonly path: "videos";
|
|
746
|
-
readonly value_type: "row_list";
|
|
747
|
-
readonly input_group: "uploads";
|
|
748
|
-
readonly strength: "optional";
|
|
749
|
-
readonly row: {
|
|
750
|
-
/** Identity of the video. */
|
|
751
|
-
readonly id: {
|
|
752
|
-
readonly value_type: "text";
|
|
753
|
-
};
|
|
754
|
-
/** Where the bytes live: `"upload"` for a rendition served directly, `"link"` for a provider embed. */
|
|
755
|
-
readonly source: {
|
|
756
|
-
readonly value_type: "text";
|
|
757
|
-
};
|
|
758
|
-
/** What the classifier recognized in the video. Always empty for a link — no classifier runs on one. */
|
|
759
|
-
readonly tags: {
|
|
760
|
-
readonly value_type: "text_list";
|
|
761
|
-
};
|
|
762
|
-
/** The video's caption; for a link, the provider's title until someone corrects it. */
|
|
763
|
-
readonly caption: {
|
|
764
|
-
readonly value_type: "text";
|
|
765
|
-
};
|
|
766
|
-
/** The provider's own description, where it publishes one. Null for an upload. */
|
|
767
|
-
readonly description: {
|
|
768
|
-
readonly value_type: "text";
|
|
769
|
-
};
|
|
770
|
-
/** Length in milliseconds. Null means UNKNOWN, never short. */
|
|
771
|
-
readonly duration_ms: {
|
|
772
|
-
readonly value_type: "number";
|
|
773
|
-
};
|
|
774
|
-
/** The pasted link, exactly as it was given. Null for an upload. */
|
|
775
|
-
readonly url: {
|
|
776
|
-
readonly value_type: "text";
|
|
777
|
-
};
|
|
778
|
-
/** Which provider hosts the link ("youtube", "vimeo"). Null for an upload. */
|
|
779
|
-
readonly provider: {
|
|
780
|
-
readonly value_type: "text";
|
|
781
|
-
};
|
|
782
|
-
};
|
|
783
|
-
};
|
|
784
|
-
/** Every 3D tour on the property, in a stable order. */
|
|
785
|
-
readonly tours: {
|
|
786
|
-
readonly role: "readable";
|
|
787
|
-
readonly path: "tours";
|
|
788
|
-
readonly value_type: "row_list";
|
|
789
|
-
readonly input_group: "uploads";
|
|
790
|
-
readonly strength: "optional";
|
|
791
|
-
readonly row: {
|
|
792
|
-
/** Identity of the tour. */
|
|
793
|
-
readonly id: {
|
|
794
|
-
readonly value_type: "text";
|
|
795
|
-
};
|
|
796
|
-
/** The tour link, exactly as it was given. */
|
|
797
|
-
readonly url: {
|
|
798
|
-
readonly value_type: "text";
|
|
799
|
-
};
|
|
800
|
-
/** Which provider hosts the tour ("matterport", "biganto"). */
|
|
801
|
-
readonly provider: {
|
|
802
|
-
readonly value_type: "text";
|
|
803
|
-
};
|
|
804
|
-
};
|
|
805
|
-
};
|
|
806
|
-
/** Every floor-plan image on the property, whichever units it was assigned to. */
|
|
807
|
-
readonly floor_plans: {
|
|
808
|
-
readonly role: "readable";
|
|
809
|
-
readonly path: "floor_plans";
|
|
810
|
-
readonly value_type: "row_list";
|
|
811
|
-
readonly input_group: "uploads";
|
|
812
|
-
readonly strength: "optional";
|
|
813
|
-
readonly row: {
|
|
814
|
-
/** Identity of the floor-plan image (its upload id). */
|
|
815
|
-
readonly id: {
|
|
816
|
-
readonly value_type: "text";
|
|
817
|
-
};
|
|
818
|
-
/** Which units this plan was assigned to — empty when it is building-wide. */
|
|
819
|
-
readonly unit_assignments: {
|
|
820
|
-
readonly value_type: "row_list";
|
|
821
|
-
readonly row: {
|
|
822
|
-
/** The assigned unit's label. */
|
|
823
|
-
readonly unit_label: {
|
|
824
|
-
readonly value_type: "text";
|
|
825
|
-
};
|
|
826
|
-
/** The floor this plan covers for that unit. */
|
|
827
|
-
readonly floor_label: {
|
|
828
|
-
readonly value_type: "text";
|
|
829
|
-
};
|
|
830
|
-
/** Display order within that unit. */
|
|
831
|
-
readonly position: {
|
|
832
|
-
readonly value_type: "number";
|
|
833
|
-
};
|
|
834
|
-
};
|
|
835
|
-
};
|
|
836
|
-
};
|
|
837
|
-
};
|
|
838
|
-
/** Every attachable document on the property — the files a visitor opens or downloads. */
|
|
839
|
-
readonly documents: {
|
|
840
|
-
readonly role: "readable";
|
|
841
|
-
readonly path: "documents";
|
|
842
|
-
readonly value_type: "row_list";
|
|
843
|
-
readonly input_group: "uploads";
|
|
844
|
-
readonly strength: "optional";
|
|
845
|
-
readonly row: {
|
|
846
|
-
/** Identity of the document. */
|
|
847
|
-
readonly id: {
|
|
848
|
-
readonly value_type: "text";
|
|
849
|
-
};
|
|
850
|
-
/** The name it was uploaded under, and the name delivery serves it as. */
|
|
851
|
-
readonly filename: {
|
|
852
|
-
readonly value_type: "text";
|
|
853
|
-
};
|
|
854
|
-
/** The file's media type — the format, which a filename may not carry. */
|
|
855
|
-
readonly mime: {
|
|
856
|
-
readonly value_type: "text";
|
|
857
|
-
};
|
|
858
|
-
/** Prose distilled out of the file, empty where there is none. */
|
|
859
|
-
readonly notes: {
|
|
860
|
-
readonly value_type: "text";
|
|
861
|
-
};
|
|
862
|
-
};
|
|
863
|
-
};
|
|
864
|
-
/** The prose distilled from uploaded documents, one entry per document — always-on grounding, where `documents` is the files themselves. */
|
|
865
|
-
readonly document_notes: {
|
|
866
|
-
readonly role: "readable";
|
|
867
|
-
readonly path: "document_notes";
|
|
868
|
-
readonly value_type: "row_list";
|
|
869
|
-
readonly input_group: "uploads";
|
|
870
|
-
readonly strength: "optional";
|
|
871
|
-
readonly row: {
|
|
872
|
-
/** Which upload the notes were distilled from. */
|
|
873
|
-
readonly upload_id: {
|
|
874
|
-
readonly value_type: "text";
|
|
875
|
-
};
|
|
876
|
-
/** The distilled notes. */
|
|
877
|
-
readonly notes: {
|
|
878
|
-
readonly value_type: "text";
|
|
879
|
-
};
|
|
880
|
-
};
|
|
881
709
|
};
|
|
882
710
|
/** The primary unit — the lowest-positioned one — or null when the property has no units. */
|
|
883
711
|
readonly unit: {
|
|
@@ -894,11 +722,11 @@ declare const READABLE_FACTS: {
|
|
|
894
722
|
readonly primary_of: "contacts";
|
|
895
723
|
};
|
|
896
724
|
};
|
|
897
|
-
type
|
|
898
|
-
row:
|
|
725
|
+
type TableFactEntry = BindableFactEntry & {
|
|
726
|
+
row: TableRowDescriptor;
|
|
899
727
|
};
|
|
900
|
-
type
|
|
901
|
-
/** A container whose facts are generated from a
|
|
728
|
+
type TableFacts = typeof TABLE_FACTS;
|
|
729
|
+
/** A container whose facts are generated from a table's primary row. */
|
|
902
730
|
type PrimaryRowContainer = "unit" | "contact";
|
|
903
731
|
type AliasedMember<C extends PrimaryRowContainer> = C extends keyof FactProjections ? keyof FactProjections[C] : never;
|
|
904
732
|
type PrimaryRowWriteback<C extends PrimaryRowContainer, Column extends string> = C extends "unit" ? {
|
|
@@ -908,13 +736,10 @@ type PrimaryRowWriteback<C extends PrimaryRowContainer, Column extends string> =
|
|
|
908
736
|
readonly kind: "contact";
|
|
909
737
|
readonly field: Column;
|
|
910
738
|
};
|
|
911
|
-
type PrimaryRowFact<E extends
|
|
739
|
+
type PrimaryRowFact<E extends TableFactEntry, D extends TableMemberDescriptor, C extends PrimaryRowContainer> = {
|
|
912
740
|
readonly role: "bindable";
|
|
913
|
-
readonly path: `${E["path"]}[].${D["path"]}`;
|
|
914
741
|
readonly container: C;
|
|
915
742
|
readonly value_type: D["value_type"];
|
|
916
|
-
readonly input_group: E["input_group"];
|
|
917
|
-
readonly strength: D["strength"];
|
|
918
743
|
} & (D["value_type"] extends "image" ? {
|
|
919
744
|
readonly image: true;
|
|
920
745
|
} : unknown) & (D extends {
|
|
@@ -924,36 +749,26 @@ type PrimaryRowFact<E extends CollectionFactEntry, D extends CollectionMemberDes
|
|
|
924
749
|
} ? {
|
|
925
750
|
readonly writeback: PrimaryRowWriteback<C, Column>;
|
|
926
751
|
} : unknown);
|
|
927
|
-
type PrimaryRowFacts<E extends
|
|
928
|
-
|
|
752
|
+
type PrimaryRowFacts<E extends TableFactEntry, C extends PrimaryRowContainer> = { readonly [M in keyof E["row"] as E["row"][M] extends {
|
|
753
|
+
primary: true;
|
|
929
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 {
|
|
930
|
-
|
|
755
|
+
primary: true;
|
|
931
756
|
} ? 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<
|
|
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;
|
|
933
758
|
/**
|
|
934
759
|
* The single description of every fact an author can reach — the whole property fact graph, bindable and readable-only alike.
|
|
935
760
|
*
|
|
936
761
|
* @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
762
|
* Each entry's own doc comment is the hover text an author sees on the
|
|
941
763
|
* matching `fact.*` entry elsewhere in the schema layer, so keep every entry
|
|
942
764
|
* documented — that sentence is the only way an author distinguishes
|
|
943
|
-
* `fact.unit.beds` from `fact.property.
|
|
765
|
+
* `fact.unit.beds` from `fact.property.listing_intent` without opening this file.
|
|
944
766
|
* The bindable entries are ordered as `fact.*` presents them.
|
|
945
767
|
*
|
|
946
768
|
* The unit and contact facts are not declared one by one: they are the members
|
|
947
|
-
* of the `units` and `contacts` row descriptors
|
|
769
|
+
* of the `units` and `contacts` row descriptors marked `primary`,
|
|
948
770
|
* generated from those descriptors, so a row member and the `fact.unit.*` /
|
|
949
771
|
* `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.
|
|
957
772
|
*/
|
|
958
773
|
declare const FACT_GRAPH: FactGraph;
|
|
959
774
|
/** A fact graph entry's name — a key of `FACT_GRAPH`. */
|
|
@@ -966,15 +781,10 @@ type FactGraphName = keyof typeof FACT_GRAPH;
|
|
|
966
781
|
* carries every entry's own doc sentence through to the binding catalog and on
|
|
967
782
|
* into the `fact.*` namespace, where hovering a binding is how an author reads
|
|
968
783
|
* it.
|
|
969
|
-
*
|
|
970
|
-
* The conditional axis is dropped alongside the other registry-only members:
|
|
971
|
-
* nothing about resolving or editing a bound value depends on which question
|
|
972
|
-
* produced the fact, and a descriptor claiming members the projection does not
|
|
973
|
-
* copy would be a lie the type system would happily tell.
|
|
974
784
|
*/
|
|
975
785
|
type BindableFacts<G> = { [K in keyof G as G[K] extends {
|
|
976
786
|
role: "bindable";
|
|
977
|
-
} ? K : never]: Omit<G[K], "role" | "
|
|
787
|
+
} ? K : never]: Omit<G[K], "role" | "fields" | "row">; };
|
|
978
788
|
/**
|
|
979
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`).
|
|
980
790
|
*
|
|
@@ -990,45 +800,26 @@ type BindableFacts<G> = { [K in keyof G as G[K] extends {
|
|
|
990
800
|
declare const SOURCE_FIELDS: BindableFacts<typeof FACT_GRAPH>;
|
|
991
801
|
/** A canonical field name a `direct` source may bind to — a key of `SOURCE_FIELDS`. */
|
|
992
802
|
type SourceFieldName = keyof typeof SOURCE_FIELDS;
|
|
803
|
+
/** Each registry table's key — the table's path in the registry, home first. */
|
|
804
|
+
declare const REGISTRY_TABLE_KEYS: {
|
|
805
|
+
readonly units: "property.units";
|
|
806
|
+
readonly contacts: "property.contacts";
|
|
807
|
+
readonly comparables: "property.comparables";
|
|
808
|
+
readonly commercial_spaces: "property.commercial_spaces";
|
|
809
|
+
};
|
|
810
|
+
/** A registry table's name — one of `REGISTRY_TABLE_KEYS`' keys: every legacy table, and the tables only the registry holds. */
|
|
811
|
+
type RegistryTable = keyof typeof REGISTRY_TABLE_KEYS;
|
|
993
812
|
/**
|
|
994
|
-
* The
|
|
995
|
-
* `
|
|
996
|
-
*
|
|
997
|
-
*
|
|
998
|
-
*/
|
|
999
|
-
type WritableSourceFieldName = { [F in SourceFieldName]: (typeof SOURCE_FIELDS)[F] extends {
|
|
1000
|
-
writeback: WritebackTarget;
|
|
1001
|
-
} ? F : never; }[SourceFieldName];
|
|
1002
|
-
/**
|
|
1003
|
-
* The registry of fact array fields a slot may be collection-bound to (a slot is collection-bound iff `source.kind === "direct"` and `source.field` is a key here).
|
|
1004
|
-
*
|
|
1005
|
-
* @remarks
|
|
1006
|
-
* The single home for per-kind mechanics; other layers implement their
|
|
1007
|
-
* operations keyed by these entries rather than restating them. `idKey`
|
|
1008
|
-
* names the stable canonical row id (used for merge, markers, and editor
|
|
1009
|
-
* identity). `cap`/`min`, when present, are the API-enforced membership
|
|
1010
|
-
* ceiling/floor. `ownership` is the property-owned vs. library-shared
|
|
1011
|
-
* discriminator that gates writeback/fan-out strategy per layer — never a
|
|
1012
|
-
* shared physical table.
|
|
813
|
+
* The library home's list facts whose items are a table's rows — `library.contacts`,
|
|
814
|
+
* the contacts the property's `contacts` page picks from. The same table as the
|
|
815
|
+
* property's key names, under the registry reading: a row `from` it offers the same
|
|
816
|
+
* members.
|
|
1013
817
|
*/
|
|
1014
|
-
declare const
|
|
1015
|
-
readonly
|
|
1016
|
-
readonly idKey: "unit_id";
|
|
1017
|
-
readonly ownership: "property";
|
|
1018
|
-
};
|
|
1019
|
-
readonly contacts: {
|
|
1020
|
-
readonly idKey: "id";
|
|
1021
|
-
readonly cap: 12;
|
|
1022
|
-
readonly min: 1;
|
|
1023
|
-
readonly ownership: "library";
|
|
1024
|
-
};
|
|
1025
|
-
readonly comparables: {
|
|
1026
|
-
readonly idKey: "id";
|
|
1027
|
-
readonly ownership: "property";
|
|
1028
|
-
};
|
|
818
|
+
declare const LIBRARY_TABLE_KEYS: {
|
|
819
|
+
readonly contacts: "library.contacts";
|
|
1029
820
|
};
|
|
1030
|
-
/** A
|
|
1031
|
-
type
|
|
821
|
+
/** A table's registry key — one of `REGISTRY_TABLE_KEYS`' or `LIBRARY_TABLE_KEYS`' values. */
|
|
822
|
+
type RegistryTableKey = (typeof REGISTRY_TABLE_KEYS)[RegistryTable] | (typeof LIBRARY_TABLE_KEYS)[keyof typeof LIBRARY_TABLE_KEYS];
|
|
1032
823
|
/**
|
|
1033
824
|
* The single source of truth for "what kind of link is this URL". A `url`
|
|
1034
825
|
* slot names one of these — or a single provider id — in its `accepts`
|
|
@@ -1055,6 +846,43 @@ declare const LINK_PROVIDERS: {
|
|
|
1055
846
|
readonly pattern: RegExp;
|
|
1056
847
|
readonly strategy: "opengraph";
|
|
1057
848
|
};
|
|
849
|
+
readonly iguide: {
|
|
850
|
+
readonly kind: "tour";
|
|
851
|
+
readonly label: "iGUIDE";
|
|
852
|
+
readonly pattern: RegExp;
|
|
853
|
+
readonly strategy: "opengraph";
|
|
854
|
+
};
|
|
855
|
+
readonly kuula: {
|
|
856
|
+
readonly kind: "tour";
|
|
857
|
+
readonly label: "Kuula";
|
|
858
|
+
readonly pattern: RegExp;
|
|
859
|
+
readonly strategy: "opengraph";
|
|
860
|
+
};
|
|
861
|
+
readonly momento360: {
|
|
862
|
+
readonly kind: "tour";
|
|
863
|
+
readonly label: "Momento360";
|
|
864
|
+
readonly pattern: RegExp;
|
|
865
|
+
readonly strategy: "opengraph";
|
|
866
|
+
};
|
|
867
|
+
readonly cloudpano: {
|
|
868
|
+
readonly kind: "tour";
|
|
869
|
+
readonly label: "CloudPano";
|
|
870
|
+
readonly pattern: RegExp;
|
|
871
|
+
readonly strategy: "none";
|
|
872
|
+
};
|
|
873
|
+
readonly asteroom: {
|
|
874
|
+
readonly kind: "tour";
|
|
875
|
+
readonly label: "Asteroom";
|
|
876
|
+
readonly pattern: RegExp;
|
|
877
|
+
readonly strategy: "none";
|
|
878
|
+
};
|
|
879
|
+
readonly zillow3d: {
|
|
880
|
+
readonly kind: "tour";
|
|
881
|
+
readonly label: "Zillow 3D Home";
|
|
882
|
+
readonly pattern: RegExp;
|
|
883
|
+
readonly path: RegExp;
|
|
884
|
+
readonly strategy: "none";
|
|
885
|
+
};
|
|
1058
886
|
readonly youtube: {
|
|
1059
887
|
readonly kind: "video";
|
|
1060
888
|
readonly label: "YouTube";
|
|
@@ -1113,4 +941,4 @@ declare const VIDEO_SOURCES: readonly ["upload", "link"];
|
|
|
1113
941
|
/** A video's storage/origin kind — one of `VIDEO_SOURCES`. */
|
|
1114
942
|
type VideoSource = (typeof VIDEO_SOURCES)[number];
|
|
1115
943
|
//#endregion
|
|
1116
|
-
export { BindableFactEntry, BindableFacts,
|
|
944
|
+
export { BindableFactEntry, BindableFacts, FACT_GRAPH, FACT_PROJECTIONS, FactGraphName, FactMemberDescriptor, FactProjections, FactShapeDescriptor, FactValueType, HolderProcessVerb, LIBRARY_TABLE_KEYS, LINK_KINDS, LINK_PROVIDERS, LinkKind, LinkProviderId, MEDIA_KINDS, MediaKind, OBJECT_BINDING_OWN_KEYS, ObjectBindingOwnKey, PROCESS_CATALOG, ProcessOf, ProcessVerb, REGISTRY_TABLE_KEYS, RegistryTable, RegistryTableKey, RowMemberWriteback, SOURCE_FIELDS, SourceFieldContainer, SourceFieldName, SourceFieldValueType, TableMemberDescriptor, TableRowDescriptor, VIDEO_SOURCES, VideoSource, WritebackTarget };
|