@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.
Files changed (171) hide show
  1. package/CHANGELOG.md +81 -0
  2. package/README.md +1 -1
  3. package/codemods/manifest.json +5 -148
  4. package/dist/artifact/playground/client/assets/index-ByeGGedv.js +1259 -0
  5. package/dist/artifact/playground/client/assets/index-CxWPYOH2.css +1 -0
  6. package/dist/artifact/playground/client/index.html +2 -2
  7. package/dist/artifact/playground/client/island-canvas-host.mjs +1 -1
  8. package/dist/artifact/playground/host.mjs +42 -42
  9. package/dist/base.css +1 -8
  10. package/dist/cli/build/artifact.js +3 -2
  11. package/dist/cli/build/fixtures.js +2 -0
  12. package/dist/cli/check/render/inputs.js +3 -3
  13. package/dist/cli/check/stages/sections.js +6 -7
  14. package/dist/cli/dev/workspace-reader.js +10 -2
  15. package/dist/css/compile.js +3 -6
  16. package/dist/css/rules.js +1 -51
  17. package/dist/design-system/format-variants.js +1 -1
  18. package/dist/fixtures/media-store.js +3 -3
  19. package/dist/fixtures/resolve.js +28 -16
  20. package/dist/fixtures/rows.js +2 -2
  21. package/dist/fixtures/synthesize-empties.js +3 -1
  22. package/dist/fixtures.d.ts +1 -1
  23. package/dist/index.d.ts +7 -8
  24. package/dist/packages/external/concrete/package.js +1 -1
  25. package/dist/packages/internal/fill-bake/dist/bake-property-ref.js +8 -6
  26. package/dist/packages/internal/fill-bake/dist/compute-reads.js +8 -4
  27. package/dist/packages/internal/fill-bake/dist/index.js +1 -1
  28. package/dist/packages/internal/fill-bake/dist/item-merge.js +32 -6
  29. package/dist/packages/internal/fill-bake/dist/linked-merge.js +5 -5
  30. package/dist/packages/internal/fill-bake/dist/list-grammar.js +4 -26
  31. package/dist/packages/internal/fill-vocabulary/dist/holder.js +3 -14
  32. package/dist/packages/internal/fill-vocabulary/dist/resolved-decision.js +1 -1
  33. package/dist/packages/internal/media-resolution/dist/document.js +17 -16
  34. package/dist/packages/internal/media-resolution/dist/image.js +41 -95
  35. package/dist/packages/internal/media-resolution/dist/index.js +1 -1
  36. package/dist/packages/internal/media-resolution/dist/list.js +11 -11
  37. package/dist/packages/internal/media-resolution/dist/media.js +17 -16
  38. package/dist/packages/internal/media-resolution/dist/records.js +4 -2
  39. package/dist/packages/internal/media-resolution/dist/slot.js +5 -5
  40. package/dist/packages/internal/media-resolution/dist/tour.js +17 -16
  41. package/dist/packages/internal/media-resolution/dist/video.js +24 -24
  42. package/dist/packages/internal/property-facts/dist/registry-facts.js +8 -1
  43. package/dist/packages/internal/section-contracts/dist/catalog.js +1 -5
  44. package/dist/packages/internal/section-contracts/dist/directly-linked-list-contract.js +2 -3
  45. package/dist/packages/internal/section-contracts/dist/fill-verb-contract.js +6 -3
  46. package/dist/packages/internal/section-contracts/dist/index.js +0 -1
  47. package/dist/packages/internal/section-contracts/dist/object-contract.js +4 -2
  48. package/dist/packages/internal/section-contracts/dist/row-fill-contract.js +1 -1
  49. package/dist/packages/internal/section-contracts/dist/row-rule-contract.js +4 -2
  50. package/dist/packages/internal/section-contracts/dist/row-source-contract.js +7 -8
  51. package/dist/packages/internal/section-contracts/dist/runners.js +2 -11
  52. package/dist/packages/internal/section-contracts/dist/select-contract.js +7 -1
  53. package/dist/packages/internal/section-contracts/dist/source-contract.js +14 -10
  54. package/dist/packages/internal/section-contracts/dist/sources-contract.js +0 -2
  55. package/dist/packages/internal/section-contracts/dist/table-member.js +5 -8
  56. package/dist/packages/internal/source-resolution/dist/index.js +21 -188
  57. package/dist/packages/internal/template-artifact/dist/index.js +1 -1
  58. package/dist/packages/internal/template-artifact/dist/layout.js +12 -10
  59. package/dist/packages/internal/template-artifact/dist/manifest.js +1 -1
  60. package/dist/packages/internal/template-artifact/dist/verify.js +26 -14
  61. package/dist/packages/internal/template-contracts/dist/content-pick.js +24 -1
  62. package/dist/packages/internal/template-contracts/dist/document-value.d.ts +4 -6
  63. package/dist/packages/internal/template-contracts/dist/fact-keys.d.ts +3 -2
  64. package/dist/packages/internal/template-contracts/dist/fact-keys.js +19 -43
  65. package/dist/packages/internal/template-contracts/dist/fact-registry.d.ts +24 -3
  66. package/dist/packages/internal/template-contracts/dist/fact-registry.js +10 -3
  67. package/dist/packages/internal/template-contracts/dist/fill-builders.d.ts +1 -1
  68. package/dist/packages/internal/template-contracts/dist/fill-builders.js +2 -6
  69. package/dist/packages/internal/template-contracts/dist/fill-spec-schema.js +4 -1
  70. package/dist/packages/internal/template-contracts/dist/fill-spec.js +7 -6
  71. package/dist/packages/internal/template-contracts/dist/list.d.ts +1 -1
  72. package/dist/packages/internal/template-contracts/dist/list.js +7 -29
  73. package/dist/packages/internal/template-contracts/dist/mirror-kind.js +2 -2
  74. package/dist/packages/internal/template-contracts/dist/object.js +3 -2
  75. package/dist/packages/internal/template-contracts/dist/primitive-descriptors.js +1 -1
  76. package/dist/packages/internal/template-contracts/dist/process-builders.d.ts +2 -2
  77. package/dist/packages/internal/template-contracts/dist/read-graph.js +5 -32
  78. package/dist/packages/internal/template-contracts/dist/ref-locate.js +10 -6
  79. package/dist/packages/internal/template-contracts/dist/registry-facts.d.ts +1 -1
  80. package/dist/packages/internal/template-contracts/dist/registry-facts.js +13 -24
  81. package/dist/packages/internal/template-contracts/dist/registry-shape.d.ts +20 -4
  82. package/dist/packages/internal/template-contracts/dist/registry-shape.js +69 -11
  83. package/dist/packages/internal/template-contracts/dist/row-planners.js +1 -1
  84. package/dist/packages/internal/template-contracts/dist/row-ref.d.ts +4 -7
  85. package/dist/packages/internal/template-contracts/dist/row-ref.js +7 -23
  86. package/dist/packages/internal/template-contracts/dist/row-sources.js +3 -3
  87. package/dist/packages/internal/template-contracts/dist/row.d.ts +1 -1
  88. package/dist/packages/internal/template-contracts/dist/row.js +6 -7
  89. package/dist/packages/internal/template-contracts/dist/runtime-values.d.ts +11 -27
  90. package/dist/packages/internal/template-contracts/dist/section-schema-types.d.ts +1 -0
  91. package/dist/packages/internal/template-contracts/dist/slot-builders.d.ts +29 -37
  92. package/dist/packages/internal/template-contracts/dist/slot-builders.js +3 -8
  93. package/dist/packages/internal/template-contracts/dist/slot-catalog.d.ts +2 -702
  94. package/dist/packages/internal/template-contracts/dist/slot-catalog.js +2 -498
  95. package/dist/packages/internal/template-contracts/dist/slot-overrides.js +4 -1
  96. package/dist/packages/internal/template-contracts/dist/slot-ref.d.ts +10 -5
  97. package/dist/packages/internal/template-contracts/dist/slot-value.d.ts +2 -1
  98. package/dist/packages/internal/template-contracts/dist/table-members.d.ts +5 -12
  99. package/dist/packages/internal/template-contracts/dist/table-members.js +7 -37
  100. package/dist/packages/internal/template-contracts/dist/tour-value.d.ts +4 -6
  101. package/dist/packages/internal/template-contracts/dist/video-value.d.ts +3 -4
  102. package/dist/primitives/Image.d.ts +4 -4
  103. package/dist/primitives/Tour.d.ts +2 -2
  104. package/dist/primitives/Video.d.ts +2 -2
  105. package/dist/primitives/slot-bindings.js +6 -13
  106. package/dist/primitives/slot-document.d.ts +1 -1
  107. package/dist/primitives/slot-download.d.ts +4 -2
  108. package/dist/primitives/slot-media.d.ts +6 -3
  109. package/dist/primitives/slot-media.js +1 -1
  110. package/dist/rules/registry.js +0 -6
  111. package/dist/schema/fact.d.ts +19 -52
  112. package/dist/schema/fact.js +6 -25
  113. package/dist/schema/facts-view.d.ts +1 -2
  114. package/dist/schema/format-presets.d.ts +1 -1
  115. package/dist/schema/property-facts.d.ts +1 -62
  116. package/dist/schema/section-schema.d.ts +6 -6
  117. package/dist/schema/section-schema.js +1 -1
  118. package/dist/styles.css +4 -4
  119. package/dist/template/define-template.js +0 -1
  120. package/guide/reference/cli/INDEX.md +2 -2
  121. package/guide/reference/cli/build.md +1 -1
  122. package/guide/reference/cli/check.md +1 -1
  123. package/guide/reference/cli/dev.md +1 -1
  124. package/guide/reference/cli/property-add.md +1 -1
  125. package/guide/reference/cli/property-list.md +1 -1
  126. package/guide/reference/cli/publish.md +1 -1
  127. package/guide/reference/cli/upgrade.md +1 -1
  128. package/guide/reference/rules/INDEX.md +2 -4
  129. package/package.json +2 -2
  130. package/codemods/fill-is-a-source.mjs +0 -533
  131. package/codemods/framework-namespace.mjs +0 -107
  132. package/codemods/list-grammar.mjs +0 -923
  133. package/codemods/object-form-only.mjs +0 -39
  134. package/codemods/platform-namespace.mjs +0 -83
  135. package/codemods/process-builders.mjs +0 -198
  136. package/codemods/reads-replace-reconcile.mjs +0 -285
  137. package/codemods/slot-object.mjs +0 -1097
  138. package/codemods/steps/content-object-fields.mjs +0 -324
  139. package/codemods/steps/list-object-form.mjs +0 -687
  140. package/codemods/steps/select-object-form.mjs +0 -210
  141. package/codemods/table-rows.mjs +0 -568
  142. package/codemods/theme-collapse.mjs +0 -396
  143. package/codemods/unlayer-author-css.mjs +0 -194
  144. package/codemods/unwrap-object-fields.mjs +0 -310
  145. package/codemods/viewer-slot-document.mjs +0 -131
  146. package/codemods/write-property-as-facts-document.mjs +0 -716
  147. package/codemods/write-the-address-line.mjs +0 -255
  148. package/codemods/write-the-registry-members.mjs +0 -653
  149. package/codemods/write-the-select-from.mjs +0 -141
  150. package/codemods/write-the-sole-from.mjs +0 -369
  151. package/codemods/write-the-table-from.mjs +0 -267
  152. package/codemods/write-the-whole-item.mjs +0 -512
  153. package/codemods/writeback-drop.mjs +0 -168
  154. package/codemods/written-contact-address.mjs +0 -162
  155. package/codemods/written-media-category.mjs +0 -227
  156. package/codemods/written-ref-kinds-name-the-layer.mjs +0 -172
  157. package/codemods/written-uploads-replace-pool-reads.mjs +0 -454
  158. package/codemods/written-uploads-sort-into-lists.mjs +0 -405
  159. package/codemods/written-uploads-stated-in-sorted-lists.mjs +0 -295
  160. package/codemods/written-video-sources-drop.mjs +0 -144
  161. package/codemods/written-without-pick-none.mjs +0 -146
  162. package/codemods/written-without-retired-knowledge.mjs +0 -223
  163. package/codemods/written-without-the-media-key.mjs +0 -202
  164. package/codemods/written-without-the-property-type.mjs +0 -249
  165. package/dist/artifact/playground/client/assets/index-BOYbgBnP.js +0 -1259
  166. package/dist/artifact/playground/client/assets/index-DDOcM0zA.css +0 -1
  167. package/dist/packages/internal/section-contracts/dist/option-source-contract.js +0 -22
  168. package/dist/packages/internal/template-contracts/dist/comparable-address.js +0 -19
  169. package/dist/packages/internal/template-contracts/dist/facts-view.d.ts +0 -62
  170. package/dist/packages/internal/template-contracts/dist/legacy-facts.js +0 -167
  171. package/dist/packages/internal/template-contracts/dist/registry-aliases.js +0 -77
