@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,84 @@
1
+ // Drop-in replacement for `@tiptap/html` in server bundles: same named exports,
2
+ // no DOM anywhere. The richtext field render imports `generateHTML`/`generateJSON`
3
+ // from `@tiptap/html`; its browser build needs `window`, and its `/server` build
4
+ // fakes one with happy-dom — whose `Window` constructor calls `node:vm`
5
+ // (`Script.runInContext`). Workers runtimes ship `node:vm` as a stub, so that
6
+ // call throws at render time and every richtext section on the page dies. The
7
+ // static renderer walks the ProseMirror document and writes the markup as a
8
+ // string instead, so the same output comes out on any engine.
9
+ import {
10
+ escapeHTML,
11
+ renderJSONContentToString,
12
+ serializeChildrenToHTMLString,
13
+ } from '@tiptap/static-renderer/json/html-string';
14
+ import { domOutputSpecToHTMLString, renderToElement } from '@tiptap/static-renderer/pm/html-string';
15
+
16
+ type RenderArgs = Parameters<typeof renderToElement<string>>[0];
17
+ type RichTextContent = RenderArgs['content'];
18
+ type RichTextExtensions = RenderArgs['extensions'];
19
+ type ElementSpec = Parameters<typeof domOutputSpecToHTMLString>[0];
20
+
21
+ // Void elements the HTML parser closes on its own. The static renderer writes
22
+ // them self-closing (`<br/>`); a DOM serializer writes `<br>`. Both parse
23
+ // identically, but the rendered markup is compared byte for byte against the
24
+ // DOM output, so normalize to the DOM spelling.
25
+ const VOID_ELEMENTS = /<(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)((?:\s[^>]*?)?)\/>/gi;
26
+
27
+ /**
28
+ * Drops the attributes an extension left empty. A DOM serializer skips those;
29
+ * the string renderer would spell them out as the text "null" (`class="null"`
30
+ * on every link, `type="null"` on every ordered list).
31
+ */
32
+ function withoutEmptyAttributes(spec: ElementSpec): ElementSpec {
33
+ if (!Array.isArray(spec)) {
34
+ return spec;
35
+ }
36
+
37
+ const [tag, ...parts] = spec;
38
+ const cleaned: [string, ...unknown[]] = [
39
+ tag,
40
+ ...parts.map((part: unknown, index) => {
41
+ // Position 0 of the rest holds the attributes, unless the element has
42
+ // none — then a nested element spec sits there instead.
43
+ if (Array.isArray(part) && typeof part[0] === 'string') {
44
+ return withoutEmptyAttributes(part as [string, ...unknown[]]);
45
+ }
46
+ if (index !== 0 || part === null || typeof part !== 'object') {
47
+ return part;
48
+ }
49
+ return Object.fromEntries(Object.entries(part).filter(([, value]) => value !== null && value !== undefined));
50
+ }),
51
+ ];
52
+
53
+ return cleaned;
54
+ }
55
+
56
+ /** Generates HTML from a ProseMirror JSON document, without a DOM. */
57
+ export function generateHTML(doc: RichTextContent, extensions: RichTextExtensions): string {
58
+ const html = renderToElement<string>({
59
+ // The string renderer's own generic defaults describe plain JSON marks;
60
+ // this walk hands it ProseMirror ones. Same function, narrower input.
61
+ renderer: renderJSONContentToString as RenderArgs['renderer'],
62
+ domOutputSpecToElement: (spec) => domOutputSpecToHTMLString(withoutEmptyAttributes(spec)),
63
+ mapDefinedTypes: {
64
+ doc: ({ children }) => serializeChildrenToHTMLString(children),
65
+ text: ({ node }) => escapeHTML(node.text ?? ''),
66
+ },
67
+ content: doc,
68
+ extensions,
69
+ });
70
+
71
+ return html.replace(VOID_ELEMENTS, '<$1$2>');
72
+ }
73
+
74
+ /**
75
+ * Parsing an HTML string back into ProseMirror JSON needs a real HTML parser,
76
+ * which no DOM-free server runtime provides. Richtext values written by the
77
+ * editor are already ProseMirror JSON, so this only trips on hand-authored HTML
78
+ * strings — and says so instead of failing deep inside a fake DOM.
79
+ */
80
+ export function generateJSON(_html: string, _extensions: RichTextExtensions): Record<string, unknown> {
81
+ throw new Error(
82
+ 'generateJSON cannot parse HTML without a DOM. Store richtext values as tiptap JSON documents instead of HTML strings.',
83
+ );
84
+ }
@@ -1,6 +1,6 @@
1
- import { Data } from "@puckeditor/core";
1
+ import type { DataBindingConfig, PageReference } from '@conloca/content-api';
2
+ import type { Data } from '@puckeditor/core';
2
3
 
