@homepages/concrete 6.1.0 → 7.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 (87) hide show
  1. package/CHANGELOG.md +166 -0
  2. package/codemods/manifest.json +17 -0
  3. package/codemods/object-form-only.mjs +39 -0
  4. package/codemods/steps/list-object-form.mjs +688 -0
  5. package/codemods/steps/select-object-form.mjs +210 -0
  6. package/dist/artifact/playground/client/assets/index-D8eepVr-.js +1101 -0
  7. package/dist/artifact/playground/client/index.html +1 -1
  8. package/dist/artifact/playground/host.mjs +14 -14
  9. package/dist/asset-modules.d.ts +2 -1
  10. package/dist/cli/check/stages/render.js +1 -1
  11. package/dist/cli/check/stages/sections.js +1 -1
  12. package/dist/fixtures/canonical.d.ts +2 -5
  13. package/dist/fixtures/media.js +11 -25
  14. package/dist/fixtures/property.js +28 -16
  15. package/dist/fixtures/resolve.js +75 -32
  16. package/dist/fixtures/rows.js +3 -83
  17. package/dist/fixtures.d.ts +17 -9
  18. package/dist/index.d.ts +9 -9
  19. package/dist/packages/external/concrete/package.js +1 -1
  20. package/dist/packages/internal/fill-bake/dist/bake-property-ref.js +31 -8
  21. package/dist/packages/internal/fill-bake/dist/derive-source.js +15 -4
  22. package/dist/packages/internal/fill-bake/dist/index.js +2 -2
  23. package/dist/packages/internal/fill-vocabulary/dist/origination.js +6 -1
  24. package/dist/packages/internal/fill-vocabulary/dist/row-reads.js +15 -0
  25. package/dist/packages/internal/property-facts/dist/index.js +1 -1
  26. package/dist/packages/internal/property-facts/dist/{property-facts-5pxZnlkh.js → property-facts-Cy7-O4p0.js} +2 -5
  27. package/dist/packages/internal/section-contracts/dist/catalog.js +0 -4
  28. package/dist/packages/internal/section-contracts/dist/choose-select-contract.js +4 -4
  29. package/dist/packages/internal/section-contracts/dist/display-evidence-contract.js +2 -1
  30. package/dist/packages/internal/section-contracts/dist/fill-spec-view.js +5 -1
  31. package/dist/packages/internal/section-contracts/dist/group-contract.js +1 -3
  32. package/dist/packages/internal/section-contracts/dist/index.js +0 -1
  33. package/dist/packages/internal/section-contracts/dist/list-fill-contract.js +3 -3
  34. package/dist/packages/internal/section-contracts/dist/list-scalar-contract.js +1 -5
  35. package/dist/packages/internal/section-contracts/dist/name-title-contract.js +2 -2
  36. package/dist/packages/internal/section-contracts/dist/pooling-field-contract.js +3 -1
  37. package/dist/packages/internal/section-contracts/dist/row-fill-contract.js +14 -0
  38. package/dist/packages/internal/section-contracts/dist/runners.js +0 -5
  39. package/dist/packages/internal/section-contracts/dist/source-contract.js +80 -4
  40. package/dist/packages/internal/section-contracts/dist/writer-reads-fact-contract.js +12 -6
  41. package/dist/packages/internal/source-resolution/dist/index.js +57 -20
  42. package/dist/packages/internal/template-contracts/dist/facts-view.d.ts +16 -17
  43. package/dist/packages/internal/template-contracts/dist/facts-view.js +6 -18
  44. package/dist/packages/internal/template-contracts/dist/row-sources.js +26 -0
  45. package/dist/packages/internal/template-contracts/dist/slot-catalog.d.ts +362 -380
  46. package/dist/packages/internal/template-contracts/dist/slot-catalog.js +289 -289
  47. package/dist/primitives/slot-bindings.d.ts +7 -40
  48. package/dist/primitives/slot-bindings.js +10 -12
  49. package/dist/schema/define-schema.d.ts +1 -1
  50. package/dist/schema/define-schema.js +32 -17
  51. package/dist/schema/extract-fill-spec.js +15 -13
  52. package/dist/schema/fact.d.ts +2 -19
  53. package/dist/schema/fill-builders.d.ts +4 -3
  54. package/dist/schema/fill-spec.js +9 -1
  55. package/dist/schema/layout.d.ts +6 -8
  56. package/dist/schema/layout.js +3 -9
  57. package/dist/schema/property-facts.d.ts +16 -47
  58. package/dist/schema/row-fields.js +88 -0
  59. package/dist/schema/row-ref.d.ts +59 -0
  60. package/dist/schema/row-ref.js +28 -0
  61. package/dist/schema/runtime-values.d.ts +8 -13
  62. package/dist/schema/section-props.d.ts +19 -26
  63. package/dist/schema/section-schema.d.ts +6 -6
  64. package/dist/schema/section-schema.js +2 -2
  65. package/dist/schema/slot-builders.d.ts +222 -117
  66. package/dist/schema/slot-builders.js +57 -28
  67. package/dist/schema/slot-ref.d.ts +18 -2
  68. package/dist/schema/slot-ref.js +11 -3
  69. package/dist/schema/slot-types.d.ts +7 -7
  70. package/dist/schema/slot-types.js +55 -19
  71. package/dist/section/declare.d.ts +1 -1
  72. package/dist/section/section.d.ts +3 -3
  73. package/dist/template/logic-shim.d.ts +1 -1
  74. package/guide/reference/cli/INDEX.md +2 -2
  75. package/guide/reference/cli/build.md +1 -1
  76. package/guide/reference/cli/check.md +1 -1
  77. package/guide/reference/cli/dev.md +1 -1
  78. package/guide/reference/cli/property-add.md +1 -1
  79. package/guide/reference/cli/property-list.md +1 -1
  80. package/guide/reference/cli/publish.md +1 -1
  81. package/guide/reference/cli/upgrade.md +1 -1
  82. package/guide/reference/rules/INDEX.md +1 -2
  83. package/package.json +1 -1
  84. package/tsconfig.base.json +1 -0
  85. package/dist/artifact/playground/client/assets/index-Cqz-jjVw.js +0 -1101
  86. package/dist/packages/internal/section-contracts/dist/row-contract.js +0 -37
  87. package/dist/packages/internal/template-contracts/dist/layout.js +0 -10
