@conloca/astro-cms 0.1.15 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (367) hide show
  1. package/README.md +259 -247
  2. package/dist/internal/acorn-default.mjs +11 -3
  3. package/dist/internal/page-handler.astro +137 -358
  4. package/dist/ts/node/content.d.ts +4 -0
  5. package/dist/ts/node/content.d.ts.map +1 -0
  6. package/dist/ts/node/content.js +3 -0
  7. package/dist/ts/node/content.js.map +1 -0
  8. package/dist/ts/node/index.d.ts +9 -0
  9. package/dist/ts/node/index.d.ts.map +1 -0
  10. package/dist/ts/node/index.js +14 -0
  11. package/dist/ts/node/index.js.map +1 -0
  12. package/dist/ts/src/asset-ref-base.d.ts +3 -0
  13. package/dist/ts/src/asset-ref-base.d.ts.map +1 -0
  14. package/dist/ts/src/asset-ref-base.js +48 -0
  15. package/dist/ts/src/asset-ref-base.js.map +1 -0
  16. package/dist/ts/src/checks.d.ts +7 -0
  17. package/dist/ts/src/checks.d.ts.map +1 -0
  18. package/dist/ts/src/checks.js +7 -0
  19. package/dist/ts/src/checks.js.map +1 -0
  20. package/dist/ts/src/cms-handler.d.ts +18 -0
  21. package/dist/ts/src/cms-handler.d.ts.map +1 -0
  22. package/dist/ts/src/cms-handler.js +245 -0
  23. package/dist/ts/src/cms-handler.js.map +1 -0
  24. package/dist/ts/src/collections.d.ts +160 -0
  25. package/dist/ts/src/collections.d.ts.map +1 -0
  26. package/dist/ts/src/collections.js +170 -0
  27. package/dist/ts/src/collections.js.map +1 -0
  28. package/dist/ts/src/components/HydrationWrapper.d.ts +18 -0
  29. package/dist/ts/src/components/HydrationWrapper.d.ts.map +1 -0
  30. package/dist/ts/src/components/HydrationWrapper.js +22 -0
  31. package/dist/ts/src/components/HydrationWrapper.js.map +1 -0
  32. package/dist/ts/src/components/RenderWithFragments.d.ts +27 -0
  33. package/dist/ts/src/components/RenderWithFragments.d.ts.map +1 -0
  34. package/dist/ts/src/components/RenderWithFragments.js +133 -0
  35. package/dist/ts/src/components/RenderWithFragments.js.map +1 -0
  36. package/dist/ts/src/components/RenderWithHydration.d.ts +21 -0
  37. package/dist/ts/src/components/RenderWithHydration.d.ts.map +1 -0
  38. package/dist/ts/src/components/RenderWithHydration.js +39 -0
  39. package/dist/ts/src/components/RenderWithHydration.js.map +1 -0
  40. package/dist/ts/src/components.d.ts +4 -0
  41. package/dist/ts/src/components.d.ts.map +1 -0
  42. package/dist/ts/src/components.js +4 -0
  43. package/dist/ts/src/components.js.map +1 -0
  44. package/dist/ts/src/discovery/astro-frontmatter.d.ts +18 -0
  45. package/dist/ts/src/discovery/astro-frontmatter.d.ts.map +1 -0
  46. package/dist/ts/src/discovery/astro-frontmatter.js +25 -0
  47. package/dist/ts/src/discovery/astro-frontmatter.js.map +1 -0
  48. package/dist/ts/src/discovery/discover.d.ts +43 -0
  49. package/dist/ts/src/discovery/discover.d.ts.map +1 -0
  50. package/dist/ts/src/discovery/discover.js +87 -0
  51. package/dist/ts/src/discovery/discover.js.map +1 -0
  52. package/dist/ts/src/discovery/extract-props-ts.d.ts +41 -0
  53. package/dist/ts/src/discovery/extract-props-ts.d.ts.map +1 -0
  54. package/dist/ts/src/discovery/extract-props-ts.js +232 -0
  55. package/dist/ts/src/discovery/extract-props-ts.js.map +1 -0
  56. package/dist/ts/src/discovery/merge-registry.d.ts +58 -0
  57. package/dist/ts/src/discovery/merge-registry.d.ts.map +1 -0
  58. package/dist/ts/src/discovery/merge-registry.js +333 -0
  59. package/dist/ts/src/discovery/merge-registry.js.map +1 -0
  60. package/dist/ts/src/discovery/registry-endpoint.d.ts +27 -0
  61. package/dist/ts/src/discovery/registry-endpoint.d.ts.map +1 -0
  62. package/dist/ts/src/discovery/registry-endpoint.js +76 -0
  63. package/dist/ts/src/discovery/registry-endpoint.js.map +1 -0
  64. package/dist/ts/src/discovery/scan-components.d.ts +94 -0
  65. package/dist/ts/src/discovery/scan-components.d.ts.map +1 -0
  66. package/dist/ts/src/discovery/scan-components.js +397 -0
  67. package/dist/ts/src/discovery/scan-components.js.map +1 -0
  68. package/dist/ts/src/discovery/scan-mdx.d.ts +63 -0
  69. package/dist/ts/src/discovery/scan-mdx.d.ts.map +1 -0
  70. package/dist/ts/src/discovery/scan-mdx.js +113 -0
  71. package/dist/ts/src/discovery/scan-mdx.js.map +1 -0
  72. package/dist/ts/src/discovery/scan-overrides.d.ts +71 -0
  73. package/dist/ts/src/discovery/scan-overrides.d.ts.map +1 -0
  74. package/dist/ts/src/discovery/scan-overrides.js +34 -0
  75. package/dist/ts/src/discovery/scan-overrides.js.map +1 -0
  76. package/dist/ts/src/editor-descriptors.d.ts +31 -0
  77. package/dist/ts/src/editor-descriptors.d.ts.map +1 -0
  78. package/dist/ts/src/editor-descriptors.js +84 -0
  79. package/dist/ts/src/editor-descriptors.js.map +1 -0
  80. package/dist/ts/src/handlers/collection-content-api.d.ts +32 -0
  81. package/dist/ts/src/handlers/collection-content-api.d.ts.map +1 -0
  82. package/dist/ts/src/handlers/collection-content-api.js +166 -0
  83. package/dist/ts/src/handlers/collection-content-api.js.map +1 -0
  84. package/dist/ts/src/handlers/page-render-core.d.ts +137 -0
  85. package/dist/ts/src/handlers/page-render-core.d.ts.map +1 -0
  86. package/dist/ts/src/handlers/page-render-core.js +315 -0
  87. package/dist/ts/src/handlers/page-render-core.js.map +1 -0
  88. package/dist/ts/src/hydration.d.ts +4 -0
  89. package/dist/ts/src/hydration.d.ts.map +1 -0
  90. package/dist/ts/src/hydration.js +5 -0
  91. package/dist/ts/src/hydration.js.map +1 -0
  92. package/dist/ts/src/index.d.ts +21 -0
  93. package/dist/ts/src/index.d.ts.map +1 -0
  94. package/dist/ts/src/index.js +45 -0
  95. package/dist/ts/src/index.js.map +1 -0
  96. package/dist/ts/src/internal/declared-collections.d.ts +30 -0
  97. package/dist/ts/src/internal/declared-collections.d.ts.map +1 -0
  98. package/dist/ts/src/internal/declared-collections.js +84 -0
  99. package/dist/ts/src/internal/declared-collections.js.map +1 -0
  100. package/dist/ts/src/internal/page-collection-schema.d.ts +44 -0
  101. package/dist/ts/src/internal/page-collection-schema.d.ts.map +1 -0
  102. package/dist/ts/src/internal/page-collection-schema.js +152 -0
  103. package/dist/ts/src/internal/page-collection-schema.js.map +1 -0
  104. package/dist/ts/src/lib/content-config-guard.d.ts +11 -0
  105. package/dist/ts/src/lib/content-config-guard.d.ts.map +1 -0
  106. package/dist/ts/src/lib/content-config-guard.js +41 -0
  107. package/dist/ts/src/lib/content-config-guard.js.map +1 -0
  108. package/dist/ts/src/lib/hydration-scanner.d.ts +47 -0
  109. package/dist/ts/src/lib/hydration-scanner.d.ts.map +1 -0
  110. package/dist/ts/src/lib/hydration-scanner.js +136 -0
  111. package/dist/ts/src/lib/hydration-scanner.js.map +1 -0
  112. package/dist/{lib/hydration-script.d.mts → ts/src/lib/hydration-script.d.ts} +7 -10
  113. package/dist/ts/src/lib/hydration-script.d.ts.map +1 -0
  114. package/dist/ts/src/lib/hydration-script.js +89 -0
  115. package/dist/ts/src/lib/hydration-script.js.map +1 -0
  116. package/dist/ts/src/lib/hydration-utils.d.ts +51 -0
  117. package/dist/ts/src/lib/hydration-utils.d.ts.map +1 -0
  118. package/dist/ts/src/lib/hydration-utils.js +84 -0
  119. package/dist/ts/src/lib/hydration-utils.js.map +1 -0
  120. package/dist/ts/src/lib/resolve-locale.d.ts +15 -0
  121. package/dist/ts/src/lib/resolve-locale.d.ts.map +1 -0
  122. package/dist/ts/src/lib/resolve-locale.js +16 -0
  123. package/dist/ts/src/lib/resolve-locale.js.map +1 -0
  124. package/dist/ts/src/lib/resolve-site-name.d.ts +8 -0
  125. package/dist/ts/src/lib/resolve-site-name.d.ts.map +1 -0
  126. package/dist/ts/src/lib/resolve-site-name.js +12 -0
  127. package/dist/ts/src/lib/resolve-site-name.js.map +1 -0
  128. package/dist/ts/src/lib/route-utils.d.ts +61 -0
  129. package/dist/ts/src/lib/route-utils.d.ts.map +1 -0
  130. package/dist/ts/src/lib/route-utils.js +96 -0
  131. package/dist/ts/src/lib/route-utils.js.map +1 -0
  132. package/dist/ts/src/lib/routing-config.d.ts +38 -0
  133. package/dist/ts/src/lib/routing-config.d.ts.map +1 -0
  134. package/dist/ts/src/lib/routing-config.js +106 -0
  135. package/dist/ts/src/lib/routing-config.js.map +1 -0
  136. package/dist/ts/src/lib/serialize-props.d.ts +6 -0
  137. package/dist/ts/src/lib/serialize-props.d.ts.map +1 -0
  138. package/dist/ts/src/lib/serialize-props.js +8 -0
  139. package/dist/ts/src/lib/serialize-props.js.map +1 -0
  140. package/dist/ts/src/lib/unknown-components.d.ts +21 -0
  141. package/dist/ts/src/lib/unknown-components.d.ts.map +1 -0
  142. package/dist/ts/src/lib/unknown-components.js +49 -0
  143. package/dist/ts/src/lib/unknown-components.js.map +1 -0
  144. package/dist/ts/src/lib/virtual-module-generators.d.ts +33 -0
  145. package/dist/ts/src/lib/virtual-module-generators.d.ts.map +1 -0
  146. package/dist/ts/src/lib/virtual-module-generators.js +51 -0
  147. package/dist/ts/src/lib/virtual-module-generators.js.map +1 -0
  148. package/dist/{withHydration-HIvO9ysY.d.mts → ts/src/lib/withHydration.d.ts} +7 -11
  149. package/dist/ts/src/lib/withHydration.d.ts.map +1 -0
  150. package/dist/ts/src/lib/withHydration.js +50 -0
  151. package/dist/ts/src/lib/withHydration.js.map +1 -0
  152. package/dist/ts/src/loader.d.ts +27 -0
  153. package/dist/ts/src/loader.d.ts.map +1 -0
  154. package/dist/ts/src/loader.js +118 -0
  155. package/dist/ts/src/loader.js.map +1 -0
  156. package/dist/ts/src/locales-helpers.d.ts +61 -0
  157. package/dist/ts/src/locales-helpers.d.ts.map +1 -0
  158. package/dist/ts/src/locales-helpers.js +50 -0
  159. package/dist/ts/src/locales-helpers.js.map +1 -0
  160. package/dist/ts/src/mime-types.d.ts +3 -0
  161. package/dist/ts/src/mime-types.d.ts.map +1 -0
  162. package/dist/ts/src/mime-types.js +20 -0
  163. package/dist/ts/src/mime-types.js.map +1 -0
  164. package/dist/ts/src/page-feed.d.ts +13 -0
  165. package/dist/ts/src/page-feed.d.ts.map +1 -0
  166. package/dist/ts/src/page-feed.js +20 -0
  167. package/dist/ts/src/page-feed.js.map +1 -0
  168. package/dist/ts/src/page-schemas.d.ts +6 -0
  169. package/dist/ts/src/page-schemas.d.ts.map +1 -0
  170. package/dist/ts/src/page-schemas.js +6 -0
  171. package/dist/ts/src/page-schemas.js.map +1 -0
  172. package/dist/ts/src/path-validation.d.ts +8 -0
  173. package/dist/ts/src/path-validation.d.ts.map +1 -0
  174. package/dist/ts/src/path-validation.js +13 -0
  175. package/dist/ts/src/path-validation.js.map +1 -0
  176. package/dist/ts/src/plugin-spa.d.ts +182 -0
  177. package/dist/ts/src/plugin-spa.d.ts.map +1 -0
  178. package/dist/ts/src/plugin-spa.js +1165 -0
  179. package/dist/ts/src/plugin-spa.js.map +1 -0
  180. package/dist/ts/src/puck-manifest/components-endpoint.d.ts +30 -0
  181. package/dist/ts/src/puck-manifest/components-endpoint.d.ts.map +1 -0
  182. package/dist/ts/src/puck-manifest/components-endpoint.js +54 -0
  183. package/dist/ts/src/puck-manifest/components-endpoint.js.map +1 -0
  184. package/dist/ts/src/puck-manifest/field-projection.d.ts +91 -0
  185. package/dist/ts/src/puck-manifest/field-projection.d.ts.map +1 -0
  186. package/dist/ts/src/puck-manifest/field-projection.js +422 -0
  187. package/dist/ts/src/puck-manifest/field-projection.js.map +1 -0
  188. package/dist/ts/src/puck-manifest/index.d.ts +4 -0
  189. package/dist/ts/src/puck-manifest/index.d.ts.map +1 -0
  190. package/dist/ts/src/puck-manifest/index.js +3 -0
  191. package/dist/ts/src/puck-manifest/index.js.map +1 -0
  192. package/dist/ts/src/puck-manifest/literal.d.ts +163 -0
  193. package/dist/ts/src/puck-manifest/literal.d.ts.map +1 -0
  194. package/dist/ts/src/puck-manifest/literal.js +354 -0
  195. package/dist/ts/src/puck-manifest/literal.js.map +1 -0
  196. package/dist/ts/src/puck-manifest/read-config.d.ts +42 -0
  197. package/dist/ts/src/puck-manifest/read-config.d.ts.map +1 -0
  198. package/dist/ts/src/puck-manifest/read-config.js +517 -0
  199. package/dist/ts/src/puck-manifest/read-config.js.map +1 -0
  200. package/dist/ts/src/puck-manifest/read-field.d.ts +7 -0
  201. package/dist/ts/src/puck-manifest/read-field.d.ts.map +1 -0
  202. package/dist/ts/src/puck-manifest/read-field.js +11 -0
  203. package/dist/ts/src/puck-manifest/read-field.js.map +1 -0
  204. package/dist/ts/src/puck-manifest/read-wrapper.d.ts +147 -0
  205. package/dist/ts/src/puck-manifest/read-wrapper.d.ts.map +1 -0
  206. package/dist/ts/src/puck-manifest/read-wrapper.js +889 -0
  207. package/dist/ts/src/puck-manifest/read-wrapper.js.map +1 -0
  208. package/dist/ts/src/puck-manifest/reading-budget.d.ts +50 -0
  209. package/dist/ts/src/puck-manifest/reading-budget.d.ts.map +1 -0
  210. package/dist/ts/src/puck-manifest/reading-budget.js +113 -0
  211. package/dist/ts/src/puck-manifest/reading-budget.js.map +1 -0
  212. package/dist/ts/src/puck-manifest/resolve-reference.d.ts +4 -0
  213. package/dist/ts/src/puck-manifest/resolve-reference.d.ts.map +1 -0
  214. package/dist/ts/src/puck-manifest/resolve-reference.js +4 -0
  215. package/dist/ts/src/puck-manifest/resolve-reference.js.map +1 -0
  216. package/dist/ts/src/puck-manifest/source-reference.d.ts +96 -0
  217. package/dist/ts/src/puck-manifest/source-reference.d.ts.map +1 -0
  218. package/dist/ts/src/puck-manifest/source-reference.js +424 -0
  219. package/dist/ts/src/puck-manifest/source-reference.js.map +1 -0
  220. package/dist/ts/src/puck-manifest/syntax.d.ts +29 -0
  221. package/dist/ts/src/puck-manifest/syntax.d.ts.map +1 -0
  222. package/dist/ts/src/puck-manifest/syntax.js +79 -0
  223. package/dist/ts/src/puck-manifest/syntax.js.map +1 -0
  224. package/dist/ts/src/puck-manifest/types.d.ts +145 -0
  225. package/dist/ts/src/puck-manifest/types.d.ts.map +1 -0
  226. package/dist/ts/src/puck-manifest/types.js +2 -0
  227. package/dist/ts/src/puck-manifest/types.js.map +1 -0
  228. package/dist/ts/src/safe-json-stringify.d.ts +13 -0
  229. package/dist/ts/src/safe-json-stringify.d.ts.map +1 -0
  230. package/dist/ts/src/safe-json-stringify.js +7 -0
  231. package/dist/ts/src/safe-json-stringify.js.map +1 -0
  232. package/dist/ts/src/sandbox-frame-handler.d.ts +19 -0
  233. package/dist/ts/src/sandbox-frame-handler.d.ts.map +1 -0
  234. package/dist/ts/src/sandbox-frame-handler.js +27 -0
  235. package/dist/ts/src/sandbox-frame-handler.js.map +1 -0
  236. package/dist/ts/src/site-styles/content-wrapper-endpoint.d.ts +73 -0
  237. package/dist/ts/src/site-styles/content-wrapper-endpoint.d.ts.map +1 -0
  238. package/dist/ts/src/site-styles/content-wrapper-endpoint.js +224 -0
  239. package/dist/ts/src/site-styles/content-wrapper-endpoint.js.map +1 -0
  240. package/dist/ts/src/site-styles/render-endpoint.d.ts +50 -0
  241. package/dist/ts/src/site-styles/render-endpoint.d.ts.map +1 -0
  242. package/dist/ts/src/site-styles/render-endpoint.js +264 -0
  243. package/dist/ts/src/site-styles/render-endpoint.js.map +1 -0
  244. package/dist/ts/src/site-styles/styles-endpoint.d.ts +59 -0
  245. package/dist/ts/src/site-styles/styles-endpoint.d.ts.map +1 -0
  246. package/dist/ts/src/site-styles/styles-endpoint.js +156 -0
  247. package/dist/ts/src/site-styles/styles-endpoint.js.map +1 -0
  248. package/dist/ts/src/sitemap-options.d.ts +21 -0
  249. package/dist/ts/src/sitemap-options.d.ts.map +1 -0
  250. package/dist/ts/src/sitemap-options.js +92 -0
  251. package/dist/ts/src/sitemap-options.js.map +1 -0
  252. package/dist/ts/src/tiptap-html-static.d.ts +15 -0
  253. package/dist/ts/src/tiptap-html-static.d.ts.map +1 -0
  254. package/dist/ts/src/tiptap-html-static.js +67 -0
  255. package/dist/ts/src/tiptap-html-static.js.map +1 -0
  256. package/dist/ts/src/types.d.ts +543 -0
  257. package/dist/ts/src/types.d.ts.map +1 -0
  258. package/dist/ts/src/types.js +2 -0
  259. package/dist/ts/src/types.js.map +1 -0
  260. package/dist/virtual-modules.d.ts +74 -0
  261. package/node/content.ts +14 -0
  262. package/node/index.ts +22 -0
  263. package/package.json +198 -56
  264. package/src/asset-ref-base.ts +48 -0
  265. package/src/checks.ts +10 -0
  266. package/src/cms-handler.ts +280 -0
  267. package/src/collections.ts +262 -0
  268. package/src/components/HydrationWrapper.tsx +41 -0
  269. package/src/components/RenderWithFragments.tsx +204 -0
  270. package/src/components/RenderWithHydration.tsx +55 -0
  271. package/src/components.ts +3 -0
  272. package/src/discovery/astro-frontmatter.ts +24 -0
  273. package/src/discovery/discover.ts +108 -0
  274. package/src/discovery/extract-props-ts.ts +255 -0
  275. package/src/discovery/merge-registry.ts +411 -0
  276. package/src/discovery/registry-endpoint.ts +80 -0
  277. package/src/discovery/scan-components.ts +458 -0
  278. package/src/discovery/scan-mdx.ts +190 -0
  279. package/src/discovery/scan-overrides.ts +92 -0
  280. package/src/editor-descriptors.ts +96 -0
  281. package/src/env.d.ts +31 -0
  282. package/src/handlers/collection-content-api.ts +196 -0
  283. package/src/handlers/page-handler.astro +320 -0
  284. package/src/handlers/page-render-core.ts +456 -0
  285. package/src/hydration.ts +7 -0
  286. package/src/index.ts +111 -0
  287. package/src/internal/acorn-default.mjs +37 -0
  288. package/src/internal/declared-collections.ts +98 -0
  289. package/src/internal/page-collection-schema.ts +210 -0
  290. package/src/lib/content-config-guard.ts +48 -0
  291. package/src/lib/hydration-scanner.ts +176 -0
  292. package/src/lib/hydration-script.ts +126 -0
  293. package/src/lib/hydration-utils.ts +120 -0
  294. package/src/lib/resolve-locale.ts +22 -0
  295. package/src/lib/resolve-site-name.ts +10 -0
  296. package/src/lib/route-utils.ts +106 -0
  297. package/src/lib/routing-config.ts +126 -0
  298. package/src/lib/serialize-props.ts +7 -0
  299. package/src/lib/unknown-components.ts +64 -0
  300. package/src/lib/virtual-module-generators.ts +58 -0
  301. package/src/lib/withHydration.ts +71 -0
  302. package/src/loader.ts +145 -0
  303. package/src/locales-helpers.ts +68 -0
  304. package/src/mime-types.ts +19 -0
  305. package/src/page-feed.ts +26 -0
  306. package/src/page-schemas.ts +19 -0
  307. package/src/path-validation.ts +13 -0
  308. package/src/plugin-spa.ts +1480 -0
  309. package/src/puck-manifest/components-endpoint.ts +55 -0
  310. package/src/puck-manifest/field-projection.ts +510 -0
  311. package/src/puck-manifest/index.ts +3 -0
  312. package/src/puck-manifest/literal.ts +459 -0
  313. package/src/puck-manifest/read-config.ts +577 -0
  314. package/src/puck-manifest/read-field.ts +19 -0
  315. package/src/puck-manifest/read-wrapper.ts +1056 -0
  316. package/src/puck-manifest/reading-budget.ts +127 -0
  317. package/src/puck-manifest/resolve-reference.ts +9 -0
  318. package/src/puck-manifest/source-reference.ts +484 -0
  319. package/src/puck-manifest/syntax.ts +104 -0
  320. package/src/puck-manifest/types.ts +139 -0
  321. package/src/safe-json-stringify.ts +17 -0
  322. package/src/sandbox-frame-handler.ts +31 -0
  323. package/src/site-styles/content-wrapper-endpoint.ts +327 -0
  324. package/src/site-styles/render-endpoint.ts +331 -0
  325. package/src/site-styles/styles-endpoint.ts +184 -0
  326. package/src/sitemap-options.ts +115 -0
  327. package/src/tiptap-html-static.ts +84 -0
  328. package/{dist/types-CVQNmPxF.d.mts → src/types.ts} +232 -79
  329. package/src/virtual-modules.d.ts +74 -0
  330. package/dist/collections.d.mts +0 -36
  331. package/dist/collections.d.mts.map +0 -1
  332. package/dist/collections.mjs +0 -65
  333. package/dist/collections.mjs.map +0 -1
  334. package/dist/components.d.mts +0 -46
  335. package/dist/components.d.mts.map +0 -1
  336. package/dist/components.mjs +0 -226
  337. package/dist/components.mjs.map +0 -1
  338. package/dist/hydration-scanner-B0NjYkZ_.mjs +0 -109
  339. package/dist/hydration-scanner-B0NjYkZ_.mjs.map +0 -1
  340. package/dist/hydration.d.mts +0 -4
  341. package/dist/hydration.mjs +0 -3
  342. package/dist/index.d.mts +0 -139
  343. package/dist/index.d.mts.map +0 -1
  344. package/dist/index.mjs +0 -66
  345. package/dist/index.mjs.map +0 -1
  346. package/dist/internal/cms-handler.d.mts +0 -26
  347. package/dist/internal/cms-handler.d.mts.map +0 -1
  348. package/dist/internal/cms-handler.mjs +0 -267
  349. package/dist/internal/cms-handler.mjs.map +0 -1
  350. package/dist/lib/hydration-script.d.mts.map +0 -1
  351. package/dist/lib/hydration-script.mjs +0 -85
  352. package/dist/lib/hydration-script.mjs.map +0 -1
  353. package/dist/loader-By-AQWHc.mjs +0 -68
  354. package/dist/loader-By-AQWHc.mjs.map +0 -1
  355. package/dist/node/content.d.mts +0 -19
  356. package/dist/node/content.d.mts.map +0 -1
  357. package/dist/node/content.mjs +0 -4
  358. package/dist/node/index.d.mts +0 -52
  359. package/dist/node/index.d.mts.map +0 -1
  360. package/dist/node/index.mjs +0 -753
  361. package/dist/node/index.mjs.map +0 -1
  362. package/dist/serialize-props-Dhv_MnkY.mjs +0 -73
  363. package/dist/serialize-props-Dhv_MnkY.mjs.map +0 -1
  364. package/dist/types-CVQNmPxF.d.mts.map +0 -1
  365. package/dist/withHydration-EzyzBQ-Y.mjs +0 -49
  366. package/dist/withHydration-EzyzBQ-Y.mjs.map +0 -1
  367. package/dist/withHydration-HIvO9ysY.d.mts.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"asset-ref-base.d.ts","sourceRoot":"","sources":["../../../src/asset-ref-base.ts"],"names":[],"mappings":"AAIA,oGAAoG;AACpG,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAe3F"}
