@homepages/concrete 9.1.0 → 11.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 (171) hide show
  1. package/CHANGELOG.md +81 -0
  2. package/README.md +1 -1
  3. package/codemods/manifest.json +5 -148
  4. package/dist/artifact/playground/client/assets/index-ByeGGedv.js +1259 -0
  5. package/dist/artifact/playground/client/assets/index-CxWPYOH2.css +1 -0
  6. package/dist/artifact/playground/client/index.html +2 -2
  7. package/dist/artifact/playground/client/island-canvas-host.mjs +1 -1
  8. package/dist/artifact/playground/host.mjs +42 -42
  9. package/dist/base.css +1 -8
  10. package/dist/cli/build/artifact.js +3 -2
  11. package/dist/cli/build/fixtures.js +2 -0
  12. package/dist/cli/check/render/inputs.js +3 -3
  13. package/dist/cli/check/stages/sections.js +6 -7
  14. package/dist/cli/dev/workspace-reader.js +10 -2
  15. package/dist/css/compile.js +3 -6
  16. package/dist/css/rules.js +1 -51
  17. package/dist/design-system/format-variants.js +1 -1
  18. package/dist/fixtures/media-store.js +3 -3
  19. package/dist/fixtures/resolve.js +28 -16
  20. package/dist/fixtures/rows.js +2 -2
  21. package/dist/fixtures/synthesize-empties.js +3 -1
  22. package/dist/fixtures.d.ts +1 -1
  23. package/dist/index.d.ts +7 -8
  24. package/dist/packages/external/concrete/package.js +1 -1
  25. package/dist/packages/internal/fill-bake/dist/bake-property-ref.js +8 -6
  26. package/dist/packages/internal/fill-bake/dist/compute-reads.js +8 -4
  27. package/dist/packages/internal/fill-bake/dist/index.js +1 -1
  28. package/dist/packages/internal/fill-bake/dist/item-merge.js +32 -6
  29. package/dist/packages/internal/fill-bake/dist/linked-merge.js +5 -5
  30. package/dist/packages/internal/fill-bake/dist/list-grammar.js +4 -26
  31. package/dist/packages/internal/fill-vocabulary/dist/holder.js +3 -14
  32. package/dist/packages/internal/fill-vocabulary/dist/resolved-decision.js +1 -1
  33. package/dist/packages/internal/media-resolution/dist/document.js +17 -16
  34. package/dist/packages/internal/media-resolution/dist/image.js +41 -95
  35. package/dist/packages/internal/media-resolution/dist/index.js +1 -1
  36. package/dist/packages/internal/media-resolution/dist/list.js +11 -11
  37. package/dist/packages/internal/media-resolution/dist/media.js +17 -16
  38. package/dist/packages/internal/media-resolution/dist/records.js +4 -2
  39. package/dist/packages/internal/media-resolution/dist/slot.js +5 -5
  40. package/dist/packages/internal/media-resolution/dist/tour.js +17 -16
  41. package/dist/packages/internal/media-resolution/dist/video.js +24 -24
  42. package/dist/packages/internal/property-facts/dist/registry-facts.js +8 -1
  43. package/dist/packages/internal/section-contracts/dist/catalog.js +1 -5
  44. package/dist/packages/internal/section-contracts/dist/directly-linked-list-contract.js +2 -3
  45. package/dist/packages/internal/section-contracts/dist/fill-verb-contract.js +6 -3
  46. package/dist/packages/internal/section-contracts/dist/index.js +0 -1
  47. package/dist/packages/internal/section-contracts/dist/object-contract.js +4 -2
  48. package/dist/packages/internal/section-contracts/dist/row-fill-contract.js +1 -1
  49. package/dist/packages/internal/section-contracts/dist/row-rule-contract.js +4 -2
  50. package/dist/packages/internal/section-contracts/dist/row-source-contract.js +7 -8
  51. package/dist/packages/internal/section-contracts/dist/runners.js +2 -11
  52. package/dist/packages/internal/section-contracts/dist/select-contract.js +7 -1
  53. package/dist/packages/internal/section-contracts/dist/source-contract.js +14 -10
  54. package/dist/packages/internal/section-contracts/dist/sources-contract.js +0 -2
  55. package/dist/packages/internal/section-contracts/dist/table-member.js +5 -8
  56. package/dist/packages/internal/source-resolution/dist/index.js +21 -188
  57. package/dist/packages/internal/template-artifact/dist/index.js +1 -1
  58. package/dist/packages/internal/template-artifact/dist/layout.js +12 -10
  59. package/dist/packages/internal/template-artifact/dist/manifest.js +1 -1
  60. package/dist/packages/internal/template-artifact/dist/verify.js +26 -14
  61. package/dist/packages/internal/template-contracts/dist/content-pick.js +24 -1
  62. package/dist/packages/internal/template-contracts/dist/document-value.d.ts +4 -6
  63. package/dist/packages/internal/template-contracts/dist/fact-keys.d.ts +3 -2
  64. package/dist/packages/internal/template-contracts/dist/fact-keys.js +19 -43
  65. package/dist/packages/internal/template-contracts/dist/fact-registry.d.ts +24 -3
  66. package/dist/packages/internal/template-contracts/dist/fact-registry.js +10 -3
  67. package/dist/packages/internal/template-contracts/dist/fill-builders.d.ts +1 -1
  68. package/dist/packages/internal/template-contracts/dist/fill-builders.js +2 -6
  69. package/dist/packages/internal/template-contracts/dist/fill-spec-schema.js +4 -1
  70. package/dist/packages/internal/template-contracts/dist/fill-spec.js +7 -6
  71. package/dist/packages/internal/template-contracts/dist/list.d.ts +1 -1
  72. package/dist/packages/internal/template-contracts/dist/list.js +7 -29
  73. package/dist/packages/internal/template-contracts/dist/mirror-kind.js +2 -2
  74. package/dist/packages/internal/template-contracts/dist/object.js +3 -2
  75. package/dist/packages/internal/template-contracts/dist/primitive-descriptors.js +1 -1
  76. package/dist/packages/internal/template-contracts/dist/process-builders.d.ts +2 -2
  77. package/dist/packages/internal/template-contracts/dist/read-graph.js +5 -32
  78. package/dist/packages/internal/template-contracts/dist/ref-locate.js +10 -6
  79. package/dist/packages/internal/template-contracts/dist/registry-facts.d.ts +1 -1
  80. package/dist/packages/internal/template-contracts/dist/registry-facts.js +13 -24
  81. package/dist/packages/internal/template-contracts/dist/registry-shape.d.ts +20 -4
  82. package/dist/packages/internal/template-contracts/dist/registry-shape.js +69 -11
  83. package/dist/packages/internal/template-contracts/dist/row-planners.js +1 -1
  84. package/dist/packages/internal/template-contracts/dist/row-ref.d.ts +4 -7
  85. package/dist/packages/internal/template-contracts/dist/row-ref.js +7 -23
  86. package/dist/packages/internal/template-contracts/dist/row-sources.js +3 -3
  87. package/dist/packages/internal/template-contracts/dist/row.d.ts +1 -1
  88. package/dist/packages/internal/template-contracts/dist/row.js +6 -7
  89. package/dist/packages/internal/template-contracts/dist/runtime-values.d.ts +11 -27
  90. package/dist/packages/internal/template-contracts/dist/section-schema-types.d.ts +1 -0
  91. package/dist/packages/internal/template-contracts/dist/slot-builders.d.ts +29 -37
  92. package/dist/packages/internal/template-contracts/dist/slot-builders.js +3 -8
  93. package/dist/packages/internal/template-contracts/dist/slot-catalog.d.ts +2 -702
  94. package/dist/packages/internal/template-contracts/dist/slot-catalog.js +2 -498
  95. package/dist/packages/internal/template-contracts/dist/slot-overrides.js +4 -1
  96. package/dist/packages/internal/template-contracts/dist/slot-ref.d.ts +10 -5
  97. package/dist/packages/internal/template-contracts/dist/slot-value.d.ts +2 -1
  98. package/dist/packages/internal/template-contracts/dist/table-members.d.ts +5 -12
  99. package/dist/packages/internal/template-contracts/dist/table-members.js +7 -37
  100. package/dist/packages/internal/template-contracts/dist/tour-value.d.ts +4 -6
  101. package/dist/packages/internal/template-contracts/dist/video-value.d.ts +3 -4
  102. package/dist/primitives/Image.d.ts +4 -4
  103. package/dist/primitives/Tour.d.ts +2 -2
  104. package/dist/primitives/Video.d.ts +2 -2
  105. package/dist/primitives/slot-bindings.js +6 -13
  106. package/dist/primitives/slot-document.d.ts +1 -1
  107. package/dist/primitives/slot-download.d.ts +4 -2
  108. package/dist/primitives/slot-media.d.ts +6 -3
  109. package/dist/primitives/slot-media.js +1 -1
  110. package/dist/rules/registry.js +0 -6
  111. package/dist/schema/fact.d.ts +19 -52
  112. package/dist/schema/fact.js +6 -25
  113. package/dist/schema/facts-view.d.ts +1 -2
  114. package/dist/schema/format-presets.d.ts +1 -1
  115. package/dist/schema/property-facts.d.ts +1 -62
  116. package/dist/schema/section-schema.d.ts +6 -6
  117. package/dist/schema/section-schema.js +1 -1
  118. package/dist/styles.css +4 -4
  119. package/dist/template/define-template.js +0 -1
  120. package/guide/reference/cli/INDEX.md +2 -2
  121. package/guide/reference/cli/build.md +1 -1
  122. package/guide/reference/cli/check.md +1 -1
  123. package/guide/reference/cli/dev.md +1 -1
  124. package/guide/reference/cli/property-add.md +1 -1
  125. package/guide/reference/cli/property-list.md +1 -1
  126. package/guide/reference/cli/publish.md +1 -1
  127. package/guide/reference/cli/upgrade.md +1 -1
  128. package/guide/reference/rules/INDEX.md +2 -4
  129. package/package.json +2 -2
  130. package/codemods/fill-is-a-source.mjs +0 -533
  131. package/codemods/framework-namespace.mjs +0 -107
  132. package/codemods/list-grammar.mjs +0 -923
  133. package/codemods/object-form-only.mjs +0 -39
  134. package/codemods/platform-namespace.mjs +0 -83
  135. package/codemods/process-builders.mjs +0 -198
  136. package/codemods/reads-replace-reconcile.mjs +0 -285
  137. package/codemods/slot-object.mjs +0 -1097
  138. package/codemods/steps/content-object-fields.mjs +0 -324
  139. package/codemods/steps/list-object-form.mjs +0 -687
  140. package/codemods/steps/select-object-form.mjs +0 -210
  141. package/codemods/table-rows.mjs +0 -568
  142. package/codemods/theme-collapse.mjs +0 -396
  143. package/codemods/unlayer-author-css.mjs +0 -194
  144. package/codemods/unwrap-object-fields.mjs +0 -310
  145. package/codemods/viewer-slot-document.mjs +0 -131
  146. package/codemods/write-property-as-facts-document.mjs +0 -716
  147. package/codemods/write-the-address-line.mjs +0 -255
  148. package/codemods/write-the-registry-members.mjs +0 -653
  149. package/codemods/write-the-select-from.mjs +0 -141
  150. package/codemods/write-the-sole-from.mjs +0 -369
  151. package/codemods/write-the-table-from.mjs +0 -267
  152. package/codemods/write-the-whole-item.mjs +0 -512
  153. package/codemods/writeback-drop.mjs +0 -168
  154. package/codemods/written-contact-address.mjs +0 -162
  155. package/codemods/written-media-category.mjs +0 -227
  156. package/codemods/written-ref-kinds-name-the-layer.mjs +0 -172
  157. package/codemods/written-uploads-replace-pool-reads.mjs +0 -454
  158. package/codemods/written-uploads-sort-into-lists.mjs +0 -405
  159. package/codemods/written-uploads-stated-in-sorted-lists.mjs +0 -295
  160. package/codemods/written-video-sources-drop.mjs +0 -144
  161. package/codemods/written-without-pick-none.mjs +0 -146
  162. package/codemods/written-without-retired-knowledge.mjs +0 -223
  163. package/codemods/written-without-the-media-key.mjs +0 -202
  164. package/codemods/written-without-the-property-type.mjs +0 -249
  165. package/dist/artifact/playground/client/assets/index-BOYbgBnP.js +0 -1259
  166. package/dist/artifact/playground/client/assets/index-DDOcM0zA.css +0 -1
  167. package/dist/packages/internal/section-contracts/dist/option-source-contract.js +0 -22
  168. package/dist/packages/internal/template-contracts/dist/comparable-address.js +0 -19
  169. package/dist/packages/internal/template-contracts/dist/facts-view.d.ts +0 -62
  170. package/dist/packages/internal/template-contracts/dist/legacy-facts.js +0 -167
  171. package/dist/packages/internal/template-contracts/dist/registry-aliases.js +0 -77
