@homepages/concrete 10.0.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.
Files changed (104) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/codemods/manifest.json +5 -158
  3. package/dist/artifact/playground/client/assets/index-ByeGGedv.js +1259 -0
  4. package/dist/artifact/playground/client/assets/index-CxWPYOH2.css +1 -0
  5. package/dist/artifact/playground/client/index.html +2 -2
  6. package/dist/artifact/playground/client/island-canvas-host.mjs +1 -1
  7. package/dist/artifact/playground/host.mjs +26 -26
  8. package/dist/base.css +1 -8
  9. package/dist/cli/build/artifact.js +1 -1
  10. package/dist/cli/build/fixtures.js +3 -2
  11. package/dist/cli/check/stages/sections.js +1 -1
  12. package/dist/cli/dev/workspace-reader.js +3 -2
  13. package/dist/css/compile.js +3 -6
  14. package/dist/css/rules.js +1 -51
  15. package/dist/design-system/format-variants.js +1 -1
  16. package/dist/fixtures/resolve.js +5 -1
  17. package/dist/fixtures/rows.js +2 -2
  18. package/dist/index.d.ts +5 -5
  19. package/dist/packages/external/concrete/package.js +1 -1
  20. package/dist/packages/internal/fill-vocabulary/dist/holder.js +3 -14
  21. package/dist/packages/internal/media-resolution/dist/document.js +3 -3
  22. package/dist/packages/internal/media-resolution/dist/image.js +3 -3
  23. package/dist/packages/internal/media-resolution/dist/tour.js +6 -6
  24. package/dist/packages/internal/media-resolution/dist/video.js +9 -9
  25. package/dist/packages/internal/section-contracts/dist/fill-verb-contract.js +1 -0
  26. package/dist/packages/internal/section-contracts/dist/runners.js +1 -3
  27. package/dist/packages/internal/section-contracts/dist/source-contract.js +3 -3
  28. package/dist/packages/internal/section-contracts/dist/sources-contract.js +0 -2
  29. package/dist/packages/internal/template-artifact/dist/index.js +2 -2
  30. package/dist/packages/internal/template-artifact/dist/layout.js +11 -11
  31. package/dist/packages/internal/template-artifact/dist/manifest.js +1 -1
  32. package/dist/packages/internal/template-artifact/dist/verify.js +13 -17
  33. package/dist/packages/internal/template-contracts/dist/document-value.d.ts +3 -5
  34. package/dist/packages/internal/template-contracts/dist/fill-builders.js +2 -6
  35. package/dist/packages/internal/template-contracts/dist/fill-spec-schema.js +4 -1
  36. package/dist/packages/internal/template-contracts/dist/list.js +0 -14
  37. package/dist/packages/internal/template-contracts/dist/primitive-descriptors.js +1 -1
  38. package/dist/packages/internal/template-contracts/dist/runtime-values.d.ts +6 -7
  39. package/dist/packages/internal/template-contracts/dist/slot-builders.js +0 -2
  40. package/dist/packages/internal/template-contracts/dist/slot-ref.d.ts +6 -1
  41. package/dist/packages/internal/template-contracts/dist/tour-value.d.ts +2 -4
  42. package/dist/packages/internal/template-contracts/dist/video-value.d.ts +3 -4
  43. package/dist/primitives/Image.d.ts +2 -2
  44. package/dist/primitives/Tour.d.ts +2 -2
  45. package/dist/primitives/Video.d.ts +2 -2
  46. package/dist/primitives/slot-bindings.js +6 -13
  47. package/dist/primitives/slot-document.d.ts +1 -1
  48. package/dist/primitives/slot-download.d.ts +3 -1
  49. package/dist/primitives/slot-media.d.ts +5 -2
  50. package/dist/primitives/slot-media.js +1 -1
  51. package/dist/rules/registry.js +0 -6
  52. package/dist/schema/format-presets.d.ts +1 -1
  53. package/dist/schema/section-schema.d.ts +5 -5
  54. package/dist/styles.css +4 -4
  55. package/dist/template/define-template.js +0 -1
  56. package/guide/reference/cli/INDEX.md +2 -2
  57. package/guide/reference/cli/build.md +1 -1
  58. package/guide/reference/cli/check.md +1 -1
  59. package/guide/reference/cli/dev.md +1 -1
  60. package/guide/reference/cli/property-add.md +1 -1
  61. package/guide/reference/cli/property-list.md +1 -1
  62. package/guide/reference/cli/publish.md +1 -1
  63. package/guide/reference/cli/upgrade.md +1 -1
  64. package/guide/reference/rules/INDEX.md +1 -2
  65. package/package.json +2 -2
  66. package/codemods/fill-is-a-source.mjs +0 -533
  67. package/codemods/framework-namespace.mjs +0 -107
  68. package/codemods/list-grammar.mjs +0 -923
  69. package/codemods/object-form-only.mjs +0 -39
  70. package/codemods/platform-namespace.mjs +0 -83
  71. package/codemods/process-builders.mjs +0 -198
  72. package/codemods/reads-replace-reconcile.mjs +0 -285
  73. package/codemods/registry-keys-only.mjs +0 -113
  74. package/codemods/slot-object.mjs +0 -1097
  75. package/codemods/steps/content-object-fields.mjs +0 -324
  76. package/codemods/steps/list-object-form.mjs +0 -686
  77. package/codemods/steps/registry-key-reads.mjs +0 -276
  78. package/codemods/steps/select-object-form.mjs +0 -210
  79. package/codemods/table-rows.mjs +0 -568
  80. package/codemods/theme-collapse.mjs +0 -396
  81. package/codemods/unlayer-author-css.mjs +0 -194
  82. package/codemods/unwrap-object-fields.mjs +0 -310
  83. package/codemods/viewer-slot-document.mjs +0 -131
  84. package/codemods/write-property-as-facts-document.mjs +0 -716
  85. package/codemods/write-the-address-line.mjs +0 -255
  86. package/codemods/write-the-registry-members.mjs +0 -653
  87. package/codemods/write-the-select-from.mjs +0 -141
  88. package/codemods/write-the-sole-from.mjs +0 -369
  89. package/codemods/write-the-table-from.mjs +0 -267
  90. package/codemods/write-the-whole-item.mjs +0 -512
  91. package/codemods/writeback-drop.mjs +0 -168
  92. package/codemods/written-contact-address.mjs +0 -162
  93. package/codemods/written-media-category.mjs +0 -227
  94. package/codemods/written-ref-kinds-name-the-layer.mjs +0 -172
  95. package/codemods/written-uploads-replace-pool-reads.mjs +0 -454
  96. package/codemods/written-uploads-sort-into-lists.mjs +0 -405
  97. package/codemods/written-uploads-stated-in-sorted-lists.mjs +0 -295
  98. package/codemods/written-video-sources-drop.mjs +0 -144
  99. package/codemods/written-without-pick-none.mjs +0 -146
  100. package/codemods/written-without-retired-knowledge.mjs +0 -223
  101. package/codemods/written-without-the-media-key.mjs +0 -202
  102. package/codemods/written-without-the-property-type.mjs +0 -249
  103. package/dist/artifact/playground/client/assets/index-BFNHB7VM.css +0 -1
  104. package/dist/artifact/playground/client/assets/index-Div1yo6s.js +0 -1259
