@elytracms/core 0.0.6

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 (521) hide show
  1. package/LICENSE +21 -0
  2. package/dist/clipboard/build.d.ts +77 -0
  3. package/dist/clipboard/build.js +128 -0
  4. package/dist/clipboard/build.js.map +1 -0
  5. package/dist/clipboard/clipboard.d.ts +33 -0
  6. package/dist/clipboard/clipboard.js +45 -0
  7. package/dist/clipboard/clipboard.js.map +1 -0
  8. package/dist/clipboard/fragment.d.ts +112 -0
  9. package/dist/clipboard/fragment.js +79 -0
  10. package/dist/clipboard/fragment.js.map +1 -0
  11. package/dist/clipboard/html.d.ts +26 -0
  12. package/dist/clipboard/html.js +82 -0
  13. package/dist/clipboard/html.js.map +1 -0
  14. package/dist/clipboard/index.d.ts +15 -0
  15. package/dist/clipboard/index.js +16 -0
  16. package/dist/clipboard/index.js.map +1 -0
  17. package/dist/clipboard/references.d.ts +50 -0
  18. package/dist/clipboard/references.js +0 -0
  19. package/dist/clipboard/references.js.map +1 -0
  20. package/dist/clipboard/serialize.d.ts +69 -0
  21. package/dist/clipboard/serialize.js +130 -0
  22. package/dist/clipboard/serialize.js.map +1 -0
  23. package/dist/cms-core/collections.d.ts +82 -0
  24. package/dist/cms-core/collections.js +187 -0
  25. package/dist/cms-core/collections.js.map +1 -0
  26. package/dist/cms-core/documents.d.ts +71 -0
  27. package/dist/cms-core/documents.js +67 -0
  28. package/dist/cms-core/documents.js.map +1 -0
  29. package/dist/cms-core/envelopes.d.ts +80 -0
  30. package/dist/cms-core/envelopes.js +124 -0
  31. package/dist/cms-core/envelopes.js.map +1 -0
  32. package/dist/cms-core/fields.d.ts +220 -0
  33. package/dist/cms-core/fields.js +250 -0
  34. package/dist/cms-core/fields.js.map +1 -0
  35. package/dist/cms-core/fixtures.d.ts +92 -0
  36. package/dist/cms-core/fixtures.js +357 -0
  37. package/dist/cms-core/fixtures.js.map +1 -0
  38. package/dist/cms-core/hierarchy.d.ts +113 -0
  39. package/dist/cms-core/hierarchy.js +223 -0
  40. package/dist/cms-core/hierarchy.js.map +1 -0
  41. package/dist/cms-core/index.d.ts +25 -0
  42. package/dist/cms-core/index.js +26 -0
  43. package/dist/cms-core/index.js.map +1 -0
  44. package/dist/cms-core/infer.d.ts +103 -0
  45. package/dist/cms-core/infer.js +57 -0
  46. package/dist/cms-core/infer.js.map +1 -0
  47. package/dist/cms-core/issues.d.ts +92 -0
  48. package/dist/cms-core/issues.js +74 -0
  49. package/dist/cms-core/issues.js.map +1 -0
  50. package/dist/cms-core/json-schema.d.ts +25 -0
  51. package/dist/cms-core/json-schema.js +110 -0
  52. package/dist/cms-core/json-schema.js.map +1 -0
  53. package/dist/cms-core/localization.d.ts +51 -0
  54. package/dist/cms-core/localization.js +89 -0
  55. package/dist/cms-core/localization.js.map +1 -0
  56. package/dist/cms-core/routes.d.ts +76 -0
  57. package/dist/cms-core/routes.js +220 -0
  58. package/dist/cms-core/routes.js.map +1 -0
  59. package/dist/cms-core/self-type.d.ts +41 -0
  60. package/dist/cms-core/self-type.js +191 -0
  61. package/dist/cms-core/self-type.js.map +1 -0
  62. package/dist/cms-core/url-for-document.d.ts +39 -0
  63. package/dist/cms-core/url-for-document.js +138 -0
  64. package/dist/cms-core/url-for-document.js.map +1 -0
  65. package/dist/cms-core/validate-document.d.ts +121 -0
  66. package/dist/cms-core/validate-document.js +871 -0
  67. package/dist/cms-core/validate-document.js.map +1 -0
  68. package/dist/cms-core/versions.d.ts +75 -0
  69. package/dist/cms-core/versions.js +97 -0
  70. package/dist/cms-core/versions.js.map +1 -0
  71. package/dist/collaboration/approval.d.ts +68 -0
  72. package/dist/collaboration/approval.js +104 -0
  73. package/dist/collaboration/approval.js.map +1 -0
  74. package/dist/collaboration/collaboration.d.ts +49 -0
  75. package/dist/collaboration/collaboration.js +56 -0
  76. package/dist/collaboration/collaboration.js.map +1 -0
  77. package/dist/collaboration/comments.d.ts +72 -0
  78. package/dist/collaboration/comments.js +118 -0
  79. package/dist/collaboration/comments.js.map +1 -0
  80. package/dist/collaboration/core.d.ts +25 -0
  81. package/dist/collaboration/core.js +26 -0
  82. package/dist/collaboration/core.js.map +1 -0
  83. package/dist/collaboration/index.d.ts +14 -0
  84. package/dist/collaboration/index.js +15 -0
  85. package/dist/collaboration/index.js.map +1 -0
  86. package/dist/collaboration/presence.d.ts +62 -0
  87. package/dist/collaboration/presence.js +85 -0
  88. package/dist/collaboration/presence.js.map +1 -0
  89. package/dist/collaboration/publishing.d.ts +60 -0
  90. package/dist/collaboration/publishing.js +93 -0
  91. package/dist/collaboration/publishing.js.map +1 -0
  92. package/dist/collaboration/versions.d.ts +52 -0
  93. package/dist/collaboration/versions.js +81 -0
  94. package/dist/collaboration/versions.js.map +1 -0
  95. package/dist/component-registry/index.d.ts +3 -0
  96. package/dist/component-registry/index.js +4 -0
  97. package/dist/component-registry/index.js.map +1 -0
  98. package/dist/component-registry/issues.d.ts +6 -0
  99. package/dist/component-registry/issues.js +2 -0
  100. package/dist/component-registry/issues.js.map +1 -0
  101. package/dist/component-registry/manifest.d.ts +164 -0
  102. package/dist/component-registry/manifest.js +129 -0
  103. package/dist/component-registry/manifest.js.map +1 -0
  104. package/dist/component-registry/registry.d.ts +33 -0
  105. package/dist/component-registry/registry.js +90 -0
  106. package/dist/component-registry/registry.js.map +1 -0
  107. package/dist/content/__fixtures__/filterable-collections.d.ts +14 -0
  108. package/dist/content/__fixtures__/filterable-collections.js +15 -0
  109. package/dist/content/__fixtures__/filterable-collections.js.map +1 -0
  110. package/dist/content/__fixtures__/sample-accessor-types.d.ts +56 -0
  111. package/dist/content/__fixtures__/sample-accessor-types.js +5 -0
  112. package/dist/content/__fixtures__/sample-accessor-types.js.map +1 -0
  113. package/dist/content/__fixtures__/sample-delivery-types.d.ts +122 -0
  114. package/dist/content/__fixtures__/sample-delivery-types.js +5 -0
  115. package/dist/content/__fixtures__/sample-delivery-types.js.map +1 -0
  116. package/dist/content/assets.d.ts +53 -0
  117. package/dist/content/assets.js +38 -0
  118. package/dist/content/assets.js.map +1 -0
  119. package/dist/content/binding-sources.d.ts +53 -0
  120. package/dist/content/binding-sources.js +73 -0
  121. package/dist/content/binding-sources.js.map +1 -0
  122. package/dist/content/client.d.ts +90 -0
  123. package/dist/content/client.js +383 -0
  124. package/dist/content/client.js.map +1 -0
  125. package/dist/content/codegen.d.ts +54 -0
  126. package/dist/content/codegen.js +305 -0
  127. package/dist/content/codegen.js.map +1 -0
  128. package/dist/content/context.d.ts +38 -0
  129. package/dist/content/context.js +21 -0
  130. package/dist/content/context.js.map +1 -0
  131. package/dist/content/cursor.d.ts +33 -0
  132. package/dist/content/cursor.js +104 -0
  133. package/dist/content/cursor.js.map +1 -0
  134. package/dist/content/index.d.ts +28 -0
  135. package/dist/content/index.js +29 -0
  136. package/dist/content/index.js.map +1 -0
  137. package/dist/content/locale.d.ts +30 -0
  138. package/dist/content/locale.js +26 -0
  139. package/dist/content/locale.js.map +1 -0
  140. package/dist/content/perspective.d.ts +29 -0
  141. package/dist/content/perspective.js +31 -0
  142. package/dist/content/perspective.js.map +1 -0
  143. package/dist/content/populate.d.ts +25 -0
  144. package/dist/content/populate.js +22 -0
  145. package/dist/content/populate.js.map +1 -0
  146. package/dist/content/query.d.ts +122 -0
  147. package/dist/content/query.js +257 -0
  148. package/dist/content/query.js.map +1 -0
  149. package/dist/content/raw.d.ts +13 -0
  150. package/dist/content/raw.js +14 -0
  151. package/dist/content/raw.js.map +1 -0
  152. package/dist/content/resolve.d.ts +97 -0
  153. package/dist/content/resolve.js +261 -0
  154. package/dist/content/resolve.js.map +1 -0
  155. package/dist/content/serialize.d.ts +30 -0
  156. package/dist/content/serialize.js +57 -0
  157. package/dist/content/serialize.js.map +1 -0
  158. package/dist/content/tags.d.ts +54 -0
  159. package/dist/content/tags.js +40 -0
  160. package/dist/content/tags.js.map +1 -0
  161. package/dist/data-binding/fixtures.d.ts +20 -0
  162. package/dist/data-binding/fixtures.js +47 -0
  163. package/dist/data-binding/fixtures.js.map +1 -0
  164. package/dist/data-binding/index.d.ts +14 -0
  165. package/dist/data-binding/index.js +15 -0
  166. package/dist/data-binding/index.js.map +1 -0
  167. package/dist/data-binding/issues.d.ts +45 -0
  168. package/dist/data-binding/issues.js +46 -0
  169. package/dist/data-binding/issues.js.map +1 -0
  170. package/dist/data-binding/resolve.d.ts +87 -0
  171. package/dist/data-binding/resolve.js +204 -0
  172. package/dist/data-binding/resolve.js.map +1 -0
  173. package/dist/data-binding/sample.d.ts +21 -0
  174. package/dist/data-binding/sample.js +23 -0
  175. package/dist/data-binding/sample.js.map +1 -0
  176. package/dist/data-binding/sources.d.ts +225 -0
  177. package/dist/data-binding/sources.js +154 -0
  178. package/dist/data-binding/sources.js.map +1 -0
  179. package/dist/data-binding/tokens.d.ts +62 -0
  180. package/dist/data-binding/tokens.js +150 -0
  181. package/dist/data-binding/tokens.js.map +1 -0
  182. package/dist/design-tokens/css.d.ts +34 -0
  183. package/dist/design-tokens/css.js +51 -0
  184. package/dist/design-tokens/css.js.map +1 -0
  185. package/dist/design-tokens/index.d.ts +10 -0
  186. package/dist/design-tokens/index.js +11 -0
  187. package/dist/design-tokens/index.js.map +1 -0
  188. package/dist/design-tokens/style-guide.d.ts +30 -0
  189. package/dist/design-tokens/style-guide.js +31 -0
  190. package/dist/design-tokens/style-guide.js.map +1 -0
  191. package/dist/design-tokens/tokens.d.ts +89 -0
  192. package/dist/design-tokens/tokens.js +112 -0
  193. package/dist/design-tokens/tokens.js.map +1 -0
  194. package/dist/export-sync/builder-source.d.ts +85 -0
  195. package/dist/export-sync/builder-source.js +124 -0
  196. package/dist/export-sync/builder-source.js.map +1 -0
  197. package/dist/export-sync/check.d.ts +61 -0
  198. package/dist/export-sync/check.js +126 -0
  199. package/dist/export-sync/check.js.map +1 -0
  200. package/dist/export-sync/cli.d.ts +89 -0
  201. package/dist/export-sync/cli.js +323 -0
  202. package/dist/export-sync/cli.js.map +1 -0
  203. package/dist/export-sync/core.d.ts +58 -0
  204. package/dist/export-sync/core.js +41 -0
  205. package/dist/export-sync/core.js.map +1 -0
  206. package/dist/export-sync/eject.d.ts +28 -0
  207. package/dist/export-sync/eject.js +21 -0
  208. package/dist/export-sync/eject.js.map +1 -0
  209. package/dist/export-sync/fixtures.d.ts +25 -0
  210. package/dist/export-sync/fixtures.js +87 -0
  211. package/dist/export-sync/fixtures.js.map +1 -0
  212. package/dist/export-sync/generate.d.ts +7 -0
  213. package/dist/export-sync/generate.js +505 -0
  214. package/dist/export-sync/generate.js.map +1 -0
  215. package/dist/export-sync/index.d.ts +37 -0
  216. package/dist/export-sync/index.js +39 -0
  217. package/dist/export-sync/index.js.map +1 -0
  218. package/dist/export-sync/init.d.ts +123 -0
  219. package/dist/export-sync/init.js +234 -0
  220. package/dist/export-sync/init.js.map +1 -0
  221. package/dist/export-sync/manifest-host.d.ts +48 -0
  222. package/dist/export-sync/manifest-host.js +73 -0
  223. package/dist/export-sync/manifest-host.js.map +1 -0
  224. package/dist/export-sync/node.d.ts +20 -0
  225. package/dist/export-sync/node.js +101 -0
  226. package/dist/export-sync/node.js.map +1 -0
  227. package/dist/export-sync/push.d.ts +76 -0
  228. package/dist/export-sync/push.js +197 -0
  229. package/dist/export-sync/push.js.map +1 -0
  230. package/dist/export-sync/registry-sync-client.d.ts +59 -0
  231. package/dist/export-sync/registry-sync-client.js +97 -0
  232. package/dist/export-sync/registry-sync-client.js.map +1 -0
  233. package/dist/export-sync/sync.d.ts +47 -0
  234. package/dist/export-sync/sync.js +47 -0
  235. package/dist/export-sync/sync.js.map +1 -0
  236. package/dist/export-sync/typegen.d.ts +40 -0
  237. package/dist/export-sync/typegen.js +45 -0
  238. package/dist/export-sync/typegen.js.map +1 -0
  239. package/dist/export-sync/validate.d.ts +19 -0
  240. package/dist/export-sync/validate.js +102 -0
  241. package/dist/export-sync/validate.js.map +1 -0
  242. package/dist/export-sync/watch.d.ts +66 -0
  243. package/dist/export-sync/watch.js +70 -0
  244. package/dist/export-sync/watch.js.map +1 -0
  245. package/dist/operations/assets.d.ts +198 -0
  246. package/dist/operations/assets.js +75 -0
  247. package/dist/operations/assets.js.map +1 -0
  248. package/dist/operations/authorization.d.ts +49 -0
  249. package/dist/operations/authorization.js +128 -0
  250. package/dist/operations/authorization.js.map +1 -0
  251. package/dist/operations/changesets.d.ts +160 -0
  252. package/dist/operations/changesets.js +442 -0
  253. package/dist/operations/changesets.js.map +1 -0
  254. package/dist/operations/client.d.ts +49 -0
  255. package/dist/operations/client.js +57 -0
  256. package/dist/operations/client.js.map +1 -0
  257. package/dist/operations/core.d.ts +238 -0
  258. package/dist/operations/core.js +269 -0
  259. package/dist/operations/core.js.map +1 -0
  260. package/dist/operations/documents.d.ts +432 -0
  261. package/dist/operations/documents.js +344 -0
  262. package/dist/operations/documents.js.map +1 -0
  263. package/dist/operations/graph.d.ts +138 -0
  264. package/dist/operations/graph.js +78 -0
  265. package/dist/operations/graph.js.map +1 -0
  266. package/dist/operations/index.d.ts +19 -0
  267. package/dist/operations/index.js +20 -0
  268. package/dist/operations/index.js.map +1 -0
  269. package/dist/operations/members.d.ts +87 -0
  270. package/dist/operations/members.js +56 -0
  271. package/dist/operations/members.js.map +1 -0
  272. package/dist/operations/publishing.d.ts +89 -0
  273. package/dist/operations/publishing.js +57 -0
  274. package/dist/operations/publishing.js.map +1 -0
  275. package/dist/operations/references.d.ts +222 -0
  276. package/dist/operations/references.js +177 -0
  277. package/dist/operations/references.js.map +1 -0
  278. package/dist/operations/schema.d.ts +413 -0
  279. package/dist/operations/schema.js +138 -0
  280. package/dist/operations/schema.js.map +1 -0
  281. package/dist/operations/tokens.d.ts +79 -0
  282. package/dist/operations/tokens.js +102 -0
  283. package/dist/operations/tokens.js.map +1 -0
  284. package/dist/persistence/adapter.d.ts +79 -0
  285. package/dist/persistence/adapter.js +55 -0
  286. package/dist/persistence/adapter.js.map +1 -0
  287. package/dist/persistence/assets.d.ts +120 -0
  288. package/dist/persistence/assets.js +141 -0
  289. package/dist/persistence/assets.js.map +1 -0
  290. package/dist/persistence/backend-validation.d.ts +43 -0
  291. package/dist/persistence/backend-validation.js +57 -0
  292. package/dist/persistence/backend-validation.js.map +1 -0
  293. package/dist/persistence/cli-tokens.d.ts +50 -0
  294. package/dist/persistence/cli-tokens.js +66 -0
  295. package/dist/persistence/cli-tokens.js.map +1 -0
  296. package/dist/persistence/cms.d.ts +148 -0
  297. package/dist/persistence/cms.js +232 -0
  298. package/dist/persistence/cms.js.map +1 -0
  299. package/dist/persistence/contract-scenarios.d.ts +73 -0
  300. package/dist/persistence/contract-scenarios.js +496 -0
  301. package/dist/persistence/contract-scenarios.js.map +1 -0
  302. package/dist/persistence/core.d.ts +96 -0
  303. package/dist/persistence/core.js +110 -0
  304. package/dist/persistence/core.js.map +1 -0
  305. package/dist/persistence/graph.d.ts +61 -0
  306. package/dist/persistence/graph.js +98 -0
  307. package/dist/persistence/graph.js.map +1 -0
  308. package/dist/persistence/index.d.ts +22 -0
  309. package/dist/persistence/index.js +23 -0
  310. package/dist/persistence/index.js.map +1 -0
  311. package/dist/persistence/members.d.ts +70 -0
  312. package/dist/persistence/members.js +0 -0
  313. package/dist/persistence/members.js.map +1 -0
  314. package/dist/persistence/publishing.d.ts +59 -0
  315. package/dist/persistence/publishing.js +95 -0
  316. package/dist/persistence/publishing.js.map +1 -0
  317. package/dist/persistence/reference-extraction.d.ts +44 -0
  318. package/dist/persistence/reference-extraction.js +204 -0
  319. package/dist/persistence/reference-extraction.js.map +1 -0
  320. package/dist/persistence/reference-indexing.d.ts +68 -0
  321. package/dist/persistence/reference-indexing.js +112 -0
  322. package/dist/persistence/reference-indexing.js.map +1 -0
  323. package/dist/persistence/references.d.ts +257 -0
  324. package/dist/persistence/references.js +0 -0
  325. package/dist/persistence/references.js.map +1 -0
  326. package/dist/persistence/seed.d.ts +55 -0
  327. package/dist/persistence/seed.js +102 -0
  328. package/dist/persistence/seed.js.map +1 -0
  329. package/dist/persistence/self-maintaining-adapter.d.ts +41 -0
  330. package/dist/persistence/self-maintaining-adapter.js +79 -0
  331. package/dist/persistence/self-maintaining-adapter.js.map +1 -0
  332. package/dist/plugins/asset-storage.d.ts +76 -0
  333. package/dist/plugins/asset-storage.js +104 -0
  334. package/dist/plugins/asset-storage.js.map +1 -0
  335. package/dist/plugins/component-package.d.ts +54 -0
  336. package/dist/plugins/component-package.js +92 -0
  337. package/dist/plugins/component-package.js.map +1 -0
  338. package/dist/plugins/data-sources.d.ts +78 -0
  339. package/dist/plugins/data-sources.js +99 -0
  340. package/dist/plugins/data-sources.js.map +1 -0
  341. package/dist/plugins/examples.d.ts +47 -0
  342. package/dist/plugins/examples.js +205 -0
  343. package/dist/plugins/examples.js.map +1 -0
  344. package/dist/plugins/export-targets.d.ts +47 -0
  345. package/dist/plugins/export-targets.js +78 -0
  346. package/dist/plugins/export-targets.js.map +1 -0
  347. package/dist/plugins/field-types.d.ts +86 -0
  348. package/dist/plugins/field-types.js +93 -0
  349. package/dist/plugins/field-types.js.map +1 -0
  350. package/dist/plugins/hooks.d.ts +60 -0
  351. package/dist/plugins/hooks.js +94 -0
  352. package/dist/plugins/hooks.js.map +1 -0
  353. package/dist/plugins/index.d.ts +27 -0
  354. package/dist/plugins/index.js +28 -0
  355. package/dist/plugins/index.js.map +1 -0
  356. package/dist/plugins/marketplace.d.ts +90 -0
  357. package/dist/plugins/marketplace.js +110 -0
  358. package/dist/plugins/marketplace.js.map +1 -0
  359. package/dist/plugins/plugin.d.ts +107 -0
  360. package/dist/plugins/plugin.js +122 -0
  361. package/dist/plugins/plugin.js.map +1 -0
  362. package/dist/plugins/templates.d.ts +66 -0
  363. package/dist/plugins/templates.js +74 -0
  364. package/dist/plugins/templates.js.map +1 -0
  365. package/dist/project-graph/binding.d.ts +68 -0
  366. package/dist/project-graph/binding.js +39 -0
  367. package/dist/project-graph/binding.js.map +1 -0
  368. package/dist/project-graph/container.d.ts +126 -0
  369. package/dist/project-graph/container.js +221 -0
  370. package/dist/project-graph/container.js.map +1 -0
  371. package/dist/project-graph/edit.d.ts +66 -0
  372. package/dist/project-graph/edit.js +201 -0
  373. package/dist/project-graph/edit.js.map +1 -0
  374. package/dist/project-graph/fixtures.d.ts +51 -0
  375. package/dist/project-graph/fixtures.js +224 -0
  376. package/dist/project-graph/fixtures.js.map +1 -0
  377. package/dist/project-graph/ids.d.ts +17 -0
  378. package/dist/project-graph/ids.js +19 -0
  379. package/dist/project-graph/ids.js.map +1 -0
  380. package/dist/project-graph/index.d.ts +12 -0
  381. package/dist/project-graph/index.js +13 -0
  382. package/dist/project-graph/index.js.map +1 -0
  383. package/dist/project-graph/issues.d.ts +61 -0
  384. package/dist/project-graph/issues.js +44 -0
  385. package/dist/project-graph/issues.js.map +1 -0
  386. package/dist/project-graph/json.d.ts +6 -0
  387. package/dist/project-graph/json.js +10 -0
  388. package/dist/project-graph/json.js.map +1 -0
  389. package/dist/project-graph/node.d.ts +48 -0
  390. package/dist/project-graph/node.js +42 -0
  391. package/dist/project-graph/node.js.map +1 -0
  392. package/dist/project-graph/normalize.d.ts +17 -0
  393. package/dist/project-graph/normalize.js +110 -0
  394. package/dist/project-graph/normalize.js.map +1 -0
  395. package/dist/project-graph/serialize.d.ts +36 -0
  396. package/dist/project-graph/serialize.js +51 -0
  397. package/dist/project-graph/serialize.js.map +1 -0
  398. package/dist/project-graph/structure.d.ts +40 -0
  399. package/dist/project-graph/structure.js +36 -0
  400. package/dist/project-graph/structure.js.map +1 -0
  401. package/dist/project-graph/validate.d.ts +84 -0
  402. package/dist/project-graph/validate.js +158 -0
  403. package/dist/project-graph/validate.js.map +1 -0
  404. package/dist/rich-text/adapter.d.ts +43 -0
  405. package/dist/rich-text/adapter.js +24 -0
  406. package/dist/rich-text/adapter.js.map +1 -0
  407. package/dist/rich-text/dom-editor.d.ts +101 -0
  408. package/dist/rich-text/dom-editor.js +482 -0
  409. package/dist/rich-text/dom-editor.js.map +1 -0
  410. package/dist/rich-text/embed.d.ts +70 -0
  411. package/dist/rich-text/embed.js +70 -0
  412. package/dist/rich-text/embed.js.map +1 -0
  413. package/dist/rich-text/fixtures.d.ts +25 -0
  414. package/dist/rich-text/fixtures.js +115 -0
  415. package/dist/rich-text/fixtures.js.map +1 -0
  416. package/dist/rich-text/html.d.ts +5 -0
  417. package/dist/rich-text/html.js +309 -0
  418. package/dist/rich-text/html.js.map +1 -0
  419. package/dist/rich-text/index.d.ts +19 -0
  420. package/dist/rich-text/index.js +20 -0
  421. package/dist/rich-text/index.js.map +1 -0
  422. package/dist/rich-text/markdown.d.ts +7 -0
  423. package/dist/rich-text/markdown.js +235 -0
  424. package/dist/rich-text/markdown.js.map +1 -0
  425. package/dist/rich-text/portable-text.d.ts +50 -0
  426. package/dist/rich-text/portable-text.js +223 -0
  427. package/dist/rich-text/portable-text.js.map +1 -0
  428. package/dist/rich-text/registry.d.ts +48 -0
  429. package/dist/rich-text/registry.js +16 -0
  430. package/dist/rich-text/registry.js.map +1 -0
  431. package/dist/rich-text/render.d.ts +69 -0
  432. package/dist/rich-text/render.js +205 -0
  433. package/dist/rich-text/render.js.map +1 -0
  434. package/dist/rich-text/schema.d.ts +86 -0
  435. package/dist/rich-text/schema.js +80 -0
  436. package/dist/rich-text/schema.js.map +1 -0
  437. package/dist/rich-text/test-support.d.ts +7 -0
  438. package/dist/rich-text/test-support.js +8 -0
  439. package/dist/rich-text/test-support.js.map +1 -0
  440. package/dist/runtime-renderer/client.d.ts +14 -0
  441. package/dist/runtime-renderer/client.js +15 -0
  442. package/dist/runtime-renderer/client.js.map +1 -0
  443. package/dist/runtime-renderer/condition.d.ts +8 -0
  444. package/dist/runtime-renderer/condition.js +48 -0
  445. package/dist/runtime-renderer/condition.js.map +1 -0
  446. package/dist/runtime-renderer/content-client.d.ts +62 -0
  447. package/dist/runtime-renderer/content-client.js +37 -0
  448. package/dist/runtime-renderer/content-client.js.map +1 -0
  449. package/dist/runtime-renderer/context.d.ts +185 -0
  450. package/dist/runtime-renderer/context.js +7 -0
  451. package/dist/runtime-renderer/context.js.map +1 -0
  452. package/dist/runtime-renderer/fallback.d.ts +39 -0
  453. package/dist/runtime-renderer/fallback.js +45 -0
  454. package/dist/runtime-renderer/fallback.js.map +1 -0
  455. package/dist/runtime-renderer/index.d.ts +13 -0
  456. package/dist/runtime-renderer/index.js +13 -0
  457. package/dist/runtime-renderer/index.js.map +1 -0
  458. package/dist/runtime-renderer/primitives.d.ts +85 -0
  459. package/dist/runtime-renderer/primitives.js +442 -0
  460. package/dist/runtime-renderer/primitives.js.map +1 -0
  461. package/dist/runtime-renderer/render.d.ts +138 -0
  462. package/dist/runtime-renderer/render.js +825 -0
  463. package/dist/runtime-renderer/render.js.map +1 -0
  464. package/dist/runtime-renderer/rich-text.d.ts +26 -0
  465. package/dist/runtime-renderer/rich-text.js +113 -0
  466. package/dist/runtime-renderer/rich-text.js.map +1 -0
  467. package/dist/starter-kits/index.d.ts +13 -0
  468. package/dist/starter-kits/index.js +14 -0
  469. package/dist/starter-kits/index.js.map +1 -0
  470. package/dist/starter-kits/instantiate.d.ts +29 -0
  471. package/dist/starter-kits/instantiate.js +24 -0
  472. package/dist/starter-kits/instantiate.js.map +1 -0
  473. package/dist/starter-kits/kit.d.ts +61 -0
  474. package/dist/starter-kits/kit.js +37 -0
  475. package/dist/starter-kits/kit.js.map +1 -0
  476. package/dist/starter-kits/kits.d.ts +7 -0
  477. package/dist/starter-kits/kits.js +201 -0
  478. package/dist/starter-kits/kits.js.map +1 -0
  479. package/dist/starter-kits/manifests.d.ts +7 -0
  480. package/dist/starter-kits/manifests.js +111 -0
  481. package/dist/starter-kits/manifests.js.map +1 -0
  482. package/dist/starter-kits/upgrade.d.ts +39 -0
  483. package/dist/starter-kits/upgrade.js +54 -0
  484. package/dist/starter-kits/upgrade.js.map +1 -0
  485. package/dist/starter-kits/validate.d.ts +16 -0
  486. package/dist/starter-kits/validate.js +77 -0
  487. package/dist/starter-kits/validate.js.map +1 -0
  488. package/dist/studio-core/context.d.ts +27 -0
  489. package/dist/studio-core/context.js +44 -0
  490. package/dist/studio-core/context.js.map +1 -0
  491. package/dist/studio-core/errors.d.ts +58 -0
  492. package/dist/studio-core/errors.js +74 -0
  493. package/dist/studio-core/errors.js.map +1 -0
  494. package/dist/studio-core/fixtures.d.ts +18 -0
  495. package/dist/studio-core/fixtures.js +83 -0
  496. package/dist/studio-core/fixtures.js.map +1 -0
  497. package/dist/studio-core/ids.d.ts +22 -0
  498. package/dist/studio-core/ids.js +33 -0
  499. package/dist/studio-core/ids.js.map +1 -0
  500. package/dist/studio-core/index.d.ts +11 -0
  501. package/dist/studio-core/index.js +12 -0
  502. package/dist/studio-core/index.js.map +1 -0
  503. package/dist/studio-core/issues.d.ts +50 -0
  504. package/dist/studio-core/issues.js +33 -0
  505. package/dist/studio-core/issues.js.map +1 -0
  506. package/dist/studio-core/metadata.d.ts +109 -0
  507. package/dist/studio-core/metadata.js +74 -0
  508. package/dist/studio-core/metadata.js.map +1 -0
  509. package/dist/studio-core/repository.d.ts +73 -0
  510. package/dist/studio-core/repository.js +202 -0
  511. package/dist/studio-core/repository.js.map +1 -0
  512. package/dist/studio-core/sections.d.ts +73 -0
  513. package/dist/studio-core/sections.js +68 -0
  514. package/dist/studio-core/sections.js.map +1 -0
  515. package/dist/studio-core/validate.d.ts +15 -0
  516. package/dist/studio-core/validate.js +119 -0
  517. package/dist/studio-core/validate.js.map +1 -0
  518. package/dist/studio-core/workspace-config.d.ts +587 -0
  519. package/dist/studio-core/workspace-config.js +434 -0
  520. package/dist/studio-core/workspace-config.js.map +1 -0
  521. package/package.json +104 -0
