@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
package/dist/fixtures.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import "./asset-modules.js";
|
|
2
|
+
import { AddressValue } from "./packages/internal/template-contracts/dist/address-value.js";
|
|
2
3
|
import { PoiRow } from "./packages/internal/template-contracts/dist/poi-row.js";
|
|
3
|
-
import { AuthorImage } from "./
|
|
4
|
-
import { SlotValue } from "./
|
|
4
|
+
import { AuthorImage } from "./packages/internal/template-contracts/dist/runtime-values.js";
|
|
5
|
+
import { SlotValue } from "./packages/internal/template-contracts/dist/slot-value.js";
|
|
6
|
+
import { RegistryFacts } from "./packages/internal/template-contracts/dist/registry-facts.js";
|
|
7
|
+
import "./schema/section-props.js";
|
|
5
8
|
import { FIXTURE } from "./fixtures/brand.js";
|
|
6
|
-
import { CanonicalProperty } from "./fixtures/canonical.js";
|
|
7
9
|
//#region src/fixtures/index.d.ts
|
|
8
10
|
/**
|
|
9
11
|
* What an imported media file resolves to. A raster image import (`.jpg`, `.png`,
|
|
@@ -12,48 +14,56 @@ import { CanonicalProperty } from "./fixtures/canonical.js";
|
|
|
12
14
|
* `dev` and hash into the artifact in `build`.
|
|
13
15
|
*/
|
|
14
16
|
type MediaFile = AuthorImage | string;
|
|
15
|
-
type
|
|
16
|
-
type
|
|
17
|
-
type
|
|
18
|
-
type
|
|
19
|
-
type
|
|
20
|
-
type
|
|
21
|
-
type CanonicalComparable = Canonical["comparables"][number];
|
|
22
|
-
/** A photo of the property: the canonical photo row with its file imported. */
|
|
23
|
-
type PhotoEntry = CanonicalPhoto & {
|
|
24
|
-
readonly file: MediaFile;
|
|
25
|
-
};
|
|
17
|
+
type Facts = RegistryFacts;
|
|
18
|
+
type FactsUnit = Facts["units"][number];
|
|
19
|
+
type FactsUnitFloorPlan = FactsUnit["floor_plans"][number];
|
|
20
|
+
type FactsContact = Facts["contacts"][number];
|
|
21
|
+
type FactsComparable = Facts["comparables"][number];
|
|
22
|
+
type FactsCommercialSpace = Facts["commercial_spaces"][number];
|
|
26
23
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
24
|
+
* An address as a property states it: its parts and its pin. `unit` (address line 2)
|
|
25
|
+
* and `source` may be left out.
|
|
29
26
|
*/
|
|
30
|
-
type
|
|
31
|
-
readonly file: MediaFile;
|
|
32
|
-
};
|
|
27
|
+
type AddressEntry = Omit<AddressValue, "unit" | "source"> & Partial<Pick<AddressValue, "unit" | "source">>;
|
|
33
28
|
/**
|
|
34
|
-
* The
|
|
35
|
-
*
|
|
36
|
-
*/
|
|
37
|
-
type CollectedComparableMember = "year_built" | "lot_sqft" | "stories" | "units" | "hoa_monthly" | "list_price" | "listed_date" | "mls_number" | "description" | "property_type";
|
|
38
|
-
/**
|
|
39
|
-
* A comparable property: the canonical row, with the listing-record members optional
|
|
40
|
-
* and its photo imported in place of the upload reference.
|
|
41
|
-
*
|
|
42
|
-
* The listing-record members are the part of a comp a user or a document fills only
|
|
43
|
-
* sometimes, so a fixture that cares about an age or an asking price states it and a
|
|
44
|
-
* fixture that does not says nothing. An omitted member loads as `null`, which is
|
|
45
|
-
* exactly what a real bake carries for a comp whose record was never filled in.
|
|
29
|
+
* The identity every upload carries — the id a content entry and a content doc name it
|
|
30
|
+
* by — and what the platform learned of it.
|
|
46
31
|
*/
|
|
47
|
-
|
|
32
|
+
interface UploadIdentity {
|
|
33
|
+
readonly id: string;
|
|
48
34
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
35
|
+
* What the platform learned of the upload: plain statements, one fact each, of what it
|
|
36
|
+
* is and how it was made, what it shows, every word printed on it and how it looks,
|
|
37
|
+
* written for a reader who cannot see it. Fills judge from it; nothing displays it.
|
|
38
|
+
* Absent or `null`, the platform has not looked at the upload.
|
|
52
39
|
*/
|
|
53
|
-
readonly
|
|
40
|
+
readonly account?: string | null;
|
|
41
|
+
}
|
|
42
|
+
/** What a video measures, hosted or linked. */
|
|
43
|
+
interface VideoMeasure {
|
|
44
|
+
readonly kind: "video";
|
|
45
|
+
/** Its running time; `null` means unknown, never short. */
|
|
46
|
+
readonly duration_ms: number | null;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* A photo of the property, its file imported. What shows the property is what the
|
|
50
|
+
* property's `property_media` lists.
|
|
51
|
+
*/
|
|
52
|
+
type PhotoEntry = UploadIdentity & {
|
|
53
|
+
readonly kind: "image";
|
|
54
|
+
readonly file: MediaFile;
|
|
54
55
|
};
|
|
55
|
-
/**
|
|
56
|
-
|
|
56
|
+
/**
|
|
57
|
+
* A floor plan, its file imported. That it is a plan is the property's `floor_plans`
|
|
58
|
+
* listing it; which units hold it, and on which floor, is stated on each unit
|
|
59
|
+
* (`units[].floor_plans`), never on the plan.
|
|
60
|
+
*/
|
|
61
|
+
type FloorPlanEntry = UploadIdentity & {
|
|
62
|
+
readonly kind: "image";
|
|
63
|
+
readonly file: MediaFile;
|
|
64
|
+
};
|
|
65
|
+
/** A hosted video, its file imported. */
|
|
66
|
+
type UploadVideoEntry = UploadIdentity & VideoMeasure & {
|
|
57
67
|
readonly source: "upload";
|
|
58
68
|
readonly file: MediaFile;
|
|
59
69
|
/**
|
|
@@ -63,18 +73,25 @@ type UploadVideoEntry = Omit<CanonicalVideo, "source" | "url" | "provider"> & {
|
|
|
63
73
|
readonly poster?: MediaFile;
|
|
64
74
|
};
|
|
65
75
|
/** A pasted provider link. Stays a URL, exactly as the platform stores it. */
|
|
66
|
-
type LinkVideoEntry =
|
|
76
|
+
type LinkVideoEntry = UploadIdentity & VideoMeasure & {
|
|
67
77
|
readonly source: "link";
|
|
78
|
+
readonly url: string | null;
|
|
79
|
+
/** The link provider that claims `url`. */
|
|
80
|
+
readonly provider: string | null;
|
|
68
81
|
/**
|
|
69
82
|
* The provider thumbnail the platform's link enrichment records, served as the
|
|
70
83
|
* video's poster. It stays a link: the fixture never hosts it. Absent means no poster.
|
|
71
84
|
*/
|
|
72
85
|
readonly thumbnail_source_url?: string;
|
|
73
86
|
};
|
|
74
|
-
/** One video
|
|
87
|
+
/** One video — a hosted upload or a pasted provider link. */
|
|
75
88
|
type VideoEntry = UploadVideoEntry | LinkVideoEntry;
|
|
76
89
|
/** One 3D tour link. Stays a URL, exactly as the platform stores it. */
|
|
77
|
-
type TourEntry =
|
|
90
|
+
type TourEntry = UploadIdentity & {
|
|
91
|
+
readonly kind: "tour";
|
|
92
|
+
readonly url: string;
|
|
93
|
+
/** The link provider that claims `url`. */
|
|
94
|
+
readonly provider: string;
|
|
78
95
|
/**
|
|
79
96
|
* The provider thumbnail the platform's link enrichment records, served as the
|
|
80
97
|
* tour's poster. It stays a link. Absent means no poster, as for a private tour.
|
|
@@ -82,35 +99,136 @@ type TourEntry = Canonical["tours"][number] & {
|
|
|
82
99
|
readonly thumbnail_source_url?: string;
|
|
83
100
|
};
|
|
84
101
|
/**
|
|
85
|
-
* An attachable document
|
|
86
|
-
*
|
|
102
|
+
* An attachable document, its file imported — its display name and type come off the
|
|
103
|
+
* file.
|
|
87
104
|
*/
|
|
88
|
-
type DocumentEntry =
|
|
105
|
+
type DocumentEntry = UploadIdentity & {
|
|
106
|
+
readonly kind: "document";
|
|
89
107
|
readonly file: MediaFile;
|
|
108
|
+
/**
|
|
109
|
+
* The first page's preview the platform renders from a PDF, imported like any image
|
|
110
|
+
* and served with its ladder — what `Slot.Image` draws over a document slot. Absent
|
|
111
|
+
* means the document resolves with no preview.
|
|
112
|
+
*/
|
|
113
|
+
readonly preview?: MediaFile;
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* One upload of the property. The platform keeps every upload in one list, in the order
|
|
117
|
+
* the user added them; its photos, floor plans, videos, tours and documents are that
|
|
118
|
+
* list read by kind, each in this order.
|
|
119
|
+
*/
|
|
120
|
+
type UploadEntry = PhotoEntry | FloorPlanEntry | VideoEntry | TourEntry | DocumentEntry;
|
|
121
|
+
/**
|
|
122
|
+
* An upload that shows the property — a photo, a video or a tour — as the property's
|
|
123
|
+
* `property_media` lists it: an entry of its `uploads`, by value.
|
|
124
|
+
*/
|
|
125
|
+
type MediaEntry = PhotoEntry | FloorPlanEntry | VideoEntry | TourEntry;
|
|
126
|
+
/**
|
|
127
|
+
* An upload that sets out the property's specifics — a document, or an image or video
|
|
128
|
+
* made to record its figures, terms or plans — as the property's `property_documents`
|
|
129
|
+
* lists it: an entry of its `uploads`, by value.
|
|
130
|
+
*/
|
|
131
|
+
type InformationEntry = PhotoEntry | FloorPlanEntry | VideoEntry | DocumentEntry;
|
|
132
|
+
/**
|
|
133
|
+
* A floor plan a unit holds: the plan, picked by value from the property's
|
|
134
|
+
* `floor_plans`, and the floor it draws. A unit holds a plan once, so the plan's id is
|
|
135
|
+
* the item's.
|
|
136
|
+
*/
|
|
137
|
+
type UnitFloorPlanEntry = Omit<FactsUnitFloorPlan, "id" | "image"> & {
|
|
138
|
+
readonly image: FloorPlanEntry;
|
|
139
|
+
};
|
|
140
|
+
/** A unit's members a fixture states only when it has them: each omitted one loads as unanswered (`null`, or an empty list). */
|
|
141
|
+
type UnitOptionalMember = "floor" | "hoa_monthly" | "parking" | "lot_sqft" | "amenities";
|
|
142
|
+
/**
|
|
143
|
+
* One unit: the platform's unit with its floor plans picked by value from the property's
|
|
144
|
+
* `floor_plans`, and its photos from its `property_media`. Its floor, HOA fees, parking,
|
|
145
|
+
* lot size, amenities and photos are stated only by a fixture that has them.
|
|
146
|
+
*/
|
|
147
|
+
type UnitEntry = Omit<FactsUnit, "floor_plans" | "photos" | UnitOptionalMember> & Partial<Pick<FactsUnit, UnitOptionalMember>> & {
|
|
148
|
+
readonly floor_plans: UnitFloorPlanEntry[];
|
|
149
|
+
readonly photos?: PhotoEntry[];
|
|
150
|
+
};
|
|
151
|
+
/** A commercial space's members a fixture states only when it has them: each omitted one loads as unanswered (`null`, or an empty list). */
|
|
152
|
+
type CommercialSpaceOptionalMember = "use" | "sqft" | "price" | "floor" | "parking" | "amenities";
|
|
153
|
+
/**
|
|
154
|
+
* One commercial space of a mixed-use building, written as a unit is: its floor plans
|
|
155
|
+
* picked by value from the property's `floor_plans` and its photos from its
|
|
156
|
+
* `property_media`. Every member but its `label` is stated only by a fixture that has it.
|
|
157
|
+
*/
|
|
158
|
+
type CommercialSpaceEntry = Omit<FactsCommercialSpace, "floor_plans" | "photos" | CommercialSpaceOptionalMember> & Partial<Pick<FactsCommercialSpace, CommercialSpaceOptionalMember>> & {
|
|
159
|
+
readonly floor_plans: UnitFloorPlanEntry[];
|
|
160
|
+
readonly photos?: PhotoEntry[];
|
|
90
161
|
};
|
|
91
|
-
/**
|
|
92
|
-
type
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
162
|
+
/** The images a contact card OWNS: each belongs to its field, in no pool. */
|
|
163
|
+
type ContactImageField = "headshot" | "logo_dark" | "logo_light";
|
|
164
|
+
/**
|
|
165
|
+
* A contact card: the platform's contact with its headshot and logos imported (each, or
|
|
166
|
+
* `null`), and its address stated as parts and a pin — `null` when the card names none.
|
|
167
|
+
*/
|
|
168
|
+
type ContactEntry = Omit<FactsContact, ContactImageField | "address"> & { readonly [F in ContactImageField]: MediaFile | null; } & {
|
|
169
|
+
readonly address: AddressEntry | null;
|
|
96
170
|
};
|
|
171
|
+
/** The members of a comparable the platform derives — its standing, its distance and its price's period. Never stated. */
|
|
172
|
+
type DerivedComparableMember = "status" | "distance_m" | "price_period";
|
|
97
173
|
/**
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
|
|
101
|
-
|
|
174
|
+
* The members of a comparable's listing record — everything beyond the address, the
|
|
175
|
+
* pin and the figures a comps table prints.
|
|
176
|
+
*/
|
|
177
|
+
type CollectedComparableMember = "year_built" | "lot_sqft" | "stories" | "units" | "hoa_monthly" | "list_price" | "listed_date" | "mls_number" | "description";
|
|
178
|
+
/**
|
|
179
|
+
* A comparable property: the platform's comparable with the listing-record members
|
|
180
|
+
* optional, its address stated as parts and its photo imported.
|
|
102
181
|
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
182
|
+
* The listing-record members are the part of a comp a user or a document fills only
|
|
183
|
+
* sometimes, so a fixture that cares about an age or an asking price states it and a
|
|
184
|
+
* fixture that does not says nothing. An omitted member loads as `null`, which is
|
|
185
|
+
* exactly what a real bake carries for a comp whose record was never filled in. Its
|
|
186
|
+
* `status` (sold when it has a sale date), `distance_m` (from the subject's pin) and
|
|
187
|
+
* `price_period` (from the subject's listing intent) are derived, never stated.
|
|
105
188
|
*/
|
|
106
|
-
type
|
|
107
|
-
readonly
|
|
108
|
-
|
|
189
|
+
type ComparableEntry = Omit<FactsComparable, DerivedComparableMember | CollectedComparableMember | "address" | "photo"> & Partial<Pick<FactsComparable, CollectedComparableMember>> & {
|
|
190
|
+
readonly address: AddressEntry;
|
|
191
|
+
/**
|
|
192
|
+
* The comp's photo, which the comp OWNS: the loader mints its id and registers the
|
|
193
|
+
* file as image media. Absent or `null` means the comp has no photo.
|
|
194
|
+
*/
|
|
195
|
+
readonly photo?: MediaFile | null;
|
|
196
|
+
};
|
|
197
|
+
interface AuthoredMembers {
|
|
198
|
+
readonly address: AddressEntry;
|
|
199
|
+
readonly uploads: UploadEntry[];
|
|
200
|
+
readonly property_media: MediaEntry[];
|
|
109
201
|
readonly floor_plans: FloorPlanEntry[];
|
|
110
|
-
readonly
|
|
111
|
-
readonly
|
|
112
|
-
readonly documents: DocumentEntry[];
|
|
202
|
+
readonly units: UnitEntry[];
|
|
203
|
+
readonly commercial_spaces: CommercialSpaceEntry[];
|
|
113
204
|
readonly contacts: ContactEntry[];
|
|
205
|
+
readonly comparables: ComparableEntry[];
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* A property as a user might upload it: the platform's own facts document, member for
|
|
209
|
+
* member, with one substitution — a media value is an imported file, or an entry of the
|
|
210
|
+
* property that carries one. What the platform derives (an address's display line, a
|
|
211
|
+
* comparable's distance) is derived, never stated. Plain data, validated with the
|
|
212
|
+
* platform schema when loaded; there is no builder and no derivation API, so a variation
|
|
213
|
+
* is a second property written beside the first.
|
|
214
|
+
*
|
|
215
|
+
* Facts only. Unit copy, points of interest, amenities and any other fill output are
|
|
216
|
+
* not on a property; a fixture states them in its content entries. The sorted lists
|
|
217
|
+
* are stated as the platform has sorted the uploads: `property_media` the photos, videos and
|
|
218
|
+
* tours that show the property, `floor_plans` its plans, and `property_documents` what
|
|
219
|
+
* sets out its specifics (absent, it holds none) — each an entry of `uploads`, by value,
|
|
220
|
+
* in the list's order. One upload may be in several, or in none.
|
|
221
|
+
* Its cover photo, `hero`, is an image of its `property_media`, by value; absent or `null`, the
|
|
222
|
+
* property has none. Its website address, `site_url`, is the full address its site publishes
|
|
223
|
+
* at (`"https://maple-court.example.com"`); absent or `null`, the property has no website.
|
|
224
|
+
* Its `commercial_spaces`, a mixed-use building's, are stated only by a property that has
|
|
225
|
+
* them.
|
|
226
|
+
*/
|
|
227
|
+
type Property = { readonly [K in Exclude<keyof Facts, "files" | "hero" | "property_documents" | "site_url" | "commercial_spaces">]: K extends keyof AuthoredMembers ? AuthoredMembers[K] : Facts[K]; } & {
|
|
228
|
+
readonly hero?: PhotoEntry | FloorPlanEntry | null;
|
|
229
|
+
readonly property_documents?: InformationEntry[];
|
|
230
|
+
readonly site_url?: string | null;
|
|
231
|
+
readonly commercial_spaces?: CommercialSpaceEntry[];
|
|
114
232
|
};
|
|
115
233
|
/**
|
|
116
234
|
* What `content(Section, …)` is typed against: a section value's identity. A value
|
|
@@ -172,19 +290,32 @@ type SlotsOf<S> = S extends {
|
|
|
172
290
|
};
|
|
173
291
|
} ? Slots : never;
|
|
174
292
|
/**
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
* row carries the editor-stamped one.
|
|
293
|
+
* Whether a content entry may state a slot: a list, a row or an object always; a field
|
|
294
|
+
* bound to the element of the item it sits in (the element a filled list's fixture
|
|
295
|
+
* states); and any value slot no fact, member or compute sources.
|
|
179
296
|
*/
|
|
180
|
-
type
|
|
297
|
+
type Statable<S> = S extends {
|
|
298
|
+
type: "list" | "row" | "object";
|
|
299
|
+
} ? true : S extends {
|
|
300
|
+
source: {
|
|
301
|
+
kind: "element";
|
|
302
|
+
};
|
|
303
|
+
} ? true : S extends {
|
|
304
|
+
source: unknown;
|
|
305
|
+
} ? false : true;
|
|
306
|
+
/** The fields of an object a content entry may state, each optional. */
|
|
307
|
+
type ContentFields<F> = { readonly [K in keyof F as Statable<F[K]> extends true ? K : never]?: ContentSlotValue<F[K]> | null; };
|
|
308
|
+
/**
|
|
309
|
+
* One item of a list of objects as a content entry states it: every statable field
|
|
310
|
+
* optional, since an entry states only what an item sets and the resolver fills the rest
|
|
311
|
+
* with each field's blank. `id` rides along because every persisted item carries one.
|
|
312
|
+
*/
|
|
313
|
+
type ContentItem<F> = {
|
|
181
314
|
readonly id?: string;
|
|
182
|
-
} &
|
|
183
|
-
/** Which of a contact card's three images a {@link ContactImageEntry} names. */
|
|
184
|
-
type ContactImageField = "avatar" | "logo_dark" | "logo_light";
|
|
315
|
+
} & ContentFields<F>;
|
|
185
316
|
/**
|
|
186
317
|
* One of a contact's images, stated as the card of the fixture's property plus the field:
|
|
187
|
-
* `{ contact: listingAgent, field: "logo_dark" }`. A contact's
|
|
318
|
+
* `{ contact: listingAgent, field: "logo_dark" }`. A contact's headshot and logos are image
|
|
188
319
|
* media like any other, but the platform holds them on the card rather than in a pool, so
|
|
189
320
|
* they have no entry of their own to state — this names the same image the resolver
|
|
190
321
|
* registers, and it resolves to the `{ asset_id }` the platform bakes for that field. A contact the property does not carry, or a field it holds `null`, is a check
|
|
@@ -194,20 +325,6 @@ interface ContactImageEntry {
|
|
|
194
325
|
readonly contact: ContactEntry;
|
|
195
326
|
readonly field: ContactImageField;
|
|
196
327
|
}
|
|
197
|
-
/**
|
|
198
|
-
* The fields of a record list a content entry may state: the ones carrying no `source:`
|
|
199
|
-
* of their own.
|
|
200
|
-
*
|
|
201
|
-
* @remarks
|
|
202
|
-
* On an unbound list every field qualifies, so this is the identity — a per-field
|
|
203
|
-
* source is only legal on a fact-bound list at all (`assertSourceContract`). On a
|
|
204
|
-
* COLLECTION-bound list it is the enriched half: the fields a `list-fill` writes onto
|
|
205
|
-
* rows the facts originate, which is exactly what a fixture states there
|
|
206
|
-
* ({@link ContentSlots}).
|
|
207
|
-
*/
|
|
208
|
-
type RowFillFields<I> = { [K in keyof I as I[K] extends {
|
|
209
|
-
source: unknown;
|
|
210
|
-
} ? never : K]: I[K]; };
|
|
211
328
|
/**
|
|
212
329
|
* An entry a content doc may state on an `image` slot: every property entry the resolver
|
|
213
330
|
* registers as image media — a photo, a floor plan, or one of a contact's images.
|
|
@@ -215,9 +332,9 @@ type RowFillFields<I> = { [K in keyof I as I[K] extends {
|
|
|
215
332
|
type ImageEntry = PhotoEntry | FloorPlanEntry | ContactImageEntry;
|
|
216
333
|
/**
|
|
217
334
|
* The value one slot takes in a content entry: a media slot takes an entry of the
|
|
218
|
-
* fixture's property, a list of them an array, a
|
|
219
|
-
*
|
|
220
|
-
* runtime value unchanged.
|
|
335
|
+
* fixture's property, a list of them an array, a row the identity of the row it holds, an
|
|
336
|
+
* object its fields, a list of objects its items, a points-of-interest slot the rows a
|
|
337
|
+
* curation would produce, and every other kind its runtime value unchanged.
|
|
221
338
|
*/
|
|
222
339
|
type ContentSlotValue<S> = S extends {
|
|
223
340
|
type: "image";
|
|
@@ -228,35 +345,42 @@ type ContentSlotValue<S> = S extends {
|
|
|
228
345
|
} ? TourEntry : S extends {
|
|
229
346
|
type: "document";
|
|
230
347
|
} ? DocumentEntry : S extends {
|
|
348
|
+
type: "media";
|
|
349
|
+
} ? ImageEntry | VideoEntry | TourEntry | DocumentEntry : S extends {
|
|
231
350
|
type: "poi";
|
|
232
351
|
} ? PoiRow : S extends {
|
|
352
|
+
type: "row";
|
|
353
|
+
} ? string : S extends {
|
|
354
|
+
type: "object";
|
|
355
|
+
fields: infer F;
|
|
356
|
+
} ? ContentFields<F> : S extends {
|
|
357
|
+
type: "list";
|
|
358
|
+
element: {
|
|
359
|
+
type: "object";
|
|
360
|
+
fields: infer F;
|
|
361
|
+
};
|
|
362
|
+
} ? readonly ContentItem<F>[] : S extends {
|
|
233
363
|
type: "list";
|
|
234
|
-
|
|
235
|
-
|
|
364
|
+
element: {
|
|
365
|
+
type: "row";
|
|
366
|
+
};
|
|
367
|
+
} ? readonly string[] : S extends {
|
|
236
368
|
type: "list";
|
|
237
369
|
element: infer E;
|
|
238
370
|
} ? readonly NonNullable<ContentSlotValue<E>>[] : SlotValue<S>;
|
|
239
371
|
/**
|
|
240
|
-
* The slots a content entry may state: every declared slot
|
|
241
|
-
*
|
|
242
|
-
* list bound to a collection.
|
|
372
|
+
* The slots a content entry may state: every declared slot but a value slot a fact, a
|
|
373
|
+
* row's member or a `compute()` sources, each optional.
|
|
243
374
|
*
|
|
244
375
|
* @remarks
|
|
245
376
|
* A fact-bound or computed slot resolves from the property and is never stated, so
|
|
246
|
-
* naming one is a compile error. A
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
*
|
|
251
|
-
* nothing else — {@link RowFillFields} drops the baked fields from the row type, and
|
|
252
|
-
* the resolver merges what is stated onto the baked rows by position.
|
|
377
|
+
* naming one is a compile error. A list sourced by a table is the platform's own shape
|
|
378
|
+
* rather than a loophole: the fill takes its items from the table and writes the fields
|
|
379
|
+
* that carry no `source:` onto them in one batched call, merging both halves into each
|
|
380
|
+
* stored item. A fixture states that half, item by item in the table's own order, and
|
|
381
|
+
* the resolver merges it onto the table's rows by position.
|
|
253
382
|
*/
|
|
254
|
-
type ContentSlots<Slots> = { readonly [K in keyof Slots as Slots[K] extends
|
|
255
|
-
source: unknown;
|
|
256
|
-
} ? Slots[K] extends {
|
|
257
|
-
type: "list";
|
|
258
|
-
fields: unknown;
|
|
259
|
-
} ? K : never : K]?: ContentSlotValue<Slots[K]> | null; };
|
|
383
|
+
type ContentSlots<Slots> = { readonly [K in keyof Slots as Statable<Slots[K]> extends true ? K : never]?: ContentSlotValue<Slots[K]> | null; };
|
|
260
384
|
type VariantOf<S> = S extends {
|
|
261
385
|
readonly schema: {
|
|
262
386
|
readonly meta: infer Meta;
|
|
@@ -288,9 +412,10 @@ type ExactContent<M, Allowed> = M & Allowed & { [K in Exclude<keyof M, keyof All
|
|
|
288
412
|
* State the content a fill would generate for one placed instance of a section: its
|
|
289
413
|
* generative slots and its display state, typed by the section value. A fact-bound or
|
|
290
414
|
* computed slot is never stated here — derived information is taken from the property —
|
|
291
|
-
* with one exception in the platform's own image: a
|
|
292
|
-
*
|
|
293
|
-
*
|
|
415
|
+
* with one exception in the platform's own image: a list sourced by a table takes the
|
|
416
|
+
* fields of each item a fill writes, stated item by item in the property's own order,
|
|
417
|
+
* while the fields its row binds stay the property's. A row states the identity of the
|
|
418
|
+
* row it holds — the user's re-pick.
|
|
294
419
|
* Media is stated by value, as an entry of the fixture's property (`hero_image:
|
|
295
420
|
* deckShot`), of the slot's own kind; an entry the property does not carry is a check
|
|
296
421
|
* error. A contact's image, which has no entry, is stated as the card plus the field
|
|
@@ -301,4 +426,4 @@ declare function content<S extends SectionRef, M extends object>(section: S, val
|
|
|
301
426
|
readonly instance?: string;
|
|
302
427
|
}): ContentEntry<S>;
|
|
303
428
|
//#endregion
|
|
304
|
-
export { ComparableEntry, ContactEntry, ContactImageEntry, ContactImageField, ContentDisplay, ContentEntry,
|
|
429
|
+
export { AddressEntry, CommercialSpaceEntry, ComparableEntry, ContactEntry, ContactImageEntry, ContactImageField, ContentDisplay, ContentEntry, ContentFields, ContentItem, ContentSlotValue, ContentSlots, ContentValues, ContentValuesOf, DocumentEntry, ExactContent, Fixture, FixtureSpec, FloorPlanEntry, ImageEntry, InformationEntry, LinkVideoEntry, MediaEntry, MediaFile, PhotoEntry, Property, SectionRef, TourEntry, UnitEntry, UnitFloorPlanEntry, UploadEntry, UploadVideoEntry, VideoEntry, content, defineFixture };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,24 +1,33 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ATTR_ISLAND_KEY, ISLAND_CAPTURE_HOLDS_GLOBAL } from "./packages/internal/capture-settle/dist/island-markers.js";
|
|
2
|
+
import { ATTR_ISLAND_FRAMELESS, ATTR_ISLAND_ID, ATTR_ISLAND_PROPS, EDITOR_BRIDGE_PROP, EDITOR_BRIDGE_PROTOCOL, EditorBridge, EditorBridgeSelection, EditorSelection, ISLAND_ELEMENT, IslandComponent, IslandEditor, IslandEditorOptions, IslandModule, IslandProps, IslandPropsError, IslandServerFrame, deserializeIslandProps, islandId, serializeIslandProps } from "./packages/internal/island-runtime/dist/contract.js";
|
|
2
3
|
import "./asset-modules.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { SlotRef } from "./schema/slot-ref.js";
|
|
6
|
-
import { ComputeBinding, compute } from "./schema/compute.js";
|
|
7
|
-
import { ResponsiveImage, ResponsiveSource } from "./packages/internal/image-descriptor/dist/index.js";
|
|
8
|
-
import { VideoCollectionValue, VideoValue } from "./packages/internal/template-contracts/dist/video-value.js";
|
|
9
|
-
import { TourCollectionValue, TourValue } from "./packages/internal/template-contracts/dist/tour-value.js";
|
|
4
|
+
import { AddressValue } from "./packages/internal/template-contracts/dist/address-value.js";
|
|
5
|
+
import { ResponsiveImage, ResponsiveSource } from "./packages/internal/template-contracts/dist/responsive-image.js";
|
|
10
6
|
import { DocumentCollectionValue, DocumentValue } from "./packages/internal/template-contracts/dist/document-value.js";
|
|
7
|
+
import { TourCollectionValue, TourValue } from "./packages/internal/template-contracts/dist/tour-value.js";
|
|
8
|
+
import { VideoCollectionValue, VideoValue } from "./packages/internal/template-contracts/dist/video-value.js";
|
|
11
9
|
import { PoiPhoto, PoiRow } from "./packages/internal/template-contracts/dist/poi-row.js";
|
|
10
|
+
import { AuthorImage, ImageCollectionValue, ImageValue, MediaValue, PlaybackConfig } from "./packages/internal/template-contracts/dist/runtime-values.js";
|
|
11
|
+
import { ComputeBinding, compute } from "./packages/internal/template-contracts/dist/compute.js";
|
|
12
|
+
import { AddressMembers, ElementOf, RowId, TableRow } from "./packages/internal/template-contracts/dist/row-ref.js";
|
|
13
|
+
import { ItemIdentity, ObjectValue, SlotValue } from "./packages/internal/template-contracts/dist/slot-value.js";
|
|
14
|
+
import { AddressSlot, DateSlot, DocumentSlot, EmailSlot, ImageSlot, ListItemSlot, ListSlot, MediaSlot, NumberSlot, ObjectFieldSlot, ObjectSlot, PhoneSlot, PoiSlot, RowSlot, SelectSlot, TextSlot, TourSlot, UrlSlot, ValueSlot, VideoSlot } from "./packages/internal/template-contracts/dist/slot-types.js";
|
|
15
|
+
import { ElementRef, RowRef, SlotRef } from "./packages/internal/template-contracts/dist/slot-ref.js";
|
|
16
|
+
import { FillBinding, FillVerb, FindFill, FindInput, PickFill, PickInput, WriteFill, WriteInput, fill } from "./packages/internal/template-contracts/dist/fill-builders.js";
|
|
17
|
+
import { IconName } from "./packages/internal/template-contracts/dist/icon-names.js";
|
|
18
|
+
import { AutocropInput, AutocropProcess, CutoutProcess, HolderProcess, holderProcess } from "./packages/internal/template-contracts/dist/process-builders.js";
|
|
19
|
+
import { AddressSlotDef, CropConfig, DateSlotDef, DisplayEntryInput, DisplayFill, DocumentSlotDef, EmailSlotDef, ImageSlotDef, MediaSlotDef, NumberSlotDef, PhoneSlotDef, PoiSlotDef, SelectOptionInput, SelectOptionObject, SelectSlotDef, SlotSource, TextSlotDef, TourSlotDef, UrlSlotDef, VideoSlotDef, address, date, document, email, image, media, number, phone, poi, select, text, tour, url, video } from "./packages/internal/template-contracts/dist/slot-builders.js";
|
|
20
|
+
import { ObjectLabelField, ObjectLabelSource, ObjectSlotDef, object } from "./packages/internal/template-contracts/dist/object.js";
|
|
21
|
+
import { RowFill, RowSlotDef, RowSourceInput, TableSource, row } from "./packages/internal/template-contracts/dist/row.js";
|
|
22
|
+
import { ListFill, ListSlotDef, ListSourceInput, list } from "./packages/internal/template-contracts/dist/list.js";
|
|
23
|
+
import { DocumentMedia, ImageMedia, Media, TourMedia, VideoMedia } from "./packages/internal/template-contracts/dist/registry-facts.js";
|
|
12
24
|
import { ComparableRow, Coordinates, Narrative } from "./schema/property-facts.js";
|
|
13
|
-
import { AuthorImage, ImageCollectionValue, ImageValue, PlaybackConfig } from "./schema/runtime-values.js";
|
|
14
25
|
import "./schema/section-schema.js";
|
|
15
|
-
import { RowValue, SlotValue } from "./schema/section-props.js";
|
|
16
26
|
import { UseEditorResult, useEditor } from "./packages/internal/island-runtime/dist/use-editor.js";
|
|
17
27
|
import { useCaptureReady } from "./packages/internal/island-runtime/dist/use-capture-ready.js";
|
|
18
28
|
import { useIslandId } from "./packages/internal/island-runtime/dist/use-island-id.js";
|
|
19
29
|
import { IslandMarker, IslandMarkerProps } from "./islands/marker.js";
|
|
20
|
-
import { BoundSlotValue, FieldBinding, ItemBinding,
|
|
21
|
-
import { CropConfig, DisplayEntryInput, DisplayFill, DocumentSlotDef, ImageSlotDef, ListRecordSlotDef, ListSlotDef, NumberSlotDef, PoiSlotDef, SelectSlotDef, SlotSource, TextSlotDef, TourSlotDef, UrlSlotDef, VideoSlotDef, document, image, list, number, poi, select, text, tour, url, video } from "./schema/slot-builders.js";
|
|
30
|
+
import { BoundSlotValue, FieldBinding, FieldBindings, ItemBinding, ObjectBinding, SlotBinding, SlotBindingMap, bindItems } from "./primitives/slot-bindings.js";
|
|
22
31
|
import { SectionOptions } from "./section/declare.js";
|
|
23
32
|
import { SectionContractProps, SectionPlacementProps, SectionRenderBindings, SectionValue, section } from "./section/section.js";
|
|
24
33
|
import { DocumentFormat, FormatIdentity, ImageFormat, PhysicalLength } from "./packages/internal/format-geometry/dist/format.js";
|
|
@@ -28,15 +37,15 @@ import { FrameShell } from "./primitives/FrameShell.js";
|
|
|
28
37
|
import { Image } from "./primitives/Image.js";
|
|
29
38
|
import { PicturePlan, PictureSourceSpec } from "./primitives/picture-sources.js";
|
|
30
39
|
import { Section } from "./primitives/Section.js";
|
|
31
|
-
import { SlotGroup } from "./primitives/slot-group.js";
|
|
32
40
|
import { ValueBinding } from "./primitives/slot-scalar.js";
|
|
33
41
|
import { Tour } from "./primitives/Tour.js";
|
|
34
42
|
import { Video } from "./primitives/Video.js";
|
|
35
43
|
import { Slot } from "./primitives/slot.js";
|
|
36
44
|
import "./primitives/index.js";
|
|
37
45
|
import { ATTR_SECTION_INSTANCE_ID, ATTR_SLOT_FIELD, ATTR_SLOT_GROUP, ATTR_SLOT_ID, ATTR_SLOT_ITEM, ATTR_SLOT_TEXT_LEAF, ATTR_SLOT_UNSELECTABLE, ATTR_TR_ENHANCE } from "./packages/internal/template-contracts/dist/markers.js";
|
|
38
|
-
import { FactsAddress
|
|
39
|
-
import {
|
|
46
|
+
import { FactsAddress } from "./packages/internal/template-contracts/dist/facts-view.js";
|
|
47
|
+
import { FactsCommercialSpace, FactsComparable, FactsContact, FactsUnit } from "./schema/facts-view.js";
|
|
48
|
+
import { DerivedFactRef, DirectFactRef, FactNamespace, RegistryFactRef, fact } from "./schema/fact.js";
|
|
40
49
|
import { presets } from "./schema/format-presets.js";
|
|
41
50
|
import { a4Landscape, a4Portrait, deck16x9, facebookPost, halfLetterFlyer, instagramPortrait, instagramSquare, instagramStory, letterLandscape, letterPortrait, linkedinPost, postcard6x4, postcard7x5, website, xPost } from "./schema/formats.js";
|
|
42
51
|
//#region src/index.d.ts
|
|
@@ -50,4 +59,4 @@ import { a4Landscape, a4Portrait, deck16x9, facebookPost, halfLetterFlyer, insta
|
|
|
50
59
|
*/
|
|
51
60
|
declare const CONCRETE_VERSION: string;
|
|
52
61
|
//#endregion
|
|
53
|
-
export { ATTR_ISLAND_FRAMELESS, ATTR_ISLAND_ID, ATTR_ISLAND_KEY, ATTR_ISLAND_PROPS, ATTR_SECTION_INSTANCE_ID, ATTR_SLOT_FIELD, ATTR_SLOT_GROUP, ATTR_SLOT_ID, ATTR_SLOT_ITEM, ATTR_SLOT_TEXT_LEAF, ATTR_SLOT_UNSELECTABLE, ATTR_TR_ENHANCE, type AuthorImage, type BoundSlotValue, CONCRETE_VERSION, type CanvasInput, type CanvasesInput, type ComparableRow, type ComputeBinding, type Coordinates, type CropConfig, type DefineTemplateInput, type DerivedFactRef, type DirectFactRef, type DisplayEntryInput, type DisplayFill, type DocumentCollectionValue, type DocumentFormat, type DocumentSlot, type DocumentSlotDef, type DocumentValue, EDITOR_BRIDGE_PROP, EDITOR_BRIDGE_PROTOCOL, EditorBridge, EditorBridgeSelection, EditorSelection, type
|
|
62
|
+
export { ATTR_ISLAND_FRAMELESS, ATTR_ISLAND_ID, ATTR_ISLAND_KEY, ATTR_ISLAND_PROPS, ATTR_SECTION_INSTANCE_ID, ATTR_SLOT_FIELD, ATTR_SLOT_GROUP, ATTR_SLOT_ID, ATTR_SLOT_ITEM, ATTR_SLOT_TEXT_LEAF, ATTR_SLOT_UNSELECTABLE, ATTR_TR_ENHANCE, type AddressMembers, type AddressSlot, type AddressSlotDef, type AddressValue, type AuthorImage, type AutocropInput, type AutocropProcess, type BoundSlotValue, CONCRETE_VERSION, type CanvasInput, type CanvasesInput, type ComparableRow, type ComputeBinding, type Coordinates, type CropConfig, type CutoutProcess, type DateSlot, type DateSlotDef, type DefineTemplateInput, type DerivedFactRef, type DirectFactRef, type DisplayEntryInput, type DisplayFill, type DocumentCollectionValue, type DocumentFormat, type DocumentMedia, type DocumentSlot, type DocumentSlotDef, type DocumentValue, EDITOR_BRIDGE_PROP, EDITOR_BRIDGE_PROTOCOL, EditorBridge, EditorBridgeSelection, EditorSelection, type ElementOf, type ElementRef, type EmailSlot, type EmailSlotDef, type FactNamespace, type FactsAddress, type FactsCommercialSpace, type FactsComparable, type FactsContact, type FactsUnit, type FieldBinding, type FieldBindings, type FillBinding, type FillVerb, type FindFill, type FindInput, type FormatIdentity, FrameShell, type HolderProcess, ISLAND_CAPTURE_HOLDS_GLOBAL, ISLAND_ELEMENT, type IconName, Image, type ImageCollectionValue, type ImageFormat, type ImageMedia, type ImageSlot, type ImageSlotDef, type ImageValue, IslandComponent, IslandEditor, IslandEditorOptions, IslandMarker, type IslandMarkerProps, IslandModule, IslandProps, IslandPropsError, IslandServerFrame, type ItemBinding, type ItemIdentity, type ListFill, type ListItemSlot, type ListSlot, type ListSlotDef, type ListSourceInput, type Media, type MediaSlot, type MediaSlotDef, type MediaValue, type Narrative, type NumberSlot, type NumberSlotDef, type ObjectBinding, type ObjectFieldSlot, type ObjectLabelField, type ObjectLabelSource, type ObjectSlot, type ObjectSlotDef, type ObjectValue, type OutputClass, type PageComponent, type PhoneSlot, type PhoneSlotDef, type PhysicalLength, type PickFill, type PickInput, type PicturePlan, type PictureSourceSpec, type PlaybackConfig, type PoiPhoto, type PoiRow, type PoiSlot, type PoiSlotDef, type RegistryFactRef, type RenderedPage, type ResponsiveImage, type ResponsiveSource, type RowFill, type RowId, type RowRef, type RowSlot, type RowSlotDef, type RowSourceInput, Section, type SectionContractProps, type SectionOptions, type SectionPlacementProps, type SectionRenderBindings, type SectionValue, type SelectOptionInput, type SelectOptionObject, type SelectSlot, type SelectSlotDef, Slot, type SlotBinding, type SlotBindingMap, type SlotRef, type SlotSource, type SlotValue, type TableRow, type TableSource, type TemplateCanvas, type TemplatePage, type TemplatePreview, type TemplateScope, type TemplateValue, type TextSlot, type TextSlotDef, Tour, type TourCollectionValue, type TourMedia, type TourSlot, type TourSlotDef, type TourValue, type UrlSlot, type UrlSlotDef, type UseEditorResult, type ValueBinding, type ValueSlot, Video, type VideoCollectionValue, type VideoMedia, type VideoSlot, type VideoSlotDef, type VideoValue, type WebsiteFormat, type WebsitePage, type WriteFill, type WriteInput, a4Landscape, a4Portrait, address, bindItems, compute, date, deck16x9, defineTemplate, deserializeIslandProps, document, email, facebookPost, fact, fill, halfLetterFlyer, image, instagramPortrait, instagramSquare, instagramStory, islandId, letterLandscape, letterPortrait, linkedinPost, list, media, number, object, phone, poi, postcard6x4, postcard7x5, presets, holderProcess as process, row, section, select, serializeIslandProps, text, tour, url, useCaptureReady, useEditor, useIslandId, video, website, xPost };
|
package/dist/index.js
CHANGED
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
import { version } from "./packages/external/concrete/package.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ATTR_ISLAND_KEY, ISLAND_CAPTURE_HOLDS_GLOBAL } from "./packages/internal/capture-settle/dist/island-markers.js";
|
|
3
|
+
import { ATTR_ISLAND_FRAMELESS, ATTR_ISLAND_ID, ATTR_ISLAND_PROPS, EDITOR_BRIDGE_PROP, EDITOR_BRIDGE_PROTOCOL, ISLAND_ELEMENT, IslandPropsError, deserializeIslandProps, islandId, serializeIslandProps } from "./packages/internal/island-runtime/dist/contract.js";
|
|
3
4
|
import { useEditor } from "./packages/internal/island-runtime/dist/use-editor.js";
|
|
4
5
|
import { useCaptureReady } from "./packages/internal/island-runtime/dist/use-capture-ready.js";
|
|
5
6
|
import { useIslandId } from "./packages/internal/island-runtime/dist/use-island-id.js";
|
|
6
7
|
import { IslandMarker } from "./islands/marker.js";
|
|
7
8
|
import { bindItems } from "./primitives/slot-bindings.js";
|
|
8
|
-
import { compute } from "./
|
|
9
|
-
import { fill } from "./
|
|
9
|
+
import { compute } from "./packages/internal/template-contracts/dist/compute.js";
|
|
10
|
+
import { fill } from "./packages/internal/template-contracts/dist/fill-builders.js";
|
|
11
|
+
import { address, date, document, email, image, media, number, phone, poi, select, text, tour, url, video } from "./packages/internal/template-contracts/dist/slot-builders.js";
|
|
12
|
+
import { object } from "./packages/internal/template-contracts/dist/object.js";
|
|
13
|
+
import { list } from "./packages/internal/template-contracts/dist/list.js";
|
|
14
|
+
import { holderProcess } from "./packages/internal/template-contracts/dist/process-builders.js";
|
|
15
|
+
import { row } from "./packages/internal/template-contracts/dist/row.js";
|
|
10
16
|
import { section } from "./section/section.js";
|
|
11
17
|
import { defineTemplate } from "./template/define-template.js";
|
|
12
18
|
import { FrameShell } from "./primitives/FrameShell.js";
|
|
13
19
|
import { ATTR_SECTION_INSTANCE_ID, ATTR_SLOT_FIELD, ATTR_SLOT_GROUP, ATTR_SLOT_ID, ATTR_SLOT_ITEM, ATTR_SLOT_TEXT_LEAF, ATTR_SLOT_UNSELECTABLE, ATTR_TR_ENHANCE } from "./packages/internal/template-contracts/dist/markers.js";
|
|
14
20
|
import { Image } from "./primitives/Image.js";
|
|
15
21
|
import { Section } from "./primitives/Section.js";
|
|
16
|
-
import { SlotGroup } from "./primitives/slot-group.js";
|
|
17
22
|
import { Tour } from "./primitives/Tour.js";
|
|
18
23
|
import { Video } from "./primitives/Video.js";
|
|
19
24
|
import { Slot } from "./primitives/slot.js";
|
|
20
|
-
import { document, image, list, number, poi, select, text, tour, url, video } from "./schema/slot-builders.js";
|
|
21
25
|
import { fact } from "./schema/fact.js";
|
|
22
26
|
import { presets } from "./schema/format-presets.js";
|
|
23
27
|
import { a4Landscape, a4Portrait, deck16x9, facebookPost, halfLetterFlyer, instagramPortrait, instagramSquare, instagramStory, letterLandscape, letterPortrait, linkedinPost, postcard6x4, postcard7x5, website, xPost } from "./schema/formats.js";
|
|
@@ -26,4 +30,4 @@ import { a4Landscape, a4Portrait, deck16x9, facebookPost, halfLetterFlyer, insta
|
|
|
26
30
|
const CONCRETE_VERSION = version;
|
|
27
31
|
|
|
28
32
|
//#endregion
|
|
29
|
-
export { ATTR_ISLAND_FRAMELESS, ATTR_ISLAND_ID, ATTR_ISLAND_KEY, ATTR_ISLAND_PROPS, ATTR_SECTION_INSTANCE_ID, ATTR_SLOT_FIELD, ATTR_SLOT_GROUP, ATTR_SLOT_ID, ATTR_SLOT_ITEM, ATTR_SLOT_TEXT_LEAF, ATTR_SLOT_UNSELECTABLE, ATTR_TR_ENHANCE, CONCRETE_VERSION, EDITOR_BRIDGE_PROP, EDITOR_BRIDGE_PROTOCOL, FrameShell, ISLAND_CAPTURE_HOLDS_GLOBAL, ISLAND_ELEMENT, Image, IslandMarker, IslandPropsError, Section, Slot,
|
|
33
|
+
export { ATTR_ISLAND_FRAMELESS, ATTR_ISLAND_ID, ATTR_ISLAND_KEY, ATTR_ISLAND_PROPS, ATTR_SECTION_INSTANCE_ID, ATTR_SLOT_FIELD, ATTR_SLOT_GROUP, ATTR_SLOT_ID, ATTR_SLOT_ITEM, ATTR_SLOT_TEXT_LEAF, ATTR_SLOT_UNSELECTABLE, ATTR_TR_ENHANCE, CONCRETE_VERSION, EDITOR_BRIDGE_PROP, EDITOR_BRIDGE_PROTOCOL, FrameShell, ISLAND_CAPTURE_HOLDS_GLOBAL, ISLAND_ELEMENT, Image, IslandMarker, IslandPropsError, Section, Slot, Tour, Video, a4Landscape, a4Portrait, address, bindItems, compute, date, deck16x9, defineTemplate, deserializeIslandProps, document, email, facebookPost, fact, fill, halfLetterFlyer, image, instagramPortrait, instagramSquare, instagramStory, islandId, letterLandscape, letterPortrait, linkedinPost, list, media, number, object, phone, poi, postcard6x4, postcard7x5, presets, holderProcess as process, row, section, select, serializeIslandProps, text, tour, url, useCaptureReady, useEditor, useIslandId, video, website, xPost };
|
package/dist/islands/marker.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ATTR_ISLAND_KEY } from "../packages/internal/capture-settle/dist/island-markers.js";
|
|
2
|
+
import { ATTR_ISLAND_FRAMELESS, ATTR_ISLAND_ID, ATTR_ISLAND_PROPS, ISLAND_ELEMENT, serializeIslandProps } from "../packages/internal/island-runtime/dist/contract.js";
|
|
2
3
|
import { IslandIdContext } from "./island-id.js";
|
|
3
4
|
import { Fragment, createElement, useContext } from "react";
|
|
4
5
|
|