@homepages/concrete 9.1.0 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/README.md +1 -1
  3. package/codemods/manifest.json +10 -0
  4. package/codemods/registry-keys-only.mjs +113 -0
  5. package/codemods/steps/list-object-form.mjs +2 -3
  6. package/codemods/steps/registry-key-reads.mjs +276 -0
  7. package/dist/artifact/playground/client/assets/index-BFNHB7VM.css +1 -0
  8. package/dist/artifact/playground/client/assets/index-Div1yo6s.js +1259 -0
  9. package/dist/artifact/playground/client/index.html +2 -2
  10. package/dist/artifact/playground/host.mjs +42 -42
  11. package/dist/cli/build/artifact.js +2 -1
  12. package/dist/cli/build/fixtures.js +2 -1
  13. package/dist/cli/check/render/inputs.js +3 -3
  14. package/dist/cli/check/stages/sections.js +5 -6
  15. package/dist/cli/dev/workspace-reader.js +9 -2
  16. package/dist/fixtures/media-store.js +3 -3
  17. package/dist/fixtures/resolve.js +24 -16
  18. package/dist/fixtures/synthesize-empties.js +3 -1
  19. package/dist/fixtures.d.ts +1 -1
  20. package/dist/index.d.ts +3 -4
  21. package/dist/packages/external/concrete/package.js +1 -1
  22. package/dist/packages/internal/fill-bake/dist/bake-property-ref.js +8 -6
  23. package/dist/packages/internal/fill-bake/dist/compute-reads.js +8 -4
  24. package/dist/packages/internal/fill-bake/dist/index.js +1 -1
  25. package/dist/packages/internal/fill-bake/dist/item-merge.js +32 -6
  26. package/dist/packages/internal/fill-bake/dist/linked-merge.js +5 -5
  27. package/dist/packages/internal/fill-bake/dist/list-grammar.js +4 -26
  28. package/dist/packages/internal/fill-vocabulary/dist/resolved-decision.js +1 -1
  29. package/dist/packages/internal/media-resolution/dist/document.js +16 -15
  30. package/dist/packages/internal/media-resolution/dist/image.js +38 -92
  31. package/dist/packages/internal/media-resolution/dist/index.js +1 -1
  32. package/dist/packages/internal/media-resolution/dist/list.js +11 -11
  33. package/dist/packages/internal/media-resolution/dist/media.js +17 -16
  34. package/dist/packages/internal/media-resolution/dist/records.js +4 -2
  35. package/dist/packages/internal/media-resolution/dist/slot.js +5 -5
  36. package/dist/packages/internal/media-resolution/dist/tour.js +12 -11
  37. package/dist/packages/internal/media-resolution/dist/video.js +16 -16
  38. package/dist/packages/internal/property-facts/dist/registry-facts.js +8 -1
  39. package/dist/packages/internal/section-contracts/dist/catalog.js +1 -5
  40. package/dist/packages/internal/section-contracts/dist/directly-linked-list-contract.js +2 -3
  41. package/dist/packages/internal/section-contracts/dist/fill-verb-contract.js +5 -3
  42. package/dist/packages/internal/section-contracts/dist/index.js +0 -1
  43. package/dist/packages/internal/section-contracts/dist/object-contract.js +4 -2
  44. package/dist/packages/internal/section-contracts/dist/row-fill-contract.js +1 -1
  45. package/dist/packages/internal/section-contracts/dist/row-rule-contract.js +4 -2
  46. package/dist/packages/internal/section-contracts/dist/row-source-contract.js +7 -8
  47. package/dist/packages/internal/section-contracts/dist/runners.js +1 -8
  48. package/dist/packages/internal/section-contracts/dist/select-contract.js +7 -1
  49. package/dist/packages/internal/section-contracts/dist/source-contract.js +12 -8
  50. package/dist/packages/internal/section-contracts/dist/sources-contract.js +1 -1
  51. package/dist/packages/internal/section-contracts/dist/table-member.js +5 -8
  52. package/dist/packages/internal/source-resolution/dist/index.js +21 -188
  53. package/dist/packages/internal/template-artifact/dist/index.js +2 -2
  54. package/dist/packages/internal/template-artifact/dist/layout.js +3 -1
  55. package/dist/packages/internal/template-artifact/dist/verify.js +32 -16
  56. package/dist/packages/internal/template-contracts/dist/content-pick.js +24 -1
  57. package/dist/packages/internal/template-contracts/dist/document-value.d.ts +2 -2
  58. package/dist/packages/internal/template-contracts/dist/fact-keys.d.ts +3 -2
  59. package/dist/packages/internal/template-contracts/dist/fact-keys.js +19 -43
  60. package/dist/packages/internal/template-contracts/dist/fact-registry.d.ts +24 -3
  61. package/dist/packages/internal/template-contracts/dist/fact-registry.js +10 -3
  62. package/dist/packages/internal/template-contracts/dist/fill-builders.d.ts +1 -1
  63. package/dist/packages/internal/template-contracts/dist/fill-spec.js +7 -6
  64. package/dist/packages/internal/template-contracts/dist/list.d.ts +1 -1
  65. package/dist/packages/internal/template-contracts/dist/list.js +7 -15
  66. package/dist/packages/internal/template-contracts/dist/mirror-kind.js +2 -2
  67. package/dist/packages/internal/template-contracts/dist/object.js +3 -2
  68. package/dist/packages/internal/template-contracts/dist/process-builders.d.ts +2 -2
  69. package/dist/packages/internal/template-contracts/dist/read-graph.js +5 -32
  70. package/dist/packages/internal/template-contracts/dist/ref-locate.js +10 -6
  71. package/dist/packages/internal/template-contracts/dist/registry-facts.d.ts +1 -1
  72. package/dist/packages/internal/template-contracts/dist/registry-facts.js +13 -24
  73. package/dist/packages/internal/template-contracts/dist/registry-shape.d.ts +20 -4
  74. package/dist/packages/internal/template-contracts/dist/registry-shape.js +69 -11
  75. package/dist/packages/internal/template-contracts/dist/row-planners.js +1 -1
  76. package/dist/packages/internal/template-contracts/dist/row-ref.d.ts +4 -7
  77. package/dist/packages/internal/template-contracts/dist/row-ref.js +7 -23
  78. package/dist/packages/internal/template-contracts/dist/row-sources.js +3 -3
  79. package/dist/packages/internal/template-contracts/dist/row.d.ts +1 -1
  80. package/dist/packages/internal/template-contracts/dist/row.js +6 -7
  81. package/dist/packages/internal/template-contracts/dist/runtime-values.d.ts +5 -20
  82. package/dist/packages/internal/template-contracts/dist/section-schema-types.d.ts +1 -0
  83. package/dist/packages/internal/template-contracts/dist/slot-builders.d.ts +29 -37
  84. package/dist/packages/internal/template-contracts/dist/slot-builders.js +4 -7
  85. package/dist/packages/internal/template-contracts/dist/slot-catalog.d.ts +2 -702
  86. package/dist/packages/internal/template-contracts/dist/slot-catalog.js +2 -498
  87. package/dist/packages/internal/template-contracts/dist/slot-overrides.js +4 -1
  88. package/dist/packages/internal/template-contracts/dist/slot-ref.d.ts +4 -4
  89. package/dist/packages/internal/template-contracts/dist/slot-value.d.ts +2 -1
  90. package/dist/packages/internal/template-contracts/dist/table-members.d.ts +5 -12
  91. package/dist/packages/internal/template-contracts/dist/table-members.js +7 -37
  92. package/dist/packages/internal/template-contracts/dist/tour-value.d.ts +2 -2
  93. package/dist/primitives/Image.d.ts +3 -3
  94. package/dist/primitives/slot-download.d.ts +1 -1
  95. package/dist/primitives/slot-media.d.ts +1 -1
  96. package/dist/schema/fact.d.ts +19 -52
  97. package/dist/schema/fact.js +6 -25
  98. package/dist/schema/facts-view.d.ts +1 -2
  99. package/dist/schema/property-facts.d.ts +1 -62
  100. package/dist/schema/section-schema.d.ts +2 -2
  101. package/dist/schema/section-schema.js +1 -1
  102. package/guide/reference/cli/INDEX.md +2 -2
  103. package/guide/reference/cli/build.md +1 -1
  104. package/guide/reference/cli/check.md +1 -1
  105. package/guide/reference/cli/dev.md +1 -1
  106. package/guide/reference/cli/property-add.md +1 -1
  107. package/guide/reference/cli/property-list.md +1 -1
  108. package/guide/reference/cli/publish.md +1 -1
  109. package/guide/reference/cli/upgrade.md +1 -1
  110. package/guide/reference/rules/INDEX.md +2 -3
  111. package/package.json +1 -1
  112. package/dist/artifact/playground/client/assets/index-BOYbgBnP.js +0 -1259
  113. package/dist/artifact/playground/client/assets/index-DDOcM0zA.css +0 -1
  114. package/dist/packages/internal/section-contracts/dist/option-source-contract.js +0 -22
  115. package/dist/packages/internal/template-contracts/dist/comparable-address.js +0 -19
  116. package/dist/packages/internal/template-contracts/dist/facts-view.d.ts +0 -62
  117. package/dist/packages/internal/template-contracts/dist/legacy-facts.js +0 -167
  118. package/dist/packages/internal/template-contracts/dist/registry-aliases.js +0 -77
@@ -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,12 @@ 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
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;
119
119
  /**
120
- * The value ONE ref hands a declaration that reads it, each media value in it its asset's
120
+ * The value ONE ref hands a declaration that reads it, each media value in it its media
121
121
  * record (`AsRead`). A slot read is always `| undefined` — the upstream section's page may
122
122
  * be disabled, the section unplaced on a given composition, the slot empty — so a body
123
123
  * 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 };
@@ -7,8 +7,8 @@ import { ResponsiveImage } from "./responsive-image.js";
7
7
  */
8
8
  type TourValue = {
9
9
  /**
10
- * The `intake.upload.id` of the `type='link'` row this tour was selected from —
11
- * the same id `facts.tours[].id` carries. `''` is the empty value.
10
+ * The media id of the link this tour was selected from — the same id
11
+ * `facts.tours[].id` carries. `''` is the empty value.
12
12
  */
13
13
  tour_id: string;
14
14
  /**