@@ -0,0 +1,48 @@
1
+ import { existsSync, readdirSync, realpathSync } from 'node:fs';
2
+ import { isAbsolute, join, relative, resolve, sep } from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+ /** The URL the site serves its media folder at, which is what a stored image reference must say. */
5
+ export function deriveAssetRefBase(assetsPath, publicDir, base) {
6
+ // Resolved against the working directory, as the asset API resolves it
7
+ // when it writes an upload.
8
+ const folder = resolve(assetsPath);
9
+ const publicFolder = fileURLToPath(publicDir);
10
+ const servedPath = pathWithin(publicFolder, folder) ?? pathThroughLink(publicFolder, folder);
11
+ if (servedPath === undefined) {
12
+ throw new Error(`[Conloca] The site does not serve assetsPath "${assetsPath}" (${folder}), so every image the editor ` +
13
+ `stores from it would be a broken link. Move the folder inside publicDir (${publicFolder}), ` +
14
+ 'or keep it where it is and put a link to it (a symlink) directly inside publicDir.');
15
+ }
16
+ const siteBase = base.replace(/\/+$/, '');
17
+ return servedPath ? `${siteBase}/${servedPath.split(sep).join('/')}` : siteBase;
18
+ }
19
+ /** `path` relative to `folder` when it is `folder` or inside it. */
20
+ function pathWithin(folder, path) {
21
+ const rel = relative(folder, path);
22
+ if (rel === '..' || rel.startsWith(`..${sep}`) || isAbsolute(rel))
23
+ return undefined;
24
+ return rel;
25
+ }
26
+ /**
27
+ * The served path of `folder` when a link directly inside the public folder
28
+ * points at it or at one of its parents, which is how a site exposes media it
29
+ * keeps outside the public folder.
30
+ */
31
+ function pathThroughLink(publicFolder, folder) {
32
+ // A folder that does not exist yet has no real location to compare, and a
33
+ // missing public folder holds no links.
34
+ if (!existsSync(folder) || !existsSync(publicFolder))
35
+ return undefined;
36
+ const realFolder = realpathSync(folder);
37
+ for (const entry of readdirSync(publicFolder, { withFileTypes: true })) {
38
+ const link = join(publicFolder, entry.name);
39
+ // A link to nothing cannot lead to a folder that exists.
40
+ if (!entry.isSymbolicLink() || !existsSync(link))
41
+ continue;
42
+ const rest = pathWithin(realpathSync(link), realFolder);
43
+ if (rest !== undefined)
44
+ return join(entry.name, rest);
45
+ }
46
+ return undefined;
47
+ }
48
+ //# sourceMappingURL=asset-ref-base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"asset-ref-base.js","sourceRoot":"","sources":["../../../src/asset-ref-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE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,CAAC;AACb,CAAC;AAED;;;;GAIG;AACH,SAAS,eAAe,CAAC,YAAoB,EAAE,MAAc;IAC3D,0EAA0E;IAC1E,wCAAwC;IACxC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC;QAAE,OAAO,SAAS,CAAC;IACvE,MAAM,UAAU,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;IACxC,KAAK,MAAM,KAAK,IAAI,WAAW,CAAC,YAAY,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;QACvE,MAAM,IAAI,GAAG,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QAC5C,yDAAyD;QACzD,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;YAAE,SAAS;QAC3D,MAAM,IAAI,GAAG,UAAU,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,CAAC;QACxD,IAAI,IAAI,KAAK,SAAS;YAAE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACxD,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Pure project-health helpers shared with external tooling (the conloca CLI's
3
+ * doctor command). This entry must stay a leaf: node:fs and node:path only,
4
+ * so importing it never pulls in the astro integration graph.
5
+ */
6
+ export { CONTENT_CONFIG_SNIPPET, type ContentConfigProblem, findContentConfigProblem, } from './lib/content-config-guard.js';
7
+ //# sourceMappingURL=checks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checks.d.ts","sourceRoot":"","sources":["../../../src/checks.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACL,sBAAsB,EACtB,KAAK,oBAAoB,EACzB,wBAAwB,GACzB,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Pure project-health helpers shared with external tooling (the conloca CLI's
3
+ * doctor command). This entry must stay a leaf: node:fs and node:path only,
4
+ * so importing it never pulls in the astro integration graph.
5
+ */
6
+ export { CONTENT_CONFIG_SNIPPET, findContentConfigProblem, } from './lib/content-config-guard.js';
7
+ //# sourceMappingURL=checks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checks.js","sourceRoot":"","sources":["../../../src/checks.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACL,sBAAsB,EAEtB,wBAAwB,GACzB,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { APIRoute } from 'astro';
2
+ export { SPA_MIME_TYPES } from './mime-types.js';
3
+ /**
4
+ * Unified CMS handler - single entry point for all CMS routes.
5
+ *
6
+ * This handler:
7
+ * 1. Validates CF Access authentication ONCE at the top
8
+ * 2. Routes to appropriate sub-handler based on path:
9
+ * - /api/* -> handleContentApi()
10
+ * - /* -> handleSpa()
11
+ *
12
+ * Benefits:
13
+ * - Single authentication check prevents security gaps
14
+ * - New routes automatically inherit auth protection
15
+ * - Easier to audit security
16
+ */
17
+ export declare const ALL: APIRoute;
18
+ //# sourceMappingURL=cms-handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cms-handler.d.ts","sourceRoot":"","sources":["../../../src/cms-handler.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAKtC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AA2BjD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,GAAG,EAAE,QAoBjB,CAAC"}
@@ -0,0 +1,245 @@
1
+ import { readFile } from 'node:fs/promises';
2
+ import { createRequire } from 'node:module';
3
+ import { dirname, join } from 'node:path';
4
+ import spaConfig from 'virtual:conloca-config';
5
+ import { createContentAPIRouter, FileSystemContentAPI, validateCFAccessRequest, } from '@conloca/content-api/node';
6
+ import { handleMDXCompileRequest } from '@conloca/mdx/node';
7
+ import { SPA_MIME_TYPES } from './mime-types.js';
8
+ import { isPathWithinBase } from './path-validation.js';
9
+ import { safeJsonStringify } from './safe-json-stringify.js';
10
+ export { SPA_MIME_TYPES } from './mime-types.js';
11
+ /**
12
+ * Read the top-level locales options from build-time env vars.
13
+ * `CONLOCA_LOCALES` is inlined as a JS array (or `null`) by Vite's
14
+ * `define`; `CONLOCA_DEFAULT_LOCALE` is a string (or `''`). When neither
15
+ * is set, returns an empty object so the spread is a no-op and the
16
+ * content-api falls back to sites.json (the existing behavior).
17
+ */
18
+ function localesFromEnv() {
19
+ const list = import.meta.env.CONLOCA_LOCALES;
20
+ const defaultLocale = import.meta.env.CONLOCA_DEFAULT_LOCALE;
21
+ return {
22
+ ...(Array.isArray(list) && list.length > 0 ? { availableLocales: list } : {}),
23
+ ...(typeof defaultLocale === 'string' && defaultLocale ? { defaultLocale } : {}),
24
+ };
25
+ }
26
+ // mdxPages config (root / site / defaultLocale) is no longer passed as
27
+ // env vars — the content-api reads sites.json directly from disk under
28
+ // `contentRoot`, so handlers below don't need to spread mdx-options at
29
+ // all. See `readSitesConfig()` in @conloca/content-api/node.
30
+ // Get the path to the cms-spa package by resolving its package.json
31
+ const require = createRequire(import.meta.url);
32
+ const cmsSpaPath = dirname(require.resolve('@conloca/cms-spa/package.json'));
33
+ /**
34
+ * Unified CMS handler - single entry point for all CMS routes.
35
+ *
36
+ * This handler:
37
+ * 1. Validates CF Access authentication ONCE at the top
38
+ * 2. Routes to appropriate sub-handler based on path:
39
+ * - /api/* -> handleContentApi()
40
+ * - /* -> handleSpa()
41
+ *
42
+ * Benefits:
43
+ * - Single authentication check prevents security gaps
44
+ * - New routes automatically inherit auth protection
45
+ * - Easier to audit security
46
+ */
47
+ export const ALL = async ({ params, request }) => {
48
+ // Step 1: Validate CF Access ONCE
49
+ const cfResult = await validateCFAccessRequest(request);
50
+ if (!cfResult.valid && cfResult.required) {
51
+ return new Response(JSON.stringify({ error: 'Unauthorized' }), {
52
+ status: 401,
53
+ headers: { 'Content-Type': 'application/json' },
54
+ });
55
+ }
56
+ // Step 2: Route based on path
57
+ const pathArray = params.path;
58
+ const path = Array.isArray(pathArray) ? pathArray.join('/') : pathArray || '';
59
+ // Route to appropriate handler
60
+ if (path.startsWith('api/')) {
61
+ return handleContentApi(request, cfResult);
62
+ }
63
+ return handleSpa(params);
64
+ };
65
+ // ============================================================================
66
+ // SPA Handler (from spa-handler.ts)
67
+ // ============================================================================
68
+ /**
69
+ * Generate HTML for dev mode that loads cms-spa source through Vite.
70
+ * This ensures React is resolved from Vite's pre-bundled deps, not from the cms-spa bundle.
71
+ */
72
+ function generateDevHtml(config) {
73
+ return `<!DOCTYPE html>
74
+ <html lang="en">
75
+ <head>
76
+ <meta charset="UTF-8" />
77
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
78
+ <title>Conloca CMS</title>
79
+ <link rel="stylesheet" href="${config.basename}/main.css" />
80
+ <script type="module" src="${config.basename}/site-styles.js"></script>
81
+ <script type="module" src="${config.basename}/editor-styles.js"></script>
82
+ <script>
83
+ // Configure UI with plugin options
84
+ window.__UI_CONFIG__ = ${safeJsonStringify(config)};
85
+ </script>
86
+ <script type="module" src="${config.basename}/schemas-entry.js"></script>
87
+ <script type="module" src="${config.basename}/puck-entry.js"></script>
88
+ <script type="module" src="${config.basename}/content-listener.js"></script>
89
+ </head>
90
+ <body>
91
+ <div id="root"></div>
92
+ <script type="module" src="${config.basename}/cms-spa-entry.js"></script>
93
+ </body>
94
+ </html>`;
95
+ }
96
+ /**
97
+ * Load the HTML at runtime (production only)
98
+ */
99
+ async function loadIndexHtml() {
100
+ const spaDir = join(cmsSpaPath, 'dist/spa');
101
+ const { readdir } = await import('node:fs/promises');
102
+ const files = await readdir(spaDir);
103
+ const htmlFile = files.find((f) => f.startsWith('index.') && f.endsWith('.html'));
104
+ if (!htmlFile) {
105
+ throw new Error('No index.html found in @conloca/cms-spa dist/spa');
106
+ }
107
+ const htmlPath = join(spaDir, htmlFile);
108
+ const html = await readFile(htmlPath, 'utf-8');
109
+ return html;
110
+ }
111
+ /**
112
+ * Handle SPA requests - serve CMS admin interface
113
+ */
114
+ async function handleSpa(params) {
115
+ // The path parameter is an array for [...path] routes
116
+ const pathArray = params.path;
117
+ const path = Array.isArray(pathArray) ? pathArray.join('/') : pathArray || '';
118
+ // For the root path or any path without an extension, serve the HTML
119
+ if (!path?.includes('.')) {
120
+ try {
121
+ let html;
122
+ // In dev mode, generate HTML that loads source through Vite
123
+ // In production, load the pre-built HTML from cms-spa dist
124
+ if (import.meta.env.DEV) {
125
+ html = generateDevHtml(spaConfig);
126
+ }
127
+ else {
128
+ html = await loadIndexHtml();
129
+ // Inject CMS configuration and load virtual modules
130
+ const configScript = `
131
+ <script>
132
+ // Configure UI with plugin options
133
+ window.__UI_CONFIG__ = ${safeJsonStringify(spaConfig)};
134
+ </script>
135
+ <script type="module" src="${spaConfig.basename}/site-styles.js"></script>
136
+ <script type="module" src="${spaConfig.basename}/editor-styles.js"></script>
137
+ <script type="module" src="${spaConfig.basename}/schemas-entry.js"></script>
138
+ <script type="module" src="${spaConfig.basename}/puck-entry.js"></script>
139
+ <script type="module" src="${spaConfig.basename}/content-listener.js"></script>
140
+ `;
141
+ // Inject the script at the top to ensure config is available first
142
+ html = html.replace('<head>', `<head>${configScript}`);
143
+ }
144
+ return new Response(html, {
145
+ headers: {
146
+ 'Content-Type': 'text/html',
147
+ 'Cache-Control': 'no-store, must-revalidate',
148
+ 'X-HMR': 'spa-page',
149
+ },
150
+ });
151
+ }
152
+ catch (error) {
153
+ console.error('Error loading CMS HTML:', error);
154
+ return new Response('CMS build not found. Run nx build @conloca/astro-cms', {
155
+ status: 500,
156
+ headers: { 'Content-Type': 'text/plain' },
157
+ });
158
+ }
159
+ }
160
+ // For asset requests, serve them from the cms-spa dist/spa directory
161
+ try {
162
+ const spaBase = join(cmsSpaPath, 'dist/spa');
163
+ const assetPath = join(spaBase, path);
164
+ if (!isPathWithinBase(spaBase, assetPath)) {
165
+ console.warn('[security] Path traversal attempt blocked:', path);
166
+ return new Response('Forbidden', { status: 403 });
167
+ }
168
+ const content = await readFile(assetPath);
169
+ // Determine content type from extension map with octet-stream fallback
170
+ const ext = path.substring(path.lastIndexOf('.'));
171
+ const contentType = SPA_MIME_TYPES[ext] ?? 'application/octet-stream';
172
+ return new Response(content, {
173
+ headers: {
174
+ 'Content-Type': contentType,
175
+ 'Cache-Control': import.meta.env.DEV ? 'no-store, must-revalidate' : 'public, max-age=31536000',
176
+ },
177
+ });
178
+ }
179
+ catch {
180
+ return new Response('Not found', { status: 404 });
181
+ }
182
+ }
183
+ // ============================================================================
184
+ // Content API Handler (from content-api-handler.ts)
185
+ // ============================================================================
186
+ /**
187
+ * Handle Content API requests - delegates to Hono router
188
+ */
189
+ async function handleContentApi(request, cfResult) {
190
+ const contentRoot = import.meta.env.CONLOCA_CONTENT_ROOT || './content';
191
+ const canvasDir = import.meta.env.CONLOCA_CANVAS_DIR || './canvas';
192
+ // FileSystemContentAPI.create() handles caching internally.
193
+ // mdxPages is read from sites.json by the content-api itself.
194
+ const contentApi = await FileSystemContentAPI.create({
195
+ contentRoot,
196
+ canvasDir,
197
+ ...localesFromEnv(),
198
+ });
199
+ // Create the Hono router with assets and content root for git operations
200
+ const assetsPath = import.meta.env.CONLOCA_ASSETS_PATH || '';
201
+ const app = createContentAPIRouter(contentApi, {
202
+ ...(assetsPath && { assetsPath }),
203
+ contentRoot,
204
+ });
205
+ // Mounted here rather than in @conloca/content-api because compiling MDX is a
206
+ // renderer concern; content-api is purely storage.
207
+ app.post('/mdx/compile', (c) => handleMDXCompileRequest(c.req.raw));
208
+ // Extract the path after the API base
209
+ const url = new URL(request.url);
210
+ // Find where /api/ appears in the pathname
211
+ const apiIndex = url.pathname.indexOf('/api/');
212
+ if (apiIndex === -1) {
213
+ return new Response('Invalid API path', { status: 400 });
214
+ }
215
+ const basePath = url.pathname.substring(0, apiIndex + 4); // Include '/api'
216
+ const path = url.pathname.substring(basePath.length) || '/';
217
+ // Pass user to Hono via headers for downstream use (needed for git commit attribution)
218
+ const headers = new Headers(request.headers);
219
+ if (cfResult.user) {
220
+ if (cfResult.user.email) {
221
+ headers.set('X-CF-User-Email', cfResult.user.email);
222
+ }
223
+ if (cfResult.user.sub) {
224
+ headers.set('X-CF-User-Sub', cfResult.user.sub);
225
+ }
226
+ }
227
+ // Create a new request with the correct path for Hono
228
+ // Note: duplex option is required for Node.js fetch when sending a body
229
+ // but not in the TypeScript RequestInit type
230
+ const honoRequest = new Request(new URL(path + url.search, 'http://localhost').href, {
231
+ method: request.method,
232
+ headers,
233
+ body: request.body,
234
+ ...(request.body && { duplex: 'half' }),
235
+ });
236
+ // Let Hono handle the request
237
+ const response = await app.fetch(honoRequest);
238
+ // Return the Hono response
239
+ return new Response(response.body, {
240
+ status: response.status,
241
+ statusText: response.statusText,
242
+ headers: response.headers,
243
+ });
244
+ }
245
+ //# sourceMappingURL=cms-handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cms-handler.js","sourceRoot":"","sources":["../../../src/cms-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAEL,sBAAsB,EACtB,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,EAAE,cA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QAAQ,CAAC,IAAI,EAAE;QACjC,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,UAAU,EAAE,QAAQ,CAAC,UAAU;QAC/B,OAAO,EAAE,QAAQ,CAAC,OAAO;KAC1B,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,160 @@
1
+ import { defineCollection } from 'astro:content';
2
+ import type { DataSchemas, PageSchemas } from '@conloca/cms-spa/page-schema-define';
3
+ import { z } from 'zod';
4
+ import { ALL_FRAGMENTS_COLLECTION } from './handlers/page-render-core.js';
5
+ export { ALL_FRAGMENTS_COLLECTION };
6
+ /**
7
+ * Options for createConlocaCollections().
8
+ */
9
+ export interface CreateConlocaCollectionsOptions {
10
+ /**
11
+ * Path to content root directory. Defaults to the contentRoot configured on
12
+ * conlocaCMS() in astro.config, falling back to './content'.
13
+ */
14
+ contentRoot?: string;
15
+ /** Site name for multi-site setups. @default 'default' */
16
+ site?: string;
17
+ /**
18
+ * The same `pageSchemas` object the editor loads. Host meta fields are
19
+ * validated on every page collection at build time (made optional, because
20
+ * the editor scopes a descriptor to a prefix while Astro validates the
21
+ * whole pile). Pass the object itself — not a hand-copied field list — so
22
+ * the form and the build cannot drift. Listing types come from augmenting
23
+ * `HostPageMeta`, not from Astro `entry.data`.
24
+ * The {@link pageSchemasOf} read-back is a {@link conlocaPages} contract
25
+ * and does not cover this deprecated wrapper.
26
+ */
27
+ pageSchemas?: PageSchemas;
28
+ }
29
+ /**
30
+ * Return type of createConlocaCollections().
31
+ */
32
+ export interface ConlocaCollectionsResult {
33
+ /** Astro Content Collections definitions - export this as `collections` */
34
+ collections: Record<string, ReturnType<typeof defineCollection>>;
35
+ }
36
+ /**
37
+ * @deprecated Declare collections explicitly with {@link conlocaPages},
38
+ * {@link conlocaData} and {@link conlocaFragments} — they keep the entry
39
+ * types Astro's generated `getCollection` needs, and undeclared content
40
+ * fails the build instead of silently not building. This wrapper still
41
+ * works but returns untyped entries.
42
+ *
43
+ * Creates Astro Content Collections by discovering from indexed content.
44
+ * Uses content-api to find collections that have content.
45
+ *
46
+ * @example
47
+ * ```typescript
48
+ * // src/content.config.ts
49
+ * import { createConlocaCollections } from '@conloca/astro-cms/node/content';
50
+ * import { pageSchemas } from './page-schemas';
51
+ *
52
+ * export const { collections } = await createConlocaCollections({ pageSchemas });
53
+ * ```
54
+ */
55
+ export declare function createConlocaCollections(options?: CreateConlocaCollectionsOptions): Promise<ConlocaCollectionsResult>;
56
+ /** Options for conlocaPages(). */
57
+ export interface ConlocaPagesOptions {
58
+ /**
59
+ * The same `pageSchemas` object the editor loads. Host meta fields are
60
+ * validated on every page at build time and typed via the HostPageMeta
61
+ * augmentation. Pass the object itself — not a hand-copied field list;
62
+ * {@link pageSchemasOf} reads it back off the returned collection so a
63
+ * site test can assert exactly that.
64
+ */
65
+ pageSchemas?: PageSchemas;
66
+ /** @default 'pages' — must equal the content.config key this is assigned to. */
67
+ collection?: string;
68
+ /** @default 'default' */
69
+ site?: string;
70
+ /** @default conlocaCMS()'s contentRoot (via CONLOCA_CONTENT_ROOT), falling back to './content'. */
71
+ contentRoot?: string;
72
+ }
73
+ /**
74
+ * The exact pageSchemas object a conlocaPages collection was declared with,
75
+ * or undefined for anything else. Lets a site test assert the identity the
76
+ * pageSchemas option demands — against the real factory, with no module mock.
77
+ */
78
+ export declare function pageSchemasOf(collection: object): PageSchemas | undefined;
79
+ /**
80
+ * One typed Astro collection for Conloca pages — the explicit,
81
+ * Starlight-shaped declaration:
82
+ *
83
+ * ```ts
84
+ * export const collections = { pages: conlocaPages({ pageSchemas }) };
85
+ * ```
86
+ *
87
+ * Entry data is typed as {@link ConlocaPageEntry}; `getCollection('pages')`
88
+ * carries pathname/title/dates and the host's declared meta fields.
89
+ */
90
+ export declare function conlocaPages(options?: ConlocaPagesOptions): import("astro/content/config").CollectionConfig<z.ZodType<import("./internal/page-collection-schema.js").ConlocaPageEntry, unknown, z.core.$ZodTypeInternals<import("./internal/page-collection-schema.js").ConlocaPageEntry, unknown>>, import("astro/loaders").Loader>;
91
+ /** Options for conlocaData(). */
92
+ export interface ConlocaDataOptions<DS extends DataSchemas> {
93
+ /**
94
+ * The same `dataSchemas` object the editor renders entry forms from. Its
95
+ * keys ARE the data collections — nothing is named twice. Each entry's
96
+ * payload is validated against its schema at build time.
97
+ */
98
+ dataSchemas: DS;
99
+ /** @default 'default' */
100
+ site?: string;
101
+ /** @default conlocaCMS()'s contentRoot (via CONLOCA_CONTENT_ROOT), falling back to './content'. */
102
+ contentRoot?: string;
103
+ }
104
+ /**
105
+ * Deliberate asymmetry with pages: a data schema is validated AS GIVEN —
106
+ * requiredness preserved, no rewrite guard — because the site owns it whole
107
+ * for exactly one collection, unlike host page fields folded into the shared
108
+ * pages schema. The flip side, accepted for now: a .transform or .default in
109
+ * a dataSchema runs at build time but not in the editor form, so the two can
110
+ * diverge.
111
+ */
112
+ declare function conlocaDataCollection<T extends z.ZodObject<z.ZodRawShape>>(name: string, payload: T, contentRoot: string, site: string): import("astro/content/config").CollectionConfig<z.ZodObject<{
113
+ title: z.ZodString;
114
+ description: z.ZodOptional<z.ZodString>;
115
+ category: z.ZodOptional<z.ZodString>;
116
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
117
+ id: z.ZodString;
118
+ locale: z.ZodString;
119
+ name: z.ZodString;
120
+ data: z.ZodOptional<T>;
121
+ }, z.core.$loose>, import("astro/loaders").Loader>;
122
+ /**
123
+ * Typed Astro collections for Conloca data, one per `dataSchemas` key:
124
+ *
125
+ * ```ts
126
+ * export const collections = { ...conlocaData({ dataSchemas }) };
127
+ * ```
128
+ *
129
+ * `getCollection('testimonials')` entries carry `data` typed by that key's
130
+ * schema, and a stored entry that fails its schema fails the build instead
131
+ * of rendering blank.
132
+ */
133
+ export declare function conlocaData<DS extends DataSchemas>(options: ConlocaDataOptions<DS>): { [K in keyof DS]: ReturnType<typeof conlocaDataCollection<DS[K]>>; };
134
+ /**
135
+ * The fragments aggregate (always) plus one collection per named fragment
136
+ * folder: `...conlocaFragments('general')`. No arguments declares only the
137
+ * aggregate the render pipeline reads. There are no per-call options:
138
+ * contentRoot comes from conlocaCMS()'s contentRoot (via
139
+ * CONLOCA_CONTENT_ROOT) and the site is always 'default'.
140
+ */
141
+ export declare function conlocaFragments<const N extends readonly string[]>(...names: N): {
142
+ [ALL_FRAGMENTS_COLLECTION]: ReturnType<(collection?: string) => import("astro/content/config").CollectionConfig<z.ZodObject<{
143
+ title: z.ZodString;
144
+ description: z.ZodOptional<z.ZodString>;
145
+ category: z.ZodOptional<z.ZodString>;
146
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
147
+ id: z.ZodString;
148
+ locale: z.ZodString;
149
+ name: z.ZodString;
150
+ }, z.core.$loose>, import("astro/loaders").Loader>>;
151
+ } & { [K in N[number]]: ReturnType<(collection?: string) => import("astro/content/config").CollectionConfig<z.ZodObject<{
152
+ title: z.ZodString;
153
+ description: z.ZodOptional<z.ZodString>;
154
+ category: z.ZodOptional<z.ZodString>;
155
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
156
+ id: z.ZodString;
157
+ locale: z.ZodString;
158
+ name: z.ZodString;
159
+ }, z.core.$loose>, import("astro/loaders").Loader>>; };
160
+ //# sourceMappingURL=collections.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collections.d.ts","sourceRoot":"","sources":["../../../src/collections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAGpF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAK1E,OAAO,EAAE,wBAAwB,EAAE,CAAC;AAEpC;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC9C;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0DAA0D;IAC1D,IAAI,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