@@ -1,17 +1,16 @@
1
- import { ASSETS_DIR, ASSET_URL_PREFIX, FIXTURES_DIR, FIXTURE_FILES, FIXTURE_OPTIONAL_FILES, MANIFEST_FILE, PLAYGROUND_CLIENT_DIR, PLAYGROUND_DIR, PLAYGROUND_FILES, SECTIONS_DIR, SECTION_FILES, SECTION_ISLANDS_DIR, STATIC_DIR, STORED_DIRS, TEMPLATE_DIR, TEMPLATE_FILES, UNHASHED_DIRS, boundFiles, fixturePath, playgroundPath, sectionPath, templatePath } from "./layout.js";
1
+ import { ASSETS_DIR, ASSET_URL_PREFIX, FIXTURES_DIR, FIXTURE_FILES, MANIFEST_FILE, PLAYGROUND_CLIENT_DIR, PLAYGROUND_DIR, PLAYGROUND_FILES, SECTIONS_DIR, SECTION_FILES, SECTION_ISLANDS_DIR, STATIC_DIR, STORED_DIRS, TEMPLATE_DIR, TEMPLATE_FILES, UNHASHED_DIRS, boundFiles, fixturePath, playgroundPath, sectionPath, templatePath } from "./layout.js";
2
2
  import { sha256Hex } from "./sha256.js";
