@homepages/concrete 11.0.0 → 13.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 (322) hide show
  1. package/CHANGELOG.md +203 -0
  2. package/README.md +8 -10
  3. package/codemods/fixtures-are-data.mjs +7 -0
  4. package/codemods/fixtures-list-properties.mjs +6 -0
  5. package/codemods/manifest.json +17 -0
  6. package/codemods/steps/fixtures-list-properties.mjs +16 -0
  7. package/codemods/steps/fixtures-to-data.mjs +41 -0
  8. package/dist/artifact/playground/client/assets/archivo-latin-ext-wght-normal-C4zznr8T.woff2 +0 -0
  9. package/dist/artifact/playground/client/assets/archivo-latin-wght-normal-E0tuGl4L.woff2 +0 -0
  10. package/dist/artifact/playground/client/assets/archivo-vietnamese-wght-normal-XAtsl5Q_.woff2 +0 -0
  11. package/dist/artifact/playground/client/assets/index-Bmvcss4B.js +1338 -0
  12. package/dist/artifact/playground/client/assets/index-C01UCAWD.css +1 -0
  13. package/dist/artifact/playground/client/index.html +2 -2
  14. package/dist/artifact/playground/client/island-canvas-host.mjs +1 -1
  15. package/dist/artifact/playground/host.mjs +110 -60
  16. package/dist/base.css +19 -59
  17. package/dist/cli/build/icons.js +1 -1
  18. package/dist/cli/build/index.js +11 -10
  19. package/dist/cli/build/manifest.js +44 -0
  20. package/dist/cli/build/record.js +123 -0
  21. package/dist/cli/build/sections.js +28 -18
  22. package/dist/cli/build/source.js +1 -1
  23. package/dist/cli/build/static.js +8 -5
  24. package/dist/cli/build/template-build.js +614 -0
  25. package/dist/cli/check/analyze.js +18 -1
  26. package/dist/cli/check/load-workspace.js +2 -2
  27. package/dist/cli/check/portable-names.js +1 -1
  28. package/dist/cli/check/render/corpus.js +119 -0
  29. package/dist/cli/check/render/invariants.js +1 -0
  30. package/dist/cli/check/stages/bundles.js +15 -18
  31. package/dist/cli/check/stages/composition.js +8 -25
  32. package/dist/cli/check/stages/fixtures.js +14 -10
  33. package/dist/cli/check/stages/logic.js +7 -23
  34. package/dist/cli/check/stages/render.js +12 -14
  35. package/dist/cli/check/stages/sections.js +22 -66
  36. package/dist/cli/check/stages/stylesheet.js +4 -26
  37. package/dist/cli/check/stages/workspace.js +27 -22
  38. package/dist/cli/commands.js +51 -23
  39. package/dist/cli/currency/preamble.js +1 -1
  40. package/dist/cli/currency/resolve-latest.js +3 -2
  41. package/dist/cli/dev/capture-browser.js +26 -0
  42. package/dist/cli/dev/fixture-schema.js +441 -0
  43. package/dist/cli/dev/folder-files.js +244 -0
  44. package/dist/cli/dev/index.js +7 -3
  45. package/dist/cli/dev/playground-server.js +34 -0
  46. package/dist/cli/dev/section-ladders.js +76 -0
  47. package/dist/cli/dev/server.js +120 -304
  48. package/dist/cli/install/background.js +16 -0
  49. package/dist/cli/install/index.js +45 -0
  50. package/dist/cli/install/tools.js +27 -0
  51. package/dist/cli/media/derive.js +19 -13
  52. package/dist/cli/media/deriver-plugin.js +14 -3
  53. package/dist/cli/property/fixture-list.js +46 -0
  54. package/dist/cli/property/index.js +12 -9
  55. package/dist/cli/property/library.js +12 -10
  56. package/dist/cli/publish/artifact.js +90 -0
  57. package/dist/cli/publish/captures.js +61 -0
  58. package/dist/cli/publish/fixtures.js +17 -0
  59. package/dist/cli/publish/index.js +10 -18
  60. package/dist/cli/{build → publish}/playground.js +3 -3
  61. package/dist/cli/publish/report.js +15 -33
  62. package/dist/cli/upgrade/codemod.d.ts +14 -0
  63. package/dist/cli/upgrade/fixture-conversion.d.ts +11 -0
  64. package/dist/cli/upgrade/fixture-conversion.js +54 -0
  65. package/dist/cli/upgrade/fixture-modules.js +125 -0
  66. package/dist/cli/upgrade/fixtures-to-data.d.ts +40 -0
  67. package/dist/cli/upgrade/fixtures-to-data.js +498 -0
  68. package/dist/cli/upgrade/index.js +18 -2
  69. package/dist/cli/upgrade/legacy-fixtures.d.ts +34 -0
  70. package/dist/cli/upgrade/legacy-fixtures.js +22 -0
  71. package/dist/cli/upgrade/stage.js +1 -1
  72. package/dist/cli/workspace-fixtures.js +80 -0
  73. package/dist/cli.js +1 -0
  74. package/dist/css/compile.js +9 -3
  75. package/dist/fixtures/bundle-rule.js +16 -16
  76. package/dist/fixtures/media-plugin.js +12 -33
  77. package/dist/fixtures/synthesize-empties.js +3 -2
  78. package/dist/index.d.ts +7 -7
  79. package/dist/{playground-island-runtime.d.ts → island-runtime.d.ts} +1 -2
  80. package/dist/{playground-island-runtime.js → island-runtime.js} +1 -2
  81. package/dist/islands/client-module.js +1 -1
  82. package/dist/{cli/dev → islands}/tsconfig-paths.js +2 -14
  83. package/dist/islands/wrap.js +40 -0
  84. package/dist/node_modules/.pnpm/acorn@8.18.0/node_modules/acorn/dist/acorn.js +5119 -0
  85. package/dist/packages/external/concrete/package.js +1 -1
  86. package/dist/packages/internal/bundle-evaluation/dist/cache.js +36 -0
  87. package/dist/packages/internal/bundle-evaluation/dist/evaluate.js +174 -0
  88. package/dist/packages/internal/bundle-evaluation/dist/index.js +5 -0
  89. package/dist/packages/internal/bundle-evaluation/dist/section-code.js +10 -0
  90. package/dist/packages/internal/capture-settle/dist/index.js +2 -2
  91. package/dist/packages/internal/capture-settle/dist/settle.js +88 -13
  92. package/dist/packages/internal/code-fingerprint/dist/index.js +57 -0
  93. package/dist/packages/internal/content-doc-ops/dist/index.js +176 -0
  94. package/dist/packages/internal/content-doc-ops/dist/made-rows.js +15 -0
  95. package/dist/packages/internal/deliverable-reads/dist/bootstrap.js +81 -0
  96. package/dist/packages/internal/deliverable-reads/dist/display.js +21 -0
  97. package/dist/packages/internal/deliverable-reads/dist/format.js +15 -0
  98. package/dist/packages/internal/deliverable-reads/dist/index.js +7 -0
  99. package/dist/packages/internal/deliverable-reads/dist/pages.js +29 -0
  100. package/dist/packages/internal/deliverable-reads/dist/requirements.js +72 -0
  101. package/dist/{cli/capture → packages/internal/download-files/dist}/bundle.js +8 -4
  102. package/dist/packages/internal/download-files/dist/capture-origin.js +126 -0
  103. package/dist/packages/internal/download-files/dist/capture-routes.js +139 -0
  104. package/dist/packages/internal/download-files/dist/capture-shell.js +38 -0
  105. package/dist/packages/internal/download-files/dist/capture.js +74 -0
  106. package/dist/packages/internal/download-files/dist/egress-watch.js +38 -0
  107. package/dist/packages/internal/download-files/dist/files.js +7 -0
  108. package/dist/packages/internal/download-files/dist/finish.js +35 -0
  109. package/dist/packages/internal/download-files/dist/fleet.js +94 -0
  110. package/dist/packages/internal/download-files/dist/format.js +40 -0
  111. package/dist/packages/internal/download-files/dist/make.js +105 -0
  112. package/dist/packages/internal/download-files/dist/master-tally.js +32 -0
  113. package/dist/packages/internal/download-files/dist/names.js +24 -0
  114. package/dist/packages/internal/download-files/dist/pdf-boxes.js +33 -0
  115. package/dist/packages/internal/download-files/dist/pdf-image-placements.js +194 -0
  116. package/dist/packages/internal/download-files/dist/pdf-images.js +289 -0
  117. package/dist/packages/internal/file-store/dist/files.js +8 -0
  118. package/dist/packages/internal/file-store/dist/lru.js +40 -0
  119. package/dist/packages/internal/file-store/dist/refusal.js +12 -0
  120. package/dist/packages/internal/file-store/dist/trees.js +151 -0
  121. package/dist/packages/internal/fill-bake/dist/bake-property-ref.js +1 -1
  122. package/dist/packages/internal/fill-bake/dist/compute-reads.js +48 -22
  123. package/dist/packages/internal/fill-bake/dist/held-rows.js +2 -0
  124. package/dist/packages/internal/fill-bake/dist/index.js +6 -1
  125. package/dist/packages/internal/fill-bake/dist/item-merge.js +4 -3
  126. package/dist/packages/internal/fill-bake/dist/resolve-instance.js +9 -0
  127. package/dist/packages/internal/fill-bake/dist/resolve.js +3 -0
  128. package/dist/packages/internal/fill-bake/dist/round-trip.js +2 -0
  129. package/dist/packages/internal/fill-bake/dist/strip.js +6 -0
  130. package/dist/packages/internal/fill-vocabulary/dist/holder.js +1 -1
  131. package/dist/packages/internal/fill-vocabulary/dist/resolved-decision.js +1 -1
  132. package/dist/packages/internal/fill-vocabulary/dist/verbs.js +1 -1
  133. package/dist/packages/internal/format-geometry/dist/capture.js +3 -11
  134. package/dist/packages/internal/format-geometry/dist/format.d.ts +2 -8
  135. package/dist/packages/internal/format-geometry/dist/geometry.js +2 -13
  136. package/dist/packages/internal/island-runtime/dist/index.js +1 -10
  137. package/dist/packages/internal/island-runtime/dist/use-capture-ready.d.ts +5 -0
  138. package/dist/packages/internal/lead-fields/dist/ingest.js +72 -0
  139. package/dist/packages/internal/media-resolution/dist/video.js +6 -2
  140. package/dist/packages/internal/page-render/dist/addresses.js +57 -0
  141. package/dist/packages/internal/page-render/dist/index.js +6 -0
  142. package/dist/packages/internal/page-render/dist/kept.js +30 -0
  143. package/dist/packages/internal/page-render/dist/nav.js +42 -0
  144. package/dist/packages/internal/page-render/dist/render.js +152 -0
  145. package/dist/packages/internal/page-shell/dist/assemble.js +161 -0
  146. package/dist/packages/internal/page-shell/dist/escape.js +10 -0
  147. package/dist/packages/internal/page-shell/dist/frame.js +23 -0
  148. package/dist/packages/internal/page-shell/dist/index.js +26 -0
  149. package/dist/packages/internal/playground/dist/build-fingerprint.js +18 -0
  150. package/dist/packages/internal/playground/dist/fixture-conversions/list-names-properties.js +76 -0
  151. package/dist/packages/internal/playground/dist/fixture-formats.d.ts +37 -0
  152. package/dist/packages/internal/playground/dist/fixture-formats.js +20 -0
  153. package/dist/packages/internal/playground/dist/host/bootstrap.js +108 -0
  154. package/dist/packages/internal/playground/dist/host/built.js +202 -0
  155. package/dist/packages/internal/playground/dist/host/catalog-fixture.js +53 -0
  156. package/dist/packages/internal/playground/dist/host/download.js +34 -0
  157. package/dist/packages/internal/playground/dist/host/env.js +11 -0
  158. package/dist/packages/internal/playground/dist/host/everywhere-saves.js +353 -0
  159. package/dist/packages/internal/playground/dist/host/fixture-addresses.js +52 -0
  160. package/dist/packages/internal/playground/dist/host/fixture-documents.js +494 -0
  161. package/dist/packages/internal/playground/dist/host/fixture-operations.js +364 -0
  162. package/dist/packages/internal/playground/dist/host/fixture-units.js +93 -0
  163. package/dist/{fixtures → packages/internal/playground/dist/host}/image-dimensions.js +1 -1
  164. package/dist/packages/internal/playground/dist/host/leads.js +41 -0
  165. package/dist/packages/internal/playground/dist/host/media-saves.js +309 -0
  166. package/dist/{fixtures → packages/internal/playground/dist/host}/media-store.js +79 -26
  167. package/dist/packages/internal/playground/dist/host/overridable.js +9 -0
  168. package/dist/packages/internal/playground/dist/host/owned-saves.js +203 -0
  169. package/dist/{playground → packages/internal/playground/dist}/host/page-state.js +1 -1
  170. package/dist/packages/internal/playground/dist/host/program.js +54 -0
  171. package/dist/packages/internal/playground/dist/host/property-derive.js +216 -0
  172. package/dist/packages/internal/playground/dist/host/property-saves.js +74 -0
  173. package/dist/{fixtures → packages/internal/playground/dist/host}/property.js +88 -229
  174. package/dist/packages/internal/playground/dist/host/provenance.js +49 -0
  175. package/dist/packages/internal/playground/dist/host/resolve.js +553 -0
  176. package/dist/packages/internal/playground/dist/host/row-images.js +41 -0
  177. package/dist/{fixtures → packages/internal/playground/dist/host}/rows.js +1 -1
  178. package/dist/packages/internal/playground/dist/host/save.js +429 -0
  179. package/dist/packages/internal/playground/dist/host/serve.js +952 -0
  180. package/dist/packages/internal/playground/dist/host/site.js +79 -0
  181. package/dist/packages/internal/playground/dist/host/slots.js +202 -0
  182. package/dist/packages/internal/playground/dist/host/stated-content.js +93 -0
  183. package/dist/packages/internal/playground/dist/host/stored-fixtures.js +135 -0
  184. package/dist/packages/internal/playground/dist/host/violations.js +7 -0
  185. package/dist/packages/internal/playground/dist/jobs/lanes.js +24 -0
  186. package/dist/packages/internal/playground/dist/jobs/memory-queue.js +112 -0
  187. package/dist/packages/internal/playground/dist/jobs/probe.js +37 -0
  188. package/dist/packages/internal/playground/dist/jobs/queue.js +28 -0
  189. package/dist/packages/internal/playground/dist/jobs/runner.js +207 -0
  190. package/dist/packages/internal/playground/dist/layout.js +14 -0
  191. package/dist/packages/internal/playground/dist/platform.js +33 -0
  192. package/dist/packages/internal/playground/dist/server/changes.js +57 -0
  193. package/dist/packages/internal/playground/dist/server/crop.js +47 -0
  194. package/dist/packages/internal/playground/dist/server/derived-files.js +88 -0
  195. package/dist/packages/internal/playground/dist/server/download.js +158 -0
  196. package/dist/{cli/dev → packages/internal/playground/dist/server}/http.js +4 -12
  197. package/dist/packages/internal/playground/dist/server/jobs.js +29 -0
  198. package/dist/{cli/dev → packages/internal/playground/dist/server}/listen.js +4 -11
  199. package/dist/packages/internal/playground/dist/server/playground-server.js +424 -0
  200. package/dist/{cli/dev → packages/internal/playground/dist/server}/request-error.js +1 -1
  201. package/dist/packages/internal/playground/dist/server/size-ladders.js +170 -0
  202. package/dist/packages/internal/playground/dist/server/verification.js +75 -0
  203. package/dist/packages/internal/playground/dist/server/verify-build.js +139 -0
  204. package/dist/packages/internal/playground/dist/wire.js +78 -0
  205. package/dist/packages/internal/property-facts/dist/registry-facts.js +1 -1
  206. package/dist/packages/internal/section-contracts/dist/fill-verb-contract.js +1 -1
  207. package/dist/packages/internal/section-contracts/dist/reads-acyclic-contract.js +1 -1
  208. package/dist/packages/internal/section-contracts/dist/row-fill-contract.js +1 -1
  209. package/dist/packages/internal/site-files/dist/head.js +59 -0
  210. package/dist/packages/internal/site-files/dist/index.js +4 -0
  211. package/dist/packages/internal/site-files/dist/site.js +211 -0
  212. package/dist/packages/internal/static-assets-binding/dist/index.js +32 -0
  213. package/dist/packages/internal/static-assets-binding/dist/section-asset-url.js +38 -5
  214. package/dist/packages/internal/template-artifact/dist/asset-mime.js +8 -1
  215. package/dist/packages/internal/template-artifact/dist/build.js +148 -0
  216. package/dist/packages/internal/template-artifact/dist/composition.js +62 -0
  217. package/dist/packages/internal/template-artifact/dist/index.js +2 -2
  218. package/dist/packages/internal/template-artifact/dist/layout.js +48 -12
  219. package/dist/packages/internal/template-artifact/dist/manifest.js +3 -10
  220. package/dist/packages/internal/template-artifact/dist/verify.js +51 -31
  221. package/dist/packages/internal/template-contracts/dist/address-value.js +6 -1
  222. package/dist/packages/internal/template-contracts/dist/content-categories.js +10 -1
  223. package/dist/packages/internal/template-contracts/dist/fact-compute.d.ts +1 -1
  224. package/dist/packages/internal/template-contracts/dist/fact-keys.d.ts +1 -1
  225. package/dist/packages/internal/template-contracts/dist/fact-registry.d.ts +3 -3
  226. package/dist/packages/internal/template-contracts/dist/fact-registry.js +59 -32
  227. package/dist/packages/internal/template-contracts/dist/fill-spec.js +14 -1
  228. package/dist/packages/internal/template-contracts/dist/list.d.ts +3 -3
  229. package/dist/packages/internal/template-contracts/dist/media-candidates.js +67 -2
  230. package/dist/packages/internal/template-contracts/dist/media-offer.js +180 -0
  231. package/dist/packages/internal/template-contracts/dist/object.d.ts +2 -2
  232. package/dist/packages/internal/template-contracts/dist/primitive-descriptors.js +9 -2
  233. package/dist/packages/internal/template-contracts/dist/read-graph.js +36 -2
  234. package/dist/packages/internal/template-contracts/dist/ref-locate.js +16 -1
  235. package/dist/packages/internal/template-contracts/dist/registry-facts.d.ts +9 -10
  236. package/dist/packages/internal/template-contracts/dist/registry-facts.js +12 -1
  237. package/dist/packages/internal/template-contracts/dist/registry-graph.js +112 -0
  238. package/dist/packages/internal/template-contracts/dist/registry-shape.js +15 -2
  239. package/dist/packages/internal/template-contracts/dist/require-graph.js +300 -0
  240. package/dist/packages/internal/template-contracts/dist/row-ref.d.ts +3 -3
  241. package/dist/packages/internal/template-contracts/dist/row.d.ts +3 -3
  242. package/dist/packages/internal/template-contracts/dist/runtime-values.d.ts +1 -1
  243. package/dist/{schema → packages/internal/template-contracts/dist}/section-nav.d.ts +1 -1
  244. package/dist/packages/internal/template-contracts/dist/slot-builders.d.ts +4 -4
  245. package/dist/packages/internal/template-contracts/dist/slot-catalog.d.ts +3 -1
  246. package/dist/packages/internal/template-contracts/dist/slot-catalog.js +24 -1
  247. package/dist/packages/internal/template-contracts/dist/slot-overrides.js +26 -1
  248. package/dist/packages/internal/template-contracts/dist/slot-ref.d.ts +1 -1
  249. package/dist/packages/internal/template-contracts/dist/slot-types.js +1 -1
  250. package/dist/packages/internal/template-contracts/dist/slot-value.d.ts +1 -1
  251. package/dist/packages/internal/template-contracts/dist/table-members.js +7 -2
  252. package/dist/packages/internal/template-contracts/dist/video-value.d.ts +1 -1
  253. package/dist/packages/internal/upload-formats/dist/heic.js +35 -0
  254. package/dist/packages/internal/upload-formats/dist/index.js +80 -0
  255. package/dist/packages/internal/upload-formats/dist/magic-bytes.js +293 -0
  256. package/dist/platform/paths.js +1 -0
  257. package/dist/platform/process.js +49 -1
  258. package/dist/primitives/FrameShell.d.ts +5 -2
  259. package/dist/primitives/FrameShell.js +2 -1
  260. package/dist/rules/registry.js +28 -4
  261. package/dist/schema/fact.d.ts +2 -2
  262. package/dist/schema/facts-view.d.ts +1 -1
  263. package/dist/schema/format.d.ts +0 -1
  264. package/dist/schema/format.js +1 -2
  265. package/dist/schema/manifest.js +18 -24
  266. package/dist/schema/section-props.d.ts +1 -1
  267. package/dist/schema/section-schema.d.ts +1 -1
  268. package/dist/schema/section-schema.js +1 -0
  269. package/dist/section/declare.d.ts +1 -1
  270. package/dist/section/discovery.js +6 -2
  271. package/dist/section/publish-shape.js +38 -0
  272. package/dist/section/section.d.ts +1 -1
  273. package/dist/site-analytics.js +6 -1
  274. package/dist/site-runtime/window-height.js +19 -0
  275. package/dist/template/define-template.d.ts +25 -4
  276. package/dist/template/define-template.js +3 -0
  277. package/dist/template/logic-shim.d.ts +1 -1
  278. package/dist/template/materialize.js +3 -1
  279. package/dist/template/running-copy.js +0 -1
  280. package/dist/template/section-reads.js +1 -1
  281. package/guide/reference/cli/INDEX.md +6 -5
  282. package/guide/reference/cli/build.md +10 -8
  283. package/guide/reference/cli/check.md +4 -2
  284. package/guide/reference/cli/dev.md +6 -2
  285. package/guide/reference/cli/install.md +41 -0
  286. package/guide/reference/cli/property-add.md +5 -4
  287. package/guide/reference/cli/property-list.md +2 -2
  288. package/guide/reference/cli/publish.md +5 -5
  289. package/guide/reference/cli/upgrade.md +1 -1
  290. package/guide/reference/rules/INDEX.md +9 -5
  291. package/package.json +14 -30
  292. package/dist/artifact/playground/client/assets/index-ByeGGedv.js +0 -1259
  293. package/dist/artifact/playground/client/assets/index-CxWPYOH2.css +0 -1
  294. package/dist/cli/build/artifact.js +0 -220
  295. package/dist/cli/build/captures.js +0 -48
  296. package/dist/cli/build/fixtures.js +0 -92
  297. package/dist/cli/capture/capture-browser.js +0 -37
  298. package/dist/cli/capture/capture.js +0 -113
  299. package/dist/cli/check/render/inputs.js +0 -60
  300. package/dist/cli/check/render/nav.js +0 -31
  301. package/dist/cli/dev/crop.js +0 -20
  302. package/dist/cli/dev/fixture-ladders.js +0 -96
  303. package/dist/cli/dev/hmr.js +0 -26
  304. package/dist/cli/dev/islands.js +0 -234
  305. package/dist/cli/dev/load-template.js +0 -52
  306. package/dist/cli/dev/vite.js +0 -114
  307. package/dist/cli/dev/workspace-reader.js +0 -248
  308. package/dist/cli/publish/freshness.js +0 -64
  309. package/dist/fixtures/brand.d.ts +0 -4
  310. package/dist/fixtures/brand.js +0 -8
  311. package/dist/fixtures/load.js +0 -159
  312. package/dist/fixtures/resolve.js +0 -392
  313. package/dist/fixtures.d.ts +0 -429
  314. package/dist/fixtures.js +0 -23
  315. package/dist/packages/internal/canvas-core/dist/island-host.js +0 -62
  316. package/dist/packages/internal/canvas-core/dist/island-shields.js +0 -30
  317. package/dist/playground/canvas-island-host.d.ts +0 -11
  318. package/dist/playground/canvas-island-host.js +0 -29
  319. package/dist/playground/canvas-markers.js +0 -14
  320. package/dist/playground/host/paths.js +0 -8
  321. package/dist/playground/layout.js +0 -17
  322. package/dist/playground/wire.js +0 -28
