@homepages/concrete 7.0.0 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (331) hide show
  1. package/CHANGELOG.md +1007 -0
  2. package/README.md +20 -9
  3. package/codemods/list-grammar.mjs +923 -0
  4. package/codemods/manifest.json +66 -0
  5. package/codemods/process-builders.mjs +198 -0
  6. package/codemods/slot-object.mjs +1097 -0
  7. package/codemods/steps/content-object-fields.mjs +324 -0
  8. package/codemods/steps/list-object-form.mjs +6 -7
  9. package/codemods/table-rows.mjs +568 -0
  10. package/codemods/unwrap-object-fields.mjs +310 -0
  11. package/codemods/viewer-slot-document.mjs +131 -0
  12. package/codemods/write-property-as-facts-document.mjs +716 -0
  13. package/codemods/write-the-address-line.mjs +255 -0
  14. package/codemods/write-the-registry-members.mjs +653 -0
  15. package/codemods/write-the-select-from.mjs +141 -0
  16. package/codemods/write-the-sole-from.mjs +369 -0
  17. package/codemods/write-the-table-from.mjs +267 -0
  18. package/codemods/write-the-whole-item.mjs +512 -0
  19. package/codemods/writeback-drop.mjs +168 -0
  20. package/codemods/written-contact-address.mjs +162 -0
  21. package/codemods/written-media-category.mjs +227 -0
  22. package/codemods/written-ref-kinds-name-the-layer.mjs +172 -0
  23. package/codemods/written-uploads-replace-pool-reads.mjs +454 -0
  24. package/codemods/written-uploads-sort-into-lists.mjs +405 -0
  25. package/codemods/written-uploads-stated-in-sorted-lists.mjs +295 -0
  26. package/codemods/written-video-sources-drop.mjs +144 -0
  27. package/codemods/written-without-pick-none.mjs +146 -0
  28. package/codemods/written-without-retired-knowledge.mjs +223 -0
  29. package/codemods/written-without-the-media-key.mjs +202 -0
  30. package/codemods/written-without-the-property-type.mjs +249 -0
  31. package/dist/artifact/playground/client/assets/index-BUmdDDX5.js +1259 -0
  32. package/dist/artifact/playground/client/assets/index-DDOcM0zA.css +1 -0
  33. package/dist/artifact/playground/client/index.html +2 -2
  34. package/dist/artifact/playground/client/island-canvas-host.mjs +1 -1
  35. package/dist/artifact/playground/host.mjs +61 -27
  36. package/dist/base.css +58 -1
  37. package/dist/cli/build/artifact.js +6 -9
  38. package/dist/cli/build/captures.js +2 -12
  39. package/dist/cli/build/esbuild.js +1 -25
  40. package/dist/cli/build/fixtures.js +2 -1
  41. package/dist/cli/build/icons.js +1 -1
  42. package/dist/cli/build/static.js +2 -2
  43. package/dist/cli/capture/capture.js +8 -9
  44. package/dist/cli/check/analyze.js +8 -1
  45. package/dist/cli/check/load-outdir.js +47 -0
  46. package/dist/cli/check/load-workspace.js +4 -4
  47. package/dist/cli/check/render/html.js +1 -2
  48. package/dist/cli/check/render/inputs.js +10 -3
  49. package/dist/cli/check/render/island-frames.js +2 -1
  50. package/dist/cli/check/render/marker-coverage.js +23 -15
  51. package/dist/cli/check/report.js +5 -0
  52. package/dist/cli/check/stages/bundles.js +1 -1
  53. package/dist/cli/check/stages/relations.js +1 -1
  54. package/dist/cli/check/stages/render.js +48 -33
  55. package/dist/cli/check/stages/sections.js +83 -31
  56. package/dist/cli/commands.js +1 -1
  57. package/dist/cli/dev/crop.js +1 -1
  58. package/dist/cli/dev/fixture-ladders.js +96 -0
  59. package/dist/cli/dev/islands.js +12 -123
  60. package/dist/cli/dev/listen.js +20 -1
  61. package/dist/cli/dev/load-template.js +1 -1
  62. package/dist/cli/dev/server.js +35 -10
  63. package/dist/cli/dev/vite.js +9 -7
  64. package/dist/cli/dev/workspace-reader.js +16 -16
  65. package/dist/cli/media/derive.js +43 -57
  66. package/dist/cli/media/frame-rung-floor.js +0 -1
  67. package/dist/cli/property/index.js +1 -6
  68. package/dist/css/inline.js +1 -22
  69. package/dist/eslint/rules/no-marker-literal.js +1 -1
  70. package/dist/fixtures/load.js +16 -7
  71. package/dist/fixtures/media-plugin.js +17 -12
  72. package/dist/fixtures/media-store.js +115 -0
  73. package/dist/fixtures/property.js +345 -126
  74. package/dist/fixtures/resolve.js +263 -251
  75. package/dist/fixtures/rows.js +4 -11
  76. package/dist/fixtures.d.ts +234 -109
  77. package/dist/index.d.ts +25 -16
  78. package/dist/index.js +10 -6
  79. package/dist/islands/marker.js +2 -1
  80. package/dist/packages/external/concrete/package.js +1 -1
  81. package/dist/packages/internal/canvas-core/dist/island-host.js +62 -0
  82. package/dist/packages/internal/canvas-core/dist/island-shields.js +30 -0
  83. package/dist/packages/internal/capture-settle/dist/index.js +3 -0
  84. package/dist/packages/internal/capture-settle/dist/island-markers.d.ts +13 -0
  85. package/dist/packages/internal/capture-settle/dist/island-markers.js +6 -0
  86. package/dist/packages/internal/capture-settle/dist/settle.js +150 -0
  87. package/dist/packages/internal/{image-ladder/dist/crop.js → crop-region/dist/index.js} +21 -20
  88. package/dist/packages/internal/fill-bake/dist/bake-property-ref.js +252 -35
  89. package/dist/packages/internal/fill-bake/dist/compute-reads.js +365 -4
  90. package/dist/packages/internal/fill-bake/dist/derive-source.js +35 -21
  91. package/dist/packages/internal/fill-bake/dist/index.js +8 -3
  92. package/dist/packages/internal/fill-bake/dist/item-merge.js +119 -0
  93. package/dist/packages/internal/fill-bake/dist/item-overrides.js +28 -0
  94. package/dist/packages/internal/fill-bake/dist/linked-merge.js +40 -0
  95. package/dist/packages/internal/fill-bake/dist/list-grammar.js +175 -0
  96. package/dist/packages/internal/fill-vocabulary/dist/holder.js +51 -0
  97. package/dist/packages/internal/fill-vocabulary/dist/resolved-decision.js +390 -0
  98. package/dist/packages/internal/fill-vocabulary/dist/row-planners.js +1 -23
  99. package/dist/packages/internal/fill-vocabulary/dist/row-reads.js +1 -1
  100. package/dist/packages/internal/fill-vocabulary/dist/verbs.js +75 -0
  101. package/dist/packages/internal/format-geometry/dist/capture.js +11 -147
  102. package/dist/packages/internal/format-geometry/dist/format.d.ts +8 -2
  103. package/dist/packages/internal/format-geometry/dist/geometry.js +13 -2
  104. package/dist/packages/internal/image-ladder/dist/encode.js +27 -14
  105. package/dist/packages/internal/image-ladder/dist/index.js +3 -3
  106. package/dist/packages/internal/image-ladder/dist/policy.js +28 -53
  107. package/dist/packages/internal/island-runtime/dist/capture-holds.js +1 -1
  108. package/dist/packages/internal/island-runtime/dist/contract.d.ts +3 -12
  109. package/dist/packages/internal/island-runtime/dist/contract.js +2 -2
  110. package/dist/packages/internal/island-runtime/dist/index.d.ts +3 -7
  111. package/dist/packages/internal/island-runtime/dist/index.js +2 -1
  112. package/dist/packages/internal/island-runtime/dist/viewport-schedule.js +1 -1
  113. package/dist/packages/internal/media-resolution/dist/crop-key.js +7 -0
  114. package/dist/packages/internal/media-resolution/dist/document.js +63 -0
  115. package/dist/packages/internal/media-resolution/dist/image.js +228 -0
  116. package/dist/packages/internal/media-resolution/dist/index.js +11 -0
  117. package/dist/packages/internal/media-resolution/dist/list.js +112 -0
  118. package/dist/packages/internal/media-resolution/dist/media.js +59 -0
  119. package/dist/packages/internal/media-resolution/dist/records.js +7 -0
  120. package/dist/packages/internal/media-resolution/dist/slot.js +34 -0
  121. package/dist/packages/internal/media-resolution/dist/store.js +19 -0
  122. package/dist/packages/internal/media-resolution/dist/tour.js +59 -0
  123. package/dist/packages/internal/media-resolution/dist/video.js +93 -0
  124. package/dist/packages/internal/property-facts/dist/registry-facts.js +244 -0
  125. package/dist/packages/internal/section-contracts/dist/cap-contract.js +8 -17
  126. package/dist/packages/internal/section-contracts/dist/catalog.js +35 -27
  127. package/dist/packages/internal/section-contracts/dist/count-bounds-contract.js +11 -2
  128. package/dist/packages/internal/section-contracts/dist/directly-linked-list-contract.js +27 -0
  129. package/dist/packages/internal/section-contracts/dist/fill-options.js +12 -0
  130. package/dist/packages/internal/section-contracts/dist/fill-spec-view.js +1 -0
  131. package/dist/packages/internal/section-contracts/dist/fill-verb-contract.js +95 -0
  132. package/dist/packages/internal/section-contracts/dist/grammar-scope.js +154 -0
  133. package/dist/packages/internal/section-contracts/dist/index.js +7 -5
  134. package/dist/packages/internal/section-contracts/dist/list-fill-contract.js +23 -19
  135. package/dist/packages/internal/section-contracts/dist/list-scalar-contract.js +12 -7
  136. package/dist/packages/internal/section-contracts/dist/list-source-contract.js +46 -0
  137. package/dist/packages/internal/section-contracts/dist/nested-slot-contract.js +11 -2
  138. package/dist/packages/internal/section-contracts/dist/object-contract.js +92 -0
  139. package/dist/packages/internal/section-contracts/dist/poi-curation-contract.js +5 -5
  140. package/dist/packages/internal/section-contracts/dist/reads-acyclic-contract.js +63 -0
  141. package/dist/packages/internal/section-contracts/dist/row-fill-contract.js +7 -4
  142. package/dist/packages/internal/section-contracts/dist/row-rule-contract.js +83 -0
  143. package/dist/packages/internal/section-contracts/dist/row-source-contract.js +67 -0
  144. package/dist/packages/internal/section-contracts/dist/runners.js +77 -33
  145. package/dist/packages/internal/section-contracts/dist/select-contract.js +0 -8
  146. package/dist/packages/internal/section-contracts/dist/source-contract.js +120 -66
  147. package/dist/packages/internal/section-contracts/dist/sources-contract.js +47 -17
  148. package/dist/packages/internal/section-contracts/dist/table-member.js +16 -0
  149. package/dist/packages/internal/section-contracts/dist/writer-reads-fact-contract.js +43 -18
  150. package/dist/packages/internal/source-resolution/dist/index.js +113 -118
  151. package/dist/packages/internal/static-assets-binding/dist/section-asset-url.js +16 -0
  152. package/dist/packages/internal/street-address/dist/index.js +72 -0
  153. package/dist/packages/internal/template-artifact/dist/asset-mime.js +30 -0
  154. package/dist/packages/internal/template-artifact/dist/layout.js +1 -2
  155. package/dist/packages/internal/template-artifact/dist/manifest.js +1 -1
  156. package/dist/packages/internal/template-artifact/dist/verify.js +12 -29
  157. package/dist/packages/internal/template-contracts/dist/address-value.d.ts +52 -0
  158. package/dist/packages/internal/template-contracts/dist/address-value.js +90 -0
  159. package/dist/packages/internal/template-contracts/dist/comparable-address.js +19 -0
  160. package/dist/{schema → packages/internal/template-contracts/dist}/compute.d.ts +29 -6
  161. package/dist/{schema → packages/internal/template-contracts/dist}/compute.js +11 -13
  162. package/dist/packages/internal/template-contracts/dist/content-pick.js +51 -0
  163. package/dist/packages/internal/template-contracts/dist/decision-fills.js +85 -0
  164. package/dist/packages/internal/template-contracts/dist/display-overrides.js +7 -0
  165. package/dist/packages/internal/template-contracts/dist/document-value.d.ts +16 -5
  166. package/dist/packages/internal/template-contracts/dist/fact-compute.d.ts +24 -0
  167. package/dist/packages/internal/template-contracts/dist/fact-compute.js +30 -0
  168. package/dist/packages/internal/template-contracts/dist/fact-keys.d.ts +44 -0
  169. package/dist/packages/internal/template-contracts/dist/fact-keys.js +88 -0
  170. package/dist/packages/internal/template-contracts/dist/fact-registry.d.ts +290 -0
  171. package/dist/packages/internal/template-contracts/dist/fact-registry.js +598 -0
  172. package/dist/packages/internal/template-contracts/dist/facts-view.d.ts +12 -36
  173. package/dist/packages/internal/template-contracts/dist/fill-builders.d.ts +157 -0
  174. package/dist/packages/internal/template-contracts/dist/fill-builders.js +79 -0
  175. package/dist/packages/internal/template-contracts/dist/fill-declaration.d.ts +14 -0
  176. package/dist/{schema → packages/internal/template-contracts/dist}/fill-declaration.js +6 -5
  177. package/dist/packages/internal/template-contracts/dist/fill-spec-schema.js +158 -0
  178. package/dist/packages/internal/template-contracts/dist/fill-spec.js +291 -0
  179. package/dist/packages/internal/template-contracts/dist/findable.js +8 -0
  180. package/dist/packages/internal/template-contracts/dist/floor-presets.js +13 -0
  181. package/dist/packages/internal/template-contracts/dist/icon-names.d.ts +5 -0
  182. package/dist/packages/internal/template-contracts/dist/icon-names.js +70 -0
  183. package/dist/packages/internal/template-contracts/dist/legacy-facts.js +167 -0
  184. package/dist/packages/internal/template-contracts/dist/list-editing.js +94 -0
  185. package/dist/packages/internal/template-contracts/dist/list.d.ts +215 -0
  186. package/dist/packages/internal/template-contracts/dist/list.js +258 -0
  187. package/dist/packages/internal/template-contracts/dist/markers.d.ts +2 -2
  188. package/dist/packages/internal/template-contracts/dist/media-candidates.js +38 -0
  189. package/dist/packages/internal/template-contracts/dist/mirror-kind.js +48 -0
  190. package/dist/packages/internal/template-contracts/dist/number-display.js +10 -0
  191. package/dist/packages/internal/template-contracts/dist/object.d.ts +89 -0
  192. package/dist/packages/internal/template-contracts/dist/object.js +131 -0
  193. package/dist/packages/internal/template-contracts/dist/poi-row.d.ts +1 -1
  194. package/dist/packages/internal/template-contracts/dist/primitive-descriptors.d.ts +1 -0
  195. package/dist/packages/internal/template-contracts/dist/primitive-descriptors.js +162 -0
  196. package/dist/packages/internal/template-contracts/dist/process-builders.d.ts +77 -0
  197. package/dist/packages/internal/template-contracts/dist/process-builders.js +73 -0
  198. package/dist/packages/internal/template-contracts/dist/read-graph.js +250 -0
  199. package/dist/packages/internal/template-contracts/dist/ref-locate.js +192 -0
  200. package/dist/packages/internal/template-contracts/dist/registry-aliases.js +77 -0
  201. package/dist/packages/internal/template-contracts/dist/registry-facts.d.ts +268 -0
  202. package/dist/packages/internal/template-contracts/dist/registry-facts.js +202 -0
  203. package/dist/packages/internal/template-contracts/dist/registry-shape.d.ts +41 -0
  204. package/dist/packages/internal/template-contracts/dist/registry-shape.js +135 -0
  205. package/dist/packages/internal/template-contracts/dist/resolve-scope.js +103 -0
  206. package/dist/packages/internal/{image-descriptor/dist/index.d.ts → template-contracts/dist/responsive-image.d.ts} +1 -1
  207. package/dist/packages/internal/template-contracts/dist/row-planners.js +29 -0
  208. package/dist/packages/internal/template-contracts/dist/row-ref.d.ts +133 -0
  209. package/dist/packages/internal/template-contracts/dist/row-ref.js +101 -0
  210. package/dist/packages/internal/template-contracts/dist/row-sources.js +48 -8
  211. package/dist/packages/internal/template-contracts/dist/row.d.ts +155 -0
  212. package/dist/packages/internal/template-contracts/dist/row.js +84 -0
  213. package/dist/packages/internal/template-contracts/dist/runtime-values.d.ts +97 -0
  214. package/dist/packages/internal/template-contracts/dist/slot-builders.d.ts +782 -0
  215. package/dist/packages/internal/template-contracts/dist/slot-builders.js +233 -0
  216. package/dist/packages/internal/template-contracts/dist/slot-catalog.d.ts +243 -384
  217. package/dist/packages/internal/template-contracts/dist/slot-catalog.js +334 -230
  218. package/dist/packages/internal/template-contracts/dist/slot-overrides.js +21 -0
  219. package/dist/packages/internal/template-contracts/dist/slot-ref.d.ts +155 -0
  220. package/dist/packages/internal/template-contracts/dist/slot-ref.js +76 -0
  221. package/dist/packages/internal/template-contracts/dist/slot-types.d.ts +163 -0
  222. package/dist/packages/internal/template-contracts/dist/slot-types.js +140 -0
  223. package/dist/packages/internal/template-contracts/dist/slot-value.d.ts +97 -0
  224. package/dist/packages/internal/template-contracts/dist/table-members.d.ts +25 -0
  225. package/dist/packages/internal/template-contracts/dist/table-members.js +90 -0
  226. package/dist/packages/internal/template-contracts/dist/tour-value.d.ts +5 -5
  227. package/dist/packages/internal/template-contracts/dist/value-contracts.js +15 -0
  228. package/dist/packages/internal/template-contracts/dist/video-value.d.ts +2 -2
  229. package/dist/platform/fs.js +5 -2
  230. package/dist/playground/canvas-island-host.d.ts +11 -0
  231. package/dist/playground/canvas-island-host.js +29 -0
  232. package/dist/playground/canvas-markers.js +14 -0
  233. package/dist/playground-island-runtime.d.ts +3 -2
  234. package/dist/playground-island-runtime.js +3 -2
  235. package/dist/primitives/FrameShell.js +0 -1
  236. package/dist/primitives/Image.d.ts +5 -4
  237. package/dist/primitives/Tour.d.ts +1 -1
  238. package/dist/primitives/Video.d.ts +2 -2
  239. package/dist/primitives/index.d.ts +2 -3
  240. package/dist/primitives/picture-sources.js +2 -2
  241. package/dist/primitives/probe-context.js +2 -12
  242. package/dist/primitives/slot-address.d.ts +44 -0
  243. package/dist/primitives/slot-address.js +19 -0
  244. package/dist/primitives/slot-bindings.d.ts +65 -26
  245. package/dist/primitives/slot-bindings.js +104 -46
  246. package/dist/primitives/slot-document.d.ts +23 -18
  247. package/dist/primitives/slot-document.js +39 -14
  248. package/dist/primitives/slot-download.d.ts +39 -0
  249. package/dist/primitives/slot-download.js +39 -0
  250. package/dist/primitives/slot-list.d.ts +3 -3
  251. package/dist/primitives/slot-list.js +0 -2
  252. package/dist/primitives/slot-media.d.ts +24 -5
  253. package/dist/primitives/slot-media.js +6 -9
  254. package/dist/primitives/slot-object.d.ts +49 -0
  255. package/dist/primitives/slot-object.js +20 -0
  256. package/dist/primitives/slot-scalar.d.ts +27 -2
  257. package/dist/primitives/slot-scalar.js +50 -7
  258. package/dist/primitives/slot.d.ts +13 -6
  259. package/dist/primitives/slot.js +10 -3
  260. package/dist/rules/registry.js +19 -30
  261. package/dist/schema/define-schema.d.ts +4 -8
  262. package/dist/schema/define-schema.js +178 -79
  263. package/dist/schema/extract-fill-spec.js +2 -158
  264. package/dist/schema/fact.d.ts +57 -15
  265. package/dist/schema/fact.js +42 -7
  266. package/dist/schema/facts-view.d.ts +14 -0
  267. package/dist/schema/format.d.ts +1 -0
  268. package/dist/schema/format.js +2 -1
  269. package/dist/schema/manifest.js +24 -0
  270. package/dist/schema/property-facts.d.ts +8 -11
  271. package/dist/schema/section-props.d.ts +2 -66
  272. package/dist/schema/section-schema.d.ts +8 -11
  273. package/dist/schema/section-schema.js +27 -10
  274. package/dist/section/declare.d.ts +18 -7
  275. package/dist/section/declare.js +18 -5
  276. package/dist/section/materialize.js +3 -8
  277. package/dist/section/section.d.ts +12 -8
  278. package/dist/section/section.js +1 -1
  279. package/dist/template/logic-shim.d.ts +14 -7
  280. package/dist/template/logic-shim.js +14 -7
  281. package/dist/template/materialize.js +17 -18
  282. package/dist/template/mirror-types.js +30 -31
  283. package/dist/template/section-reads.js +85 -9
  284. package/guide/reference/cli/INDEX.md +2 -2
  285. package/guide/reference/cli/build.md +1 -1
  286. package/guide/reference/cli/check.md +1 -1
  287. package/guide/reference/cli/dev.md +1 -1
  288. package/guide/reference/cli/property-add.md +1 -1
  289. package/guide/reference/cli/property-list.md +2 -2
  290. package/guide/reference/cli/publish.md +1 -1
  291. package/guide/reference/cli/upgrade.md +1 -1
  292. package/guide/reference/rules/INDEX.md +29 -29
  293. package/package.json +9 -8
  294. package/dist/artifact/playground/client/assets/index-CckS2ONm.css +0 -1
  295. package/dist/artifact/playground/client/assets/index-D8eepVr-.js +0 -1101
  296. package/dist/fixtures/canonical.d.ts +0 -166
  297. package/dist/fixtures/media.js +0 -163
  298. package/dist/packages/internal/fill-vocabulary/dist/origination.js +0 -111
  299. package/dist/packages/internal/format-geometry/dist/index.js +0 -4
  300. package/dist/packages/internal/property-facts/dist/derive-facts-view.js +0 -10
  301. package/dist/packages/internal/property-facts/dist/index.js +0 -3
  302. package/dist/packages/internal/property-facts/dist/property-facts-Cy7-O4p0.js +0 -189
  303. package/dist/packages/internal/section-contracts/dist/choose-select-contract.js +0 -20
  304. package/dist/packages/internal/section-contracts/dist/name-title-contract.js +0 -20
  305. package/dist/packages/internal/section-contracts/dist/pooling-field-contract.js +0 -22
  306. package/dist/packages/internal/section-contracts/dist/record-collection-contract.js +0 -24
  307. package/dist/packages/internal/section-contracts/dist/source-filter-contract.js +0 -15
  308. package/dist/packages/internal/template-contracts/dist/collection-editing.js +0 -22
  309. package/dist/packages/internal/template-contracts/dist/facts-view.js +0 -111
  310. package/dist/packages/internal/template-contracts/dist/select-key.js +0 -7
  311. package/dist/primitives/slot-group.d.ts +0 -40
  312. package/dist/primitives/slot-group.js +0 -36
  313. package/dist/schema/extract-used-facts.js +0 -34
  314. package/dist/schema/fill-builders.d.ts +0 -115
  315. package/dist/schema/fill-builders.js +0 -25
  316. package/dist/schema/fill-declaration.d.ts +0 -14
  317. package/dist/schema/fill-spec.js +0 -89
  318. package/dist/schema/layout.d.ts +0 -30
  319. package/dist/schema/layout.js +0 -14
  320. package/dist/schema/row-fields.js +0 -88
  321. package/dist/schema/row-ref.d.ts +0 -59
  322. package/dist/schema/row-ref.js +0 -28
  323. package/dist/schema/runtime-values.d.ts +0 -71
  324. package/dist/schema/section-nav.js +0 -14
  325. package/dist/schema/slot-builders.d.ts +0 -613
  326. package/dist/schema/slot-builders.js +0 -177
  327. package/dist/schema/slot-ref.d.ts +0 -79
  328. package/dist/schema/slot-ref.js +0 -41
  329. package/dist/schema/slot-types.d.ts +0 -111
  330. package/dist/schema/slot-types.js +0 -214
  331. package/dist/section/groups.js +0 -68