@@ -1,37 +0,0 @@
1
- import { flattenLayout, isShortSlot } from "../../template-contracts/dist/layout.js";
2
-
3
- //#region ../../internal/section-contracts/dist/row-contract.js
4
- function assertRowContract(schema, sectionKey) {
5
- for (const group of schema.groups ?? []) assertRowPairs(group.members, schema.slots, `group "${group.id}"`, sectionKey);
6
- for (const [slotId, slot] of Object.entries(schema.slots)) {
7
- if (slot.type !== "list") continue;
8
- if (!slot.layout) continue;
9
- const label = `${slot.type} "${slotId}"`;
10
- const itemFields = slot.fields ?? {};
11
- assertRowPairs(slot.layout, itemFields, label, sectionKey);
12
- const flat = flattenLayout(slot.layout);
13
- const dup = flat.find((id, i) => flat.indexOf(id) !== i);
14
- if (dup) throw new Error(`Section "${sectionKey}": ${label} layout lists "${dup}" more than once.`);
15
- for (const id of flat) if (!(id in itemFields)) throw new Error(`Section "${sectionKey}": ${label} layout names unknown field "${id}".`);
16
- for (const key of Object.keys(itemFields)) if (!flat.includes(key)) throw new Error(`Section "${sectionKey}": ${label} layout omits field "${key}".`);
17
- }
18
- }
19
- function assertRowPairs(layout, slots, ctx, sectionKey) {
20
- const order = Object.keys(slots);
21
- for (const entry of layout) {
22
- if (typeof entry === "string") continue;
23
- const [a, b] = entry;
24
- for (const id of [a, b]) {
25
- const slot = slots[id];
26
- if (!slot) throw new Error(`Section "${sectionKey}": ${ctx} row names unknown slot "${id}".`);
27
- if (!isShortSlot({
28
- type: slot.type ?? "",
29
- size: slot.size
30
- })) throw new Error(`Section "${sectionKey}": ${ctx} row pairs non-short slot "${id}" (type "${slot.type}"); only number/short-text slots may share a row.`);
31
- }
32
- if (order.indexOf(b) !== order.indexOf(a) + 1) throw new Error(`Section "${sectionKey}": ${ctx} row [${a}, ${b}] must be adjacent and in order; reorder the declaration so "${b}" immediately follows "${a}".`);
33
- }
34
- }
35
-
36
- //#endregion
37
- export { assertRowContract };
@@ -1,10 +0,0 @@
1
- //#region ../../internal/template-contracts/dist/layout.js
2
- function flattenLayout(layout) {
3
- return layout.flatMap((entry) => typeof entry === "string" ? [entry] : [entry[0], entry[1]]);
4
- }
5
- function isShortSlot(slot) {
6
- return slot.type === "number" || slot.type === "url" || slot.type === "text" && (slot.size === void 0 || slot.size === "short");
7
- }
8
-
9
- //#endregion
10
- export { flattenLayout, isShortSlot };