package/dist/base.css CHANGED
@@ -13,14 +13,7 @@
13
13
  * layered outright. That is stock Tailwind v4 and it is the whole model —
14
14
  * what you write is what applies. If you want a utility to win over a rule of
15
15
  * yours, put that rule in Tailwind's own `@layer components`.
16
- *
17
- * `sections` and `template` used to sit here, between `components` and
18
- * `utilities`, and the old kit's build folded every section's hand-CSS into
19
- * them. A declaration there lost to any utility setting the same property on
20
- * the same element, however specific its selector — silently, and only on the
21
- * published page, because the dev server served the same CSS unlayered. That
22
- * shipped defects to live customers twice before anyone went looking. The
23
- * layers are gone; `check` refuses author CSS that declares them.
16
+
24
17
  * - The three reset gaps Tailwind's preflight leaves (below)
25
18
  * - The section box model (.concrete-section, emitted by the <Section> primitive)
26
19
  * - The frame shell's static half (.concrete-frame, emitted by the <FrameShell> primitive)
@@ -1,5 +1,6 @@
1
- import { stampTableBounds } from "../../packages/internal/template-contracts/dist/slot-catalog.js";
1
+ import { stampTableBounds } from "../../packages/internal/template-contracts/dist/registry-shape.js";
2
2
  import { orgsForScope } from "../../template/define-template.js";
3
+ import "../../packages/internal/template-contracts/dist/table-members.js";
3
4
  import { qualify } from "../../rules/registry.js";
4
5
  import { isInsideRoot } from "../../platform/paths.js";
5
6
  import { CONCRETE_CLI_VERSION } from "../version.js";