@@ -158,7 +158,7 @@ function processOptionsProblem(binding) {
158
158
  const listed = takes.length > 0 ? `it takes ${takes.map((key) => `\`${key}\``).join(", ")}` : "it takes none";
159
159
  for (const [key, value] of Object.entries(binding)) {
160
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`;
161
+ if (key === "reads") return `\`${binding.verb}\` takes no \`reads\` — a process is about one media value, never the property`;
162
162
  const option = entry.options[key];
163
163
  if (option === void 0) {
164
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" : "";
@@ -207,502 +207,6 @@ function mediaDeclarationProblem(declaration) {
207
207
  }
208
208
  return null;
209
209
  }
210
- const REFERRAL_FIELDS = [
211
- "name",
212
- "title",
213
- "org_name",
214
- "email",
215
- "phone",
216
- "website",
217
- "instagram",
218
- "linkedin",
219
- "x",
220
- "facebook",
221
- "headshot",
222
- "logo_dark",
223
- "logo_light"
224
- ];
225
- const REFERRAL_IMAGE_FIELDS = [
226
- "headshot",
227
- "logo_dark",
228
- "logo_light"
229
- ];
230
- const FACT_PROJECTIONS = {
231
- property: {
232
- latitude: "lat",
233
- longitude: "lon"
234
- },
235
- contact: { address: "contact_address" }
236
- };
237
- const PROPERTY_ROOT_FACTS = {
238
- address: {
239
- role: "bindable",
240
- container: "property",
241
- value_type: "text",
242
- fields: {
243
- display: { value_type: "text" },
244
- street: { value_type: "text" },
245
- street_no_type: { value_type: "text" },
246
- city: { value_type: "text" },
247
- state: { value_type: "text" },
248
- postal: { value_type: "text" },
249
- unit: { value_type: "text" }
250
- }
251
- },
252
- address_street: {
253
- role: "bindable",
254
- container: "property",
255
- value_type: "text"
256
- },
257
- address_unit: {
258
- role: "bindable",
259
- container: "property",
260
- value_type: "text"
261
- },
262
- address_city: {
263
- role: "bindable",
264
- container: "property",
265
- value_type: "text"
266
- },
267
- address_state: {
268
- role: "bindable",
269
- container: "property",
270
- value_type: "text"
271
- },
272
- address_postal: {
273
- role: "bindable",
274
- container: "property",
275
- value_type: "text"
276
- },
277
- listing_intent: {
278
- role: "bindable",
279
- container: "property",
280
- value_type: "text",
281
- writeback: {
282
- kind: "property",
283
- column: "listing_intent"
284
- }
285
- },
286
- lat: {
287
- role: "bindable",
288
- container: "property",
289
- value_type: "number"
290
- },
291
- lon: {
292
- role: "bindable",
293
- container: "property",
294
- value_type: "number"
295
- }
296
- };
297
- const TABLE_FACTS = {
298
- units: {
299
- role: "bindable",
300
- container: "property",
301
- value_type: "unit_list",
302
- row: {
303
- unit_id: {
304
- path: "unit_id",
305
- value_type: "text"
306
- },
307
- position: {
308
- path: "position",
309
- value_type: "number"
310
- },
311
- floor_plans: {
312
- path: "floor_plans",
313
- value_type: "image_list",
314
- row: {
315
- id: { value_type: "text" },
316
- floor_label: { value_type: "text" },
317
- position: { value_type: "number" }
318
- }
319
- },
320
- unit_label: {
321
- path: "unit_label",
322
- value_type: "text",
323
- primary: true,
324
- writeback: { column: "unit_label" }
325
- },
326
- beds: {
327
- path: "beds",
328
- value_type: "number",
329
- primary: true,
330
- writeback: { column: "beds" }
331
- },
332
- baths: {
333
- path: "baths",
334
- value_type: "number",
335
- primary: true,
336
- writeback: { column: "baths" }
337
- },
338
- sqft: {
339
- path: "sqft",
340
- value_type: "number",
341
- primary: true,
342
- writeback: { column: "sqft" }
343
- },
344
- price: {
345
- path: "price",
346
- value_type: "text",
347
- primary: true,
348
- writeback: { column: "price" }
349
- }
350
- }
351
- },
352
- comparables: {
353
- role: "bindable",
354
- container: "property",
355
- value_type: "comparable_list",
356
- row: {
357
- id: {
358
- path: "id",
359
- value_type: "text"
360
- },
361
- address_street: {
362
- path: "address_street",
363
- value_type: "text"
364
- },
365
- address_city: {
366
- path: "address_city",
367
- value_type: "text"
368
- },
369
- address_state: {
370
- path: "address_state",
371
- value_type: "text"
372
- },
373
- address_postal: {
374
- path: "address_postal",
375
- value_type: "text"
376
- },
377
- address: {
378
- path: "address",
379
- value_type: "text"
380
- },
381
- lat: {
382
- path: "lat",
383
- value_type: "number"
384
- },
385
- lng: {
386
- path: "lng",
387
- value_type: "number"
388
- },
389
- distance_m: {
390
- path: "distance_m",
391
- value_type: "number"
392
- },
393
- status: {
394
- path: "status",
395
- value_type: "text"
396
- },
397
- price: {
398
- path: "price",
399
- value_type: "number",
400
- writeback: { column: "price" }
401
- },
402
- price_period: {
403
- path: "price_period",
404
- value_type: "text"
405
- },
406
- sale_date: {
407
- path: "sale_date",
408
- value_type: "text",
409
- writeback: { column: "sale_date" }
410
- },
411
- beds: {
412
- path: "beds",
413
- value_type: "number",
414
- writeback: { column: "beds" }
415
- },
416
- baths: {
417
- path: "baths",
418
- value_type: "number",
419
- writeback: { column: "baths" }
420
- },
421
- sqft: {
422
- path: "sqft",
423
- value_type: "number",
424
- writeback: { column: "sqft" }
425
- },
426
- photo: {
427
- path: "photo_upload_id",
428
- value_type: "image"
429
- },
430
- year_built: {
431
- path: "year_built",
432
- value_type: "number"
433
- },
434
- lot_sqft: {
435
- path: "lot_sqft",
436
- value_type: "number"
437
- },
438
- stories: {
439
- path: "stories",
440
- value_type: "number"
441
- },
442
- units: {
443
- path: "units",
444
- value_type: "number"
445
- },
446
- hoa_monthly: {
447
- path: "hoa_monthly",
448
- value_type: "number"
449
- },
450
- list_price: {
451
- path: "list_price",
452
- value_type: "number"
453
- },
454
- listed_date: {
455
- path: "listed_date",
456
- value_type: "text"
457
- },
458
- mls_number: {
459
- path: "mls_number",
460
- value_type: "text"
461
- },
462
- description: {
463
- path: "description",
464
- value_type: "text"
465
- }
466
- }
467
- },
468
- contacts: {
469
- role: "bindable",
470
- container: "property",
471
- value_type: "contact_list",
472
- row: {
473
- id: {
474
- path: "id",
475
- value_type: "text"
476
- },
477
- primary: {
478
- path: "primary",
479
- value_type: "boolean"
480
- },
481
- name: {
482
- path: "name",
483
- value_type: "text",
484
- primary: true,
485
- writeback: { column: "name" }
486
- },
487
- title: {
488
- path: "title",
489
- value_type: "text",
490
- primary: true,
491
- writeback: { column: "title" }
492
- },
493
- org_name: {
494
- path: "org_name",
495
- value_type: "text",
496
- primary: true,
497
- writeback: { column: "org_name" }
498
- },
499
- bio: {
500
- path: "bio",
501
- value_type: "text",
502
- primary: true,
503
- writeback: { column: "bio" }
504
- },
505
- address: {
506
- path: "address",
507
- value_type: "text",
508
- primary: true
509
- },
510
- email: {
511
- path: "email",
512
- value_type: "text",
513
- primary: true,
514
- writeback: { column: "email" }
515
- },
516
- phone: {
517
- path: "phone",
518
- value_type: "text",
519
- primary: true,
520
- writeback: { column: "phone" }
521
- },
522
- website: {
523
- path: "website_url",
524
- value_type: "text",
525
- primary: true,
526
- writeback: { column: "website" }
527
- },
528
- instagram: {
529
- path: "instagram_url",
530
- value_type: "text",
531
- primary: true,
532
- writeback: { column: "socials.instagram" }
533
- },
534
- linkedin: {
535
- path: "linkedin_url",
536
- value_type: "text",
537
- primary: true,
538
- writeback: { column: "socials.linkedin" }
539
- },
540
- x: {
541
- path: "x_url",
542
- value_type: "text",
543
- primary: true,
544
- writeback: { column: "socials.x" }
545
- },
546
- facebook: {
547
- path: "facebook_url",
548
- value_type: "text",
549
- primary: true,
550
- writeback: { column: "socials.facebook" }
551
- },
552
- headshot: {
553
- path: "avatar_upload_id",
554
- value_type: "image",
555
- primary: true
556
- },
557
- logo_dark: {
558
- path: "logo_dark_upload_id",
559
- value_type: "image",
560
- primary: true
561
- },
562
- logo_light: {
563
- path: "logo_light_upload_id",
564
- value_type: "image",
565
- primary: true
566
- }
567
- }
568
- }
569
- };
570
- const READABLE_FACTS = {
571
- description: {
572
- role: "readable",
573
- path: "narrative.description",
574
- value_type: "text"
575
- },
576
- unit: {
577
- role: "readable",
578
- path: "units",
579
- value_type: "row",
580
- primary_of: "units"
581
- },
582
- contact: {
583
- role: "readable",
584
- path: "contacts",
585
- value_type: "row",
586
- primary_of: "contacts"
587
- }
588
- };
589
- function primaryRowFacts(container) {
590
- const table = TABLE_FACTS[READABLE_FACTS[container].primary_of];
591
- const aliases = FACT_PROJECTIONS[container] ?? {};
592
- const facts = {};
593
- for (const [name, member] of Object.entries(table.row)) {
594
- if (member.primary !== true) continue;
595
- const fact = {
596
- role: "bindable",
597
- container,
598
- value_type: member.value_type
599
- };
600
- if (member.value_type === "image") fact.image = true;
601
- if (member.writeback !== void 0) fact.writeback = container === "unit" ? {
602
- kind: "unit",
603
- column: member.writeback.column
604
- } : {
605
- kind: "contact",
606
- field: member.writeback.column
607
- };
608
- facts[aliases[name] ?? name] = fact;
609
- }
610
- return facts;
611
- }
612
- function composeFactGraph() {
613
- return {
614
- ...PROPERTY_ROOT_FACTS,
615
- ...primaryRowFacts("unit"),
616
- ...TABLE_FACTS,
617
- ...primaryRowFacts("contact"),
618
- ...READABLE_FACTS
619
- };
620
- }
621
- const FACT_GRAPH = /* @__PURE__ */ composeFactGraph();
622
- function projectBindableFacts(graph) {
623
- const projected = {};
624
- for (const [name, entry] of Object.entries(graph)) {
625
- if (entry.role !== "bindable") continue;
626
- const descriptor = {
627
- container: entry.container,
628
- value_type: entry.value_type
629
- };
630
- if (entry.image === true) descriptor.image = true;
631
- if (entry.writeback !== void 0) descriptor.writeback = entry.writeback;
632
- projected[name] = descriptor;
633
- }
634
- return projected;
635
- }
636
- const SOURCE_FIELDS = /* @__PURE__ */ projectBindableFacts(FACT_GRAPH);
637
- const OPTION_SOURCES = ["listing_intent"];
638
- function isOptionSource(value) {
639
- return OPTION_SOURCES.includes(value);
640
- }
641
- const TABLES = {
642
- units: {
643
- idKey: "unit_id",
644
- ownership: "property"
645
- },
646
- contacts: {
647
- idKey: "id",
648
- cap: 12,
649
- min: 1,
650
- ownership: "library"
651
- },
652
- comparables: {
653
- idKey: "id",
654
- ownership: "property"
655
- }
656
- };
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;
688
- }
689
- function tableBounds(field) {
690
- if (!isLegacyTable(field)) return {};
691
- const entry = TABLES[field];
692
- return {
693
- ...entry.min !== void 0 ? { min: entry.min } : {},
694
- ...entry.cap !== void 0 ? { max: entry.cap } : {}
695
- };
696
- }
697
- function stampTableBounds(slots) {
698
- for (const slot of Object.values(slots)) {
699
- const table = tableForSlot(slot);
700
- if (table === null) continue;
701
- const inherited = tableBounds(table);
702
- if (slot.min === void 0 && inherited.min !== void 0) slot.min = inherited.min;
703
- if (slot.max === void 0 && inherited.max !== void 0) slot.max = inherited.max;
704
- }
705
- }
706
210
  const DISPLAY_ENTRIES = ["visibility", "variant"];