package/dist/base.css CHANGED
@@ -18,8 +18,6 @@
18
18
  * - The section box model (.concrete-section, emitted by the <Section> primitive)
19
19
  * - The frame shell's static half (.concrete-frame, emitted by the <FrameShell> primitive)
20
20
  * and the window witness that holds every host to the geometry it owes that shell
21
- * - A folded print's sheet (.concrete-sheet): the panels' frames side by side, the
22
- * window contract moved up to the sheet
23
21
  * - The <Image>/<Video>/<Tour> box's geometry default (.concrete-image-block), layered so
24
22
  * an author's own width utility beats it
25
23
  * - The <Image>/<Video> frame's placeholder fill (.concrete-image-frame)
@@ -95,7 +93,7 @@
95
93
  *
96
94
  * `.concrete-frame` spells this file's namespace but is not this file's to name: it
97
95
  * is FRAME_ROOT_CLASS, derived once in `@homepages/format-geometry` and stamped by
98
- * every capture surface — the published page shell, the render worker, the editing
96
+ * every capture surface — the published page shell, the download worker, the editing
99
97
  * canvas and <FrameShell>. This file only styles it, so a change to the spelling
100
98
  * belongs at that derivation point and nowhere else. The private custom properties
101
99
  * and counters below ARE concrete's.
