@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,81 @@
1
+ import { z } from 'zod';
2
+ import { createSequentialClock, createSequentialIds } from './core';
3
+ export const versionRecordSchema = z.object({
4
+ id: z.string(),
5
+ projectId: z.string().min(1),
6
+ /** 1-based, monotonically increasing per project. */
7
+ number: z.number().int().positive(),
8
+ /** Serialized project state (e.g. a `ProjectGraph` JSON string). */
9
+ snapshot: z.string(),
10
+ label: z.string().optional(),
11
+ message: z.string().optional(),
12
+ author: z.string().optional(),
13
+ origin: z.enum(['edit', 'import', 'rollback']),
14
+ /** The version this one was derived from (the previous version, or the rollback source). */
15
+ parentId: z.string().optional(),
16
+ createdAt: z.string(),
17
+ });
18
+ /** In-memory, append-only version store. */
19
+ export class VersionStore {
20
+ byProject = new Map();
21
+ clock;
22
+ ids;
23
+ constructor(options = {}) {
24
+ this.clock = options.clock ?? createSequentialClock();
25
+ this.ids = options.ids ?? createSequentialIds();
26
+ }
27
+ list_(projectId) {
28
+ const existing = this.byProject.get(projectId);
29
+ if (existing)
30
+ return existing;
31
+ const created = [];
32
+ this.byProject.set(projectId, created);
33
+ return created;
34
+ }
35
+ /** Append a new version. Returns the created record. */
36
+ create(projectId, input) {
37
+ const list = this.list_(projectId);
38
+ const previous = list.at(-1);
39
+ const record = versionRecordSchema.parse({
40
+ id: this.ids('ver'),
41
+ projectId,
42
+ number: list.length + 1,
43
+ snapshot: input.snapshot,
44
+ ...(input.label !== undefined ? { label: input.label } : {}),
45
+ ...(input.message !== undefined ? { message: input.message } : {}),
46
+ ...(input.author !== undefined ? { author: input.author } : {}),
47
+ origin: input.origin ?? 'edit',
48
+ ...(previous ? { parentId: previous.id } : {}),
49
+ createdAt: this.clock(),
50
+ });
51
+ list.push(record);
52
+ return record;
53
+ }
54
+ /** All versions for a project, oldest → newest. */
55
+ list(projectId) {
56
+ return [...this.list_(projectId)];
57
+ }
58
+ get(projectId, versionId) {
59
+ return this.list_(projectId).find((v) => v.id === versionId);
60
+ }
61
+ latest(projectId) {
62
+ return this.list_(projectId).at(-1);
63
+ }
64
+ /**
65
+ * Roll back to a prior version (EC-125): appends a NEW version carrying the target's snapshot.
66
+ * Returns `undefined` if the target version doesn't exist (the caller surfaces it as an issue).
67
+ */
68
+ rollback(projectId, toVersionId, author) {
69
+ const target = this.get(projectId, toVersionId);
70
+ if (!target)
71
+ return undefined;
72
+ return this.create(projectId, {
73
+ snapshot: target.snapshot,
74
+ label: `Rollback to v${target.number}`,
75
+ message: `Restored the state of version ${target.number}.`,
76
+ ...(author !== undefined ? { author } : {}),
77
+ origin: 'rollback',
78
+ });
79
+ }
80
+ }
81
+ //# sourceMappingURL=versions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"versions.js","sourceRoot":"","sources":["../../src/collaboration/versions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAA;AAYnE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,qDAAqD;IACrD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACnC,oEAAoE;IACpE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;IAC9C,4FAA4F;IAC5F,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAA;AAWF,4CAA4C;AAC5C,MAAM,OAAO,YAAY;IACN,SAAS,GAAG,IAAI,GAAG,EAA2B,CAAA;IAC9C,KAAK,CAAO;IACZ,GAAG,CAAO;IAE3B,YAAY,UAAwB,EAAE;QACpC,IAAI,CAAC,KAAK,GAAG,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,EAAE,CAAC;YAC3C,MAAM,EAAE,UAAU;SACnB,CAAC,CAAA;IACJ,CAAC;CACF"}
@@ -0,0 +1,3 @@
1
+ export * from './manifest';
2
+ export * from './issues';
3
+ export * from './registry';
@@ -0,0 +1,4 @@
1
+ export * from './manifest';
2
+ export * from './issues';
3
+ export * from './registry';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/component-registry/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA"}
@@ -0,0 +1,6 @@
1
+ /** Structured issues surfaced by the registry itself (distinct from graph issues). */
2
+ export interface ComponentIssue {
3
+ code: 'duplicate-id' | 'invalid-namespace' | 'invalid-id';
4
+ componentId: string;
5
+ message: string;
6
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=issues.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issues.js","sourceRoot":"","sources":["../../src/component-registry/issues.ts"],"names":[],"mappings":""}
@@ -0,0 +1,164 @@
1
+ import type { FieldDef } from '@elytracms/core/cms-core';
2
+ import type { JsonValue, ManifestView } from '@elytracms/core/project-graph';
3
+ /** Distributive `Omit` that preserves a discriminated union (one variant per member). */
4
+ type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
5
+ /**
6
+ * A component prop is a **field-def** (EC-190 "props as fields", AD-12): the SAME
7
+ * vocabulary the CMS uses for document fields (`@elytracms/core/cms-core` `FieldDef`) —
8
+ * text/number/boolean/select/date/relation/asset/richText/blocks — minus the
9
+ * `name` (the record key on `ComponentManifest.props` IS the prop name). One
10
+ * schema vocabulary, one inspector/form engine, recursively: a prop of type
11
+ * `blocks` carries a nested composition. Authoring metadata (label, default,
12
+ * inline-editing, control hint) lives on the field-def's `form` and `default`.
13
+ * Use `context: 'prop'` (or `'both'`); document-only attributes (`filterable`,
14
+ * `unique`) are flagged by cms-core's `assertPropFieldDef`, never silently honoured.
15
+ */
16
+ export type PropField = DistributiveOmit<FieldDef, 'name'>;
17
+ /** A named child insertion point. */
18
+ export interface SlotSpec {
19
+ name: string;
20
+ label?: string;
21
+ required?: boolean;
22
+ /** Restrict which component ids may be inserted (omit to allow any). */
23
+ allow?: string[];
24
+ }
25
+ /** A deterministic preview fixture for a component state. */
26
+ export interface ComponentFixture {
27
+ name: string;
28
+ props?: Record<string, JsonValue>;
29
+ /** Named slots rendered with literal child component ids for preview. */
30
+ slotChildren?: Record<string, string[]>;
31
+ }
32
+ /** Declares that a component iterates a list prop over an item slot (e.g. Repeater). */
33
+ export interface IterateSpec {
34
+ itemsProp: string;
35
+ itemSlot: string;
36
+ }
37
+ /**
38
+ * Declares that a component renders a composition FIELD VALUE (EC-188, AD-12): the
39
+ * `valueProp` carries a stored composition (one `ComponentNode` root or an ordered
40
+ * list — a `blocks` field's value), which the renderer renders as the component's
41
+ * children via `renderComposition`, with the live `RenderContext`. The mirror of
42
+ * `IterateSpec`: a manifest opts a host component into rendering a composition tree
43
+ * wherever it is placed (e.g. a post template's body), so the same renderer/export
44
+ * pipeline that renders pages renders block fields too.
45
+ */
46
+ export interface CompositionSpec {
47
+ valueProp: string;
48
+ }
49
+ /**
50
+ * Declares that a component renders a LISTING — a live, query-resolved set of
51
+ * documents (EC-255, un-parks AD-9 "this section repeats over a collection,
52
+ * filtered, sorted"). The `prop` receives the matching documents (delivery-shaped),
53
+ * injected by the host exactly like a composition's children — NOT a static
54
+ * relation pick the editor maintains by hand. The filter binds the listed
55
+ * collection's `field` to the ref a SIBLING authored prop (`fromProp`) carries:
56
+ * a ProductGrid picks one `category`, and the listing lists `product` where its
57
+ * `categories` (a `many` relation) contains that pick. `sort`/`limit` are the
58
+ * closed AD-3 query envelope. The mirror of {@link CompositionSpec} for a
59
+ * query-resolved prop — so the same renderer/export pipeline that renders pages
60
+ * renders dynamic grids, and adding/removing a member re-renders them.
61
+ */
62
+ export interface ListingSpec {
63
+ /** Prop the resolved documents are injected as (read by the implementation). */
64
+ prop: string;
65
+ /** Collection to list (e.g. `product`). */
66
+ collection: string;
67
+ /**
68
+ * The membership filter: the listed collection's `field` must contain the ref
69
+ * the sibling authored prop `fromProp` holds (a relation pick, reduced to its
70
+ * target id). Closed to a single equality/contains term — the AD-3 vocabulary.
71
+ */
72
+ filter: {
73
+ field: string;
74
+ fromProp: string;
75
+ };
76
+ /** Optional single-field sort (ties break by id, like every list — EC-143). */
77
+ sort?: {
78
+ field: string;
79
+ direction?: 'asc' | 'desc';
80
+ };
81
+ /** Optional page-size cap. */
82
+ limit?: number;
83
+ }
84
+ /** The typed manifest each editable component declares (brief §7.2). */
85
+ export interface ComponentManifest {
86
+ /** Namespaced id, e.g. `base.primitives.Stack` or `project.MarketingHero`. */
87
+ id: string;
88
+ /** Source namespace: `base.primitives` for platform primitives, `project` for project code. */
89
+ namespace: string;
90
+ title?: string;
91
+ description?: string;
92
+ category?: string;
93
+ /** Editable props as field-defs (EC-190), keyed by prop name. */
94
+ props: Record<string, PropField>;
95
+ slots: SlotSpec[];
96
+ /** Design-token usage hints (e.g. `['color.surface', 'space.gap']`). */
97
+ designTokens?: string[];
98
+ fixtures?: ComponentFixture[];
99
+ iterate?: IterateSpec;
100
+ /** Marks the component as a composition host: `valueProp` holds a block-field tree (EC-188). */
101
+ composition?: CompositionSpec;
102
+ /** Marks the component as a listing host: `prop` receives a live query's documents (EC-255). */
103
+ listing?: ListingSpec;
104
+ /**
105
+ * Canvas-eligibility (EC-191). Editors place components on a **client-rendered**
106
+ * canvas, so a placeable component must be client-renderable (isomorphic React).
107
+ * Defaults to eligible; set `clientRenderable: false` for a server-only / RSC
108
+ * component — it stays usable in dev frames (`page.tsx` / `layout.tsx`) but the
109
+ * blocks panel won't offer it and a composition that contains it is invalid.
110
+ */
111
+ clientRenderable?: boolean;
112
+ }
113
+ /** Identity helper that infers nothing but documents intent at call sites. */
114
+ export declare function defineComponent(manifest: ComponentManifest): ComponentManifest;
115
+ /** Names of props flagged `form.inlineEditable`, in manifest declaration order. */
116
+ export declare function inlineEditablePropNames(manifest: ComponentManifest): string[];
117
+ /**
118
+ * Return a copy of `manifest` with the named props flagged inline-editable
119
+ * (EC-158, now `form.inlineEditable`). Names that don't exist on the manifest are
120
+ * ignored. Used by hosts that assemble a registry from manifests they don't author
121
+ * (e.g. the studio opting in platform-primitive content props).
122
+ */
123
+ export declare function withInlineEditableProps(manifest: ComponentManifest, propNames: readonly string[]): ComponentManifest;
124
+ /**
125
+ * Present a manifest's props as a `FieldDef[]` (EC-190) — the prop name injected
126
+ * from the record key — so the shared inspector/form engine renders component
127
+ * props with the exact control set, validation, and layout it renders document
128
+ * fields. Declaration order is preserved.
129
+ */
130
+ export declare function manifestPropFields(manifest: ComponentManifest): FieldDef[];
131
+ /** One manifest prop as a full `FieldDef` (name injected from the key), or undefined. */
132
+ export declare function manifestPropField(manifest: ComponentManifest, name: string): FieldDef | undefined;
133
+ /**
134
+ * The effective named child-region slots of a component (EC-190 "slots are blocks
135
+ * props"). A `blocks`-type prop IS a slot: a named child region with an `allow`
136
+ * leash, edited as a composition. So the manifest's declared `slots` are merged
137
+ * with every `blocks` prop (carrying its `allow`/`required`/`label`) — EXCEPT a
138
+ * `composition.valueProp`, which is a blocks VALUE passed to the host as a prop
139
+ * (a delivery field value, stored in `node.props`), not a canvas child region
140
+ * (stored in `node.slots`). Per DD3 the child trees stay in `node.slots`; the
141
+ * field-def vocabulary just expresses the declaration + leash. For a manifest with
142
+ * no `blocks` props this returns `manifest.slots` unchanged.
143
+ */
144
+ export declare function manifestSlots(manifest: ComponentManifest): SlotSpec[];
145
+ /**
146
+ * The value-validator for one manifest prop (EC-190): the SAME field-def value
147
+ * check the CMS applies to a document field. The renderer uses it for the
148
+ * invalid-static-prop → default fallback (EC-015) without importing cms-core.
149
+ * Returns undefined when the prop is not declared (an unknown prop passes through).
150
+ */
151
+ export declare function propValueValidator(manifest: ComponentManifest, name: string): ((value: unknown) => boolean) | undefined;
152
+ /** Namespace of a component id (the segment before the first dot-group). */
153
+ export declare function namespaceOf(id: string): string;
154
+ export declare function isPrimitive(id: string): boolean;
155
+ /**
156
+ * Canvas-eligibility (EC-191): true when an editor may place this component on the
157
+ * client-rendered canvas. Eligible by default; `clientRenderable: false` (a
158
+ * server-only / RSC component) opts out — the blocks panel hides it and a
159
+ * composition that contains it fails `validateCompositionValue`.
160
+ */
161
+ export declare function isCanvasEligible(manifest: ComponentManifest): boolean;
162
+ /** Bridge a manifest to the structural `ManifestView` the graph validator consumes. */
163
+ export declare function toManifestView(manifest: ComponentManifest): ManifestView;
164
+ export {};
@@ -0,0 +1,129 @@
1
+ import { fieldValueValidator } from '@elytracms/core/cms-core';
2
+ /** Identity helper that infers nothing but documents intent at call sites. */
3
+ export function defineComponent(manifest) {
4
+ return manifest;
5
+ }
6
+ /** Names of props flagged `form.inlineEditable`, in manifest declaration order. */
7
+ export function inlineEditablePropNames(manifest) {
8
+ return Object.entries(manifest.props)
9
+ .filter(([, field]) => field.form?.inlineEditable === true)
10
+ .map(([name]) => name);
11
+ }
12
+ /**
13
+ * Return a copy of `manifest` with the named props flagged inline-editable
14
+ * (EC-158, now `form.inlineEditable`). Names that don't exist on the manifest are
15
+ * ignored. Used by hosts that assemble a registry from manifests they don't author
16
+ * (e.g. the studio opting in platform-primitive content props).
17
+ */
18
+ export function withInlineEditableProps(manifest, propNames) {
19
+ const props = {};
20
+ for (const [name, field] of Object.entries(manifest.props)) {
21
+ props[name] = propNames.includes(name)
22
+ ? { ...field, form: { ...field.form, inlineEditable: true } }
23
+ : field;
24
+ }
25
+ return { ...manifest, props };
26
+ }
27
+ /**
28
+ * Present a manifest's props as a `FieldDef[]` (EC-190) — the prop name injected
29
+ * from the record key — so the shared inspector/form engine renders component
30
+ * props with the exact control set, validation, and layout it renders document
31
+ * fields. Declaration order is preserved.
32
+ */
33
+ export function manifestPropFields(manifest) {
34
+ return Object.entries(manifest.props).map(([name, field]) => ({ ...field, name }));
35
+ }
36
+ /** One manifest prop as a full `FieldDef` (name injected from the key), or undefined. */
37
+ export function manifestPropField(manifest, name) {
38
+ const field = manifest.props[name];
39
+ return field ? ({ ...field, name }) : undefined;
40
+ }
41
+ /**
42
+ * The effective named child-region slots of a component (EC-190 "slots are blocks
43
+ * props"). A `blocks`-type prop IS a slot: a named child region with an `allow`
44
+ * leash, edited as a composition. So the manifest's declared `slots` are merged
45
+ * with every `blocks` prop (carrying its `allow`/`required`/`label`) — EXCEPT a
46
+ * `composition.valueProp`, which is a blocks VALUE passed to the host as a prop
47
+ * (a delivery field value, stored in `node.props`), not a canvas child region
48
+ * (stored in `node.slots`). Per DD3 the child trees stay in `node.slots`; the
49
+ * field-def vocabulary just expresses the declaration + leash. For a manifest with
50
+ * no `blocks` props this returns `manifest.slots` unchanged.
51
+ */
52
+ export function manifestSlots(manifest) {
53
+ const compositionValueProp = manifest.composition?.valueProp;
54
+ const fromBlocksProps = [];
55
+ for (const [name, field] of Object.entries(manifest.props)) {
56
+ if (field.type !== 'blocks')
57
+ continue;
58
+ if (name === compositionValueProp)
59
+ continue;
60
+ fromBlocksProps.push({
61
+ name,
62
+ ...(field.form?.label ? { label: field.form.label } : {}),
63
+ ...(field.validation?.required ? { required: true } : {}),
64
+ ...(field.allow ? { allow: field.allow } : {}),
65
+ });
66
+ }
67
+ return fromBlocksProps.length === 0 ? manifest.slots : [...manifest.slots, ...fromBlocksProps];
68
+ }
69
+ /**
70
+ * The value-validator for one manifest prop (EC-190): the SAME field-def value
71
+ * check the CMS applies to a document field. The renderer uses it for the
72
+ * invalid-static-prop → default fallback (EC-015) without importing cms-core.
73
+ * Returns undefined when the prop is not declared (an unknown prop passes through).
74
+ */
75
+ export function propValueValidator(manifest, name) {
76
+ const field = manifestPropField(manifest, name);
77
+ return field ? fieldValueValidator(field) : undefined;
78
+ }
79
+ /** Namespace of a component id (the segment before the first dot-group). */
80
+ export function namespaceOf(id) {
81
+ if (id.startsWith('base.primitives.'))
82
+ return 'base.primitives';
83
+ const first = id.split('.')[0];
84
+ return first ?? '';
85
+ }
86
+ export function isPrimitive(id) {
87
+ return id.startsWith('base.primitives.');
88
+ }
89
+ /**
90
+ * Canvas-eligibility (EC-191): true when an editor may place this component on the
91
+ * client-rendered canvas. Eligible by default; `clientRenderable: false` (a
92
+ * server-only / RSC component) opts out — the blocks panel hides it and a
93
+ * composition that contains it fails `validateCompositionValue`.
94
+ */
95
+ export function isCanvasEligible(manifest) {
96
+ return manifest.clientRenderable !== false;
97
+ }
98
+ /** Bridge a manifest to the structural `ManifestView` the graph validator consumes. */
99
+ export function toManifestView(manifest) {
100
+ const props = {};
101
+ for (const [name, field] of Object.entries(manifest.props)) {
102
+ props[name] = {
103
+ // EC-190: props are static; the binding path retires in slice 5. Until then
104
+ // every prop reports bindable so the graph validator's binding branch stays
105
+ // inert (no false `binding-not-allowed`). `validate` is the field-def value
106
+ // validator — the SAME check the CMS uses for a document field value.
107
+ bindable: true,
108
+ validate: fieldValueValidator({ ...field, name }),
109
+ };
110
+ }
111
+ return {
112
+ id: manifest.id,
113
+ props,
114
+ // EC-191: carry canvas-eligibility so `validateCompositionValue` can reject a
115
+ // server-only component placed in a composition.
116
+ ...(manifest.clientRenderable === false ? { clientRenderable: false } : {}),
117
+ // EC-186: carry the slot's placement vocabulary (`allow`) through to the
118
+ // graph validator so it can enforce `forbidden-component` — previously
119
+ // dropped here, leaving slot `allow` declared-but-unenforced. EC-190:
120
+ // `manifestSlots` folds in `blocks`-type props as slots, so a blocks prop's
121
+ // `allow` leash is enforced through the same path.
122
+ slots: manifestSlots(manifest).map((s) => ({
123
+ name: s.name,
124
+ required: s.required,
125
+ ...(s.allow ? { allow: s.allow } : {}),
126
+ })),
127
+ };
128
+ }
129
+ //# sourceMappingURL=manifest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../src/component-registry/manifest.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,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,EAAE,QAAQ,CAAC,EAAE;QACf,KAAK;QACL,8EAA8E;QAC9E,iDAAiD;QACjD,GAAG,CAAC,QAAQ,CAAC,gBAAgB,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3E,yEAAyE;QACzE,uEAAuE;QACvE,sEAAsE;QACtE,4EAA4E;QAC5E,mDAAmD;QACnD,KAAK,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACzC,IAAI,EAAE,CAAC,CAAC,IAAI;YACZ,QAAQ,EAAE,CAAC,CAAC,QAAQ;YACpB,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACvC,CAAC,CAAC;KACJ,CAAA;AACH,CAAC"}
@@ -0,0 +1,33 @@
1
+ import type { ComponentLookup } from '@elytracms/core/project-graph';
2
+ import type { ComponentIssue } from './issues';
3
+ import type { ComponentManifest } from './manifest';
4
+ export interface ListFilter {
5
+ namespace?: string;
6
+ category?: string;
7
+ /** Case-insensitive substring match over id / title / category. */
8
+ query?: string;
9
+ }
10
+ /**
11
+ * The component registry serves the Builder, renderer, AI tools, export pipeline, and
12
+ * CLI. It distinguishes platform primitives from project components, supports lookup,
13
+ * filtering, required lookups, and reports duplicate ids as structured issues.
14
+ */
15
+ export declare class ComponentRegistry {
16
+ private readonly byId;
17
+ private readonly viewCache;
18
+ readonly issues: ComponentIssue[];
19
+ constructor(manifests?: Iterable<ComponentManifest>);
20
+ register(manifest: ComponentManifest): void;
21
+ has(id: string): boolean;
22
+ getManifest(id: string): ComponentManifest | undefined;
23
+ /** Required lookup — throws when the component is not registered. */
24
+ require(id: string): ComponentManifest;
25
+ list(filter?: ListFilter): ComponentManifest[];
26
+ /** Platform primitives (`base.primitives.*`). */
27
+ primitives(): ComponentManifest[];
28
+ /** Project-level components (everything not under `base.primitives.*`). */
29
+ projectComponents(): ComponentManifest[];
30
+ get size(): number;
31
+ /** A `ComponentLookup` view for the project-graph validator. */
32
+ get lookup(): ComponentLookup;
33
+ }
@@ -0,0 +1,90 @@
1
+ import { isValidComponentId } from '@elytracms/core/project-graph';
2
+ import { isPrimitive, namespaceOf, toManifestView } from './manifest';
3
+ /**
4
+ * The component registry serves the Builder, renderer, AI tools, export pipeline, and
5
+ * CLI. It distinguishes platform primitives from project components, supports lookup,
6
+ * filtering, required lookups, and reports duplicate ids as structured issues.
7
+ */
8
+ export class ComponentRegistry {
9
+ byId = new Map();
10
+ viewCache = new Map();
11
+ issues = [];
12
+ constructor(manifests = []) {
13
+ for (const manifest of manifests)
14
+ this.register(manifest);
15
+ }
16
+ register(manifest) {
17
+ if (!isValidComponentId(manifest.id)) {
18
+ this.issues.push({
19
+ code: 'invalid-id',
20
+ componentId: manifest.id,
21
+ message: `Component id "${manifest.id}" is not namespaced under base.primitives.* or project.*.`,
22
+ });
23
+ }
24
+ if (this.byId.has(manifest.id)) {
25
+ this.issues.push({
26
+ code: 'duplicate-id',
27
+ componentId: manifest.id,
28
+ message: `Duplicate component id "${manifest.id}" — keeping the first registration.`,
29
+ });
30
+ return;
31
+ }
32
+ this.byId.set(manifest.id, manifest);
33
+ }
34
+ has(id) {
35
+ return this.byId.has(id);
36
+ }
37
+ getManifest(id) {
38
+ return this.byId.get(id);
39
+ }
40
+ /** Required lookup — throws when the component is not registered. */
41
+ require(id) {
42
+ const manifest = this.byId.get(id);
43
+ if (!manifest)
44
+ throw new Error(`Unknown component "${id}".`);
45
+ return manifest;
46
+ }
47
+ list(filter = {}) {
48
+ const q = filter.query?.toLowerCase();
49
+ return [...this.byId.values()].filter((m) => {
50
+ if (filter.namespace && namespaceOf(m.id) !== filter.namespace)
51
+ return false;
52
+ if (filter.category && m.category !== filter.category)
53
+ return false;
54
+ if (q) {
55
+ const hay = `${m.id} ${m.title ?? ''} ${m.category ?? ''}`.toLowerCase();
56
+ if (!hay.includes(q))
57
+ return false;
58
+ }
59
+ return true;
60
+ });
61
+ }
62
+ /** Platform primitives (`base.primitives.*`). */
63
+ primitives() {
64
+ return this.list().filter((m) => isPrimitive(m.id));
65
+ }
66
+ /** Project-level components (everything not under `base.primitives.*`). */
67
+ projectComponents() {
68
+ return this.list().filter((m) => !isPrimitive(m.id));
69
+ }
70
+ get size() {
71
+ return this.byId.size;
72
+ }
73
+ /** A `ComponentLookup` view for the project-graph validator. */
74
+ get lookup() {
75
+ return {
76
+ has: (id) => this.byId.has(id),
77
+ get: (id) => {
78
+ if (!this.byId.has(id))
79
+ return undefined;
80
+ let view = this.viewCache.get(id);
81
+ if (!view) {
82
+ view = toManifestView(this.byId.get(id));
83
+ this.viewCache.set(id, view);
84
+ }
85
+ return view;
86
+ },
87
+ };
88
+ }
89
+ }
90
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/component-registry/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AAIlE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AASrE;;;;GAIG;AACH,MAAM,OAAO,iBAAiB;IACX,IAAI,GAAG,IAAI,GAAG,EAA6B,CAAA;IAC3C,SAAS,GAAG,IAAI,GAAG,EAAwB,CAAA;IACnD,MAAM,GAAqB,EAAE,CAAA;IAEtC,YAAY,YAAyC,EAAE;QACrD,KAAK,MAAM,QAAQ,IAAI,SAAS;YAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;IAC3D,CAAC;IAED,QAAQ,CAAC,QAA2B;QAClC,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC;YACrC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC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AAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;gBACjC,IAAI,CAAC,IAAI,EAAE,CAAC;oBACV,IAAI,GAAG,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAE,CAAC,CAAA;oBACzC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,CAAA;gBAC9B,CAAC;gBACD,OAAO,IAAI,CAAA;YACb,CAAC;SACF,CAAA;IACH,CAAC;CACF"}
@@ -0,0 +1,14 @@
1
+ import type { CollectionDef } from '@elytracms/core/cms-core';
2
+ /**
3
+ * The cms-core sample collections with the EC-143 `filterable` declarations —
4
+ * the deterministic input for the accessor-type codegen snapshot
5
+ * (`sample-accessor-types.ts`) and for the accessor runtime tests.
6
+ *
7
+ * Since the EC-169 fix-pack the declaration set itself is canonical in
8
+ * `@elytracms/core/cms-core` (`sampleFilterableCollections`) and shared with the
9
+ * persistence seed; this module is a re-export kept for the existing test
10
+ * imports. Deliberately *not* filterable there: `title` (so tests can prove
11
+ * that filtering a real-but-undeclared field fails at both type level and
12
+ * runtime) and the whole `asset` collection (no filterable fields).
13
+ */
14
+ export declare const filterableCollections: CollectionDef[];
@@ -0,0 +1,15 @@
1
+ import { sampleFilterableCollections } from '@elytracms/core/cms-core';
2
+ /**
3
+ * The cms-core sample collections with the EC-143 `filterable` declarations —
4
+ * the deterministic input for the accessor-type codegen snapshot
5
+ * (`sample-accessor-types.ts`) and for the accessor runtime tests.
6
+ *
7
+ * Since the EC-169 fix-pack the declaration set itself is canonical in
8
+ * `@elytracms/core/cms-core` (`sampleFilterableCollections`) and shared with the
9
+ * persistence seed; this module is a re-export kept for the existing test
10
+ * imports. Deliberately *not* filterable there: `title` (so tests can prove
11
+ * that filtering a real-but-undeclared field fails at both type level and
12
+ * runtime) and the whole `asset` collection (no filterable fields).
13
+ */
14
+ export const filterableCollections = sampleFilterableCollections;
15
+ //# sourceMappingURL=filterable-collections.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filterable-collections.js","sourceRoot":"","sources":["../../../src/content/__fixtures__/filterable-collections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAA;AAGtE;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAoB,2BAA2B,CAAA"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * The closed filter vocabulary (vision AD-3): equality, `in`, comparisons,
3
+ * AND-only — multiple fields and multiple operators all AND together.
4
+ * A bare scalar is shorthand for `{ eq: value }`.
5
+ */
6
+ export interface WhereCondition<T> {
7
+ eq?: T;
8
+ gt?: T;
9
+ gte?: T;
10
+ in?: readonly T[];
11
+ lt?: T;
12
+ lte?: T;
13
+ }
14
+ /** The list-query envelope every generated per-collection query reuses. */
15
+ export interface GeneratedListQuery<TWhere, TSortField extends string> {
16
+ where?: TWhere;
17
+ sort?: {
18
+ field: TSortField;
19
+ direction?: 'asc' | 'desc';
20
+ };
21
+ limit?: number;
22
+ cursor?: string;
23
+ }
24
+ /** Filter input for "asset" — only fields declared `filterable`. */
25
+ export type AssetWhere = Record<string, never>;
26
+ /** Sortable fields of "asset" (the filterable set). */
27
+ export type AssetSortField = never;
28
+ /** `listDocuments` query for "asset". */
29
+ export type AssetListQuery = GeneratedListQuery<AssetWhere, AssetSortField>;
30
+ /** Filter input for "author" — only fields declared `filterable`. */
31
+ export type AuthorWhere = {
32
+ name?: string | WhereCondition<string>;
33
+ };
34
+ /** Sortable fields of "author" (the filterable set). */
35
+ export type AuthorSortField = 'name';
36
+ /** `listDocuments` query for "author". */
37
+ export type AuthorListQuery = GeneratedListQuery<AuthorWhere, AuthorSortField>;
38
+ /** Filter input for "page" — only fields declared `filterable`. */
39
+ export type PageWhere = Record<string, never>;
40
+ /** Sortable fields of "page" (the filterable set). */
41
+ export type PageSortField = never;
42
+ /** `listDocuments` query for "page". */
43
+ export type PageListQuery = GeneratedListQuery<PageWhere, PageSortField>;
44
+ /** Filter input for "post" — only fields declared `filterable`. */
45
+ export type PostWhere = {
46
+ slug?: string | WhereCondition<string>;
47
+ views?: number | WhereCondition<number>;
48
+ featured?: boolean | WhereCondition<boolean>;
49
+ publishedAt?: string | number | WhereCondition<string | number>;
50
+ status?: 'news' | 'guide' | WhereCondition<'news' | 'guide'>;
51
+ author?: string | WhereCondition<string>;
52
+ };
53
+ /** Sortable fields of "post" (the filterable set). */
54
+ export type PostSortField = 'slug' | 'views' | 'featured' | 'publishedAt' | 'status' | 'author';
55
+ /** `listDocuments` query for "post". */
56
+ export type PostListQuery = GeneratedListQuery<PostWhere, PostSortField>;
@@ -0,0 +1,5 @@
1
+ // Generated by @elytracms/content accessor-type codegen (EC-143).
2
+ // Do not edit by hand — regenerate from the collection schemas.
3
+ // Deterministic: identical schema input yields byte-identical output.
4
+ export {};
5
+ //# sourceMappingURL=sample-accessor-types.js.map