3
3
  import { sectionContentHash, templateContentHash } from "./hash.js";
4
4
  import { ArtifactManifest, readArtifactSchema } from "./manifest.js";
5
5
 
6
6
  //#region ../../internal/template-artifact/dist/verify.js
7
7
  const decoder = new TextDecoder("utf-8", { fatal: true });
8
- const RETIRED_FILE = "used-facts.json";
9
- const SECTION_FILE_NAMES = /* @__PURE__ */ new Set([...Object.values(SECTION_FILES), RETIRED_FILE]);
10
- const TEMPLATE_FILE_NAMES = /* @__PURE__ */ new Set([...Object.values(TEMPLATE_FILES), RETIRED_FILE]);
8
+ const SECTION_FILE_NAMES = new Set(Object.values(SECTION_FILES));
9
+ const TEMPLATE_FILE_NAMES = new Set(Object.values(TEMPLATE_FILES));
11
10
  const ISLAND_CHUNK = new RegExp(`^${SECTION_ISLANDS_DIR}/[A-Za-z0-9._-]+\\.mjs$`);
12
11
  const FLAT_FILE = /^[A-Za-z0-9._-]+$/;
13
12
  const CLIENT_SEGMENT = /^(?!\.{1,2}$)[A-Za-z0-9._-]+$/;
14
- const FIXTURE_FILE_NAMES = /* @__PURE__ */ new Set([...Object.values(FIXTURE_FILES), ...Object.values(FIXTURE_OPTIONAL_FILES)]);
13
+ const FIXTURE_FILE_NAMES = new Set(Object.values(FIXTURE_FILES));
15
14
  const ASSET_URL = new RegExp(`${ASSET_URL_PREFIX.replace(/[.*+?^${}()|[\]\\/]/g, "\\$&")}([A-Za-z0-9._-]+)`, "g");