707
211
  const VISIBILITY_CASES = ["visible", "hidden"];
708
212
  const LINK_KINDS = [
@@ -881,4 +385,4 @@ const PASSTHROUGH_TOUR_PROVIDERS = /* @__PURE__ */ new Set([
881
385
  ]);
882
386
 
883
387
  //#endregion
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 };
388
+ export { CONTENT_SLOT_TYPES, DISPLAY_ENTRIES, HOLDER_PROCESS_VERBS, LINK_KINDS, LINK_PROVIDERS, LIST_SLOT_TYPES, MEDIA_KINDS, OBJECT_BINDING_OWN_KEYS, PROCESS_CATALOG, PROCESS_VERBS, REF_SLOT_TYPES, SLOT_TYPES, VISIBILITY_CASES, acceptsLink, declaredKinds, isEmailValue, isIsoDateValue, isLinkAccepts, isListSlotType, isMediaKind, isMediaType, isPhoneValue, isProcessVerb, matchLinkProvider, mediaDeclarationProblem, processBindingOf, processOptionsProblem, tourEmbedUrl, videoEmbedUrl };
@@ -1,4 +1,7 @@
1
1
  //#region ../../internal/template-contracts/dist/slot-overrides.js
2
+ function isOrderOverridden(overrides, slotId) {
3
+ return overrides?.order?.[slotId] === true;
4
+ }
2
5
  function isSlotOverridden(overrides, slotId) {
3
6
  return overrides?.scalar?.[slotId] === true;
4
7
  }
