@homepages/concrete 5.0.0 → 6.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 +336 -0
- package/README.md +28 -17
- package/codemods/fill-is-a-source.mjs +533 -0
- package/codemods/manifest.json +12 -0
- package/codemods/reads-replace-reconcile.mjs +285 -0
- package/dist/artifact/playground/client/assets/{index-D1fwOGVK.js → index-u3T7DiSN.js} +96 -96
- package/dist/artifact/playground/client/index.html +1 -1
- package/dist/artifact/playground/host.mjs +23 -23
- package/dist/base.css +3 -8
- package/dist/browser/site-config.js +1 -16
- package/dist/browser/submit-lead.js +0 -31
- package/dist/cli/build/artifact.js +16 -23
- package/dist/cli/build/captures.js +0 -6
- package/dist/cli/build/esbuild.js +0 -17
- package/dist/cli/build/fixtures.js +15 -30
- package/dist/cli/build/icons.js +0 -3
- package/dist/cli/build/index.js +1 -1
- package/dist/cli/build/playground.js +4 -8
- package/dist/cli/build/sections.js +9 -30
- package/dist/cli/build/source.js +52 -27
- package/dist/cli/build/static.js +4 -25
- package/dist/cli/capture/bundle.js +0 -9
- package/dist/cli/capture/capture-browser.js +0 -14
- package/dist/cli/capture/capture.js +1 -8
- package/dist/cli/check/analyze.js +2 -5
- package/dist/cli/check/index.js +1 -1
- package/dist/cli/check/line-endings.js +52 -0
- package/dist/cli/check/load-workspace.js +3 -8
- package/dist/cli/check/portable-names.js +48 -0
- package/dist/cli/check/render/class-conflicts.js +0 -5
- package/dist/cli/check/render/html.js +0 -1
- package/dist/cli/check/render/invariants.js +0 -5
- package/dist/cli/check/render/island-frames.js +0 -25
- package/dist/cli/check/render/marker-coverage.js +0 -20
- package/dist/cli/check/render/nav.js +0 -33
- package/dist/cli/check/report.js +0 -3
- package/dist/cli/check/stages/bundles.js +1 -9
- package/dist/cli/check/stages/composition.js +3 -2
- package/dist/cli/check/stages/dependencies.js +7 -38
- package/dist/cli/check/stages/fixtures.js +3 -31
- package/dist/cli/check/stages/lint.js +2 -2
- package/dist/cli/check/stages/logic.js +3 -34
- package/dist/cli/check/stages/relations.js +46 -0
- package/dist/cli/check/stages/render.js +0 -1
- package/dist/cli/check/stages/sections.js +3 -3
- package/dist/cli/check/stages/stylesheet.js +1 -1
- package/dist/cli/check/stages/typecheck.js +5 -11
- package/dist/cli/check/stages/workspace.js +36 -14
- package/dist/cli/commands.js +9 -56
- package/dist/cli/currency/cache.js +4 -17
- package/dist/cli/currency/decide.js +0 -14
- package/dist/cli/currency/opt-out.js +0 -7
- package/dist/cli/currency/preamble.js +3 -24
- package/dist/cli/currency/prompt.js +0 -1
- package/dist/cli/currency/refresh.js +5 -12
- package/dist/cli/currency/resolve-latest.js +3 -64
- package/dist/cli/currency/version-order.js +0 -12
- package/dist/cli/dev/crop.js +0 -2
- package/dist/cli/dev/http.js +0 -13
- package/dist/cli/dev/index.js +3 -4
- package/dist/cli/dev/islands.js +25 -70
- package/dist/cli/dev/listen.js +26 -0
- package/dist/cli/dev/load-template.js +0 -1
- package/dist/cli/dev/request-error.js +0 -4
- package/dist/cli/dev/server.js +46 -52
- package/dist/cli/dev/tsconfig-paths.js +0 -13
- package/dist/cli/dev/vite.js +9 -38
- package/dist/cli/dev/workspace-reader.js +4 -34
- package/dist/cli/media/cache.js +4 -51
- package/dist/cli/media/derive.js +2 -94
- package/dist/cli/media/deriver-plugin.js +0 -2
- package/dist/cli/media/frame-rung-floor.js +0 -6
- package/dist/cli/property/index.js +0 -4
- package/dist/cli/property/library.js +6 -24
- package/dist/cli/publish/client.js +0 -1
- package/dist/cli/publish/freshness.js +0 -2
- package/dist/cli/publish/git.js +2 -8
- package/dist/cli/publish/index.js +8 -15
- package/dist/cli/publish/pack.js +5 -6
- package/dist/cli/publish/report.js +0 -6
- package/dist/cli/publish/target.js +16 -13
- package/dist/cli/publish/wire.js +0 -6
- package/dist/cli/tar.js +2 -9
- package/dist/cli/upgrade/codemod.js +0 -8
- package/dist/cli/upgrade/index.js +0 -24
- package/dist/cli/upgrade/manifest.js +0 -12
- package/dist/cli/upgrade/plan.js +0 -17
- package/dist/cli/upgrade/stage.js +12 -15
- package/dist/cli/version.js +0 -8
- package/dist/cli/workspace.js +2 -34
- package/dist/cli.js +4 -21
- package/dist/css/compile.js +25 -28
- package/dist/css/graph.js +3 -10
- package/dist/css/inline.js +3 -13
- package/dist/css/rules.js +6 -43
- package/dist/design-system/format-variants.js +0 -22
- package/dist/eslint/authoring.js +0 -2
- package/dist/eslint/correctness.js +0 -7
- package/dist/eslint/rules/editor-reason.js +0 -11
- package/dist/eslint/rules/island-ids.js +0 -1
- package/dist/eslint/rules/jsx-visitor.js +0 -13
- package/dist/eslint/rules/no-editor-globals.js +0 -2
- package/dist/eslint/rules/no-raw-values.js +0 -1
- package/dist/fixtures/brand.js +0 -1
- package/dist/fixtures/bundle-rule.js +4 -9
- package/dist/fixtures/canonical.d.ts +20 -0
- package/dist/fixtures/image-dimensions.js +0 -1
- package/dist/fixtures/load.js +8 -17
- package/dist/fixtures/media-plugin.js +4 -31
- package/dist/fixtures/media.js +0 -21
- package/dist/fixtures/package-stylesheets.js +0 -6
- package/dist/fixtures/property.js +16 -15
- package/dist/fixtures/resolve.js +102 -29
- package/dist/fixtures/rows.js +12 -11
- package/dist/fixtures/synthesize-empties.js +0 -4
- package/dist/fixtures.d.ts +19 -4
- package/dist/fixtures.js +0 -18
- package/dist/index.d.ts +8 -9
- package/dist/index.js +2 -11
- package/dist/islands/client-module.js +0 -11
- package/dist/islands/marker.js +0 -33
- package/dist/node_modules/.pnpm/fflate@0.8.3/node_modules/fflate/esm/browser.js +0 -20
- package/dist/packages/external/concrete/package.js +1 -1
- package/dist/packages/internal/fill-bake/dist/bake-property-ref.js +21 -35
- package/dist/packages/internal/fill-bake/dist/compute-reads.js +4 -0
- package/dist/packages/internal/fill-bake/dist/derive-source.js +40 -0
- package/dist/packages/internal/fill-bake/dist/display.js +0 -1
- package/dist/packages/internal/fill-bake/dist/index.js +4 -4
- package/dist/packages/internal/fill-vocabulary/dist/origination.js +106 -0
- package/dist/packages/internal/fill-vocabulary/dist/row-planners.js +1 -49
- package/dist/packages/internal/format-geometry/dist/capture.js +10 -240
- package/dist/packages/internal/format-geometry/dist/geometry.js +0 -6
- package/dist/packages/internal/image-ladder/dist/crop.js +0 -12
- package/dist/packages/internal/image-ladder/dist/policy.js +0 -14
- package/dist/packages/internal/island-runtime/dist/capture-holds.js +0 -13
- package/dist/packages/internal/island-runtime/dist/contract.js +0 -34
- package/dist/packages/internal/island-runtime/dist/editor-instance-context.js +0 -1
- package/dist/packages/internal/island-runtime/dist/index.js +0 -34
- package/dist/packages/internal/island-runtime/dist/island-id-context.js +0 -1
- package/dist/packages/internal/island-runtime/dist/use-capture-ready.js +0 -15
- package/dist/packages/internal/island-runtime/dist/use-editor.js +0 -10
- package/dist/packages/internal/island-runtime/dist/use-island-id.js +0 -32
- package/dist/packages/internal/property-facts/dist/derive-facts-view.js +2 -17
- package/dist/packages/internal/property-facts/dist/index.js +1 -1
- package/dist/packages/internal/property-facts/dist/{property-facts-CSdkSuD7.js → property-facts-5pxZnlkh.js} +13 -2
- package/dist/packages/internal/section-contracts/dist/cap-contract.js +1 -18
- package/dist/packages/internal/section-contracts/dist/catalog.js +16 -8
- package/dist/packages/internal/section-contracts/dist/choose-select-contract.js +12 -16
- package/dist/packages/internal/section-contracts/dist/count-bounds-contract.js +5 -11
- package/dist/packages/internal/section-contracts/dist/display-contract.js +2 -0
- package/dist/packages/internal/section-contracts/dist/display-evidence-contract.js +2 -8
- package/dist/packages/internal/section-contracts/dist/fill-spec-view.js +13 -0
- package/dist/packages/internal/section-contracts/dist/index.js +2 -1
- package/dist/packages/internal/section-contracts/dist/interpolation-contract.js +16 -42
- package/dist/packages/internal/section-contracts/dist/list-fill-contract.js +24 -43
- package/dist/packages/internal/section-contracts/dist/name-title-contract.js +11 -18
- package/dist/packages/internal/section-contracts/dist/poi-curation-contract.js +10 -12
- package/dist/packages/internal/section-contracts/dist/pooling-field-contract.js +3 -13
- package/dist/packages/internal/section-contracts/dist/row-fill-contract.js +6 -18
- package/dist/packages/internal/section-contracts/dist/runners.js +21 -13
- package/dist/packages/internal/section-contracts/dist/source-contract.js +13 -2
- package/dist/packages/internal/section-contracts/dist/writer-reads-fact-contract.js +31 -0
- package/dist/packages/internal/source-resolution/dist/index.js +1 -9
- package/dist/packages/internal/template-artifact/dist/hash.js +0 -8
- package/dist/packages/internal/template-artifact/dist/index.js +1 -1
- package/dist/packages/internal/template-artifact/dist/layout.js +0 -39
- package/dist/packages/internal/template-artifact/dist/manifest.js +1 -9
- package/dist/packages/internal/template-artifact/dist/sha256.js +0 -1
- package/dist/packages/internal/template-artifact/dist/verify.js +2 -4
- package/dist/packages/internal/template-contracts/dist/collection-editing.js +0 -16
- package/dist/packages/internal/template-contracts/dist/content-categories.js +0 -4
- package/dist/packages/internal/template-contracts/dist/facts-view.d.ts +16 -10
- package/dist/packages/internal/template-contracts/dist/facts-view.js +15 -28
- package/dist/packages/internal/template-contracts/dist/layout.js +0 -7
- package/dist/packages/internal/template-contracts/dist/markers.js +0 -29
- package/dist/packages/internal/template-contracts/dist/select-key.js +0 -6
- package/dist/packages/internal/template-contracts/dist/slot-catalog.d.ts +56 -34
- package/dist/packages/internal/template-contracts/dist/slot-catalog.js +22 -389
- package/dist/platform/file-url.js +8 -0
- package/dist/platform/fs.js +73 -0
- package/dist/platform/names.js +63 -0
- package/dist/platform/order.js +7 -0
- package/dist/platform/paths.js +62 -0
- package/dist/platform/process.js +97 -0
- package/dist/playground/host/page-state.js +0 -2
- package/dist/playground/host/paths.js +0 -1
- package/dist/playground/layout.js +0 -7
- package/dist/playground/wire.js +0 -8
- package/dist/primitives/FrameShell.js +0 -18
- package/dist/primitives/Image.d.ts +5 -1
- package/dist/primitives/Image.js +2 -68
- package/dist/primitives/Section.js +0 -13
- package/dist/primitives/Tour.js +0 -26
- package/dist/primitives/Video.js +0 -32
- package/dist/primitives/embed-playback.js +0 -1
- package/dist/primitives/marker-attrs.js +0 -17
- package/dist/primitives/picture-sources.js +6 -1
- package/dist/primitives/probe-context.js +0 -7
- package/dist/primitives/slot-bindings.js +0 -46
- package/dist/primitives/slot-document.js +0 -11
- package/dist/primitives/slot-group.js +0 -9
- package/dist/primitives/slot-media.js +0 -27
- package/dist/primitives/slot-scalar.js +0 -4
- package/dist/primitives/slot.js +0 -6
- package/dist/rules/registry.js +42 -24
- package/dist/schema/compute.d.ts +46 -8
- package/dist/schema/compute.js +21 -15
- package/dist/schema/define-schema.d.ts +1 -1
- package/dist/schema/define-schema.js +37 -17
- package/dist/schema/extract-fill-spec.js +93 -180
- package/dist/schema/extract-used-facts.js +16 -158
- package/dist/schema/fact.d.ts +25 -12
- package/dist/schema/fact.js +7 -11
- package/dist/schema/fill-builders.d.ts +91 -366
- package/dist/schema/fill-builders.js +21 -259
- package/dist/schema/fill-declaration.d.ts +7 -69
- package/dist/schema/fill-declaration.js +5 -34
- package/dist/schema/fill-spec.js +59 -148
- package/dist/schema/format-presets.js +0 -12
- package/dist/schema/format.js +0 -7
- package/dist/schema/layout.js +0 -10
- package/dist/schema/manifest.js +0 -39
- package/dist/schema/property-facts.d.ts +20 -0
- package/dist/schema/section-nav.js +0 -15
- package/dist/schema/section-schema.d.ts +0 -1
- package/dist/schema/section-schema.js +4 -20
- package/dist/schema/slot-builders.d.ts +128 -117
- package/dist/schema/slot-builders.js +18 -201
- package/dist/schema/slot-ref.d.ts +63 -0
- package/dist/schema/slot-ref.js +33 -0
- package/dist/schema/slot-types.d.ts +3 -2
- package/dist/schema/slot-types.js +11 -20
- package/dist/section/declare.d.ts +14 -10
- package/dist/section/declare.js +13 -2
- package/dist/section/discovery.js +6 -21
- package/dist/section/groups.js +0 -6
- package/dist/section/materialize.js +0 -5
- package/dist/section/placements.js +0 -4
- package/dist/section/section.d.ts +8 -5
- package/dist/section/section.js +7 -29
- package/dist/styles.css +5 -0
- package/dist/template/define-template.d.ts +0 -4
- package/dist/template/define-template.js +1 -15
- package/dist/template/logic-build.js +8 -35
- package/dist/template/logic-shim.d.ts +4 -5
- package/dist/template/logic-shim.js +2 -6
- package/dist/template/logic-transform.js +0 -6
- package/dist/template/materialize.js +52 -43
- package/dist/template/mirror-types.js +43 -0
- package/dist/template/running-copy.js +5 -20
- package/dist/template/section-reads.js +83 -0
- package/guide/reference/cli/INDEX.md +12 -6
- package/guide/reference/cli/build.md +1 -1
- package/guide/reference/cli/check.md +1 -1
- package/guide/reference/cli/dev.md +3 -3
- package/guide/reference/cli/property-add.md +1 -1
- package/guide/reference/cli/property-list.md +1 -1
- package/guide/reference/cli/publish.md +4 -2
- package/guide/reference/cli/upgrade.md +1 -1
- package/guide/reference/rules/INDEX.md +26 -13
- package/package.json +4 -2
- package/dist/packages/internal/fact-interpolation/dist/index.js +0 -22
- package/dist/packages/internal/fill-bake/dist/reconcile-cross-section.js +0 -170
- package/dist/packages/internal/fill-vocabulary/dist/facts.d.ts +0 -32
- package/dist/packages/internal/fill-vocabulary/dist/facts.js +0 -131
- package/dist/packages/internal/template-contracts/dist/slot-overrides.js +0 -11
- package/dist/schema/fill-spec.d.ts +0 -18
- package/dist/template/reconcile.d.ts +0 -67
- package/dist/template/reconcile.js +0 -25
package/dist/schema/format.js
CHANGED
|
@@ -11,17 +11,11 @@ const identityFields = {
|
|
|
11
11
|
category: z.enum(CONTENT_CATEGORIES),
|
|
12
12
|
preset: z.string().min(1).optional()
|
|
13
13
|
};
|
|
14
|
-
/** Zod twin of `ImageFormat`. */
|
|
15
14
|
const ImageFormatSchema = z.object({
|
|
16
15
|
...identityFields,
|
|
17
16
|
width: outputPixels,
|
|
18
17
|
height: outputPixels
|
|
19
18
|
}).strict();
|
|
20
|
-
/**
|
|
21
|
-
* Zod twin of `DocumentFormat`: a strict union, so a mixed
|
|
22
|
-
* physical/pixel object or a pixel sheet carrying `dpi`/`bleed` matches no
|
|
23
|
-
* branch. The 72–600 dpi window matches the manifest parse rules.
|
|
24
|
-
*/
|
|
25
19
|
const DocumentFormatSchema = z.union([z.object({
|
|
26
20
|
...identityFields,
|
|
27
21
|
width: outputPixels,
|
|
@@ -33,7 +27,6 @@ const DocumentFormatSchema = z.union([z.object({
|
|
|
33
27
|
dpi: z.number().min(72).max(600),
|
|
34
28
|
bleed: physicalLength("non-negative").optional()
|
|
35
29
|
}).strict()]);
|
|
36
|
-
/** Zod twin of {@link WebsiteFormat}: identity only, geometry rejected. */
|
|
37
30
|
const WebsiteFormatSchema = z.object(identityFields).omit({ preset: true }).strict();
|
|
38
31
|
|
|
39
32
|
//#endregion
|
package/dist/schema/layout.js
CHANGED
|
@@ -2,11 +2,6 @@
|
|
|
2
2
|
function isGroupCard(entry) {
|
|
3
3
|
return typeof entry === "object" && entry !== null && !Array.isArray(entry);
|
|
4
4
|
}
|
|
5
|
-
/**
|
|
6
|
-
* The `meta.groups` array a section layout emits — one entry per `group(...)`
|
|
7
|
-
* card, in order. Bare rows contribute no group (each is its own default card),
|
|
8
|
-
* exactly as an ungrouped slot does in the hand-authored form.
|
|
9
|
-
*/
|
|
10
5
|
function groupsFromLayout(layout) {
|
|
11
6
|
return layout.filter(isGroupCard).map((card) => ({
|
|
12
7
|
id: card.id,
|
|
@@ -14,11 +9,6 @@ function groupsFromLayout(layout) {
|
|
|
14
9
|
members: toMembers(card.members)
|
|
15
10
|
}));
|
|
16
11
|
}
|
|
17
|
-
/**
|
|
18
|
-
* The `layout` array a record item emits from its bare-row layout. Order
|
|
19
|
-
* preserved; `item_order` is NOT emitted here — CI still derives it from
|
|
20
|
-
* `layout` at materialization, unchanged.
|
|
21
|
-
*/
|
|
22
12
|
function itemLayoutFromRows(rows) {
|
|
23
13
|
return toMembers(rows);
|
|
24
14
|
}
|
package/dist/schema/manifest.js
CHANGED
|
@@ -10,16 +10,8 @@ const SectionInstance = z.object({
|
|
|
10
10
|
required: z.boolean().default(false)
|
|
11
11
|
}).strict();
|
|
12
12
|
const PAGE_PATH_RE = /^\/[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
13
|
-
/** The root page's path. Exactly one page in a website template declares it. */
|
|
14
13
|
const ROOT_PAGE_PATH = "/";
|
|
15
|
-
/**
|
|
16
|
-
* The word cap on a template's display name. The name is what the picker card,
|
|
17
|
-
* the editor chrome and the dashboard each show on ONE line that truncates with
|
|
18
|
-
* an ellipsis, so a long name is not merely verbose — it is unreadable at the
|
|
19
|
-
* only place a user reads it.
|
|
20
|
-
*/
|
|
21
14
|
const TEMPLATE_NAME_WORD_CAP = 2;
|
|
22
|
-
/** The words of a display name: whitespace-separated runs, empties dropped. */
|
|
23
15
|
const nameWords = (name) => name.trim().split(/\s+/).filter(Boolean);
|
|
24
16
|
const TemplateName = z.string().min(1).superRefine((name, ctx) => {
|
|
25
17
|
const words = nameWords(name);
|
|
@@ -254,37 +246,6 @@ function refineRenderedRules(manifest, ctx) {
|
|
|
254
246
|
});
|
|
255
247
|
});
|
|
256
248
|
}
|
|
257
|
-
/**
|
|
258
|
-
* Zod schema for the object a template's `template.ts` builds via
|
|
259
|
-
* `defineTemplate`: a discriminated union on `output`, the artifact class.
|
|
260
|
-
* Validates a BUILT object, not parsed JSON, and owns a template's static
|
|
261
|
-
* composition only: identity (`key`, a `name` of at most two words, `output`), its `formats`
|
|
262
|
-
* acceptance set (websites hold exactly the geometry-less website singleton;
|
|
263
|
-
* image and document templates one or more of their own class's formats), its
|
|
264
|
-
* ordered `pages` (each page's label, optionality, ordered section instances,
|
|
265
|
-
* and — websites only — path), its `canvases` (the editing-surface grouping,
|
|
266
|
-
* always explicit on the wire), and optional intake `preview` chrome.
|
|
267
|
-
* Cross-section reconcile rules are not part of this schema — they compile
|
|
268
|
-
* into the template logic bundle instead.
|
|
269
|
-
*
|
|
270
|
-
* Pages are the composition unit in every class: a single-page template is a
|
|
271
|
-
* one-page template, declared exactly as a five-page one is. There is no flat
|
|
272
|
-
* `sections` shape.
|
|
273
|
-
*
|
|
274
|
-
* @throws on parse when a composition rule is violated, each with an error
|
|
275
|
-
* naming the rule — a `name` of more than two words, duplicate page id, duplicate format id, one `instance_id`
|
|
276
|
-
* listed twice on the same page (listing an instance on SEVERAL pages is legal
|
|
277
|
-
* and means one shared instance rendered on each), a rendered template with no
|
|
278
|
-
* format or with every page optional, a `preset`-tagged format whose geometry
|
|
279
|
-
* does not match the library entry for that tag, a website format set that is
|
|
280
|
-
* not exactly `[presets.website]`, a canvas rule — no canvases, a duplicate
|
|
281
|
-
* canvas id, an empty canvas, a canvas naming an unknown page, a page on no
|
|
282
|
-
* canvas or on two (canvases must partition the pages) — or a website page
|
|
283
|
-
* rule — duplicate path, no root page or more than one, an optional root
|
|
284
|
-
* page, a non-root path that is not a single lowercase-kebab segment. Format geometry bounds (positive
|
|
285
|
-
* dimensions, the 72–600 dpi window, bleed ≥ 0, no mixed physical/pixel
|
|
286
|
-
* dimensions) are enforced by the format schemas themselves.
|
|
287
|
-
*/
|
|
288
249
|
const TemplateManifest = z.discriminatedUnion("output", [
|
|
289
250
|
WebsiteManifest,
|
|
290
251
|
ImageManifest,
|
|
@@ -78,6 +78,26 @@ type ComparableRow = {
|
|
|
78
78
|
photo_url: string | null;
|
|
79
79
|
source_url: string | null;
|
|
80
80
|
source_name: string | null;
|
|
81
|
+
/** The year the comparable was built. */
|
|
82
|
+
year_built?: number | null;
|
|
83
|
+
/** Lot size in square feet. */
|
|
84
|
+
lot_sqft?: number | null;
|
|
85
|
+
stories?: number | null;
|
|
86
|
+
/** Units in the comparable's BUILDING — a multifamily figure, unrelated to the subject's `units`. */
|
|
87
|
+
units?: number | null;
|
|
88
|
+
/** Monthly HOA dues in dollars. */
|
|
89
|
+
hoa_monthly?: number | null;
|
|
90
|
+
/** How long the listing has been up. Live listings only; null on a closed sale. */
|
|
91
|
+
days_on_market?: number | null;
|
|
92
|
+
/** The asking price in dollars, beside `price` — the pair is what "sold over asking" reads. */
|
|
93
|
+
list_price?: number | null;
|
|
94
|
+
/** ISO `YYYY-MM-DD` — when the listing went live, not when it closed. */
|
|
95
|
+
listed_date?: string | null;
|
|
96
|
+
mls_number?: string | null;
|
|
97
|
+
/** The listing remarks, verbatim from the source. */
|
|
98
|
+
description?: string | null;
|
|
99
|
+
/** The comparable's type in the platform's vocabulary; null when the source states none. */
|
|
100
|
+
property_type?: "single_family" | "condo_townhome" | "multi_family" | "investment" | null;
|
|
81
101
|
};
|
|
82
102
|
//#endregion
|
|
83
103
|
export { ComparableRow, Coordinates, FloorplanAssignment, Narrative, UnitRow };
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
//#region src/schema/section-nav.ts
|
|
2
|
-
/**
|
|
3
|
-
* The anchor map a STANDALONE render receives: every target key resolves to
|
|
4
|
-
* `#<target>`. A lone section has no composed page to link into, so nothing is
|
|
5
|
-
* authored — the map is synthesized. It answers ANY key rather than a fixed
|
|
6
|
-
* record because a renderer's target keys are its own, and the links are dead
|
|
7
|
-
* ends in a standalone preview regardless; a composed page builds the real map
|
|
8
|
-
* from its composition instead.
|
|
9
|
-
*/
|
|
10
2
|
function previewAnchors() {
|
|
11
3
|
const target = {};
|
|
12
4
|
return new Proxy(target, { get: (_target, prop) => {
|
|
@@ -14,13 +6,6 @@ function previewAnchors() {
|
|
|
14
6
|
return `#${prop}`;
|
|
15
7
|
} });
|
|
16
8
|
}
|
|
17
|
-
/**
|
|
18
|
-
* The page list a STANDALONE render receives: empty. Unlike `previewAnchors`,
|
|
19
|
-
* which can synthesize an answer for whatever key it is ASKED for, a page list
|
|
20
|
-
* must be ENUMERATED — and a lone section has no site map, so any entry here
|
|
21
|
-
* would be an invented page a menu then renders as real. A menu-building
|
|
22
|
-
* renderer emits no items in a standalone preview, which is the honest render.
|
|
23
|
-
*/
|
|
24
9
|
function previewPages() {
|
|
25
10
|
return [];
|
|
26
11
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { REFERRAL_FIELDS } from "../packages/internal/template-contracts/dist/slot-catalog.js";
|
|
2
1
|
import { VideoCollectionValue, VideoValue } from "../packages/internal/template-contracts/dist/video-value.js";
|
|
3
2
|
import { TourCollectionValue, TourValue } from "../packages/internal/template-contracts/dist/tour-value.js";
|
|
4
3
|
import { DocumentCollectionValue, DocumentValue } from "../packages/internal/template-contracts/dist/document-value.js";
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import { CONTENT_SLOT_TYPES,
|
|
2
|
-
import { SlotDef, defaultForSlotType } from "./slot-types.js";
|
|
1
|
+
import { CONTENT_SLOT_TYPES, REF_SLOT_TYPES, SLOT_TYPES } from "../packages/internal/template-contracts/dist/slot-catalog.js";
|
|
2
|
+
import { SerializedReads, SlotDef, defaultForSlotType } from "./slot-types.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
|
|
5
5
|
//#region src/schema/section-schema.ts
|
|
6
|
-
/**
|
|
7
|
-
* A first-class sidebar grouping: collapses its member slots into one editor
|
|
8
|
-
* card. `members` is nestable — a bare slot id is a full-width row, a
|
|
9
|
-
* `[a, b]` tuple is one 2-up row.
|
|
10
|
-
*/
|
|
11
6
|
const SlotGroupDef = z.object({
|
|
12
7
|
id: z.string(),
|
|
13
8
|
label: z.string(),
|
|
@@ -18,32 +13,21 @@ const DisplayEntryDef = z.object({
|
|
|
18
13
|
locked: z.boolean().optional(),
|
|
19
14
|
source: z.object({
|
|
20
15
|
kind: z.literal("derived"),
|
|
21
|
-
transform: z.string().min(1)
|
|
16
|
+
transform: z.string().min(1),
|
|
17
|
+
reads: SerializedReads
|
|
22
18
|
}).strict().optional(),
|
|
23
19
|
fill: z.object({ pick: z.string().min(1) }).strict().optional()
|
|
24
20
|
}).strict();
|
|
25
|
-
/** A section's serialized `meta.display`: `visibility` and `variant`, each an optional select-shaped entry. */
|
|
26
21
|
const DisplayDef = z.object({
|
|
27
22
|
visibility: DisplayEntryDef.optional(),
|
|
28
23
|
variant: DisplayEntryDef.optional()
|
|
29
24
|
}).strict();
|
|
30
|
-
/**
|
|
31
|
-
* Zod schema for a section's `meta`: presentation and structural facts kept
|
|
32
|
-
* separate from the content `slots` — display name, in-page anchor id,
|
|
33
|
-
* sidebar `groups`, and the `display` block owning section visibility and
|
|
34
|
-
* variant.
|
|
35
|
-
*/
|
|
36
25
|
const SectionMeta = z.object({
|
|
37
26
|
displayName: z.string().min(1),
|
|
38
27
|
anchor: z.string().min(1).optional(),
|
|
39
28
|
groups: z.array(SlotGroupDef).optional(),
|
|
40
29
|
display: DisplayDef.optional()
|
|
41
30
|
}).strict();
|
|
42
|
-
/**
|
|
43
|
-
* Zod schema for a section's full authored `schema.ts` declaration: `meta`,
|
|
44
|
-
* its `slots` record, and a build-derived `slot_order` never written by an
|
|
45
|
-
* author directly.
|
|
46
|
-
*/
|
|
47
31
|
const SectionSchema = z.object({
|
|
48
32
|
meta: SectionMeta,
|
|
49
33
|
slots: z.record(z.string(), SlotDef),
|