@@ -7,19 +7,209 @@ const CONTENT_SLOT_TYPES = [
7
7
  "list",
8
8
  "poi",
9
9
  "url",
10
+ "date",
11
+ "email",
12
+ "phone",
13
+ "address",
10
14
  "video",
11
15
  "tour",
12
- "document"
16
+ "document",
17
+ "media"
13
18
  ];
14
19
  const REF_SLOT_TYPES = [];
15
20
  const SLOT_TYPES = [...CONTENT_SLOT_TYPES, ...REF_SLOT_TYPES];
16
- const COLLECTION_SLOT_TYPES = ["list"];
17
- function isCollectionSlotType(type) {
18
- return COLLECTION_SLOT_TYPES.includes(type);
21
+ const LIST_SLOT_TYPES = ["list"];
22
+ function isListSlotType(type) {
23
+ return LIST_SLOT_TYPES.includes(type);
24
+ }
25
+ const OBJECT_BINDING_OWN_KEYS = [
26
+ "id",
27
+ "slot",
28
+ "index",
29
+ "def",
30
+ "value",
31
+ "present",
32
+ "enclosing"
33
+ ];
34
+ const MEDIA_KINDS = [
35
+ "image",
36
+ "video",
37
+ "tour",
38
+ "document"
39
+ ];
40
+ function isMediaKind(type) {
41
+ return MEDIA_KINDS.includes(type);
42
+ }
43
+ function isMediaType(type) {
44
+ return type === "media" || isMediaKind(type);
45
+ }
46
+ const PROCESS_CATALOG = {
47
+ cutout: {
48
+ label: "Background removed",
49
+ kinds: ["image"],
50
+ site: "holder",
51
+ options: { enclosed: {
52
+ required: false,
53
+ type: "string",
54
+ values: ["clear", "keep"]
55
+ } }
56
+ },
57
+ autocrop: {
58
+ label: "Cropped to its subject",
59
+ kinds: ["image"],
60
+ site: "holder",
61
+ options: { brief: {
62
+ required: true,
63
+ type: "string"
64
+ } }
65
+ },
66
+ probe: {
67
+ label: "Probed",
68
+ kinds: [
69
+ "image",
70
+ "video",
71
+ "document"
72
+ ],
73
+ site: "kind",
74
+ options: {}
75
+ },
76
+ understand: {
77
+ label: "Understood",
78
+ kinds: [
79
+ "image",
80
+ "video",
81
+ "document",
82
+ "tour"
83
+ ],
84
+ site: "kind",
85
+ options: {}
86
+ },
87
+ preview: {
88
+ label: "Preview",
89
+ kinds: [
90
+ "image",
91
+ "video",
92
+ "document"
93
+ ],
94
+ site: "kind",
95
+ options: {}
96
+ },
97
+ ladder: {
98
+ label: "Renditions",
99
+ kinds: [
100
+ "image",
101
+ "video",
102
+ "document"
103
+ ],
104
+ site: "kind",
105
+ options: {}
106
+ },
107
+ transcode: {
108
+ label: "Transcoded",
109
+ kinds: ["video"],
110
+ site: "kind",
111
+ options: {}
112
+ },
113
+ poster: {
114
+ label: "Poster",
115
+ kinds: ["video", "document"],
116
+ site: "kind",
117
+ options: {}
118
+ },
119
+ rasterize: {
120
+ label: "Pages rasterized",
121
+ kinds: ["document"],
122
+ site: "kind",
123
+ options: {}
124
+ },
125
+ fetch: {
126
+ label: "Link fetched",
127
+ kinds: ["video", "tour"],
128
+ site: "kind",
129
+ options: {}
130
+ },
131
+ tour_details: {
132
+ label: "Tour details",
133
+ kinds: ["tour"],
134
+ site: "kind",
135
+ options: {}
136
+ },
137
+ crop: {
138
+ label: "Cut to its crop",
139
+ kinds: ["image"],
140
+ site: "place",
141
+ options: {}
142
+ }
143
+ };
144
+ const PROCESS_VERBS = Object.keys(PROCESS_CATALOG);
145
+ const HOLDER_PROCESS_VERBS = PROCESS_VERBS.filter((verb) => PROCESS_CATALOG[verb].site === "holder");
146
+ const KIND_PROCESS_VERBS = PROCESS_VERBS.filter((verb) => PROCESS_CATALOG[verb].site === "kind");
147
+ function isProcessVerb(value) {
148
+ return typeof value === "string" && Object.hasOwn(PROCESS_CATALOG, value);
149
+ }
150
+ function processBindingOf(entry) {
151
+ if (typeof entry === "string") return isProcessVerb(entry) ? {
152
+ kind: "process",
153
+ verb: entry
154
+ } : null;
155
+ if (typeof entry !== "object" || entry === null || Array.isArray(entry)) return null;
156
+ const { kind, verb } = entry;
157
+ return kind === "process" && isProcessVerb(verb) ? entry : null;
158
+ }
159
+ function processOptionsProblem(binding) {
160
+ const entry = PROCESS_CATALOG[binding.verb];
161
+ const takes = Object.keys(entry.options);
162
+ const listed = takes.length > 0 ? `it takes ${takes.map((key) => `\`${key}\``).join(", ")}` : "it takes none";
163
+ for (const [key, value] of Object.entries(binding)) {
164
+ if (key === "kind" || key === "verb" || value === void 0) continue;
165
+ if (key === "reads") return `\`${binding.verb}\` takes no \`reads\` — a process is about one asset, never the property`;
166
+ const option = entry.options[key];
167
+ if (option === void 0) {
168
+ const hint = key === "aspect" && binding.verb === "autocrop" ? "; its aspect is the holder's `crop` — the aspect it locks, free form where it locks none" : "";
169
+ return `\`${binding.verb}\` takes no option "${key}" — ${listed}${hint}`;
170
+ }
171
+ if (option.values !== void 0) {
172
+ if (typeof value !== "string" || !option.values.includes(value)) return `\`${binding.verb}\`'s \`${key}\` is one of ${option.values.map((one) => `"${one}"`).join(", ")}`;
173
+ continue;
174
+ }
175
+ if (typeof value !== option.type || typeof value === "string" && value.trim() === "") return `\`${binding.verb}\`'s \`${key}\` is a non-empty ${option.type}`;
176
+ }
177
+ for (const [key, option] of Object.entries(entry.options)) if (option.required && binding[key] === void 0) return `\`${binding.verb}\` requires \`${key}\``;
178
+ return null;
179
+ }
180
+ function declaredKinds(declaration) {
181
+ const { type, kinds } = declaration;
182
+ if (type === "media") {
183
+ const stated = Array.isArray(kinds) ? kinds.filter((kind) => typeof kind === "string" && isMediaKind(kind)) : [];
184
+ return stated.length > 0 ? stated : MEDIA_KINDS;
185
+ }
186
+ return typeof type === "string" && isMediaKind(type) ? [type] : [];
19
187
  }