16
15
  function readJson(files, path, problems) {
17
16
  const bytes = files.get(path);
@@ -64,10 +63,10 @@ function verifyArtifact(files, stored = /* @__PURE__ */ new Map()) {
64
63
  problems
65
64
  };
66
65
  const schema = readArtifactSchema(raw.value);
67
- if (schema !== 3) {
66
+ if (schema !== 4) {
68
67
  problems.push({
69
68
  path: MANIFEST_FILE,
70
- message: schema === null ? `carries no integer artifact_schema; this reader knows ${String(3)}` : `artifact_schema ${String(schema)} is not one this reader knows (it knows ${String(3)})`
69
+ message: schema === null ? `carries no integer artifact_schema; this reader knows ${String(4)}` : `artifact_schema ${String(schema)} is not one this reader knows (it knows ${String(4)})`
71
70
  });
72
71
  return {
73
72
  manifest: null,
@@ -144,16 +143,13 @@ function verifyArtifact(files, stored = /* @__PURE__ */ new Map()) {
144
143
  path: playgroundPath(file),
145
144
  message: "missing"
146
145
  });
147
- for (const id of manifest.fixtures) {
148
- const optional = Object.values(FIXTURE_OPTIONAL_FILES).filter((file) => files.has(fixturePath(id, file)));
149
- for (const file of [...Object.values(FIXTURE_FILES), ...optional]) {
150
- const path = fixturePath(id, file);
151
- if (readJson(files, path, problems) === null) continue;
152
- for (const match of decoder.decode(files.get(path)).matchAll(ASSET_URL)) if (!present(`${"assets"}/${match[1]}`)) problems.push({
153
- path,
154
- message: `names ${match[0]}, which ${ASSETS_DIR}/ does not carry`
155
- });
156
- }
146
+ for (const id of manifest.fixtures) for (const file of Object.values(FIXTURE_FILES)) {
147
+ const path = fixturePath(id, file);
148
+ if (readJson(files, path, problems) === null) continue;
149
+ for (const match of decoder.decode(files.get(path)).matchAll(ASSET_URL)) if (!present(`${"assets"}/${match[1]}`)) problems.push({
150
+ path,
151
+ message: `names ${match[0]}, which ${ASSETS_DIR}/ does not carry`
152
+ });
157
153
  }
158
154
  const sectionHashes = /* @__PURE__ */ new Map();
159
155
  for (const section of manifest.sections) {
@@ -10,8 +10,8 @@ import { ResponsiveImage } from "./responsive-image.js";
10
10
  * poster.
11
11
  */
12
12
  type DocumentValue = {
13
- /** The media this slot points at — the whole stored value. */
14
- asset_id: string;
13
+ /** The media this slot points at — the whole stored value, under the one member every resolved media value names its media by. */
14
+ id: string;
15
15
  /**
16
16
  * Served source — the editor gets a presigned URL, a published page gets the
17
17
  * relative asset path. Same pivot as an image's or a video's `url`, so a
@@ -38,7 +38,5 @@ type DocumentValue = {
38
38
  /** The preview's responsive ladder, when one exists. Absent, `<Image>` falls back to `poster`. */
39
39
  poster_responsive?: ResponsiveImage;
40
40
  };
41
- /** A document list slot's runtime value: an ordered array of `DocumentValue`, possibly empty. */
42
- type DocumentCollectionValue = DocumentValue[];
43
41
  //#endregion
44
- export { DocumentCollectionValue, DocumentValue };
42
+ export { DocumentValue };
@@ -1,7 +1,6 @@
1
1
  import { readsWithRequires } from "./slot-ref.js";
2
2
 
3
3
  //#region ../../internal/template-contracts/dist/fill-builders.js
4
- const PICK_NONE_CODEMOD = "written-without-pick-none";
5
4
  const VERB_KEYS = {
6
5
  write: /* @__PURE__ */ new Set([
7
6
  "brief",
@@ -31,10 +30,7 @@ function verbBinding(verb, options) {
31
30
  verb
32
31
  };
33
32
  for (const [key, value] of Object.entries(options)) {
34
- if (!allowed.has(key)) {
35
- const hint = key === "none" && verb === "pick" ? ` A pick judges every candidate, so selecting none is already an outcome its brief steers — \`concrete upgrade\` drops \`none\` from every \`fill.pick\` (the \`${PICK_NONE_CODEMOD}\` codemod).` : key === "count" ? " A fill takes no count: the list's own `min` and `max` bound how many items it fills." : key === "cap" ? " A write's budget is its holder's `cap` — a text slot's own, or a list's `item: text.short({ cap })`." : key === "of" && verb === "find" ? " A find names no candidates: the platform's lookup for its holder's kind supplies the value." : key === "of" && verb === "pick" ? " A pick chooses from its holder's candidates — a select's values, a media slot's `from` list of its kinds, a row's table, a list's item's." : key === "of" ? " The kind a write produces is its holder's — a text slot's own, a list's `item`, a label's text slot." : "";
36
- throw new Error(`${at}: "${key}" is not an option — it takes ${[...allowed].map((k) => `\`${k}\``).join(", ")}, and everything the model should know goes in the brief.${hint}`);
37
- }
33
+ if (!allowed.has(key)) throw new Error(`${at}: "${key}" is not an option — it takes ${[...allowed].map((k) => `\`${k}\``).join(", ")}, and everything the model should know goes in the brief.`);
38
34
  if (key === "none" && value !== void 0 && value !== true) throw new Error(`${at}: \`none\` is \`true\` or absent — it admits the empty answer, and the brief's last sentence says when nothing is right.`);
39
35
  if (key === "unique" && value !== void 0 && typeof value !== "boolean") throw new Error(`${at}: \`unique\` is a boolean — \`false\` lets a pick repeat an element.`);
40
36
  if (key === "requires" && value !== void 0 && (!Array.isArray(value) || value.length === 0)) throw new Error(`${at}: \`requires\` names at least one read — omit it when the fill needs none.`);
@@ -76,4 +72,4 @@ function isFillBinding(x) {
76
72
  }
77
73
 
78
74
  //#endregion
79
- export { PICK_NONE_CODEMOD, fill, fillsOfSource, isFillBinding, isFillSource };
75
+ export { fill, fillsOfSource, isFillBinding, isFillSource };
@@ -31,7 +31,10 @@ function fillOf(verbs) {
31
31
  none: Abstention,
32
32
  reads: DecisionReads,
33
33
  requires: DecisionReads
34
- }).strict();
34
+ }).strict().refine((fill) => fill.verb !== "pick" || fill.none === void 0, {
35
+ path: ["none"],
36
+ message: "a pick abstains by its verdict and states no `none`"
37
+ });
35
38
  }
36
39
  function fillsOf(verbs) {
37
40
  return z.array(fillOf(verbs)).min(1);
@@ -215,20 +215,6 @@ function listTable(opts, label) {
215
215
  }
216
216
  function list(opts) {
217
217
  const label = opts.label ?? "list";
218
- for (const key of [
219
- "fields",
220
- "title",
221
- "unique",
222
- "count"
223
- ]) {
224
- if (opts[key] === void 0) continue;
225
- throw new Error(`list: "${label}" declares \`${key}\`, which a list no longer takes — ${{
226
- fields: "declare `item: (el) => object({ fields })` — an item function returning an object",
227
- title: "give the item's object a `label` — a string, or a text slot",
228
- unique: "a pick is unique by default (`fill.pick({ unique: false })` lifts it)",
229
- count: "`min` and `max` bound how many items any source yields"
230
- }[key]}.`);
231
- }
232
218
  const source = opts.source;
233
219
  const fills = fillsOfSource(source, `list: "${label}"`);
234
220
  const openWrite = answersMembers(opts.item);
@@ -98,7 +98,7 @@ const PRIMITIVE_DESCRIPTORS = {
98
98
  tour: {
99
99
  shape: { ...mediaFilterShape },
100
100
  default: () => ({
101
- tour_id: "",
101
+ id: "",
102
102
  url: "",
103
103
  poster: "",
104
104
  alt: ""
@@ -1,9 +1,9 @@
1
1
  import { AddressMember, AddressSource, AddressValue } from "./address-value.js";
2
2
  import { ResponsiveImage } from "./responsive-image.js";
3
- import { DocumentCollectionValue, DocumentValue } from "./document-value.js";
3
+ import { DocumentValue } from "./document-value.js";
4
4
  import { MediaKind } from "./slot-catalog.js";
5
- import { TourCollectionValue, TourValue } from "./tour-value.js";
6
- import { VideoCollectionValue, VideoValue } from "./video-value.js";
5
+ import { TourValue } from "./tour-value.js";
6
+ import { VideoValue } from "./video-value.js";
7
7
  import { PoiPhoto, PoiRow } from "./poi-row.js";
8
8
  //#region ../../internal/template-contracts/dist/runtime-values.d.ts
9
9
  /**
@@ -13,7 +13,8 @@ import { PoiPhoto, PoiRow } from "./poi-row.js";
13
13
  * renderer reads only `url`, `alt`, `mobile`, and `responsive`.
14
14
  */
15
15
  type ImageValue = {
16
- photo_id: string;
16
+ /** The media this slot points at: the one member every resolved media value names its media by. */
17
+ id: string;
17
18
  url: string;
18
19
  alt: string;
19
20
  mobile?: {
@@ -27,8 +28,6 @@ type ImageValue = {
27
28
  */
28
29
  download_url?: string;
29
30
  };
30
- /** An image list slot's runtime value: an ordered array of `ImageValue`, possibly empty. */
31
- type ImageCollectionValue = ImageValue[];
32
31
  /**
33
32
  * A raster image the template itself ships — a build-time `import` of a file
34
33
  * under the template's own assets — resolved to its optimized responsive
@@ -79,4 +78,4 @@ type MediaValue<Kinds extends MediaKind = MediaKind> = {
79
78
  };
80
79
  }[Kinds];
81
80
  //#endregion
82
- export { type AddressValue, AuthorImage, type DocumentCollectionValue, type DocumentValue, ImageCollectionValue, ImageValue, MediaValue, PlaybackConfig, type PoiPhoto, type PoiRow, type TourCollectionValue, type TourValue, type VideoCollectionValue, type VideoValue };
81
+ export { type AddressValue, AuthorImage, type DocumentValue, ImageValue, MediaValue, PlaybackConfig, type PoiPhoto, type PoiRow, type TourValue, type VideoValue };
@@ -142,8 +142,6 @@ function address(opts = {}) {
142
142
  function mediaFilterKeys(type, opts) {
143
143
  const at = `${type}: "${opts.label ?? type}"`;
144
144
  refuseStatedOf(at, opts.source);
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.`);
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.`);
147
145
  const problem = mediaDeclarationProblem({
148
146
  type,
149
147
  kinds: opts.kinds,
@@ -115,7 +115,12 @@ type RefValue<R> = R extends {
115
115
  * its media record, narrowed by kind where the value says it, at any depth. The type
116
116
  * half of the read step (./registry-facts `readAsRecords`).
117
117
  */
118
- type AsRead<V> = V extends ImageValue ? ImageMedia : V extends VideoValue ? VideoMedia : V extends TourValue ? TourMedia : V extends DocumentValue ? DocumentMedia : V extends DocumentMediaValue ? Media : V extends readonly unknown[] ? { [I in keyof V]: AsRead<V[I]>; } : V extends object ? { [K in keyof V]: AsRead<V[K]>; } : V;
118
+ type AsRead<V> = V extends DocumentValue ? DocumentMedia : V extends ImageValue ? {
119
+ image: ImageMedia;
120
+ video: VideoMedia;
121
+ tour: TourMedia;
122
+ }[PictureKindOf<V>] : V extends DocumentMediaValue ? Media : V extends readonly unknown[] ? { [I in keyof V]: AsRead<V[I]>; } : V extends object ? { [K in keyof V]: AsRead<V[K]>; } : V;
123
+ type PictureKindOf<V> = [Extract<keyof V, Exclude<keyof VideoValue, keyof TourValue>>] extends [never] ? [Extract<keyof V, Exclude<keyof TourValue, keyof ImageValue>>] extends [never] ? "image" : "tour" : "video";
119
124
  /**
120
125
  * The value ONE ref hands a declaration that reads it, each media value in it its media
121
126
  * record (`AsRead`). A slot read is always `| undefined` — the upstream section's page may
@@ -10,7 +10,7 @@ type TourValue = {
10
10
  * The media id of the link this tour was selected from — the same id
11
11
  * `facts.tours[].id` carries. `''` is the empty value.
12
12
  */
13
- tour_id: string;
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 { TourCollectionValue, TourValue };
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
- video_id: string;
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 { VideoCollectionValue, VideoValue };
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 the kit's frame — a clipped, relatively positioned wrapper the image
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
@@ -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 image — and the kit paints no geometry: no aspect, no size, no position.
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
  *
@@ -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 the kit's frame — a clipped, relatively positioned wrapper the embed
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. The kit paints no
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 the kit's frame — a clipped, relatively positioned wrapper the player
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. The kit paints no
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
- video_id: "",
6
+ id: "",
7
7
  url: "",
8
8
  poster: "",
9
9
  alt: ""
10
10
  });
11
11
  const blankTour = () => ({
12
- tour_id: "",
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
- if (!isRecord(value) || typeof value.url !== "string" || value.url === "") return null;
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
- video_id: stringField(value.video_id),
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
- tour_id: stringField(value.tour_id),
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 the kit's frame — a clipped, relatively positioned wrapper the viewer
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 | null | undefined;
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. */
@@ -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. */
@@ -14,7 +14,7 @@ function declaredPlayback(def) {
14
14
  }
15
15
  function posterAsImage(value) {
16
16
  return {
17
- photo_id: "",
17
+ id: "",
18
18
  url: value.poster,
19
19
  alt: "alt" in value ? value.alt : value.filename,
20
20
  responsive: value.poster_responsive ?? null
@@ -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) {
@@ -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 kit root. `presets.website` is 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
  */
@@ -1,9 +1,9 @@
1
1
  import { AddressValue } from "../packages/internal/template-contracts/dist/address-value.js";
2
- import { DocumentCollectionValue, DocumentValue } from "../packages/internal/template-contracts/dist/document-value.js";
3
- import { TourCollectionValue, TourValue } from "../packages/internal/template-contracts/dist/tour-value.js";
4
- import { VideoCollectionValue, VideoValue } from "../packages/internal/template-contracts/dist/video-value.js";
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, ImageCollectionValue, ImageValue, MediaValue, PlaybackConfig } from "../packages/internal/template-contracts/dist/runtime-values.js";
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
9
  import { Coordinates } from "./property-facts.js";
@@ -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 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 };
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 };
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 the kit's compiled JS for class scanning — that is how the utility classes
26
- * baked into the kit's primitives reach your compiled CSS. It also overrides Tailwind's
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 the kit ships unminified (deliberately: it keeps these class-name string
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. The kit declares none and resets none, so Tailwind's own
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 >=10.0.0 <11.0.0"
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` **>=10.0.0 <11.0.0**. The range, rather than
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 >=10.0.0 <11.0.0"
6
+ applies_to: "@homepages/concrete >=11.0.0 <12.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 >=10.0.0 <11.0.0"
6
+ applies_to: "@homepages/concrete >=11.0.0 <12.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 >=10.0.0 <11.0.0"
6
+ applies_to: "@homepages/concrete >=11.0.0 <12.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 >=10.0.0 <11.0.0"
6
+ applies_to: "@homepages/concrete >=11.0.0 <12.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 >=10.0.0 <11.0.0"
6
+ applies_to: "@homepages/concrete >=11.0.0 <12.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 >=10.0.0 <11.0.0"
6
+ applies_to: "@homepages/concrete >=11.0.0 <12.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 >=10.0.0 <11.0.0"
6
+ applies_to: "@homepages/concrete >=11.0.0 <12.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 >=10.0.0 <11.0.0"
6
+ applies_to: "@homepages/concrete >=11.0.0 <12.0.0"
7
7
  related: [reference/cli/check.md]
8
8
  ---
9
9
  # Rule reference
@@ -100,7 +100,6 @@ The CSS import graph of `template.ts` compiles into the template stylesheet exac
100
100
  | `concrete/css/tailwind-import` | tree | The CSS import graph of template.ts carries no `@import "tailwindcss"`, or more than one. |
101
101
  | `concrete/css/external-url` | tree | A rendered template's compiled stylesheet references an external URL, which the renderer cannot reach. |
102
102
  | `concrete/css/compile-failed` | tree | A stylesheet reachable from template.ts fails to resolve or compile, so no stylesheet rule could grade it. |
103
- | `concrete/css/retired-layer` | tree | A stylesheet declares `@layer sections` or `@layer template`, the layers the framework retired; author CSS is unlayered. |
104
103
 
105
104
  ## logic
106
105