@homepages/concrete 9.1.0 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/README.md +1 -1
  3. package/codemods/manifest.json +10 -0
  4. package/codemods/registry-keys-only.mjs +113 -0
  5. package/codemods/steps/list-object-form.mjs +2 -3
  6. package/codemods/steps/registry-key-reads.mjs +276 -0
  7. package/dist/artifact/playground/client/assets/index-BFNHB7VM.css +1 -0
  8. package/dist/artifact/playground/client/assets/index-Div1yo6s.js +1259 -0
  9. package/dist/artifact/playground/client/index.html +2 -2
  10. package/dist/artifact/playground/host.mjs +42 -42
  11. package/dist/cli/build/artifact.js +2 -1
  12. package/dist/cli/build/fixtures.js +2 -1
  13. package/dist/cli/check/render/inputs.js +3 -3
  14. package/dist/cli/check/stages/sections.js +5 -6
  15. package/dist/cli/dev/workspace-reader.js +9 -2
  16. package/dist/fixtures/media-store.js +3 -3
  17. package/dist/fixtures/resolve.js +24 -16
  18. package/dist/fixtures/synthesize-empties.js +3 -1
  19. package/dist/fixtures.d.ts +1 -1
  20. package/dist/index.d.ts +3 -4
  21. package/dist/packages/external/concrete/package.js +1 -1
  22. package/dist/packages/internal/fill-bake/dist/bake-property-ref.js +8 -6
  23. package/dist/packages/internal/fill-bake/dist/compute-reads.js +8 -4
  24. package/dist/packages/internal/fill-bake/dist/index.js +1 -1
  25. package/dist/packages/internal/fill-bake/dist/item-merge.js +32 -6
  26. package/dist/packages/internal/fill-bake/dist/linked-merge.js +5 -5
  27. package/dist/packages/internal/fill-bake/dist/list-grammar.js +4 -26
  28. package/dist/packages/internal/fill-vocabulary/dist/resolved-decision.js +1 -1
  29. package/dist/packages/internal/media-resolution/dist/document.js +16 -15
  30. package/dist/packages/internal/media-resolution/dist/image.js +38 -92
  31. package/dist/packages/internal/media-resolution/dist/index.js +1 -1
  32. package/dist/packages/internal/media-resolution/dist/list.js +11 -11
  33. package/dist/packages/internal/media-resolution/dist/media.js +17 -16
  34. package/dist/packages/internal/media-resolution/dist/records.js +4 -2
  35. package/dist/packages/internal/media-resolution/dist/slot.js +5 -5
  36. package/dist/packages/internal/media-resolution/dist/tour.js +12 -11
  37. package/dist/packages/internal/media-resolution/dist/video.js +16 -16
  38. package/dist/packages/internal/property-facts/dist/registry-facts.js +8 -1
  39. package/dist/packages/internal/section-contracts/dist/catalog.js +1 -5
  40. package/dist/packages/internal/section-contracts/dist/directly-linked-list-contract.js +2 -3
  41. package/dist/packages/internal/section-contracts/dist/fill-verb-contract.js +5 -3
  42. package/dist/packages/internal/section-contracts/dist/index.js +0 -1
  43. package/dist/packages/internal/section-contracts/dist/object-contract.js +4 -2
  44. package/dist/packages/internal/section-contracts/dist/row-fill-contract.js +1 -1
  45. package/dist/packages/internal/section-contracts/dist/row-rule-contract.js +4 -2
  46. package/dist/packages/internal/section-contracts/dist/row-source-contract.js +7 -8
  47. package/dist/packages/internal/section-contracts/dist/runners.js +1 -8
  48. package/dist/packages/internal/section-contracts/dist/select-contract.js +7 -1
  49. package/dist/packages/internal/section-contracts/dist/source-contract.js +12 -8
  50. package/dist/packages/internal/section-contracts/dist/sources-contract.js +1 -1
  51. package/dist/packages/internal/section-contracts/dist/table-member.js +5 -8
  52. package/dist/packages/internal/source-resolution/dist/index.js +21 -188
  53. package/dist/packages/internal/template-artifact/dist/index.js +2 -2
  54. package/dist/packages/internal/template-artifact/dist/layout.js +3 -1
  55. package/dist/packages/internal/template-artifact/dist/verify.js +32 -16
  56. package/dist/packages/internal/template-contracts/dist/content-pick.js +24 -1
  57. package/dist/packages/internal/template-contracts/dist/document-value.d.ts +2 -2
  58. package/dist/packages/internal/template-contracts/dist/fact-keys.d.ts +3 -2
  59. package/dist/packages/internal/template-contracts/dist/fact-keys.js +19 -43
  60. package/dist/packages/internal/template-contracts/dist/fact-registry.d.ts +24 -3
  61. package/dist/packages/internal/template-contracts/dist/fact-registry.js +10 -3
  62. package/dist/packages/internal/template-contracts/dist/fill-builders.d.ts +1 -1
  63. package/dist/packages/internal/template-contracts/dist/fill-spec.js +7 -6
  64. package/dist/packages/internal/template-contracts/dist/list.d.ts +1 -1
  65. package/dist/packages/internal/template-contracts/dist/list.js +7 -15
  66. package/dist/packages/internal/template-contracts/dist/mirror-kind.js +2 -2
  67. package/dist/packages/internal/template-contracts/dist/object.js +3 -2
  68. package/dist/packages/internal/template-contracts/dist/process-builders.d.ts +2 -2
  69. package/dist/packages/internal/template-contracts/dist/read-graph.js +5 -32
  70. package/dist/packages/internal/template-contracts/dist/ref-locate.js +10 -6
  71. package/dist/packages/internal/template-contracts/dist/registry-facts.d.ts +1 -1
  72. package/dist/packages/internal/template-contracts/dist/registry-facts.js +13 -24
  73. package/dist/packages/internal/template-contracts/dist/registry-shape.d.ts +20 -4
  74. package/dist/packages/internal/template-contracts/dist/registry-shape.js +69 -11
  75. package/dist/packages/internal/template-contracts/dist/row-planners.js +1 -1
  76. package/dist/packages/internal/template-contracts/dist/row-ref.d.ts +4 -7
  77. package/dist/packages/internal/template-contracts/dist/row-ref.js +7 -23
  78. package/dist/packages/internal/template-contracts/dist/row-sources.js +3 -3
  79. package/dist/packages/internal/template-contracts/dist/row.d.ts +1 -1
  80. package/dist/packages/internal/template-contracts/dist/row.js +6 -7
  81. package/dist/packages/internal/template-contracts/dist/runtime-values.d.ts +5 -20
  82. package/dist/packages/internal/template-contracts/dist/section-schema-types.d.ts +1 -0
  83. package/dist/packages/internal/template-contracts/dist/slot-builders.d.ts +29 -37
  84. package/dist/packages/internal/template-contracts/dist/slot-builders.js +4 -7
  85. package/dist/packages/internal/template-contracts/dist/slot-catalog.d.ts +2 -702
  86. package/dist/packages/internal/template-contracts/dist/slot-catalog.js +2 -498
  87. package/dist/packages/internal/template-contracts/dist/slot-overrides.js +4 -1
  88. package/dist/packages/internal/template-contracts/dist/slot-ref.d.ts +4 -4
  89. package/dist/packages/internal/template-contracts/dist/slot-value.d.ts +2 -1
  90. package/dist/packages/internal/template-contracts/dist/table-members.d.ts +5 -12
  91. package/dist/packages/internal/template-contracts/dist/table-members.js +7 -37
  92. package/dist/packages/internal/template-contracts/dist/tour-value.d.ts +2 -2
  93. package/dist/primitives/Image.d.ts +3 -3
  94. package/dist/primitives/slot-download.d.ts +1 -1
  95. package/dist/primitives/slot-media.d.ts +1 -1
  96. package/dist/schema/fact.d.ts +19 -52
  97. package/dist/schema/fact.js +6 -25
  98. package/dist/schema/facts-view.d.ts +1 -2
  99. package/dist/schema/property-facts.d.ts +1 -62
  100. package/dist/schema/section-schema.d.ts +2 -2
  101. package/dist/schema/section-schema.js +1 -1
  102. package/guide/reference/cli/INDEX.md +2 -2
  103. package/guide/reference/cli/build.md +1 -1
  104. package/guide/reference/cli/check.md +1 -1
  105. package/guide/reference/cli/dev.md +1 -1
  106. package/guide/reference/cli/property-add.md +1 -1
  107. package/guide/reference/cli/property-list.md +1 -1
  108. package/guide/reference/cli/publish.md +1 -1
  109. package/guide/reference/cli/upgrade.md +1 -1
  110. package/guide/reference/rules/INDEX.md +2 -3
  111. package/package.json +1 -1
  112. package/dist/artifact/playground/client/assets/index-BOYbgBnP.js +0 -1259
  113. package/dist/artifact/playground/client/assets/index-DDOcM0zA.css +0 -1
  114. package/dist/packages/internal/section-contracts/dist/option-source-contract.js +0 -22
  115. package/dist/packages/internal/template-contracts/dist/comparable-address.js +0 -19
  116. package/dist/packages/internal/template-contracts/dist/facts-view.d.ts +0 -62
  117. package/dist/packages/internal/template-contracts/dist/legacy-facts.js +0 -167
  118. package/dist/packages/internal/template-contracts/dist/registry-aliases.js +0 -77