20
- const SOURCE_FILTERS = ["floorplans"];
21
- function isSourceFilter(value) {
22
- return SOURCE_FILTERS.includes(value);
188
+ function mediaDeclarationProblem(declaration) {
189
+ const { kinds, process } = declaration;
190
+ if (kinds !== void 0) {
191
+ if (declaration.type !== "media") return "declares `kinds` — only `media()` leaves its kind open; a kind's own builder fixes it";
192
+ if (!Array.isArray(kinds) || kinds.length === 0 || !kinds.every((kind) => typeof kind === "string" && isMediaKind(kind))) return `declares \`kinds\` ${JSON.stringify(kinds)} — a non-empty list of ${MEDIA_KINDS.join(", ")}`;
193
+ }
194
+ if (process === void 0) return null;
195
+ const builders = HOLDER_PROCESS_VERBS.map((verb) => `process.${verb}()`).join(", ");
196
+ if (!Array.isArray(process) || process.length === 0) return `declares \`process\` ${JSON.stringify(process)} — a non-empty list of processes (${builders})`;
197
+ const seen = /* @__PURE__ */ new Set();
198
+ for (const entry of process) {
199
+ const binding = processBindingOf(entry);
200
+ if (binding === null) return `processes ${JSON.stringify(entry)}, which is no process (${builders})`;
201
+ const { verb } = binding;
202
+ const declared = PROCESS_CATALOG[verb];
203
+ if (declared.site === "kind") return `processes "${verb}", which every ${declared.kinds.join(", ")} gets from birth on its kind's row — never a holder's to declare`;
204
+ if (declared.site === "place") return `processes "${verb}", which every ${declared.kinds.join(", ")} place gets wherever its value carries a crop — never a holder's to declare`;
205
+ if (seen.has(verb)) return `processes "${verb}" twice — a holder declares each process once`;
206
+ seen.add(verb);
207
+ const options = processOptionsProblem(binding);
208
+ if (options !== null) return `processes "${verb}" with options that do not fit: ${options}`;
209
+ const outside = declaredKinds(declaration).filter((kind) => !declared.kinds.includes(kind));
210
+ if (outside.length > 0) return `processes "${verb}", which applies to ${declared.kinds.join(", ")} and not to ${outside.join(", ")}`;
211
+ }
212
+ return null;
23
213
  }
24
214
  const REFERRAL_FIELDS = [
25
215
  "name",
@@ -41,27 +231,6 @@ const REFERRAL_IMAGE_FIELDS = [
41
231
  "logo_dark",
42
232
  "logo_light"
43
233
  ];
44
- const INPUT_GROUPS = [
45
- "address",
46
- "type",
47
- "intent",
48
- "describe",
49
- "uploads",
50
- "units",
51
- "comparables",
52
- "contacts"
53
- ];
54
- const INPUT_GROUP_REQUIREMENT = {
55
- address: "always",
56
- type: "always",
57
- intent: "always",
58
- describe: "always",
59
- uploads: "always",
60
- units: "derived",
61
- comparables: "derived",
62
- contacts: "derived"
63
- };
64
- const ALWAYS_ASKED_INPUT_GROUPS = INPUT_GROUPS.filter((group) => INPUT_GROUP_REQUIREMENT[group] === "always");
65
234
  const FACT_PROJECTIONS = {
66
235
  property: {
67
236
  latitude: "lat",
@@ -72,11 +241,8 @@ const FACT_PROJECTIONS = {
72
241
  const PROPERTY_ROOT_FACTS = {
73
242
  address: {
74
243
  role: "bindable",
75
- path: "address",
76
244
  container: "property",
77
245
  value_type: "text",
78
- input_group: "address",
79
- strength: "blocking",
80
246
  fields: {
81
247
  display: { value_type: "text" },
82
248
  street: { value_type: "text" },
@@ -89,89 +255,54 @@ const PROPERTY_ROOT_FACTS = {
89
255
  },
90
256
  address_street: {
91
257
  role: "bindable",
92
- path: "address.street",
93
258
  container: "property",
94
- value_type: "text",
95
- input_group: "address",
96
- strength: "blocking"
259
+ value_type: "text"
97
260
  },
98
261
  address_unit: {
99
262
  role: "bindable",
100
- path: "address.unit",
101
263
  container: "property",
102
- value_type: "text",
103
- input_group: "address",
104
- strength: "optional"
264
+ value_type: "text"
105
265
  },
106
266
  address_city: {
107
267
  role: "bindable",
108
- path: "address.city",
109
268
  container: "property",
110
- value_type: "text",
111
- input_group: "address",
112
- strength: "blocking"
269
+ value_type: "text"
113
270
  },
114
271
  address_state: {
115
272
  role: "bindable",
116
- path: "address.state",
117
273
  container: "property",
118
- value_type: "text",
119
- input_group: "address",
120
- strength: "blocking"
274
+ value_type: "text"
121
275
  },
122
276
  address_postal: {
123
277
  role: "bindable",
124
- path: "address.postal",
125
278
  container: "property",
126
- value_type: "text",
127
- input_group: "address",
128
- strength: "blocking"
279
+ value_type: "text"
129
280
  },
130
281
  listing_intent: {
131
282
  role: "bindable",
132
- path: "listing_intent",
133
283
  container: "property",
134
284
  value_type: "text",
135
- input_group: "intent",
136
- strength: "blocking",
137
285
  writeback: {
138
286
  kind: "property",
139
287
  column: "listing_intent"
140
288
  }
141
289
  },
142
- property_type: {
143
- role: "bindable",
144
- path: "property_type",
145
- container: "property",
146
- value_type: "text",
147
- input_group: "type",
148
- strength: "blocking"
149
- },
150
290
  lat: {
151
291
  role: "bindable",
152
- path: "lat",
153
292
  container: "property",
154
- value_type: "number",
155
- input_group: "address",
156
- strength: "blocking"
293
+ value_type: "number"
157
294
  },
158
295
  lon: {
159
296
  role: "bindable",
160
- path: "lon",
161
297
  container: "property",
162
- value_type: "number",
163
- input_group: "address",
164
- strength: "blocking"
298
+ value_type: "number"
165
299
  }
166
300
  };
167
- const COLLECTION_FACTS = {
301
+ const TABLE_FACTS = {
168
302
  units: {
169
303
  role: "bindable",
170
- path: "units",
171
304
  container: "property",
172
305
  value_type: "unit_list",
173
- input_group: "units",
174
- strength: "blocking",
175
306
  row: {
176
307
  unit_id: {
177
308
  path: "unit_id",
@@ -184,7 +315,6 @@ const COLLECTION_FACTS = {
184
315
  floor_plans: {
185
316
  path: "floor_plans",
186
317
  value_type: "image_list",
187
- pool: "floor_plans",
188
318
  row: {
189
319
  id: { value_type: "text" },
190
320
  floor_label: { value_type: "text" },
@@ -194,42 +324,39 @@ const COLLECTION_FACTS = {
194
324
  unit_label: {
195
325
  path: "unit_label",
196
326
  value_type: "text",
197
- strength: "optional",
327
+ primary: true,
198
328
  writeback: { column: "unit_label" }
199
329
  },
200
330
  beds: {
201
331
  path: "beds",
202
332
  value_type: "number",
203
- strength: "blocking",
333
+ primary: true,
204
334
  writeback: { column: "beds" }
205
335
  },
206
336
  baths: {
207
337
  path: "baths",
208
338
  value_type: "number",
209
- strength: "blocking",
339
+ primary: true,
210
340
  writeback: { column: "baths" }
211
341
  },
212
342
  sqft: {
213
343
  path: "sqft",
214
344
  value_type: "number",
215
- strength: "blocking",
345
+ primary: true,
216
346
  writeback: { column: "sqft" }
217
347
  },
218
348
  price: {
219
349
  path: "price",
220
350
  value_type: "text",
221
- strength: "blocking",
351
+ primary: true,
222
352
  writeback: { column: "price" }
223
353
  }
224
354
  }
225
355
  },
226
356
  comparables: {
227
357
  role: "bindable",
228
- path: "comparables",
229
358
  container: "property",
230
359
  value_type: "comparable_list",
231
- input_group: "comparables",
232
- strength: "blocking",
233
360
  row: {
234
361
  id: {
235
362
  path: "id",
@@ -237,8 +364,7 @@ const COLLECTION_FACTS = {
237
364
  },
238
365
  address_street: {
239
366
  path: "address_street",
240
- value_type: "text",
241
- required: true
367
+ value_type: "text"
242
368
  },
243
369
  address_city: {
244
370
  path: "address_city",
@@ -258,13 +384,11 @@ const COLLECTION_FACTS = {
258
384
  },
259
385
  lat: {
260
386
  path: "lat",
261
- value_type: "number",
262
- required: true
387
+ value_type: "number"
263
388
  },
264
389
  lng: {
265
390
  path: "lng",
266
- value_type: "number",
267
- required: true
391
+ value_type: "number"
268
392
  },
269
393
  distance_m: {
270
394
  path: "distance_m",
@@ -277,7 +401,6 @@ const COLLECTION_FACTS = {
277
401
  price: {
278
402
  path: "price",
279
403
  value_type: "number",
280
- required: true,
281
404
  writeback: { column: "price" }
282
405
  },
283
406
  price_period: {
@@ -292,19 +415,16 @@ const COLLECTION_FACTS = {
292
415
  beds: {
293
416
  path: "beds",
294
417
  value_type: "number",
295
- required: true,
296
418
  writeback: { column: "beds" }
297
419
  },
298
420
  baths: {
299
421
  path: "baths",
300
422
  value_type: "number",
301
- required: true,
302
423
  writeback: { column: "baths" }
303
424
  },
304
425
  sqft: {
305
426
  path: "sqft",
306
427
  value_type: "number",
307
- required: true,
308
428
  writeback: { column: "sqft" }
309
429
  },
310
430
  photo: {
@@ -346,20 +466,13 @@ const COLLECTION_FACTS = {
346
466
  description: {
347
467
  path: "description",
348
468
  value_type: "text"
349
- },
350
- property_type: {
351
- path: "property_type",
352
- value_type: "text"
353
469
  }
354
470
  }
355
471
  },
356
472
  contacts: {
357
473
  role: "bindable",
358
- path: "contacts",
359
474
  container: "property",
360
475
  value_type: "contact_list",
361
- input_group: "contacts",
362
- strength: "blocking",
363
476
  row: {
364
477
  id: {
365
478
  path: "id",
@@ -372,92 +485,88 @@ const COLLECTION_FACTS = {
372
485
  name: {
373
486
  path: "name",
374
487
  value_type: "text",
375
- strength: "optional",
488
+ primary: true,
376
489
  writeback: { column: "name" }
377
490
  },
378
491
  title: {
379
492
  path: "title",
380
493
  value_type: "text",
381
- strength: "optional",
494
+ primary: true,
382
495
  writeback: { column: "title" }
383
496
  },
384
497
  org_name: {
385
498
  path: "org_name",
386
499
  value_type: "text",
387
- strength: "optional",
500
+ primary: true,
388
501
  writeback: { column: "org_name" }
389
502
  },
390
503
  bio: {
391
504
  path: "bio",
392
505
  value_type: "text",
393
- strength: "optional",
506
+ primary: true,
394
507
  writeback: { column: "bio" }
395
508
  },
396
509
  address: {
397
510
  path: "address",
398
511
  value_type: "text",
399
- strength: "optional",
400
- writeback: { column: "address" }
512
+ primary: true
401
513
  },
402
514
  email: {
403
515
  path: "email",
404
516
  value_type: "text",
405
- strength: "optional",
517
+ primary: true,
406
518
  writeback: { column: "email" }
407
519
  },
408
520
  phone: {
409
521
  path: "phone",
410
522
  value_type: "text",
411
- strength: "optional",
523
+ primary: true,
412
524
  writeback: { column: "phone" }
413
525
  },
414
526
  website: {
415
527
  path: "website_url",
416
528
  value_type: "text",
417
- strength: "optional",
529
+ primary: true,
418
530
  writeback: { column: "website" }
419
531
  },
420
532
  instagram: {
421
533
  path: "instagram_url",
422
534
  value_type: "text",
423
- strength: "optional",
535
+ primary: true,
424
536
  writeback: { column: "socials.instagram" }
425
537
  },
426
538
  linkedin: {
427
539
  path: "linkedin_url",
428
540
  value_type: "text",
429
- strength: "optional",
541
+ primary: true,
430
542
  writeback: { column: "socials.linkedin" }
431
543
  },
432
544
  x: {
433
545
  path: "x_url",
434
546
  value_type: "text",
435
- strength: "optional",
547
+ primary: true,
436
548
  writeback: { column: "socials.x" }
437
549
  },
438
550
  facebook: {
439
551
  path: "facebook_url",
440
552
  value_type: "text",
441
- strength: "optional",
553
+ primary: true,
442
554
  writeback: { column: "socials.facebook" }
443
555
  },
444
556
  headshot: {
445
557
  path: "avatar_upload_id",
446
558
  value_type: "image",
447
- strength: "optional",
448
- pool: "library"
559
+ primary: true
449
560
  },
450
561
  logo_dark: {
451
562
  path: "logo_dark_upload_id",
452
563
  value_type: "image",
453
- strength: "optional",
454
- pool: "library"
564
+ primary: true
455
565
  },
456
566
  logo_light: {
457
567
  path: "logo_light_upload_id",
458
568
  value_type: "image",
459
- strength: "optional",
460
- pool: "library"
569
+ primary: true
461
570
  }
462
571
  }
463
572
  }
@@ -466,92 +575,7 @@ const READABLE_FACTS = {
466
575
  description: {
467
576
  role: "readable",
468
577
  path: "narrative.description",
469
- value_type: "text",
470
- input_group: "describe",
471
- strength: "optional"
472
- },
473
- photos: {
474
- role: "readable",
475
- path: "photos",
476
- value_type: "row_list",
477
- input_group: "uploads",
478
- strength: "optional",
479
- row: {
480
- id: { value_type: "text" },
481
- tags: { value_type: "text_list" },
482
- caption: { value_type: "text" }
483
- }
484
- },
485
- videos: {
486
- role: "readable",
487
- path: "videos",
488
- value_type: "row_list",
489
- input_group: "uploads",
490
- strength: "optional",
491
- row: {
492
- id: { value_type: "text" },
493
- source: { value_type: "text" },
494
- tags: { value_type: "text_list" },
495
- caption: { value_type: "text" },
496
- description: { value_type: "text" },
497
- duration_ms: { value_type: "number" },
498
- url: { value_type: "text" },
499
- provider: { value_type: "text" }
500
- }
501
- },
502
- tours: {
503
- role: "readable",
504
- path: "tours",
505
- value_type: "row_list",
506
- input_group: "uploads",
507
- strength: "optional",
508
- row: {
509
- id: { value_type: "text" },
510
- url: { value_type: "text" },
511
- provider: { value_type: "text" }
512
- }
513
- },
514
- floor_plans: {
515
- role: "readable",
516
- path: "floor_plans",
517
- value_type: "row_list",
518
- input_group: "uploads",
519
- strength: "optional",
520
- row: {
521
- id: { value_type: "text" },
522
- unit_assignments: {
523
- value_type: "row_list",
524
- row: {
525
- unit_label: { value_type: "text" },
526
- floor_label: { value_type: "text" },
527
- position: { value_type: "number" }
528
- }
529
- }
530
- }
531
- },
532
- documents: {
533
- role: "readable",
534
- path: "documents",
535
- value_type: "row_list",
536
- input_group: "uploads",
537
- strength: "optional",
538
- row: {
539
- id: { value_type: "text" },
540
- filename: { value_type: "text" },
541
- mime: { value_type: "text" },
542
- notes: { value_type: "text" }
543
- }
544
- },
545
- document_notes: {
546
- role: "readable",
547
- path: "document_notes",
548
- value_type: "row_list",
549
- input_group: "uploads",
550
- strength: "optional",
551
- row: {
552
- upload_id: { value_type: "text" },
553
- notes: { value_type: "text" }
554
- }
578
+ value_type: "text"
555
579
  },
556
580
  unit: {
557
581
  role: "readable",
@@ -567,18 +591,15 @@ const READABLE_FACTS = {
567
591
  }
568
592
  };
569
593
  function primaryRowFacts(container) {
570
- const collection = COLLECTION_FACTS[READABLE_FACTS[container].primary_of];
594
+ const table = TABLE_FACTS[READABLE_FACTS[container].primary_of];
571
595
  const aliases = FACT_PROJECTIONS[container] ?? {};
572
596
  const facts = {};
573
- for (const [name, member] of Object.entries(collection.row)) {
574
- if (member.strength === void 0) continue;
597
+ for (const [name, member] of Object.entries(table.row)) {
598
+ if (member.primary !== true) continue;
575
599
  const fact = {
576
600
  role: "bindable",
577
- path: `${collection.path}[].${member.path}`,
578
601
  container,
579
- value_type: member.value_type,
580
- input_group: collection.input_group,
581
- strength: member.strength
602
+ value_type: member.value_type
582
603
  };
583
604
  if (member.value_type === "image") fact.image = true;
584
605
  if (member.writeback !== void 0) fact.writeback = container === "unit" ? {
@@ -596,7 +617,7 @@ function composeFactGraph() {
596
617
  return {
597
618
  ...PROPERTY_ROOT_FACTS,
598
619
  ...primaryRowFacts("unit"),
599
- ...COLLECTION_FACTS,
620
+ ...TABLE_FACTS,
600
621
  ...primaryRowFacts("contact"),
601
622
  ...READABLE_FACTS
602
623
  };
@@ -617,14 +638,11 @@ function projectBindableFacts(graph) {
617
638
  return projected;
618
639
  }
619
640
  const SOURCE_FIELDS = /* @__PURE__ */ projectBindableFacts(FACT_GRAPH);
620
- function isWritableSourceField(field) {
621
- return SOURCE_FIELDS[field]?.writeback !== void 0;
622
- }
623
641
  const OPTION_SOURCES = ["listing_intent"];
624
642
  function isOptionSource(value) {
625
643
  return OPTION_SOURCES.includes(value);
626
644
  }
627
- const COLLECTIONS = {
645
+ const TABLES = {
628
646
  units: {
629
647
  idKey: "unit_id",
630
648
  ownership: "property"
@@ -640,23 +658,51 @@ const COLLECTIONS = {
640
658
  ownership: "property"
641
659
  }
642
660
  };
643
- function collectionForSlot(slot) {
644
- if (slot.source?.kind !== "direct") return null;
645
- const field = slot.source.field;
646
- return field !== void 0 && Object.hasOwn(COLLECTIONS, field) ? field : null;
661
+ const REGISTRY_TABLE_KEYS = {
662
+ units: "property.units",
663
+ contacts: "property.contacts",
664
+ comparables: "property.comparables",
665
+ commercial_spaces: "property.commercial_spaces"
666
+ };
667
+ const LIBRARY_TABLE_KEYS = { contacts: "library.contacts" };
668
+ function isLegacyTable(table) {
669
+ return Object.hasOwn(TABLES, table);
670
+ }
671
+ const TABLE_OF_REGISTRY_KEY = /* @__PURE__ */ Object.fromEntries([...Object.entries(REGISTRY_TABLE_KEYS), ...Object.entries(LIBRARY_TABLE_KEYS)].map(([table, key]) => [key, table]));
672
+ function tableKeyOf(key) {
673
+ if (typeof key !== "string") return null;
674
+ if (Object.hasOwn(TABLES, key)) return {
675
+ table: key,
676
+ reading: "legacy"
677
+ };
678
+ const table = Object.hasOwn(TABLE_OF_REGISTRY_KEY, key) ? TABLE_OF_REGISTRY_KEY[key] : void 0;
679
+ return table === void 0 ? null : {
680
+ table,
681
+ reading: "registry"
682
+ };
647
683
  }
648
- function collectionBounds(field) {
649
- const entry = COLLECTIONS[field];
684
+ function tableKeyOfSource(source) {
685
+ return source?.kind === "home" ? tableKeyOf(source.key) : null;
686
+ }
687
+ function tableForSlot(slot) {
688
+ return tableKeyOfSource(slot.source)?.table ?? null;
689
+ }
690
+ function rowMemberWriteback(table, member) {
691
+ return FACT_GRAPH[table].row[member]?.writeback ?? null;
692
+ }
693
+ function tableBounds(field) {
694
+ if (!isLegacyTable(field)) return {};
695
+ const entry = TABLES[field];
650
696
  return {
651
697
  ...entry.min !== void 0 ? { min: entry.min } : {},
652
698
  ...entry.cap !== void 0 ? { max: entry.cap } : {}
653
699
  };
654
700
  }
655
- function stampCollectionBounds(slots) {
701
+ function stampTableBounds(slots) {
656
702
  for (const slot of Object.values(slots)) {
657
- const collection = collectionForSlot(slot);
658
- if (collection === null) continue;
659
- const inherited = collectionBounds(collection);
703
+ const table = tableForSlot(slot);
704
+ if (table === null) continue;
705
+ const inherited = tableBounds(table);
660
706
  if (slot.min === void 0 && inherited.min !== void 0) slot.min = inherited.min;
661
707
  if (slot.max === void 0 && inherited.max !== void 0) slot.max = inherited.max;
662
708
  }
@@ -684,6 +730,43 @@ const LINK_PROVIDERS = {
684
730
  pattern: /(^|\.)biganto\.com$/i,
685
731
  strategy: "opengraph"
686
732
  },
733
+ iguide: {
734
+ kind: "tour",
735
+ label: "iGUIDE",
736
+ pattern: /(^|\.)youriguide\.com$/i,
737
+ strategy: "opengraph"
738
+ },
739
+ kuula: {
740
+ kind: "tour",
741
+ label: "Kuula",
742
+ pattern: /(^|\.)kuula\.co$/i,
743
+ strategy: "opengraph"
744
+ },
745
+ momento360: {
746
+ kind: "tour",
747
+ label: "Momento360",
748
+ pattern: /(^|\.)momento360\.com$/i,
749
+ strategy: "opengraph"
750
+ },
751
+ cloudpano: {
752
+ kind: "tour",
753
+ label: "CloudPano",
754
+ pattern: /(^|\.)cloudpano\.com$/i,
755
+ strategy: "none"
756
+ },
757
+ asteroom: {
758
+ kind: "tour",
759
+ label: "Asteroom",
760
+ pattern: /(^|\.)asteroom\.com$/i,
761
+ strategy: "none"
762
+ },
763
+ zillow3d: {
764
+ kind: "tour",
765
+ label: "Zillow 3D Home",
766
+ pattern: /(^|\.)zillow\.com$/i,
767
+ path: /^\/view-3d-home\//i,
768
+ strategy: "none"
769
+ },
687
770
  youtube: {
688
771
  kind: "video",
689
772
  label: "YouTube",
@@ -752,7 +835,19 @@ function acceptsLink(accepts, url) {
752
835
  if (id === accepts) return true;
753
836
  return LINK_KINDS.includes(accepts) && LINK_PROVIDERS[id].kind === accepts;
754
837
  }
755
- const VIDEO_SOURCES = ["upload", "link"];
838
+ function isIsoDateValue(value) {
839
+ if (typeof value !== "string" || !/^\d{4}-\d{2}-\d{2}$/.test(value)) return false;
840
+ const day = /* @__PURE__ */ new Date(`${value}T00:00:00Z`);
841
+ return !Number.isNaN(day.getTime()) && day.toISOString().slice(0, 10) === value;
842
+ }
843
+ function isEmailValue(value) {
844
+ return typeof value === "string" && /^[^\s@]+@[^\s@.]+(\.[^\s@.]+)+$/.test(value);
845
+ }
846
+ function isPhoneValue(value) {
847
+ if (typeof value !== "string" || !/^\+?[\d\s().-]+$/.test(value)) return false;
848
+ const digits = value.replace(/\D/g, "").length;
849
+ return digits >= 7 && digits <= 15;
850
+ }
756
851
  const VIMEO_PARAMS = "badge=0&autopause=0&player_id=0&title=0&byline=0&portrait=0&sidedock=0&vimeo_logo=0&pip=0&chromecast=0&quality_selector=0&progress_bar=1";
757
852
  function videoEmbedUrl(raw) {
758
853
  const url = raw.trim();
@@ -776,9 +871,18 @@ function tourEmbedUrl(raw) {
776
871
  const sid = new URL(url).searchParams.get("m");
777
872
  return sid !== null && /^[A-Za-z0-9]+$/.test(sid) ? `https://my.matterport.com/show/?m=${sid}&nt=1` : null;
778
873
  }
779
- if (provider === "biganto") return url;
874
+ if (provider !== null && PASSTHROUGH_TOUR_PROVIDERS.has(provider)) return url;
780
875
  return null;
781
876
  }
877
+ const PASSTHROUGH_TOUR_PROVIDERS = /* @__PURE__ */ new Set([
878
+ "biganto",
879
+ "iguide",
880
+ "kuula",
881
+ "momento360",
882
+ "cloudpano",
883
+ "asteroom",
884
+ "zillow3d"
885
+ ]);
782
886
 
783
887
  //#endregion
784
- export { COLLECTIONS, COLLECTION_SLOT_TYPES, CONTENT_SLOT_TYPES, DISPLAY_ENTRIES, FACT_GRAPH, FACT_PROJECTIONS, INPUT_GROUPS, INPUT_GROUP_REQUIREMENT, LINK_KINDS, LINK_PROVIDERS, OPTION_SOURCES, REFERRAL_FIELDS, REFERRAL_IMAGE_FIELDS, REF_SLOT_TYPES, SLOT_TYPES, SOURCE_FIELDS, SOURCE_FILTERS, VIDEO_SOURCES, VISIBILITY_CASES, acceptsLink, collectionBounds, collectionForSlot, isCollectionSlotType, isLinkAccepts, isOptionSource, isSourceFilter, isWritableSourceField, matchLinkProvider, stampCollectionBounds, tourEmbedUrl, videoEmbedUrl };
888
+ export { CONTENT_SLOT_TYPES, DISPLAY_ENTRIES, FACT_GRAPH, FACT_PROJECTIONS, HOLDER_PROCESS_VERBS, LIBRARY_TABLE_KEYS, LINK_KINDS, LINK_PROVIDERS, LIST_SLOT_TYPES, MEDIA_KINDS, OBJECT_BINDING_OWN_KEYS, OPTION_SOURCES, PROCESS_CATALOG, PROCESS_VERBS, REFERRAL_FIELDS, REFERRAL_IMAGE_FIELDS, REF_SLOT_TYPES, REGISTRY_TABLE_KEYS, SLOT_TYPES, SOURCE_FIELDS, TABLES, VISIBILITY_CASES, acceptsLink, declaredKinds, isEmailValue, isIsoDateValue, isLegacyTable, isLinkAccepts, isListSlotType, isMediaKind, isMediaType, isOptionSource, isPhoneValue, isProcessVerb, matchLinkProvider, mediaDeclarationProblem, processBindingOf, processOptionsProblem, rowMemberWriteback, stampTableBounds, tableBounds, tableForSlot, tableKeyOf, tableKeyOfSource, tourEmbedUrl, videoEmbedUrl };