@@ -18,4 +21,4 @@ function itemOverridesForSlot(overrides, slotId) {
18
21
  }
19
22
 
20
23
  //#endregion
21
- export { isSlotOverridden, itemOverridesForSlot, objectFieldOf, objectFieldSlotId };
24
+ export { isOrderOverridden, isSlotOverridden, itemOverridesForSlot, objectFieldOf, objectFieldSlotId };
@@ -51,8 +51,8 @@ interface RowRef<Field extends string = string, Value = unknown, Read = Value> {
51
51
  readonly __value?: Value;
52
52
  /**
53
53
  * Phantom: what the member holds as a `compute()` reads it — its value, but on a table's
54
- * row what the facts document holds (an image's `{ asset_id }`, which `ReadValue` hands
55
- * as its asset's record). Never present at runtime.
54
+ * row what the facts document holds (an image's value or `{ media }` reference, which `ReadValue` hands
55
+ * as its media record). Never present at runtime.
56
56
  */
57
57
  readonly __read?: Read;
58
58
  }
@@ -112,12 +112,17 @@ type RefValue<R> = R extends {
112
112
  } ? V : unknown;
113
113
  /**
114
114
  * `V` as a read hands it: each media value in it — a reference, or a slot's media value —
115
- * its asset's record, narrowed by kind where the value says it, at any depth. The type
115
+ * its media record, narrowed by kind where the value says it, at any depth. The type
116
116
  * half of the read step (./registry-facts `readAsRecords`).
117
117
  */