@@ -43,7 +43,7 @@ type ImageOptions = Omit<ImgHTMLAttributes<HTMLImageElement>, "src" | "alt" | "w
43
43
  };
44
44
  type Props = (ImageOptions & {
45
45
  /** The whole resolved slot value — `slots.hero_image`, a list element, or a
46
- * nested asset inside a list item's object. `null` renders the empty state. */
46
+ * nested image inside a list item's object. `null` renders the empty state. */
47
47
  value: ImageValue | null | undefined;
48
48
  /** Overrides the value's own alt. Pass `""` for a decorative image. */
49
49
  alt?: string;
@@ -67,7 +67,7 @@ type Props = (ImageOptions & {
67
67
  * `alt` prop, having no alt of its own to fall back on.
68
68
  *
69
69
  * **The box is always yours.** Cropping is baked upstream — the platform delivers a
70
- * pre-cropped asset — and the kit paints no geometry: no aspect, no size, no position.
70
+ * pre-cropped image — and the kit paints no geometry: no aspect, no size, no position.
71
71
  * Whatever box your classes establish is the box, and `object-position` on the `<img>`
72
72
  * is yours to set where a design wants the cover nudged.
73
73
  *
@@ -83,7 +83,7 @@ type Props = (ImageOptions & {
83
83
  *
84
84
  * **Unframed** (`frame={false}`): no wrapper — the `<img>` itself takes your `className`,
85
85
  * for a logo, a slide whose parent already establishes the box, or an image that needs
86
- * its own `object-position`. Pair with `fit="contain"` where the whole asset must stay
86
+ * its own `object-position`. Pair with `fit="contain"` where the whole image must stay
87
87
  * visible. An absent value renders a placeholder box here too — never an `<img>` with
88
88
  * an empty `src`.
89
89
  *
@@ -21,7 +21,7 @@ type DownloadProps<D, As extends ElementType> = DownloadOwnProps<D> & {
21
21
  } & Omit<ComponentPropsWithoutRef<As>, keyof DownloadOwnProps<D> | "as">;
22
22
  /**
23
23
  * Slot.Download — renders one anchor at the original of an image, video or
24
- * document slot's asset, with the author's children as its contents. Opens in a
24
+ * document slot's file, with the author's children as its contents. Opens in a
25
25
  * new tab by default (`target="_blank"`, `rel="noopener noreferrer"`); both are
26
26
  * ordinary props and an author may override either, or add `download`.
27
27
  *
@@ -23,7 +23,7 @@ type SlotImageProps<D> = Omit<ComponentProps<typeof Image>, "value" | "slot" | "
23
23
  * passthrough — is `<Image>`'s own prop, with `<Image>`'s own default. See `./Image.js`
24
24
  * for the framed/unframed/empty render contract this wraps.
25
25
  *
26
- * **Over a video or tour slot it renders that asset's poster.** A template that wants a
26
+ * **Over a video or tour slot it renders that value's poster.** A template that wants a
27
27
  * still of the video or 3D tour the user picked binds THAT slot to this primitive — there
28
28
  * is no separate poster slot to keep in agreement, and no second primitive to learn. The
29
29
  * identity marker names that slot, so a click on the poster opens its card and a new pick
@@ -1,20 +1,11 @@
1
1
  import { AddressMember, AddressValue } from "../packages/internal/template-contracts/dist/address-value.js";
2
- import { FACT_GRAPH, FactGraphName, REGISTRY_TABLE_KEYS, RegistryTable, SOURCE_FIELDS, SourceFieldContainer, SourceFieldName } from "../packages/internal/template-contracts/dist/slot-catalog.js";
3
- import { MediaListKey, RegistryFactKey, RegistryFactValue } from "../packages/internal/template-contracts/dist/fact-keys.js";
2
+ import { RegistryTable } from "../packages/internal/template-contracts/dist/registry-shape.js";
4
3
  import { RegistryTableRow } from "../packages/internal/template-contracts/dist/table-members.js";
5
4
  import { FactRef } from "../packages/internal/template-contracts/dist/slot-ref.js";
6
5
  import { PropertyFactRegistry } from "../packages/internal/template-contracts/dist/fact-registry.js";
7
6
  import { DocumentMediaValue } from "../packages/internal/template-contracts/dist/registry-facts.js";
8
- import { FactValue } from "../packages/internal/template-contracts/dist/facts-view.js";
9
- import "./facts-view.js";
7
+ import { MediaListKey, RegistryFactKey, RegistryFactValue } from "../packages/internal/template-contracts/dist/fact-keys.js";
10
8
  //#region src/schema/fact.d.ts
11
- type SourceFields = typeof SOURCE_FIELDS;
12
- type Graph = typeof FACT_GRAPH;
13
- /**
14
- * A slot's fact binding by a legacy field name: a `home` ref to the canonical field — a typed {@link FactRef}, so one
15
- * value serves `source:` and a declaration's `reads` alike.
16
- */
17
- type DirectFactRef<F extends SourceFieldName> = FactRef<F, FactValue<F & FactGraphName>>;
18
9
  /**
19
10
  * A slot's `derived` binding: a value the section's own `compute()` fn
20
11
  * produces, keyed by the slot's own name. No `fact.*` entry emits one — the
@@ -25,24 +16,6 @@ type DerivedFactRef = {
25
16
  kind: "derived";
26
17
  transform: string;
27
18
  };
28
- type FieldsIn<C extends SourceFieldContainer> = { [F in keyof SourceFields as SourceFields[F]["container"] extends C ? F : never]: DirectFactRef<F & SourceFieldName>; };
29
- declare const PROJECTIONS: {
30
- readonly property: {
31
- readonly latitude: "lat";
32
- readonly longitude: "lon";
33
- };
34
- readonly contact: {
35
- readonly address: "contact_address";
36
- };
37
- };
38
- type Projections = typeof PROJECTIONS;
39
- type ProjectionsIn<C extends SourceFieldContainer> = C extends keyof Projections ? { [K in keyof Projections[C]]: DirectFactRef<Projections[C][K] & SourceFieldName>; } : Record<never, never>;
40
- type ReadableName = { [K in FactGraphName]: Graph[K] extends {
41
- role: "readable";
42
- } ? Graph[K] extends {
43
- primary_of: string;
44
- } ? never : K : never; }[FactGraphName];
45
- type Readables = { [K in ReadableName]: FactRef<K, FactValue<K>>; };
46
19
  /** A ref to a fact the registry declares, by its registry key (`property.address.city`). */
47
20
  type RegistryFactRef<K extends RegistryFactKey> = FactRef<K, RegistryFactValue<K>>;
48
21
  type PropertyPages = PropertyFactRegistry["pages"];
@@ -52,40 +25,35 @@ type RegistryRefs = { readonly [K in keyof PropertyPages as PropertyPages[K]["de
52
25
  } ? never : K]: RegistryFactRef<`property.${K & string}` & RegistryFactKey> & (PropertyPages[K]["declaration"] extends {
53
26
  readonly type: "address";
54
27
  } ? PartRefs<`property.${K & string}`> : unknown); };
55
- type ColumnRefs<T extends RegistryTable> = { readonly [M in keyof RegistryTableRow<T> as M extends "id" ? never : M & string]: FactRef<`${(typeof REGISTRY_TABLE_KEYS)[T]}.${M & string}`, readonly (RegistryTableRow<T>[M] | null)[]>; };
56
- type RegistryTableRefs = { readonly [T in RegistryTable]: FactRef<(typeof REGISTRY_TABLE_KEYS)[T], readonly RegistryTableRow<T>[]> & ColumnRefs<T>; };
28
+ type ColumnRefs<T extends RegistryTable> = { readonly [M in keyof RegistryTableRow<T> as M extends "id" ? never : M & string]: FactRef<`property.${T}.${M & string}`, readonly (RegistryTableRow<T>[M] | null)[]>; };
29
+ type RegistryTableRefs = { readonly [T in RegistryTable]: FactRef<`property.${T}`, readonly RegistryTableRow<T>[]> & ColumnRefs<T>; };
57
30
  type MediaListRefs = { readonly [K in keyof PropertyPages as `property.${K & string}` extends MediaListKey ? K : never]: FactRef<`property.${K & string}`, readonly DocumentMediaValue[]>; };
58
- type PropertyBranch = Omit<FieldsIn<"property"> & ProjectionsIn<"property">, keyof RegistryRefs | RegistryTable | keyof MediaListRefs> & RegistryRefs & RegistryTableRefs & MediaListRefs;
31
+ type PropertyBranch = RegistryRefs & RegistryTableRefs & MediaListRefs;
59
32
  /**
60
- * The shape of `fact`: one branch per source-field container (`property`,
61
- * `unit`, `contact`), each holding an entry for every canonical field in that
62
- * container plus one per declared alias, and beside them one entry per
63
- * readable-only fact. The `property` branch spells the facts the fact registry
64
- * declares as it nests them (`fact.property.address.city`), and each table by its
65
- * registry key (`fact.property.units`). Every entry is a value you pass to a slot
66
- * builder's `source` or to a declaration's `reads`, not a call you make.
33
+ * The shape of `fact`: one branch, `property`, spelling the facts the fact registry
34
+ * declares as it nests them (`fact.property.address.city`), each table by its registry
35
+ * key (`fact.property.units`) and each media list by its own. Every entry is a value you
36
+ * pass to a slot builder's `source` or to a declaration's `reads`, not a call you make.
67
37
  */
68
38
  type FactNamespace = {
69
39
  property: PropertyBranch;
70
- } & { [C in Exclude<SourceFieldContainer, "property">]: FieldsIn<C> & ProjectionsIn<C>; } & Readables;
40
+ };
71
41
  /**
72
- * Where a slot's value comes from, and what a declaration reads: a bindable fact
73
- * as `fact.<container>.<field>`, a readable-only one as `fact.<key>`.
74
- *
75
- * The container is the resolution rule: `fact.property.*` reads the property
76
- * root, `fact.unit.*` the primary unit, `fact.contact.*` the primary contact
77
- * card — a table's other rows are read through a `row()`. Hover
78
- * any entry for its writability — a writable field draws the editor's
79
- * "Update everywhere" toggle, a read-only one does not.
42
+ * Where a slot's value comes from, and what a declaration reads: a property fact as
43
+ * `fact.property.<name>`, the always-on description as `fact.property.description`.
44
+ * A unit's or a contact's member is read through a row of its table (`const contact =
45
+ * row({ label: "Contact", from: fact.property.contacts, locked: true })`, then
46
+ * `contact.phone`). Hover any entry for its writability — a writable field draws the
47
+ * editor's "Update everywhere" toggle, a read-only one does not.
80
48
  *
81
49
  * The property's media is three lists, each named in a `compute`'s or a fill's `reads`
82
- * and read as its assets' records (`Media`): `fact.property.uploads`, every upload;
50
+ * and read as its media records (`Media`): `fact.property.uploads`, every upload;
83
51
  * `fact.property.property_media`, what shows the property — its photos, videos and tours; and
84
52
  * `fact.property.floor_plans`, its plans. A media slot is never sourced by one: it
85
53
  * picks `from` one (`image({ from: fact.property.property_media, source: fill.pick({ brief }) })`).
86
54
  * The property's cover photo, `fact.property.hero`, is one image picked from its media:
87
55
  * an `image` slot binds it (`image({ source: fact.property.hero })`), and a `compute()`
88
- * reads it as its asset's record (`Media`), `null` when the property has none.
56
+ * reads it as its media record (`Media`), `null` when the property has none.
89
57
  *
90
58
  * A table (`fact.property.units`, `.commercial_spaces`, `.contacts`, `.comparables`) is a list's `source:` and
91
59
  * a row's `from`. One row's members are read through a row slot —
@@ -98,8 +66,7 @@ type FactNamespace = {
98
66
  * A table's column — `fact.property.units.beds` — is one member over every row, in row
99
67
  * order, `null` where a row leaves it unanswered: read it where a declaration needs that
100
68
  * member and not the whole row, since a whole-table read counts every member as used.
101
- * `fact.unit.beds` stays the primary row's member.
102
69
  */
103
70
  declare const fact: FactNamespace;
104
71
  //#endregion
105
- export { DerivedFactRef, DirectFactRef, FactNamespace, RegistryFactRef, fact };
72
+ export { DerivedFactRef, FactNamespace, RegistryFactRef, fact };
@@ -1,9 +1,8 @@
1
- import { FACT_GRAPH, FACT_PROJECTIONS, REGISTRY_TABLE_KEYS, SOURCE_FIELDS } from "../packages/internal/template-contracts/dist/slot-catalog.js";
1
+ import { tableKey, tableNames } from "../packages/internal/template-contracts/dist/registry-shape.js";
2
2
  import { mediaListKeys, registryFactKeys } from "../packages/internal/template-contracts/dist/fact-keys.js";
3
3
  import { registryMemberNames } from "../packages/internal/template-contracts/dist/table-members.js";
4
4
 
5
5
  //#region src/schema/fact.ts
6
- const PROJECTIONS = FACT_PROJECTIONS;
7
6
  function withMembers(base, path, members) {
8
7
  const refs = new Map(members.map((member) => [member, {
9
8
  kind: "home",
@@ -18,24 +17,11 @@ function withMembers(base, path, members) {
18
17
  } });
19
18
  }
20
19
  function buildNamespace() {
21
- const containers = {
22
- property: {},
23
- unit: {},
24
- contact: {}
25
- };
26
- for (const [field, descriptor] of Object.entries(SOURCE_FIELDS)) containers[descriptor.container][field] = {
27
- kind: "home",
28
- key: field
29
- };
30
- for (const [container, entries] of Object.entries(PROJECTIONS)) for (const [name, field] of Object.entries(entries)) containers[container][name] = {
31
- kind: "home",
32
- key: field
33
- };
34
- const property = containers.property;
35
- for (const [table, key] of Object.entries(REGISTRY_TABLE_KEYS)) property[table] = withMembers({
20
+ const property = {};
21
+ for (const table of tableNames()) property[table] = withMembers({
36
22
  kind: "home",
37
- key
38
- }, key, registryMemberNames(table));
23
+ key: tableKey(table)
24
+ }, tableKey(table), registryMemberNames(table));
39
25
  for (const key of mediaListKeys()) property[key.slice(9)] = {
40
26
  kind: "home",
41
27
  key
@@ -51,12 +37,7 @@ function buildNamespace() {
51
37
  };
52
38
  property[name] = parts.length > 0 ? withMembers(ref, key, parts) : ref;
53
39
  }
54
- const namespace = { ...containers };
55
- for (const [key, entry] of Object.entries(FACT_GRAPH)) if (entry.role === "readable" && entry.primary_of === void 0) namespace[key] = {
56
- kind: "home",
57
- key
58
- };
59
- return namespace;
40
+ return { property };
60
41
  }
61
42
  const fact = buildNamespace();
62
43
 
@@ -1,6 +1,5 @@
1
1
  import { RegistryTableRow } from "../packages/internal/template-contracts/dist/table-members.js";
2
2
  import { AsRead } from "../packages/internal/template-contracts/dist/slot-ref.js";
3
- import { FactValue, FactsAddress, FactsRow } from "../packages/internal/template-contracts/dist/facts-view.js";
4
3
  //#region src/schema/facts-view.d.ts
5
4
  /** One unit of `fact.property.units`, as a `compute()` reading the table receives it. */
6
5
  type FactsUnit = AsRead<RegistryTableRow<"units">>;
@@ -11,4 +10,4 @@ type FactsCommercialSpace = AsRead<RegistryTableRow<"commercial_spaces">>;
11
10
  /** One comparable of `fact.property.comparables`, as a `compute()` reading the table receives it. */
12
11
  type FactsComparable = AsRead<RegistryTableRow<"comparables">>;
13
12
  //#endregion
14
- export { type FactValue, type FactsAddress, FactsCommercialSpace, FactsComparable, FactsContact, FactsUnit };
13
+ export { FactsCommercialSpace, FactsComparable, FactsContact, FactsUnit };
@@ -4,66 +4,5 @@ type Coordinates = {
4
4
  lat: number;
5
5
  lng: number;
6
6
  };
7
- /**
8
- * The property's always-on prose description — the substrate every text
9
- * decision is grounded in, and a fact a `compute()` reads directly. `""` is a
10
- * real state (nothing written yet), never a placeholder.
11
- */
12
- type Narrative = {
13
- description: string;
14
- };
15
- /**
16
- * One comparable property — a recently sold or currently listed home similar
17
- * to the subject — as the legacy `comparables` reading flattens it: its address as
18
- * flat members and one display line. A `compute()` reading `fact.property.comparables`
19
- * receives `FactsComparable` instead — the address one address value, the photo
20
- * the comp's own media. Not a bound record list's row, which is its `id` plus the fields the
21
- * list declares. `address`, `distance_m` and `price_period` are the three members the
22
- * live projection derives (the display line, meters from the subject, and what the
23
- * price is denominated in).
24
- */
25
- type ComparableRow = {
26
- id: string;
27
- address_street: string | null;
28
- address_city: string | null;
29
- address_state: string | null;
30
- address_postal: string | null;
31
- address: string;
32
- lat: number | null;
33
- lng: number | null;
34
- distance_m: number | null;
35
- status: "sold" | "active" | null;
36
- /** One integer in dollars — the sale price when sold, the list price otherwise. Read it with `price_period`, which says whether the figure is a total or a rent per month. */
37
- price: number | null;
38
- /** What `price` is denominated in: `"monthly"` for comps on a for-rent property, `"total"` otherwise. Never null — a price printed without it renders a $2,400 rent as a sale. */
39
- price_period: "total" | "monthly";
40
- /** ISO `YYYY-MM-DD`; null unless sold. */
41
- sale_date: string | null;
42
- beds: number | null;
43
- baths: number | null;
44
- sqft: number | null;
45
- /**
46
- * The comp's photo: the id of an upload the comparable itself owns — never one of the
47
- * property's own photos, so no media pool offers it. `null` when none was uploaded. A
48
- * `compute()` over `fact.property.comparables` reads it as `photo`, the comp's own media.
49
- */
50
- photo_upload_id: string | null;
51
- /** The year the comparable was built. */
52
- year_built?: number | null;
53
- /** Lot size in square feet. */
54
- lot_sqft?: number | null;
55
- stories?: number | null;
56
- /** Units in the comparable's BUILDING — a multifamily figure, unrelated to the subject's `units`. */
57
- units?: number | null;
58
- /** Monthly HOA dues in dollars. */
59
- hoa_monthly?: number | null;
60
- /** The asking price in dollars, beside `price` — the pair is what "sold over asking" reads. */
61
- list_price?: number | null;
62
- /** ISO `YYYY-MM-DD` — when the listing went live, not when it closed. */
63
- listed_date?: string | null;
64
- mls_number?: string | null;
65
- /** The listing remarks, verbatim from the source. */
66
- description?: string | null;
67
- };
68
7
  //#endregion
69
- export { ComparableRow, Coordinates, Narrative };
8
+ export { Coordinates };
@@ -6,7 +6,7 @@ import { PoiPhoto, PoiRow } from "../packages/internal/template-contracts/dist/p
6
6
  import { AuthorImage, ImageCollectionValue, ImageValue, MediaValue, PlaybackConfig } from "../packages/internal/template-contracts/dist/runtime-values.js";
7
7
  import { ItemIdentity, ObjectValue, SlotValue } from "../packages/internal/template-contracts/dist/slot-value.js";
8
8
  import { Slot } from "../packages/internal/template-contracts/dist/slot-types.js";
9
- import { ComparableRow, Coordinates, Narrative } from "./property-facts.js";
9
+ import { Coordinates } from "./property-facts.js";
10
10
  import { SectionProps } from "./section-props.js";
11
11
  import { z } from "zod";
12
12
  //#region src/schema/section-schema.d.ts
@@ -46,4 +46,4 @@ declare const SectionSchema: z.ZodObject<{
46
46
  /** The authored input shape of `SectionSchema` — what `as const satisfies SectionSchemaShape` checks a section's `schema.ts` against. */
47
47
  type SectionSchemaShape = z.input<typeof SectionSchema>;
48
48
  //#endregion
49
- export { type AddressValue, type AuthorImage, type ComparableRow, type Coordinates, DisplayEntryShape, DisplayShape, type DocumentCollectionValue, type DocumentValue, type ImageCollectionValue, type ImageValue, type ItemIdentity, type MediaValue, type Narrative, type ObjectValue, type PlaybackConfig, type PoiPhoto, type PoiRow, SectionSchema, SectionSchemaShape, type Slot, type SlotValue, type TourCollectionValue, type TourValue, type VideoCollectionValue, type VideoValue };
49
+ export { type AddressValue, type AuthorImage, type Coordinates, DisplayEntryShape, DisplayShape, type DocumentCollectionValue, type DocumentValue, type ImageCollectionValue, type ImageValue, type ItemIdentity, type MediaValue, type ObjectValue, type PlaybackConfig, type PoiPhoto, type PoiRow, SectionSchema, SectionSchemaShape, type Slot, type SlotValue, type TourCollectionValue, type TourValue, type VideoCollectionValue, type VideoValue };
@@ -1,4 +1,4 @@
1
- import { CONTENT_SLOT_TYPES, REFERRAL_FIELDS, REF_SLOT_TYPES, SLOT_TYPES } from "../packages/internal/template-contracts/dist/slot-catalog.js";
1
+ import { CONTENT_SLOT_TYPES, REF_SLOT_TYPES, SLOT_TYPES } from "../packages/internal/template-contracts/dist/slot-catalog.js";
2
2
  import { SerializedReads, SlotDef } from "../packages/internal/template-contracts/dist/slot-types.js";
3
3
  import { z } from "zod";
4
4
 
@@ -3,7 +3,7 @@ purpose: Every `concrete` command, with its full flag surface, exit codes and co
3
3
  mode: reference
4
4
  status: generated
5
5
  generated_from: the concrete command table
6
- applies_to: "@homepages/concrete >=9.0.0 <10.0.0"
6
+ applies_to: "@homepages/concrete >=10.0.0 <11.0.0"
7
7
  related: [INDEX.md]
8
8
  ---
9
9
  # Command reference
@@ -79,7 +79,7 @@ of its flags.
79
79
 
80
80
  ## Versions
81
81
 
82
- These pages describe `@homepages/concrete` **>=9.0.0 <10.0.0**. The range, rather than
82
+ These pages describe `@homepages/concrete` **>=10.0.0 <11.0.0**. The range, rather than
83
83
  the exact version they were generated from: this reference is committed build output,
84
84
  so a page stamped with a patch version would be stale the day it shipped.
85
85
  `concrete --version` prints the installed one.
@@ -3,7 +3,7 @@ purpose: The `concrete build` command — its flags, exit codes and constraints.
3
3
  mode: reference
4
4
  status: generated
5
5
  generated_from: the concrete command table
6
- applies_to: "@homepages/concrete >=9.0.0 <10.0.0"
6
+ applies_to: "@homepages/concrete >=10.0.0 <11.0.0"
7
7
  related: [reference/cli/INDEX.md]
8
8
  ---
9
9
  # concrete build
@@ -3,7 +3,7 @@ purpose: The `concrete check` command — its flags, exit codes and constraints.
3
3
  mode: reference
4
4
  status: generated
5
5
  generated_from: the concrete command table
6
- applies_to: "@homepages/concrete >=9.0.0 <10.0.0"
6
+ applies_to: "@homepages/concrete >=10.0.0 <11.0.0"
7
7
  related: [reference/cli/INDEX.md]
8
8
  ---
9
9
  # concrete check
@@ -3,7 +3,7 @@ purpose: The `concrete dev` command — its flags, exit codes and constraints.
3
3
  mode: reference
4
4
  status: generated
5
5
  generated_from: the concrete command table
6
- applies_to: "@homepages/concrete >=9.0.0 <10.0.0"
6
+ applies_to: "@homepages/concrete >=10.0.0 <11.0.0"
7
7
  related: [reference/cli/INDEX.md]
8
8
  ---
9
9
  # concrete dev
@@ -3,7 +3,7 @@ purpose: The `concrete property add` command — its flags, exit codes and const
3
3
  mode: reference
4
4
  status: generated
5
5
  generated_from: the concrete command table
6
- applies_to: "@homepages/concrete >=9.0.0 <10.0.0"
6
+ applies_to: "@homepages/concrete >=10.0.0 <11.0.0"
7
7
  related: [reference/cli/INDEX.md]
8
8
  ---
9
9
  # concrete property add
@@ -3,7 +3,7 @@ purpose: The `concrete property list` command — its flags, exit codes and cons
3
3
  mode: reference
4
4
  status: generated
5
5
  generated_from: the concrete command table
6
- applies_to: "@homepages/concrete >=9.0.0 <10.0.0"
6
+ applies_to: "@homepages/concrete >=10.0.0 <11.0.0"
7
7
  related: [reference/cli/INDEX.md]
8
8
  ---
9
9
  # concrete property list
@@ -3,7 +3,7 @@ purpose: The `concrete publish` command — its flags, exit codes and constraint
3
3
  mode: reference
4
4
  status: generated
5
5
  generated_from: the concrete command table
6
- applies_to: "@homepages/concrete >=9.0.0 <10.0.0"
6
+ applies_to: "@homepages/concrete >=10.0.0 <11.0.0"
7
7
  related: [reference/cli/INDEX.md]
8
8
  ---
9
9
  # concrete publish
@@ -3,7 +3,7 @@ purpose: The `concrete upgrade` command — its flags, exit codes and constraint
3
3
  mode: reference
4
4
  status: generated
5
5
  generated_from: the concrete command table
6
- applies_to: "@homepages/concrete >=9.0.0 <10.0.0"
6
+ applies_to: "@homepages/concrete >=10.0.0 <11.0.0"
7
7
  related: [reference/cli/INDEX.md]
8
8
  ---
9
9
  # concrete upgrade
@@ -3,7 +3,7 @@ purpose: Every rule `concrete check` grades, by the stage that grades it, in the
3
3
  mode: reference
4
4
  status: generated
5
5
  generated_from: the concrete rule registry
6
- applies_to: "@homepages/concrete >=9.0.0 <10.0.0"
6
+ applies_to: "@homepages/concrete >=10.0.0 <11.0.0"
7
7
  related: [reference/cli/check.md]
8
8
  ---
9
9
  # Rule reference
@@ -161,8 +161,7 @@ Every placed section's schema and fill spec satisfy the contract assertions publ
161
161
  | `concrete/contract/record-collection` | contract | A list bound to a fact binds a registry table and may only narrow its min and max. |
162
162
  | `concrete/contract/nested-slot-types` | contract | An object's fields, a nested list item's included, are each a value slot, a row or a list, of a kind the catalog declares. |
163
163
  | `concrete/contract/list-scalar` | contract | A list declares exactly one legal item, a value element, an object or a row, with satisfiable bounds. |
164
- | `concrete/contract/select` | contract | A select declares exactly one of values or options. |
165
- | `concrete/contract/option-source` | contract | A select with an option source names a source the platform provides. |
164
+ | `concrete/contract/select` | contract | A select names its choices in exactly one place: its values, or a fact it is bound to that declares them. |
166
165
  | `concrete/contract/url` | contract | A url slot's accepts names a link kind or provider that a registered provider implements. |
167
166
  | `concrete/contract/sources` | contract | No slot declares sources, since a media slot takes a pasted link wherever a link provider claims its kind; a media slot picks `from` a media list of the property, or owns its asset without one, and processes only what its kind takes; a slot bound to a fact states neither. |
168
167
  | `concrete/contract/interpolation` | contract | A fill brief refers to its facts through reads and never interpolates one. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homepages/concrete",
3
- "version": "9.1.0",
3
+ "version": "10.0.0",
4
4
  "description": "Concrete, the HomePages template framework: the authoring API, the contract primitives, the styles, the lint preset and the `concrete` command in one package that owns its whole toolchain.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",