@@ -123,32 +121,7 @@
123
121
  * extended symmetrically by the bleed. */
124
122
  --concrete-frame-window-w: calc(var(--frame-w) + 2 * var(--frame-bleed));
125
123
  --concrete-frame-window-h: calc(var(--frame-h) + 2 * var(--frame-bleed));
126
- }
127
-
128
- /* A folded print's sheet: `panels` consecutive page frames side by side on one
129
- * printed sheet side. Like `.concrete-frame`, the class is derived in
130
- * `@homepages/format-geometry` (SHEET_ROOT_CLASS) and only styled here; only a
131
- * print document's assembler emits it, so the canvas and every lone frame never
132
- * see one.
133
- *
134
- * The sheet takes over the frame's window contract: in a print document the
135
- * sheet is the window and the paper, so it fills the window, clips at its edge,
136
- * and the witness measures the window against the sheet's bleed box — the
137
- * panels' trim widths side by side, extended by the bleed on the sheet's outer
138
- * edges only. */
139
- .concrete-sheet {
140
- position: relative;
141
- width: 100vw;
142
- height: 100vh;
143
- overflow: clip;
144
- display: flex;
145
-
146
- --concrete-frame-window-w: calc(var(--sheet-w) + 2 * var(--frame-bleed));
147
- --concrete-frame-window-h: calc(var(--sheet-h) + 2 * var(--frame-bleed));
148
- }
149
124
 
