@homepages/concrete 9.1.0 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +81 -0
- package/README.md +1 -1
- package/codemods/manifest.json +5 -148
- package/dist/artifact/playground/client/assets/index-ByeGGedv.js +1259 -0
- package/dist/artifact/playground/client/assets/index-CxWPYOH2.css +1 -0
- package/dist/artifact/playground/client/index.html +2 -2
- package/dist/artifact/playground/client/island-canvas-host.mjs +1 -1
- package/dist/artifact/playground/host.mjs +42 -42
- package/dist/base.css +1 -8
- package/dist/cli/build/artifact.js +3 -2
- package/dist/cli/build/fixtures.js +2 -0
- package/dist/cli/check/render/inputs.js +3 -3
- package/dist/cli/check/stages/sections.js +6 -7
- package/dist/cli/dev/workspace-reader.js +10 -2
- package/dist/css/compile.js +3 -6
- package/dist/css/rules.js +1 -51
- package/dist/design-system/format-variants.js +1 -1
- package/dist/fixtures/media-store.js +3 -3
- package/dist/fixtures/resolve.js +28 -16
- package/dist/fixtures/rows.js +2 -2
- package/dist/fixtures/synthesize-empties.js +3 -1
- package/dist/fixtures.d.ts +1 -1
- package/dist/index.d.ts +7 -8
- 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/holder.js +3 -14
- package/dist/packages/internal/fill-vocabulary/dist/resolved-decision.js +1 -1
- package/dist/packages/internal/media-resolution/dist/document.js +17 -16
- package/dist/packages/internal/media-resolution/dist/image.js +41 -95
- 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 +17 -16
- package/dist/packages/internal/media-resolution/dist/video.js +24 -24
- 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 +6 -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 +2 -11
- package/dist/packages/internal/section-contracts/dist/select-contract.js +7 -1
- package/dist/packages/internal/section-contracts/dist/source-contract.js +14 -10
- package/dist/packages/internal/section-contracts/dist/sources-contract.js +0 -2
- 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 +1 -1
- package/dist/packages/internal/template-artifact/dist/layout.js +12 -10
- package/dist/packages/internal/template-artifact/dist/manifest.js +1 -1
- package/dist/packages/internal/template-artifact/dist/verify.js +26 -14
- package/dist/packages/internal/template-contracts/dist/content-pick.js +24 -1
- package/dist/packages/internal/template-contracts/dist/document-value.d.ts +4 -6
- 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-builders.js +2 -6
- package/dist/packages/internal/template-contracts/dist/fill-spec-schema.js +4 -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 -29
- 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 +1 -1
- 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 +11 -27
- 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 +3 -8
- 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 +10 -5
- 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 +4 -6
- package/dist/packages/internal/template-contracts/dist/video-value.d.ts +3 -4
- package/dist/primitives/Image.d.ts +4 -4
- package/dist/primitives/Tour.d.ts +2 -2
- package/dist/primitives/Video.d.ts +2 -2
- package/dist/primitives/slot-bindings.js +6 -13
- package/dist/primitives/slot-document.d.ts +1 -1
- package/dist/primitives/slot-download.d.ts +4 -2
- package/dist/primitives/slot-media.d.ts +6 -3
- package/dist/primitives/slot-media.js +1 -1
- package/dist/rules/registry.js +0 -6
- 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/format-presets.d.ts +1 -1
- package/dist/schema/property-facts.d.ts +1 -62
- package/dist/schema/section-schema.d.ts +6 -6
- package/dist/schema/section-schema.js +1 -1
- package/dist/styles.css +4 -4
- package/dist/template/define-template.js +0 -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 -4
- package/package.json +2 -2
- package/codemods/fill-is-a-source.mjs +0 -533
- package/codemods/framework-namespace.mjs +0 -107
- package/codemods/list-grammar.mjs +0 -923
- package/codemods/object-form-only.mjs +0 -39
- package/codemods/platform-namespace.mjs +0 -83
- package/codemods/process-builders.mjs +0 -198
- package/codemods/reads-replace-reconcile.mjs +0 -285
- package/codemods/slot-object.mjs +0 -1097
- package/codemods/steps/content-object-fields.mjs +0 -324
- package/codemods/steps/list-object-form.mjs +0 -687
- package/codemods/steps/select-object-form.mjs +0 -210
- package/codemods/table-rows.mjs +0 -568
- package/codemods/theme-collapse.mjs +0 -396
- package/codemods/unlayer-author-css.mjs +0 -194
- package/codemods/unwrap-object-fields.mjs +0 -310
- package/codemods/viewer-slot-document.mjs +0 -131
- package/codemods/write-property-as-facts-document.mjs +0 -716
- package/codemods/write-the-address-line.mjs +0 -255
- package/codemods/write-the-registry-members.mjs +0 -653
- package/codemods/write-the-select-from.mjs +0 -141
- package/codemods/write-the-sole-from.mjs +0 -369
- package/codemods/write-the-table-from.mjs +0 -267
- package/codemods/write-the-whole-item.mjs +0 -512
- package/codemods/writeback-drop.mjs +0 -168
- package/codemods/written-contact-address.mjs +0 -162
- package/codemods/written-media-category.mjs +0 -227
- package/codemods/written-ref-kinds-name-the-layer.mjs +0 -172
- package/codemods/written-uploads-replace-pool-reads.mjs +0 -454
- package/codemods/written-uploads-sort-into-lists.mjs +0 -405
- package/codemods/written-uploads-stated-in-sorted-lists.mjs +0 -295
- package/codemods/written-video-sources-drop.mjs +0 -144
- package/codemods/written-without-pick-none.mjs +0 -146
- package/codemods/written-without-retired-knowledge.mjs +0 -223
- package/codemods/written-without-the-media-key.mjs +0 -202
- package/codemods/written-without-the-property-type.mjs +0 -249
- 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
|
@@ -7,10 +7,10 @@ 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
|
+
id: string;
|
|
14
14
|
/**
|
|
15
15
|
* The FINISHED EMBED SRC, not the URL as pasted: the facts row keeps the pasted
|
|
16
16
|
* form because that is the durable value, and `tourEmbedUrl` applies the rewrite
|
|
@@ -39,7 +39,5 @@ type TourValue = {
|
|
|
39
39
|
/** Link-provider id — any `kind: "tour"` member of `LINK_PROVIDERS`. Drives the editor's provider badge. */
|
|
40
40
|
provider?: string;
|
|
41
41
|
};
|
|
42
|
-
/** A tour list slot's runtime value: an ordered array of `TourValue`, possibly empty. */
|
|
43
|
-
type TourCollectionValue = TourValue[];
|
|
44
42
|
//#endregion
|
|
45
|
-
export {
|
|
43
|
+
export { TourValue };
|
|
@@ -7,7 +7,8 @@ import { VideoSource } from "./slot-catalog.js";
|
|
|
7
7
|
* video, and a video is selected rather than edited.
|
|
8
8
|
*/
|
|
9
9
|
type VideoValue = {
|
|
10
|
-
|
|
10
|
+
/** The media this slot points at: the one member every resolved media value names its media by. */
|
|
11
|
+
id: string;
|
|
11
12
|
/**
|
|
12
13
|
* Playable source — MEANS DIFFERENT THINGS PER BRANCH, deliberately. For a
|
|
13
14
|
* hosted upload it is the transcoded rendition; the original master is never
|
|
@@ -57,7 +58,5 @@ type VideoValue = {
|
|
|
57
58
|
/** Link-provider id; link branch only. Drives the editor's provider badge. */
|
|
58
59
|
provider?: string;
|
|
59
60
|
};
|
|
60
|
-
/** A video list slot's runtime value: an ordered array of `VideoValue`, possibly empty. */
|
|
61
|
-
type VideoCollectionValue = VideoValue[];
|
|
62
61
|
//#endregion
|
|
63
|
-
export {
|
|
62
|
+
export { VideoValue };
|
|
@@ -10,7 +10,7 @@ type ImageRendition = "mobile";
|
|
|
10
10
|
* kind of image is being rendered. Named so `Slot.Image` can derive its own passthrough
|
|
11
11
|
* from the same source rather than restating it. */
|
|
12
12
|
type ImageOptions = Omit<ImgHTMLAttributes<HTMLImageElement>, "src" | "alt" | "width" | "height"> & {
|
|
13
|
-
/** Render inside
|
|
13
|
+
/** Render inside Concrete's frame — a clipped, relatively positioned wrapper the image
|
|
14
14
|
* fills edge to edge, tinted when the value is absent. The frame has NO geometry of
|
|
15
15
|
* its own: `className` lands on it, and your classes are its whole box. `false`
|
|
16
16
|
* renders the bare `<img>` instead, so the layout box is the parent's; an absent
|
|
@@ -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 Concrete 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
|
*
|
|
@@ -6,7 +6,7 @@ type Props = Omit<HTMLAttributes<HTMLElement>, "title"> & {
|
|
|
6
6
|
value: TourValue | null | undefined;
|
|
7
7
|
/** Overrides the value's own alt, which titles the `<iframe>`. */
|
|
8
8
|
alt?: string;
|
|
9
|
-
/** Render inside
|
|
9
|
+
/** Render inside Concrete's frame — a clipped, relatively positioned wrapper the embed
|
|
10
10
|
* fills edge to edge, tinted when there is no embed. It has NO geometry of its own:
|
|
11
11
|
* `className` lands on it and your classes are its whole box. `false` renders a bare
|
|
12
12
|
* `<iframe>` instead. Default `true`. */
|
|
@@ -22,7 +22,7 @@ type Props = Omit<HTMLAttributes<HTMLElement>, "title"> & {
|
|
|
22
22
|
* once at resolve by `tourEmbedUrl`, so this component is a pure read.
|
|
23
23
|
*
|
|
24
24
|
* **Framed** (default): a wrapper — `relative`, clipped, tinted via `.concrete-image-frame` —
|
|
25
|
-
* that your `className` lands on and the iframe absolutely fills.
|
|
25
|
+
* that your `className` lands on and the iframe absolutely fills. Concrete paints no
|
|
26
26
|
* geometry: size the wrapper with your own classes and the embed fills it, same as
|
|
27
27
|
* `<Image>`/`<Video>`.
|
|
28
28
|
*
|
|
@@ -7,7 +7,7 @@ type Props = Omit<VideoHTMLAttributes<HTMLVideoElement>, "src" | "poster" | "aut
|
|
|
7
7
|
value: VideoValue | null | undefined;
|
|
8
8
|
/** Overrides the value's own alt. Pass `""` for a purely decorative loop. */
|
|
9
9
|
alt?: string;
|
|
10
|
-
/** Render inside
|
|
10
|
+
/** Render inside Concrete's frame — a clipped, relatively positioned wrapper the player
|
|
11
11
|
* fills edge to edge, tinted while there is nothing to show. It has NO geometry of its
|
|
12
12
|
* own: `className` lands on it and your classes are its whole box. `false` renders a
|
|
13
13
|
* bare `<video>` (or iframe) instead. Default `true`. */
|
|
@@ -33,7 +33,7 @@ type Props = Omit<VideoHTMLAttributes<HTMLVideoElement>, "src" | "poster" | "aut
|
|
|
33
33
|
* one frame container, one poster-only fallback, and one marker spread.
|
|
34
34
|
*
|
|
35
35
|
* **Framed** (default): a wrapper — `relative`, clipped, tinted via `.concrete-image-frame` —
|
|
36
|
-
* that your `className` lands on and the player absolutely fills.
|
|
36
|
+
* that your `className` lands on and the player absolutely fills. Concrete paints no
|
|
37
37
|
* geometry: size the wrapper with your own classes (an aspect utility, a height) and the
|
|
38
38
|
* player covers it. `frame={false}` hands your classes to the media element itself.
|
|
39
39
|
* Framed, `className` is the only prop that lands on the wrapper — the rest of the bag
|
|
@@ -3,13 +3,13 @@ import { OBJECT_BINDING_OWN_KEYS, acceptsLink, declaredKinds, isEmailValue, isIs
|
|
|
3
3
|
|
|
4
4
|
//#region src/primitives/slot-bindings.ts
|
|
5
5
|
const blankVideo = () => ({
|
|
6
|
-
|
|
6
|
+
id: "",
|
|
7
7
|
url: "",
|
|
8
8
|
poster: "",
|
|
9
9
|
alt: ""
|
|
10
10
|
});
|
|
11
11
|
const blankTour = () => ({
|
|
12
|
-
|
|
12
|
+
id: "",
|
|
13
13
|
url: "",
|
|
14
14
|
poster: "",
|
|
15
15
|
alt: ""
|
|
@@ -42,17 +42,13 @@ function normalizeImage(value) {
|
|
|
42
42
|
return isRecord(value) && typeof value.url === "string" && value.url !== "" ? value : null;
|
|
43
43
|
}
|
|
44
44
|
function normalizeDocument(value) {
|
|
45
|
-
|
|
46
|
-
return typeof value.poster === "string" ? value : {
|
|
47
|
-
...value,
|
|
48
|
-
poster: ""
|
|
49
|
-
};
|
|
45
|
+
return isRecord(value) && typeof value.url === "string" && value.url !== "" ? value : null;
|
|
50
46
|
}
|
|
51
47
|
function normalizeVideo(value) {
|
|
52
48
|
if (!isRecord(value)) return blankVideo();
|
|
53
49
|
return {
|
|
54
50
|
...value,
|
|
55
|
-
|
|
51
|
+
id: stringField(value.id),
|
|
56
52
|
url: stringField(value.url),
|
|
57
53
|
poster: stringField(value.poster),
|
|
58
54
|
alt: stringField(value.alt)
|
|
@@ -62,7 +58,7 @@ function normalizeTour(value) {
|
|
|
62
58
|
if (!isRecord(value)) return blankTour();
|
|
63
59
|
return {
|
|
64
60
|
...value,
|
|
65
|
-
|
|
61
|
+
id: stringField(value.id),
|
|
66
62
|
url: stringField(value.url),
|
|
67
63
|
poster: stringField(value.poster),
|
|
68
64
|
alt: stringField(value.alt)
|
|
@@ -93,13 +89,10 @@ function normalizeMedia(slot, value) {
|
|
|
93
89
|
default: return null;
|
|
94
90
|
}
|
|
95
91
|
}
|
|
96
|
-
const IDENTITY_KEYS = ["id"];
|
|
97
92
|
function normalizeFields(fields, value, identity) {
|
|
98
93
|
const source = isRecord(value) ? value : {};
|
|
99
94
|
const normalized = {};
|
|
100
|
-
if (identity)
|
|
101
|
-
for (const key of IDENTITY_KEYS) if (typeof source[key] === "string") normalized[key] = source[key];
|
|
102
|
-
}
|
|
95
|
+
if (identity && typeof source["id"] === "string") normalized["id"] = source["id"];
|
|
103
96
|
for (const [field, def] of Object.entries(fields)) normalized[field] = normalizeValue(def, source[field]);
|
|
104
97
|
return normalized;
|
|
105
98
|
}
|
|
@@ -8,7 +8,7 @@ type DocumentProps<D> = Omit<HTMLAttributes<HTMLElement>, "title" | "slot"> & {
|
|
|
8
8
|
};
|
|
9
9
|
/** Titles the `<iframe>` for assistive technology. Defaults to the file's name. */
|
|
10
10
|
title?: string;
|
|
11
|
-
/** Render inside
|
|
11
|
+
/** Render inside Concrete's frame — a clipped, relatively positioned wrapper the viewer
|
|
12
12
|
* fills edge to edge, tinted when there is nothing to show. It has NO geometry of its
|
|
13
13
|
* own: `className` lands on it and your classes are its whole box. `false` renders a
|
|
14
14
|
* bare `<iframe>` instead. Default `true`. */
|
|
@@ -6,7 +6,9 @@ import { ComponentPropsWithoutRef, ElementType, ReactNode } from "react";
|
|
|
6
6
|
//#region src/primitives/slot-download.d.ts
|
|
7
7
|
type DownloadOwnProps<D> = {
|
|
8
8
|
slot: ValueBinding<D> & {
|
|
9
|
-
value: ImageValue | VideoValue | DocumentValue
|
|
9
|
+
value: ((ImageValue | VideoValue | DocumentValue) & {
|
|
10
|
+
kind?: "image" | "video" | "document";
|
|
11
|
+
}) | null | undefined;
|
|
10
12
|
};
|
|
11
13
|
/** Author markup inside the marked element (an icon, the filename, a size
|
|
12
14
|
* line) — rendered in every branch, absent value included. */
|
|
@@ -21,7 +23,7 @@ type DownloadProps<D, As extends ElementType> = DownloadOwnProps<D> & {
|
|
|
21
23
|
} & Omit<ComponentPropsWithoutRef<As>, keyof DownloadOwnProps<D> | "as">;
|
|
22
24
|
/**
|
|
23
25
|
* Slot.Download — renders one anchor at the original of an image, video or
|
|
24
|
-
* document slot's
|
|
26
|
+
* document slot's file, with the author's children as its contents. Opens in a
|
|
25
27
|
* new tab by default (`target="_blank"`, `rel="noopener noreferrer"`); both are
|
|
26
28
|
* ordinary props and an author may override either, or add `download`.
|
|
27
29
|
*
|
|
@@ -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
|
|
@@ -43,9 +43,12 @@ type SlotImageProps<D> = Omit<ComponentProps<typeof Image>, "value" | "slot" | "
|
|
|
43
43
|
declare function SlotImage<D extends {
|
|
44
44
|
type: "image" | "video" | "tour" | "document" | "media";
|
|
45
45
|
}>(props: SlotImageProps<D>): ReactNode;
|
|
46
|
+
type OfKind<V, K extends MediaValue["kind"]> = V & {
|
|
47
|
+
kind?: K;
|
|
48
|
+
};
|
|
46
49
|
type SlotVideoProps<D> = Omit<ComponentProps<typeof Video>, "value" | "playback" | "slot"> & {
|
|
47
50
|
slot: ValueBinding<D> & {
|
|
48
|
-
value: VideoValue | null | undefined;
|
|
51
|
+
value: OfKind<VideoValue, "video"> | null | undefined;
|
|
49
52
|
};
|
|
50
53
|
/** `false` declines selection on THIS copy (a carousel clone, a responsive mirror) —
|
|
51
54
|
* full identity stays, and the copy is still patched live. */
|
|
@@ -67,7 +70,7 @@ declare function SlotVideo<D extends {
|
|
|
67
70
|
}>(props: SlotVideoProps<D>): ReactNode;
|
|
68
71
|
type SlotTourProps<D> = Omit<ComponentProps<typeof Tour>, "value" | "slot"> & {
|
|
69
72
|
slot: ValueBinding<D> & {
|
|
70
|
-
value: TourValue | null | undefined;
|
|
73
|
+
value: OfKind<TourValue, "tour"> | null | undefined;
|
|
71
74
|
};
|
|
72
75
|
/** `false` declines selection on THIS copy (a carousel clone, a responsive mirror) —
|
|
73
76
|
* full identity stays, and the copy is still patched live. */
|
package/dist/rules/registry.js
CHANGED
|
@@ -473,12 +473,6 @@ const AUTHORED_RULES = [
|
|
|
473
473
|
venue: "tree",
|
|
474
474
|
stage: "stylesheet",
|
|
475
475
|
summary: "A stylesheet reachable from template.ts fails to resolve or compile, so no stylesheet rule could grade it."
|
|
476
|
-
},
|
|
477
|
-
{
|
|
478
|
-
id: "css/retired-layer",
|
|
479
|
-
venue: "tree",
|
|
480
|
-
stage: "stylesheet",
|
|
481
|
-
summary: "A stylesheet declares `@layer sections` or `@layer template`, the layers the framework retired; author CSS is unlayered."
|
|
482
476
|
}
|
|
483
477
|
];
|
|
484
478
|
function contractRuleId(id) {
|
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 };
|
|
@@ -2,7 +2,7 @@ import { DocumentFormat, ImageFormat } from "../packages/internal/format-geometr
|
|
|
2
2
|
import { WebsiteFormat } from "./format.js";
|
|
3
3
|
//#region src/schema/format-presets.d.ts
|
|
4
4
|
/**
|
|
5
|
-
* The v1 preset library, exported from the
|
|
5
|
+
* The v1 preset library, exported from the package root. `presets.website` is the
|
|
6
6
|
* geometry-less singleton every website template's format set holds; the rest
|
|
7
7
|
* are the known social/print/deck sizes the picker renders as branded.
|
|
8
8
|
*/
|
|
@@ -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 };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { AddressValue } from "../packages/internal/template-contracts/dist/address-value.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { DocumentValue } from "../packages/internal/template-contracts/dist/document-value.js";
|
|
3
|
+
import { TourValue } from "../packages/internal/template-contracts/dist/tour-value.js";
|
|
4
|
+
import { VideoValue } from "../packages/internal/template-contracts/dist/video-value.js";
|
|
5
5
|
import { PoiPhoto, PoiRow } from "../packages/internal/template-contracts/dist/poi-row.js";
|
|
6
|
-
import { AuthorImage,
|
|
6
|
+
import { AuthorImage, 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 DocumentValue, type ImageValue, type ItemIdentity, type MediaValue, type ObjectValue, type PlaybackConfig, type PoiPhoto, type PoiRow, SectionSchema, SectionSchemaShape, type Slot, type SlotValue, type TourValue, 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
|
|
package/dist/styles.css
CHANGED
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
* token of yours usable.
|
|
23
23
|
*
|
|
24
24
|
* The @source below resolves relative to THIS FILE'S SHIPPED LOCATION (dist/styles.css),
|
|
25
|
-
* registering
|
|
26
|
-
* baked into
|
|
25
|
+
* registering Concrete's compiled JS for class scanning — that is how the utility classes
|
|
26
|
+
* baked into Concrete's primitives reach your compiled CSS. It also overrides Tailwind's
|
|
27
27
|
* default exclusion of node_modules.
|
|
28
28
|
*
|
|
29
29
|
* It is scoped to `primitives/` because those are the ONLY shipped modules that emit
|
|
30
30
|
* markup. Tailwind's scanner is a plain candidate-extractor — it cannot tell code from a
|
|
31
|
-
* comment — and
|
|
31
|
+
* comment — and Concrete ships unminified (deliberately: it keeps these class-name string
|
|
32
32
|
* literals scannable). Pointed at all of dist/, it therefore compiled prose out of the
|
|
33
33
|
* CLI's and the ESLint preset's doc comments into every consumer's stylesheet: 8 dead
|
|
34
34
|
* utilities and 19 stray @property registrations, ~2.5 KB. If a primitive ever moves out
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
* per-page-overridable tokens, so inlining is both correct and what keeps the compiled
|
|
49
49
|
* output stable. Nothing here may reference a token a template's own CSS defines.
|
|
50
50
|
*
|
|
51
|
-
* NO BREAKPOINTS.
|
|
51
|
+
* NO BREAKPOINTS. Concrete declares none and resets none, so Tailwind's own
|
|
52
52
|
* `sm`/`md`/`lg`/`xl`/`2xl` reach a template untouched. Where a design swaps is the
|
|
53
53
|
* template's call, not the platform's: declare your own `--breakpoint-*` tokens in
|
|
54
54
|
* `@theme` (each becomes a variant prefix), or write an arbitrary variant inline. The
|
|
@@ -10,7 +10,6 @@ const CLASS_BY_CATEGORY = {
|
|
|
10
10
|
presentation: "document"
|
|
11
11
|
};
|
|
12
12
|
function defineTemplate(input) {
|
|
13
|
-
if ("reconcile" in input) throw new Error(`Template "${input.key}" passes \`reconcile\`, which defineTemplate no longer takes. A slot that depends on another section reads it on its own \`source:\` — a slot ref (\`source: Hero.slots.title\`) or \`compute({ reads }, fn)\`. \`concrete upgrade\` removes an empty \`reconcile: []\` and lists every rule left to move by hand.`);
|
|
14
13
|
assertScope(input.scope);
|
|
15
14
|
const formats = Array.isArray(input.format) ? [...input.format] : [input.format];
|
|
16
15
|
const output = outputClassOf(input.key, formats);
|
|
@@ -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 >=11.0.0 <12.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` **>=11.0.0 <12.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 >=11.0.0 <12.0.0"
|
|
7
7
|
related: [reference/cli/INDEX.md]
|
|
8
8
|
---
|
|
9
9
|
# concrete build
|