@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,587 @@
1
+ import { z } from 'zod';
2
+ import type { CollectionDef, RedirectRecord, RouteRecord } from '@elytracms/core/cms-core';
3
+ import type { ComponentManifest } from '@elytracms/core/component-registry';
4
+ import type { ExportTarget, Project, ProjectSettings } from './metadata';
5
+ import type { SectionAvailabilityMap } from './sections';
6
+ /**
7
+ * Code-first workspace config — `elytra.config.ts` (EC-154, vision AD-8).
8
+ *
9
+ * A repo declares its projects as code: the config file default-exports
10
+ * `defineElytraConfig({...})` with an array of project configs, optionally
11
+ * composed over a shared `base`. The studio's project switcher and the CLI
12
+ * (`builder init --project <slug>`) both consume the same schema and the same
13
+ * structured validation, so an invalid config fails identically everywhere —
14
+ * never silently.
15
+ *
16
+ * Composition semantics (deliberately simple and deterministic): each project
17
+ * entry is merged over `base` **per field** — a field set on the entry replaces
18
+ * the base field entirely (arrays and objects are not deep-merged). Fields set
19
+ * on neither fall back to documented defaults.
20
+ *
21
+ * Validation follows the EC-028/EC-029 split: Zod checks field *shapes*;
22
+ * cross-field and cross-project rules (duplicate slugs, default locale ∈
23
+ * locales, empty projects) surface as structured, path-located
24
+ * {@link WorkspaceConfigIssue}s — never throws. The settings-shaped parts reuse
25
+ * the EC-028 `validateProjectSettings` rules verbatim.
26
+ */
27
+ /** Where a project's collection schema lives: a host-repo module, or managed in the studio. */
28
+ export declare const workspaceSchemaRefSchema: z.ZodUnion<readonly [z.ZodLiteral<"inline">, z.ZodObject<{
29
+ module: z.ZodString;
30
+ }, z.core.$strip>]>;
31
+ export type WorkspaceSchemaRef = z.infer<typeof workspaceSchemaRefSchema>;
32
+ /**
33
+ * A project's components, config-as-code (EC-223 mount contract): the live
34
+ * (manifest + implementation) pairs the studio registry and host runtime
35
+ * register. Replaces the old `{ dir }`/`{ package }` string pointer — components
36
+ * are code, injected directly into the config, not located by a path the studio
37
+ * must import through an alias (the `@site` trap). The implementation is opaque to
38
+ * studio-core (a host React component); the serializable projection derives the
39
+ * manifests. Validated opaquely, like the `routes`/`redirects` derive functions.
40
+ */
41
+ export interface HostComponentEntry {
42
+ manifest: ComponentManifest;
43
+ implementation: unknown;
44
+ }
45
+ export declare const componentsInputSchema: z.ZodCustom<readonly HostComponentEntry[], readonly HostComponentEntry[]>;
46
+ /** Which Convex deployment/dataset backs a project (or one of its environments). */
47
+ export declare const workspaceConvexRefSchema: z.ZodObject<{
48
+ deployment: z.ZodOptional<z.ZodString>;
49
+ dataset: z.ZodOptional<z.ZodString>;
50
+ }, z.core.$strip>;
51
+ export type WorkspaceConvexRef = z.infer<typeof workspaceConvexRefSchema>;
52
+ /**
53
+ * A deployment environment in config. Extends the backend `{ key, label }` shape
54
+ * with an optional per-environment `convex` ref so a project can target a
55
+ * different deployment/dataset per environment (Sanity project↔dataset style,
56
+ * e.g. prod vs staging). The project-level `convex` ref is the default.
57
+ *
58
+ * `frontendUrl` (EC-215) is the public base URL of the live site for this
59
+ * environment (e.g. `https://staging.acme.com`); the project-level `frontendUrl`
60
+ * is the fallback. The studio uses it to show/link a document's live URL
61
+ * (EC-216) and the host's sitemap uses it as its `baseUrl`.
62
+ */
63
+ export declare const workspaceEnvironmentSchema: z.ZodObject<{
64
+ key: z.ZodString;
65
+ label: z.ZodString;
66
+ convex: z.ZodOptional<z.ZodObject<{
67
+ deployment: z.ZodOptional<z.ZodString>;
68
+ dataset: z.ZodOptional<z.ZodString>;
69
+ }, z.core.$strip>>;
70
+ frontendUrl: z.ZodOptional<z.ZodString>;
71
+ }, z.core.$strip>;
72
+ export type WorkspaceEnvironment = z.infer<typeof workspaceEnvironmentSchema>;
73
+ /**
74
+ * A `routes` / `redirects` derive function: `(collections) => RouteRecord[]`,
75
+ * modelled on `next.config`'s `redirects()`/`rewrites()` (Oli, 2026-06-16). The
76
+ * resolver runs it once against the project's resolved collections (EC-207). May
77
+ * also be a static `RouteRecord[]` — the function is the general form.
78
+ */
79
+ export type RoutesDerive = (collections: CollectionDef[]) => RouteRecord[];
80
+ export type RedirectsDerive = (collections: CollectionDef[]) => RedirectRecord[];
81
+ /** The shared, overridable fields — usable as `base` and per project. */
82
+ export declare const workspaceProjectBaseSchema: z.ZodObject<{
83
+ schema: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"inline">, z.ZodObject<{
84
+ module: z.ZodString;
85
+ }, z.core.$strip>]>>;
86
+ locales: z.ZodOptional<z.ZodArray<z.ZodString>>;
87
+ defaultLocale: z.ZodOptional<z.ZodString>;
88
+ components: z.ZodOptional<z.ZodCustom<readonly HostComponentEntry[], readonly HostComponentEntry[]>>;
89
+ convex: z.ZodOptional<z.ZodObject<{
90
+ deployment: z.ZodOptional<z.ZodString>;
91
+ dataset: z.ZodOptional<z.ZodString>;
92
+ }, z.core.$strip>>;
93
+ frontendUrl: z.ZodOptional<z.ZodString>;
94
+ environments: z.ZodOptional<z.ZodArray<z.ZodObject<{
95
+ key: z.ZodString;
96
+ label: z.ZodString;
97
+ convex: z.ZodOptional<z.ZodObject<{
98
+ deployment: z.ZodOptional<z.ZodString>;
99
+ dataset: z.ZodOptional<z.ZodString>;
100
+ }, z.core.$strip>>;
101
+ frontendUrl: z.ZodOptional<z.ZodString>;
102
+ }, z.core.$strip>>>;
103
+ collections: z.ZodOptional<z.ZodArray<z.ZodObject<{
104
+ id: z.ZodString;
105
+ kind: z.ZodDefault<z.ZodEnum<{
106
+ asset: "asset";
107
+ document: "document";
108
+ }>>;
109
+ fields: z.ZodDefault<z.ZodArray<z.ZodType<import("@elytracms/core/cms-core").FieldDef, unknown, z.core.$ZodTypeInternals<import("@elytracms/core/cms-core").FieldDef, unknown>>>>;
110
+ form: z.ZodOptional<z.ZodObject<{
111
+ label: z.ZodOptional<z.ZodString>;
112
+ labelSingular: z.ZodOptional<z.ZodString>;
113
+ description: z.ZodOptional<z.ZodString>;
114
+ groups: z.ZodOptional<z.ZodArray<z.ZodString>>;
115
+ tabs: z.ZodOptional<z.ZodArray<z.ZodString>>;
116
+ }, z.core.$strip>>;
117
+ localized: z.ZodOptional<z.ZodBoolean>;
118
+ titleField: z.ZodOptional<z.ZodString>;
119
+ singleton: z.ZodOptional<z.ZodBoolean>;
120
+ }, z.core.$strip>>>;
121
+ routes: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
122
+ id: z.ZodString;
123
+ pattern: z.ZodString;
124
+ locale: z.ZodOptional<z.ZodString>;
125
+ document: z.ZodOptional<z.ZodObject<{
126
+ collection: z.ZodString;
127
+ id: z.ZodString;
128
+ }, z.core.$strip>>;
129
+ }, z.core.$strip>>, z.ZodCustom<RoutesDerive, RoutesDerive>]>>;
130
+ redirects: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
131
+ id: z.ZodString;
132
+ from: z.ZodString;
133
+ to: z.ZodString;
134
+ permanent: z.ZodDefault<z.ZodBoolean>;
135
+ }, z.core.$strip>>, z.ZodCustom<RedirectsDerive, RedirectsDerive>]>>;
136
+ exportTarget: z.ZodOptional<z.ZodEnum<{
137
+ "next-app-router": "next-app-router";
138
+ }>>;
139
+ sectionAvailability: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
140
+ components: "components";
141
+ assets: "assets";
142
+ cms: "cms";
143
+ extensions: "extensions";
144
+ settings: "settings";
145
+ }>, z.ZodEnum<{
146
+ available: "available";
147
+ planned: "planned";
148
+ unavailable: "unavailable";
149
+ }>>>;
150
+ }, z.core.$strip>;
151
+ export type WorkspaceProjectBase = z.infer<typeof workspaceProjectBaseSchema>;
152
+ /** One project entry: identity is required, everything else may come from `base`. */
153
+ export declare const workspaceProjectEntrySchema: z.ZodObject<{
154
+ schema: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"inline">, z.ZodObject<{
155
+ module: z.ZodString;
156
+ }, z.core.$strip>]>>;
157
+ locales: z.ZodOptional<z.ZodArray<z.ZodString>>;
158
+ defaultLocale: z.ZodOptional<z.ZodString>;
159
+ components: z.ZodOptional<z.ZodCustom<readonly HostComponentEntry[], readonly HostComponentEntry[]>>;
160
+ convex: z.ZodOptional<z.ZodObject<{
161
+ deployment: z.ZodOptional<z.ZodString>;
162
+ dataset: z.ZodOptional<z.ZodString>;
163
+ }, z.core.$strip>>;
164
+ frontendUrl: z.ZodOptional<z.ZodString>;
165
+ environments: z.ZodOptional<z.ZodArray<z.ZodObject<{
166
+ key: z.ZodString;
167
+ label: z.ZodString;
168
+ convex: z.ZodOptional<z.ZodObject<{
169
+ deployment: z.ZodOptional<z.ZodString>;
170
+ dataset: z.ZodOptional<z.ZodString>;
171
+ }, z.core.$strip>>;
172
+ frontendUrl: z.ZodOptional<z.ZodString>;
173
+ }, z.core.$strip>>>;
174
+ collections: z.ZodOptional<z.ZodArray<z.ZodObject<{
175
+ id: z.ZodString;
176
+ kind: z.ZodDefault<z.ZodEnum<{
177
+ asset: "asset";
178
+ document: "document";
179
+ }>>;
180
+ fields: z.ZodDefault<z.ZodArray<z.ZodType<import("@elytracms/core/cms-core").FieldDef, unknown, z.core.$ZodTypeInternals<import("@elytracms/core/cms-core").FieldDef, unknown>>>>;
181
+ form: z.ZodOptional<z.ZodObject<{
182
+ label: z.ZodOptional<z.ZodString>;
183
+ labelSingular: z.ZodOptional<z.ZodString>;
184
+ description: z.ZodOptional<z.ZodString>;
185
+ groups: z.ZodOptional<z.ZodArray<z.ZodString>>;
186
+ tabs: z.ZodOptional<z.ZodArray<z.ZodString>>;
187
+ }, z.core.$strip>>;
188
+ localized: z.ZodOptional<z.ZodBoolean>;
189
+ titleField: z.ZodOptional<z.ZodString>;
190
+ singleton: z.ZodOptional<z.ZodBoolean>;
191
+ }, z.core.$strip>>>;
192
+ routes: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
193
+ id: z.ZodString;
194
+ pattern: z.ZodString;
195
+ locale: z.ZodOptional<z.ZodString>;
196
+ document: z.ZodOptional<z.ZodObject<{
197
+ collection: z.ZodString;
198
+ id: z.ZodString;
199
+ }, z.core.$strip>>;
200
+ }, z.core.$strip>>, z.ZodCustom<RoutesDerive, RoutesDerive>]>>;
201
+ redirects: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
202
+ id: z.ZodString;
203
+ from: z.ZodString;
204
+ to: z.ZodString;
205
+ permanent: z.ZodDefault<z.ZodBoolean>;
206
+ }, z.core.$strip>>, z.ZodCustom<RedirectsDerive, RedirectsDerive>]>>;
207
+ exportTarget: z.ZodOptional<z.ZodEnum<{
208
+ "next-app-router": "next-app-router";
209
+ }>>;
210
+ sectionAvailability: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
211
+ components: "components";
212
+ assets: "assets";
213
+ cms: "cms";
214
+ extensions: "extensions";
215
+ settings: "settings";
216
+ }>, z.ZodEnum<{
217
+ available: "available";
218
+ planned: "planned";
219
+ unavailable: "unavailable";
220
+ }>>>;
221
+ name: z.ZodString;
222
+ slug: z.ZodString;
223
+ }, z.core.$strip>;
224
+ export type WorkspaceProjectEntry = z.infer<typeof workspaceProjectEntrySchema>;
225
+ /** The full `elytra.config.ts` value: shared base + an array of project configs. */
226
+ export declare const elytraConfigInputSchema: z.ZodObject<{
227
+ base: z.ZodOptional<z.ZodObject<{
228
+ schema: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"inline">, z.ZodObject<{
229
+ module: z.ZodString;
230
+ }, z.core.$strip>]>>;
231
+ locales: z.ZodOptional<z.ZodArray<z.ZodString>>;
232
+ defaultLocale: z.ZodOptional<z.ZodString>;
233
+ components: z.ZodOptional<z.ZodCustom<readonly HostComponentEntry[], readonly HostComponentEntry[]>>;
234
+ convex: z.ZodOptional<z.ZodObject<{
235
+ deployment: z.ZodOptional<z.ZodString>;
236
+ dataset: z.ZodOptional<z.ZodString>;
237
+ }, z.core.$strip>>;
238
+ frontendUrl: z.ZodOptional<z.ZodString>;
239
+ environments: z.ZodOptional<z.ZodArray<z.ZodObject<{
240
+ key: z.ZodString;
241
+ label: z.ZodString;
242
+ convex: z.ZodOptional<z.ZodObject<{
243
+ deployment: z.ZodOptional<z.ZodString>;
244
+ dataset: z.ZodOptional<z.ZodString>;
245
+ }, z.core.$strip>>;
246
+ frontendUrl: z.ZodOptional<z.ZodString>;
247
+ }, z.core.$strip>>>;
248
+ collections: z.ZodOptional<z.ZodArray<z.ZodObject<{
249
+ id: z.ZodString;
250
+ kind: z.ZodDefault<z.ZodEnum<{
251
+ asset: "asset";
252
+ document: "document";
253
+ }>>;
254
+ fields: z.ZodDefault<z.ZodArray<z.ZodType<import("@elytracms/core/cms-core").FieldDef, unknown, z.core.$ZodTypeInternals<import("@elytracms/core/cms-core").FieldDef, unknown>>>>;
255
+ form: z.ZodOptional<z.ZodObject<{
256
+ label: z.ZodOptional<z.ZodString>;
257
+ labelSingular: z.ZodOptional<z.ZodString>;
258
+ description: z.ZodOptional<z.ZodString>;
259
+ groups: z.ZodOptional<z.ZodArray<z.ZodString>>;
260
+ tabs: z.ZodOptional<z.ZodArray<z.ZodString>>;
261
+ }, z.core.$strip>>;
262
+ localized: z.ZodOptional<z.ZodBoolean>;
263
+ titleField: z.ZodOptional<z.ZodString>;
264
+ singleton: z.ZodOptional<z.ZodBoolean>;
265
+ }, z.core.$strip>>>;
266
+ routes: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
267
+ id: z.ZodString;
268
+ pattern: z.ZodString;
269
+ locale: z.ZodOptional<z.ZodString>;
270
+ document: z.ZodOptional<z.ZodObject<{
271
+ collection: z.ZodString;
272
+ id: z.ZodString;
273
+ }, z.core.$strip>>;
274
+ }, z.core.$strip>>, z.ZodCustom<RoutesDerive, RoutesDerive>]>>;
275
+ redirects: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
276
+ id: z.ZodString;
277
+ from: z.ZodString;
278
+ to: z.ZodString;
279
+ permanent: z.ZodDefault<z.ZodBoolean>;
280
+ }, z.core.$strip>>, z.ZodCustom<RedirectsDerive, RedirectsDerive>]>>;
281
+ exportTarget: z.ZodOptional<z.ZodEnum<{
282
+ "next-app-router": "next-app-router";
283
+ }>>;
284
+ sectionAvailability: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
285
+ components: "components";
286
+ assets: "assets";
287
+ cms: "cms";
288
+ extensions: "extensions";
289
+ settings: "settings";
290
+ }>, z.ZodEnum<{
291
+ available: "available";
292
+ planned: "planned";
293
+ unavailable: "unavailable";
294
+ }>>>;
295
+ }, z.core.$strip>>;
296
+ projects: z.ZodArray<z.ZodObject<{
297
+ schema: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"inline">, z.ZodObject<{
298
+ module: z.ZodString;
299
+ }, z.core.$strip>]>>;
300
+ locales: z.ZodOptional<z.ZodArray<z.ZodString>>;
301
+ defaultLocale: z.ZodOptional<z.ZodString>;
302
+ components: z.ZodOptional<z.ZodCustom<readonly HostComponentEntry[], readonly HostComponentEntry[]>>;
303
+ convex: z.ZodOptional<z.ZodObject<{
304
+ deployment: z.ZodOptional<z.ZodString>;
305
+ dataset: z.ZodOptional<z.ZodString>;
306
+ }, z.core.$strip>>;
307
+ frontendUrl: z.ZodOptional<z.ZodString>;
308
+ environments: z.ZodOptional<z.ZodArray<z.ZodObject<{
309
+ key: z.ZodString;
310
+ label: z.ZodString;
311
+ convex: z.ZodOptional<z.ZodObject<{
312
+ deployment: z.ZodOptional<z.ZodString>;
313
+ dataset: z.ZodOptional<z.ZodString>;
314
+ }, z.core.$strip>>;
315
+ frontendUrl: z.ZodOptional<z.ZodString>;
316
+ }, z.core.$strip>>>;
317
+ collections: z.ZodOptional<z.ZodArray<z.ZodObject<{
318
+ id: z.ZodString;
319
+ kind: z.ZodDefault<z.ZodEnum<{
320
+ asset: "asset";
321
+ document: "document";
322
+ }>>;
323
+ fields: z.ZodDefault<z.ZodArray<z.ZodType<import("@elytracms/core/cms-core").FieldDef, unknown, z.core.$ZodTypeInternals<import("@elytracms/core/cms-core").FieldDef, unknown>>>>;
324
+ form: z.ZodOptional<z.ZodObject<{
325
+ label: z.ZodOptional<z.ZodString>;
326
+ labelSingular: z.ZodOptional<z.ZodString>;
327
+ description: z.ZodOptional<z.ZodString>;
328
+ groups: z.ZodOptional<z.ZodArray<z.ZodString>>;
329
+ tabs: z.ZodOptional<z.ZodArray<z.ZodString>>;
330
+ }, z.core.$strip>>;
331
+ localized: z.ZodOptional<z.ZodBoolean>;
332
+ titleField: z.ZodOptional<z.ZodString>;
333
+ singleton: z.ZodOptional<z.ZodBoolean>;
334
+ }, z.core.$strip>>>;
335
+ routes: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
336
+ id: z.ZodString;
337
+ pattern: z.ZodString;
338
+ locale: z.ZodOptional<z.ZodString>;
339
+ document: z.ZodOptional<z.ZodObject<{
340
+ collection: z.ZodString;
341
+ id: z.ZodString;
342
+ }, z.core.$strip>>;
343
+ }, z.core.$strip>>, z.ZodCustom<RoutesDerive, RoutesDerive>]>>;
344
+ redirects: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
345
+ id: z.ZodString;
346
+ from: z.ZodString;
347
+ to: z.ZodString;
348
+ permanent: z.ZodDefault<z.ZodBoolean>;
349
+ }, z.core.$strip>>, z.ZodCustom<RedirectsDerive, RedirectsDerive>]>>;
350
+ exportTarget: z.ZodOptional<z.ZodEnum<{
351
+ "next-app-router": "next-app-router";
352
+ }>>;
353
+ sectionAvailability: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
354
+ components: "components";
355
+ assets: "assets";
356
+ cms: "cms";
357
+ extensions: "extensions";
358
+ settings: "settings";
359
+ }>, z.ZodEnum<{
360
+ available: "available";
361
+ planned: "planned";
362
+ unavailable: "unavailable";
363
+ }>>>;
364
+ name: z.ZodString;
365
+ slug: z.ZodString;
366
+ }, z.core.$strip>>;
367
+ }, z.core.$strip>;
368
+ export type ElytraConfigInput = z.infer<typeof elytraConfigInputSchema>;
369
+ /**
370
+ * Typed identity helper for `elytra.config.ts` — keeps the config file
371
+ * declarative (like Vite's `defineConfig`). Validation happens on load via
372
+ * {@link resolveWorkspaceConfig}, not here, so a config file never throws.
373
+ *
374
+ * @example
375
+ * ```ts
376
+ * // elytra.config.ts
377
+ * import { defineElytraConfig } from '@elytracms/core/export-sync'
378
+ *
379
+ * export default defineElytraConfig({
380
+ * base: {
381
+ * locales: ['en', 'de'],
382
+ * defaultLocale: 'en',
383
+ * components: { package: '@acme/site-components' },
384
+ * schema: { module: './src/schema/collections' },
385
+ * },
386
+ * projects: [
387
+ * { name: 'Acme Marketing', slug: 'acme-marketing' },
388
+ * {
389
+ * name: 'Acme Store',
390
+ * slug: 'acme-store',
391
+ * convex: { deployment: 'https://store.convex.cloud' },
392
+ * locales: ['en'],
393
+ * defaultLocale: 'en',
394
+ * },
395
+ * ],
396
+ * })
397
+ * ```
398
+ */
399
+ export declare function defineElytraConfig(config: ElytraConfigInput): ElytraConfigInput;
400
+ /** Stable codes for workspace-config validation issues (EC-154). */
401
+ export declare const workspaceConfigIssueCodeSchema: z.ZodEnum<{
402
+ "invalid-name": "invalid-name";
403
+ "invalid-slug": "invalid-slug";
404
+ "empty-locales": "empty-locales";
405
+ "duplicate-locale": "duplicate-locale";
406
+ "invalid-locale": "invalid-locale";
407
+ "default-locale-not-in-locales": "default-locale-not-in-locales";
408
+ "no-environments": "no-environments";
409
+ "duplicate-environment": "duplicate-environment";
410
+ "invalid-environment": "invalid-environment";
411
+ "invalid-config-shape": "invalid-config-shape";
412
+ "missing-default-export": "missing-default-export";
413
+ "empty-projects": "empty-projects";
414
+ "duplicate-project-slug": "duplicate-project-slug";
415
+ "missing-default-locale": "missing-default-locale";
416
+ }>;
417
+ export type WorkspaceConfigIssueCode = z.infer<typeof workspaceConfigIssueCodeSchema>;
418
+ /**
419
+ * A structured, file-located workspace-config issue. `path` addresses the
420
+ * config object (e.g. `['projects', 1, 'defaultLocale']`); `file` is attached
421
+ * by the loader when the config came from a file.
422
+ */
423
+ export interface WorkspaceConfigIssue {
424
+ code: WorkspaceConfigIssueCode;
425
+ severity: 'error' | 'warning';
426
+ message: string;
427
+ path: ReadonlyArray<string | number>;
428
+ /** Source file, when the config was loaded from one (e.g. `elytra.config.ts`). */
429
+ file?: string;
430
+ }
431
+ /** A project config after base + override composition and defaulting. */
432
+ export interface ResolvedWorkspaceProject {
433
+ name: string;
434
+ slug: string;
435
+ schema: WorkspaceSchemaRef;
436
+ locales: string[];
437
+ defaultLocale: string;
438
+ components?: readonly HostComponentEntry[];
439
+ convex?: WorkspaceConvexRef;
440
+ /** Public base URL of the live site (EC-215); the project-level fallback an
441
+ * environment's own `frontendUrl` overrides. `undefined` when unconfigured. */
442
+ frontendUrl?: string;
443
+ environments: WorkspaceEnvironment[];
444
+ /** CMS collections declared in config (AD-11, EC-183); `[]` when none. */
445
+ collections: CollectionDef[];
446
+ /** Routes materialized from config (EC-207); `[]` when none declared. */
447
+ routes: RouteRecord[];
448
+ /** Redirects materialized from config (EC-207); `[]` when none declared. */
449
+ redirects: RedirectRecord[];
450
+ /** Code-generation target (EC-179 item 5). */
451
+ exportTarget: ExportTarget;
452
+ /** Per-section availability (EC-179 item 5). */
453
+ sectionAvailability: SectionAvailabilityMap;
454
+ }
455
+ export interface WorkspaceConfigResult {
456
+ /** True when no error-severity issues are present. */
457
+ ok: boolean;
458
+ /** Resolved projects in config order. Empty when `ok` is false. */
459
+ projects: ResolvedWorkspaceProject[];
460
+ issues: WorkspaceConfigIssue[];
461
+ }
462
+ export interface ResolveWorkspaceConfigOptions {
463
+ /** Attached to every issue as its `file` (e.g. `elytra.config.ts`). */
464
+ file?: string;
465
+ }
466
+ /**
467
+ * Resolve a project's public site URL for a given environment (EC-215): the
468
+ * environment's own `frontendUrl` when it declares one, else the project-level
469
+ * fallback. `undefined` when neither is configured. The trailing slash (if any)
470
+ * is preserved as authored — callers that build paths should normalize.
471
+ */
472
+ export declare function frontendUrlForEnvironment(project: ResolvedWorkspaceProject, environmentKey?: string): string | undefined;
473
+ /**
474
+ * Build the studio's `Project` from a resolved config entry (vision AD-8). The
475
+ * slug is the canonical id; identity is config-owned, so there are no backend
476
+ * timestamps. This is how the studio sources project identity at runtime.
477
+ */
478
+ export declare function configProject(project: ResolvedWorkspaceProject): Project;
479
+ /** Map a resolved project onto the EC-028 settings shape (export target + sections defaulted). */
480
+ export declare function toProjectSettings(project: ResolvedWorkspaceProject): ProjectSettings;
481
+ /**
482
+ * **The RSC-boundary convention.** A code-first config is config-AS-CODE: it holds
483
+ * live code — component `implementation`s (host React components) and `routes`/
484
+ * `redirects` derive functions — none of it serializable. That live config is
485
+ * **server/build-only**. It may be *referenced* server-side (rendered to HTML in an
486
+ * RSC, or held in an in-process registry that the client bundle also imports as a
487
+ * normal ESM module) — a shared module import is not a wire boundary. But it must
488
+ * NEVER be passed across a true server→client serialization boundary:
489
+ *
490
+ * - a React Server Component → Client Component (`'use client'`) props boundary
491
+ * (the `@elytracms/next` delivery runtime),
492
+ * - a TanStack Start SSR → client-hydration boundary (a router `loader`/`context`
493
+ * that dehydrates, `useLoaderData`),
494
+ * - any `JSON.stringify` channel (`unstable_cache` values, the
495
+ * `VITE_ELYTRA_WORKSPACE` env channel, fixtures, codegen output).
496
+ *
497
+ * Only DERIVED DATA crosses: {@link toSerializableSchema} (this module) for the full
498
+ * structural schema, or {@link configProject} for the studio's data-only `Project`
499
+ * shape — both strip every implementation/function. Passing the live config (or a
500
+ * {@link ResolvedWorkspaceProject} still carrying `components`) across such a boundary
501
+ * would throw “Functions cannot be passed to Client Components” under RSC, or silently
502
+ * drop the implementations under SSR hydration. Audited 2026-06-20 (EC-223): every
503
+ * boundary in the studio, the delivery runtime, and codegen honours this — live
504
+ * implementations stay in-process; what crosses is always a data projection.
505
+ */
506
+ /**
507
+ * One project's structure as a **serializable projection** — the data subset of a
508
+ * resolved config project with all CODE stripped out. Every field is
509
+ * JSON-serializable: no live React component, no derive function, nothing that
510
+ * cannot survive `JSON.stringify` or a server→client RSC props boundary.
511
+ *
512
+ * Mirrors {@link ResolvedWorkspaceProject} with exactly one substitution:
513
+ * `components` drops from the live `HostComponentEntry[]` ({@link HostComponentEntry})
514
+ * to the serializable `ComponentManifest[]` — the implementations are removed, the
515
+ * manifests kept (this is the derivation the `HostComponentEntry` doc names). The
516
+ * `routes`/`redirects` derive functions are already materialized to data by the
517
+ * resolver, and `collections` is the canonical cms-core `CollectionDef` data shape.
518
+ */
519
+ export interface SerializableProject {
520
+ name: string;
521
+ slug: string;
522
+ schema: WorkspaceSchemaRef;
523
+ locales: string[];
524
+ defaultLocale: string;
525
+ /** Component MANIFESTS only — the live implementations are dropped (code). `[]` when none. */
526
+ components: ComponentManifest[];
527
+ convex?: WorkspaceConvexRef;
528
+ frontendUrl?: string;
529
+ environments: WorkspaceEnvironment[];
530
+ collections: CollectionDef[];
531
+ routes: RouteRecord[];
532
+ redirects: RedirectRecord[];
533
+ exportTarget: ExportTarget;
534
+ sectionAvailability: SectionAvailabilityMap;
535
+ }
536
+ /**
537
+ * The serializable schema for a whole workspace: the {@link WorkspaceConfigResult}
538
+ * shape with every project projected to its code-free {@link SerializableProject}.
539
+ * `ok`/`issues` pass through unchanged so portable validation keeps the structured
540
+ * boot-error story; `projects` is empty when `ok` is false (resolution failed).
541
+ */
542
+ export interface SerializableSchema {
543
+ ok: boolean;
544
+ projects: SerializableProject[];
545
+ issues: WorkspaceConfigIssue[];
546
+ }
547
+ /**
548
+ * Project one resolved config project to its serializable form (EC-223 mount
549
+ * contract). The single code→data step is `components`: each live
550
+ * `{ manifest, implementation }` collapses to its `manifest`, dropping the opaque
551
+ * host React component. Arrays are copied so the projection is an owned snapshot;
552
+ * deterministic — the same resolved project always yields the same value.
553
+ */
554
+ export declare function toSerializableProject(project: ResolvedWorkspaceProject): SerializableProject;
555
+ /**
556
+ * **`toSerializableSchema(config)`** — the EC-223 serializable-schema projection.
557
+ * Resolve a code-first config (running base+override composition and the
558
+ * `routes`/`redirects` derives), then strip code from every project. The result
559
+ * is a pure-data snapshot of the workspace's structure — the portable-validation
560
+ * artifact, the AI/CLI codegen target (EC-209), the fixtures source, and the only
561
+ * thing that may cross a server→client RSC boundary (never the live config).
562
+ *
563
+ * Never throws: an invalid config returns `{ ok: false, projects: [], issues }`,
564
+ * exactly as {@link resolveWorkspaceConfig} reports it. Deterministic.
565
+ */
566
+ export declare function toSerializableSchema(config: ElytraConfigInput, options?: ResolveWorkspaceConfigOptions): SerializableSchema;
567
+ /**
568
+ * Validate + resolve a raw config value (the default export of
569
+ * `elytra.config.ts`, or env-injected JSON). Never throws: every failure mode
570
+ * is a structured, path-located {@link WorkspaceConfigIssue}. Deterministic —
571
+ * the same input always yields byte-identical results.
572
+ */
573
+ export declare function resolveWorkspaceConfig(value: unknown, options?: ResolveWorkspaceConfigOptions): WorkspaceConfigResult;
574
+ /** Conventional config file name (the CLI also accepts compiled variants). */
575
+ export declare const WORKSPACE_CONFIG_FILE = "elytra.config.ts";
576
+ /** File names the loaders probe for, in priority order. */
577
+ export declare const WORKSPACE_CONFIG_FILES: readonly ["elytra.config.ts", "elytra.config.mts", "elytra.config.js", "elytra.config.mjs"];
578
+ /**
579
+ * Pull the config value out of a loaded module namespace. The convention is a
580
+ * default export (`export default defineElytraConfig({...})`); a missing one
581
+ * is a structured issue, not a throw.
582
+ */
583
+ export declare function extractWorkspaceConfigExport(moduleExports: unknown, file?: string): {
584
+ value: unknown;
585
+ } | {
586
+ issue: WorkspaceConfigIssue;
587
+ };