150
- .concrete-frame,
151
- .concrete-sheet {
152
125
  /* 1 when the real window misses the owed one on either axis, 0 when it does not.
153
126
  * max(d, -d) is an absolute difference and `/ 1px` makes it a plain number. The
154
127
  * -1 is the tolerance: a browser window is whole CSS px while a physical format's
@@ -177,10 +150,9 @@
177
150
  * Silent when the two agree: fully transparent, absolutely positioned (never a flex
178
151
  * item in the rigid stack), so a correctly windowed document renders byte-identical
179
152
  * pixels and identical layout to one with no witness at all. On a mismatch it covers
180
- * the artifact and names both geometries, because a frame measured against the wrong
153
+ * the page and names both geometries, because a frame measured against the wrong
181
154
  * box is not a preview of anything and must not read as one. */
182
- .concrete-frame::after,
183
- .concrete-sheet::after {
155
+ .concrete-frame::after {
184
156
  counter-reset:
185
157
  concrete-frame-owed-w calc(var(--concrete-frame-window-w) / 1px)
186
158
  concrete-frame-owed-h calc(var(--concrete-frame-window-h) / 1px)
@@ -212,33 +184,12 @@
212
184
  flex-shrink: 0;
213
185
  }
214
186
 
215
- /* A page frame inside a sheet is a panel. It is sized from its own tokens — its
216
- * full bleed box, never the window, which is the sheet's — and laid at panel
217
- * pitch: each frame overlaps the next by both bleeds, so panel N's trim starts
218
- * N trim widths in. Nothing crosses a fold: every panel paints to the bleed on
219
- * all four sides, and the clip keeps only its trim plus its OUTER bleed — the
220
- * first panel its left, the last its right, every panel its top and bottom.
221
- * The window witness is the sheet's alone; a panel measuring 100vw against its
222
- * own box would always cry mismatch. */
223
- .concrete-sheet > .concrete-frame {
224
- flex-shrink: 0;
225
- width: calc(var(--frame-w) + 2 * var(--frame-bleed));
226
- height: calc(var(--frame-h) + 2 * var(--frame-bleed));
227
- margin-right: calc(-2 * var(--frame-bleed));
228
- clip-path: inset(0 var(--frame-bleed));
229
- }
230
-
231
- .concrete-sheet > .concrete-frame:first-child {
232
- clip-path: inset(0 var(--frame-bleed) 0 0);
233
- }
234
-
235
- .concrete-sheet > .concrete-frame:last-child {
236
- margin-right: 0;
237
- clip-path: inset(0 0 0 var(--frame-bleed));
238
- }
239
-
240
- .concrete-sheet > .concrete-frame::after {
241
- content: none;
187
+ /* A row page (`direction: "row"`, stamped `data-direction` by every host) lays its
188
+ * sections side by side: a folded piece's printed side, one section per panel. The
189
+ * rule above still holds on the main axis, so an over-wide row overflows measurably;
190
+ * each section sets its own width, and the cross axis stretches it the frame tall. */
191
+ .concrete-frame[data-direction="row"] {
192
+ flex-direction: row;
242
193
  }
243
194
 
244
195
  /* The geometry DEFAULT of every <Image>/<Video>/<Tour> box — the unframed element
@@ -296,6 +247,15 @@
296
247
  * token as the screen its card stands for — a constant, so one pass settles it
297
248
  * — and a box sized from the window therefore writes ONE thing and is honest on
298
249
  * both surfaces. Spell it as a floor (`min-height`), never a fixed height, so
299
- * content taller than a screen still grows the box instead of overflowing it. */
250
+ * content taller than a screen still grows the box instead of overflowing it.
251
+ *
252
+ * On a published page the site runtime (site-runtime/window-height.ts) pins this
253
+ * to the height measured at load, in px, and measures again only when the width
254
+ * changes. `100svh` is meant to hold still while a browser's toolbars collapse,
255
+ * but an embedder that never declares its toolbars to the engine (Chrome on iOS,
256
+ * an in-app browser) lets it follow them like `100dvh`, and every box sized from
257
+ * it then resizes under the visitor's finger mid-scroll, jumping all content
258
+ * below. The declaration here is what a page shows before that script runs and
259
+ * what a no-script reader keeps. */
300
260
  --concrete-window-h: 100svh;
301
261
  }
@@ -29,7 +29,7 @@ async function loadSharp() {
29
29
  try {
30
30
  return (await import("sharp")).default;
31
31
  } catch {
32
- throw new Error("The template's site icons cannot be derived: `sharp` is not installed. It is an optional dependency of @homepages/concrete; reinstall so its native binary lands, then build again.");
32
+ throw new Error("The template's site icons cannot be derived: `sharp` did not load. It is a dependency of @homepages/concrete; reinstall so its native binary lands, then build again.");
33
33
  }
34
34
  }
35
35
  async function deriveSiteIcons(path) {
@@ -1,7 +1,7 @@
1
+ import { qualify } from "../../rules/registry.js";
1
2
  import { DEFAULT_BUILD_DIR, parseSpec, stringFlag } from "../commands.js";
2
3
  import { findWorkspaceRoot } from "../workspace.js";
3
- import { formatHuman } from "../check/report.js";
4
- import { buildArtifact } from "./artifact.js";
4
+ import { buildTemplate } from "./template-build.js";
5
5
  import { resolve } from "node:path";
6
6
  import { parseArgs } from "node:util";
7
7
 
@@ -13,9 +13,9 @@ const runBuild = async (argv, io) => {
13
13
  });
14
14
  const root = await findWorkspaceRoot(io.cwd);
15
15
  const out = resolve(root, stringFlag(values, "out") ?? ".concrete/build");
16
- let outcome;
16
+ let build;
17
17
  try {
18
- outcome = await buildArtifact({
18
+ build = await buildTemplate({
19
19
  root,
20
20
  out
21
21
  });
@@ -23,14 +23,15 @@ const runBuild = async (argv, io) => {
23
23
  io.stderr.write(`concrete build: ${cause instanceof Error ? cause.message : String(cause)}\n`);
24
24
  return 1;
25
25
  }
26
- if (!outcome.ok) {
27
- io.stderr.write(formatHuman(outcome.report));
28
- io.stderr.write("concrete build: check is not green, so no artifact was written.\n");
26
+ if (build.output === null) {
27
+ for (const failure of build.failures) io.stderr.write(`${failure.file}${failure.line === void 0 ? "" : `:${String(failure.line)}`} ${qualify(failure.rule)}\n ${failure.message.replace(/\n/g, "\n ")}\n`);
28
+ io.stderr.write("concrete build: the template did not build, so nothing was written.\n");
29
29
  return 1;
30
30
  }
31
- const { manifest } = outcome;
32
- const count = manifest.sections.length;
33
- io.stdout.write(`concrete build: wrote ${out} — template ${manifest.key} ${manifest.template.content_hash.slice(0, 12)}, ${String(count)} ${count === 1 ? "section" : "sections"}.\n`);
31
+ const { record } = build.output;
32
+ const count = record.sections.length;
33
+ const rebuilt = record.sections.filter((section) => section.rebuilt).length;
34
+ io.stdout.write(`concrete build: wrote ${out} — template ${record.key} ${record.template.content_hash.slice(0, 12)}, ${String(count)} ${count === 1 ? "section" : "sections"}, ${String(rebuilt)} built and ${String(count - rebuilt)} unchanged.\n`);
34
35
  return 0;
35
36
  };
36
37
 
@@ -0,0 +1,44 @@
1
+ import { orgsForScope } from "../../template/define-template.js";
2
+ import { CONCRETE_CLI_VERSION } from "../version.js";
3
+ import { resolveReference } from "../../packages/internal/playground/dist/host/fixture-documents.js";
4
+ import { sourceDigest } from "../../packages/internal/template-artifact/dist/hash.js";
5
+ import { ArtifactManifest } from "../../packages/internal/template-artifact/dist/manifest.js";
6
+ import "../../packages/internal/template-artifact/dist/index.js";
7
+ import { TEMPLATE_FILE } from "../check/load-workspace.js";
8
+ import { collectSourceFiles } from "./source.js";
9
+
10
+ //#region src/cli/build/manifest.ts
11
+ function scopeOf(scope) {
12
+ return scope === "global" ? "global" : { orgs: [...orgsForScope(scope)] };
13
+ }
14
+ function fixtureListOf(template) {
15
+ if (template.fixtures === void 0) return null;
16
+ const list = resolveReference(TEMPLATE_FILE, template.fixtures);
17
+ return "path" in list ? list.path : null;
18
+ }
19
+ async function buildManifest(input) {
20
+ const { template } = input;
21
+ const fields = {
22
+ artifact_schema: 5,
23
+ framework_version: CONCRETE_CLI_VERSION,
24
+ key: template.key,
25
+ display_name: template.name,
26
+ deliverable_type: template.output,
27
+ scope: scopeOf(template.scope),
28
+ source_digest: sourceDigest(await collectSourceFiles(input.root, [input.out])),
29
+ template: { content_hash: input.templateHash },
30
+ sections: [...input.sections].sort((a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0).map((section) => ({
31
+ key: section.key,
32
+ display_name: section.label,
33
+ content_hash: section.contentHash
34
+ }))
35
+ };
36
+ const list = fixtureListOf(template);
37
+ return list === null ? fields : ArtifactManifest.parse({
38
+ ...fields,
39
+ fixture_list: list
40
+ });
41
+ }
42
+
43
+ //#endregion
44
+ export { buildManifest, fixtureListOf };
@@ -0,0 +1,123 @@
1
+ import { RUNNING_FROM_SOURCE, packageRoot } from "../../platform/paths.js";
2
+ import { CONCRETE_CLI_VERSION } from "../version.js";
3
+ import { basename, dirname, join } from "node:path";
4
+ import { readFile, readdir, stat } from "node:fs/promises";
5
+ import { createHash } from "node:crypto";
6
+ import { z } from "zod";
7
+
8
+ //#region src/cli/build/record.ts
9
+ const LEGACY_BUILD_RECORD_FILE = "build.json";
10
+ function buildRecordPath(out) {
11
+ return join(dirname(out), `${basename(out)}.json`);
12
+ }
13
+ const BUILD_RECORD_SCHEMA = 2;
14
+ const IslandRecord = z.object({
15
+ island_key: z.string(),
16
+ filename: z.string(),
17
+ content_hash: z.string(),
18
+ file: z.string(),
19
+ frameless: z.boolean()
20
+ });
21
+ const SourceRecord = z.object({
22
+ file: z.string(),
23
+ bytes: z.number(),
24
+ largestRungBytes: z.number().optional()
25
+ });
26
+ const SectionRecord = z.object({
27
+ key: z.string(),
28
+ content_hash: z.string(),
29
+ rebuilt: z.boolean(),
30
+ identity: z.string(),
31
+ inputs: z.record(z.string(), z.string()),
32
+ islands: z.array(IslandRecord),
33
+ sources: z.array(SourceRecord),
34
+ masters: z.record(z.string(), z.string()),
35
+ passthrough: z.array(z.string()),
36
+ pending: z.array(z.string()),
37
+ files: z.array(z.string())
38
+ });
39
+ const BuildRecord = z.object({
40
+ build_schema: z.literal(2),
41
+ framework_version: z.string(),
42
+ key: z.string(),
43
+ template: z.object({ content_hash: z.string() }),
44
+ sections: z.array(SectionRecord),
45
+ files: z.record(z.string(), z.string())
46
+ });
47
+ async function readBuildRecord(out) {
48
+ let text;
49
+ try {
50
+ text = await readFile(buildRecordPath(out), "utf8");
51
+ } catch (cause) {
52
+ if (cause.code === "ENOENT") return null;
53
+ throw cause;
54
+ }
55
+ try {
56
+ const parsed = BuildRecord.safeParse(JSON.parse(text));
57
+ return parsed.success ? parsed.data : null;
58
+ } catch {
59
+ return null;
60
+ }
61
+ }
62
+ async function stampOf(file) {
63
+ try {
64
+ const stats = await stat(file, { bigint: true });
65
+ return `${String(stats.size)}:${String(stats.mtimeNs)}`;
66
+ } catch (cause) {
67
+ if (cause.code === "ENOENT") return "absent";
68
+ throw cause;
69
+ }
70
+ }
71
+ async function stampInputs(files) {
72
+ const stamps = await Promise.all(files.map(async (file) => [file, await stampOf(file)]));
73
+ return Object.fromEntries(stamps);
74
+ }
75
+ async function inputsUnchanged(inputs) {
76
+ return (await Promise.all(Object.entries(inputs).map(async ([file, recorded]) => await stampOf(file) === recorded))).every(Boolean);
77
+ }
78
+ async function outputsPresent(out, files) {
79
+ return (await Promise.all(files.map(async (path) => await stampOf(join(out, ...path.split("/"))) !== "absent"))).every(Boolean);
80
+ }
81
+ let framework;
82
+ function frameworkFingerprint() {
83
+ framework ??= (async () => {
84
+ const hash = createHash("sha256").update(CONCRETE_CLI_VERSION);
85
+ await stampTree(join(packageRoot(), RUNNING_FROM_SOURCE ? "src" : "dist"), hash);
86
+ return hash.digest("hex");
87
+ })();
88
+ return framework;
89
+ }
90
+ async function stampTree(dir, hash) {
91
+ const visit = async (at) => {
92
+ let entries;
93
+ try {
94
+ entries = await readdir(at, { withFileTypes: true });
95
+ } catch (cause) {
96
+ if (cause.code === "ENOENT") return;
97
+ throw cause;
98
+ }
99
+ entries.sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0);
100
+ for (const entry of entries) {
101
+ if (entry.name === ".concrete" || entry.name === "node_modules") continue;
102
+ const path = join(at, entry.name);
103
+ if (entry.isDirectory()) await visit(path);
104
+ else if (entry.isFile()) hash.update(`${path}\0${await stampOf(path)}\n`);
105
+ }
106
+ };
107
+ await visit(dir);
108
+ }
109
+ function sectionIdentity(parts) {
110
+ return createHash("sha256").update(JSON.stringify([
111
+ parts.framework,
112
+ parts.key,
113
+ parts.module,
114
+ parts.exportName,
115
+ parts.minRungWidth ?? null
116
+ ])).digest("hex");
117
+ }
118
+ function sha256Hex(bytes) {
119
+ return createHash("sha256").update(bytes).digest("hex");
120
+ }
121
+
122
+ //#endregion
123
+ export { BuildRecord, LEGACY_BUILD_RECORD_FILE, buildRecordPath, frameworkFingerprint, inputsUnchanged, outputsPresent, readBuildRecord, sectionIdentity, sha256Hex, stampInputs, stampTree };
@@ -1,20 +1,15 @@
1
1
  import { isWorkspaceFile, toPosix, workspacePath } from "../../platform/paths.js";
2
- import { declaresNoServerFrame, stubClientModule, wrapClientModule } from "../dev/islands.js";
2
+ import { bundledFrameworkPlugin, emittedAssets, javascriptOutput, runPass, workspaceLoaders } from "./esbuild.js";
3
+ import { ISLAND_REACT_EXTERNALS } from "../../packages/internal/static-assets-binding/dist/index.js";
4
+ import { declaresNoServerFrame, stubClientModule, wrapClientModule } from "../../islands/wrap.js";
3
5
  import { mediaCacheDir } from "../media/cache.js";
4
6
  import { createMediaDeriver } from "../media/deriver-plugin.js";
5
- import { bundledFrameworkPlugin, emittedAssets, javascriptOutput, runPass, workspaceLoaders } from "./esbuild.js";
6
7
  import nodePath, { basename, dirname, extname, join } from "node:path";
7
8
  import { readFile } from "node:fs/promises";
8
- import { createHash } from "node:crypto";
9
9
  import { build } from "esbuild";
10
+ import { createHash } from "node:crypto";
10
11
 
11
12
  //#region src/cli/build/sections.ts
12
- const ISLAND_REACT_EXTERNALS = [
13
- "react",
14
- "react-dom",
15
- "react-dom/client",
16
- "react/jsx-runtime"
17
- ];
18
13
  const MARKER_SPECIFIER = "@homepages/concrete";
19
14
  const COMPONENT_EXT = /\.[jt]sx$/;
20
15
  function sanitizeKey(key) {
@@ -132,7 +127,13 @@ async function buildSection(input) {
132
127
  const sources = /* @__PURE__ */ new Map();
133
128
  const masters = /* @__PURE__ */ new Map();
134
129
  const passthrough = /* @__PURE__ */ new Set();
130
+ const pending = /* @__PURE__ */ new Set();
131
+ const inputs = /* @__PURE__ */ new Set();
135
132
  const collect = (deriver, outputFiles, metafile) => {
133
+ for (const input of Object.keys(metafile.inputs)) {
134
+ const file = inputFile(root, input);
135
+ if (file !== null) inputs.add(file);
136
+ }
136
137
  const emitted = emittedAssets(outputFiles);
137
138
  const sourceByEmitted = sourcesOf(metafile);
138
139
  for (const asset of [...emitted, ...derivedAssets(deriver)]) if (!assets.has(asset.filename)) assets.set(asset.filename, asset);
@@ -153,19 +154,19 @@ async function buildSection(input) {
153
154
  }
154
155
  for (const [masterKey, filename] of deriver.masters) masters.set(masterKey, filename);
155
156
  for (const path of deriver.passthrough) passthrough.add(path);
157
+ for (const path of deriver.pending) pending.add(path);
156
158
  };
157
- const rendererDeriver = createMediaDeriver({
159
+ const deriverOptions = {
158
160
  cacheDir,
159
- minRungWidth
160
- });
161
+ minRungWidth,
162
+ ...input.pending === void 0 ? {} : { pending: input.pending }
163
+ };
164
+ const rendererDeriver = createMediaDeriver(deriverOptions);
161
165
  const rendered = await rendererPass(input, rendererDeriver, found, true);
162
166
  collect(rendererDeriver, rendered.outputFiles, rendered.metafile);
163
167
  const islands = [];
164
168
  for (const [islandKey, file] of [...found].sort(([a], [b]) => a < b ? -1 : 1)) {
165
- const deriver = createMediaDeriver({
166
- cacheDir,
167
- minRungWidth
168
- });
169
+ const deriver = createMediaDeriver(deriverOptions);
169
170
  const bytes = await runPass(`The island chunk ${islandKey}`, async () => {
170
171
  const result = await build({
171
172
  entryPoints: [file],
@@ -207,9 +208,18 @@ async function buildSection(input) {
207
208
  assets: [...assets.values()],
208
209
  sources: [...sources.values()].sort((a, b) => a.file < b.file ? -1 : a.file > b.file ? 1 : 0),
209
210
  masters,
210
- passthrough
211
+ passthrough,
212
+ pending,
213
+ inputs: [...inputs].sort()
211
214
  };
212
215
  }
216
+ const NAMESPACED = /^([a-z][a-z-]+):(.+)$/;
217
+ function inputFile(root, input) {
218
+ if (input === "<stdin>") return null;
219
+ const namespaced = NAMESPACED.exec(input);
220
+ const path = namespaced === null ? input : namespaced[2];
221
+ return nodePath.isAbsolute(path) ? path : join(root, path);
222
+ }
213
223
  async function buildFramedRenderer(input) {
214
224
  return (await rendererPass(input, createMediaDeriver({
215
225
  cacheDir: mediaCacheDir(input.root),
@@ -221,4 +231,4 @@ function framedRendererPath(root, key, bytes) {
221
231
  }
222
232
 
223
233
  //#endregion
224
- export { ISLAND_REACT_EXTERNALS, buildFramedRenderer, buildSection, framedRendererPath, isIslandSource, sanitizeKey };
234
+ export { buildFramedRenderer, buildSection, framedRendererPath, isIslandSource, sanitizeKey };
@@ -1,8 +1,8 @@
1
1
  import { toPosix, workspacePath } from "../../platform/paths.js";
2
2
  import { execGit } from "../../platform/process.js";
3
- import { NON_SOURCE_DIRS } from "../workspace.js";
4
3
  import { byCodeUnit } from "../../platform/order.js";
5
4
  import { listDir } from "../../platform/fs.js";
5
+ import { NON_SOURCE_DIRS } from "../workspace.js";
6
6
  import { join, relative } from "node:path";
7
7
  import { readFile } from "node:fs/promises";
8
8
 
@@ -1,15 +1,15 @@
1
1
  import { externalSpecifier, packageFile } from "../../platform/paths.js";
2
+ import { javascriptOutput, runPass } from "./esbuild.js";
3
+ import { ISLAND_REACT_EXTERNALS } from "../../packages/internal/static-assets-binding/dist/index.js";
4
+ import { sanitizeKey } from "./sections.js";
2
5
  import { CAPTURE_ISLANDS_READY_GLOBAL } from "../../packages/internal/capture-settle/dist/settle.js";
3
6
  import "../../packages/internal/capture-settle/dist/index.js";
4
- import { islandRuntimeFile } from "../dev/islands.js";
5
- import { javascriptOutput, runPass } from "./esbuild.js";
6
- import { ISLAND_REACT_EXTERNALS, sanitizeKey } from "./sections.js";
7
7
  import { dirname, join } from "node:path";
8
8
  import { pathToFileURL } from "node:url";
9
9
  import { readFile } from "node:fs/promises";
10
+ import { build } from "esbuild";
10
11
  import { createHash } from "node:crypto";
11
12
  import { createRequire } from "node:module";
12
- import { build } from "esbuild";
13
13
 
14
14
  //#region src/cli/build/static.ts
15
15
  function sha256(bytes) {
@@ -23,6 +23,9 @@ function bundleOf(stem, ext, bytes) {
23
23
  bytes
24
24
  };
25
25
  }
26
+ function islandRuntimeFile() {
27
+ return packageFile("cli/build/island-runtime.ts", "island-runtime.js");
28
+ }
26
29
  async function baseCssBundle() {
27
30
  const bytes = await readFile(packageFile("css/base.css", "base.css"));
28
31
  return bundleOf("base", ".css", new Uint8Array(bytes));
@@ -132,4 +135,4 @@ async function analyticsBundle() {
132
135
  }
133
136
 
134
137
  //#endregion
135
- export { analyticsBundle, baseCssBundle, islandRuntimeBundle, reactVendorBundles };
138
+ export { analyticsBundle, baseCssBundle, islandRuntimeBundle, islandRuntimeFile, reactVendorBundles };