@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.
Files changed (269) hide show
  1. package/CHANGELOG.md +336 -0
  2. package/README.md +28 -17
  3. package/codemods/fill-is-a-source.mjs +533 -0
  4. package/codemods/manifest.json +12 -0
  5. package/codemods/reads-replace-reconcile.mjs +285 -0
  6. package/dist/artifact/playground/client/assets/{index-D1fwOGVK.js → index-u3T7DiSN.js} +96 -96
  7. package/dist/artifact/playground/client/index.html +1 -1
  8. package/dist/artifact/playground/host.mjs +23 -23
  9. package/dist/base.css +3 -8
  10. package/dist/browser/site-config.js +1 -16
  11. package/dist/browser/submit-lead.js +0 -31
  12. package/dist/cli/build/artifact.js +16 -23
  13. package/dist/cli/build/captures.js +0 -6
  14. package/dist/cli/build/esbuild.js +0 -17
  15. package/dist/cli/build/fixtures.js +15 -30
  16. package/dist/cli/build/icons.js +0 -3
  17. package/dist/cli/build/index.js +1 -1
  18. package/dist/cli/build/playground.js +4 -8
  19. package/dist/cli/build/sections.js +9 -30
  20. package/dist/cli/build/source.js +52 -27
  21. package/dist/cli/build/static.js +4 -25
  22. package/dist/cli/capture/bundle.js +0 -9
  23. package/dist/cli/capture/capture-browser.js +0 -14
  24. package/dist/cli/capture/capture.js +1 -8
  25. package/dist/cli/check/analyze.js +2 -5
  26. package/dist/cli/check/index.js +1 -1
  27. package/dist/cli/check/line-endings.js +52 -0
  28. package/dist/cli/check/load-workspace.js +3 -8
  29. package/dist/cli/check/portable-names.js +48 -0
  30. package/dist/cli/check/render/class-conflicts.js +0 -5
  31. package/dist/cli/check/render/html.js +0 -1
  32. package/dist/cli/check/render/invariants.js +0 -5
  33. package/dist/cli/check/render/island-frames.js +0 -25
  34. package/dist/cli/check/render/marker-coverage.js +0 -20
  35. package/dist/cli/check/render/nav.js +0 -33
  36. package/dist/cli/check/report.js +0 -3
  37. package/dist/cli/check/stages/bundles.js +1 -9
  38. package/dist/cli/check/stages/composition.js +3 -2
  39. package/dist/cli/check/stages/dependencies.js +7 -38
  40. package/dist/cli/check/stages/fixtures.js +3 -31
  41. package/dist/cli/check/stages/lint.js +2 -2
  42. package/dist/cli/check/stages/logic.js +3 -34
  43. package/dist/cli/check/stages/relations.js +46 -0
  44. package/dist/cli/check/stages/render.js +0 -1
  45. package/dist/cli/check/stages/sections.js +3 -3
  46. package/dist/cli/check/stages/stylesheet.js +1 -1
  47. package/dist/cli/check/stages/typecheck.js +5 -11
  48. package/dist/cli/check/stages/workspace.js +36 -14
  49. package/dist/cli/commands.js +9 -56
  50. package/dist/cli/currency/cache.js +4 -17
  51. package/dist/cli/currency/decide.js +0 -14
  52. package/dist/cli/currency/opt-out.js +0 -7
  53. package/dist/cli/currency/preamble.js +3 -24
  54. package/dist/cli/currency/prompt.js +0 -1
  55. package/dist/cli/currency/refresh.js +5 -12
  56. package/dist/cli/currency/resolve-latest.js +3 -64
  57. package/dist/cli/currency/version-order.js +0 -12
  58. package/dist/cli/dev/crop.js +0 -2
  59. package/dist/cli/dev/http.js +0 -13
  60. package/dist/cli/dev/index.js +3 -4
  61. package/dist/cli/dev/islands.js +25 -70
  62. package/dist/cli/dev/listen.js +26 -0
  63. package/dist/cli/dev/load-template.js +0 -1
  64. package/dist/cli/dev/request-error.js +0 -4
  65. package/dist/cli/dev/server.js +46 -52
  66. package/dist/cli/dev/tsconfig-paths.js +0 -13
  67. package/dist/cli/dev/vite.js +9 -38
  68. package/dist/cli/dev/workspace-reader.js +4 -34
  69. package/dist/cli/media/cache.js +4 -51
  70. package/dist/cli/media/derive.js +2 -94
  71. package/dist/cli/media/deriver-plugin.js +0 -2
  72. package/dist/cli/media/frame-rung-floor.js +0 -6
  73. package/dist/cli/property/index.js +0 -4
  74. package/dist/cli/property/library.js +6 -24
  75. package/dist/cli/publish/client.js +0 -1
  76. package/dist/cli/publish/freshness.js +0 -2
  77. package/dist/cli/publish/git.js +2 -8
  78. package/dist/cli/publish/index.js +8 -15
  79. package/dist/cli/publish/pack.js +5 -6
  80. package/dist/cli/publish/report.js +0 -6
  81. package/dist/cli/publish/target.js +16 -13
  82. package/dist/cli/publish/wire.js +0 -6
  83. package/dist/cli/tar.js +2 -9
  84. package/dist/cli/upgrade/codemod.js +0 -8
  85. package/dist/cli/upgrade/index.js +0 -24
  86. package/dist/cli/upgrade/manifest.js +0 -12
  87. package/dist/cli/upgrade/plan.js +0 -17
  88. package/dist/cli/upgrade/stage.js +12 -15
  89. package/dist/cli/version.js +0 -8
  90. package/dist/cli/workspace.js +2 -34
  91. package/dist/cli.js +4 -21
  92. package/dist/css/compile.js +25 -28
  93. package/dist/css/graph.js +3 -10
  94. package/dist/css/inline.js +3 -13
  95. package/dist/css/rules.js +6 -43
  96. package/dist/design-system/format-variants.js +0 -22
  97. package/dist/eslint/authoring.js +0 -2
  98. package/dist/eslint/correctness.js +0 -7
  99. package/dist/eslint/rules/editor-reason.js +0 -11
  100. package/dist/eslint/rules/island-ids.js +0 -1
  101. package/dist/eslint/rules/jsx-visitor.js +0 -13
  102. package/dist/eslint/rules/no-editor-globals.js +0 -2
  103. package/dist/eslint/rules/no-raw-values.js +0 -1
  104. package/dist/fixtures/brand.js +0 -1
  105. package/dist/fixtures/bundle-rule.js +4 -9
  106. package/dist/fixtures/canonical.d.ts +20 -0
  107. package/dist/fixtures/image-dimensions.js +0 -1
  108. package/dist/fixtures/load.js +8 -17
  109. package/dist/fixtures/media-plugin.js +4 -31
  110. package/dist/fixtures/media.js +0 -21
  111. package/dist/fixtures/package-stylesheets.js +0 -6
  112. package/dist/fixtures/property.js +16 -15
  113. package/dist/fixtures/resolve.js +102 -29
  114. package/dist/fixtures/rows.js +12 -11
  115. package/dist/fixtures/synthesize-empties.js +0 -4
  116. package/dist/fixtures.d.ts +19 -4
  117. package/dist/fixtures.js +0 -18
  118. package/dist/index.d.ts +8 -9
  119. package/dist/index.js +2 -11
  120. package/dist/islands/client-module.js +0 -11
  121. package/dist/islands/marker.js +0 -33
  122. package/dist/node_modules/.pnpm/fflate@0.8.3/node_modules/fflate/esm/browser.js +0 -20
  123. package/dist/packages/external/concrete/package.js +1 -1
  124. package/dist/packages/internal/fill-bake/dist/bake-property-ref.js +21 -35
  125. package/dist/packages/internal/fill-bake/dist/compute-reads.js +4 -0
  126. package/dist/packages/internal/fill-bake/dist/derive-source.js +40 -0
  127. package/dist/packages/internal/fill-bake/dist/display.js +0 -1
  128. package/dist/packages/internal/fill-bake/dist/index.js +4 -4
  129. package/dist/packages/internal/fill-vocabulary/dist/origination.js +106 -0
  130. package/dist/packages/internal/fill-vocabulary/dist/row-planners.js +1 -49
  131. package/dist/packages/internal/format-geometry/dist/capture.js +10 -240
  132. package/dist/packages/internal/format-geometry/dist/geometry.js +0 -6
  133. package/dist/packages/internal/image-ladder/dist/crop.js +0 -12
  134. package/dist/packages/internal/image-ladder/dist/policy.js +0 -14
  135. package/dist/packages/internal/island-runtime/dist/capture-holds.js +0 -13
  136. package/dist/packages/internal/island-runtime/dist/contract.js +0 -34
  137. package/dist/packages/internal/island-runtime/dist/editor-instance-context.js +0 -1
  138. package/dist/packages/internal/island-runtime/dist/index.js +0 -34
  139. package/dist/packages/internal/island-runtime/dist/island-id-context.js +0 -1
  140. package/dist/packages/internal/island-runtime/dist/use-capture-ready.js +0 -15
  141. package/dist/packages/internal/island-runtime/dist/use-editor.js +0 -10
  142. package/dist/packages/internal/island-runtime/dist/use-island-id.js +0 -32
  143. package/dist/packages/internal/property-facts/dist/derive-facts-view.js +2 -17
  144. package/dist/packages/internal/property-facts/dist/index.js +1 -1
  145. package/dist/packages/internal/property-facts/dist/{property-facts-CSdkSuD7.js → property-facts-5pxZnlkh.js} +13 -2
  146. package/dist/packages/internal/section-contracts/dist/cap-contract.js +1 -18
  147. package/dist/packages/internal/section-contracts/dist/catalog.js +16 -8
  148. package/dist/packages/internal/section-contracts/dist/choose-select-contract.js +12 -16
  149. package/dist/packages/internal/section-contracts/dist/count-bounds-contract.js +5 -11
  150. package/dist/packages/internal/section-contracts/dist/display-contract.js +2 -0
  151. package/dist/packages/internal/section-contracts/dist/display-evidence-contract.js +2 -8
  152. package/dist/packages/internal/section-contracts/dist/fill-spec-view.js +13 -0
  153. package/dist/packages/internal/section-contracts/dist/index.js +2 -1
  154. package/dist/packages/internal/section-contracts/dist/interpolation-contract.js +16 -42
  155. package/dist/packages/internal/section-contracts/dist/list-fill-contract.js +24 -43
  156. package/dist/packages/internal/section-contracts/dist/name-title-contract.js +11 -18
  157. package/dist/packages/internal/section-contracts/dist/poi-curation-contract.js +10 -12
  158. package/dist/packages/internal/section-contracts/dist/pooling-field-contract.js +3 -13
  159. package/dist/packages/internal/section-contracts/dist/row-fill-contract.js +6 -18
  160. package/dist/packages/internal/section-contracts/dist/runners.js +21 -13
  161. package/dist/packages/internal/section-contracts/dist/source-contract.js +13 -2
  162. package/dist/packages/internal/section-contracts/dist/writer-reads-fact-contract.js +31 -0
  163. package/dist/packages/internal/source-resolution/dist/index.js +1 -9
  164. package/dist/packages/internal/template-artifact/dist/hash.js +0 -8
  165. package/dist/packages/internal/template-artifact/dist/index.js +1 -1
  166. package/dist/packages/internal/template-artifact/dist/layout.js +0 -39
  167. package/dist/packages/internal/template-artifact/dist/manifest.js +1 -9
  168. package/dist/packages/internal/template-artifact/dist/sha256.js +0 -1
  169. package/dist/packages/internal/template-artifact/dist/verify.js +2 -4
  170. package/dist/packages/internal/template-contracts/dist/collection-editing.js +0 -16
  171. package/dist/packages/internal/template-contracts/dist/content-categories.js +0 -4
  172. package/dist/packages/internal/template-contracts/dist/facts-view.d.ts +16 -10
  173. package/dist/packages/internal/template-contracts/dist/facts-view.js +15 -28
  174. package/dist/packages/internal/template-contracts/dist/layout.js +0 -7
  175. package/dist/packages/internal/template-contracts/dist/markers.js +0 -29
  176. package/dist/packages/internal/template-contracts/dist/select-key.js +0 -6
  177. package/dist/packages/internal/template-contracts/dist/slot-catalog.d.ts +56 -34
  178. package/dist/packages/internal/template-contracts/dist/slot-catalog.js +22 -389
  179. package/dist/platform/file-url.js +8 -0
  180. package/dist/platform/fs.js +73 -0
  181. package/dist/platform/names.js +63 -0
  182. package/dist/platform/order.js +7 -0
  183. package/dist/platform/paths.js +62 -0
  184. package/dist/platform/process.js +97 -0
  185. package/dist/playground/host/page-state.js +0 -2
  186. package/dist/playground/host/paths.js +0 -1
  187. package/dist/playground/layout.js +0 -7
  188. package/dist/playground/wire.js +0 -8
  189. package/dist/primitives/FrameShell.js +0 -18
  190. package/dist/primitives/Image.d.ts +5 -1
  191. package/dist/primitives/Image.js +2 -68
  192. package/dist/primitives/Section.js +0 -13
  193. package/dist/primitives/Tour.js +0 -26
  194. package/dist/primitives/Video.js +0 -32
  195. package/dist/primitives/embed-playback.js +0 -1
  196. package/dist/primitives/marker-attrs.js +0 -17
  197. package/dist/primitives/picture-sources.js +6 -1
  198. package/dist/primitives/probe-context.js +0 -7
  199. package/dist/primitives/slot-bindings.js +0 -46
  200. package/dist/primitives/slot-document.js +0 -11
  201. package/dist/primitives/slot-group.js +0 -9
  202. package/dist/primitives/slot-media.js +0 -27
  203. package/dist/primitives/slot-scalar.js +0 -4
  204. package/dist/primitives/slot.js +0 -6
  205. package/dist/rules/registry.js +42 -24
  206. package/dist/schema/compute.d.ts +46 -8
  207. package/dist/schema/compute.js +21 -15
  208. package/dist/schema/define-schema.d.ts +1 -1
  209. package/dist/schema/define-schema.js +37 -17
  210. package/dist/schema/extract-fill-spec.js +93 -180
  211. package/dist/schema/extract-used-facts.js +16 -158
  212. package/dist/schema/fact.d.ts +25 -12
  213. package/dist/schema/fact.js +7 -11
  214. package/dist/schema/fill-builders.d.ts +91 -366
  215. package/dist/schema/fill-builders.js +21 -259
  216. package/dist/schema/fill-declaration.d.ts +7 -69
  217. package/dist/schema/fill-declaration.js +5 -34
  218. package/dist/schema/fill-spec.js +59 -148
  219. package/dist/schema/format-presets.js +0 -12
  220. package/dist/schema/format.js +0 -7
  221. package/dist/schema/layout.js +0 -10
  222. package/dist/schema/manifest.js +0 -39
  223. package/dist/schema/property-facts.d.ts +20 -0
  224. package/dist/schema/section-nav.js +0 -15
  225. package/dist/schema/section-schema.d.ts +0 -1
  226. package/dist/schema/section-schema.js +4 -20
  227. package/dist/schema/slot-builders.d.ts +128 -117
  228. package/dist/schema/slot-builders.js +18 -201
  229. package/dist/schema/slot-ref.d.ts +63 -0
  230. package/dist/schema/slot-ref.js +33 -0
  231. package/dist/schema/slot-types.d.ts +3 -2
  232. package/dist/schema/slot-types.js +11 -20
  233. package/dist/section/declare.d.ts +14 -10
  234. package/dist/section/declare.js +13 -2
  235. package/dist/section/discovery.js +6 -21
  236. package/dist/section/groups.js +0 -6
  237. package/dist/section/materialize.js +0 -5
  238. package/dist/section/placements.js +0 -4
  239. package/dist/section/section.d.ts +8 -5
  240. package/dist/section/section.js +7 -29
  241. package/dist/styles.css +5 -0
  242. package/dist/template/define-template.d.ts +0 -4
  243. package/dist/template/define-template.js +1 -15
  244. package/dist/template/logic-build.js +8 -35
  245. package/dist/template/logic-shim.d.ts +4 -5
  246. package/dist/template/logic-shim.js +2 -6
  247. package/dist/template/logic-transform.js +0 -6
  248. package/dist/template/materialize.js +52 -43
  249. package/dist/template/mirror-types.js +43 -0
  250. package/dist/template/running-copy.js +5 -20
  251. package/dist/template/section-reads.js +83 -0
  252. package/guide/reference/cli/INDEX.md +12 -6
  253. package/guide/reference/cli/build.md +1 -1
  254. package/guide/reference/cli/check.md +1 -1
  255. package/guide/reference/cli/dev.md +3 -3
  256. package/guide/reference/cli/property-add.md +1 -1
  257. package/guide/reference/cli/property-list.md +1 -1
  258. package/guide/reference/cli/publish.md +4 -2
  259. package/guide/reference/cli/upgrade.md +1 -1
  260. package/guide/reference/rules/INDEX.md +26 -13
  261. package/package.json +4 -2
  262. package/dist/packages/internal/fact-interpolation/dist/index.js +0 -22
  263. package/dist/packages/internal/fill-bake/dist/reconcile-cross-section.js +0 -170
  264. package/dist/packages/internal/fill-vocabulary/dist/facts.d.ts +0 -32
  265. package/dist/packages/internal/fill-vocabulary/dist/facts.js +0 -131
  266. package/dist/packages/internal/template-contracts/dist/slot-overrides.js +0 -11
  267. package/dist/schema/fill-spec.d.ts +0 -18
  268. package/dist/template/reconcile.d.ts +0 -67
  269. package/dist/template/reconcile.js +0 -25