118
- type AsRead<V> = V extends ImageValue ? ImageMedia : V extends VideoValue ? VideoMedia : V extends TourValue ? TourMedia : V extends DocumentValue ? DocumentMedia : V extends DocumentMediaValue ? Media : V extends readonly unknown[] ? { [I in keyof V]: AsRead<V[I]>; } : V extends object ? { [K in keyof V]: AsRead<V[K]>; } : V;
118
+ type AsRead<V> = V extends DocumentValue ? DocumentMedia : V extends ImageValue ? {
119
+ image: ImageMedia;
120
+ video: VideoMedia;
121
+ tour: TourMedia;
122
+ }[PictureKindOf<V>] : V extends DocumentMediaValue ? Media : V extends readonly unknown[] ? { [I in keyof V]: AsRead<V[I]>; } : V extends object ? { [K in keyof V]: AsRead<V[K]>; } : V;
123
+ type PictureKindOf<V> = [Extract<keyof V, Exclude<keyof VideoValue, keyof TourValue>>] extends [never] ? [Extract<keyof V, Exclude<keyof TourValue, keyof ImageValue>>] extends [never] ? "image" : "tour" : "video";
119
124
  /**
120
- * The value ONE ref hands a declaration that reads it, each media value in it its asset's
125
+ * The value ONE ref hands a declaration that reads it, each media value in it its media
121
126
  * record (`AsRead`). A slot read is always `| undefined` — the upstream section's page may
122
127
  * be disabled, the section unplaced on a given composition, the slot empty — so a body
123
128
  * must say what it does with nothing. A fact settles at intake and carries its own null.
@@ -1,10 +1,11 @@
1
1
  import { AddressValue } from "./address-value.js";
2
2
  import { DocumentValue } from "./document-value.js";
3
- import { MediaKind, RegistryTableKey } from "./slot-catalog.js";
3
+ import { MediaKind } from "./slot-catalog.js";
4
4
  import { TourValue } from "./tour-value.js";
5
5
  import { VideoValue } from "./video-value.js";
6
6
  import { PoiRow } from "./poi-row.js";
7
7
  import { ImageValue, MediaValue } from "./runtime-values.js";
8
+ import { RegistryTableKey } from "./registry-shape.js";
8
9
  import { RowId } from "./row-ref.js";
9
10
  //#region ../../internal/template-contracts/dist/slot-value.d.ts
10
11
  /**
@@ -1,25 +1,18 @@
1
1
  import { AddressValue } from "./address-value.js";
2
- import { RegistryTable } from "./slot-catalog.js";
3
- import { MemberValueTypeOf, TableFieldsOf } from "./registry-shape.js";
4
- import { LibraryFactRegistry, PropertyTablePages } from "./fact-registry.js";
2
+ import { MemberValueTypeOf, RegistryTable, RegistryTableKey, TableElementOf, TableFieldsOf } from "./registry-shape.js";
3
+ import "./fact-registry.js";
5
4
  import { FactItem } from "./registry-facts.js";
6
5
  //#region ../../internal/template-contracts/dist/table-members.d.ts
7
- interface RegistryItems {
8
- units: FactItem<PropertyTablePages["units"]["declaration"]["element"]>;
9
- comparables: FactItem<PropertyTablePages["comparables"]["declaration"]["element"]>;
10
- commercial_spaces: FactItem<PropertyTablePages["commercial_spaces"]["declaration"]["element"]>;
11
- contacts: FactItem<LibraryFactRegistry["pages"]["contacts"]["declaration"]["element"]>;
12
- }
13
- type RegistryItem<T extends RegistryTable> = RegistryItems[T];
6
+ type RegistryItem<T extends RegistryTable> = FactItem<TableElementOf<T>>;
14
7
  type AddressMemberOf<T extends RegistryTable> = { [M in keyof TableFieldsOf<T>]: TableFieldsOf<T>[M] extends {
15
8
  readonly type: "address";
16
9
  } ? M : never; }[keyof TableFieldsOf<T>];
17
10
  /**
18
- * One row of table `T` under its registry reading: the facts document's item, its
11
+ * One row of table `T`: the facts document's item, its
19
12
  * identity `id` beside its members, an address-valued member read as an address slot
20
13
  * holds it (`AddressValue`, `null` when it holds no place). What a `compute()` reading
21
14
  * the table's registry key receives per row, and what each member read reads.
22
15
  */