@@ -174,7 +175,7 @@ async function buildArtifact(options) {
174
175
  for (const key of builtByKey.keys()) sectionHashes.set(key, sectionContentHash(files, key));
175
176
  const sourceFiles = await collectSourceFiles(root, [out]);
176
177
  const artifactManifest = ArtifactManifest.parse({
177
- artifact_schema: 3,
178
+ artifact_schema: 4,
178
179
  framework_version: CONCRETE_CLI_VERSION,
179
180
  key: template.key,
180
181
  display_name: template.name,
@@ -2,6 +2,7 @@ import { ASSET_URL_PREFIX, FIXTURE_FILES, fixturePath, isFixtureId } from "../..
2
2
  import "../../packages/internal/template-artifact/dist/index.js";
3
3
  import { assetContentType } from "../../packages/internal/template-artifact/dist/asset-mime.js";
4
4
  import { mediaUrl } from "../../fixtures/property.js";
5
+ import { authoredSettled } from "../../fixtures/resolve.js";
5
6
  import { basename } from "node:path";
6
7
  import { readFile } from "node:fs/promises";
7
8
 
@@ -70,6 +71,7 @@ async function fixtureFiles(input) {
70
71
  };
71
72
  }
72
73
  files.set(fixturePath(fixture.id, FIXTURE_FILES.contentDoc), json(fixture.contentDoc));
74
+ files.set(fixturePath(fixture.id, FIXTURE_FILES.settledDoc), json({ instances: authoredSettled(fixture) }));
73
75
  files.set(fixturePath(fixture.id, FIXTURE_FILES.property), json({
74
76
  facts: rewriteUrls(fixture.facts, urls),
75
77
  media
@@ -1,4 +1,4 @@
1
- import { fixtureAssetRecords, fixtureMediaStore, resolveFixtureSlots } from "../../../fixtures/media-store.js";
1
+ import { fixtureMediaRecords, fixtureMediaStore, resolveFixtureSlots } from "../../../fixtures/media-store.js";
2
2
  import { resolveNav } from "./nav.js";
3
3
 
4
4
  //#region src/cli/check/render/inputs.ts
@@ -8,7 +8,7 @@ async function* renderInputs(composition, sections, corpus, assets) {
8
8
  for (const entry of corpus) {
9
9
  const { fixture } = entry;
10
10
  const store = fixtureMediaStore(fixture.media);
11
- const records = fixtureAssetRecords(fixture.facts, fixture.media, (path) => assets?.get(path)?.bytes);
11
+ const records = fixtureMediaRecords(fixture.facts, fixture.media, (path) => assets?.get(path)?.bytes);
12
12
  const enabled = (instanceId) => fixture.contentDoc.instances.find((i) => i.instance_id === instanceId)?.enabled === true;
13
13
  const navPages = manifest.pages.map((page) => ({
14
14
  id: page.id,
@@ -39,7 +39,7 @@ async function* renderInputs(composition, sections, corpus, assets) {
39
39
  slots: await resolveFixtureSlots({
40
40
  slots: instance.slots,
41
41
  declared: section.section.schema.slots,
42
- assets: records,
42
+ records,
43
43
  store
44
44
  }),
45
45
  nav: {
@@ -1,5 +1,4 @@
1
- import { REGISTRY_TABLE_KEYS, tableKeyOf } from "../../../packages/internal/template-contracts/dist/slot-catalog.js";
2
- import { tableColumnOfKey } from "../../../packages/internal/template-contracts/dist/registry-shape.js";
1
+ import { tableColumnOfKey, tableKey, tableOf } from "../../../packages/internal/template-contracts/dist/registry-shape.js";
3
2
  import { declaringModule } from "../../../section/section.js";
4
3
  import "../../../packages/internal/template-contracts/dist/table-members.js";
5
4
  import { isInsideRoot, workspacePath } from "../../../platform/paths.js";
@@ -17,6 +16,7 @@ function flatten(parsed, key) {
17
16
  const { meta, ...rest } = parsed;
18
17
  return {
19
18
  ...rest,
19
+ slot_order: Object.keys(rest.slots),
20
20
  anchor: meta.anchor ?? key,
21
21
  ...meta.display ? { display: meta.display } : {}
22
22
  };
@@ -29,7 +29,7 @@ function stampItemOrder(object) {
29
29
  }
30
30
  }
31
31
  function heldTables(slot) {
32
- const rowTables = (row) => row?.type === "row" ? [row.from].flat().flatMap((key) => tableKeyOf(key)?.table ?? []) : [];
32
+ const rowTables = (row) => row?.type === "row" ? [row.from].flat().flatMap((key) => tableOf(key) ?? []) : [];
33
33
  if (slot.type === "row") return new Set(rowTables(slot));
34
34
  if (slot.type !== "list") return /* @__PURE__ */ new Set();
35
35
  return /* @__PURE__ */ new Set([...rowTables(slot.element), ...Object.values(slot.element?.fields ?? {}).flatMap(rowTables)]);
@@ -41,11 +41,11 @@ function wholeTableReads(schema) {
41
41
  if (slot.source?.kind === "derived") {
42
42
  const held = heldTables(slot);
43
43
  for (const read of slot.source.reads ?? []) {
44
- const table = read.kind === "home" ? tableKeyOf(read.key) : null;
45
- if (table !== null && !held.has(table.table)) found.push([
44
+ const table = read.kind === "home" ? tableOf(read.key) : null;
45
+ if (table !== null && !held.has(table)) found.push([
46
46
  path,
47
47
  String(read.key),
48
- REGISTRY_TABLE_KEYS[table.table]
48
+ tableKey(table)
49
49
  ]);
50
50
  }
51
51
  }
@@ -93,7 +93,6 @@ function sectionsStage(ctx) {
93
93
  const materialized = materializeSection(section);
94
94
  try {
95
95
  const parsed = SectionSchema.parse(materialized);
96
- parsed.slot_order = Object.keys(parsed.slots);
97
96
  for (const slot of Object.values(parsed.slots)) {
98
97
  if (slot.type === "object") stampItemOrder(slot);
99
98
  if (slot.type === "list" && slot.element?.type === "object") stampItemOrder(slot.element);
@@ -1,9 +1,10 @@
1
- import { stampTableBounds } from "../../packages/internal/template-contracts/dist/slot-catalog.js";
1
+ import { stampTableBounds } from "../../packages/internal/template-contracts/dist/registry-shape.js";
2
2
  import { isTemplate } from "../../template/define-template.js";
3
+ import "../../packages/internal/template-contracts/dist/table-members.js";
3
4
  import { compileTemplateCss } from "../../css/compile.js";
4
5
  import { materializeTemplate } from "../../template/materialize.js";
5
6
  import { loadFixtures } from "../../fixtures/load.js";
6
- import { resolveFixture } from "../../fixtures/resolve.js";
7
+ import { authoredSettled, computeReadsSectionOf, resolveFixture } from "../../fixtures/resolve.js";
7
8
  import { materializeSection } from "../../section/materialize.js";
8
9
  import { loadTemplateModule } from "./load-template.js";
9
10
  import { createElement } from "react";
@@ -51,6 +52,7 @@ function hostFixture(fixture, sizeOf) {
51
52
  facts: fixture.facts,
52
53
  media,
53
54
  instances: fixture.contentDoc.instances,
55
+ settled: authoredSettled(fixture),
54
56
  provenance: fixture.provenance
55
57
  };
56
58
  }
@@ -181,6 +183,7 @@ var DevWorkspace = class {
181
183
  return Promise.resolve({
182
184
  map: islands.map,
183
185
  canvasHost: islands.canvasHost,
186
+ importMap: {},
184
187
  documentLoader: islands.previewHost === null || Object.keys(islands.map).length === 0 ? { kind: "none" } : {
185
188
  kind: "viteModules",
186
189
  islandMap: islands.map,
@@ -188,6 +191,11 @@ var DevWorkspace = class {
188
191
  }
189
192
  });
190
193
  }
194
+ async computes(key) {
195
+ const section = (await this.loadComposition()).materialized.sections.get(key);
196
+ if (section === void 0) throw new Error(`The composition places no section "${key}".`);
197
+ return computeReadsSectionOf(section);
198
+ }
191
199
  renderer() {
192
200
  return {
193
201
  section: async (key) => {
@@ -3,7 +3,7 @@ import { NON_SOURCE_DIRS } from "../cli/workspace.js";
3
3
  import { compileFormatVariantsToCss } from "../design-system/format-variants.js";
4
4
  import { collectCssGraph } from "./graph.js";
5
5
  import { inlineCssGraph } from "./inline.js";
6
- import { externalUrlViolations, retiredLayerViolations, tailwindImportViolations } from "./rules.js";
6
+ import { externalUrlViolations, tailwindImportViolations } from "./rules.js";
7
7
  import { readFileSync } from "node:fs";
8
8
  import { dirname, isAbsolute, join } from "node:path";
9
9
  import { createHash } from "node:crypto";
@@ -69,15 +69,12 @@ async function compileTemplateCss(input) {
69
69
  violations: importViolations
70
70
  };
71
71
  const css = await compileTailwind(input.root, buildTailwindEntry(inlined.css, input.template), input.exclude ?? []);
72
- const violations = [...await retiredLayerViolations({
73
- root: input.root,
74
- sources: graph
75
- }), ...input.template.output === "website" ? [] : await externalUrlViolations({
72
+ const violations = input.template.output === "website" ? [] : await externalUrlViolations({
76
73
  root: input.root,
77
74
  templateFile: input.templateFile,
78
75
  css,
79
76
  sources: graph
80
- })];
77
+ });
81
78
  const bytes = new TextEncoder().encode(css);
82
79
  const contentHash = createHash("sha256").update(bytes).digest("hex");
83
80
  return {
package/dist/css/rules.js CHANGED
@@ -15,56 +15,6 @@ function tailwindImportViolations(input) {
15
15
  message: `a second @import "tailwindcss" (the first is in ${first}). The import graph owns exactly one; remove this one.`
16
16
  }));
17
17
  }
18
- const RETIRED_LAYERS = /* @__PURE__ */ new Set(["sections", "template"]);
19
- function maskNonCode(css) {
20
- const out = [...css];
21
- const blank = (from, to) => {
22
- for (let k = from; k < Math.min(to, css.length); k += 1) if (out[k] !== "\n") out[k] = " ";
23
- };
24
- for (let i = 0; i < css.length;) if (css[i] === "/" && css[i + 1] === "*") {
25
- const end = css.indexOf("*/", i + 2);
26
- const stop = end === -1 ? css.length : end + 2;
27
- blank(i, stop);
28
- i = stop;
29
- } else if (css[i] === "\"" || css[i] === "'") {
30
- const quote = css[i];
31
- let k = i + 1;
32
- while (k < css.length && css[k] !== quote) k += css[k] === "\\" ? 2 : 1;
33
- blank(i, k + 1);
34
- i = k + 1;
35
- } else i += 1;
36
- return out.join("");
37
- }
38
- const AT_LAYER_RE = /@layer\s+([^;{]+)[;{]/gi;
39
- const LAYER_FN_RE = /\blayer\(\s*([^)]*?)\s*\)/gi;
40
- function declaredLayerRoots(css) {
41
- const source = maskNonCode(css);
42
- const roots = [];
43
- for (const re of [AT_LAYER_RE, LAYER_FN_RE]) {
44
- re.lastIndex = 0;
45
- for (let m = re.exec(source); m !== null; m = re.exec(source)) for (const name of (m[1] ?? "").split(",")) {
46
- const root = name.trim().split(".")[0]?.trim();
47
- if (root !== void 0 && root !== "") roots.push(root);
48
- }
49
- }
50
- return roots;
51
- }
52
- async function retiredLayerViolations(input) {
53
- const violations = [];
54
- for (const file of input.sources) {
55
- const seen = /* @__PURE__ */ new Set();
56
- for (const layer of declaredLayerRoots(await readFile(file, "utf8"))) {
57
- if (!RETIRED_LAYERS.has(layer) || seen.has(layer)) continue;
58
- seen.add(layer);
59
- violations.push({
60
- rule: "css/retired-layer",
61
- file: workspacePath(input.root, file),
62
- message: `declares @layer ${layer}, which @homepages/concrete retired. Your CSS is not layered: delete the wrapper and a plain rule outranks every utility setting the same property. To demote someone else's stylesheet instead, import it into a layer of your own naming — @import "pkg/x.css" layer(components).`
63
- });
64
- }
65
- }
66
- return violations;
67
- }
68
18
  const EXTERNAL_RE = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
69
19
  const INLINE_RE = /^data:/i;
70
20
  const URL_FUNCTION_RE = /url\(\s*(['"]?)([^'")\s]+)\1\s*\)/gi;
@@ -96,4 +46,4 @@ async function externalUrlViolations(input) {
96
46
  }
97
47
 
98
48
  //#endregion
99
- export { declaredLayerRoots, externalUrlViolations, findExternalUrls, retiredLayerViolations, tailwindImportViolations };
49
+ export { externalUrlViolations, findExternalUrls, tailwindImportViolations };
@@ -89,7 +89,7 @@ const RESERVED_FORMAT_VARIANT_NAMES = /* @__PURE__ */ new Set([
89
89
  ]);
90
90
  function formatVariantNameError(id) {
91
91
  if (!VARIANT_NAME_RE.test(id)) return `Format id "${id}" cannot become a Tailwind variant: ids are kebab-case — [a-z0-9] groups separated by single hyphens.`;
92
- if (RESERVED_FORMAT_VARIANT_NAMES.has(id)) return `Format id "${id}" shadows a reserved Tailwind variant name; pick an id that is not a kit breakpoint or Tailwind built-in.`;
92
+ if (RESERVED_FORMAT_VARIANT_NAMES.has(id)) return `Format id "${id}" shadows a reserved Tailwind variant name; pick an id that is not a Concrete breakpoint or Tailwind built-in.`;
93
93
  return null;
94
94
  }
95
95
  function compileFormatVariantsToCss(formats) {
@@ -82,7 +82,7 @@ function serveSrcset(srcset, serve) {
82
82
  return [serve(url), ...descriptors].join(" ");
83
83
  }).join(", ");
84
84
  }
85
- function fixtureAssetRecords(facts, media, sizeOf) {
85
+ function fixtureMediaRecords(facts, media, sizeOf) {
86
86
  const records = recordsOf(facts === null ? null : mediaRecords(facts));
87
87
  const sized = /* @__PURE__ */ new Map();
88
88
  for (const entry of media.values()) {
@@ -100,7 +100,7 @@ function fixtureAssetRecords(facts, media, sizeOf) {
100
100
  async function resolveFixtureSlots(input) {
101
101
  const ctx = {
102
102
  store: input.store,
103
- assets: input.assets,
103
+ records: input.records,
104
104
  resolvePoi: (value) => value
105
105
  };
106
106
  const out = {};
@@ -112,4 +112,4 @@ async function resolveFixtureSlots(input) {
112
112
  }
113
113
 
114
114
  //#endregion
115
- export { cropRectOf, fixtureAssetRecords, fixtureMediaStore, resolveFixtureSlots };
115
+ export { cropRectOf, fixtureMediaRecords, fixtureMediaStore, resolveFixtureSlots };
@@ -1,7 +1,9 @@
1
1
  import { normalizeAddressValue } from "../packages/internal/template-contracts/dist/address-value.js";
2
- import { REGISTRY_TABLE_KEYS, declaredKinds, isEmailValue, isIsoDateValue, isMediaType, isPhoneValue } from "../packages/internal/template-contracts/dist/slot-catalog.js";
2
+ import { declaredKinds, isEmailValue, isIsoDateValue, isMediaType, isPhoneValue } from "../packages/internal/template-contracts/dist/slot-catalog.js";
3
3
  import { getComputed } from "../packages/internal/template-contracts/dist/compute.js";
4
+ import { tableKey } from "../packages/internal/template-contracts/dist/registry-shape.js";
4
5
  import { heldRowTableOf, listTableOf, placementOf, rowTablesOf } from "../packages/internal/template-contracts/dist/ref-locate.js";
6
+ import "../packages/internal/template-contracts/dist/table-members.js";
5
7
  import { fillSpecFromSchema } from "../schema/extract-fill-spec.js";
6
8
  import { elementRowKeys, listSourceOf, memberSourceOf } from "../packages/internal/template-contracts/dist/row-sources.js";
7
9
  import { objectFieldSlotId } from "../packages/internal/template-contracts/dist/slot-overrides.js";
@@ -13,6 +15,10 @@ import { canonicalizeProperty, contactImageId } from "./property.js";
13
15
  import { blankForField } from "./rows.js";
14
16
 
15
17
  //#region src/fixtures/resolve.ts
18
+ function authoredSettled(fixture) {
19
+ if (fixture.settled === void 0) throw new Error(`Fixture "${fixture.id}" is synthesized: it carries no settled doc, and no playground serves it.`);
20
+ return fixture.settled;
21
+ }
16
22
  const VALIDATED_KINDS = {
17
23
  date: {
18
24
  admits: (value) => value === null || isIsoDateValue(value),
@@ -95,10 +101,10 @@ function resolveFixture(loaded, options) {
95
101
  const slots = {};
96
102
  const provenanceOf = {};
97
103
  for (const [id, def] of Object.entries(schemaSlots)) {
104
+ provenanceOf[id] = provenanceFor(def, id, values[id], instance.slots[id], facts);
98
105
  const cases = def.variant?.cases;
99
106
  if (cases !== void 0 && (instance.variant === void 0 || !cases.includes(instance.variant))) continue;
100
107
  slots[id] = instance.slots[id];
101
- provenanceOf[id] = provenanceFor(def, id, values[id], slots[id], facts);
102
108
  }
103
109
  instances.push({
104
110
  instance_id: instance.instance_id,
@@ -118,11 +124,27 @@ function resolveFixture(loaded, options) {
118
124
  facts,
119
125
  media,
120
126
  contentDoc: { instances },
127
+ settled: settled.instances,
121
128
  provenance
122
129
  },
123
130
  violations
124
131
  };
125
132
  }
133
+ function computeReadsSectionOf(section, log) {
134
+ const { schema } = section;
135
+ return {
136
+ localKey: section.key,
137
+ schema: {
138
+ slots: schema.slots,
139
+ display: schema.meta.display ?? {}
140
+ },
141
+ bakeContext: {
142
+ computed: getComputed(schema),
143
+ section_key: section.key,
144
+ log
145
+ }
146
+ };
147
+ }
126
148
  function pickDecisions(schema) {
127
149
  try {
128
150
  return fillSpecFromSchema(schema).decisions;
@@ -186,14 +208,7 @@ function fillInstance(placement, entry, ctx) {
186
208
  slots,
187
209
  ...Object.keys(overrides).length === 0 ? {} : { display_overrides: overrides }
188
210
  },
189
- section: {
190
- localKey: section.key,
191
- schema: {
192
- slots: schema.slots,
193
- display
194
- },
195
- bakeContext
196
- },
211
+ section: computeReadsSectionOf(section, ctx.log),
197
212
  values
198
213
  };
199
214
  }
@@ -285,9 +300,6 @@ function itemsValue(def, path, items, stated, decisions) {
285
300
  return out;
286
301
  });
287
302
  }
288
- function storedTableKey(key) {
289
- return key.reading === "legacy" ? key.table : REGISTRY_TABLE_KEYS[key.table];
290
- }
291
303
  function provenanceFor(def, id, stated, value, facts) {
292
304
  const source = def.source;
293
305
  if (def.type === "object") return { kind: "authored" };
@@ -296,7 +308,7 @@ function provenanceFor(def, id, stated, value, facts) {
296
308
  const table = heldRowTableOf(facts, rowTablesOf(def), typeof value === "string" ? value : null);
297
309
  return table !== null ? {
298
310
  kind: "fact",
299
- ref: storedTableKey(table)
311
+ ref: tableKey(table)
300
312
  } : { kind: "empty" };
301
313
  }
302
314
  if (source?.kind === "home") return {
@@ -373,8 +385,8 @@ function mediaRef(def, value, ctx) {
373
385
  });
374
386
  return null;
375
387
  }
376
- return { asset_id: carried.id };
388
+ return { media: carried.id };
377
389
  }
378
390
 
379
391
  //#endregion
380
- export { emptyValueFor, isEmptyValue, resolveFixture, uniquePlacements };
392
+ export { authoredSettled, computeReadsSectionOf, emptyValueFor, isEmptyValue, resolveFixture, uniquePlacements };
@@ -7,13 +7,13 @@ function blankForField(def) {
7
7
  case "email":
8
8
  case "phone": return "";
9
9
  case "video": return {
10
- video_id: "",
10
+ id: "",
11
11
  url: "",
12
12
  poster: "",
13
13
  alt: ""
14
14
  };
15
15
  case "tour": return {
16
- tour_id: "",
16
+ id: "",
17
17
  url: "",
18
18
  poster: "",
19
19
  alt: ""
@@ -3,6 +3,8 @@ import { emptyValueFor, isEmptyValue, uniquePlacements } from "./resolve.js";
3
3
  //#region src/fixtures/synthesize-empties.ts
4
4
  function synthesizeEmptyFixtures(resolved, placements) {
5
5
  const out = [];
6
+ const base = { ...resolved };
7
+ delete base.settled;
6
8
  for (const placement of uniquePlacements(placements)) {
7
9
  const instance = resolved.contentDoc.instances.find((i) => i.instance_id === placement.instance);
8
10
  if (instance === void 0) continue;
@@ -10,7 +12,7 @@ function synthesizeEmptyFixtures(resolved, placements) {
10
12
  if (!(slot in instance.slots) || isEmptyValue(instance.slots[slot], def.type)) continue;
11
13
  const empty = emptyValueFor(def.type);
12
14
  out.push({
13
- ...resolved,
15
+ ...base,
14
16
  id: `${resolved.id}/empty/${placement.instance}/${slot}`,
15
17
  label: `${resolved.label}: ${placement.instance}.${slot} = ${Array.isArray(empty) ? "empty" : "null"}`,
16
18
  synthesized: true,
@@ -318,7 +318,7 @@ type ContentItem<F> = {
318
318
  * `{ contact: listingAgent, field: "logo_dark" }`. A contact's headshot and logos are image
319
319
  * media like any other, but the platform holds them on the card rather than in a pool, so
320
320
  * they have no entry of their own to state — this names the same image the resolver
321
- * registers, and it resolves to the `{ asset_id }` the platform bakes for that field. A contact the property does not carry, or a field it holds `null`, is a check
321
+ * registers, and it resolves to the `{ media }` reference the platform bakes for that field. A contact the property does not carry, or a field it holds `null`, is a check
322
322
  * error like any other media the property lacks.
323
323
  */
324
324
  interface ContactImageEntry {
package/dist/index.d.ts CHANGED
@@ -3,11 +3,11 @@ import { ATTR_ISLAND_FRAMELESS, ATTR_ISLAND_ID, ATTR_ISLAND_PROPS, EDITOR_BRIDGE
3
3
  import "./asset-modules.js";
4
4
  import { AddressValue } from "./packages/internal/template-contracts/dist/address-value.js";
5
5
  import { ResponsiveImage, ResponsiveSource } from "./packages/internal/template-contracts/dist/responsive-image.js";
6
- import { DocumentCollectionValue, DocumentValue } from "./packages/internal/template-contracts/dist/document-value.js";
7
- import { TourCollectionValue, TourValue } from "./packages/internal/template-contracts/dist/tour-value.js";
8
- import { VideoCollectionValue, VideoValue } from "./packages/internal/template-contracts/dist/video-value.js";
6
+ import { DocumentValue } from "./packages/internal/template-contracts/dist/document-value.js";
7
+ import { TourValue } from "./packages/internal/template-contracts/dist/tour-value.js";
8
+ import { VideoValue } from "./packages/internal/template-contracts/dist/video-value.js";
9
9
  import { PoiPhoto, PoiRow } from "./packages/internal/template-contracts/dist/poi-row.js";
10
- import { AuthorImage, ImageCollectionValue, ImageValue, MediaValue, PlaybackConfig } from "./packages/internal/template-contracts/dist/runtime-values.js";
10
+ import { AuthorImage, ImageValue, MediaValue, PlaybackConfig } from "./packages/internal/template-contracts/dist/runtime-values.js";
11
11
  import { ComputeBinding, compute } from "./packages/internal/template-contracts/dist/compute.js";
12
12
  import { AddressMembers, ElementOf, RowId, TableRow } from "./packages/internal/template-contracts/dist/row-ref.js";
13
13
  import { ItemIdentity, ObjectValue, SlotValue } from "./packages/internal/template-contracts/dist/slot-value.js";
@@ -21,7 +21,7 @@ import { ObjectLabelField, ObjectLabelSource, ObjectSlotDef, object } from "./pa
21
21
  import { RowFill, RowSlotDef, RowSourceInput, TableSource, row } from "./packages/internal/template-contracts/dist/row.js";
22
22
  import { ListFill, ListSlotDef, ListSourceInput, list } from "./packages/internal/template-contracts/dist/list.js";
23
23
  import { DocumentMedia, ImageMedia, Media, TourMedia, VideoMedia } from "./packages/internal/template-contracts/dist/registry-facts.js";
24
- import { ComparableRow, Coordinates, Narrative } from "./schema/property-facts.js";
24
+ import { Coordinates } from "./schema/property-facts.js";
25
25
  import "./schema/section-schema.js";
26
26
  import { UseEditorResult, useEditor } from "./packages/internal/island-runtime/dist/use-editor.js";
27
27
  import { useCaptureReady } from "./packages/internal/island-runtime/dist/use-capture-ready.js";
@@ -43,9 +43,8 @@ import { Video } from "./primitives/Video.js";
43
43
  import { Slot } from "./primitives/slot.js";
44
44
  import "./primitives/index.js";
45
45
  import { ATTR_SECTION_INSTANCE_ID, ATTR_SLOT_FIELD, ATTR_SLOT_GROUP, ATTR_SLOT_ID, ATTR_SLOT_ITEM, ATTR_SLOT_TEXT_LEAF, ATTR_SLOT_UNSELECTABLE, ATTR_TR_ENHANCE } from "./packages/internal/template-contracts/dist/markers.js";
46
- import { FactsAddress } from "./packages/internal/template-contracts/dist/facts-view.js";
46
+ import { DerivedFactRef, FactNamespace, RegistryFactRef, fact } from "./schema/fact.js";
47
47
  import { FactsCommercialSpace, FactsComparable, FactsContact, FactsUnit } from "./schema/facts-view.js";
48
- import { DerivedFactRef, DirectFactRef, FactNamespace, RegistryFactRef, fact } from "./schema/fact.js";
49
48
  import { presets } from "./schema/format-presets.js";
50
49
  import { a4Landscape, a4Portrait, deck16x9, facebookPost, halfLetterFlyer, instagramPortrait, instagramSquare, instagramStory, letterLandscape, letterPortrait, linkedinPost, postcard6x4, postcard7x5, website, xPost } from "./schema/formats.js";
51
50
  //#region src/index.d.ts
@@ -59,4 +58,4 @@ import { a4Landscape, a4Portrait, deck16x9, facebookPost, halfLetterFlyer, insta
59
58
  */
60
59
  declare const CONCRETE_VERSION: string;
61
60
  //#endregion
62
- export { ATTR_ISLAND_FRAMELESS, ATTR_ISLAND_ID, ATTR_ISLAND_KEY, ATTR_ISLAND_PROPS, ATTR_SECTION_INSTANCE_ID, ATTR_SLOT_FIELD, ATTR_SLOT_GROUP, ATTR_SLOT_ID, ATTR_SLOT_ITEM, ATTR_SLOT_TEXT_LEAF, ATTR_SLOT_UNSELECTABLE, ATTR_TR_ENHANCE, type AddressMembers, type AddressSlot, type AddressSlotDef, type AddressValue, type AuthorImage, type AutocropInput, type AutocropProcess, type BoundSlotValue, CONCRETE_VERSION, type CanvasInput, type CanvasesInput, type ComparableRow, type ComputeBinding, type Coordinates, type CropConfig, type CutoutProcess, type DateSlot, type DateSlotDef, type DefineTemplateInput, type DerivedFactRef, type DirectFactRef, type DisplayEntryInput, type DisplayFill, type DocumentCollectionValue, type DocumentFormat, type DocumentMedia, type DocumentSlot, type DocumentSlotDef, type DocumentValue, EDITOR_BRIDGE_PROP, EDITOR_BRIDGE_PROTOCOL, EditorBridge, EditorBridgeSelection, EditorSelection, type ElementOf, type ElementRef, type EmailSlot, type EmailSlotDef, type FactNamespace, type FactsAddress, type FactsCommercialSpace, type FactsComparable, type FactsContact, type FactsUnit, type FieldBinding, type FieldBindings, type FillBinding, type FillVerb, type FindFill, type FindInput, type FormatIdentity, FrameShell, type HolderProcess, ISLAND_CAPTURE_HOLDS_GLOBAL, ISLAND_ELEMENT, type IconName, Image, type ImageCollectionValue, type ImageFormat, type ImageMedia, type ImageSlot, type ImageSlotDef, type ImageValue, IslandComponent, IslandEditor, IslandEditorOptions, IslandMarker, type IslandMarkerProps, IslandModule, IslandProps, IslandPropsError, IslandServerFrame, type ItemBinding, type ItemIdentity, type ListFill, type ListItemSlot, type ListSlot, type ListSlotDef, type ListSourceInput, type Media, type MediaSlot, type MediaSlotDef, type MediaValue, type Narrative, type NumberSlot, type NumberSlotDef, type ObjectBinding, type ObjectFieldSlot, type ObjectLabelField, type ObjectLabelSource, type ObjectSlot, type ObjectSlotDef, type ObjectValue, type OutputClass, type PageComponent, type PhoneSlot, type PhoneSlotDef, type PhysicalLength, type PickFill, type PickInput, type PicturePlan, type PictureSourceSpec, type PlaybackConfig, type PoiPhoto, type PoiRow, type PoiSlot, type PoiSlotDef, type RegistryFactRef, type RenderedPage, type ResponsiveImage, type ResponsiveSource, type RowFill, type RowId, type RowRef, type RowSlot, type RowSlotDef, type RowSourceInput, Section, type SectionContractProps, type SectionOptions, type SectionPlacementProps, type SectionRenderBindings, type SectionValue, type SelectOptionInput, type SelectOptionObject, type SelectSlot, type SelectSlotDef, Slot, type SlotBinding, type SlotBindingMap, type SlotRef, type SlotSource, type SlotValue, type TableRow, type TableSource, type TemplateCanvas, type TemplatePage, type TemplatePreview, type TemplateScope, type TemplateValue, type TextSlot, type TextSlotDef, Tour, type TourCollectionValue, type TourMedia, type TourSlot, type TourSlotDef, type TourValue, type UrlSlot, type UrlSlotDef, type UseEditorResult, type ValueBinding, type ValueSlot, Video, type VideoCollectionValue, type VideoMedia, type VideoSlot, type VideoSlotDef, type VideoValue, type WebsiteFormat, type WebsitePage, type WriteFill, type WriteInput, a4Landscape, a4Portrait, address, bindItems, compute, date, deck16x9, defineTemplate, deserializeIslandProps, document, email, facebookPost, fact, fill, halfLetterFlyer, image, instagramPortrait, instagramSquare, instagramStory, islandId, letterLandscape, letterPortrait, linkedinPost, list, media, number, object, phone, poi, postcard6x4, postcard7x5, presets, holderProcess as process, row, section, select, serializeIslandProps, text, tour, url, useCaptureReady, useEditor, useIslandId, video, website, xPost };
61
+ export { ATTR_ISLAND_FRAMELESS, ATTR_ISLAND_ID, ATTR_ISLAND_KEY, ATTR_ISLAND_PROPS, ATTR_SECTION_INSTANCE_ID, ATTR_SLOT_FIELD, ATTR_SLOT_GROUP, ATTR_SLOT_ID, ATTR_SLOT_ITEM, ATTR_SLOT_TEXT_LEAF, ATTR_SLOT_UNSELECTABLE, ATTR_TR_ENHANCE, type AddressMembers, type AddressSlot, type AddressSlotDef, type AddressValue, type AuthorImage, type AutocropInput, type AutocropProcess, type BoundSlotValue, CONCRETE_VERSION, type CanvasInput, type CanvasesInput, type ComputeBinding, type Coordinates, type CropConfig, type CutoutProcess, type DateSlot, type DateSlotDef, type DefineTemplateInput, type DerivedFactRef, type DisplayEntryInput, type DisplayFill, type DocumentFormat, type DocumentMedia, type DocumentSlot, type DocumentSlotDef, type DocumentValue, EDITOR_BRIDGE_PROP, EDITOR_BRIDGE_PROTOCOL, EditorBridge, EditorBridgeSelection, EditorSelection, type ElementOf, type ElementRef, type EmailSlot, type EmailSlotDef, type FactNamespace, type FactsCommercialSpace, type FactsComparable, type FactsContact, type FactsUnit, type FieldBinding, type FieldBindings, type FillBinding, type FillVerb, type FindFill, type FindInput, type FormatIdentity, FrameShell, type HolderProcess, ISLAND_CAPTURE_HOLDS_GLOBAL, ISLAND_ELEMENT, type IconName, Image, type ImageFormat, type ImageMedia, type ImageSlot, type ImageSlotDef, type ImageValue, IslandComponent, IslandEditor, IslandEditorOptions, IslandMarker, type IslandMarkerProps, IslandModule, IslandProps, IslandPropsError, IslandServerFrame, type ItemBinding, type ItemIdentity, type ListFill, type ListItemSlot, type ListSlot, type ListSlotDef, type ListSourceInput, type Media, type MediaSlot, type MediaSlotDef, type MediaValue, type NumberSlot, type NumberSlotDef, type ObjectBinding, type ObjectFieldSlot, type ObjectLabelField, type ObjectLabelSource, type ObjectSlot, type ObjectSlotDef, type ObjectValue, type OutputClass, type PageComponent, type PhoneSlot, type PhoneSlotDef, type PhysicalLength, type PickFill, type PickInput, type PicturePlan, type PictureSourceSpec, type PlaybackConfig, type PoiPhoto, type PoiRow, type PoiSlot, type PoiSlotDef, type RegistryFactRef, type RenderedPage, type ResponsiveImage, type ResponsiveSource, type RowFill, type RowId, type RowRef, type RowSlot, type RowSlotDef, type RowSourceInput, Section, type SectionContractProps, type SectionOptions, type SectionPlacementProps, type SectionRenderBindings, type SectionValue, type SelectOptionInput, type SelectOptionObject, type SelectSlot, type SelectSlotDef, Slot, type SlotBinding, type SlotBindingMap, type SlotRef, type SlotSource, type SlotValue, type TableRow, type TableSource, type TemplateCanvas, type TemplatePage, type TemplatePreview, type TemplateScope, type TemplateValue, type TextSlot, type TextSlotDef, Tour, type TourMedia, type TourSlot, type TourSlotDef, type TourValue, type UrlSlot, type UrlSlotDef, type UseEditorResult, type ValueBinding, type ValueSlot, Video, type VideoMedia, type VideoSlot, type VideoSlotDef, type VideoValue, type WebsiteFormat, type WebsitePage, type WriteFill, type WriteInput, a4Landscape, a4Portrait, address, bindItems, compute, date, deck16x9, defineTemplate, deserializeIslandProps, document, email, facebookPost, fact, fill, halfLetterFlyer, image, instagramPortrait, instagramSquare, instagramStory, islandId, letterLandscape, letterPortrait, linkedinPost, list, media, number, object, phone, poi, postcard6x4, postcard7x5, presets, holderProcess as process, row, section, select, serializeIslandProps, text, tour, url, useCaptureReady, useEditor, useIslandId, video, website, xPost };
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "9.1.0";
2
+ var version = "11.0.0";
3
3
 
4
4
  //#endregion
5
5
  export { version };
@@ -1,13 +1,15 @@
1
1
  import { normalizeAddressValue } from "../../template-contracts/dist/address-value.js";
2
- import { DISPLAY_ENTRIES, tableKeyOf } from "../../template-contracts/dist/slot-catalog.js";
2
+ import { DISPLAY_ENTRIES } from "../../template-contracts/dist/slot-catalog.js";
3
3
  import { storedAsRefs } from "../../template-contracts/dist/registry-facts.js";
4
+ import { tableOf } from "../../template-contracts/dist/registry-shape.js";
4
5
  import { attributedRows, heldRowTableOf, holderOf, isHolderKind, listTableOf, rowTablesOf } from "../../template-contracts/dist/ref-locate.js";
6
+ import "../../template-contracts/dist/table-members.js";
5
7
  import { elementRowKeys, listSourceOf, memberSourceOf } from "../../template-contracts/dist/row-sources.js";
6
8
  import { objectFieldOf, objectFieldSlotId } from "../../template-contracts/dist/slot-overrides.js";
7
- import { projectTableRows, readFrom, tableRowIds } from "../../source-resolution/dist/index.js";
9
+ import { projectTableRows, readFactRef, tableRowIds } from "../../source-resolution/dist/index.js";
8
10
  import { callDerived, readsAnySlot } from "./derive-source.js";
9
11
  import { declaredDisplay } from "./display.js";
10
- import { computedRow, contentIdentities, decisionProducing, isGrammarList, nestedItemOf, objectElementFields, projectElements, projectNestedList, readNestedMember, readResolvedRowMember, rowIdentity, storedElements } from "./list-grammar.js";
12
+ import { computedRow, contentIdentities, decisionProducing, isGrammarList, nestedItemOf, objectElementFields, projectElements, projectNestedList, readResolvedRowMember, rowIdentity, storedElements } from "./list-grammar.js";
11
13
 
12
14
  //#region ../../internal/fill-bake/dist/bake-property-ref.js
13
15
  function boundFactKey(def) {
@@ -17,9 +19,9 @@ function boundFactKey(def) {
17
19
  return typeof src["key"] === "string" ? src["key"] : null;
18
20
  }
19
21
  function resolveDirectField(field, facts, fields, rowComputes) {
20
- const table = tableKeyOf(field);
22
+ const table = tableOf(field);
21
23
  if (table !== null) return storedAsRefs(projectTableRows(table, facts, fields, rowComputes));
22
- return storedAsRefs(readFrom(field, { facts }));
24
+ return storedAsRefs(readFactRef(facts, field) ?? null);
23
25
  }
24
26
  function derivedSource(def) {
25
27
  if (def.source === null || def.source === void 0 || typeof def.source !== "object") return null;
@@ -175,7 +177,7 @@ function bakeObjectFields(name, def, bakeRows, facts, ctx, scope) {
175
177
  if (nested !== void 0 && member !== null) {
176
178
  const row = rowInScopeAt(bakeRows, path)(member.slot);
177
179
  if (row === void 0) continue;
178
- out[key] = projectNestedList(readNestedMember(row, member.field, nested, facts), nested, facts);
180
+ out[key] = projectNestedList(readResolvedRowMember(row, member.field, facts), nested, facts);
179
181
  continue;
180
182
  }
181
183
  const baked = bakeValueSlot(path, field, facts, ctx, bakeRows);
@@ -2,7 +2,7 @@ import { normalizeAddressValue } from "../../template-contracts/dist/address-val
2
2
  import { DISPLAY_ENTRIES } from "../../template-contracts/dist/slot-catalog.js";
3
3
  import { heldRowTableOf, holderOf, mirrorRefOf, rowTablesOf, sectionSlotAt, slotTableOf } from "../../template-contracts/dist/ref-locate.js";
4
4
  import { memberSourceOf } from "../../template-contracts/dist/row-sources.js";
5
- import { isSlotOverridden, itemOverridesForSlot, objectFieldOf, objectFieldSlotId } from "../../template-contracts/dist/slot-overrides.js";
5
+ import { isOrderOverridden, isSlotOverridden, itemOverridesForSlot, objectFieldOf, objectFieldSlotId } from "../../template-contracts/dist/slot-overrides.js";
6
6
  import { declaredSlotRefs } from "./derive-source.js";
7
7
  import { declaredDisplay } from "./display.js";
8
8
  import { computedRow, isGrammarList, objectElementFields, projectElements, readResolvedRowMember } from "./list-grammar.js";
@@ -95,7 +95,8 @@ function applyComputeReads(input) {
95
95
  freshSource: items,
96
96
  overrides: itemOverridesForSlot(inst.slot_overrides, decl.key),
97
97
  generatedFields: [],
98
- membership: "source"
98
+ membership: "source",
99
+ ordered: isOrderOverridden(inst.slot_overrides, decl.key)
99
100
  });
100
101
  };
101
102
  const memberAt = (instanceId, rowPath, field) => {
@@ -131,7 +132,10 @@ function applyComputeReads(input) {
131
132
  return path === void 0 ? void 0 : memberAt(decl.instanceId, path, member)?.value;
132
133
  };
133
134
  const valueOf = (inst, decl) => {
134
- if (decl.kind === "reader") return memberAt(decl.instanceId, decl.rowPath, decl.field);
135
+ if (decl.kind === "reader") {
136
+ const member = memberAt(decl.instanceId, decl.rowPath, decl.field);
137
+ return member === void 0 ? void 0 : { value: mergeLinkedValue(storedRefValue(inst, decl.key), member.value) };
138
+ }
135
139
  if (decl.kind === "mirror") {
136
140
  const upstreamInstance = targetOf(decl, decl.ref);
137
141
  const upstream = readStored(upstreamInstance, decl.ref.slot);
@@ -144,7 +148,7 @@ function applyComputeReads(input) {
144
148
  });
145
149
  return { value: row.id };
146
150
  }
147
- if (decl.def.type !== "list") return { value: upstream ?? null };
151
+ if (decl.def.type !== "list") return { value: mergeLinkedValue(storedRefValue(inst, decl.key), upstream ?? null) };
148
152
  const items = projectElements(identifiedElements(Array.isArray(upstream) ? upstream : [], table), projectionOf(decl, table));
149
153
  return { value: listValue(inst, decl, table, items) };
150
154
  }
@@ -1,7 +1,7 @@
1
1
  import { projectTableRows, readFactRef, readRowMember } from "../../source-resolution/dist/index.js";
2
2
  import { callDerived, declaredReads, declaredSlotRefs, readsAnySlot } from "./derive-source.js";
3
3
  import { declaredDisplay } from "./display.js";
4
- import { decisionProducing, isGrammarList, objectElementFields, readResolvedRowMember, readsElementRows, rowIdentity } from "./list-grammar.js";
4
+ import { decisionProducing, isGrammarList, objectElementFields, readResolvedRowMember, rowIdentity } from "./list-grammar.js";
5
5
  import { bakeDisplayEntries, bakePropertyRefSlots, boundFactKey, derivedSource, identifiedElements, resolveDerivedHandle, resolveDirectField, rowComputesOf, topLevelRowReader } from "./bake-property-ref.js";
6
6
  import { mergeLinkedValue } from "./linked-merge.js";
7
7
  import { mergeSourcedItems } from "./item-merge.js";