@@ -2,12 +2,13 @@ import { LinkKind, LinkProviderId, SourceFieldName, SourceFilter, VideoSource, W
2
2
  import { VideoValue } from "../packages/internal/template-contracts/dist/video-value.js";
3
3
  import { TourValue } from "../packages/internal/template-contracts/dist/tour-value.js";
4
4
  import { ImageValue, PlaybackConfig } from "./runtime-values.js";
5
- import { ComputeBinding } from "./compute.js";
6
- import { BuiltDecision, ChosenRows, DisplayChoice, NamedRows } from "./fill-builders.js";
7
- import { LayoutRow } from "./layout.js";
8
- import { FillMark, FillOption } from "./fill-declaration.js";
5
+ import { FillBinding, FillFor } from "./fill-builders.js";
6
+ import { FillMark } from "./fill-declaration.js";
9
7
  import { ListFieldSlot, ListItemSlot } from "./slot-types.js";
8
+ import { RefValue, SiblingSlot, SlotRef } from "./slot-ref.js";
10
9
  import { RowValue, SlotValue } from "./section-props.js";
10
+ import { LayoutRow } from "./layout.js";
11
+ import { ComputeBinding } from "./compute.js";
11
12
  //#region src/schema/slot-builders.d.ts
12
13
  /**
13
14
  * Where a slot's value comes from: the `direct` literal a `fact.*` entry emits
@@ -21,8 +22,31 @@ type SlotSource = {
21
22
  kind: "derived";
22
23
  transform: string;
23
24
  };
24
- type SourceMark<HasSource extends SlotSource | ComputeBinding<unknown> | undefined> = HasSource extends SlotSource | ComputeBinding<unknown> ? {
25
+ type SourceMark<HasSource extends SourceBinding | undefined> = HasSource extends SlotSource | ComputeBinding<unknown> ? {
25
26
  source: HasSource;
27
+ } : HasSource extends MirrorSource ? {
28
+ source: ComputeBinding<unknown>;
29
+ } : unknown;
30
+ /**
31
+ * A MIRROR's `source:` — another slot, whose value this slot IS: another section's
32
+ * slot ref (`Hero.slots.title`, `Video.display.variant`) or, inside one section, a
33
+ * sibling slot's own const. The builder rewrites it to the identity `compute()` over
34
+ * that one read, so the slot settles, propagates and takes a user's whole-slot
35
+ * override exactly as a computed slot does. Nothing writes through to the upstream.
36
+ */
37
+ type MirrorSource = SlotRef | SiblingSlot;
38
+ /** Everything a builder's `source:` takes: a fact, a `compute()`, a mirrored slot, or a `fill()`. */
39
+ type SourceBinding = SlotSource | ComputeBinding<unknown> | MirrorSource | FillBinding;
40
+ /** The value a mirror's upstream holds — a ref's phantom, or a sibling slot's own value type. */
41
+ type MirroredValue<Upstream> = Upstream extends SlotRef ? RefValue<Upstream> : SlotValue<Upstream>;
42
+ /**
43
+ * The value-type check a mirror owes: its upstream's value type must be assignable
44
+ * to this slot kind's `CV` — what a `compute()` here must return. A projection or a
45
+ * join is a `compute()`, never a mirror. A mismatch demands a key no author can
46
+ * supply, so the compile error names both types. Any other `source` owes nothing.
47
+ */
48
+ type MirrorOption<HasSource, CV> = HasSource extends MirrorSource ? [MirroredValue<HasSource>] extends [CV] ? unknown : {
49
+ "a mirrored slot's value type must be assignable to this slot's": [upstream: MirroredValue<HasSource>, slot: CV];
26
50
  } : unknown;
27
51
  /**
28
52
  * The `writeback` key a builder's options must carry, decided by the slot's
@@ -33,7 +57,7 @@ type SourceMark<HasSource extends SlotSource | ComputeBinding<unknown> | undefin
33
57
  * `writeback` key at all: nothing can write back through a derivation, and
34
58
  * propagation is meaningless for generated content.
35
59
  */
36
- type WritebackOption<HasSource extends SlotSource | ComputeBinding<unknown> | undefined> = HasSource extends {
60
+ type WritebackOption<HasSource extends SourceBinding | undefined> = HasSource extends {
37
61
  kind: "direct";
38
62
  field: infer F;
39
63
  } ? [F] extends [WritableSourceFieldName] ? {
@@ -62,10 +86,10 @@ interface CropConfig {
62
86
  breakpoint: number;
63
87
  };
64
88
  }
65
- interface CommonOptions<CV = never> {
89
+ interface CommonOptions<CV = never, F = never> {
66
90
  label: string;
67
91
  locked?: boolean;
68
- source?: SlotSource | ComputeBinding<CV>;
92
+ source?: SlotSource | ComputeBinding<CV> | MirrorSource | F;
69
93
  writeback?: boolean;
70
94
  placeholder?: string;
71
95
  when?: string | readonly string[];
@@ -78,7 +102,9 @@ interface Head {
78
102
  placeholder?: string;
79
103
  when?: string | readonly string[];
80
104
  }
81
- interface TextOptions extends CommonOptions<string | null> {
105
+ /** The fill a `text` slot takes: it is written, so a lower `cap` and `none` both bind. */
106
+ type TextFill = FillFor<"cap" | "none">;
107
+ interface TextOptions extends CommonOptions<string | null, TextFill> {
82
108
  cap?: number;
83
109
  }
84
110
  /** The serialized shape `text.short`/`.medium`/`.long` emit — a `text`-kind `SlotDef`. */
@@ -87,45 +113,37 @@ interface TextSlotDef<Size extends "short" | "medium" | "long"> extends Head {
87
113
  size: Size;
88
114
  cap?: number;
89
115
  }
90
- /** What a `text` slot's `fill:` may hold: generated prose, or a contact pick of a scalar field. */
91
- type TextFill = BuiltDecision<"text-block"> | BuiltDecision<"contact-assign">;
92
116
  /**
93
117
  * The text slot, sized by the member you pick: `text.short` / `.medium` / `.long`.
94
118
  *
95
119
  * `cap` is the slot's character budget and the ONLY declaration of it: it bounds
96
- * what a user may type in the editor, and the `textBlock` filling the slot inherits
97
- * it as the budget the model is asked to write to. A slot an AI fill decision
98
- * targets must declare one. `fill` takes that `textBlock` — the alternative to
99
- * `source`, never its companion.
120
+ * what a user may type in the editor, and a `fill()` producing the slot inherits it
121
+ * as the budget the model writes to. A filled slot must declare one; the fill's own
122
+ * `cap` only ever asks for something strictly shorter.
100
123
  * @example
101
124
  * ```ts
102
- * import { text, textBlock } from "@homepages/concrete";
125
+ * import { fact, fill, text } from "@homepages/concrete";
103
126
  *
104
127
  * text.medium({
105
128
  * cap: 60,
106
129
  * label: "Headline",
107
- * fill: textBlock({
108
- * structure: "single_sentence",
109
- * perspective: "third",
110
- * voice: "Confident premium-listing voice.",
111
- * content: "Write a marketing headline.",
130
+ * source: fill({
131
+ * reads: [fact.property.address, fact.description],
132
+ * brief: "A marketing headline in one sentence. Confident, no exclamation marks.",
112
133
  * }),
113
134
  * });
114
135
  * ```
115
136
  */
116
137
  declare const text: {
117
- short: <const HasSource extends SlotSource | ComputeBinding<unknown> | undefined = undefined>(opts: TextOptions & {
138
+ short: <const HasSource extends SourceBinding | undefined = undefined>(opts: TextOptions & {
118
139
  source?: HasSource | undefined;
119
- fill?: TextFill;
120
- } & WritebackOption<HasSource> & FillOption<HasSource, TextFill>) => TextSlotDef<"short"> & SourceMark<HasSource> & FillMark<TextFill>;
121
- medium: <const HasSource extends SlotSource | ComputeBinding<unknown> | undefined = undefined>(opts: TextOptions & {
140
+ } & WritebackOption<HasSource> & MirrorOption<HasSource, string | null>) => TextSlotDef<"short"> & SourceMark<HasSource> & FillMark;
141
+ medium: <const HasSource extends SourceBinding | undefined = undefined>(opts: TextOptions & {
122
142
  source?: HasSource | undefined;
123
- fill?: TextFill;
124
- } & WritebackOption<HasSource> & FillOption<HasSource, TextFill>) => TextSlotDef<"medium"> & SourceMark<HasSource> & FillMark<TextFill>;
125
- long: <const HasSource extends SlotSource | ComputeBinding<unknown> | undefined = undefined>(opts: TextOptions & {
143
+ } & WritebackOption<HasSource> & MirrorOption<HasSource, string | null>) => TextSlotDef<"medium"> & SourceMark<HasSource> & FillMark;
144
+ long: <const HasSource extends SourceBinding | undefined = undefined>(opts: TextOptions & {
126
145
  source?: HasSource | undefined;
127
- fill?: TextFill;
128
- } & WritebackOption<HasSource> & FillOption<HasSource, TextFill>) => TextSlotDef<"long"> & SourceMark<HasSource> & FillMark<TextFill>;
146
+ } & WritebackOption<HasSource> & MirrorOption<HasSource, string | null>) => TextSlotDef<"long"> & SourceMark<HasSource> & FillMark;
129
147
  };
130
148
  interface NumberOptions extends CommonOptions<number | null> {
131
149
  prefix?: string;
@@ -149,8 +167,8 @@ interface NumberSlotDef extends Head {
149
167
  * toggles decimal display, and `maxDigits` caps the digit count — all read by
150
168
  * the renderer's number formatting, not enforced as an input range.
151
169
  *
152
- * Binding-only: no fill decision produces a number, so this builder takes no
153
- * `fill` — the value comes from `source`.
170
+ * Binding-only: no fill produces a number, so `source` takes a fact, a slot or a
171
+ * `compute()`, never a `fill()`.
154
172
  * @example
155
173
  * ```ts
156
174
  * import { fact, number } from "@homepages/concrete";
@@ -158,9 +176,9 @@ interface NumberSlotDef extends Head {
158
176
  * number({ source: fact.unit.sqft, writeback: true, label: "Square feet", thousandsSep: true, suffix: "sqft", maxDigits: 7 });
159
177
  * ```
160
178
  */
161
- declare function number<const HasSource extends SlotSource | ComputeBinding<unknown> | undefined = undefined>(opts: NumberOptions & {
179
+ declare function number<const HasSource extends SourceBinding | undefined = undefined>(opts: NumberOptions & {
162
180
  source?: HasSource;
163
- } & WritebackOption<HasSource>): NumberSlotDef & SourceMark<HasSource>;
181
+ } & WritebackOption<HasSource> & MirrorOption<HasSource, number | null>): NumberSlotDef & SourceMark<HasSource>;
164
182
  /** One `select.of` option: a bare string (value === label) or a stored key with display text. */
165
183
  type SelectOptionInput = string | {
166
184
  value: string;
@@ -183,67 +201,62 @@ interface SelectSlotDef extends Head {
183
201
  };
184
202
  creatable?: boolean;
185
203
  }
186
- declare function selectFn<const HasSource extends SlotSource | ComputeBinding<unknown> | undefined = undefined>(opts: SelectOptions & {
204
+ declare function selectFn<const HasSource extends SourceBinding | undefined = undefined>(opts: SelectOptions & {
187
205
  source?: HasSource;
188
- } & WritebackOption<HasSource>): SelectSlotDef & SourceMark<HasSource>;
189
- type SelectFill = DisplayChoice & {
190
- count?: never;
191
- none?: never;
192
- };
193
- declare function selectOf<const HasSource extends SlotSource | ComputeBinding<unknown> | undefined = undefined>(values: readonly SelectOptionInput[], opts: SelectOptions & {
206
+ } & WritebackOption<HasSource> & MirrorOption<HasSource, string | null>): SelectSlotDef & SourceMark<HasSource>;
207
+ type SelectFill = FillFor<"none">;
208
+ interface SelectOfOptions extends CommonOptions<string | null, SelectFill> {
209
+ creatable?: boolean;
210
+ }
211
+ declare function selectOf<const HasSource extends SourceBinding | undefined = undefined>(values: readonly SelectOptionInput[], opts: SelectOfOptions & {
194
212
  source?: HasSource;
195
- fill?: SelectFill;
196
- } & WritebackOption<HasSource> & FillOption<HasSource, SelectFill>): SelectSlotDef & SourceMark<HasSource> & FillMark<BuiltDecision<"select-assign">>;
213
+ } & WritebackOption<HasSource> & MirrorOption<HasSource, string | null>): SelectSlotDef & SourceMark<HasSource> & FillMark;
214
+ /**
215
+ * The fill a `meta.display` entry takes: the model picks ONE of the entry's own
216
+ * cases. The brief and `reads` alone — an entry always resolves a case, so it
217
+ * never abstains, and a pick of one has no count or cap.
218
+ */
219
+ type DisplayFill = FillFor<never>;
197
220
  /**
198
221
  * One `meta.display` entry as authored under `defineSchema`'s `display:` —
199
222
  * the declared `cases` (the FIRST is the default and the failure posture), an
200
- * optional `locked` opting the entry out of user switching, and at most one
201
- * origin as written (`source: compute(fn)` still a live binding here;
202
- * `defineSchema` strips it into the logic bundle exactly as it does a slot's).
223
+ * optional `locked` opting the entry out of user switching, and its one origin as
224
+ * written: `source: compute(fn)` (still a live binding here; `defineSchema` strips
225
+ * it into the logic bundle exactly as it does a slot's) or `source: fill({ brief })`.
203
226
  */
204
227
  interface DisplayEntryInput<C extends readonly string[] = readonly string[]> {
205
228
  cases: [...C];
206
229
  locked?: true;
207
- source?: ComputeBinding<C[number]>;
208
- fill?: DisplayChoice;
230
+ source?: ComputeBinding<C[number]> | DisplayFill;
209
231
  }
210
- type DisplayOriginOptions<C extends readonly string[]> = {
211
- source: ComputeBinding<C[number]>;
212
- fill?: never;
213
- } | {
214
- fill: DisplayChoice;
215
- source?: never;
216
- } | {
217
- source?: never;
218
- fill?: never;
219
- };
220
232
  declare function displaySelect<const C extends readonly [string, ...string[]]>(cases: C, opts: {
221
233
  locked?: boolean;
222
- } & DisplayOriginOptions<C>): DisplayEntryInput<C>;
234
+ source?: ComputeBinding<C[number]> | DisplayFill;
235
+ }): DisplayEntryInput<C>;
223
236
  /**
224
237
  * The select slot AND the `meta.display` entry, told apart by the call shape.
225
238
  *
226
239
  * As a slot: `select({ from })` for a fact-derived vocabulary, `select.of([…])`
227
- * for a hand-authored one. A top-level select is bound with `source` and takes
228
- * no `fill`. Inside a record item, `select.of` is written one of two ways: by
229
- * the list's own counted `chooseFrom` origination, which picks the ROWS from
230
- * this field's vocabulary, or — on a row that already exists, a fact-baked
231
- * comparable say — by its own countless `chooseFrom({ pick })`, which picks
232
- * this one field's key per row in the list's batched call.
240
+ * for a hand-authored one. A top-level select is bound with `source` and is never
241
+ * filled. Inside a record item, `select.of` is written one of two ways: by the
242
+ * list's own `fill()`, which keys the ROWS on this field's vocabulary, or — on a
243
+ * row that already exists, a fact-baked comparable say — by its own
244
+ * `source: fill({ brief })`, which picks this one field's key per row in the
245
+ * list's batched call.
233
246
  *
234
- * As a display entry: `select(cases, { source: compute(fn) })` or
235
- * `select(cases, { fill: chooseFrom({ pick }) })` declares a `meta.display`
247
+ * As a display entry: `select(cases, { source: compute({ reads }, fn) })` or
248
+ * `select(cases, { source: fill({ brief }) })` declares a `meta.display`
236
249
  * `visibility`/`variant` — the first case is the default and the failure
237
250
  * posture, `locked: true` opts a variant out of user switching, and the entry
238
251
  * takes exactly one origin.
239
252
  * @example
240
253
  * ```ts
241
- * import { chooseFrom, compute, select } from "@homepages/concrete";
254
+ * import { compute, fact, fill, select } from "@homepages/concrete";
242
255
  *
243
256
  * select.of(["for_sale", "sold"], { label: "Status" });
244
- * select.of(["regular", "highlight"], { label: "Comparable status", fill: chooseFrom({ pick: "Highlight the two or three strongest sales." }) });
245
- * select(["visible", "hidden"], { source: compute((f) => (f.tours.length > 0 ? "visible" : "hidden")) });
246
- * select(["classic", "editorial"], { fill: chooseFrom({ pick: "Prefer editorial for story-driven narratives." }) });
257
+ * select.of(["regular", "highlight"], { label: "Comparable status", source: fill({ brief: "Highlight the two or three strongest sales." }) });
258
+ * select(["visible", "hidden"], { source: compute({ reads: [fact.tours] }, (tours) => (tours.length > 0 ? "visible" : "hidden")) });
259
+ * select(["classic", "editorial"], { source: fill({ brief: "Prefer editorial for story-driven narratives." }) });
247
260
  * ```
248
261
  */
249
262
  declare const select: typeof selectFn & typeof displaySelect & {
@@ -263,8 +276,8 @@ interface UrlSlotDef extends Head {
263
276
  * with no provider behind it admits no url at all, which the type cannot say —
264
277
  * check time rejects those.
265
278
  *
266
- * Binding-only: no fill decision produces a url, so this builder takes no
267
- * `fill` — the value comes from `source`.
279
+ * Binding-only: no fill produces a url, so `source` takes a fact, a slot or a
280
+ * `compute()`, never a `fill()`.
268
281
  * @example
269
282
  * ```ts
270
283
  * import { url } from "@homepages/concrete";
@@ -272,15 +285,15 @@ interface UrlSlotDef extends Head {
272
285
  * url({ label: "Tour URL", accepts: "tour" });
273
286
  * ```
274
287
  */
275
- declare function url<const HasSource extends SlotSource | ComputeBinding<unknown> | undefined = undefined>(opts: UrlOptions & {
288
+ declare function url<const HasSource extends SourceBinding | undefined = undefined>(opts: UrlOptions & {
276
289
  source?: HasSource;
277
- } & WritebackOption<HasSource>): UrlSlotDef & SourceMark<HasSource>;
278
- interface ImageOptions extends CommonOptions<ImageValue | null> {
290
+ } & WritebackOption<HasSource> & MirrorOption<HasSource, string | null>): UrlSlotDef & SourceMark<HasSource>;
291
+ /** The fill a single-asset slot takes: one pick out of that type's pool, which may abstain. */
292
+ type AssetFill = FillFor<"none">;
293
+ interface ImageOptions extends CommonOptions<ImageValue | null, AssetFill> {
279
294
  crop?: CropConfig;
280
295
  sourceFilter?: SourceFilter;
281
296
  }
282
- /** What an `image` slot's `fill:` may hold: a photo pick, or a contact pick of an image field. */
283
- type ImageFill = BuiltDecision<"image-assign"> | BuiltDecision<"contact-assign">;
284
297
  /** The serialized shape the `image` builder emits — an `image`-kind `SlotDef`. */
285
298
  interface ImageSlotDef extends Head {
286
299
  type: "image";
@@ -293,8 +306,7 @@ interface ImageSlotDef extends Head {
293
306
  * contract — the editor's cropper and `<Image>`'s mobile-crop switch read it; the box
294
307
  * the image renders in is the section's own classes. `sourceFilter` narrows the
295
308
  * candidate pool the editor offers, routing the slot to a dedicated picker.
296
- * `fill` takes an `imageAssign`, or a `contactAssign` naming one of a contact's
297
- * image fields — the alternative to `source`, never its companion.
309
+ * `source: fill({ brief })` picks one of the property's photos.
298
310
  * @example
299
311
  * ```ts
300
312
  * import { image } from "@homepages/concrete";
@@ -302,12 +314,11 @@ interface ImageSlotDef extends Head {
302
314
  * image({ label: "Floor plan", sourceFilter: "floorplans" });
303
315
  * ```
304
316
  */
305
- declare function image<const HasSource extends SlotSource | ComputeBinding<unknown> | undefined = undefined>(opts: ImageOptions & {
317
+ declare function image<const HasSource extends SourceBinding | undefined = undefined>(opts: ImageOptions & {
306
318
  source?: HasSource;
307
- fill?: ImageFill;
308
- } & WritebackOption<HasSource> & FillOption<HasSource, ImageFill>): ImageSlotDef & SourceMark<HasSource> & FillMark<ImageFill>;
319
+ } & WritebackOption<HasSource> & MirrorOption<HasSource, ImageValue | null>): ImageSlotDef & SourceMark<HasSource> & FillMark;
309
320
  type VideoSources = readonly [VideoSource, ...VideoSource[]];
310
- interface VideoOptions extends CommonOptions<VideoValue | null> {
321
+ interface VideoOptions extends CommonOptions<VideoValue | null, AssetFill> {
311
322
  playback?: PlaybackConfig;
312
323
  sources?: VideoSources;
313
324
  }
@@ -323,7 +334,7 @@ interface VideoSlotDef extends Head {
323
334
  * origins the value may come from (`"upload"`, `"link"`); omitted means
324
335
  * upload-only. `playback` configures the renderer's `<Video>`; the box it plays
325
336
  * in is your own classes.
326
- * `fill` takes a `videoAssign` — the alternative to `source`, never its companion.
337
+ * `source: fill({ brief })` picks one of the property's videos.
327
338
  * @example
328
339
  * ```ts
329
340
  * import { video } from "@homepages/concrete";
@@ -331,11 +342,10 @@ interface VideoSlotDef extends Head {
331
342
  * video({ label: "Property video", playback: { controls: true }, sources: ["upload", "link"] });
332
343
  * ```
333
344
  */
334
- declare function video<const HasSource extends SlotSource | ComputeBinding<unknown> | undefined = undefined>(opts: VideoOptions & {
345
+ declare function video<const HasSource extends SourceBinding | undefined = undefined>(opts: VideoOptions & {
335
346
  source?: HasSource;
336
- fill?: BuiltDecision<"video-assign">;
337
- } & WritebackOption<HasSource> & FillOption<HasSource, BuiltDecision<"video-assign">>): VideoSlotDef & SourceMark<HasSource> & FillMark<BuiltDecision<"video-assign">>;
338
- type TourOptions = CommonOptions<TourValue | null>;
347
+ } & WritebackOption<HasSource> & MirrorOption<HasSource, VideoValue | null>): VideoSlotDef & SourceMark<HasSource> & FillMark;
348
+ type TourOptions = CommonOptions<TourValue | null, AssetFill>;
339
349
  /** The serialized shape the `tour` builder emits — a `tour`-kind `SlotDef`. */
340
350
  interface TourSlotDef extends Head {
341
351
  type: "tour";
@@ -351,20 +361,19 @@ interface TourSlotDef extends Head {
351
361
  *
352
362
  * Render it with `<Slot.Tour>` for the embed, `<Slot.Image>` for the tour's
353
363
  * thumbnail, or both — two positions from one selection.
354
- * `fill` takes a `tourAssign` — the alternative to `source`, never its companion.
364
+ * `source: fill({ brief })` picks one of the property's tours.
355
365
  * @example
356
366
  * ```ts
357
- * import { tour, tourAssign } from "@homepages/concrete";
367
+ * import { fill, tour } from "@homepages/concrete";
358
368
  *
359
- * tour({ label: "3D tour", fill: tourAssign({ pick: "The whole-home walkthrough." }) });
369
+ * tour({ label: "3D tour", source: fill({ brief: "The whole-home walkthrough, not a single-room scan." }) });
360
370
  * ```
361
371
  */
362
- declare function tour<const HasSource extends SlotSource | ComputeBinding<unknown> | undefined = undefined>(opts: TourOptions & {
372
+ declare function tour<const HasSource extends SourceBinding | undefined = undefined>(opts: TourOptions & {
363
373
  source?: HasSource;
364
- fill?: BuiltDecision<"tour-assign">;
365
- } & WritebackOption<HasSource> & FillOption<HasSource, BuiltDecision<"tour-assign">>): TourSlotDef & SourceMark<HasSource> & FillMark<BuiltDecision<"tour-assign">>;
374
+ } & WritebackOption<HasSource> & MirrorOption<HasSource, TourValue | null>): TourSlotDef & SourceMark<HasSource> & FillMark;
366
375
  type StripHead<E> = Omit<E, "locked">;
367
- interface ListOptions<E> extends CommonOptions<NonNullable<SlotValue<E>>[]> {
376
+ interface ListOptions<E> extends CommonOptions<NonNullable<SlotValue<E>>[], ListFillFor<E>> {
368
377
  min?: number;
369
378
  max?: number;
370
379
  unique?: boolean;
@@ -388,12 +397,12 @@ interface ListSlotDef<E> extends Head {
388
397
  unique?: boolean;
389
398
  }
390
399
  type ListFillFor<E> = E extends {
391
- type: string;
392
- } ? BuiltDecision<"list-fill"> : never;
393
- type ListRecordFillFor<I> = ChosenRows | NamedRows | ([Extract<I[keyof I], {
394
- type: "image" | "video" | "tour" | "document";
395
- }>] extends [never] ? never : BuiltDecision<"list-fill">);
396
- interface ListRecordOptions<I extends Record<string, ListFieldSlot>> extends CommonOptions<RowValue<I>[]> {
400
+ type: "text";
401
+ } ? FillFor<"count" | "cap" | "none"> : E extends {
402
+ type: "poi";
403
+ } ? FillFor<"count"> : FillFor<"count" | "none">;
404
+ type ListRecordFill = FillFor<"count" | "none">;
405
+ interface ListRecordOptions<I extends Record<string, ListFieldSlot>> extends CommonOptions<RowValue<I>[], ListRecordFill> {
397
406
  min?: number;
398
407
  max?: number;
399
408
  layout?: readonly LayoutRow<keyof I & string>[];
@@ -414,14 +423,12 @@ interface ListRecordSlotDef<I extends Record<string, ListFieldSlot>> extends Hea
414
423
  min?: number;
415
424
  max?: number;
416
425
  }
417
- declare function listOfElement<const E extends ListItemSlot, const HasSource extends SlotSource | ComputeBinding<unknown> | undefined = undefined>(element: E, opts: ListOptions<E> & {
426
+ declare function listOfElement<const E extends ListItemSlot, const HasSource extends SourceBinding | undefined = undefined>(element: E, opts: ListOptions<E> & {
418
427
  source?: HasSource;
419
- fill?: ListFillFor<E>;
420
- } & WritebackOption<HasSource> & FillOption<HasSource, ListFillFor<E>>): ListSlotDef<StripHead<E>> & SourceMark<HasSource> & FillMark<ListFillFor<E>>;
421
- declare function listOfRecord<const I extends Record<string, ListFieldSlot>, const HasSource extends SlotSource | ComputeBinding<unknown> | undefined = undefined>(fields: I, opts: ListRecordOptions<I> & {
428
+ } & WritebackOption<HasSource> & MirrorOption<HasSource, NonNullable<SlotValue<E>>[]>): ListSlotDef<StripHead<E>> & SourceMark<HasSource> & FillMark;
429
+ declare function listOfRecord<const I extends Record<string, ListFieldSlot>, const HasSource extends SourceBinding | undefined = undefined>(fields: I, opts: ListRecordOptions<I> & {
422
430
  source?: HasSource;
423
- fill?: ListRecordFillFor<I>;
424
- } & WritebackOption<HasSource> & FillOption<HasSource, ListRecordFillFor<I>>): ListRecordSlotDef<I> & SourceMark<HasSource> & FillMark<ListRecordFillFor<I>>;
431
+ } & WritebackOption<HasSource> & MirrorOption<HasSource, RowValue<I>[]>): ListRecordSlotDef<I> & SourceMark<HasSource> & FillMark;
425
432
  /**
426
433
  * The list slot — one primitive for everything multi-item. The item is a
427
434
  * single slot (`list.of(text.short({ label: "Feature", cap: 80 }), { label: "Features" })`,
@@ -466,7 +473,7 @@ interface DocumentOptions {
466
473
  locked?: boolean;
467
474
  placeholder?: string;
468
475
  when?: string | readonly string[];
469
- fill?: BuiltDecision<"document-assign">;
476
+ source?: AssetFill;
470
477
  }
471
478
  /** The serialized shape the `document` builder emits — a `document`-kind `SlotDef`. */
472
479
  interface DocumentSlotDef extends Head {
@@ -481,17 +488,21 @@ interface DocumentSlotDef extends Head {
481
488
  * Reach for `url({ accepts: "file" })` instead when the file lives somewhere
482
489
  * else — a Drive or Dropbox link the platform neither stores nor serves.
483
490
  *
484
- * `fill` takes a `documentAssign`, which picks one file out of the documents
485
- * stored on the property. Usable standalone or as a list item — a
486
- * `list.of(document(...))` carries its own `listFill` and picks a SET from the
487
- * same pool.
491
+ * `source: fill({ brief })` picks one file out of the documents stored on the
492
+ * property. The model sees each candidate's filename, file type, and whatever text
493
+ * was distilled out of it (a spreadsheet or slide deck carries none, so name the
494
+ * file type when it matters). Usable standalone or as a list item — a
495
+ * `list.of(document(...))` carries its own fill and picks a SET from the same pool.
488
496
  * @example
489
497
  * ```ts
490
- * import { document, documentAssign } from "@homepages/concrete";
498
+ * import { document, fill } from "@homepages/concrete";
491
499
  *
492
- * document({ label: "Offering brochure", fill: documentAssign({ pick: "The full property brochure." }) });
500
+ * document({
501
+ * label: "Offering brochure",
502
+ * source: fill({ brief: "The offering brochure: a multi-page PDF about the whole property, not a single-unit floor plan." }),
503
+ * });
493
504
  * ```
494
505
  */
495
- declare function document(opts: DocumentOptions): DocumentSlotDef & FillMark<BuiltDecision<"document-assign">>;
506
+ declare function document(opts: DocumentOptions): DocumentSlotDef & FillMark;
496
507
  //#endregion
497
- export { CropConfig, DisplayEntryInput, DocumentSlotDef, ImageSlotDef, ListRecordSlotDef, ListSlotDef, NumberSlotDef, PoiSlotDef, SelectOptionInput, SelectSlotDef, SlotSource, SourceMark, TextSlotDef, TourSlotDef, UrlSlotDef, VideoSlotDef, WritebackOption, document, image, list, number, poi, select, text, tour, url, video };
508
+ export { CropConfig, DisplayEntryInput, DisplayFill, DocumentSlotDef, ImageSlotDef, ListRecordSlotDef, ListSlotDef, MirrorOption, MirrorSource, NumberSlotDef, PoiSlotDef, SelectOptionInput, SelectSlotDef, SlotSource, SourceBinding, SourceMark, TextSlotDef, TourSlotDef, UrlSlotDef, VideoSlotDef, WritebackOption, document, image, list, number, poi, select, text, tour, url, video };