23
16
  type RegistryTableRow<T extends RegistryTable> = Omit<RegistryItem<T>, AddressMemberOf<T>> & { [M in AddressMemberOf<T> & string]: AddressValue | null; };
24
17
  //#endregion
25
- export { RegistryTableRow };
18
+ export { type RegistryTable, RegistryTableRow };
@@ -1,7 +1,5 @@
1
1
  import { ADDRESS_MEMBERS, isAddressMember } from "./address-value.js";
2
- import { FACT_GRAPH, REGISTRY_TABLE_KEYS, TABLES, isLegacyTable, rowMemberWriteback, tableKeyOf } from "./slot-catalog.js";
3
- import { addressPartValueType, fieldOf, isDerived, memberListOfKey, memberValueType, tableColumnOfKey, tableFieldsIn, tableHome } from "./registry-shape.js";
4
- import { legacyMemberOf, registryMemberOfLegacy } from "./registry-aliases.js";
2
+ import { addressPartValueType, fieldOf, isDerived, memberListOfKey, memberValueType, stampTableBounds, tableBounds, tableColumnOfKey, tableFieldsIn, tableForSlot, tableHome, tableKey, tableMemberValueType, tableNames, tableOf, tableOfSource } from "./registry-shape.js";
5
3
  import { libraryFacts, propertyFacts } from "./fact-registry.js";
