@homepages/concrete 1.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 (327) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/README.md +174 -0
  3. package/codemods/manifest.json +9 -0
  4. package/dist/artifact/playground/client/assets/index-BSA1yutg.css +1 -0
  5. package/dist/artifact/playground/client/assets/index-JloQyj8h.js +1101 -0
  6. package/dist/artifact/playground/client/index.html +13 -0
  7. package/dist/artifact/playground/client/island-canvas-host.mjs +1 -0
  8. package/dist/artifact/playground/host.mjs +127 -0
  9. package/dist/asset-modules.d.ts +99 -0
  10. package/dist/base.css +220 -0
  11. package/dist/browser/site-config.d.ts +18 -0
  12. package/dist/browser/site-config.js +56 -0
  13. package/dist/browser/submit-lead.d.ts +98 -0
  14. package/dist/browser/submit-lead.js +188 -0
  15. package/dist/browser.d.ts +3 -0
  16. package/dist/browser.js +4 -0
  17. package/dist/cli/build/artifact.js +225 -0
  18. package/dist/cli/build/captures.js +67 -0
  19. package/dist/cli/build/esbuild.js +127 -0
  20. package/dist/cli/build/fixtures.js +96 -0
  21. package/dist/cli/build/icons.js +76 -0
  22. package/dist/cli/build/index.js +38 -0
  23. package/dist/cli/build/playground.js +31 -0
  24. package/dist/cli/build/sections.js +236 -0
  25. package/dist/cli/build/source.js +62 -0
  26. package/dist/cli/build/static.js +156 -0
  27. package/dist/cli/capture/bundle.js +37 -0
  28. package/dist/cli/capture/capture-browser.js +51 -0
  29. package/dist/cli/capture/capture.js +121 -0
  30. package/dist/cli/check/analyze.js +95 -0
  31. package/dist/cli/check/index.js +19 -0
  32. package/dist/cli/check/load-workspace.js +119 -0
  33. package/dist/cli/check/messages.js +16 -0
  34. package/dist/cli/check/render/class-conflicts.js +39 -0
  35. package/dist/cli/check/render/html.js +86 -0
  36. package/dist/cli/check/render/inputs.js +53 -0
  37. package/dist/cli/check/render/invariants.js +58 -0
  38. package/dist/cli/check/render/island-frames.js +72 -0
  39. package/dist/cli/check/render/marker-coverage.js +102 -0
  40. package/dist/cli/check/render/nav.js +64 -0
  41. package/dist/cli/check/report.js +73 -0
  42. package/dist/cli/check/stages/bundles.js +129 -0
  43. package/dist/cli/check/stages/composition.js +67 -0
  44. package/dist/cli/check/stages/contracts.js +22 -0
  45. package/dist/cli/check/stages/dependencies.js +261 -0
  46. package/dist/cli/check/stages/fixtures.js +74 -0
  47. package/dist/cli/check/stages/lint.js +41 -0
  48. package/dist/cli/check/stages/logic.js +63 -0
  49. package/dist/cli/check/stages/render.js +144 -0
  50. package/dist/cli/check/stages/sections.js +83 -0
  51. package/dist/cli/check/stages/stylesheet.js +31 -0
  52. package/dist/cli/check/stages/typecheck.js +68 -0
  53. package/dist/cli/check/stages/workspace.js +26 -0
  54. package/dist/cli/commands.js +342 -0
  55. package/dist/cli/currency/cache.js +89 -0
  56. package/dist/cli/currency/decide.js +65 -0
  57. package/dist/cli/currency/opt-out.js +16 -0
  58. package/dist/cli/currency/preamble.js +183 -0
  59. package/dist/cli/currency/prompt.js +28 -0
  60. package/dist/cli/currency/refresh.js +44 -0
  61. package/dist/cli/currency/resolve-latest.js +185 -0
  62. package/dist/cli/currency/version-order.js +38 -0
  63. package/dist/cli/dev/crop.js +22 -0
  64. package/dist/cli/dev/hmr.js +26 -0
  65. package/dist/cli/dev/http.js +129 -0
  66. package/dist/cli/dev/index.js +70 -0
  67. package/dist/cli/dev/islands.js +390 -0
  68. package/dist/cli/dev/load-template.js +46 -0
  69. package/dist/cli/dev/request-error.js +22 -0
  70. package/dist/cli/dev/server.js +307 -0
  71. package/dist/cli/dev/tsconfig-paths.js +95 -0
  72. package/dist/cli/dev/vite.js +85 -0
  73. package/dist/cli/dev/workspace-reader.js +274 -0
  74. package/dist/cli/io.d.ts +14 -0
  75. package/dist/cli/media/cache.js +125 -0
  76. package/dist/cli/media/derive.js +252 -0
  77. package/dist/cli/media/deriver-plugin.js +71 -0
  78. package/dist/cli/property/index.js +180 -0
  79. package/dist/cli/property/library.js +137 -0
  80. package/dist/cli/publish/client.js +119 -0
  81. package/dist/cli/publish/freshness.js +66 -0
  82. package/dist/cli/publish/git.js +43 -0
  83. package/dist/cli/publish/index.js +207 -0
  84. package/dist/cli/publish/pack.js +78 -0
  85. package/dist/cli/publish/report.js +98 -0
  86. package/dist/cli/publish/target.js +87 -0
  87. package/dist/cli/publish/wire.js +29 -0
  88. package/dist/cli/tar.js +87 -0
  89. package/dist/cli/upgrade/codemod.js +56 -0
  90. package/dist/cli/upgrade/index.js +263 -0
  91. package/dist/cli/upgrade/manifest.js +72 -0
  92. package/dist/cli/upgrade/plan.js +68 -0
  93. package/dist/cli/upgrade/stage.js +71 -0
  94. package/dist/cli/version.d.ts +12 -0
  95. package/dist/cli/version.js +15 -0
  96. package/dist/cli/workspace.js +108 -0
  97. package/dist/cli.d.ts +6 -0
  98. package/dist/cli.js +94 -0
  99. package/dist/css/compile.js +77 -0
  100. package/dist/css/graph.js +109 -0
  101. package/dist/css/inline.js +132 -0
  102. package/dist/css/rules.js +65 -0
  103. package/dist/design-system/format-variants.js +127 -0
  104. package/dist/eslint/authoring.js +46 -0
  105. package/dist/eslint/correctness.js +42 -0
  106. package/dist/eslint/rules/editor-declaration.js +103 -0
  107. package/dist/eslint/rules/editor-reason.js +135 -0
  108. package/dist/eslint/rules/island-imports.js +20 -0
  109. package/dist/eslint/rules/jsx-visitor.js +20 -0
  110. package/dist/eslint/rules/no-client-runtime.js +88 -0
  111. package/dist/eslint/rules/no-editor-globals.js +60 -0
  112. package/dist/eslint/rules/no-hard-coded-color.js +183 -0
  113. package/dist/eslint/rules/no-inline-style.js +24 -0
  114. package/dist/eslint/rules/no-marker-literal.js +37 -0
  115. package/dist/eslint/rules/no-nondeterminism.js +44 -0
  116. package/dist/eslint/rules/no-px-breakpoint.js +44 -0
  117. package/dist/eslint/rules/no-raw-values.js +45 -0
  118. package/dist/eslint/rules/serializable-props.js +95 -0
  119. package/dist/eslint.d.ts +6 -0
  120. package/dist/eslint.js +26 -0
  121. package/dist/fixtures/brand.d.ts +4 -0
  122. package/dist/fixtures/brand.js +9 -0
  123. package/dist/fixtures/bundle-rule.js +67 -0
  124. package/dist/fixtures/canonical.d.ts +149 -0
  125. package/dist/fixtures/image-dimensions.js +59 -0
  126. package/dist/fixtures/load.js +154 -0
  127. package/dist/fixtures/media-plugin.js +141 -0
  128. package/dist/fixtures/media.js +165 -0
  129. package/dist/fixtures/property.js +210 -0
  130. package/dist/fixtures/resolve.js +202 -0
  131. package/dist/fixtures/rows.js +108 -0
  132. package/dist/fixtures/synthesize-empties.js +42 -0
  133. package/dist/fixtures.d.ts +213 -0
  134. package/dist/fixtures.js +37 -0
  135. package/dist/index.d.ts +53 -0
  136. package/dist/index.js +37 -0
  137. package/dist/islands/client-module.js +97 -0
  138. package/dist/islands/marker.d.ts +43 -0
  139. package/dist/islands/marker.js +44 -0
  140. package/dist/node_modules/.pnpm/fflate@0.8.3/node_modules/fflate/esm/browser.js +687 -0
  141. package/dist/packages/external/concrete/package.js +5 -0
  142. package/dist/packages/internal/fact-interpolation/dist/index.js +22 -0
  143. package/dist/packages/internal/fill-bake/dist/bake-property-ref.js +111 -0
  144. package/dist/packages/internal/fill-bake/dist/display.js +9 -0
  145. package/dist/packages/internal/fill-bake/dist/index.js +6 -0
  146. package/dist/packages/internal/fill-bake/dist/reconcile-cross-section.js +170 -0
  147. package/dist/packages/internal/fill-vocabulary/dist/facts.d.ts +32 -0
  148. package/dist/packages/internal/fill-vocabulary/dist/facts.js +131 -0
  149. package/dist/packages/internal/fill-vocabulary/dist/row-planners.js +73 -0
  150. package/dist/packages/internal/format-geometry/dist/capture.js +404 -0
  151. package/dist/packages/internal/format-geometry/dist/format.d.ts +41 -0
  152. package/dist/packages/internal/format-geometry/dist/geometry.js +58 -0
  153. package/dist/packages/internal/format-geometry/dist/index.js +4 -0
  154. package/dist/packages/internal/image-descriptor/dist/index.d.ts +35 -0
  155. package/dist/packages/internal/image-ladder/dist/crop.js +82 -0
  156. package/dist/packages/internal/image-ladder/dist/encode.js +23 -0
  157. package/dist/packages/internal/image-ladder/dist/index.js +4 -0
  158. package/dist/packages/internal/image-ladder/dist/policy.js +102 -0
  159. package/dist/packages/internal/island-runtime/dist/capture-holds.d.ts +13 -0
  160. package/dist/packages/internal/island-runtime/dist/capture-holds.js +45 -0
  161. package/dist/packages/internal/island-runtime/dist/contract.d.ts +176 -0
  162. package/dist/packages/internal/island-runtime/dist/contract.js +94 -0
  163. package/dist/packages/internal/island-runtime/dist/editor-instance-context.js +15 -0
  164. package/dist/packages/internal/island-runtime/dist/index.d.ts +103 -0
  165. package/dist/packages/internal/island-runtime/dist/index.js +163 -0
  166. package/dist/packages/internal/island-runtime/dist/use-capture-ready.d.ts +19 -0
  167. package/dist/packages/internal/island-runtime/dist/use-capture-ready.js +39 -0
  168. package/dist/packages/internal/island-runtime/dist/use-editor.d.ts +22 -0
  169. package/dist/packages/internal/island-runtime/dist/use-editor.js +54 -0
  170. package/dist/packages/internal/island-runtime/dist/viewport-schedule.js +105 -0
  171. package/dist/packages/internal/property-facts/dist/derive-facts-view.js +25 -0
  172. package/dist/packages/internal/property-facts/dist/index.js +3 -0
  173. package/dist/packages/internal/property-facts/dist/property-facts-CSdkSuD7.js +181 -0
  174. package/dist/packages/internal/section-contracts/dist/cap-contract.js +59 -0
  175. package/dist/packages/internal/section-contracts/dist/catalog.js +102 -0
  176. package/dist/packages/internal/section-contracts/dist/choose-select-contract.js +24 -0
  177. package/dist/packages/internal/section-contracts/dist/count-bounds-contract.js +48 -0
  178. package/dist/packages/internal/section-contracts/dist/display-contract.js +30 -0
  179. package/dist/packages/internal/section-contracts/dist/display-evidence-contract.js +17 -0
  180. package/dist/packages/internal/section-contracts/dist/group-contract.js +21 -0
  181. package/dist/packages/internal/section-contracts/dist/index.js +26 -0
  182. package/dist/packages/internal/section-contracts/dist/interpolation-contract.js +48 -0
  183. package/dist/packages/internal/section-contracts/dist/list-fill-contract.js +53 -0
  184. package/dist/packages/internal/section-contracts/dist/list-scalar-contract.js +70 -0
  185. package/dist/packages/internal/section-contracts/dist/name-title-contract.js +27 -0
  186. package/dist/packages/internal/section-contracts/dist/nested-slot-contract.js +12 -0
  187. package/dist/packages/internal/section-contracts/dist/option-source-contract.js +22 -0
  188. package/dist/packages/internal/section-contracts/dist/poi-curation-contract.js +18 -0
  189. package/dist/packages/internal/section-contracts/dist/pooling-field-contract.js +30 -0
  190. package/dist/packages/internal/section-contracts/dist/record-collection-contract.js +24 -0
  191. package/dist/packages/internal/section-contracts/dist/row-contract.js +37 -0
  192. package/dist/packages/internal/section-contracts/dist/row-fill-contract.js +38 -0
  193. package/dist/packages/internal/section-contracts/dist/runners.js +181 -0
  194. package/dist/packages/internal/section-contracts/dist/select-contract.js +28 -0
  195. package/dist/packages/internal/section-contracts/dist/source-contract.js +48 -0
  196. package/dist/packages/internal/section-contracts/dist/source-filter-contract.js +15 -0
  197. package/dist/packages/internal/section-contracts/dist/sources-contract.js +28 -0
  198. package/dist/packages/internal/section-contracts/dist/url-contract.js +20 -0
  199. package/dist/packages/internal/source-resolution/dist/index.js +222 -0
  200. package/dist/packages/internal/template-artifact/dist/hash.js +50 -0
  201. package/dist/packages/internal/template-artifact/dist/index.js +7 -0
  202. package/dist/packages/internal/template-artifact/dist/layout.js +165 -0
  203. package/dist/packages/internal/template-artifact/dist/manifest.js +73 -0
  204. package/dist/packages/internal/template-artifact/dist/sha256.js +138 -0
  205. package/dist/packages/internal/template-artifact/dist/verify.js +275 -0
  206. package/dist/packages/internal/template-contracts/dist/collection-editing.js +38 -0
  207. package/dist/packages/internal/template-contracts/dist/content-categories.d.ts +10 -0
  208. package/dist/packages/internal/template-contracts/dist/content-categories.js +17 -0
  209. package/dist/packages/internal/template-contracts/dist/document-value.d.ts +33 -0
  210. package/dist/packages/internal/template-contracts/dist/facts-view.d.ts +81 -0
  211. package/dist/packages/internal/template-contracts/dist/facts-view.js +136 -0
  212. package/dist/packages/internal/template-contracts/dist/layout.js +17 -0
  213. package/dist/packages/internal/template-contracts/dist/markers.d.ts +40 -0
  214. package/dist/packages/internal/template-contracts/dist/markers.js +41 -0
  215. package/dist/packages/internal/template-contracts/dist/poi-row.d.ts +63 -0
  216. package/dist/packages/internal/template-contracts/dist/select-key.js +13 -0
  217. package/dist/packages/internal/template-contracts/dist/slot-catalog.d.ts +1112 -0
  218. package/dist/packages/internal/template-contracts/dist/slot-catalog.js +1109 -0
  219. package/dist/packages/internal/template-contracts/dist/slot-overrides.js +11 -0
  220. package/dist/packages/internal/template-contracts/dist/tour-value.d.ts +45 -0
  221. package/dist/packages/internal/template-contracts/dist/video-value.d.ts +63 -0
  222. package/dist/playground/host/page-state.js +12 -0
  223. package/dist/playground/host/paths.js +9 -0
  224. package/dist/playground/layout.js +24 -0
  225. package/dist/playground/wire.js +36 -0
  226. package/dist/playground-island-runtime.d.ts +3 -0
  227. package/dist/playground-island-runtime.js +4 -0
  228. package/dist/primitives/FrameShell.d.ts +29 -0
  229. package/dist/primitives/FrameShell.js +34 -0
  230. package/dist/primitives/Image.d.ts +119 -0
  231. package/dist/primitives/Image.js +173 -0
  232. package/dist/primitives/Section.d.ts +22 -0
  233. package/dist/primitives/Section.js +26 -0
  234. package/dist/primitives/Tour.d.ts +43 -0
  235. package/dist/primitives/Tour.js +72 -0
  236. package/dist/primitives/Video.d.ts +57 -0
  237. package/dist/primitives/Video.js +116 -0
  238. package/dist/primitives/embed-playback.js +50 -0
  239. package/dist/primitives/index.d.ts +11 -0
  240. package/dist/primitives/marker-attrs.js +44 -0
  241. package/dist/primitives/object-fit.js +11 -0
  242. package/dist/primitives/picture-sources.d.ts +24 -0
  243. package/dist/primitives/picture-sources.js +52 -0
  244. package/dist/primitives/probe-context.js +24 -0
  245. package/dist/primitives/slot-bindings.d.ts +96 -0
  246. package/dist/primitives/slot-bindings.js +226 -0
  247. package/dist/primitives/slot-document.d.ts +35 -0
  248. package/dist/primitives/slot-document.js +37 -0
  249. package/dist/primitives/slot-group.d.ts +40 -0
  250. package/dist/primitives/slot-group.js +45 -0
  251. package/dist/primitives/slot-list.d.ts +21 -0
  252. package/dist/primitives/slot-list.js +23 -0
  253. package/dist/primitives/slot-media.d.ts +71 -0
  254. package/dist/primitives/slot-media.js +98 -0
  255. package/dist/primitives/slot-scalar.d.ts +53 -0
  256. package/dist/primitives/slot-scalar.js +98 -0
  257. package/dist/primitives/slot.d.ts +26 -0
  258. package/dist/primitives/slot.js +28 -0
  259. package/dist/rules/registry.js +479 -0
  260. package/dist/schema/compute.d.ts +22 -0
  261. package/dist/schema/compute.js +30 -0
  262. package/dist/schema/define-schema.d.ts +27 -0
  263. package/dist/schema/define-schema.js +73 -0
  264. package/dist/schema/extract-fill-spec.js +246 -0
  265. package/dist/schema/extract-used-facts.js +176 -0
  266. package/dist/schema/fact.d.ts +65 -0
  267. package/dist/schema/fact.js +33 -0
  268. package/dist/schema/fill-builders.d.ts +387 -0
  269. package/dist/schema/fill-builders.js +263 -0
  270. package/dist/schema/fill-declaration.d.ts +76 -0
  271. package/dist/schema/fill-declaration.js +43 -0
  272. package/dist/schema/fill-spec.d.ts +18 -0
  273. package/dist/schema/fill-spec.js +170 -0
  274. package/dist/schema/format-presets.d.ts +27 -0
  275. package/dist/schema/format-presets.js +76 -0
  276. package/dist/schema/format.d.ts +22 -0
  277. package/dist/schema/format.js +40 -0
  278. package/dist/schema/formats.d.ts +6 -0
  279. package/dist/schema/formats.js +7 -0
  280. package/dist/schema/layout.d.ts +32 -0
  281. package/dist/schema/layout.js +30 -0
  282. package/dist/schema/manifest.js +300 -0
  283. package/dist/schema/property-facts.d.ts +83 -0
  284. package/dist/schema/runtime-values.d.ts +88 -0
  285. package/dist/schema/section-nav.d.ts +38 -0
  286. package/dist/schema/section-nav.js +29 -0
  287. package/dist/schema/section-props.d.ts +98 -0
  288. package/dist/schema/section-schema.d.ts +53 -0
  289. package/dist/schema/section-schema.js +54 -0
  290. package/dist/schema/slot-builders.d.ts +497 -0
  291. package/dist/schema/slot-builders.js +331 -0
  292. package/dist/schema/slot-types.d.ts +110 -0
  293. package/dist/schema/slot-types.js +187 -0
  294. package/dist/section/declare.d.ts +44 -0
  295. package/dist/section/declare.js +27 -0
  296. package/dist/section/discovery.js +76 -0
  297. package/dist/section/groups.js +74 -0
  298. package/dist/section/materialize.js +28 -0
  299. package/dist/section/placements.js +28 -0
  300. package/dist/section/section.d.ts +69 -0
  301. package/dist/section/section.js +101 -0
  302. package/dist/site-analytics.d.ts +1 -0
  303. package/dist/site-analytics.js +15 -0
  304. package/dist/site-runtime/analytics.js +97 -0
  305. package/dist/site-runtime/site-integrations.js +97 -0
  306. package/dist/styles.css +60 -0
  307. package/dist/template/define-template.d.ts +139 -0
  308. package/dist/template/define-template.js +98 -0
  309. package/dist/template/logic-build.js +191 -0
  310. package/dist/template/logic-shim.d.ts +43 -0
  311. package/dist/template/logic-shim.js +52 -0
  312. package/dist/template/logic-transform.js +92 -0
  313. package/dist/template/materialize.js +107 -0
  314. package/dist/template/reconcile.d.ts +67 -0
  315. package/dist/template/reconcile.js +25 -0
  316. package/dist/template/running-copy.js +58 -0
  317. package/guide/reference/cli/INDEX.md +79 -0
  318. package/guide/reference/cli/build.md +48 -0
  319. package/guide/reference/cli/check.md +49 -0
  320. package/guide/reference/cli/dev.md +46 -0
  321. package/guide/reference/cli/property-add.md +53 -0
  322. package/guide/reference/cli/property-list.md +46 -0
  323. package/guide/reference/cli/publish.md +54 -0
  324. package/guide/reference/cli/upgrade.md +48 -0
  325. package/guide/reference/rules/INDEX.md +190 -0
  326. package/package.json +137 -0
  327. package/tsconfig.base.json +16 -0