@@ -0,0 +1,442 @@
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ import { createElement } from 'react';
3
+ import { CONTAINER_ALIGNMENTS, GRID_MAX_COLUMNS, GRID_MIN_COLUMNS, SPACING_TOKEN_NAMES, spacingTokenCss, } from '@elytracms/core/project-graph';
4
+ import { defineComponent } from '@elytracms/core/component-registry';
5
+ import { ComponentRegistry } from '@elytracms/core/component-registry';
6
+ import { RichText, RichTextManifest } from './rich-text';
7
+ function asString(value, fallback = '') {
8
+ return typeof value === 'string' ? value : fallback;
9
+ }
10
+ // ---------------------------------------------------------------------------
11
+ // Layout-container styling (EC-161) — gap/alignment resolve from the canonical
12
+ // design-token spacing scale; legacy numeric gaps (`n` → `n * 4px`) stay
13
+ // renderable so pre-token graphs keep their layout.
14
+ // ---------------------------------------------------------------------------
15
+ function gapCss(value) {
16
+ if (typeof value === 'string')
17
+ return spacingTokenCss(value);
18
+ if (typeof value === 'number' && Number.isFinite(value) && value > 0)
19
+ return `${value * 4}px`;
20
+ return undefined;
21
+ }
22
+ const ALIGN_ITEMS = {
23
+ start: 'flex-start',
24
+ center: 'center',
25
+ end: 'flex-end',
26
+ stretch: 'stretch',
27
+ };
28
+ /** `alignItems` for a container `align` prop; undefined for `stretch` (the CSS default) or junk. */
29
+ function alignItemsCss(value) {
30
+ if (value === 'start' || value === 'center' || value === 'end')
31
+ return ALIGN_ITEMS[value];
32
+ return undefined;
33
+ }
34
+ const SPACING_OPTIONS = SPACING_TOKEN_NAMES.map((name) => ({ label: name, value: name }));
35
+ const ALIGN_OPTIONS = CONTAINER_ALIGNMENTS.map((name) => ({ label: name, value: name }));
36
+ // ---------------------------------------------------------------------------
37
+ // Container — a generic block wrapper with a single default slot.
38
+ // ---------------------------------------------------------------------------
39
+ function Container(props) {
40
+ // The default `children` slot and the layout `outlet` slot both render here; the outlet
41
+ // is where `renderCompositionInLayout` injects the page body when this Container is a layout root.
42
+ return (_jsxs("div", { "data-ec-primitive": "Container", children: [props.children, props.outlet] }));
43
+ }
44
+ const ContainerManifest = defineComponent({
45
+ id: 'base.primitives.Container',
46
+ namespace: 'base.primitives',
47
+ title: 'Container',
48
+ category: 'layout',
49
+ props: {},
50
+ // The outlet is filled by page injection, so it is not authored-required.
51
+ slots: [{ name: 'children' }, { name: 'outlet' }],
52
+ });
53
+ // ---------------------------------------------------------------------------
54
+ // Stack — flex layout container (EC-161): direction, token-bound gap, alignment.
55
+ // ---------------------------------------------------------------------------
56
+ function Stack(props) {
57
+ const style = {
58
+ display: 'flex',
59
+ flexDirection: props.direction === 'horizontal' ? 'row' : 'column',
60
+ };
61
+ const gap = gapCss(props.gap);
62
+ if (gap !== undefined)
63
+ style.gap = gap;
64
+ const alignItems = alignItemsCss(props.align);
65
+ if (alignItems !== undefined)
66
+ style.alignItems = alignItems;
67
+ return (_jsx("div", { "data-ec-primitive": "Stack", style: style, children: props.children }));
68
+ }
69
+ const StackManifest = defineComponent({
70
+ id: 'base.primitives.Stack',
71
+ namespace: 'base.primitives',
72
+ title: 'Stack',
73
+ category: 'layout',
74
+ props: {
75
+ direction: {
76
+ type: 'select',
77
+ context: 'prop',
78
+ default: 'vertical',
79
+ options: [
80
+ { value: 'vertical', label: 'Vertical' },
81
+ { value: 'horizontal', label: 'Horizontal' },
82
+ ],
83
+ form: { label: 'Direction' },
84
+ },
85
+ gap: {
86
+ // A design-token spacing step name (EC-161); legacy numeric gaps still render.
87
+ type: 'select',
88
+ context: 'prop',
89
+ default: '4',
90
+ options: SPACING_OPTIONS,
91
+ form: { label: 'Gap' },
92
+ },
93
+ align: {
94
+ type: 'select',
95
+ context: 'prop',
96
+ default: 'stretch',
97
+ options: ALIGN_OPTIONS,
98
+ form: { label: 'Align' },
99
+ },
100
+ },
101
+ slots: [{ name: 'children' }],
102
+ designTokens: ['space.gap'],
103
+ });
104
+ // ---------------------------------------------------------------------------
105
+ // Grid — CSS grid container (EC-161): column count, token-bound gap, alignment.
106
+ // ---------------------------------------------------------------------------
107
+ function asColumns(value) {
108
+ if (typeof value !== 'number' || !Number.isFinite(value))
109
+ return GRID_MIN_COLUMNS;
110
+ return Math.min(Math.max(GRID_MIN_COLUMNS, Math.floor(value)), GRID_MAX_COLUMNS);
111
+ }
112
+ /**
113
+ * Responsive defaults (EC-163): below this viewport width a Grid's columns
114
+ * stack into one. 640px (the Tailwind `sm` boundary) sits between the
115
+ * builder's deterministic preview widths — phone (390px) stacks, tablet
116
+ * (768px) keeps columns.
117
+ */
118
+ export const GRID_MOBILE_BREAKPOINT_PX = 640;
119
+ /**
120
+ * The stack-on-mobile rule a stacking Grid carries with it. A **viewport media
121
+ * query** (not a container query), deliberately: the builder canvas renders
122
+ * into an iframe — a true viewport — so constraining the iframe to the phone
123
+ * width makes this exact rule fire in the preview; and the identical markup
124
+ * server-renders in `@elytracms/next` (App Router SSR) with no client JS, no
125
+ * extra stylesheet wiring, and no `container-type` context that every consumer
126
+ * would otherwise have to guarantee around every grid. The rule is emitted as
127
+ * an inline `<style>` child of the grid itself (style elements generate no
128
+ * grid item), so the behavior is self-contained wherever the implementation
129
+ * renders — canvas iframe portal, static markup, or RSC payload — and the
130
+ * `!important` lets the stylesheet rule beat the grid's own inline column
131
+ * template. Opted-out grids (`stackOnMobile: false`) carry neither the
132
+ * attribute nor the rule.
133
+ */
134
+ export const GRID_STACK_CSS = `@media (max-width: ${GRID_MOBILE_BREAKPOINT_PX}px){[data-ec-grid-stack]{grid-template-columns:minmax(0,1fr) !important}}`;
135
+ function Grid(props) {
136
+ const style = {
137
+ display: 'grid',
138
+ gridTemplateColumns: `repeat(${asColumns(props.columns)}, minmax(0, 1fr))`,
139
+ };
140
+ const gap = gapCss(props.gap);
141
+ if (gap !== undefined)
142
+ style.gap = gap;
143
+ const alignItems = alignItemsCss(props.align);
144
+ if (alignItems !== undefined)
145
+ style.alignItems = alignItems;
146
+ // Stack-on-mobile is the default; only the explicit opt-out keeps columns.
147
+ const stacksOnMobile = props.stackOnMobile !== false;
148
+ return (_jsxs("div", { "data-ec-primitive": "Grid", ...(stacksOnMobile ? { 'data-ec-grid-stack': '' } : {}), style: style, children: [stacksOnMobile ? _jsx("style", { children: GRID_STACK_CSS }) : null, props.children] }));
149
+ }
150
+ const GridManifest = defineComponent({
151
+ id: 'base.primitives.Grid',
152
+ namespace: 'base.primitives',
153
+ title: 'Grid',
154
+ category: 'layout',
155
+ props: {
156
+ columns: {
157
+ type: 'number',
158
+ context: 'prop',
159
+ default: 2,
160
+ validation: { min: GRID_MIN_COLUMNS, max: GRID_MAX_COLUMNS },
161
+ form: { label: 'Columns' },
162
+ },
163
+ gap: {
164
+ type: 'select',
165
+ context: 'prop',
166
+ default: '4',
167
+ options: SPACING_OPTIONS,
168
+ form: { label: 'Gap' },
169
+ },
170
+ align: {
171
+ type: 'select',
172
+ context: 'prop',
173
+ default: 'stretch',
174
+ options: ALIGN_OPTIONS,
175
+ form: { label: 'Align' },
176
+ },
177
+ stackOnMobile: {
178
+ // Responsive default (EC-163): stacking is on unless explicitly opted out.
179
+ type: 'boolean',
180
+ context: 'prop',
181
+ default: true,
182
+ form: { label: 'Stack on phones' },
183
+ },
184
+ },
185
+ slots: [{ name: 'children' }],
186
+ designTokens: ['space.gap'],
187
+ });
188
+ // ---------------------------------------------------------------------------
189
+ // Text — a paragraph of text driven by the `value` prop.
190
+ // ---------------------------------------------------------------------------
191
+ function Text(props) {
192
+ return _jsx("p", { "data-ec-primitive": "Text", children: asString(props.value) });
193
+ }
194
+ const TextManifest = defineComponent({
195
+ id: 'base.primitives.Text',
196
+ namespace: 'base.primitives',
197
+ title: 'Text',
198
+ category: 'content',
199
+ props: {
200
+ value: {
201
+ type: 'text',
202
+ context: 'prop',
203
+ default: '',
204
+ // Plain-text content prop, editable in place on the canvas (EC-158).
205
+ form: { label: 'Text', control: 'textarea', inlineEditable: true },
206
+ },
207
+ },
208
+ slots: [],
209
+ });
210
+ // ---------------------------------------------------------------------------
211
+ // Heading — h1..h6 heading driven by `text` + `level`. Needed by the sample graph.
212
+ // ---------------------------------------------------------------------------
213
+ function Heading(props) {
214
+ const level = typeof props.level === 'number' && props.level >= 1 && props.level <= 6 ? props.level : 2;
215
+ const tag = `h${level}`;
216
+ return createElement(tag, { 'data-ec-primitive': 'Heading' }, asString(props.text));
217
+ }
218
+ const HeadingManifest = defineComponent({
219
+ id: 'base.primitives.Heading',
220
+ namespace: 'base.primitives',
221
+ title: 'Heading',
222
+ category: 'content',
223
+ props: {
224
+ text: {
225
+ type: 'text',
226
+ context: 'prop',
227
+ default: '',
228
+ // Plain-text content prop, editable in place on the canvas (EC-158).
229
+ form: { label: 'Text', inlineEditable: true },
230
+ },
231
+ level: {
232
+ // A numeric heading level 1–6 (the impl clamps out-of-range to 2).
233
+ type: 'number',
234
+ context: 'prop',
235
+ default: 2,
236
+ validation: { min: 1, max: 6 },
237
+ form: { label: 'Level' },
238
+ },
239
+ },
240
+ slots: [],
241
+ });
242
+ // ---------------------------------------------------------------------------
243
+ // Image — an <img> with src/alt plus intrinsic dimensions (EC-152). Width and
244
+ // height come from the asset metadata record (bindable to the delivery
245
+ // shape's `width`/`height`) so rendered images reserve layout space — no
246
+ // layout shift. A plain <img> is correct for non-Next contexts (the builder
247
+ // canvas runs on Vite); `@elytracms/next` overrides this implementation with
248
+ // `ElytraImage` (next/image) for host apps.
249
+ // ---------------------------------------------------------------------------
250
+ function asPositiveInt(value) {
251
+ return typeof value === 'number' && Number.isInteger(value) && value > 0 ? value : undefined;
252
+ }
253
+ /** Read a resolved asset's `focalPoint` defensively (a `{ x, y }` pair in 0–1). */
254
+ function asFocalPoint(value) {
255
+ if (value && typeof value === 'object' && !Array.isArray(value)) {
256
+ const point = value;
257
+ if (typeof point.x === 'number' && typeof point.y === 'number') {
258
+ return { x: point.x, y: point.y };
259
+ }
260
+ }
261
+ return null;
262
+ }
263
+ export function normalizeImageSource(props) {
264
+ const src = props.src;
265
+ const asset = src && typeof src === 'object' && !Array.isArray(src)
266
+ ? src
267
+ : null;
268
+ const url = asset ? asString(asset.url) : asString(src);
269
+ const width = asPositiveInt(props.width) ?? (asset ? asPositiveInt(asset.width) : undefined);
270
+ const height = asPositiveInt(props.height) ?? (asset ? asPositiveInt(asset.height) : undefined);
271
+ const alt = asString(props.alt) || (asset ? asString(asset.alt) : '');
272
+ const focalPoint = asset ? asFocalPoint(asset.focalPoint) : null;
273
+ return { url, width, height, alt, focalPoint };
274
+ }
275
+ /** EC-230: a focal point becomes a CSS `object-position` string (percent of each axis). */
276
+ export function focalPointObjectPosition(focalPoint) {
277
+ return focalPoint ? `${focalPoint.x * 100}% ${focalPoint.y * 100}%` : undefined;
278
+ }
279
+ function Image(props) {
280
+ const { url, width, height, alt, focalPoint } = normalizeImageSource(props);
281
+ const objectPosition = focalPointObjectPosition(focalPoint);
282
+ // No resolved url (no asset picked yet, or an unresolved id): a visible
283
+ // placeholder, never a broken `<img src="">` (EC-195 / EC-015).
284
+ if (url === '') {
285
+ return (_jsx("span", { "data-ec-primitive": "Image", "data-ec-image": "empty", role: "img", "aria-label": alt || 'No image selected', children: "No image selected" }));
286
+ }
287
+ return (_jsx("img", { "data-ec-primitive": "Image", src: url, alt: alt, ...(width !== undefined ? { width } : {}), ...(height !== undefined ? { height } : {}), ...(objectPosition ? { style: { objectPosition } } : {}) }));
288
+ }
289
+ const ImageManifest = defineComponent({
290
+ id: 'base.primitives.Image',
291
+ namespace: 'base.primitives',
292
+ title: 'Image',
293
+ category: 'media',
294
+ props: {
295
+ // EC-195: `asset`-typed, so the editor picks an uploaded asset (the renderer
296
+ // resolves the id to a url + intrinsic dimensions at delivery) — a plain URL
297
+ // string still works (the resolver passes URL-like values through).
298
+ src: {
299
+ type: 'asset',
300
+ cardinality: 'one',
301
+ context: 'prop',
302
+ default: '',
303
+ form: { label: 'Image' },
304
+ },
305
+ alt: {
306
+ type: 'text',
307
+ context: 'prop',
308
+ default: '',
309
+ form: { label: 'Alt text' },
310
+ },
311
+ width: {
312
+ type: 'number',
313
+ context: 'prop',
314
+ validation: { min: 1 },
315
+ form: { label: 'Width' },
316
+ },
317
+ height: {
318
+ type: 'number',
319
+ context: 'prop',
320
+ validation: { min: 1 },
321
+ form: { label: 'Height' },
322
+ },
323
+ // EC-195: above-the-fold images load eagerly (`next/image priority`) so the
324
+ // host can opt the hero image out of lazy-loading.
325
+ priority: {
326
+ type: 'boolean',
327
+ context: 'prop',
328
+ default: false,
329
+ form: { label: 'Load eagerly (above the fold)' },
330
+ },
331
+ },
332
+ slots: [],
333
+ });
334
+ // ---------------------------------------------------------------------------
335
+ // Button — labelled button with an optional href.
336
+ // ---------------------------------------------------------------------------
337
+ function Button(props) {
338
+ const label = asString(props.label, 'Button');
339
+ if (typeof props.href === 'string' && props.href.length > 0) {
340
+ return (_jsx("a", { "data-ec-primitive": "Button", href: props.href, role: "button", children: label }));
341
+ }
342
+ return (_jsx("button", { "data-ec-primitive": "Button", type: "button", children: label }));
343
+ }
344
+ const ButtonManifest = defineComponent({
345
+ id: 'base.primitives.Button',
346
+ namespace: 'base.primitives',
347
+ title: 'Button',
348
+ category: 'content',
349
+ props: {
350
+ label: {
351
+ type: 'text',
352
+ context: 'prop',
353
+ default: 'Button',
354
+ form: { label: 'Label' },
355
+ },
356
+ href: {
357
+ type: 'text',
358
+ context: 'prop',
359
+ form: { label: 'Link' },
360
+ },
361
+ },
362
+ slots: [],
363
+ });
364
+ // ---------------------------------------------------------------------------
365
+ // Repeater — renders its `item` slot template once per item (iteration is done by the
366
+ // renderer; this implementation only frames the rendered items).
367
+ // ---------------------------------------------------------------------------
368
+ function Repeater(props) {
369
+ return _jsx("div", { "data-ec-primitive": "Repeater", children: props.children });
370
+ }
371
+ const RepeaterManifest = defineComponent({
372
+ id: 'base.primitives.Repeater',
373
+ namespace: 'base.primitives',
374
+ title: 'Repeater',
375
+ category: 'data',
376
+ // EC-190 DD7: iterate-over-a-source is a binding construct designed out of v1.
377
+ // The `items` value (an array) has no static field-def type; it rides node.props
378
+ // undeclared (passing through the renderer) until the binding/iteration removal in
379
+ // slice 5 decides Repeater's fate. No editable static prop is exposed meanwhile.
380
+ props: {},
381
+ slots: [{ name: 'item', label: 'Item template', required: true }],
382
+ iterate: { itemsProp: 'items', itemSlot: 'item' },
383
+ });
384
+ // ---------------------------------------------------------------------------
385
+ // Switch — renders exactly one named case slot, chosen by the `case` prop/binding.
386
+ // ---------------------------------------------------------------------------
387
+ function Switch(props) {
388
+ const key = asString(props.case);
389
+ const selected = props[`case:${key}`] ?? props.fallback;
390
+ return _jsx("div", { "data-ec-primitive": "Switch", children: selected });
391
+ }
392
+ const SwitchManifest = defineComponent({
393
+ id: 'base.primitives.Switch',
394
+ namespace: 'base.primitives',
395
+ title: 'Switch',
396
+ category: 'data',
397
+ props: {
398
+ case: {
399
+ type: 'text',
400
+ context: 'prop',
401
+ default: '',
402
+ form: { label: 'Case' },
403
+ },
404
+ },
405
+ // Named case slots are dynamic; `fallback` renders when no case matches.
406
+ slots: [{ name: 'fallback', label: 'Fallback' }],
407
+ });
408
+ // ---------------------------------------------------------------------------
409
+ // Aggregation
410
+ // ---------------------------------------------------------------------------
411
+ /** Pairs of manifest + implementation in registration order. */
412
+ const PRIMITIVES = [
413
+ { manifest: ContainerManifest, implementation: Container },
414
+ { manifest: StackManifest, implementation: Stack },
415
+ { manifest: GridManifest, implementation: Grid },
416
+ { manifest: TextManifest, implementation: Text },
417
+ { manifest: HeadingManifest, implementation: Heading },
418
+ // Rich-text content primitive (EC-159) — content prop is the stored
419
+ // `@elytracms/core/rich-text` value, flagged inline-editable.
420
+ { manifest: RichTextManifest, implementation: RichText },
421
+ { manifest: ImageManifest, implementation: Image },
422
+ { manifest: ButtonManifest, implementation: Button },
423
+ { manifest: RepeaterManifest, implementation: Repeater },
424
+ { manifest: SwitchManifest, implementation: Switch },
425
+ ];
426
+ /** The platform starter components: every `base.primitives.*` manifest + implementation. */
427
+ export function basePrimitives() {
428
+ const implementations = {};
429
+ for (const { manifest, implementation } of PRIMITIVES) {
430
+ implementations[manifest.id] = implementation;
431
+ }
432
+ return {
433
+ manifests: PRIMITIVES.map((p) => p.manifest),
434
+ implementations,
435
+ };
436
+ }
437
+ /** A `ComponentRegistry` preloaded with the primitive manifests. */
438
+ export function createPrimitiveRegistry() {
439
+ return new ComponentRegistry(basePrimitives().manifests);
440
+ }
441
+ export { Container, Stack, Grid, Text, Heading, Image, Button, Repeater, Switch, ContainerManifest, StackManifest, GridManifest, TextManifest, HeadingManifest, ImageManifest, ButtonManifest, RepeaterManifest, SwitchManifest, };
442
+ //# sourceMappingURL=primitives.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"primitives.js","sourceRoot":"","sources":["../../src/runtime-renderer/primitives.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAErC,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,GAChB,MAAM,+BAA+B,CAAA;AAEtC,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAA;AAEpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAA;AAEtE,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAQxD,SAAS,QAAQ,CAAC,KAAc,EAAE,QAAQ,GAAG,EAAE;IAC7C,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAA;AACrD,CAAC;AAED,8EAA8E;AAC9E,+EAA+E;AAC/E,yEAAyE;AACzE,oDAAoD;AACpD,8EAA8E;AAE9E,SAAS,MAAM,CAAC,KAAc;IAC5B,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,eAAe,CAAC,KAAK,CAAC,CAAA;IAC5D,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC;QAAE,OAAO,GAAG,KAAK,GAAG,CAAC,IAAI,CAAA;IAC7F,OAAO,SAAS,CAAA;AAClB,CAAC;AAED,MAAM,WAAW,GAA4D;IAC3E,KAAK,EAAE,YAAY;IACnB,MAAM,EAAE,QAAQ;IAChB,GAAG,EAAE,UAAU;IACf,OAAO,EAAE,SAAS;CACnB,CAAA;AAED,oGAAoG;AACpG,SAAS,aAAa,CAAC,KAAc;IACnC,IAAI,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,QA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EAAE,CAAC,GAAG,cAAwD,CAAA;IACzF,CAAC;IACD,OAAO;QACL,SAAS,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;QAC5C,eAAe;KAChB,CAAA;AACH,CAAC;AAED,oEAAoE;AACpE,MAAM,UAAU,uBAAuB;IACrC,OAAO,IAAI,iBAAiB,CAAC,cAAc,EAAE,CAAC,SAAS,CAAC,CAAA;AAC1D,CAAC;AAED,OAAO,EACL,SAAS,EACT,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,KAAK,EACL,MAAM,EACN,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,cAAc,GACf,CAAA"}
@@ -0,0 +1,138 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { ComponentNode, ProjectGraph } from '@elytracms/core/project-graph';
3
+ import type { ComponentRegistry, ListingSpec } from '@elytracms/core/component-registry';
4
+ import type { ListingQuery, RelationTarget, RenderContext, ResolveRelation } from './context';
5
+ import type { RichTextEmbedRenderer } from '@elytracms/core/rich-text';
6
+ /**
7
+ * Render a single component node to React. Never throws on a node: missing components,
8
+ * invalid props, missing required slots, and resolver errors all degrade to visible
9
+ * fallbacks (brief §4.11).
10
+ */
11
+ export declare function renderNode(node: ComponentNode, ctx: RenderContext): ReactNode;
12
+ /**
13
+ * Bind a `RichTextEmbedRenderer` (EC-189) to a `RenderContext`: each embedded
14
+ * composition node renders through `renderComposition` with the SAME context, so an
15
+ * embed reuses the EC-015 visible fallbacks, the injected binding resolver, the
16
+ * content client, and any active item scope exactly as on a page.
17
+ *
18
+ * The bound renderer is a FUNCTION closed over `ctx`, so it is injected into the
19
+ * consuming component as a **prop** (see `resolveRender`), never through a
20
+ * `'use client'` React-context provider: a function cannot cross the RSC
21
+ * server→client boundary into a client component, so the provider approach
22
+ * 500s a server-rendered (host) page. A server→server prop is fine, and the
23
+ * studio's client render injects the identical prop the same way.
24
+ */
25
+ export declare function createEmbedRenderer(ctx: RenderContext): RichTextEmbedRenderer;
26
+ /**
27
+ * Bind a blocks renderer to a `RenderContext` (EC-254 transclusion): renders a
28
+ * populated relation target's `blocks` field value as a composition through the
29
+ * SAME `renderComposition` pipeline (EC-015 fallbacks, the injected resolvers, any
30
+ * active item scope), so a referenced document's sub-blocks compose inline exactly
31
+ * like a page's. Like {@link createEmbedRenderer}, it is a FUNCTION closed over
32
+ * `ctx` injected as a PROP (`renderBlocks`), never a `'use client'` context
33
+ * provider — a function cannot cross the RSC boundary into a client component.
34
+ */
35
+ export declare function createBlocksRenderer(ctx: RenderContext): (value: unknown) => ReactNode;
36
+ /**
37
+ * Collect the asset ids a node tree resolves through `resolveAsset` (EC-205): the
38
+ * STATIC `asset`-typed props holding a real asset id (not a passthrough URL/path).
39
+ * Mirrors {@link resolveProp}'s asset branch exactly, so the set is COMPLETE (no
40
+ * referenced asset is missed → no broken image) and MINIMAL (only ids the renderer
41
+ * would resolve). Bound asset props resolve via bindings, and document asset FIELDS
42
+ * resolve separately — neither uses the baked asset list, so neither is collected.
43
+ * Lets a delivery host page-scope the baked assets to exactly what a page uses.
44
+ */
45
+ export declare function collectReferencedAssetIds(node: ComponentNode, registry: ComponentRegistry, into?: Set<string>): Set<string>;
46
+ /**
47
+ * Walk a composition (a page's blocks + its layout root) and POPULATE every static
48
+ * `relation` prop it references into a serializable `{ "collection:id": target }`
49
+ * map (EC-254) — the relation analog of {@link collectReferencedAssetIds}. A
50
+ * delivery host bakes this into its (serializable) render outcome and rebuilds
51
+ * `RenderContext.resolveRelation` from the map inside the RSC, exactly as it does
52
+ * with the page-scoped asset list — because a function (the content client) can
53
+ * ride neither the data cache nor the RSC server→client boundary.
54
+ *
55
+ * Transclusion-aware + cycle-safe: a populated target's composition-shaped fields
56
+ * (a `reusable`'s `content` blocks, which a component renders inline via
57
+ * `renderBlocks`) are recursively walked so those blocks' own relations are
58
+ * populated too; a target already in the map is never re-walked, so a reference
59
+ * cycle terminates. `resolveRelation` is the injected populate (depth-1) — passed
60
+ * in, never imported, so this stays free of the content/persistence packages.
61
+ *
62
+ * Optional `refKeys` records the `collection:id` of EVERY referenced pick — even
63
+ * one that resolved to `null` (an unpublished/missing target) — so a delivery host
64
+ * can cache-tag the page by it (EC-254/EC-146): editing or publishing a referenced
65
+ * document then invalidates the embedding page, including a previously-unpublished
66
+ * pick that should appear the moment it publishes.
67
+ */
68
+ export declare function collectReferencedRelations(nodes: readonly ComponentNode[], registry: ComponentRegistry, resolveRelation: ResolveRelation, into?: Record<string, RelationTarget>, refKeys?: Set<string>): Record<string, RelationTarget>;
69
+ /**
70
+ * Build the {@link ListingQuery} a node's `listing` manifest declares (EC-255),
71
+ * or `null` when its filter-source prop carries no usable pick — the block then
72
+ * renders empty rather than listing the whole collection. Reads the `fromProp`
73
+ * STATIC pick (a relation value `{ collection, id }` reduced to its id, or a bare
74
+ * id string) and binds it to the listed collection's filter `field`. Pure (node
75
+ * props + manifest only; no content import), so the Next bake and the studio live
76
+ * resolver build the IDENTICAL query — and thus agree on the baked cache key.
77
+ */
78
+ export declare function listingQueryOf(node: ComponentNode, spec: ListingSpec): ListingQuery | null;
79
+ /**
80
+ * Deterministic cache key for a {@link ListingQuery} (EC-255): a stable JSON shape
81
+ * (where-keys sorted, sort/limit normalized) so the Next host can key its baked
82
+ * `query → docs` map and the rebuilt resolver looks the listing up by the SAME key
83
+ * the renderer's {@link listingQueryOf} produces. Mirrors `@elytracms/core/content`'s
84
+ * `serializeListQuery`, kept local so the renderer takes no content dependency.
85
+ */
86
+ export declare function serializeListingQuery(query: ListingQuery): string;
87
+ /**
88
+ * Walk a composition (a page's blocks + its layout root) and resolve every
89
+ * `listing` a node declares into a serializable `{ serializedQuery: docs[] }` map
90
+ * (EC-255) — the listing analog of {@link collectReferencedRelations}. A delivery
91
+ * host bakes this into its (serializable) render outcome and rebuilds
92
+ * `RenderContext.resolveListing` from the map inside the RSC, exactly as it does
93
+ * with relations and the page-scoped asset list, because the content client (which
94
+ * runs the query) can ride neither the data cache nor the RSC server→client
95
+ * boundary.
96
+ *
97
+ * `runListing` is the injected query executor (the host's `listDocuments`) — passed
98
+ * in, never imported, so this stays free of the content/persistence packages. The
99
+ * key is {@link serializeListingQuery}, so two nodes with the same query share a
100
+ * single execution.
101
+ *
102
+ * Transclusion-aware + cycle-safe, exactly like {@link collectReferencedRelations}:
103
+ * a composition host's composed blocks, child slots, AND a populated relation
104
+ * target's composition-shaped fields (a `reusable`'s `content` a block transcludes
105
+ * via `renderBlocks`) are all walked — so a listing nested inside a transcluded
106
+ * reusable is baked too, matching what the render path resolves at depth. Without
107
+ * this the Next host would render such a grid empty (the studio's live resolver
108
+ * still works) AND drop its collection-membership cache tag. `resolveRelation` is
109
+ * the injected populate (depth-1) used to reach those transcluded fields; a target
110
+ * already visited is never re-walked, so a reference cycle terminates.
111
+ */
112
+ export declare function collectReferencedListings(nodes: readonly ComponentNode[], registry: ComponentRegistry, runListing: (query: ListingQuery) => RelationTarget[], resolveRelation: ResolveRelation, into?: Record<string, RelationTarget[]>, visitedRelations?: Set<string>): Record<string, RelationTarget[]>;
113
+ /**
114
+ * Render a composition FIELD VALUE (EC-188, AD-12): one `ComponentNode` root or an
115
+ * ordered list of them — a `blocks` field's stored value. Each root renders through
116
+ * `renderNode` with the SAME `RenderContext`, so the EC-015 visible fallbacks, the
117
+ * injected binding resolver, and any active item scope all apply exactly as on a
118
+ * page. An empty/absent value renders nothing (the host component owns its own empty
119
+ * state). Roots are keyed by id — `renderNode` may return an unkeyed fallback —
120
+ * mirroring `renderSlotChildren`.
121
+ *
122
+ * This is the shared delivery primitive for every composition surface: the block
123
+ * field (here), and later the page collection (EC-187) and rich-text embeds (EC-189).
124
+ */
125
+ export declare function renderComposition(value: unknown, ctx: RenderContext): ReactNode;
126
+ /**
127
+ * Render a composition (`blocks`) field value composed INTO a graph layout
128
+ * (EC-187): the page collection's delivery primitive. The composition renders
129
+ * via `renderComposition` (the same per-node pipeline + EC-015 fallbacks), and
130
+ * the result is injected into the layout root's `outlet` slot — so a
131
+ * page-collection document's `body` composes inside its layout chrome.
132
+ *
133
+ * Degrades, never crashes: an `undefined`/unknown `layoutId`, or a graph with no
134
+ * matching layout, renders the bare composition (no layout chrome) rather than
135
+ * blanking the page. `withContent` wraps the output so a `ContentClient` on
136
+ * `ctx` propagates to self-fetching blocks (EC-191).
137
+ */
138
+ export declare function renderCompositionInLayout(graph: ProjectGraph, layoutId: string | undefined, value: unknown, ctx: RenderContext): ReactNode;