@homepages/concrete 8.0.0 → 9.1.0

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