@@ -0,0 +1,202 @@
1
+ import { getComputed } from "../schema/compute.js";
2
+ import { rowFieldSources } from "../packages/internal/source-resolution/dist/index.js";
3
+ import { buildDeriveFactsView } from "../packages/internal/property-facts/dist/derive-facts-view.js";
4
+ import { bakeDisplayEntries, bakePropertyRefSlots } from "../packages/internal/fill-bake/dist/bake-property-ref.js";
5
+ import { applyReconcile } from "../packages/internal/fill-bake/dist/reconcile-cross-section.js";
6
+ import "../packages/internal/fill-bake/dist/index.js";
7
+ import { canonicalizeProperty } from "./property.js";
8
+ import { canonicalizeRows } from "./rows.js";
9
+
10
+ //#region src/fixtures/resolve.ts
11
+ const MEDIA_KINDS = /* @__PURE__ */ new Set([
12
+ "image",
13
+ "video",
14
+ "tour",
15
+ "document"
16
+ ]);
17
+ /** The empty value an unauthored generative slot resolves to: `[]` for a list, `null` otherwise. */
18
+ function emptyValueFor(type) {
19
+ return type === "list" ? [] : null;
20
+ }
21
+ /** Is this value the empty one for its kind? */
22
+ function isEmptyValue(value, type) {
23
+ return type === "list" ? Array.isArray(value) && value.length === 0 : value === null || value === void 0;
24
+ }
25
+ /** The instances the composition has, one per instance id in first-placement order (a shared instance appears once). */
26
+ function uniquePlacements(placements) {
27
+ const seen = /* @__PURE__ */ new Set();
28
+ return placements.filter((p) => seen.has(p.instance) ? false : (seen.add(p.instance), true));
29
+ }
30
+ function reconcileInstances(placements) {
31
+ const perKey = /* @__PURE__ */ new Map();
32
+ for (const p of placements) perKey.set(p.key, (perKey.get(p.key) ?? 0) + 1);
33
+ return placements.map((p) => ({
34
+ key: (perKey.get(p.key) ?? 0) > 1 ? p.instance : p.key,
35
+ instanceId: p.instance
36
+ }));
37
+ }
38
+ /**
39
+ * Resolve one loaded fixture over the template's placements. The result carries the
40
+ * facts, the media catalog, the content doc and the per-slot provenance; a content
41
+ * entry naming an unplaced instance or a media entry the property lacks is a violation
42
+ * and the entry (or the slot) is dropped, so `check` reports every fault at once.
43
+ */
44
+ function resolveFixture(loaded, options) {
45
+ const { fixture, module } = loaded;
46
+ const violations = [];
47
+ const property = canonicalizeProperty(fixture.property, module);
48
+ violations.push(...property.violations);
49
+ if (property.facts === null) return {
50
+ resolved: null,
51
+ violations
52
+ };
53
+ const { facts, media } = property;
54
+ const placements = uniquePlacements(options.placements);
55
+ const entriesByInstance = /* @__PURE__ */ new Map();
56
+ for (const entry of fixture.content ?? []) {
57
+ const instance = entry.instance ?? `${entry.section.key}-1`;
58
+ if (placements.find((p) => p.key === entry.section.key && p.instance === instance) === void 0) {
59
+ violations.push({
60
+ rule: "fixtures/instance-not-placed",
61
+ file: module,
62
+ message: `fixture "${loaded.id}" states content for "${entry.section.key}" instance "${instance}", which no page places`
63
+ });
64
+ continue;
65
+ }
66
+ if (entriesByInstance.has(instance)) throw new Error(`Fixture "${loaded.id}" (${module}) states content twice for instance "${instance}".`);
67
+ entriesByInstance.set(instance, entry);
68
+ }
69
+ const instances = [];
70
+ const provenance = {};
71
+ for (const placement of placements) {
72
+ const resolved = resolveInstance(placement, entriesByInstance.get(placement.instance), {
73
+ facts,
74
+ media,
75
+ module,
76
+ fixtureId: loaded.id,
77
+ log: options.log,
78
+ violations
79
+ });
80
+ instances.push(resolved.instance);
81
+ provenance[placement.instance] = resolved.provenance;
82
+ }
83
+ const reconciled = applyReconcile({ instances }, buildDeriveFactsView(facts), {
84
+ reconcile: options.reconcile ?? [],
85
+ instances: reconcileInstances(placements)
86
+ }, options.log);
87
+ return {
88
+ resolved: {
89
+ id: loaded.id,
90
+ label: loaded.label,
91
+ module,
92
+ synthesized: false,
93
+ facts,
94
+ media,
95
+ contentDoc: reconciled.contentDoc,
96
+ provenance
97
+ },
98
+ violations
99
+ };
100
+ }
101
+ function resolveInstance(placement, entry, ctx) {
102
+ const section = placement.section;
103
+ const { schema } = section;
104
+ const bakeCtx = {
105
+ computed: getComputed(schema),
106
+ section_key: section.key,
107
+ log: ctx.log
108
+ };
109
+ const baked = bakePropertyRefSlots(schema, ctx.facts, bakeCtx);
110
+ const display = schema.meta.display ?? {};
111
+ const resolvedDisplay = bakeDisplayEntries({ display }, ctx.facts, bakeCtx);
112
+ const values = entry?.values ?? {};
113
+ const visibility = resolvedDisplay.visibility ?? display.visibility?.cases?.[0];
114
+ const enabled = typeof values.enabled === "boolean" ? values.enabled : visibility === void 0 ? true : visibility !== "hidden";
115
+ const declaredCases = display.variant?.cases;
116
+ let variant = resolvedDisplay.variant ?? declaredCases?.[0];
117
+ if (typeof values.variant === "string") {
118
+ if (declaredCases?.includes(values.variant) !== true) throw new Error(`Fixture "${ctx.fixtureId}" (${ctx.module}): content for "${placement.instance}" names variant "${values.variant}", which section "${section.key}" does not declare.`);
119
+ variant = values.variant;
120
+ }
121
+ const slots = {};
122
+ const provenance = {};
123
+ for (const [id, def] of Object.entries(schema.slots)) {
124
+ const gate = def.variant?.cases;
125
+ if (gate !== void 0 && (variant === void 0 || !gate.includes(variant))) continue;
126
+ const source = def.source;
127
+ if (source?.kind === "direct" && typeof source.field === "string") {
128
+ slots[id] = baked[id] ?? null;
129
+ provenance[id] = {
130
+ kind: "fact",
131
+ ref: source.field
132
+ };
133
+ continue;
134
+ }
135
+ if (source?.kind === "derived" && typeof source.transform === "string") {
136
+ slots[id] = baked[id] ?? null;
137
+ provenance[id] = {
138
+ kind: "computed",
139
+ ref: source.transform
140
+ };
141
+ continue;
142
+ }
143
+ const stated = values[id];
144
+ if (stated === void 0 || stated === null) {
145
+ slots[id] = emptyValueFor(def.type);
146
+ provenance[id] = { kind: "empty" };
147
+ continue;
148
+ }
149
+ slots[id] = authoredValue(def, stated, {
150
+ ...ctx,
151
+ instance: placement.instance,
152
+ slot: id
153
+ });
154
+ provenance[id] = { kind: "authored" };
155
+ }
156
+ return {
157
+ instance: {
158
+ instance_id: placement.instance,
159
+ section_key: section.key,
160
+ enabled,
161
+ ...variant === void 0 ? {} : { variant },
162
+ slots
163
+ },
164
+ provenance
165
+ };
166
+ }
167
+ function authoredValue(def, value, ctx) {
168
+ if (MEDIA_KINDS.has(def.type)) return mediaRef(def.type, value, ctx);
169
+ if (def.type === "list") {
170
+ if (!Array.isArray(value)) return value;
171
+ if (def.fields !== void 0) {
172
+ const fields = def.fields;
173
+ return canonicalizeRows(def, value, ctx.facts, rowFieldSources(fields)).map((row) => {
174
+ if (typeof row !== "object" || row === null) return row;
175
+ const out = { ...row };
176
+ for (const [field, fieldDef] of Object.entries(fields)) if (out[field] !== null && out[field] !== void 0) out[field] = authoredValue(fieldDef, out[field], ctx);
177
+ return out;
178
+ });
179
+ }
180
+ if (def.element !== void 0) {
181
+ const element = def.element;
182
+ return value.map((item) => authoredValue(element, item, ctx));
183
+ }
184
+ }
185
+ return value;
186
+ }
187
+ function mediaRef(kind, value, ctx) {
188
+ const id = typeof value === "object" && value !== null ? value.id : void 0;
189
+ const carried = typeof id === "string" ? ctx.media.get(id) : void 0;
190
+ if (carried === void 0 || carried.kind !== kind) {
191
+ ctx.violations.push({
192
+ rule: "fixtures/media-not-in-property",
193
+ file: ctx.module,
194
+ message: `fixture "${ctx.fixtureId}": "${ctx.instance}".${ctx.slot} references ` + (typeof id === "string" ? `${kind} "${id}", which its property does not carry` : `a value that is not a ${kind} entry of its property`)
195
+ });
196
+ return null;
197
+ }
198
+ return { asset_id: carried.id };
199
+ }
200
+
201
+ //#endregion
202
+ export { emptyValueFor, isEmptyValue, resolveFixture, uniquePlacements };
@@ -0,0 +1,108 @@
1
+ import { collectionForSlot } from "../packages/internal/template-contracts/dist/slot-catalog.js";
2
+ import { COLLECTION_PROJECTIONS } from "../packages/internal/source-resolution/dist/index.js";
3
+
4
+ //#region src/fixtures/rows.ts
5
+ const EMPTY_FACT_ROW = {
6
+ units: {
7
+ unit_id: "",
8
+ unit_label: null,
9
+ beds: null,
10
+ baths: null,
11
+ sqft: null,
12
+ price: null,
13
+ description: null,
14
+ features: [],
15
+ position: 0,
16
+ floor_plans: []
17
+ },
18
+ contacts: {
19
+ id: "",
20
+ primary: false,
21
+ name: null,
22
+ title: null,
23
+ org_name: null,
24
+ bio: null,
25
+ email: null,
26
+ phone: null,
27
+ address: null,
28
+ website_url: null,
29
+ instagram_url: null,
30
+ linkedin_url: null,
31
+ x_url: null,
32
+ facebook_url: null,
33
+ avatar_upload_id: null,
34
+ logo_dark_upload_id: null,
35
+ logo_light_upload_id: null
36
+ },
37
+ comparables: {
38
+ id: "",
39
+ address_street: null,
40
+ address_city: null,
41
+ address_state: null,
42
+ address_postal: null,
43
+ address: "",
44
+ lat: null,
45
+ lng: null,
46
+ distance_m: null,
47
+ status: null,
48
+ price: null,
49
+ price_period: "total",
50
+ sale_date: null,
51
+ beds: null,
52
+ baths: null,
53
+ sqft: null,
54
+ photo_url: null,
55
+ source_url: null,
56
+ source_name: null
57
+ }
58
+ };
59
+ function blankCollectionRow(collection, facts, rowFields) {
60
+ const oneEmptyRow = {
61
+ ...facts,
62
+ [collection]: [EMPTY_FACT_ROW[collection]]
63
+ };
64
+ return COLLECTION_PROJECTIONS[collection](oneEmptyRow, rowFields)[0] ?? {};
65
+ }
66
+ function blankForField(def) {
67
+ switch (def.type) {
68
+ case "text":
69
+ case "select":
70
+ case "url": return "";
71
+ case "video": return {
72
+ video_id: "",
73
+ url: "",
74
+ poster: "",
75
+ alt: ""
76
+ };
77
+ case "tour": return {
78
+ tour_id: "",
79
+ url: "",
80
+ poster: "",
81
+ alt: ""
82
+ };
83
+ case "list": return [];
84
+ default: return null;
85
+ }
86
+ }
87
+ function blankDeclaredRow(slot) {
88
+ const row = {};
89
+ for (const [field, def] of Object.entries(slot.fields ?? {})) row[field] = blankForField(def);
90
+ return row;
91
+ }
92
+ /**
93
+ * Fill each stated row of a record list out to a whole row, giving every key the row
94
+ * does not state the blank a bake would carry there. A non-array value passes through
95
+ * untouched.
96
+ */
97
+ function canonicalizeRows(slot, value, facts, rowFields) {
98
+ if (!Array.isArray(value)) return value;
99
+ const collection = collectionForSlot(slot);
100
+ const blank = collection === null ? blankDeclaredRow(slot) : blankCollectionRow(collection, facts, rowFields);
101
+ return value.map((row) => typeof row === "object" && row !== null && !Array.isArray(row) ? {
102
+ ...blank,
103
+ ...row
104
+ } : row);
105
+ }
106
+
107
+ //#endregion
108
+ export { canonicalizeRows };
@@ -0,0 +1,42 @@
1
+ import { emptyValueFor, isEmptyValue, uniquePlacements } from "./resolve.js";
2
+
3
+ //#region src/fixtures/synthesize-empties.ts
4
+ /**
5
+ * One derived fixture per (instance, slot) whose value is not already empty. The id
6
+ * is `<fixture id>/empty/<instance>/<slot>`; provenance marks the slot `empty`.
7
+ */
8
+ function synthesizeEmptyFixtures(resolved, placements) {
9
+ const out = [];
10
+ for (const placement of uniquePlacements(placements)) {
11
+ const instance = resolved.contentDoc.instances.find((i) => i.instance_id === placement.instance);
12
+ if (instance === void 0) continue;
13
+ for (const [slot, def] of Object.entries(placement.section.schema.slots)) {
14
+ if (!(slot in instance.slots) || isEmptyValue(instance.slots[slot], def.type)) continue;
15
+ const empty = emptyValueFor(def.type);
16
+ out.push({
17
+ ...resolved,
18
+ id: `${resolved.id}/empty/${placement.instance}/${slot}`,
19
+ label: `${resolved.label}: ${placement.instance}.${slot} = ${Array.isArray(empty) ? "empty" : "null"}`,
20
+ synthesized: true,
21
+ contentDoc: { instances: resolved.contentDoc.instances.map((i) => i.instance_id === placement.instance ? {
22
+ ...i,
23
+ slots: {
24
+ ...i.slots,
25
+ [slot]: empty
26
+ }
27
+ } : i) },
28
+ provenance: {
29
+ ...resolved.provenance,
30
+ [placement.instance]: {
31
+ ...resolved.provenance[placement.instance],
32
+ [slot]: { kind: "empty" }
33
+ }
34
+ }
35
+ });
36
+ }
37
+ }
38
+ return out;
39
+ }
40
+
41
+ //#endregion
42
+ export { synthesizeEmptyFixtures };
@@ -0,0 +1,213 @@
1
+ import "./asset-modules.js";
2
+ import { PoiRow } from "./packages/internal/template-contracts/dist/poi-row.js";
3
+ import { AuthorImage } from "./schema/runtime-values.js";
4
+ import { SlotValue } from "./schema/section-props.js";
5
+ import { FIXTURE } from "./fixtures/brand.js";
6
+ import { CanonicalProperty } from "./fixtures/canonical.js";
7
+ //#region src/fixtures/index.d.ts
8
+ /**
9
+ * What an imported media file resolves to. A raster image import (`.jpg`, `.png`,
10
+ * `.webp`, `.avif`) yields a derived {@link AuthorImage}; every other file (`.pdf`,
11
+ * `.mp4`, `.svg`, …) yields its built URL. Either is a file the resolver can serve in
12
+ * `dev` and hash into the artifact in `build`.
13
+ */
14
+ type MediaFile = AuthorImage | string;
15
+ type Canonical = CanonicalProperty;
16
+ type CanonicalPhoto = Canonical["photos"][number];
17
+ type CanonicalFloorPlan = Canonical["floor_plans"][number];
18
+ type CanonicalVideo = Canonical["videos"][number];
19
+ type CanonicalDocument = Canonical["documents"][number];
20
+ type CanonicalContact = Canonical["contacts"][number];
21
+ /** A photo of the property: the canonical photo row with its file imported. */
22
+ type PhotoEntry = CanonicalPhoto & {
23
+ readonly file: MediaFile;
24
+ };
25
+ /**
26
+ * A floor plan: the canonical row with its file imported in place of the upload
27
+ * reference and the platform's served key, both of which the file stands for.
28
+ */
29
+ type FloorPlanEntry = Omit<CanonicalFloorPlan, "upload_id" | "page_index" | "processed_s3_key"> & {
30
+ readonly file: MediaFile;
31
+ };
32
+ /** A hosted video: the canonical row with its file imported. */
33
+ type UploadVideoEntry = Omit<CanonicalVideo, "source" | "url" | "provider"> & {
34
+ readonly source: "upload";
35
+ readonly file: MediaFile;
36
+ };
37
+ /** A pasted provider link. Stays a URL, exactly as the platform stores it. */
38
+ type LinkVideoEntry = Omit<CanonicalVideo, "source"> & {
39
+ readonly source: "link";
40
+ };
41
+ /** One video candidate — a hosted upload or a pasted provider link. */
42
+ type VideoEntry = UploadVideoEntry | LinkVideoEntry;
43
+ /** One 3D tour link. Stays a URL, exactly as the platform stores it. */
44
+ type TourEntry = Canonical["tours"][number];
45
+ /**
46
+ * An attachable document: its file imported, plus the notes distilled from it. The
47
+ * property's `document_notes` are derived from these entries and never stated.
48
+ */
49
+ type DocumentEntry = Omit<CanonicalDocument, "filename" | "mime"> & {
50
+ readonly file: MediaFile;
51
+ };
52
+ /** A contact card: the canonical row with its avatar and logos imported, or `null`. */
53
+ type ContactEntry = Omit<CanonicalContact, "avatar_upload_id" | "logo_dark_upload_id" | "logo_light_upload_id"> & {
54
+ readonly avatar: MediaFile | null;
55
+ readonly logo_dark: MediaFile | null;
56
+ readonly logo_light: MediaFile | null;
57
+ };
58
+ /**
59
+ * A property as a user might upload it: the platform's own property-facts shape with
60
+ * one substitution — every upload reference is an imported media file. Plain data,
61
+ * validated with the platform schema when loaded; there is no builder and no
62
+ * derivation API, so a variation is a second property written beside the first.
63
+ *
64
+ * Facts only. Unit copy, points of interest, amenities and any other fill output are
65
+ * not on a property; a fixture states them in its content entries.
66
+ */
67
+ type Property = Omit<Canonical, "photos" | "floor_plans" | "videos" | "documents" | "contacts" | "document_notes"> & {
68
+ readonly photos: PhotoEntry[];
69
+ readonly floor_plans: FloorPlanEntry[];
70
+ readonly videos: VideoEntry[];
71
+ readonly documents: DocumentEntry[];
72
+ readonly contacts: ContactEntry[];
73
+ };
74
+ /**
75
+ * What `content(Section, …)` is typed against: a section value's identity. A value
76
+ * `section()` returned also carries its `schema`, which is what types the entry's
77
+ * values by the section's declared slots; a bare `{ key }` (a section the program
78
+ * cannot see) types them as an open record.
79
+ */
80
+ interface SectionRef {
81
+ readonly key: string;
82
+ }
83
+ /** The per-instance display state a content doc carries beside a section's values. */
84
+ interface ContentDisplay {
85
+ /** For an optional section: whether this instance renders at all. */
86
+ readonly enabled?: boolean;
87
+ /** For a section with declared display variants: the case this instance renders. */
88
+ readonly variant?: string;
89
+ }
90
+ /** The generative slots and display state one content entry states for one placed instance. */
91
+ type ContentValues = ContentDisplay & {
92
+ readonly [slot: string]: unknown;
93
+ };
94
+ /** One `content(...)` entry: a section, the values it states, and the placed instance they belong to. */
95
+ interface ContentEntry<S extends SectionRef = SectionRef> {
96
+ readonly section: S;
97
+ readonly values: ContentValues;
98
+ /** The id of the placed instance, when the template places the section more than once. */
99
+ readonly instance?: string;
100
+ }
101
+ /** The input of {@link defineFixture}. */
102
+ interface FixtureSpec {
103
+ /** The property this fixture is built on. */
104
+ readonly property: Property;
105
+ /**
106
+ * The content layer: what a fill of this property would generate, stated per
107
+ * section. Absent means the sparse-fill case — every generative slot resolves to its
108
+ * empty value.
109
+ */
110
+ readonly content?: readonly ContentEntry[];
111
+ /** The human name the playground lists. Defaults to the fixture's export name. */
112
+ readonly label?: string;
113
+ }
114
+ /**
115
+ * A fixture: one property plus a content layer applied to the whole template. Branded,
116
+ * so the loader can tell a fixture value from any other export of a fixture module.
117
+ */
118
+ type Fixture = FixtureSpec & {
119
+ readonly [FIXTURE]: true;
120
+ };
121
+ /**
122
+ * Declare a fixture. The export name is the fixture id; the loader collects every
123
+ * exported fixture value from every module under the workspace's `fixtures/`
124
+ * directory. Validation is the loader's: this returns the spec, branded.
125
+ */
126
+ declare function defineFixture(spec: FixtureSpec): Fixture;
127
+ /** The section's declared slots when the value carries its schema; otherwise unknown. */
128
+ type SlotsOf<S> = S extends {
129
+ readonly schema: {
130
+ readonly slots: infer Slots;
131
+ };
132
+ } ? Slots : never;
133
+ /**
134
+ * One row of a record list as a content entry states it: every declared field
135
+ * optional, since an entry states only what a row sets and the resolver canonicalizes
136
+ * the rest exactly as the binding layer does. `id` rides along because every persisted
137
+ * row carries the editor-stamped one.
138
+ */
139
+ type ContentRow<I> = {
140
+ readonly id?: string;
141
+ } & { readonly [K in keyof I]?: ContentSlotValue<I[K]> | null; };
142
+ /**
143
+ * The value one slot takes in a content entry: a media slot takes an entry of the
144
+ * fixture's property, a list of them an array, a record list its rows, a points-of-
145
+ * interest slot the rows a curation decision would produce, and every other kind its
146
+ * runtime value unchanged.
147
+ */
148
+ type ContentSlotValue<S> = S extends {
149
+ type: "image";
150
+ } ? PhotoEntry : S extends {
151
+ type: "video";
152
+ } ? VideoEntry : S extends {
153
+ type: "tour";
154
+ } ? TourEntry : S extends {
155
+ type: "document";
156
+ } ? DocumentEntry : S extends {
157
+ type: "poi";
158
+ } ? PoiRow : S extends {
159
+ type: "list";
160
+ fields: infer I;
161
+ } ? readonly ContentRow<I>[] : S extends {
162
+ type: "list";
163
+ element: infer E;
164
+ } ? readonly NonNullable<ContentSlotValue<E>>[] : SlotValue<S>;
165
+ /**
166
+ * The slots a content entry may state: every declared slot EXCEPT the source-bound
167
+ * ones, each optional. A fact-bound or computed slot resolves from the property and is
168
+ * never stated, so naming one is a compile error.
169
+ */
170
+ type ContentSlots<Slots> = { readonly [K in keyof Slots as Slots[K] extends {
171
+ source: unknown;
172
+ } ? never : K]?: ContentSlotValue<Slots[K]> | null; };
173
+ type VariantOf<S> = S extends {
174
+ readonly schema: {
175
+ readonly meta: infer Meta;
176
+ };
177
+ } ? Meta extends {
178
+ readonly display: {
179
+ readonly variant: {
180
+ readonly cases: readonly (infer C extends string)[];
181
+ };
182
+ };
183
+ } ? C : never : string;
184
+ /** What one entry may state for `S`: its content slots plus the per-instance display state. */
185
+ type ContentValuesOf<S> = [SlotsOf<S>] extends [never] ? ContentValues : ContentSlots<SlotsOf<S>> & {
186
+ readonly enabled?: boolean;
187
+ readonly variant?: VariantOf<S>;
188
+ };
189
+ type ExactObject<E, R> = E extends object ? unknown extends R ? E : R extends object ? E & { [K in Exclude<keyof E, keyof R>]: never; } : E : E;
190
+ type ExactValue<V, A> = unknown extends A ? V : NonNullable<A> extends readonly (infer R)[] ? V extends readonly (infer E)[] ? readonly ExactObject<E, R>[] : V : ExactObject<V, NonNullable<A>>;
191
+ /**
192
+ * A values map `M` checked exactly against `Allowed`: each shared key by its declared
193
+ * value type and by its object's declared keys, and every key `Allowed` does not
194
+ * declare typed `never` — so an unknown or source-bound slot key is a compile error.
195
+ * A plain `values: Allowed` parameter would catch those keys only on a fresh object
196
+ * literal; capturing the map's own type as `M` puts the check on the type. `M` must be
197
+ * inferred UNCONSTRAINED for that, which is why the naked `M &` member leads.
198
+ */
199
+ type ExactContent<M, Allowed> = M & Allowed & { [K in Exclude<keyof M, keyof Allowed>]: never; } & { [K in Extract<keyof M, keyof Allowed>]: ExactValue<M[K], Allowed[K]>; };
200
+ /**
201
+ * State the content a fill would generate for one placed instance of a section: its
202
+ * generative slots and its display state, typed by the section value. A fact-bound or
203
+ * computed slot is never stated here — derived information is taken from the property.
204
+ * Media is stated by value, as an entry of the fixture's property (`hero_image:
205
+ * deckShot`), of the slot's own kind; an entry the property does not carry is a check
206
+ * error. A second placed instance names itself with `instance`, the same id the
207
+ * placement wrote.
208
+ */
209
+ declare function content<S extends SectionRef, M extends object>(section: S, values: ExactContent<M, ContentValuesOf<S>>, options?: {
210
+ readonly instance?: string;
211
+ }): ContentEntry<S>;
212
+ //#endregion
213
+ export { ContactEntry, ContentDisplay, ContentEntry, ContentRow, ContentSlotValue, ContentSlots, ContentValues, ContentValuesOf, DocumentEntry, ExactContent, Fixture, FixtureSpec, FloorPlanEntry, LinkVideoEntry, MediaFile, PhotoEntry, Property, SectionRef, TourEntry, UploadVideoEntry, VideoEntry, content, defineFixture };
@@ -0,0 +1,37 @@
1
+ import { FIXTURE } from "./fixtures/brand.js";
2
+
3
+ //#region src/fixtures/index.ts
4
+ /**
5
+ * Declare a fixture. The export name is the fixture id; the loader collects every
6
+ * exported fixture value from every module under the workspace's `fixtures/`
7
+ * directory. Validation is the loader's: this returns the spec, branded.
8
+ */
9
+ function defineFixture(spec) {
10
+ return {
11
+ ...spec,
12
+ [FIXTURE]: true
13
+ };
14
+ }
15
+ /**
16
+ * State the content a fill would generate for one placed instance of a section: its
17
+ * generative slots and its display state, typed by the section value. A fact-bound or
18
+ * computed slot is never stated here — derived information is taken from the property.
19
+ * Media is stated by value, as an entry of the fixture's property (`hero_image:
20
+ * deckShot`), of the slot's own kind; an entry the property does not carry is a check
21
+ * error. A second placed instance names itself with `instance`, the same id the
22
+ * placement wrote.
23
+ */
24
+ function content(section, values, options = {}) {
25
+ const stated = values;
26
+ return options.instance === void 0 ? {
27
+ section,
28
+ values: stated
29
+ } : {
30
+ section,
31
+ values: stated,
32
+ instance: options.instance
33
+ };
34
+ }
35
+
36
+ //#endregion
37
+ export { content, defineFixture };
@@ -0,0 +1,53 @@
1
+ import { ATTR_ISLAND_FRAMELESS, ATTR_ISLAND_ID, ATTR_ISLAND_KEY, ATTR_ISLAND_PROPS, EDITOR_BRIDGE_PROP, EDITOR_BRIDGE_PROTOCOL, EditorBridge, EditorBridgeSelection, EditorSelection, ISLAND_CAPTURE_HOLDS_GLOBAL, ISLAND_ELEMENT, IslandComponent, IslandEditor, IslandEditorOptions, IslandModule, IslandProps, IslandPropsError, IslandServerFrame, deserializeIslandProps, islandId, serializeIslandProps } from "./packages/internal/island-runtime/dist/contract.js";
2
+ import "./asset-modules.js";
3
+ import { ResponsiveImage, ResponsiveSource } from "./packages/internal/image-descriptor/dist/index.js";
4
+ import { VideoCollectionValue, VideoValue } from "./packages/internal/template-contracts/dist/video-value.js";
5
+ import { TourCollectionValue, TourValue } from "./packages/internal/template-contracts/dist/tour-value.js";
6
+ import { DocumentCollectionValue, DocumentValue } from "./packages/internal/template-contracts/dist/document-value.js";
7
+ import { PoiPhoto, PoiRow } from "./packages/internal/template-contracts/dist/poi-row.js";
8
+ import { ComparableRow, Coordinates, FloorplanAssignment, Narrative, UnitRow } from "./schema/property-facts.js";
9
+ import { AuthorImage, ContactRow, ImageCollectionValue, ImageValue, PlaybackConfig } from "./schema/runtime-values.js";
10
+ import { CollectionRowValues, DerivedFactRef, DirectFactRef, FactNamespace, fact } from "./schema/fact.js";
11
+ import { Facts, FactsAddress, FactsContact, FactsDocument, FactsDocumentNote, FactsFloorPlan, FactsNarrative, FactsPhoto, FactsTour, FactsUnit, FactsVideo } from "./packages/internal/template-contracts/dist/facts-view.js";
12
+ import { ComputeBinding, compute } from "./schema/compute.js";
13
+ import { TextStructure } from "./schema/fill-spec.js";
14
+ import { BuiltDecision, ChosenRows, DecisionKind, DisplayChoice, NamedRows, RowOrigination, chooseFrom, contactAssign, documentAssign, imageAssign, listFill, nameRows, textBlock, tourAssign, videoAssign } from "./schema/fill-builders.js";
15
+ import { CropConfig, DisplayEntryInput, DocumentSlotDef, ImageSlotDef, ListRecordSlotDef, ListSlotDef, NumberSlotDef, PoiSlotDef, SelectSlotDef, SlotSource, TextSlotDef, TourSlotDef, UrlSlotDef, VideoSlotDef, document, image, list, number, poi, select, text, tour, url, video } from "./schema/slot-builders.js";
16
+ import { DocumentSlot, ImageSlot, ListFieldSlot, ListItemSlot, ListSlot, NumberSlot, PoiSlot, SelectSlot, TextSlot, TourSlot, UrlSlot, VideoSlot } from "./schema/slot-types.js";
17
+ import "./schema/section-schema.js";
18
+ import { RowValue, SlotValue } from "./schema/section-props.js";
19
+ import { UseEditorResult, useEditor } from "./packages/internal/island-runtime/dist/use-editor.js";
20
+ import { useCaptureReady } from "./packages/internal/island-runtime/dist/use-capture-ready.js";
21
+ import { IslandMarker, IslandMarkerProps } from "./islands/marker.js";
22
+ import { BoundSlotValue, FieldBinding, ItemBinding, RowBinding, SlotBinding, SlotBindingMap, bindItems } from "./primitives/slot-bindings.js";
23
+ import { SectionOptions, SlotRef } from "./section/declare.js";
24
+ import { SectionContractProps, SectionPlacementProps, SectionRenderBindings, SectionValue, section } from "./section/section.js";
25
+ import { DocumentFormat, FormatIdentity, ImageFormat, PhysicalLength } from "./packages/internal/format-geometry/dist/format.js";
26
+ import { WebsiteFormat } from "./schema/format.js";
27
+ import { Edit, ReconcileContext, ReconcileRule, ReconcileRuleOptions, SetEdit, SiteValues, SiteViewOf, rule, set } from "./template/reconcile.js";
28
+ import { CanvasInput, CanvasesInput, DefineTemplateInput, OutputClass, PageComponent, RenderedPage, TemplateCanvas, TemplatePage, TemplatePreview, TemplateScope, TemplateValue, WebsitePage, defineTemplate } from "./template/define-template.js";
29
+ import { FrameShell } from "./primitives/FrameShell.js";
30
+ import { Image } from "./primitives/Image.js";
31
+ import { PicturePlan, PictureSourceSpec } from "./primitives/picture-sources.js";
32
+ import { Section } from "./primitives/Section.js";
33
+ import { SlotGroup } from "./primitives/slot-group.js";
34
+ import { ValueBinding } from "./primitives/slot-scalar.js";
35
+ import { Tour } from "./primitives/Tour.js";
36
+ import { Video } from "./primitives/Video.js";
37
+ import { Slot } from "./primitives/slot.js";
38
+ import "./primitives/index.js";
39
+ 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";
40
+ import { presets } from "./schema/format-presets.js";
41
+ import { a4Landscape, a4Portrait, deck16x9, facebookPost, halfLetterFlyer, instagramPortrait, instagramSquare, instagramStory, letterLandscape, letterPortrait, linkedinPost, postcard6x4, postcard7x5, website, xPost } from "./schema/formats.js";
42
+ //#region src/index.d.ts
43
+ /**
44
+ * The published version of this package.
45
+ *
46
+ * Read from package.json and inlined at build time, so it cannot drift: changesets
47
+ * owns package.json's version, and a hardcoded constant would have to be hand-edited
48
+ * on every release. src/index.test.ts asserts it against package.json to prove the
49
+ * inlining actually happened.
50
+ */
51
+ declare const CONCRETE_VERSION: string;
52
+ //#endregion
53
+ 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 AuthorImage, type BoundSlotValue, type BuiltDecision, CONCRETE_VERSION, type CanvasInput, type CanvasesInput, type ChosenRows, type CollectionRowValues, type ComparableRow, type ComputeBinding, type ContactRow, type Coordinates, type CropConfig, type DecisionKind, type DefineTemplateInput, type DerivedFactRef, type DirectFactRef, type DisplayChoice, type DisplayEntryInput, type DocumentCollectionValue, type DocumentFormat, type DocumentSlot, type DocumentSlotDef, type DocumentValue, EDITOR_BRIDGE_PROP, EDITOR_BRIDGE_PROTOCOL, type Edit, EditorBridge, EditorBridgeSelection, EditorSelection, type FactNamespace, type Facts, type FactsAddress, type FactsContact, type FactsDocument, type FactsDocumentNote, type FactsFloorPlan, type FactsNarrative, type FactsPhoto, type FactsTour, type FactsUnit, type FactsVideo, type FieldBinding, type FloorplanAssignment, type FormatIdentity, FrameShell, ISLAND_CAPTURE_HOLDS_GLOBAL, ISLAND_ELEMENT, Image, type ImageCollectionValue, type ImageFormat, type ImageSlot, type ImageSlotDef, type ImageValue, IslandComponent, IslandEditor, IslandEditorOptions, IslandMarker, type IslandMarkerProps, IslandModule, IslandProps, IslandPropsError, IslandServerFrame, type ItemBinding, type ListFieldSlot, type ListItemSlot, type ListRecordSlotDef, type ListSlot, type ListSlotDef, type NamedRows, type Narrative, type NumberSlot, type NumberSlotDef, type OutputClass, type PageComponent, type PhysicalLength, type PicturePlan, type PictureSourceSpec, type PlaybackConfig, type PoiPhoto, type PoiRow, type PoiSlot, type PoiSlotDef, type ReconcileContext, type ReconcileRule, type ReconcileRuleOptions, type RenderedPage, type ResponsiveImage, type ResponsiveSource, type RowBinding, type RowOrigination, type RowValue, Section, type SectionContractProps, type SectionOptions, type SectionPlacementProps, type SectionRenderBindings, type SectionValue, type SelectSlot, type SelectSlotDef, type SetEdit, type SiteValues, type SiteViewOf, Slot, type SlotBinding, type SlotBindingMap, SlotGroup, type SlotRef, type SlotSource, type SlotValue, type TemplateCanvas, type TemplatePage, type TemplatePreview, type TemplateScope, type TemplateValue, type TextSlot, type TextSlotDef, type TextStructure, Tour, type TourCollectionValue, type TourSlot, type TourSlotDef, type TourValue, type UnitRow, type UrlSlot, type UrlSlotDef, type UseEditorResult, type ValueBinding, Video, type VideoCollectionValue, type VideoSlot, type VideoSlotDef, type VideoValue, type WebsiteFormat, type WebsitePage, a4Landscape, a4Portrait, bindItems, chooseFrom, compute, contactAssign, deck16x9, defineTemplate, deserializeIslandProps, document, documentAssign, facebookPost, fact, halfLetterFlyer, image, imageAssign, instagramPortrait, instagramSquare, instagramStory, islandId, letterLandscape, letterPortrait, linkedinPost, list, listFill, nameRows, number, poi, postcard6x4, postcard7x5, presets, rule, section, select, serializeIslandProps, set, text, textBlock, tour, tourAssign, url, useCaptureReady, useEditor, video, videoAssign, website, xPost };