@homepages/concrete 7.0.0 → 9.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 +1007 -0
- package/README.md +20 -9
- package/codemods/list-grammar.mjs +923 -0
- package/codemods/manifest.json +66 -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-BUmdDDX5.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/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 +263 -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 +252 -35
- package/dist/packages/internal/fill-bake/dist/compute-reads.js +365 -4
- package/dist/packages/internal/fill-bake/dist/derive-source.js +35 -21
- package/dist/packages/internal/fill-bake/dist/index.js +8 -3
- package/dist/packages/internal/fill-bake/dist/item-merge.js +119 -0
- package/dist/packages/internal/fill-bake/dist/item-overrides.js +28 -0
- package/dist/packages/internal/fill-bake/dist/linked-merge.js +40 -0
- package/dist/packages/internal/fill-bake/dist/list-grammar.js +175 -0
- package/dist/packages/internal/fill-vocabulary/dist/holder.js +51 -0
- package/dist/packages/internal/fill-vocabulary/dist/resolved-decision.js +390 -0
- package/dist/packages/internal/fill-vocabulary/dist/row-planners.js +1 -23
- package/dist/packages/internal/fill-vocabulary/dist/row-reads.js +1 -1
- package/dist/packages/internal/fill-vocabulary/dist/verbs.js +75 -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 +228 -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 +34 -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 +244 -0
- package/dist/packages/internal/section-contracts/dist/cap-contract.js +8 -17
- package/dist/packages/internal/section-contracts/dist/catalog.js +35 -27
- 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 +27 -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 -0
- 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 -5
- package/dist/packages/internal/section-contracts/dist/list-fill-contract.js +23 -19
- package/dist/packages/internal/section-contracts/dist/list-scalar-contract.js +12 -7
- 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 +5 -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 +7 -4
- package/dist/packages/internal/section-contracts/dist/row-rule-contract.js +83 -0
- package/dist/packages/internal/section-contracts/dist/row-source-contract.js +67 -0
- package/dist/packages/internal/section-contracts/dist/runners.js +77 -33
- package/dist/packages/internal/section-contracts/dist/select-contract.js +0 -8
- package/dist/packages/internal/section-contracts/dist/source-contract.js +120 -66
- 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 +43 -18
- package/dist/packages/internal/source-resolution/dist/index.js +113 -118
- 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 +85 -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 +12 -36
- 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 +158 -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 +94 -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 +250 -0
- package/dist/packages/internal/template-contracts/dist/ref-locate.js +192 -0
- package/dist/packages/internal/template-contracts/dist/registry-aliases.js +77 -0
- package/dist/packages/internal/template-contracts/dist/registry-facts.d.ts +268 -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 +133 -0
- package/dist/packages/internal/template-contracts/dist/row-ref.js +101 -0
- package/dist/packages/internal/template-contracts/dist/row-sources.js +48 -8
- 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 +243 -384
- package/dist/packages/internal/template-contracts/dist/slot-catalog.js +334 -230
- 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 +140 -0
- package/dist/packages/internal/template-contracts/dist/slot-value.d.ts +97 -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 +19 -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 -158
- 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 -11
- 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 -29
- package/package.json +9 -8
- package/dist/artifact/playground/client/assets/index-CckS2ONm.css +0 -1
- package/dist/artifact/playground/client/assets/index-D8eepVr-.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 -111
- 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/choose-select-contract.js +0 -20
- package/dist/packages/internal/section-contracts/dist/name-title-contract.js +0 -20
- package/dist/packages/internal/section-contracts/dist/pooling-field-contract.js +0 -22
- package/dist/packages/internal/section-contracts/dist/record-collection-contract.js +0 -24
- package/dist/packages/internal/section-contracts/dist/source-filter-contract.js +0 -15
- package/dist/packages/internal/template-contracts/dist/collection-editing.js +0 -22
- package/dist/packages/internal/template-contracts/dist/facts-view.js +0 -111
- 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 -89
- 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 -613
- 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,166 +0,0 @@
|
|
|
1
|
-
//#region src/fixtures/canonical.d.ts
|
|
2
|
-
interface CanonicalAddress {
|
|
3
|
-
display: string;
|
|
4
|
-
street: string;
|
|
5
|
-
/** Street number + name without the type suffix ("1112 Commonwealth"). */
|
|
6
|
-
street_no_type: string;
|
|
7
|
-
city: string;
|
|
8
|
-
state: string;
|
|
9
|
-
postal: string;
|
|
10
|
-
/** Address line 2 (apt/suite/unit); absent when none. */
|
|
11
|
-
unit?: string;
|
|
12
|
-
}
|
|
13
|
-
type CanonicalPropertyType = "single_family" | "condo_townhome" | "multi_family" | "investment";
|
|
14
|
-
type CanonicalListingIntent = "for_sale" | "for_rent";
|
|
15
|
-
interface CanonicalNarrative {
|
|
16
|
-
description: string;
|
|
17
|
-
}
|
|
18
|
-
/** One 3D tour link. `provider` is a link-provider key, typed loosely on purpose. */
|
|
19
|
-
interface CanonicalTourLink {
|
|
20
|
-
id: string;
|
|
21
|
-
url: string;
|
|
22
|
-
provider: string;
|
|
23
|
-
}
|
|
24
|
-
/** One per-unit floor-plan reference; `upload_id` is a derived plan's source document. */
|
|
25
|
-
interface CanonicalUnitFloorPlanRef {
|
|
26
|
-
id: string;
|
|
27
|
-
upload_id?: string;
|
|
28
|
-
floor_label: string | null;
|
|
29
|
-
position: number;
|
|
30
|
-
}
|
|
31
|
-
interface CanonicalUnit {
|
|
32
|
-
unit_id: string;
|
|
33
|
-
unit_label: string | null;
|
|
34
|
-
beds: number;
|
|
35
|
-
baths: number;
|
|
36
|
-
sqft: number | null;
|
|
37
|
-
/** Dollars as bare digits when numeric, the verbatim text override otherwise, or null. */
|
|
38
|
-
price: string | null;
|
|
39
|
-
position: number;
|
|
40
|
-
floor_plans: CanonicalUnitFloorPlanRef[];
|
|
41
|
-
}
|
|
42
|
-
interface CanonicalPhoto {
|
|
43
|
-
id: string;
|
|
44
|
-
tags: string[];
|
|
45
|
-
caption: string | null;
|
|
46
|
-
}
|
|
47
|
-
/** One video candidate — a hosted upload or a pasted provider link; `source` is the discriminant. */
|
|
48
|
-
interface CanonicalVideo {
|
|
49
|
-
id: string;
|
|
50
|
-
source: "upload" | "link";
|
|
51
|
-
tags: string[];
|
|
52
|
-
caption: string | null;
|
|
53
|
-
description: string | null;
|
|
54
|
-
/** Null means unknown, never short. */
|
|
55
|
-
duration_ms: number | null;
|
|
56
|
-
/** Link only — the raw pasted URL. */
|
|
57
|
-
url: string | null;
|
|
58
|
-
/** Link only — a video-provider key. */
|
|
59
|
-
provider: string | null;
|
|
60
|
-
}
|
|
61
|
-
interface CanonicalDocument {
|
|
62
|
-
id: string;
|
|
63
|
-
filename: string;
|
|
64
|
-
mime: string;
|
|
65
|
-
/** The notes distilled from the file; '' where there are none. */
|
|
66
|
-
notes: string;
|
|
67
|
-
}
|
|
68
|
-
interface CanonicalFloorPlanUnitAssignment {
|
|
69
|
-
unit_label: string | null;
|
|
70
|
-
floor_label: string | null;
|
|
71
|
-
position: number;
|
|
72
|
-
}
|
|
73
|
-
interface CanonicalFloorPlan {
|
|
74
|
-
id: string;
|
|
75
|
-
upload_id?: string;
|
|
76
|
-
page_index?: number;
|
|
77
|
-
unit_assignments: CanonicalFloorPlanUnitAssignment[];
|
|
78
|
-
/** The served image key. */
|
|
79
|
-
processed_s3_key: string | null;
|
|
80
|
-
}
|
|
81
|
-
interface CanonicalContactCard {
|
|
82
|
-
id: string;
|
|
83
|
-
primary: boolean;
|
|
84
|
-
name: string | null;
|
|
85
|
-
title: string | null;
|
|
86
|
-
org_name: string | null;
|
|
87
|
-
bio: string | null;
|
|
88
|
-
email: string | null;
|
|
89
|
-
phone: string | null;
|
|
90
|
-
address: string | null;
|
|
91
|
-
website_url: string | null;
|
|
92
|
-
avatar_upload_id: string | null;
|
|
93
|
-
logo_dark_upload_id: string | null;
|
|
94
|
-
logo_light_upload_id: string | null;
|
|
95
|
-
instagram_url: string | null;
|
|
96
|
-
linkedin_url: string | null;
|
|
97
|
-
x_url: string | null;
|
|
98
|
-
facebook_url: string | null;
|
|
99
|
-
}
|
|
100
|
-
type CanonicalComparableStatus = "sold" | "active";
|
|
101
|
-
type CanonicalComparablePricePeriod = "total" | "monthly";
|
|
102
|
-
interface CanonicalComparable {
|
|
103
|
-
id: string;
|
|
104
|
-
address_street: string | null;
|
|
105
|
-
address_city: string | null;
|
|
106
|
-
address_state: string | null;
|
|
107
|
-
address_postal: string | null;
|
|
108
|
-
/** The display line, '' when no address part is set. */
|
|
109
|
-
address: string;
|
|
110
|
-
lat: number | null;
|
|
111
|
-
lng: number | null;
|
|
112
|
-
distance_m: number | null;
|
|
113
|
-
status: CanonicalComparableStatus | null;
|
|
114
|
-
/** One integer in dollars; `status` and `price_period` say what it means. */
|
|
115
|
-
price: number | null;
|
|
116
|
-
price_period: CanonicalComparablePricePeriod;
|
|
117
|
-
/** ISO `YYYY-MM-DD`; null unless sold. */
|
|
118
|
-
sale_date: string | null;
|
|
119
|
-
beds: number | null;
|
|
120
|
-
baths: number | null;
|
|
121
|
-
sqft: number | null;
|
|
122
|
-
/** The id of the comp's own photo upload — in no media pool; null when none was uploaded. */
|
|
123
|
-
photo_upload_id: string | null;
|
|
124
|
-
/** The year the comparable was built. */
|
|
125
|
-
year_built: number | null;
|
|
126
|
-
/** Lot size in square feet. */
|
|
127
|
-
lot_sqft: number | null;
|
|
128
|
-
stories: number | null;
|
|
129
|
-
/** Units in the comparable's building — a multifamily figure, unrelated to the subject's units. */
|
|
130
|
-
units: number | null;
|
|
131
|
-
/** Monthly HOA dues in dollars. */
|
|
132
|
-
hoa_monthly: number | null;
|
|
133
|
-
/** The asking price in dollars, beside `price`. */
|
|
134
|
-
list_price: number | null;
|
|
135
|
-
/** ISO `YYYY-MM-DD` — when the listing went live, not when it closed. */
|
|
136
|
-
listed_date: string | null;
|
|
137
|
-
mls_number: string | null;
|
|
138
|
-
/** The listing remarks, verbatim from the source. */
|
|
139
|
-
description: string | null;
|
|
140
|
-
/** The comparable's type in the platform's own vocabulary; null when the source states none. */
|
|
141
|
-
property_type: CanonicalPropertyType | null;
|
|
142
|
-
}
|
|
143
|
-
interface CanonicalDocumentNote {
|
|
144
|
-
upload_id: string;
|
|
145
|
-
notes: string;
|
|
146
|
-
}
|
|
147
|
-
/** The platform's property facts, as the platform projects them. */
|
|
148
|
-
interface CanonicalProperty {
|
|
149
|
-
address: CanonicalAddress;
|
|
150
|
-
lat: number | null;
|
|
151
|
-
lon: number | null;
|
|
152
|
-
property_type: CanonicalPropertyType;
|
|
153
|
-
listing_intent: CanonicalListingIntent;
|
|
154
|
-
units: CanonicalUnit[];
|
|
155
|
-
narrative: CanonicalNarrative;
|
|
156
|
-
photos: CanonicalPhoto[];
|
|
157
|
-
videos: CanonicalVideo[];
|
|
158
|
-
floor_plans: CanonicalFloorPlan[];
|
|
159
|
-
tours: CanonicalTourLink[];
|
|
160
|
-
document_notes: CanonicalDocumentNote[];
|
|
161
|
-
documents: CanonicalDocument[];
|
|
162
|
-
contacts: CanonicalContactCard[];
|
|
163
|
-
comparables: CanonicalComparable[];
|
|
164
|
-
}
|
|
165
|
-
//#endregion
|
|
166
|
-
export { CanonicalAddress, CanonicalComparable, CanonicalComparablePricePeriod, CanonicalComparableStatus, CanonicalContactCard, CanonicalDocument, CanonicalDocumentNote, CanonicalFloorPlan, CanonicalFloorPlanUnitAssignment, CanonicalListingIntent, CanonicalNarrative, CanonicalPhoto, CanonicalProperty, CanonicalPropertyType, CanonicalTourLink, CanonicalUnit, CanonicalUnitFloorPlanRef, CanonicalVideo };
|
package/dist/fixtures/media.js
DELETED
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
import { tourEmbedUrl, videoEmbedUrl } from "../packages/internal/template-contracts/dist/slot-catalog.js";
|
|
2
|
-
|
|
3
|
-
//#region src/fixtures/media.ts
|
|
4
|
-
const clamp01 = (n) => n < 0 ? 0 : n > 1 ? 1 : n;
|
|
5
|
-
function cropRectOf(value) {
|
|
6
|
-
if (typeof value !== "object" || value === null) return null;
|
|
7
|
-
const { nx = 0, ny = 0, nw = 1, nh = 1 } = value;
|
|
8
|
-
if (![
|
|
9
|
-
nx,
|
|
10
|
-
ny,
|
|
11
|
-
nw,
|
|
12
|
-
nh
|
|
13
|
-
].every((n) => typeof n === "number" && Number.isFinite(n))) return null;
|
|
14
|
-
const x = clamp01(nx);
|
|
15
|
-
const y = clamp01(ny);
|
|
16
|
-
const rect = {
|
|
17
|
-
nx: x,
|
|
18
|
-
ny: y,
|
|
19
|
-
nw: Math.min(clamp01(nw), 1 - x),
|
|
20
|
-
nh: Math.min(clamp01(nh), 1 - y)
|
|
21
|
-
};
|
|
22
|
-
if (rect.nw <= 0 || rect.nh <= 0) return null;
|
|
23
|
-
return rect.nx === 0 && rect.ny === 0 && rect.nw === 1 && rect.nh === 1 ? null : rect;
|
|
24
|
-
}
|
|
25
|
-
const servedMedia = { file(file) {
|
|
26
|
-
return typeof file === "string" ? {
|
|
27
|
-
url: file,
|
|
28
|
-
responsive: null
|
|
29
|
-
} : {
|
|
30
|
-
url: file.url,
|
|
31
|
-
responsive: file.responsive
|
|
32
|
-
};
|
|
33
|
-
} };
|
|
34
|
-
function refId(kind, value) {
|
|
35
|
-
if (typeof value !== "object" || value === null) return null;
|
|
36
|
-
const { asset_id: assetId, photo_id: photoId } = value;
|
|
37
|
-
if (typeof assetId === "string" && assetId !== "") return assetId;
|
|
38
|
-
return kind === "image" && typeof photoId === "string" && photoId !== "" ? photoId : null;
|
|
39
|
-
}
|
|
40
|
-
function imageValue(entry, ref, resolver) {
|
|
41
|
-
if (entry.file === null) return null;
|
|
42
|
-
const rect = resolver.crop === void 0 ? null : cropRectOf(ref.rect);
|
|
43
|
-
const mobileRect = resolver.crop === void 0 ? null : cropRectOf(ref.mobile_rect);
|
|
44
|
-
const served = resolver.file(entry.file);
|
|
45
|
-
const value = rect === null ? {
|
|
46
|
-
photo_id: entry.id,
|
|
47
|
-
url: served.url,
|
|
48
|
-
alt: entry.alt,
|
|
49
|
-
responsive: served.responsive
|
|
50
|
-
} : {
|
|
51
|
-
photo_id: entry.id,
|
|
52
|
-
url: resolver.crop(entry.file, rect),
|
|
53
|
-
alt: entry.alt,
|
|
54
|
-
responsive: null,
|
|
55
|
-
rect
|
|
56
|
-
};
|
|
57
|
-
if (mobileRect !== null) value.mobile = {
|
|
58
|
-
url: resolver.crop(entry.file, mobileRect),
|
|
59
|
-
responsive: null
|
|
60
|
-
};
|
|
61
|
-
if ("floor_label" in ref) {
|
|
62
|
-
const floorLabel = typeof ref.floor_label === "string" ? ref.floor_label : null;
|
|
63
|
-
value.floor_label = floorLabel;
|
|
64
|
-
if (value.alt === "") value.alt = floorLabel ?? "Floor plan";
|
|
65
|
-
}
|
|
66
|
-
return value;
|
|
67
|
-
}
|
|
68
|
-
function posterOf(entry, resolver) {
|
|
69
|
-
if (entry.posterFile !== void 0) {
|
|
70
|
-
const served = resolver.file(entry.posterFile);
|
|
71
|
-
return served.responsive === null ? { poster: served.url } : {
|
|
72
|
-
poster: served.url,
|
|
73
|
-
poster_responsive: served.responsive
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
return { poster: entry.posterUrl ?? "" };
|
|
77
|
-
}
|
|
78
|
-
function videoValue(entry, resolver) {
|
|
79
|
-
const poster = posterOf(entry, resolver);
|
|
80
|
-
if (entry.file === null) return {
|
|
81
|
-
video_id: entry.id,
|
|
82
|
-
url: videoEmbedUrl(entry.url ?? "") ?? "",
|
|
83
|
-
...poster,
|
|
84
|
-
alt: entry.alt,
|
|
85
|
-
source: "link",
|
|
86
|
-
...entry.provider === null ? {} : { provider: entry.provider }
|
|
87
|
-
};
|
|
88
|
-
return {
|
|
89
|
-
video_id: entry.id,
|
|
90
|
-
url: resolver.file(entry.file).url,
|
|
91
|
-
...poster,
|
|
92
|
-
alt: entry.alt,
|
|
93
|
-
source: "upload"
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
function tourValue(entry, resolver) {
|
|
97
|
-
return {
|
|
98
|
-
tour_id: entry.id,
|
|
99
|
-
url: tourEmbedUrl(entry.url ?? "") ?? "",
|
|
100
|
-
...posterOf(entry, resolver),
|
|
101
|
-
alt: entry.alt,
|
|
102
|
-
...entry.provider === null ? {} : { provider: entry.provider }
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
function documentValue(entry, resolver) {
|
|
106
|
-
if (entry.file === null) return null;
|
|
107
|
-
return {
|
|
108
|
-
asset_id: entry.id,
|
|
109
|
-
url: resolver.file(entry.file).url,
|
|
110
|
-
filename: entry.filename,
|
|
111
|
-
content_type: entry.mime,
|
|
112
|
-
size_bytes: 0
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
function renderMediaRef(kind, value, media, resolver) {
|
|
116
|
-
const id = refId(kind, value);
|
|
117
|
-
const entry = id === null ? void 0 : media.get(id);
|
|
118
|
-
if (entry === void 0 || entry.kind !== kind) return null;
|
|
119
|
-
switch (kind) {
|
|
120
|
-
case "image": return imageValue(entry, value, resolver);
|
|
121
|
-
case "video": return videoValue(entry, resolver);
|
|
122
|
-
case "tour": return tourValue(entry, resolver);
|
|
123
|
-
case "document": return documentValue(entry, resolver);
|
|
124
|
-
default: return null;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
const MEDIA_KINDS = /* @__PURE__ */ new Set([
|
|
128
|
-
"image",
|
|
129
|
-
"video",
|
|
130
|
-
"tour",
|
|
131
|
-
"document"
|
|
132
|
-
]);
|
|
133
|
-
function renderValue(def, value, media, resolver) {
|
|
134
|
-
if (value === null || value === void 0) return value;
|
|
135
|
-
if (MEDIA_KINDS.has(def.type)) return renderMediaRef(def.type, value, media, resolver);
|
|
136
|
-
if (def.type !== "list" || !Array.isArray(value)) return value;
|
|
137
|
-
const items = value;
|
|
138
|
-
if (def.fields !== void 0) {
|
|
139
|
-
const fields = def.fields;
|
|
140
|
-
return items.map((row) => {
|
|
141
|
-
if (typeof row !== "object" || row === null) return row;
|
|
142
|
-
const out = { ...row };
|
|
143
|
-
for (const [field, fieldDef] of Object.entries(fields)) out[field] = renderValue(fieldDef, out[field], media, resolver);
|
|
144
|
-
return out;
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
if (def.element !== void 0) {
|
|
148
|
-
const element = def.element;
|
|
149
|
-
return items.map((item) => renderValue(element, item, media, resolver));
|
|
150
|
-
}
|
|
151
|
-
return items;
|
|
152
|
-
}
|
|
153
|
-
function renderInstanceSlots(instance, section, media, resolver = servedMedia) {
|
|
154
|
-
const out = {};
|
|
155
|
-
for (const [id, value] of Object.entries(instance.slots)) {
|
|
156
|
-
const def = section.schema.slots[id];
|
|
157
|
-
out[id] = def === void 0 ? value : renderValue(def, value, media, resolver);
|
|
158
|
-
}
|
|
159
|
-
return out;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
//#endregion
|
|
163
|
-
export { cropRectOf, renderInstanceSlots, renderMediaRef, servedMedia };
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { poolingPrimitiveOf } from "./row-planners.js";
|
|
2
|
-
|
|
3
|
-
//#region ../../internal/fill-vocabulary/dist/origination.js
|
|
4
|
-
const LEGACY_COLLECTION_ITEM = {
|
|
5
|
-
image_collection: "image",
|
|
6
|
-
video_collection: "video",
|
|
7
|
-
poi_list: "poi"
|
|
8
|
-
};
|
|
9
|
-
function isListSlot(slot) {
|
|
10
|
-
return slot.type === "list" || slot.type !== void 0 && slot.type in LEGACY_COLLECTION_ITEM;
|
|
11
|
-
}
|
|
12
|
-
function pooledFieldsOf(fields) {
|
|
13
|
-
const found = [];
|
|
14
|
-
for (const [field, def] of Object.entries(fields)) {
|
|
15
|
-
if (def.source !== void 0) continue;
|
|
16
|
-
const pool = poolingPrimitiveOf(def);
|
|
17
|
-
if (pool !== void 0) found.push({
|
|
18
|
-
field,
|
|
19
|
-
pool
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
return found;
|
|
23
|
-
}
|
|
24
|
-
function selectFieldsOf(fields) {
|
|
25
|
-
return Object.entries(fields).filter(([, def]) => def.type === "select" && Array.isArray(def.values)).map(([name]) => name);
|
|
26
|
-
}
|
|
27
|
-
function keyRows(slot, fields) {
|
|
28
|
-
const selects = selectFieldsOf(fields);
|
|
29
|
-
const title = slot.title;
|
|
30
|
-
if (title !== void 0) {
|
|
31
|
-
const def = fields[title];
|
|
32
|
-
if (def?.type === "text") return {
|
|
33
|
-
kind: "keyed-rows",
|
|
34
|
-
keyField: title,
|
|
35
|
-
keys: "written"
|
|
36
|
-
};
|
|
37
|
-
if (def?.type === "select" && selects.includes(title)) return {
|
|
38
|
-
kind: "keyed-rows",
|
|
39
|
-
keyField: title,
|
|
40
|
-
keys: "picked"
|
|
41
|
-
};
|
|
42
|
-
return def?.type === void 0 ? {
|
|
43
|
-
kind: "no-key",
|
|
44
|
-
title
|
|
45
|
-
} : {
|
|
46
|
-
kind: "no-key",
|
|
47
|
-
title,
|
|
48
|
-
titleType: def.type
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
if (selects.length === 1) return {
|
|
52
|
-
kind: "keyed-rows",
|
|
53
|
-
keyField: selects[0],
|
|
54
|
-
keys: "picked"
|
|
55
|
-
};
|
|
56
|
-
return { kind: "no-key" };
|
|
57
|
-
}
|
|
58
|
-
function everyFieldFilled(fields, filled) {
|
|
59
|
-
if (filled.size === 0) return false;
|
|
60
|
-
return Object.entries(fields).every(([name, def]) => def.source !== void 0 || filled.has(name));
|
|
61
|
-
}
|
|
62
|
-
function originationFor(slot, filled = []) {
|
|
63
|
-
if (isListSlot(slot)) {
|
|
64
|
-
const fields = slot.fields;
|
|
65
|
-
if (fields !== void 0) {
|
|
66
|
-
const bound = slot.source;
|
|
67
|
-
if (bound?.kind === "direct" && bound.field !== void 0) return {
|
|
68
|
-
kind: "bound-rows",
|
|
69
|
-
iterate: bound.field
|
|
70
|
-
};
|
|
71
|
-
if (everyFieldFilled(fields, new Set(filled))) return { kind: "filled-rows" };
|
|
72
|
-
const pooled = pooledFieldsOf(fields);
|
|
73
|
-
const key = keyRows(slot, fields);
|
|
74
|
-
if (pooled.length === 1 && !(key.kind === "keyed-rows" && key.keys === "picked")) return {
|
|
75
|
-
kind: "pick-assets",
|
|
76
|
-
pool: pooled[0].pool,
|
|
77
|
-
field: pooled[0].field
|
|
78
|
-
};
|
|
79
|
-
if (key.kind === "keyed-rows") return key;
|
|
80
|
-
const { kind: _noKey, ...pointed } = key;
|
|
81
|
-
return {
|
|
82
|
-
kind: "unkeyed-rows",
|
|
83
|
-
...pointed,
|
|
84
|
-
selects: selectFieldsOf(fields),
|
|
85
|
-
pools: pooled.map((p) => p.field)
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
const item = slot.element?.type ?? LEGACY_COLLECTION_ITEM[slot.type ?? ""];
|
|
89
|
-
if (item === "poi") return { kind: "curate" };
|
|
90
|
-
const pool = poolingPrimitiveOf({ type: item });
|
|
91
|
-
if (pool !== void 0) return {
|
|
92
|
-
kind: "pick-assets",
|
|
93
|
-
pool
|
|
94
|
-
};
|
|
95
|
-
if (item === "select") return { kind: "pick-keys" };
|
|
96
|
-
return { kind: "write-items" };
|
|
97
|
-
}
|
|
98
|
-
if (slot.type === "text") return { kind: "write" };
|
|
99
|
-
if (slot.type === "select") return {
|
|
100
|
-
kind: "pick-one",
|
|
101
|
-
from: "values"
|
|
102
|
-
};
|
|
103
|
-
const pool = poolingPrimitiveOf(slot);
|
|
104
|
-
if (pool !== void 0) return {
|
|
105
|
-
kind: "pick-one",
|
|
106
|
-
from: pool
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
//#endregion
|
|
111
|
-
export { isListSlot, originationFor };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { resolveFormatGeometry } from "./geometry.js";
|
|
2
|
-
import { CAPTURE_ANIMATIONS_SETTLED_EXPRESSION, CAPTURE_HAS_ISLANDS_EXPRESSION, CAPTURE_ISLANDS_READY_EXPRESSION, CAPTURE_ISLANDS_READY_GLOBAL, CAPTURE_ISLAND_PAINT_GRACE_EXPRESSION, CAPTURE_ISLAND_SETTLE_TIMEOUT_MS, CAPTURE_READY_EXPRESSION, CAPTURE_WAIT_UNTIL, FRAME_ROOT_CLASS, captureViewport, frameTokens, printPageSize, settleCapture } from "./capture.js";
|
|
3
|
-
|
|
4
|
-
export { CAPTURE_ISLANDS_READY_GLOBAL, CAPTURE_WAIT_UNTIL, FRAME_ROOT_CLASS, captureViewport, frameTokens, printPageSize, settleCapture };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { projectFactsView } from "../../template-contracts/dist/facts-view.js";
|
|
2
|
-
import "../../source-resolution/dist/index.js";
|
|
3
|
-
|
|
4
|
-
//#region ../../internal/property-facts/dist/derive-facts-view.js
|
|
5
|
-
function buildDeriveFactsView(facts) {
|
|
6
|
-
return projectFactsView(facts);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
//#endregion
|
|
10
|
-
export { buildDeriveFactsView };
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { C as VideoSchema, S as UnitSchema, _ as PropertyFactsSchema, a as ComparableSchema, b as TourLinkSchema, c as DocumentSchema, f as ListingIntentSchema, h as PlannerUnitSchema, i as ComparablePricePeriodSchema, l as FloorPlanSchema, m as PhotoSchema, n as COMPARABLE_PRICE_PERIODS, o as ComparableStatusSchema, p as NarrativeSchema, r as COMPARABLE_STATUSES, s as ContactCardSchema, t as AddressSchema, u as FloorPlanUnitAssignmentSchema, v as PropertyTypeSchema, x as UnitFloorPlanRefSchema } from "./property-facts-Cy7-O4p0.js";
|
|
2
|
-
|
|
3
|
-
export { PropertyFactsSchema };
|
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
//#region ../../internal/property-facts/dist/property-facts-Cy7-O4p0.js
|
|
4
|
-
const AddressSchema = z.object({
|
|
5
|
-
display: z.string(),
|
|
6
|
-
street: z.string(),
|
|
7
|
-
street_no_type: z.string(),
|
|
8
|
-
city: z.string(),
|
|
9
|
-
state: z.string(),
|
|
10
|
-
postal: z.string(),
|
|
11
|
-
unit: z.string().optional()
|
|
12
|
-
});
|
|
13
|
-
const PropertyTypeSchema = z.enum([
|
|
14
|
-
"single_family",
|
|
15
|
-
"condo_townhome",
|
|
16
|
-
"multi_family",
|
|
17
|
-
"investment"
|
|
18
|
-
]);
|
|
19
|
-
const ListingIntentSchema = z.enum(["for_sale", "for_rent"]);
|
|
20
|
-
const NarrativeSchema = z.object({ description: z.string() });
|
|
21
|
-
const TourLinkSchema = z.object({
|
|
22
|
-
id: z.string(),
|
|
23
|
-
url: z.string(),
|
|
24
|
-
provider: z.string()
|
|
25
|
-
});
|
|
26
|
-
const UnitFloorPlanRefSchema = z.object({
|
|
27
|
-
id: z.string(),
|
|
28
|
-
upload_id: z.string().optional(),
|
|
29
|
-
floor_label: z.string().nullable(),
|
|
30
|
-
position: z.number().int()
|
|
31
|
-
});
|
|
32
|
-
const UnitSchema = z.object({
|
|
33
|
-
unit_id: z.string(),
|
|
34
|
-
unit_label: z.string().nullable(),
|
|
35
|
-
beds: z.number().int(),
|
|
36
|
-
baths: z.number(),
|
|
37
|
-
sqft: z.number().int().nullable(),
|
|
38
|
-
price: z.string().max(40).nullable().default(null),
|
|
39
|
-
position: z.number().int(),
|
|
40
|
-
floor_plans: z.array(UnitFloorPlanRefSchema)
|
|
41
|
-
});
|
|
42
|
-
const PhotoSchema = z.object({
|
|
43
|
-
id: z.string(),
|
|
44
|
-
tags: z.array(z.string()),
|
|
45
|
-
caption: z.string().nullable()
|
|
46
|
-
});
|
|
47
|
-
const VideoSchema = z.object({
|
|
48
|
-
id: z.string(),
|
|
49
|
-
source: z.enum(["upload", "link"]),
|
|
50
|
-
tags: z.array(z.string()),
|
|
51
|
-
caption: z.string().nullable(),
|
|
52
|
-
description: z.string().nullable(),
|
|
53
|
-
duration_ms: z.number().int().nullable(),
|
|
54
|
-
url: z.string().nullable(),
|
|
55
|
-
provider: z.string().nullable()
|
|
56
|
-
});
|
|
57
|
-
const DocumentSchema = z.object({
|
|
58
|
-
id: z.string(),
|
|
59
|
-
filename: z.string(),
|
|
60
|
-
mime: z.string(),
|
|
61
|
-
notes: z.string()
|
|
62
|
-
});
|
|
63
|
-
const LinkMetadataCoreSchema = z.object({
|
|
64
|
-
via: z.enum([
|
|
65
|
-
"oembed",
|
|
66
|
-
"api",
|
|
67
|
-
"opengraph",
|
|
68
|
-
"none"
|
|
69
|
-
]).nullable(),
|
|
70
|
-
title: z.string().nullable(),
|
|
71
|
-
description: z.string().nullable(),
|
|
72
|
-
author_name: z.string().nullable(),
|
|
73
|
-
captured_at: z.string().nullable(),
|
|
74
|
-
duration_ms: z.number().int().nullable(),
|
|
75
|
-
thumbnail_source_url: z.string().nullable()
|
|
76
|
-
});
|
|
77
|
-
const FloorPlanUnitAssignmentSchema = z.object({
|
|
78
|
-
unit_label: z.string().nullable(),
|
|
79
|
-
floor_label: z.string().nullable(),
|
|
80
|
-
position: z.number().int()
|
|
81
|
-
});
|
|
82
|
-
const FloorPlanSchema = z.object({
|
|
83
|
-
id: z.string(),
|
|
84
|
-
upload_id: z.string().optional(),
|
|
85
|
-
page_index: z.number().int().optional(),
|
|
86
|
-
unit_assignments: z.array(FloorPlanUnitAssignmentSchema),
|
|
87
|
-
processed_s3_key: z.string().nullable()
|
|
88
|
-
});
|
|
89
|
-
const ContactCardSchema = z.object({
|
|
90
|
-
id: z.string(),
|
|
91
|
-
primary: z.boolean(),
|
|
92
|
-
name: z.string().nullable(),
|
|
93
|
-
title: z.string().nullable(),
|
|
94
|
-
org_name: z.string().nullable(),
|
|
95
|
-
bio: z.string().nullable(),
|
|
96
|
-
email: z.string().nullable(),
|
|
97
|
-
phone: z.string().nullable(),
|
|
98
|
-
address: z.string().nullable(),
|
|
99
|
-
website_url: z.string().nullable(),
|
|
100
|
-
avatar_upload_id: z.string().nullable(),
|
|
101
|
-
logo_dark_upload_id: z.string().nullable(),
|
|
102
|
-
logo_light_upload_id: z.string().nullable(),
|
|
103
|
-
instagram_url: z.string().nullable(),
|
|
104
|
-
linkedin_url: z.string().nullable(),
|
|
105
|
-
x_url: z.string().nullable(),
|
|
106
|
-
facebook_url: z.string().nullable()
|
|
107
|
-
});
|
|
108
|
-
const COMPARABLE_STATUSES = ["sold", "active"];
|
|
109
|
-
const ComparableStatusSchema = z.enum(COMPARABLE_STATUSES);
|
|
110
|
-
const COMPARABLE_PRICE_PERIODS = ["total", "monthly"];
|
|
111
|
-
const ComparablePricePeriodSchema = z.enum(COMPARABLE_PRICE_PERIODS);
|
|
112
|
-
const ComparableSchema = z.object({
|
|
113
|
-
id: z.string(),
|
|
114
|
-
address_street: z.string().nullable(),
|
|
115
|
-
address_city: z.string().nullable(),
|
|
116
|
-
address_state: z.string().nullable(),
|
|
117
|
-
address_postal: z.string().nullable(),
|
|
118
|
-
address: z.string(),
|
|
119
|
-
lat: z.number().nullable(),
|
|
120
|
-
lng: z.number().nullable(),
|
|
121
|
-
distance_m: z.number().nullable(),
|
|
122
|
-
status: ComparableStatusSchema.nullable(),
|
|
123
|
-
price: z.number().int().nullable(),
|
|
124
|
-
price_period: ComparablePricePeriodSchema,
|
|
125
|
-
sale_date: z.string().nullable(),
|
|
126
|
-
beds: z.number().int().nullable(),
|
|
127
|
-
baths: z.number().nullable(),
|
|
128
|
-
sqft: z.number().int().nullable(),
|
|
129
|
-
photo_upload_id: z.string().nullable(),
|
|
130
|
-
year_built: z.number().int().nullable(),
|
|
131
|
-
lot_sqft: z.number().int().nullable(),
|
|
132
|
-
stories: z.number().nullable(),
|
|
133
|
-
units: z.number().int().nullable(),
|
|
134
|
-
hoa_monthly: z.number().int().nullable(),
|
|
135
|
-
list_price: z.number().int().nullable(),
|
|
136
|
-
listed_date: z.string().nullable(),
|
|
137
|
-
mls_number: z.string().nullable(),
|
|
138
|
-
description: z.string().nullable(),
|
|
139
|
-
property_type: PropertyTypeSchema.nullable()
|
|
140
|
-
});
|
|
141
|
-
const PropertyFactsSchema = z.object({
|
|
142
|
-
address: AddressSchema,
|
|
143
|
-
lat: z.number().nullable(),
|
|
144
|
-
lon: z.number().nullable(),
|
|
145
|
-
property_type: PropertyTypeSchema,
|
|
146
|
-
listing_intent: ListingIntentSchema,
|
|
147
|
-
units: z.array(UnitSchema),
|
|
148
|
-
narrative: NarrativeSchema,
|
|
149
|
-
photos: z.array(PhotoSchema),
|
|
150
|
-
videos: z.array(VideoSchema),
|
|
151
|
-
floor_plans: z.array(FloorPlanSchema),
|
|
152
|
-
tours: z.array(TourLinkSchema),
|
|
153
|
-
document_notes: z.array(z.object({
|
|
154
|
-
upload_id: z.string(),
|
|
155
|
-
notes: z.string()
|
|
156
|
-
})),
|
|
157
|
-
documents: z.array(DocumentSchema),
|
|
158
|
-
contacts: z.array(ContactCardSchema),
|
|
159
|
-
comparables: z.array(ComparableSchema)
|
|
160
|
-
});
|
|
161
|
-
const PlannerUnitSchema = z.object({
|
|
162
|
-
label: z.string().nullable(),
|
|
163
|
-
beds: z.number().int(),
|
|
164
|
-
baths: z.number(),
|
|
165
|
-
sqft: z.number().int().nullable(),
|
|
166
|
-
price: z.string().nullable().default(null)
|
|
167
|
-
});
|
|
168
|
-
const PlannerViewSchema = z.object({
|
|
169
|
-
address: AddressSchema,
|
|
170
|
-
lat: z.number().nullable(),
|
|
171
|
-
lon: z.number().nullable(),
|
|
172
|
-
property_type: PropertyTypeSchema,
|
|
173
|
-
listing_intent: ListingIntentSchema,
|
|
174
|
-
units: z.array(PlannerUnitSchema),
|
|
175
|
-
narrative: NarrativeSchema,
|
|
176
|
-
document_notes: z.array(z.object({
|
|
177
|
-
upload_id: z.string(),
|
|
178
|
-
notes: z.string()
|
|
179
|
-
})),
|
|
180
|
-
photo_count: z.number().int(),
|
|
181
|
-
floor_plan_count: z.number().int(),
|
|
182
|
-
units_with_floor_plans_count: z.number().int(),
|
|
183
|
-
has_tour_3d: z.boolean(),
|
|
184
|
-
has_video: z.boolean(),
|
|
185
|
-
comparable_count: z.number().int()
|
|
186
|
-
});
|
|
187
|
-
|
|
188
|
-
//#endregion
|
|
189
|
-
export { VideoSchema as C, UnitSchema as S, PropertyFactsSchema as _, ComparableSchema as a, TourLinkSchema as b, DocumentSchema as c, ListingIntentSchema as f, PlannerUnitSchema as h, ComparablePricePeriodSchema as i, FloorPlanSchema as l, PhotoSchema as m, COMPARABLE_PRICE_PERIODS as n, ComparableStatusSchema as o, NarrativeSchema as p, COMPARABLE_STATUSES as r, ContactCardSchema as s, AddressSchema as t, FloorPlanUnitAssignmentSchema as u, PropertyTypeSchema as v, UnitFloorPlanRefSchema as x };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { originationFor } from "../../fill-vocabulary/dist/origination.js";
|
|
2
|
-
import { isListFill, plannedFieldsOf } from "./fill-spec-view.js";
|
|
3
|
-
|
|
4
|
-
//#region ../../internal/section-contracts/dist/choose-select-contract.js
|
|
5
|
-
function assertChooseSelectContract(schema, decision, sectionKey) {
|
|
6
|
-
if (!isListFill(decision)) return;
|
|
7
|
-
for (const slotId of decision.produces) {
|
|
8
|
-
const slot = schema.slots[slotId];
|
|
9
|
-
if (slot === void 0) continue;
|
|
10
|
-
const origination = originationFor(slot, plannedFieldsOf(decision));
|
|
11
|
-
if (origination?.kind !== "unkeyed-rows") continue;
|
|
12
|
-
const where = `Section "${sectionKey}": list fill "${decision.id}" originates rows of "${slotId}"`;
|
|
13
|
-
const declared = Object.keys(slot.fields ?? {});
|
|
14
|
-
if (origination.title !== void 0) throw new Error(`${where}, keyed by \`title: "${origination.title}"\` — ${origination.titleType === void 0 ? "which is not one of its declared fields" : `a \`${origination.titleType}\` field${origination.titleType === "select" ? " with no declared `values`" : ""}`}. Rows are keyed on a \`text\` field the model writes or a \`select({ options })\` field it picks from, so point \`title:\` at one of those.`);
|
|
15
|
-
throw new Error(`${where}, but declares neither a \`title:\` to key them by nor exactly one \`select\` field with \`options\` to fall back to (found ${origination.selects.length}; declared: ${declared.length > 0 ? declared.join(", ") : "none"}). Title the list by the field that names a row, give the row exactly one \`select({ label, options })\` field, or give every row field its own \`fill()\`.`);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
//#endregion
|
|
20
|
-
export { assertChooseSelectContract };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { originationFor } from "../../fill-vocabulary/dist/origination.js";
|
|
2
|
-
import { isListFill, plannedFieldsOf } from "./fill-spec-view.js";
|
|
3
|
-
|
|
4
|
-
//#region ../../internal/section-contracts/dist/name-title-contract.js
|
|
5
|
-
function assertNameTitleContract(schema, decision, sectionKey) {
|
|
6
|
-
if (!isListFill(decision)) return;
|
|
7
|
-
for (const slotId of decision.produces) {
|
|
8
|
-
const slot = schema.slots[slotId];
|
|
9
|
-
if (slot === void 0) continue;
|
|
10
|
-
const origination = originationFor(slot, plannedFieldsOf(decision));
|
|
11
|
-
if (origination?.kind !== "keyed-rows" || origination.keys !== "written") continue;
|
|
12
|
-
const key = origination.keyField;
|
|
13
|
-
const where = `Section "${sectionKey}": list fill "${decision.id}" writes each row of "${slotId}" into "${key}"`;
|
|
14
|
-
if (typeof (slot.fields?.[key])?.cap !== "number") throw new Error(`${where}, which declares no \`cap\` — a written name needs its character budget.`);
|
|
15
|
-
if (decision.fields?.[key] !== void 0) throw new Error(`${where}, which also carries its own fill — the written name is that field's value, so it takes none.`);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
//#endregion
|
|
20
|
-
export { assertNameTitleContract };
|