6
4
  import { isRegistryFactKey, registryFactValueType } from "./fact-keys.js";
7
5
 
@@ -15,30 +13,11 @@ function tableField(table, member) {
15
13
  function registryMemberNames(table) {
16
14
  return Object.keys(tableFields(table));
17
15
  }
18
- function rowIdentityKey(key) {
19
- return key.reading === "legacy" ? TABLES[key.table].idKey : "id";
20
- }
21
- function legacyMember(table, path) {
22
- const row = FACT_GRAPH[table].row;
23
- const descriptor = Object.hasOwn(row, path) ? row[path] : void 0;
24
- if (descriptor === void 0) return {
25
- kind: "unknown",
26
- offers: Object.keys(row).filter((name) => name !== TABLES[table].idKey)
27
- };
28
- const writeback = descriptor.writeback ?? null;
29
- return {
30
- kind: "member",
31
- value_type: descriptor.value_type,
32
- legacy: path,
33
- writeback,
34
- storable: writeback !== null
35
- };
36
- }
37
- function registryMember(table, path) {
16
+ function tableRowMember(table, path) {
17
+ if (path === "id") return { kind: "identity" };
38
18
  const dot = path.indexOf(".");
39
19
  const head = dot === -1 ? path : path.slice(0, dot);
40
- const declaration = tableField(table, head);
41
- const valueType = declaration === void 0 ? null : memberValueType(declaration);
20
+ const valueType = tableMemberValueType(table, head) ?? null;
42
21
  if (valueType === null) return {
43
22
  kind: "unknown",
44
23
  offers: registryMemberNames(table)
@@ -56,35 +35,26 @@ function registryMember(table, path) {
56
35
  return {
57
36
  kind: "member",
58
37
  value_type: addressPartValueType(part),
59
- legacy: null,
60
- writeback: null,
61
38
  storable: isStorable(table, path)
62
39
  };
63
40
  }
64
- const legacy = isLegacyTable(table) ? legacyMemberOf(table, path) : null;
65
41
  return {
66
42
  kind: "member",
67
43
  value_type: valueType,
68
- legacy,
69
- writeback: legacy === null || !isLegacyTable(table) ? null : rowMemberWriteback(table, legacy),
70
44
  storable: isStorable(table, path)
71
45
  };
72
46
  }
73
- function tableRowMember(key, path) {
74
- if (path === rowIdentityKey(key)) return { kind: "identity" };
75
- return key.reading === "legacy" ? legacyMember(key.table, path) : registryMember(key.table, path);
76
- }
77
47
  function isStorable(keyOrTable, path) {
78
48
  if (path === void 0) {
79
- if (tableKeyOf(keyOrTable)?.reading === "registry") return true;
49
+ if (tableOf(keyOrTable) !== null) return true;
80
50
  if (!isRegistryFactKey(keyOrTable)) return false;
81
51
  const parent = keyOrTable.slice(0, keyOrTable.lastIndexOf("."));
82
52
  return !(isRegistryFactKey(parent) && registryFactValueType(parent) === "address");
83
53
  }
84
- if (!Object.hasOwn(REGISTRY_TABLE_KEYS, keyOrTable)) return false;
54
+ if (!tableNames().includes(keyOrTable)) return false;
85
55
  const declaration = tableField(keyOrTable, path);
86
56
  return declaration !== void 0 && !isDerived(declaration);
87
57
  }
88
58
 
89
59
  //#endregion
90
- export { isStorable, memberListOfKey, memberValueType, registryMemberNames, rowIdentityKey, tableColumnOfKey, tableField, tableFields, tableRowMember };
60
+ export { isStorable, memberListOfKey, memberValueType, registryMemberNames, stampTableBounds, tableBounds, tableColumnOfKey, tableField, tableFields, tableForSlot, tableKey, tableNames, tableOf, tableRowMember };