@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.
- package/CHANGELOG.md +52 -0
- package/README.md +1 -1
- package/codemods/manifest.json +10 -0
- package/codemods/registry-keys-only.mjs +113 -0
- package/codemods/steps/list-object-form.mjs +2 -3
- package/codemods/steps/registry-key-reads.mjs +276 -0
- package/dist/artifact/playground/client/assets/index-BFNHB7VM.css +1 -0
- package/dist/artifact/playground/client/assets/index-Div1yo6s.js +1259 -0
- package/dist/artifact/playground/client/index.html +2 -2
- package/dist/artifact/playground/host.mjs +42 -42
- package/dist/cli/build/artifact.js +2 -1
- package/dist/cli/build/fixtures.js +2 -1
- package/dist/cli/check/render/inputs.js +3 -3
- package/dist/cli/check/stages/sections.js +5 -6
- package/dist/cli/dev/workspace-reader.js +9 -2
- package/dist/fixtures/media-store.js +3 -3
- package/dist/fixtures/resolve.js +24 -16
- package/dist/fixtures/synthesize-empties.js +3 -1
- package/dist/fixtures.d.ts +1 -1
- package/dist/index.d.ts +3 -4
- package/dist/packages/external/concrete/package.js +1 -1
- package/dist/packages/internal/fill-bake/dist/bake-property-ref.js +8 -6
- package/dist/packages/internal/fill-bake/dist/compute-reads.js +8 -4
- package/dist/packages/internal/fill-bake/dist/index.js +1 -1
- package/dist/packages/internal/fill-bake/dist/item-merge.js +32 -6
- package/dist/packages/internal/fill-bake/dist/linked-merge.js +5 -5
- package/dist/packages/internal/fill-bake/dist/list-grammar.js +4 -26
- package/dist/packages/internal/fill-vocabulary/dist/resolved-decision.js +1 -1
- package/dist/packages/internal/media-resolution/dist/document.js +16 -15
- package/dist/packages/internal/media-resolution/dist/image.js +38 -92
- package/dist/packages/internal/media-resolution/dist/index.js +1 -1
- package/dist/packages/internal/media-resolution/dist/list.js +11 -11
- package/dist/packages/internal/media-resolution/dist/media.js +17 -16
- package/dist/packages/internal/media-resolution/dist/records.js +4 -2
- package/dist/packages/internal/media-resolution/dist/slot.js +5 -5
- package/dist/packages/internal/media-resolution/dist/tour.js +12 -11
- package/dist/packages/internal/media-resolution/dist/video.js +16 -16
- package/dist/packages/internal/property-facts/dist/registry-facts.js +8 -1
- package/dist/packages/internal/section-contracts/dist/catalog.js +1 -5
- package/dist/packages/internal/section-contracts/dist/directly-linked-list-contract.js +2 -3
- package/dist/packages/internal/section-contracts/dist/fill-verb-contract.js +5 -3
- package/dist/packages/internal/section-contracts/dist/index.js +0 -1
- package/dist/packages/internal/section-contracts/dist/object-contract.js +4 -2
- package/dist/packages/internal/section-contracts/dist/row-fill-contract.js +1 -1
- package/dist/packages/internal/section-contracts/dist/row-rule-contract.js +4 -2
- package/dist/packages/internal/section-contracts/dist/row-source-contract.js +7 -8
- package/dist/packages/internal/section-contracts/dist/runners.js +1 -8
- package/dist/packages/internal/section-contracts/dist/select-contract.js +7 -1
- package/dist/packages/internal/section-contracts/dist/source-contract.js +12 -8
- package/dist/packages/internal/section-contracts/dist/sources-contract.js +1 -1
- package/dist/packages/internal/section-contracts/dist/table-member.js +5 -8
- package/dist/packages/internal/source-resolution/dist/index.js +21 -188
- package/dist/packages/internal/template-artifact/dist/index.js +2 -2
- package/dist/packages/internal/template-artifact/dist/layout.js +3 -1
- package/dist/packages/internal/template-artifact/dist/verify.js +32 -16
- package/dist/packages/internal/template-contracts/dist/content-pick.js +24 -1
- package/dist/packages/internal/template-contracts/dist/document-value.d.ts +2 -2
- package/dist/packages/internal/template-contracts/dist/fact-keys.d.ts +3 -2
- package/dist/packages/internal/template-contracts/dist/fact-keys.js +19 -43
- package/dist/packages/internal/template-contracts/dist/fact-registry.d.ts +24 -3
- package/dist/packages/internal/template-contracts/dist/fact-registry.js +10 -3
- package/dist/packages/internal/template-contracts/dist/fill-builders.d.ts +1 -1
- package/dist/packages/internal/template-contracts/dist/fill-spec.js +7 -6
- package/dist/packages/internal/template-contracts/dist/list.d.ts +1 -1
- package/dist/packages/internal/template-contracts/dist/list.js +7 -15
- package/dist/packages/internal/template-contracts/dist/mirror-kind.js +2 -2
- package/dist/packages/internal/template-contracts/dist/object.js +3 -2
- package/dist/packages/internal/template-contracts/dist/process-builders.d.ts +2 -2
- package/dist/packages/internal/template-contracts/dist/read-graph.js +5 -32
- package/dist/packages/internal/template-contracts/dist/ref-locate.js +10 -6
- package/dist/packages/internal/template-contracts/dist/registry-facts.d.ts +1 -1
- package/dist/packages/internal/template-contracts/dist/registry-facts.js +13 -24
- package/dist/packages/internal/template-contracts/dist/registry-shape.d.ts +20 -4
- package/dist/packages/internal/template-contracts/dist/registry-shape.js +69 -11
- package/dist/packages/internal/template-contracts/dist/row-planners.js +1 -1
- package/dist/packages/internal/template-contracts/dist/row-ref.d.ts +4 -7
- package/dist/packages/internal/template-contracts/dist/row-ref.js +7 -23
- package/dist/packages/internal/template-contracts/dist/row-sources.js +3 -3
- package/dist/packages/internal/template-contracts/dist/row.d.ts +1 -1
- package/dist/packages/internal/template-contracts/dist/row.js +6 -7
- package/dist/packages/internal/template-contracts/dist/runtime-values.d.ts +5 -20
- package/dist/packages/internal/template-contracts/dist/section-schema-types.d.ts +1 -0
- package/dist/packages/internal/template-contracts/dist/slot-builders.d.ts +29 -37
- package/dist/packages/internal/template-contracts/dist/slot-builders.js +4 -7
- package/dist/packages/internal/template-contracts/dist/slot-catalog.d.ts +2 -702
- package/dist/packages/internal/template-contracts/dist/slot-catalog.js +2 -498
- package/dist/packages/internal/template-contracts/dist/slot-overrides.js +4 -1
- package/dist/packages/internal/template-contracts/dist/slot-ref.d.ts +4 -4
- package/dist/packages/internal/template-contracts/dist/slot-value.d.ts +2 -1
- package/dist/packages/internal/template-contracts/dist/table-members.d.ts +5 -12
- package/dist/packages/internal/template-contracts/dist/table-members.js +7 -37
- package/dist/packages/internal/template-contracts/dist/tour-value.d.ts +2 -2
- package/dist/primitives/Image.d.ts +3 -3
- package/dist/primitives/slot-download.d.ts +1 -1
- package/dist/primitives/slot-media.d.ts +1 -1
- package/dist/schema/fact.d.ts +19 -52
- package/dist/schema/fact.js +6 -25
- package/dist/schema/facts-view.d.ts +1 -2
- package/dist/schema/property-facts.d.ts +1 -62
- package/dist/schema/section-schema.d.ts +2 -2
- package/dist/schema/section-schema.js +1 -1
- package/guide/reference/cli/INDEX.md +2 -2
- package/guide/reference/cli/build.md +1 -1
- package/guide/reference/cli/check.md +1 -1
- package/guide/reference/cli/dev.md +1 -1
- package/guide/reference/cli/property-add.md +1 -1
- package/guide/reference/cli/property-list.md +1 -1
- package/guide/reference/cli/publish.md +1 -1
- package/guide/reference/cli/upgrade.md +1 -1
- package/guide/reference/rules/INDEX.md +2 -3
- package/package.json +1 -1
- package/dist/artifact/playground/client/assets/index-BOYbgBnP.js +0 -1259
- package/dist/artifact/playground/client/assets/index-DDOcM0zA.css +0 -1
- package/dist/packages/internal/section-contracts/dist/option-source-contract.js +0 -22
- package/dist/packages/internal/template-contracts/dist/comparable-address.js +0 -19
- package/dist/packages/internal/template-contracts/dist/facts-view.d.ts +0 -62
- package/dist/packages/internal/template-contracts/dist/legacy-facts.js +0 -167
- package/dist/packages/internal/template-contracts/dist/registry-aliases.js +0 -77
|
@@ -4,7 +4,6 @@ import { isComputeBinding } from "./compute.js";
|
|
|
4
4
|
import { fillsOfSource, isFillBinding } from "./fill-builders.js";
|
|
5
5
|
import { fillMark } from "./fill-declaration.js";
|
|
6
6
|
import { addressWithMembers } from "./row-ref.js";
|
|
7
|
-
import { legacyFactKey } from "./registry-aliases.js";
|
|
8
7
|
|
|
9
8
|
//#region ../../internal/template-contracts/dist/slot-builders.js
|
|
10
9
|
function refuseStatedOf(at, source) {
|
|
@@ -77,11 +76,9 @@ function number(opts) {
|
|
|
77
76
|
};
|
|
78
77
|
}
|
|
79
78
|
function selectFromFact(opts) {
|
|
80
|
-
const source = opts.source;
|
|
81
79
|
return {
|
|
82
80
|
type: "select",
|
|
83
81
|
...head(opts),
|
|
84
|
-
...isFactRef(source) ? { options: { source: legacyFactKey(source.key) } } : {},
|
|
85
82
|
...opts.creatable !== void 0 ? { creatable: opts.creatable } : {}
|
|
86
83
|
};
|
|
87
84
|
}
|
|
@@ -145,7 +142,7 @@ function address(opts = {}) {
|
|
|
145
142
|
function mediaFilterKeys(type, opts) {
|
|
146
143
|
const at = `${type}: "${opts.label ?? type}"`;
|
|
147
144
|
refuseStatedOf(at, opts.source);
|
|
148
|
-
if ("category" in opts) throw new Error(`${at} declares \`category\` — a media declaration names the list it picks from in \`from\` (\`from: fact.property.property_media\`, \`fact.property.floor_plans\`, \`fact.property.uploads\`), or owns its
|
|
145
|
+
if ("category" in opts) throw new Error(`${at} declares \`category\` — a media declaration names the list it picks from in \`from\` (\`from: fact.property.property_media\`, \`fact.property.floor_plans\`, \`fact.property.uploads\`), or owns its media without one.`);
|
|
149
146
|
if ("sources" in opts) throw new Error(`${at} declares \`sources\` — a media slot takes a pasted link wherever a link provider claims its kind (a video, a tour), and declares nothing for it. \`concrete upgrade\` removes it.`);
|
|
150
147
|
const problem = mediaDeclarationProblem({
|
|
151
148
|
type,
|
|
@@ -157,7 +154,7 @@ function mediaFilterKeys(type, opts) {
|
|
|
157
154
|
const bound = opts.source !== void 0 && fills === void 0 && !isComputeBinding(opts.source);
|
|
158
155
|
if (bound && opts.from !== void 0) throw new Error(`${at} picks \`from\` a media list and declares a \`source\` — a slot bound to a fact holds what that fact holds.`);
|
|
159
156
|
if ((bound || isComputeBinding(opts.source)) && opts.process !== void 0) throw new Error(`${at} declares \`process\` beside a \`source\` that derives its value — a derived slot holds what it derives from, processed where that is declared.`);
|
|
160
|
-
if (fills?.some((fill) => fill.verb === "pick") === true && opts.from === void 0) throw new Error(`${at} is picked by a \`fill.pick\` and names no \`from\` — a pick chooses from its holder's \`from\` (\`from: fact.property.property_media\`); a media declaration without one owns its
|
|
157
|
+
if (fills?.some((fill) => fill.verb === "pick") === true && opts.from === void 0) throw new Error(`${at} is picked by a \`fill.pick\` and names no \`from\` — a pick chooses from its holder's \`from\` (\`from: fact.property.property_media\`); a media declaration without one owns its media.`);
|
|
161
158
|
const emitted = fromLists(at, type, opts.kinds, opts.from)?.map((list) => isFactRef(list) ? list.key : list);
|
|
162
159
|
return {
|
|
163
160
|
...emitted !== void 0 ? { from: emitted.length === 1 ? emitted[0] : emitted } : {},
|
|
@@ -167,7 +164,7 @@ function mediaFilterKeys(type, opts) {
|
|
|
167
164
|
function fromLists(at, type, kinds, from) {
|
|
168
165
|
if (from === void 0) return void 0;
|
|
169
166
|
const lists = Array.isArray(from) ? from : [from];
|
|
170
|
-
if (lists.length === 0) throw new Error(`${at} declares \`from: []\` — name the media list it picks from, or omit \`from\` and the declaration owns its
|
|
167
|
+
if (lists.length === 0) throw new Error(`${at} declares \`from: []\` — name the media list it picks from, or omit \`from\` and the declaration owns its media.`);
|
|
171
168
|
const holds = declaredKinds({
|
|
172
169
|
type,
|
|
173
170
|
kinds
|
|
@@ -176,7 +173,7 @@ function fromLists(at, type, kinds, from) {
|
|
|
176
173
|
for (const list of lists) {
|
|
177
174
|
const declared = typeof list === "object" && list !== null && !isFactRef(list);
|
|
178
175
|
const identity = isFactRef(list) ? list.key : declared && "declaration" in list ? list.declaration : list;
|
|
179
|
-
if (seen.has(identity)) throw new Error(`${at} picks \`from\` one media list twice — each list is named once;
|
|
176
|
+
if (seen.has(identity)) throw new Error(`${at} picks \`from\` one media list twice — each list is named once; a media value two lists hold is one candidate, attributed to the first.`);
|
|
180
177
|
seen.add(identity);
|
|
181
178
|
if (!declared) continue;
|
|
182
179
|
const listed = declaredKinds(identity.element);
|