3
- //#region src/types.d.ts
4
4
  /**
5
5
  * Hydration strategy for Puck components in production.
6
6
  *
@@ -22,7 +22,10 @@ import { Data } from "@puckeditor/core";
22
22
  * - 'visible': Hydrate when component enters viewport (client:visible)
23
23
  * - 'idle': Hydrate when browser is idle (client:idle)
24
24
  */
25
- type HydrationStrategy = 'none' | 'load' | 'visible' | 'idle';
25
+ export type HydrationStrategy = 'none' | 'load' | 'visible' | 'idle';
26
+
27
+ export type { ContentFragmentSectionProps } from '@conloca/cms-spa';
28
+
26
29
  /**
27
30
  * Configuration for Conloca's content page routing system.
28
31
  *
@@ -64,7 +67,7 @@ type HydrationStrategy = 'none' | 'load' | 'visible' | 'idle';
64
67
  * });
65
68
  * ```
66
69
  */
67
- interface RoutingConfig {
70
+ export interface RoutingConfig {
68
71
  /**
69
72
  * Whether routing is enabled.
70
73
  *
@@ -74,6 +77,7 @@ interface RoutingConfig {
74
77
  * @default true (when routing config object is provided)
75
78
  */
76
79
  enabled?: boolean;
80
+
77
81
  /**
78
82
  * Route definitions mapping URL patterns to content collections.
79
83
  *
@@ -89,18 +93,22 @@ interface RoutingConfig {
89
93
  * @default { pages: { pattern: '/[...slug]', collection: 'pages', prerender: true } }
90
94
  */
91
95
  routes?: Record<string, RouteConfig>;
96
+
92
97
  /**
93
98
  * Behavior when a route pattern matches but no content exists.
94
99
  *
95
- * - '404': Return a 404 response (standard behavior)
96
- * - 'passthrough': Let Astro continue to the next route handler
100
+ * - '404': Return a bare 404 response (standard behavior)
101
+ * - 'passthrough': Hand the miss back to Astro's own error handling, which
102
+ * renders the site's /404 route (prerendered included) with a real 404
103
+ * status — never a redirect or a soft-404
97
104
  *
98
- * 'passthrough' is useful when you have both CMS-managed pages
99
- * and file-based pages coexisting during migration.
105
+ * 'passthrough' is useful when the site has its own designed /404 page
106
+ * that should answer for paths the CMS doesn't know.
100
107
  *
101
108
  * @default '404'
102
109
  */
103
110
  fallback?: '404' | 'passthrough';
111
+
104
112
  /**
105
113
  * What to do when an injected route conflicts with an existing file-based route.
106
114
  *
@@ -113,6 +121,7 @@ interface RoutingConfig {
113
121
  * @default 'warn'
114
122
  */
115
123
  onConflict?: 'warn' | 'error' | 'silent';
124
+
116
125
  /**
117
126
  * Site name for content resolution.
118
127
  *
@@ -133,6 +142,7 @@ interface RoutingConfig {
133
142
  * @default 'default'
134
143
  */
135
144
  siteName?: string;
145
+
136
146
  /**
137
147
  * Default locale for content resolution.
138
148
  *
@@ -154,6 +164,7 @@ interface RoutingConfig {
154
164
  */
155
165
  locale?: string;
156
166
  }
167
+
157
168
  /**
158
169
  * Shorthand for enabling routing with all defaults.
159
170
  *
@@ -167,7 +178,8 @@ interface RoutingConfig {
167
178
  * }
168
179
  * ```
169
180
  */
170
- type RoutingConfigInput = boolean | RoutingConfig;
181
+ export type RoutingConfigInput = boolean | RoutingConfig;
182
+
171
183
  /**
172
184
  * Configuration for a single route mapping.
173
185
  *
@@ -203,7 +215,7 @@ type RoutingConfigInput = boolean | RoutingConfig;
203
215
  * }
204
216
  * ```
205
217
  */
206
- interface RouteConfig {
218
+ export interface RouteConfig {
207
219
  /**
208
220
  * Astro route pattern for URL matching.
209
221
  *
@@ -217,8 +229,14 @@ interface RouteConfig {
217
229
  *
218
230
  * IMPORTANT: Pattern must start with '/'
219
231
  * IMPORTANT: Catch-all patterns ([...param]) capture everything after the prefix
232
+ * IMPORTANT: The parameter name must be unique among the site's routes — Astro's
233
+ * runtime resolves a page's stylesheets by route name, so a Conloca route named
234
+ * like another integration's (Starlight's docs route is '/[...slug]') breaks
235
+ * the styling of one or the other in server output or when rendered on demand.
236
+ * Conloca fails such a build; pick another name, e.g. '/[...page]'.
220
237
  */
221
238
  pattern: string;
239
+
222
240
  /**
223
241
  * Content collection to use for this route.
224
242
  *
@@ -235,6 +253,7 @@ interface RouteConfig {
235
253
  * @default 'pages'
236
254
  */
237
255
  collection?: string;
256
+
238
257
  /**
239
258
  * Path to the Astro layout component.
240
259
  *
@@ -252,6 +271,7 @@ interface RouteConfig {
252
271
  * @example './src/layouts/BlogLayout.tsx'
253
272
  */
254
273
  layout?: string;
274
+
255
275
  /**
256
276
  * Whether to statically generate pages at build time.
257
277
  *
@@ -271,6 +291,7 @@ interface RouteConfig {
271
291
  * @default true
272
292
  */
273
293
  prerender?: boolean;
294
+
274
295
  /**
275
296
  * Additional route metadata passed to the page handler.
276
297
  *
@@ -280,6 +301,7 @@ interface RouteConfig {
280
301
  * @example { showSidebar: true, theme: 'dark' }
281
302
  */
282
303
  meta?: Record<string, unknown>;
304
+
283
305
  /**
284
306
  * Data binding configuration for this route.
285
307
  *
@@ -298,94 +320,225 @@ interface RouteConfig {
298
320
  */
299
321
  dataBindings?: DataBindingConfig;
300
322
  }
323
+
301
324
  /**
302
- * Configuration for automatic data collection injection into Puck components.
325
+ * Complete page data for rendering.
303
326
  *
304
- * Allows components to declare data dependencies on Conloca data collections,
305
- * which are automatically fetched and injected via Puck's metadata system.
327
+ * This is what the page-handler.astro receives after
328
+ * loading content from the matched route.
306
329
  *
307
- * @example Route with data bindings
308
- * ```typescript
309
- * conlocaCMS({
310
- * routing: {
311
- * routes: {
312
- * pages: {
313
- * pattern: '/[...slug]',
314
- * dataBindings: {
315
- * collections: ['team', 'testimonials'],
316
- * },
317
- * },
318
- * },
319
- * },
320
- * });
321
- * ```
330
+ * Contains:
331
+ * - Puck editor data for rendering
332
+ * - Page metadata for SEO/layouts
333
+ * - Route information for context
322
334
  */
323
- interface DataBindingConfig {
335
+ export interface PageData {
324
336
  /**
325
- * Collections to fetch and inject into component resolvers.
337
+ * Unique page identifier from the content collection.
326
338
  *
327
- * Each collection name must match a data collection in the content directory.
328
- * The fetched data will be available in `metadata.collections[collectionName]`
329
- * within Puck component resolvers.
339
+ * Typically matches the URL path (e.g., 'about', 'blog/post-1').
340
+ */
341
+ id: string;
342
+
343
+ /**
344
+ * Page title from content metadata.
345
+ *
346
+ * Used for:
347
+ * - <title> tag
348
+ * - Layout heading
349
+ * - Navigation/breadcrumbs
330
350
  *
331
- * @example ['team', 'testimonials', 'products']
351
+ * May be undefined if page has no title set.
332
352
  */
333
- collections?: string[];
353
+ title?: string;
354
+
334
355
  /**
335
- * Locale override for data fetching.
356
+ * Page description for SEO.
336
357
  *
337
- * Defaults to the route's locale setting (from routing.locale).
338
- * Use this to fetch data in a specific locale regardless of route config.
358
+ * Used for:
359
+ * - <meta name="description">
360
+ * - Social sharing previews
339
361
  */
340
- locale?: string;
362
+ description?: string;
363
+
341
364
  /**
342
- * Page discovery configuration for listing pages by path prefix.
365
+ * URL pathname for this page.
343
366
  *
344
- * Enables components to access lists of pages matching a URL pattern,
345
- * useful for blog listings, category pages, and site navigation.
367
+ * Always starts with '/' and matches the route pattern.
346
368
  *
347
- * @example Blog listing page
348
- * ```typescript
349
- * {
350
- * pattern: '/blog',
351
- * dataBindings: {
352
- * pages: {
353
- * prefix: '/blog/',
354
- * sort: 'date-desc',
355
- * limit: 10,
356
- * },
357
- * },
358
- * }
359
- * ```
369
+ * @example '/about'
370
+ * @example '/blog/my-first-post'
360
371
  */
361
- pages?: {
372
+ pathname: string;
373
+
374
+ /**
375
+ * Puck editor data for rendering.
376
+ *
377
+ * This is the Data object from @puckeditor/core containing:
378
+ * - root: Root component props
379
+ * - content: Array of component instances
380
+ * - zones: Named drop zones with nested content
381
+ *
382
+ * Passed directly to <Render config={} data={puckData} />
383
+ */
384
+ puckData: Data;
385
+
386
+ /**
387
+ * Content collection this page belongs to.
388
+ *
389
+ * @example 'pages', 'posts', 'docs'
390
+ */
391
+ collection: string;
392
+
393
+ /**
394
+ * Route configuration that matched this page.
395
+ *
396
+ * Includes the pattern, layout path, and any meta.
397
+ * Useful for conditional rendering based on route.
398
+ */
399
+ route: {
362
400
  /**
363
- * Path prefix to filter pages.
364
- *
365
- * Only pages whose pathname starts with this prefix are included.
366
- * The listing page itself is excluded.
367
- *
368
- * @example '/blog/' matches '/blog/post-1', '/blog/post-2'
401
+ * Route identifier from the config.
402
+ * @example 'pages', 'blog'
369
403
  */
370
- prefix: string;
404
+ name: string;
405
+
371
406
  /**
372
- * Maximum number of pages to return.
373
- *
374
- * Useful for showing "latest N posts" on a homepage or sidebar.
407
+ * Original pattern from RouteConfig.
375
408
  */
376
- limit?: number;
409
+ pattern: string;
410
+
377
411
  /**
378
- * Sort order for returned pages.
379
- *
380
- * - 'date-desc': Newest first (by modified/created date)
381
- * - 'date-asc': Oldest first
382
- * - 'title': Alphabetical by title
383
- *
384
- * @default 'date-desc'
412
+ * Route-specific metadata if configured.
385
413
  */
386
- sort?: 'date-desc' | 'date-asc' | 'title';
414
+ meta?: Record<string, unknown>;
387
415
  };
416
+
417
+ /**
418
+ * Additional page metadata from content.
419
+ *
420
+ * Custom fields stored in the page's frontmatter/metadata.
421
+ * Schema depends on the site's content configuration.
422
+ */
423
+ meta?: Record<string, unknown>;
424
+
425
+ /** The page's dates, as on PageReference. */
426
+ timestamps?: PageReference['timestamps'];
388
427
  }
428
+
429
+ /**
430
+ * Props passed to layout components wrapping page content.
431
+ *
432
+ * Layouts receive common props (title, description) that work with
433
+ * most existing layouts. No special Conloca-specific layout needed.
434
+ * A layout that needs more of the page's settings (an Open Graph image,
435
+ * structured data) reads them from `page` instead of looking the page up
436
+ * again, because a second lookup would have to repeat the handler's language,
437
+ * publication and preview rules.
438
+ *
439
+ * @example Astro layout usage
440
+ * ```astro
441
+ * ---
442
+ * interface Props {
443
+ * title: string;
444
+ * description?: string;
445
+ * }
446
+ *
447
+ * const { title, description } = Astro.props;
448
+ * ---
449
+ *
450
+ * <html>
451
+ * <head>
452
+ * <title>{title}</title>
453
+ * {description && <meta name="description" content={description} />}
454
+ * </head>
455
+ * <body>
456
+ * <slot />
457
+ * </body>
458
+ * </html>
459
+ * ```
460
+ *
461
+ * @example React layout usage
462
+ * ```tsx
463
+ * interface LayoutProps {
464
+ * title: string;
465
+ * description?: string;
466
+ * children: React.ReactNode;
467
+ * }
468
+ *
469
+ * export default function Layout({ title, children }: LayoutProps) {
470
+ * return (
471
+ * <div className="layout">
472
+ * <header>
473
+ * <h1>{title}</h1>
474
+ * </header>
475
+ * <main>{children}</main>
476
+ * </div>
477
+ * );
478
+ * }
479
+ * ```
480
+ */
481
+ export interface LayoutProps {
482
+ /**
483
+ * Page title for the document head.
484
+ */
485
+ title: string;
486
+
487
+ /**
488
+ * Page description for SEO meta tag.
489
+ */
490
+ description?: string;
491
+
492
+ /**
493
+ * The page being rendered, with its settings in `meta`: the version in the
494
+ * route's language that the handler matched, published or the draft a
495
+ * preview renders.
496
+ */
497
+ page: PageReference;
498
+
499
+ /**
500
+ * The rendered Puck content.
501
+ *
502
+ * In Astro layouts, use <slot /> instead of {children}.
503
+ * In React layouts, render {children} in the content area.
504
+ */
505
+ children?: unknown; // astro.JSX.Element | React.ReactNode
506
+ }
507
+
508
+ /**
509
+ * Layout component type for Astro.
510
+ *
511
+ * Layouts must accept LayoutProps and render a page shell
512
+ * with the provided content.
513
+ */
514
+ export type LayoutComponent = (props: LayoutProps) => unknown;
515
+
516
+ /**
517
+ * Resolved routing configuration with all fields required.
518
+ *
519
+ * This is what the page handler receives via the virtual module,
520
+ * with all defaults applied.
521
+ */
522
+ export interface ResolvedRoutingConfig {
523
+ enabled: boolean;
524
+ routes: Record<string, Required<RouteConfig>>;
525
+ fallback: '404' | 'passthrough';
526
+ onConflict: 'warn' | 'error' | 'silent';
527
+ /** Site name for content resolution. */
528
+ siteName: string;
529
+ /** Default locale for content resolution. */
530
+ locale: string;
531
+ }
532
+
533
+ // Data context and binding types re-exported from content-api (canonical source)
534
+ export type {
535
+ DataBindingConfig,
536
+ DataCollectionEntry,
537
+ DataContext,
538
+ EditorDataBindings,
539
+ PageReference,
540
+ } from '@conloca/content-api';
541
+
389
542
  /**
390
543
  * Configuration for a page creation template.
391
544
  *
@@ -405,29 +558,29 @@ interface DataBindingConfig {
405
558
  * });
406
559
  * ```
407
560
  */
408
- interface TemplateConfig {
561
+ export interface TemplateConfig {
409
562
  /**
410
563
  * Display label shown in the template dropdown.
411
564
  * @example 'Blog Post', 'Landing Page', 'Documentation'
412
565
  */
413
566
  label: string;
567
+
414
568
  /**
415
569
  * Puck component name to pre-drop into the page.
416
570
  * Must match a component registered in the site's puck.config.
417
571
  * @example 'BlogPostTemplate', 'LandingPageTemplate'
418
572
  */
419
573
  component: string;
574
+
420
575
  /**
421
576
  * Optional path prefix to auto-apply when this template is selected.
422
577
  * If the user's path doesn't start with this prefix, it's added.
423
578
  * @example '/blog/' will turn '/my-post' into '/blog/my-post'
424
579
  */
425
580
  pathPrefix?: string;
581
+
426
582
  /**
427
583
  * Optional description shown in the dropdown.
428
584
  */
429
585
  description?: string;
430
586
  }
431
- //#endregion
432
- export { RoutingConfigInput as n, TemplateConfig as r, HydrationStrategy as t };
433
- //# sourceMappingURL=types-CVQNmPxF.d.mts.map
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Type declarations for Conloca virtual modules.
3
+ *
4
+ * These modules are generated at build/dev time by the Vite plugin
5
+ * and provide routing configuration, layout components and Puck config
6
+ * to page handlers.
7
+ *
8
+ * Every type import lives INSIDE its `declare module` block so this file has
9
+ * no top-level import/export: a file that is itself a module turns these into
10
+ * augmentations of modules that must already resolve, which they never do.
11
+ */
12
+
13
+ /**
14
+ * Virtual module: virtual:conloca-routing-config
15
+ *
16
+ * Provides resolved routing configuration to page handlers.
17
+ * All defaults are applied before this module is generated.
18
+ */
19
+ declare module 'virtual:conloca-routing-config' {
20
+ import type { ResolvedRoutingConfig } from '@conloca/astro-cms';
21
+
22
+ const config: ResolvedRoutingConfig;
23
+ export default config;
24
+ }
25
+
26
+ /**
27
+ * Virtual module: virtual:conloca-layout
28
+ *
29
+ * Provides the layout component for content pages.
30
+ * Returns undefined if no layout is configured.
31
+ *
32
+ * Currently uses the first route's layout - multi-layout support
33
+ * is planned for future versions.
34
+ */
35
+ declare module 'virtual:conloca-layout' {
36
+ import type { LayoutProps } from '@conloca/astro-cms';
37
+
38
+ type LayoutComponent = ((props: LayoutProps) => unknown) | undefined;
39
+
40
+ const Layout: LayoutComponent;
41
+ export default Layout;
42
+ }
43
+
44
+ /**
45
+ * Virtual module: virtual:conloca-puck-config
46
+ *
47
+ * Provides Puck configuration for static page rendering.
48
+ *
49
+ * This is separate from the HMR-enabled puck-entry.js used by
50
+ * the CMS SPA. It's a simple re-export without React refresh
51
+ * preamble since it's used for SSG builds.
52
+ */
53
+ declare module 'virtual:conloca-puck-config' {
54
+ import type { Config } from '@puckeditor/core';
55
+
56
+ const config: Config;
57
+ export default config;
58
+ }
59
+
60
+ /**
61
+ * Virtual module: virtual:conloca-hydration-entry
62
+ *
63
+ * Client-side script that handles progressive hydration of interactive
64
+ * components. Loaded only when a page contains hydratable components.
65
+ */
66
+ declare module 'virtual:conloca-hydration-entry' {}
67
+
68
+ /**
69
+ * Virtual module: virtual:conloca-hydration-registry
70
+ *
71
+ * Maps component names to dynamic import functions for lazy-loading
72
+ * hydratable components on the client.
73
+ */
74
+ declare module 'virtual:conloca-hydration-registry' {}
@@ -1,36 +0,0 @@
1
- import { defineCollection } from "astro:content";
2
-
3
- //#region src/collections.d.ts
4
- declare const ALL_BLOCKS_COLLECTION = "__conloca_blocks";
5
- /**
6
- * Options for createConlocaCollections().
7
- */
8
- interface CreateConlocaCollectionsOptions {
9
- /** Path to content root directory. @default './content' */
10
- contentRoot?: string;
11
- /** Site name for multi-site setups. @default 'default' */
12
- site?: string;
13
- }
14
- /**
15
- * Return type of createConlocaCollections().
16
- */
17
- interface ConlocaCollectionsResult {
18
- /** Astro Content Collections definitions - export this as `collections` */
19
- collections: Record<string, ReturnType<typeof defineCollection>>;
20
- }
21
- /**
22
- * Creates Astro Content Collections by discovering from indexed content.
23
- * Uses content-api to find collections that have content.
24
- *
25
- * @example
26
- * ```typescript
27
- * // src/content.config.ts
28
- * import { createConlocaCollections } from '@conloca/astro-cms/node/content';
29
- *
30
- * export const { collections } = await createConlocaCollections();
31
- * ```
32
- */
33
- declare function createConlocaCollections(options?: CreateConlocaCollectionsOptions): Promise<ConlocaCollectionsResult>;
34
- //#endregion
35
- export { ALL_BLOCKS_COLLECTION, ConlocaCollectionsResult, CreateConlocaCollectionsOptions, createConlocaCollections };
36
- //# sourceMappingURL=collections.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"collections.d.mts","names":[],"sources":["../src/collections.ts"],"mappings":";;;cAKa,qBAAA;;AAAb;;UAKiB,+BAAA;EALiB;EAOhC,WAAA;EAFe;EAIf,IAAA;AAAA;;;AAMF;UAAiB,wBAAA;;EAEf,WAAA,EAAa,MAAA,SAAe,UAAA,QAAkB,gBAAA;AAAA;;;;;;;;;;AAehD;;;iBAAsB,wBAAA,CACpB,OAAA,GAAS,+BAAA,GACR,OAAA,CAAQ,wBAAA"}