@homepages/concrete 9.0.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 +69 -0
- package/README.md +3 -3
- package/codemods/manifest.json +14 -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/check/stages/workspace.js +2 -0
- package/dist/cli/check/template-key.js +16 -0
- package/dist/cli/dev/workspace-reader.js +9 -2
- package/dist/fixtures/media-store.js +3 -3
- package/dist/fixtures/resolve.js +28 -23
- 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/capture-settle/dist/island-markers.d.ts +1 -1
- package/dist/packages/internal/fill-bake/dist/bake-property-ref.js +15 -27
- package/dist/packages/internal/fill-bake/dist/compute-reads.js +12 -12
- package/dist/packages/internal/fill-bake/dist/derive-source.js +7 -14
- package/dist/packages/internal/fill-bake/dist/index.js +4 -3
- package/dist/packages/internal/fill-bake/dist/item-merge.js +36 -16
- package/dist/packages/internal/fill-bake/dist/item-overrides.js +1 -28
- package/dist/packages/internal/fill-bake/dist/linked-merge.js +5 -7
- package/dist/packages/internal/fill-bake/dist/list-grammar.js +11 -34
- package/dist/packages/internal/fill-bake/dist/stored-row-reader.js +1 -0
- package/dist/packages/internal/fill-vocabulary/dist/resolved-decision.js +12 -39
- package/dist/packages/internal/fill-vocabulary/dist/verbs.js +2 -17
- package/dist/packages/internal/media-resolution/dist/document.js +16 -15
- package/dist/packages/internal/media-resolution/dist/image.js +38 -94
- package/dist/packages/internal/media-resolution/dist/index.js +1 -1
- package/dist/packages/internal/media-resolution/dist/list.js +12 -12
- 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 +9 -6
- 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 +10 -2
- package/dist/packages/internal/section-contracts/dist/catalog.js +2 -10
- package/dist/packages/internal/section-contracts/dist/directly-linked-list-contract.js +5 -12
- package/dist/packages/internal/section-contracts/dist/fill-spec-view.js +1 -5
- package/dist/packages/internal/section-contracts/dist/fill-verb-contract.js +7 -5
- package/dist/packages/internal/section-contracts/dist/grammar-scope.js +1 -1
- package/dist/packages/internal/section-contracts/dist/index.js +0 -2
- package/dist/packages/internal/section-contracts/dist/list-fill-contract.js +0 -29
- package/dist/packages/internal/section-contracts/dist/list-scalar-contract.js +2 -16
- package/dist/packages/internal/section-contracts/dist/nested-slot-contract.js +6 -6
- package/dist/packages/internal/section-contracts/dist/object-contract.js +4 -2
- package/dist/packages/internal/section-contracts/dist/poi-curation-contract.js +6 -2
- package/dist/packages/internal/section-contracts/dist/row-fill-contract.js +1 -15
- package/dist/packages/internal/section-contracts/dist/row-rule-contract.js +6 -7
- package/dist/packages/internal/section-contracts/dist/row-source-contract.js +7 -8
- package/dist/packages/internal/section-contracts/dist/runners.js +5 -17
- package/dist/packages/internal/section-contracts/dist/select-contract.js +7 -1
- package/dist/packages/internal/section-contracts/dist/source-contract.js +20 -79
- 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/section-contracts/dist/writer-reads-fact-contract.js +5 -10
- package/dist/packages/internal/source-resolution/dist/index.js +21 -189
- 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/decision-fills.js +2 -6
- 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 +14 -7
- package/dist/packages/internal/template-contracts/dist/fill-builders.d.ts +1 -1
- package/dist/packages/internal/template-contracts/dist/fill-spec-schema.js +3 -68
- package/dist/packages/internal/template-contracts/dist/fill-spec.js +7 -6
- package/dist/packages/internal/template-contracts/dist/list-editing.js +0 -1
- 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/media-candidates.js +1 -1
- 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/primitive-descriptors.js +2 -2
- package/dist/packages/internal/template-contracts/dist/process-builders.d.ts +2 -2
- package/dist/packages/internal/template-contracts/dist/read-graph.js +14 -51
- package/dist/packages/internal/template-contracts/dist/ref-locate.js +15 -27
- package/dist/packages/internal/template-contracts/dist/registry-facts.d.ts +3 -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 +5 -14
- package/dist/packages/internal/template-contracts/dist/row-ref.js +7 -23
- package/dist/packages/internal/template-contracts/dist/row-sources.js +6 -16
- 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 -733
- package/dist/packages/internal/template-contracts/dist/slot-catalog.js +2 -502
- 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-types.js +1 -2
- package/dist/packages/internal/template-contracts/dist/slot-value.d.ts +9 -10
- 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-bindings.js +2 -2
- package/dist/primitives/slot-download.d.ts +1 -1
- package/dist/primitives/slot-media.d.ts +1 -1
- package/dist/rules/registry.js +6 -0
- 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/dist/section/section.d.ts +2 -2
- 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 +4 -5
- package/package.json +1 -1
- package/dist/artifact/playground/client/assets/index-BUmdDDX5.js +0 -1259
- package/dist/artifact/playground/client/assets/index-DDOcM0zA.css +0 -1
- package/dist/packages/internal/fill-vocabulary/dist/row-reads.js +0 -15
- package/dist/packages/internal/section-contracts/dist/group-contract.js +0 -19
- 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
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ADDRESS_MEMBERS, isAddressMember } from "./address-value.js";
|
|
2
|
-
import {
|
|
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
|
|
19
|
-
|
|
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
|
|
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 (
|
|
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 (!
|
|
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,
|
|
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
|
|
11
|
-
*
|
|
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
|
/**
|
|
@@ -43,7 +43,7 @@ type ImageOptions = Omit<ImgHTMLAttributes<HTMLImageElement>, "src" | "alt" | "w
|
|
|
43
43
|
};
|
|
44
44
|
type Props = (ImageOptions & {
|
|
45
45
|
/** The whole resolved slot value — `slots.hero_image`, a list element, or a
|
|
46
|
-
* nested
|
|
46
|
+
* nested image inside a list item's object. `null` renders the empty state. */
|
|
47
47
|
value: ImageValue | null | undefined;
|
|
48
48
|
/** Overrides the value's own alt. Pass `""` for a decorative image. */
|
|
49
49
|
alt?: string;
|
|
@@ -67,7 +67,7 @@ type Props = (ImageOptions & {
|
|
|
67
67
|
* `alt` prop, having no alt of its own to fall back on.
|
|
68
68
|
*
|
|
69
69
|
* **The box is always yours.** Cropping is baked upstream — the platform delivers a
|
|
70
|
-
* pre-cropped
|
|
70
|
+
* pre-cropped image — and the kit paints no geometry: no aspect, no size, no position.
|
|
71
71
|
* Whatever box your classes establish is the box, and `object-position` on the `<img>`
|
|
72
72
|
* is yours to set where a design wants the cover nudged.
|
|
73
73
|
*
|
|
@@ -83,7 +83,7 @@ type Props = (ImageOptions & {
|
|
|
83
83
|
*
|
|
84
84
|
* **Unframed** (`frame={false}`): no wrapper — the `<img>` itself takes your `className`,
|
|
85
85
|
* for a logo, a slide whose parent already establishes the box, or an image that needs
|
|
86
|
-
* its own `object-position`. Pair with `fit="contain"` where the whole
|
|
86
|
+
* its own `object-position`. Pair with `fit="contain"` where the whole image must stay
|
|
87
87
|
* visible. An absent value renders a placeholder box here too — never an `<img>` with
|
|
88
88
|
* an empty `src`.
|
|
89
89
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { normalizeAddressValue } from "../packages/internal/template-contracts/dist/address-value.js";
|
|
2
|
-
import { OBJECT_BINDING_OWN_KEYS,
|
|
2
|
+
import { OBJECT_BINDING_OWN_KEYS, acceptsLink, declaredKinds, isEmailValue, isIsoDateValue, isPhoneValue } from "../packages/internal/template-contracts/dist/slot-catalog.js";
|
|
3
3
|
|
|
4
4
|
//#region src/primitives/slot-bindings.ts
|
|
5
5
|
const blankVideo = () => ({
|
|
@@ -93,7 +93,7 @@ function normalizeMedia(slot, value) {
|
|
|
93
93
|
default: return null;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
const IDENTITY_KEYS = [
|
|
96
|
+
const IDENTITY_KEYS = ["id"];
|
|
97
97
|
function normalizeFields(fields, value, identity) {
|
|
98
98
|
const source = isRecord(value) ? value : {};
|
|
99
99
|
const normalized = {};
|
|
@@ -21,7 +21,7 @@ type DownloadProps<D, As extends ElementType> = DownloadOwnProps<D> & {
|
|
|
21
21
|
} & Omit<ComponentPropsWithoutRef<As>, keyof DownloadOwnProps<D> | "as">;
|
|
22
22
|
/**
|
|
23
23
|
* Slot.Download — renders one anchor at the original of an image, video or
|
|
24
|
-
* document slot's
|
|
24
|
+
* document slot's file, with the author's children as its contents. Opens in a
|
|
25
25
|
* new tab by default (`target="_blank"`, `rel="noopener noreferrer"`); both are
|
|
26
26
|
* ordinary props and an author may override either, or add `download`.
|
|
27
27
|
*
|
|
@@ -23,7 +23,7 @@ type SlotImageProps<D> = Omit<ComponentProps<typeof Image>, "value" | "slot" | "
|
|
|
23
23
|
* passthrough — is `<Image>`'s own prop, with `<Image>`'s own default. See `./Image.js`
|
|
24
24
|
* for the framed/unframed/empty render contract this wraps.
|
|
25
25
|
*
|
|
26
|
-
* **Over a video or tour slot it renders that
|
|
26
|
+
* **Over a video or tour slot it renders that value's poster.** A template that wants a
|
|
27
27
|
* still of the video or 3D tour the user picked binds THAT slot to this primitive — there
|
|
28
28
|
* is no separate poster slot to keep in agreement, and no second primitive to learn. The
|
|
29
29
|
* identity marker names that slot, so a click on the poster opens its card and a new pick
|
package/dist/rules/registry.js
CHANGED
|
@@ -74,6 +74,12 @@ const AUTHORED_RULES = [
|
|
|
74
74
|
stage: "workspace",
|
|
75
75
|
summary: "A workspace module fails to build or throws when it is evaluated."
|
|
76
76
|
},
|
|
77
|
+
{
|
|
78
|
+
id: "workspace/key-not-name",
|
|
79
|
+
venue: "tree",
|
|
80
|
+
stage: "workspace",
|
|
81
|
+
summary: "The template key is not its display name in lowercase kebab-case (`Block Website` → `block-website`)."
|
|
82
|
+
},
|
|
77
83
|
{
|
|
78
84
|
id: "workspace/duplicate-section-key",
|
|
79
85
|
venue: "tree",
|
package/dist/schema/fact.d.ts
CHANGED
|
@@ -1,20 +1,11 @@
|
|
|
1
1
|
import { AddressMember, AddressValue } from "../packages/internal/template-contracts/dist/address-value.js";
|
|
2
|
-
import {
|
|
3
|
-
import { MediaListKey, RegistryFactKey, RegistryFactValue } from "../packages/internal/template-contracts/dist/fact-keys.js";
|
|
2
|
+
import { RegistryTable } from "../packages/internal/template-contracts/dist/registry-shape.js";
|
|
4
3
|
import { RegistryTableRow } from "../packages/internal/template-contracts/dist/table-members.js";
|
|
5
4
|
import { FactRef } from "../packages/internal/template-contracts/dist/slot-ref.js";
|
|
6
5
|
import { PropertyFactRegistry } from "../packages/internal/template-contracts/dist/fact-registry.js";
|
|
7
6
|
import { DocumentMediaValue } from "../packages/internal/template-contracts/dist/registry-facts.js";
|
|
8
|
-
import {
|
|
9
|
-
import "./facts-view.js";
|
|
7
|
+
import { MediaListKey, RegistryFactKey, RegistryFactValue } from "../packages/internal/template-contracts/dist/fact-keys.js";
|
|
10
8
|
//#region src/schema/fact.d.ts
|
|
11
|
-
type SourceFields = typeof SOURCE_FIELDS;
|
|
12
|
-
type Graph = typeof FACT_GRAPH;
|
|
13
|
-
/**
|
|
14
|
-
* A slot's fact binding by a legacy field name: a `home` ref to the canonical field — a typed {@link FactRef}, so one
|
|
15
|
-
* value serves `source:` and a declaration's `reads` alike.
|
|
16
|
-
*/
|
|
17
|
-
type DirectFactRef<F extends SourceFieldName> = FactRef<F, FactValue<F & FactGraphName>>;
|
|
18
9
|
/**
|
|
19
10
|
* A slot's `derived` binding: a value the section's own `compute()` fn
|
|
20
11
|
* produces, keyed by the slot's own name. No `fact.*` entry emits one — the
|
|
@@ -25,24 +16,6 @@ type DerivedFactRef = {
|
|
|
25
16
|
kind: "derived";
|
|
26
17
|
transform: string;
|
|
27
18
|
};
|
|
28
|
-
type FieldsIn<C extends SourceFieldContainer> = { [F in keyof SourceFields as SourceFields[F]["container"] extends C ? F : never]: DirectFactRef<F & SourceFieldName>; };
|
|
29
|
-
declare const PROJECTIONS: {
|
|
30
|
-
readonly property: {
|
|
31
|
-
readonly latitude: "lat";
|
|
32
|
-
readonly longitude: "lon";
|
|
33
|
-
};
|
|
34
|
-
readonly contact: {
|
|
35
|
-
readonly address: "contact_address";
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
type Projections = typeof PROJECTIONS;
|
|
39
|
-
type ProjectionsIn<C extends SourceFieldContainer> = C extends keyof Projections ? { [K in keyof Projections[C]]: DirectFactRef<Projections[C][K] & SourceFieldName>; } : Record<never, never>;
|
|
40
|
-
type ReadableName = { [K in FactGraphName]: Graph[K] extends {
|
|
41
|
-
role: "readable";
|
|
42
|
-
} ? Graph[K] extends {
|
|
43
|
-
primary_of: string;
|
|
44
|
-
} ? never : K : never; }[FactGraphName];
|
|
45
|
-
type Readables = { [K in ReadableName]: FactRef<K, FactValue<K>>; };
|
|
46
19
|
/** A ref to a fact the registry declares, by its registry key (`property.address.city`). */
|
|
47
20
|
type RegistryFactRef<K extends RegistryFactKey> = FactRef<K, RegistryFactValue<K>>;
|
|
48
21
|
type PropertyPages = PropertyFactRegistry["pages"];
|
|
@@ -52,40 +25,35 @@ type RegistryRefs = { readonly [K in keyof PropertyPages as PropertyPages[K]["de
|
|
|
52
25
|
} ? never : K]: RegistryFactRef<`property.${K & string}` & RegistryFactKey> & (PropertyPages[K]["declaration"] extends {
|
|
53
26
|
readonly type: "address";
|
|
54
27
|
} ? PartRefs<`property.${K & string}`> : unknown); };
|
|
55
|
-
type ColumnRefs<T extends RegistryTable> = { readonly [M in keyof RegistryTableRow<T> as M extends "id" ? never : M & string]: FactRef
|
|
56
|
-
type RegistryTableRefs = { readonly [T in RegistryTable]: FactRef
|
|
28
|
+
type ColumnRefs<T extends RegistryTable> = { readonly [M in keyof RegistryTableRow<T> as M extends "id" ? never : M & string]: FactRef<`property.${T}.${M & string}`, readonly (RegistryTableRow<T>[M] | null)[]>; };
|
|
29
|
+
type RegistryTableRefs = { readonly [T in RegistryTable]: FactRef<`property.${T}`, readonly RegistryTableRow<T>[]> & ColumnRefs<T>; };
|
|
57
30
|
type MediaListRefs = { readonly [K in keyof PropertyPages as `property.${K & string}` extends MediaListKey ? K : never]: FactRef<`property.${K & string}`, readonly DocumentMediaValue[]>; };
|
|
58
|
-
type PropertyBranch =
|
|
31
|
+
type PropertyBranch = RegistryRefs & RegistryTableRefs & MediaListRefs;
|
|
59
32
|
/**
|
|
60
|
-
* The shape of `fact`: one branch
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
* declares as it nests them (`fact.property.address.city`), and each table by its
|
|
65
|
-
* registry key (`fact.property.units`). Every entry is a value you pass to a slot
|
|
66
|
-
* builder's `source` or to a declaration's `reads`, not a call you make.
|
|
33
|
+
* The shape of `fact`: one branch, `property`, spelling the facts the fact registry
|
|
34
|
+
* declares as it nests them (`fact.property.address.city`), each table by its registry
|
|
35
|
+
* key (`fact.property.units`) and each media list by its own. Every entry is a value you
|
|
36
|
+
* pass to a slot builder's `source` or to a declaration's `reads`, not a call you make.
|
|
67
37
|
*/
|
|
68
38
|
type FactNamespace = {
|
|
69
39
|
property: PropertyBranch;
|
|
70
|
-
}
|
|
40
|
+
};
|
|
71
41
|
/**
|
|
72
|
-
* Where a slot's value comes from, and what a declaration reads: a
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
* any entry for its writability — a writable field draws the editor's
|
|
79
|
-
* "Update everywhere" toggle, a read-only one does not.
|
|
42
|
+
* Where a slot's value comes from, and what a declaration reads: a property fact as
|
|
43
|
+
* `fact.property.<name>`, the always-on description as `fact.property.description`.
|
|
44
|
+
* A unit's or a contact's member is read through a row of its table (`const contact =
|
|
45
|
+
* row({ label: "Contact", from: fact.property.contacts, locked: true })`, then
|
|
46
|
+
* `contact.phone`). Hover any entry for its writability — a writable field draws the
|
|
47
|
+
* editor's "Update everywhere" toggle, a read-only one does not.
|
|
80
48
|
*
|
|
81
49
|
* The property's media is three lists, each named in a `compute`'s or a fill's `reads`
|
|
82
|
-
* and read as its
|
|
50
|
+
* and read as its media records (`Media`): `fact.property.uploads`, every upload;
|
|
83
51
|
* `fact.property.property_media`, what shows the property — its photos, videos and tours; and
|
|
84
52
|
* `fact.property.floor_plans`, its plans. A media slot is never sourced by one: it
|
|
85
53
|
* picks `from` one (`image({ from: fact.property.property_media, source: fill.pick({ brief }) })`).
|
|
86
54
|
* The property's cover photo, `fact.property.hero`, is one image picked from its media:
|
|
87
55
|
* an `image` slot binds it (`image({ source: fact.property.hero })`), and a `compute()`
|
|
88
|
-
* reads it as its
|
|
56
|
+
* reads it as its media record (`Media`), `null` when the property has none.
|
|
89
57
|
*
|
|
90
58
|
* A table (`fact.property.units`, `.commercial_spaces`, `.contacts`, `.comparables`) is a list's `source:` and
|
|
91
59
|
* a row's `from`. One row's members are read through a row slot —
|
|
@@ -98,8 +66,7 @@ type FactNamespace = {
|
|
|
98
66
|
* A table's column — `fact.property.units.beds` — is one member over every row, in row
|
|
99
67
|
* order, `null` where a row leaves it unanswered: read it where a declaration needs that
|
|
100
68
|
* member and not the whole row, since a whole-table read counts every member as used.
|
|
101
|
-
* `fact.unit.beds` stays the primary row's member.
|
|
102
69
|
*/
|
|
103
70
|
declare const fact: FactNamespace;
|
|
104
71
|
//#endregion
|
|
105
|
-
export { DerivedFactRef,
|
|
72
|
+
export { DerivedFactRef, FactNamespace, RegistryFactRef, fact };
|
package/dist/schema/fact.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { tableKey, tableNames } from "../packages/internal/template-contracts/dist/registry-shape.js";
|
|
2
2
|
import { mediaListKeys, registryFactKeys } from "../packages/internal/template-contracts/dist/fact-keys.js";
|
|
3
3
|
import { registryMemberNames } from "../packages/internal/template-contracts/dist/table-members.js";
|
|
4
4
|
|
|
5
5
|
//#region src/schema/fact.ts
|
|
6
|
-
const PROJECTIONS = FACT_PROJECTIONS;
|
|
7
6
|
function withMembers(base, path, members) {
|
|
8
7
|
const refs = new Map(members.map((member) => [member, {
|
|
9
8
|
kind: "home",
|
|
@@ -18,24 +17,11 @@ function withMembers(base, path, members) {
|
|
|
18
17
|
} });
|
|
19
18
|
}
|
|
20
19
|
function buildNamespace() {
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
unit: {},
|
|
24
|
-
contact: {}
|
|
25
|
-
};
|
|
26
|
-
for (const [field, descriptor] of Object.entries(SOURCE_FIELDS)) containers[descriptor.container][field] = {
|
|
27
|
-
kind: "home",
|
|
28
|
-
key: field
|
|
29
|
-
};
|
|
30
|
-
for (const [container, entries] of Object.entries(PROJECTIONS)) for (const [name, field] of Object.entries(entries)) containers[container][name] = {
|
|
31
|
-
kind: "home",
|
|
32
|
-
key: field
|
|
33
|
-
};
|
|
34
|
-
const property = containers.property;
|
|
35
|
-
for (const [table, key] of Object.entries(REGISTRY_TABLE_KEYS)) property[table] = withMembers({
|
|
20
|
+
const property = {};
|
|
21
|
+
for (const table of tableNames()) property[table] = withMembers({
|
|
36
22
|
kind: "home",
|
|
37
|
-
key
|
|
38
|
-
},
|
|
23
|
+
key: tableKey(table)
|
|
24
|
+
}, tableKey(table), registryMemberNames(table));
|
|
39
25
|
for (const key of mediaListKeys()) property[key.slice(9)] = {
|
|
40
26
|
kind: "home",
|
|
41
27
|
key
|
|
@@ -51,12 +37,7 @@ function buildNamespace() {
|
|
|
51
37
|
};
|
|
52
38
|
property[name] = parts.length > 0 ? withMembers(ref, key, parts) : ref;
|
|
53
39
|
}
|
|
54
|
-
|
|
55
|
-
for (const [key, entry] of Object.entries(FACT_GRAPH)) if (entry.role === "readable" && entry.primary_of === void 0) namespace[key] = {
|
|
56
|
-
kind: "home",
|
|
57
|
-
key
|
|
58
|
-
};
|
|
59
|
-
return namespace;
|
|
40
|
+
return { property };
|
|
60
41
|
}
|
|
61
42
|
const fact = buildNamespace();
|
|
62
43
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { RegistryTableRow } from "../packages/internal/template-contracts/dist/table-members.js";
|
|
2
2
|
import { AsRead } from "../packages/internal/template-contracts/dist/slot-ref.js";
|
|
3
|
-
import { FactValue, FactsAddress, FactsRow } from "../packages/internal/template-contracts/dist/facts-view.js";
|
|
4
3
|
//#region src/schema/facts-view.d.ts
|
|
5
4
|
/** One unit of `fact.property.units`, as a `compute()` reading the table receives it. */
|
|
6
5
|
type FactsUnit = AsRead<RegistryTableRow<"units">>;
|
|
@@ -11,4 +10,4 @@ type FactsCommercialSpace = AsRead<RegistryTableRow<"commercial_spaces">>;
|
|
|
11
10
|
/** One comparable of `fact.property.comparables`, as a `compute()` reading the table receives it. */
|
|
12
11
|
type FactsComparable = AsRead<RegistryTableRow<"comparables">>;
|
|
13
12
|
//#endregion
|
|
14
|
-
export {
|
|
13
|
+
export { FactsCommercialSpace, FactsComparable, FactsContact, FactsUnit };
|
|
@@ -4,66 +4,5 @@ type Coordinates = {
|
|
|
4
4
|
lat: number;
|
|
5
5
|
lng: number;
|
|
6
6
|
};
|
|
7
|
-
/**
|
|
8
|
-
* The property's always-on prose description — the substrate every text
|
|
9
|
-
* decision is grounded in, and a fact a `compute()` reads directly. `""` is a
|
|
10
|
-
* real state (nothing written yet), never a placeholder.
|
|
11
|
-
*/
|
|
12
|
-
type Narrative = {
|
|
13
|
-
description: string;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* One comparable property — a recently sold or currently listed home similar
|
|
17
|
-
* to the subject — as the legacy `comparables` reading flattens it: its address as
|
|
18
|
-
* flat members and one display line. A `compute()` reading `fact.property.comparables`
|
|
19
|
-
* receives `FactsComparable` instead — the address one address value, the photo
|
|
20
|
-
* the comp's own media. Not a bound record list's row, which is its `id` plus the fields the
|
|
21
|
-
* list declares. `address`, `distance_m` and `price_period` are the three members the
|
|
22
|
-
* live projection derives (the display line, meters from the subject, and what the
|
|
23
|
-
* price is denominated in).
|
|
24
|
-
*/
|
|
25
|
-
type ComparableRow = {
|
|
26
|
-
id: string;
|
|
27
|
-
address_street: string | null;
|
|
28
|
-
address_city: string | null;
|
|
29
|
-
address_state: string | null;
|
|
30
|
-
address_postal: string | null;
|
|
31
|
-
address: string;
|
|
32
|
-
lat: number | null;
|
|
33
|
-
lng: number | null;
|
|
34
|
-
distance_m: number | null;
|
|
35
|
-
status: "sold" | "active" | null;
|
|
36
|
-
/** One integer in dollars — the sale price when sold, the list price otherwise. Read it with `price_period`, which says whether the figure is a total or a rent per month. */
|
|
37
|
-
price: number | null;
|
|
38
|
-
/** What `price` is denominated in: `"monthly"` for comps on a for-rent property, `"total"` otherwise. Never null — a price printed without it renders a $2,400 rent as a sale. */
|
|
39
|
-
price_period: "total" | "monthly";
|
|
40
|
-
/** ISO `YYYY-MM-DD`; null unless sold. */
|
|
41
|
-
sale_date: string | null;
|
|
42
|
-
beds: number | null;
|
|
43
|
-
baths: number | null;
|
|
44
|
-
sqft: number | null;
|
|
45
|
-
/**
|
|
46
|
-
* The comp's photo: the id of an upload the comparable itself owns — never one of the
|
|
47
|
-
* property's own photos, so no media pool offers it. `null` when none was uploaded. A
|
|
48
|
-
* `compute()` over `fact.property.comparables` reads it as `photo`, the comp's own media.
|
|
49
|
-
*/
|
|
50
|
-
photo_upload_id: string | null;
|
|
51
|
-
/** The year the comparable was built. */
|
|
52
|
-
year_built?: number | null;
|
|
53
|
-
/** Lot size in square feet. */
|
|
54
|
-
lot_sqft?: number | null;
|
|
55
|
-
stories?: number | null;
|
|
56
|
-
/** Units in the comparable's BUILDING — a multifamily figure, unrelated to the subject's `units`. */
|
|
57
|
-
units?: number | null;
|
|
58
|
-
/** Monthly HOA dues in dollars. */
|
|
59
|
-
hoa_monthly?: number | null;
|
|
60
|
-
/** The asking price in dollars, beside `price` — the pair is what "sold over asking" reads. */
|
|
61
|
-
list_price?: number | null;
|
|
62
|
-
/** ISO `YYYY-MM-DD` — when the listing went live, not when it closed. */
|
|
63
|
-
listed_date?: string | null;
|
|
64
|
-
mls_number?: string | null;
|
|
65
|
-
/** The listing remarks, verbatim from the source. */
|
|
66
|
-
description?: string | null;
|
|
67
|
-
};
|
|
68
7
|
//#endregion
|
|
69
|
-
export {
|
|
8
|
+
export { Coordinates };
|
|
@@ -6,7 +6,7 @@ import { PoiPhoto, PoiRow } from "../packages/internal/template-contracts/dist/p
|
|
|
6
6
|
import { AuthorImage, ImageCollectionValue, ImageValue, MediaValue, PlaybackConfig } from "../packages/internal/template-contracts/dist/runtime-values.js";
|
|
7
7
|
import { ItemIdentity, ObjectValue, SlotValue } from "../packages/internal/template-contracts/dist/slot-value.js";
|
|
8
8
|
import { Slot } from "../packages/internal/template-contracts/dist/slot-types.js";
|
|
9
|
-
import {
|
|
9
|
+
import { Coordinates } from "./property-facts.js";
|
|
10
10
|
import { SectionProps } from "./section-props.js";
|
|
11
11
|
import { z } from "zod";
|
|
12
12
|
//#region src/schema/section-schema.d.ts
|
|
@@ -46,4 +46,4 @@ declare const SectionSchema: z.ZodObject<{
|
|
|
46
46
|
/** The authored input shape of `SectionSchema` — what `as const satisfies SectionSchemaShape` checks a section's `schema.ts` against. */
|
|
47
47
|
type SectionSchemaShape = z.input<typeof SectionSchema>;
|
|
48
48
|
//#endregion
|
|
49
|
-
export { type AddressValue, type AuthorImage, type
|
|
49
|
+
export { type AddressValue, type AuthorImage, type Coordinates, DisplayEntryShape, DisplayShape, type DocumentCollectionValue, type DocumentValue, type ImageCollectionValue, type ImageValue, type ItemIdentity, type MediaValue, type ObjectValue, type PlaybackConfig, type PoiPhoto, type PoiRow, SectionSchema, SectionSchemaShape, type Slot, type SlotValue, type TourCollectionValue, type TourValue, type VideoCollectionValue, type VideoValue };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CONTENT_SLOT_TYPES,
|
|
1
|
+
import { CONTENT_SLOT_TYPES, REF_SLOT_TYPES, SLOT_TYPES } from "../packages/internal/template-contracts/dist/slot-catalog.js";
|
|
2
2
|
import { SerializedReads, SlotDef } from "../packages/internal/template-contracts/dist/slot-types.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
|
|
@@ -57,8 +57,8 @@ interface SectionValue<Key extends string, Slots extends Record<string, Slot>, D
|
|
|
57
57
|
* slots: {
|
|
58
58
|
* headline: text.medium({ cap: 60, label: "Headline", source: fill.write({ brief: "A confident one-line headline." }) }),
|
|
59
59
|
* address: object({ label: fact.property.address, fields: {
|
|
60
|
-
* street: text.short({ source: fact.property.
|
|
61
|
-
* city: text.short({ source: fact.property.
|
|
60
|
+
* street: text.short({ source: fact.property.address.street, label: "Street" }),
|
|
61
|
+
* city: text.short({ source: fact.property.address.city, label: "City" }),
|
|
62
62
|
* } }),
|
|
63
63
|
* },
|
|
64
64
|
* }, ({ slot, nav }) => (
|
|
@@ -3,7 +3,7 @@ purpose: Every `concrete` command, with its full flag surface, exit codes and co
|
|
|
3
3
|
mode: reference
|
|
4
4
|
status: generated
|
|
5
5
|
generated_from: the concrete command table
|
|
6
|
-
applies_to: "@homepages/concrete >=
|
|
6
|
+
applies_to: "@homepages/concrete >=10.0.0 <11.0.0"
|
|
7
7
|
related: [INDEX.md]
|
|
8
8
|
---
|
|
9
9
|
# Command reference
|
|
@@ -79,7 +79,7 @@ of its flags.
|
|
|
79
79
|
|
|
80
80
|
## Versions
|
|
81
81
|
|
|
82
|
-
These pages describe `@homepages/concrete` **>=
|
|
82
|
+
These pages describe `@homepages/concrete` **>=10.0.0 <11.0.0**. The range, rather than
|
|
83
83
|
the exact version they were generated from: this reference is committed build output,
|
|
84
84
|
so a page stamped with a patch version would be stale the day it shipped.
|
|
85
85
|
`concrete --version` prints the installed one.
|
|
@@ -3,7 +3,7 @@ purpose: The `concrete build` command — its flags, exit codes and constraints.
|
|
|
3
3
|
mode: reference
|
|
4
4
|
status: generated
|
|
5
5
|
generated_from: the concrete command table
|
|
6
|
-
applies_to: "@homepages/concrete >=
|
|
6
|
+
applies_to: "@homepages/concrete >=10.0.0 <11.0.0"
|
|
7
7
|
related: [reference/cli/INDEX.md]
|
|
8
8
|
---
|
|
9
9
|
# concrete build
|
|
@@ -3,7 +3,7 @@ purpose: The `concrete check` command — its flags, exit codes and constraints.
|
|
|
3
3
|
mode: reference
|
|
4
4
|
status: generated
|
|
5
5
|
generated_from: the concrete command table
|
|
6
|
-
applies_to: "@homepages/concrete >=
|
|
6
|
+
applies_to: "@homepages/concrete >=10.0.0 <11.0.0"
|
|
7
7
|
related: [reference/cli/INDEX.md]
|
|
8
8
|
---
|
|
9
9
|
# concrete check
|
|
@@ -3,7 +3,7 @@ purpose: The `concrete dev` command — its flags, exit codes and constraints.
|
|
|
3
3
|
mode: reference
|
|
4
4
|
status: generated
|
|
5
5
|
generated_from: the concrete command table
|
|
6
|
-
applies_to: "@homepages/concrete >=
|
|
6
|
+
applies_to: "@homepages/concrete >=10.0.0 <11.0.0"
|
|
7
7
|
related: [reference/cli/INDEX.md]
|
|
8
8
|
---
|
|
9
9
|
# concrete dev
|
|
@@ -3,7 +3,7 @@ purpose: The `concrete property add` command — its flags, exit codes and const
|
|
|
3
3
|
mode: reference
|
|
4
4
|
status: generated
|
|
5
5
|
generated_from: the concrete command table
|
|
6
|
-
applies_to: "@homepages/concrete >=
|
|
6
|
+
applies_to: "@homepages/concrete >=10.0.0 <11.0.0"
|
|
7
7
|
related: [reference/cli/INDEX.md]
|
|
8
8
|
---
|
|
9
9
|
# concrete property add
|
|
@@ -3,7 +3,7 @@ purpose: The `concrete property list` command — its flags, exit codes and cons
|
|
|
3
3
|
mode: reference
|
|
4
4
|
status: generated
|
|
5
5
|
generated_from: the concrete command table
|
|
6
|
-
applies_to: "@homepages/concrete >=
|
|
6
|
+
applies_to: "@homepages/concrete >=10.0.0 <11.0.0"
|
|
7
7
|
related: [reference/cli/INDEX.md]
|
|
8
8
|
---
|
|
9
9
|
# concrete property list
|
|
@@ -3,7 +3,7 @@ purpose: The `concrete publish` command — its flags, exit codes and constraint
|
|
|
3
3
|
mode: reference
|
|
4
4
|
status: generated
|
|
5
5
|
generated_from: the concrete command table
|
|
6
|
-
applies_to: "@homepages/concrete >=
|
|
6
|
+
applies_to: "@homepages/concrete >=10.0.0 <11.0.0"
|
|
7
7
|
related: [reference/cli/INDEX.md]
|
|
8
8
|
---
|
|
9
9
|
# concrete publish
|
|
@@ -3,7 +3,7 @@ purpose: The `concrete upgrade` command — its flags, exit codes and constraint
|
|
|
3
3
|
mode: reference
|
|
4
4
|
status: generated
|
|
5
5
|
generated_from: the concrete command table
|
|
6
|
-
applies_to: "@homepages/concrete >=
|
|
6
|
+
applies_to: "@homepages/concrete >=10.0.0 <11.0.0"
|
|
7
7
|
related: [reference/cli/INDEX.md]
|
|
8
8
|
---
|
|
9
9
|
# concrete upgrade
|
|
@@ -3,7 +3,7 @@ purpose: Every rule `concrete check` grades, by the stage that grades it, in the
|
|
|
3
3
|
mode: reference
|
|
4
4
|
status: generated
|
|
5
5
|
generated_from: the concrete rule registry
|
|
6
|
-
applies_to: "@homepages/concrete >=
|
|
6
|
+
applies_to: "@homepages/concrete >=10.0.0 <11.0.0"
|
|
7
7
|
related: [reference/cli/check.md]
|
|
8
8
|
---
|
|
9
9
|
# Rule reference
|
|
@@ -29,6 +29,7 @@ The workspace loads: `template.ts` default-exports a `defineTemplate` value and
|
|
|
29
29
|
| `concrete/workspace/template-missing` | tree | The workspace root has no `template.ts`. |
|
|
30
30
|
| `concrete/workspace/template-invalid` | tree | `template.ts` does not default-export a `defineTemplate` value. |
|
|
31
31
|
| `concrete/workspace/module-invalid` | tree | A workspace module fails to build or throws when it is evaluated. |
|
|
32
|
+
| `concrete/workspace/key-not-name` | tree | The template key is not its display name in lowercase kebab-case (`Block Website` → `block-website`). |
|
|
32
33
|
| `concrete/workspace/duplicate-section-key` | tree | Two different exported sections declare the same key. |
|
|
33
34
|
| `concrete/workspace/crlf-text` | tree | A text file in the workspace has CRLF line endings, so the same commit would build a different version than an LF checkout. |
|
|
34
35
|
| `concrete/workspace/unportable-name` | tree | A source file name, the template key, a section key or a fixture id would not name the same file on Windows and macOS: two differ only by case or Unicode form, or one is a reserved device name (`con`, `nul`, `com1`…), ends in a dot or a space, or carries a character Windows refuses in a file name (`:`, `\`, `?`, `*`, a control character…). A key or id must also be NFC. |
|
|
@@ -152,7 +153,7 @@ Every placed section's schema and fill spec satisfy the contract assertions publ
|
|
|
152
153
|
| `concrete/contract/display` | contract | Display entries declare one origin and legal cases, and every slot variant gate names a declared case. |
|
|
153
154
|
| `concrete/contract/display-evidence` | contract | A filled display entry has a declared fact read to judge its case from. |
|
|
154
155
|
| `concrete/contract/source` | contract | Every slot and item field source names a known fact, another slot or its own compute binding; the uploads are read, never bound. |
|
|
155
|
-
| `concrete/contract/object` | contract | An object groups value slots, rows, lists of value slots and lists of objects one level deep, holds no value of its own, is labelled by
|
|
156
|
+
| `concrete/contract/object` | contract | An object groups value slots, rows, lists of value slots and lists of objects one level deep, holds no value of its own, is labelled by its label field, and names no field like its binding's own keys. |
|
|
156
157
|
| `concrete/contract/list-source` | contract | A list's source is a list, a table, a list slot or a compute, and its item can take the source's element. |
|
|
157
158
|
| `concrete/contract/row-source` | contract | A row names its table in `from`; its source is a row slot it mirrors, a compute, the element inside an item, or a pick, and is never a table or a list. |
|
|
158
159
|
| `concrete/contract/row-rule` | contract | A member is read only through a row slot or an address in scope that offers it, and fits the slot that reads it. |
|
|
@@ -160,12 +161,10 @@ Every placed section's schema and fill spec satisfy the contract assertions publ
|
|
|
160
161
|
| `concrete/contract/record-collection` | contract | A list bound to a fact binds a registry table and may only narrow its min and max. |
|
|
161
162
|
| `concrete/contract/nested-slot-types` | contract | An object's fields, a nested list item's included, are each a value slot, a row or a list, of a kind the catalog declares. |
|
|
162
163
|
| `concrete/contract/list-scalar` | contract | A list declares exactly one legal item, a value element, an object or a row, with satisfiable bounds. |
|
|
163
|
-
| `concrete/contract/select` | contract | A select
|
|
164
|
-
| `concrete/contract/option-source` | contract | A select with an option source names a source the platform provides. |
|
|
164
|
+
| `concrete/contract/select` | contract | A select names its choices in exactly one place: its values, or a fact it is bound to that declares them. |
|
|
165
165
|
| `concrete/contract/url` | contract | A url slot's accepts names a link kind or provider that a registered provider implements. |
|
|
166
166
|
| `concrete/contract/sources` | contract | No slot declares sources, since a media slot takes a pasted link wherever a link provider claims its kind; a media slot picks `from` a media list of the property, or owns its asset without one, and processes only what its kind takes; a slot bound to a fact states neither. |
|
|
167
167
|
| `concrete/contract/interpolation` | contract | A fill brief refers to its facts through reads and never interpolates one. |
|
|
168
|
-
| `concrete/contract/group` | contract | Group ids are unique, every group names real slots, and no slot sits in two groups. |
|
|
169
168
|
|
|
170
169
|
## render
|
|
171
170
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@homepages/concrete",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0",
|
|
4
4
|
"description": "Concrete, the HomePages template framework: the authoring API, the contract primitives, the styles, the lint preset and the `concrete` command in one package that owns its whole toolchain.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|