@conloca/astro-cms 0.1.16 → 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 (422) hide show
  1. package/README.md +250 -298
  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/{src → ts/src}/cms-handler.d.ts +0 -1
  21. package/dist/ts/src/cms-handler.d.ts.map +1 -0
  22. package/dist/{src → ts/src}/cms-handler.js +9 -130
  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/{src → ts/src}/components/HydrationWrapper.d.ts +1 -1
  29. package/dist/ts/src/components/HydrationWrapper.d.ts.map +1 -0
  30. package/dist/{src → ts/src}/components/HydrationWrapper.js +1 -0
  31. package/dist/ts/src/components/HydrationWrapper.js.map +1 -0
  32. package/dist/{src/components/RenderWithBlocks.d.ts → ts/src/components/RenderWithFragments.d.ts} +8 -4
  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/{src → ts/src}/components/RenderWithHydration.d.ts +6 -2
  37. package/dist/ts/src/components/RenderWithHydration.d.ts.map +1 -0
  38. package/dist/{src → ts/src}/components/RenderWithHydration.js +6 -3
  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.map +1 -0
  45. package/dist/{src → ts/src}/discovery/astro-frontmatter.js +1 -0
  46. package/dist/ts/src/discovery/astro-frontmatter.js.map +1 -0
  47. package/dist/ts/src/discovery/discover.d.ts +43 -0
  48. package/dist/ts/src/discovery/discover.d.ts.map +1 -0
  49. package/dist/ts/src/discovery/discover.js +87 -0
  50. package/dist/ts/src/discovery/discover.js.map +1 -0
  51. package/dist/ts/src/discovery/extract-props-ts.d.ts.map +1 -0
  52. package/dist/{src → ts/src}/discovery/extract-props-ts.js +1 -0
  53. package/dist/ts/src/discovery/extract-props-ts.js.map +1 -0
  54. package/dist/{src → ts/src}/discovery/merge-registry.d.ts +3 -3
  55. package/dist/ts/src/discovery/merge-registry.d.ts.map +1 -0
  56. package/dist/{src → ts/src}/discovery/merge-registry.js +1 -0
  57. package/dist/ts/src/discovery/merge-registry.js.map +1 -0
  58. package/dist/ts/src/discovery/registry-endpoint.d.ts +27 -0
  59. package/dist/ts/src/discovery/registry-endpoint.d.ts.map +1 -0
  60. package/dist/ts/src/discovery/registry-endpoint.js +76 -0
  61. package/dist/ts/src/discovery/registry-endpoint.js.map +1 -0
  62. package/dist/{src → ts/src}/discovery/scan-components.d.ts +3 -7
  63. package/dist/ts/src/discovery/scan-components.d.ts.map +1 -0
  64. package/dist/{src → ts/src}/discovery/scan-components.js +4 -6
  65. package/dist/ts/src/discovery/scan-components.js.map +1 -0
  66. package/dist/ts/src/discovery/scan-mdx.d.ts.map +1 -0
  67. package/dist/{src → ts/src}/discovery/scan-mdx.js +1 -0
  68. package/dist/ts/src/discovery/scan-mdx.js.map +1 -0
  69. package/dist/ts/src/discovery/scan-overrides.d.ts.map +1 -0
  70. package/dist/{src → ts/src}/discovery/scan-overrides.js +1 -0
  71. package/dist/ts/src/discovery/scan-overrides.js.map +1 -0
  72. package/dist/ts/src/editor-descriptors.d.ts +31 -0
  73. package/dist/ts/src/editor-descriptors.d.ts.map +1 -0
  74. package/dist/ts/src/editor-descriptors.js +84 -0
  75. package/dist/ts/src/editor-descriptors.js.map +1 -0
  76. package/dist/ts/src/handlers/collection-content-api.d.ts +32 -0
  77. package/dist/ts/src/handlers/collection-content-api.d.ts.map +1 -0
  78. package/dist/ts/src/handlers/collection-content-api.js +166 -0
  79. package/dist/ts/src/handlers/collection-content-api.js.map +1 -0
  80. package/dist/ts/src/handlers/page-render-core.d.ts +137 -0
  81. package/dist/ts/src/handlers/page-render-core.d.ts.map +1 -0
  82. package/dist/ts/src/handlers/page-render-core.js +315 -0
  83. package/dist/ts/src/handlers/page-render-core.js.map +1 -0
  84. package/dist/ts/src/hydration.d.ts.map +1 -0
  85. package/dist/{src → ts/src}/hydration.js +1 -0
  86. package/dist/ts/src/hydration.js.map +1 -0
  87. package/dist/ts/src/index.d.ts +21 -0
  88. package/dist/ts/src/index.d.ts.map +1 -0
  89. package/dist/ts/src/index.js +45 -0
  90. package/dist/ts/src/index.js.map +1 -0
  91. package/dist/ts/src/internal/declared-collections.d.ts +30 -0
  92. package/dist/ts/src/internal/declared-collections.d.ts.map +1 -0
  93. package/dist/ts/src/internal/declared-collections.js +84 -0
  94. package/dist/ts/src/internal/declared-collections.js.map +1 -0
  95. package/dist/ts/src/internal/page-collection-schema.d.ts +44 -0
  96. package/dist/ts/src/internal/page-collection-schema.d.ts.map +1 -0
  97. package/dist/ts/src/internal/page-collection-schema.js +152 -0
  98. package/dist/ts/src/internal/page-collection-schema.js.map +1 -0
  99. package/dist/ts/src/lib/content-config-guard.d.ts +11 -0
  100. package/dist/ts/src/lib/content-config-guard.d.ts.map +1 -0
  101. package/dist/ts/src/lib/content-config-guard.js +41 -0
  102. package/dist/ts/src/lib/content-config-guard.js.map +1 -0
  103. package/dist/ts/src/lib/hydration-scanner.d.ts.map +1 -0
  104. package/dist/{src → ts/src}/lib/hydration-scanner.js +1 -0
  105. package/dist/ts/src/lib/hydration-scanner.js.map +1 -0
  106. package/dist/ts/src/lib/hydration-script.d.ts.map +1 -0
  107. package/dist/{src → ts/src}/lib/hydration-script.js +1 -0
  108. package/dist/ts/src/lib/hydration-script.js.map +1 -0
  109. package/dist/ts/src/lib/hydration-utils.d.ts.map +1 -0
  110. package/dist/{src → ts/src}/lib/hydration-utils.js +1 -0
  111. package/dist/ts/src/lib/hydration-utils.js.map +1 -0
  112. package/dist/ts/src/lib/resolve-locale.d.ts +15 -0
  113. package/dist/ts/src/lib/resolve-locale.d.ts.map +1 -0
  114. package/dist/ts/src/lib/resolve-locale.js +16 -0
  115. package/dist/ts/src/lib/resolve-locale.js.map +1 -0
  116. package/dist/ts/src/lib/resolve-site-name.d.ts +8 -0
  117. package/dist/ts/src/lib/resolve-site-name.d.ts.map +1 -0
  118. package/dist/ts/src/lib/resolve-site-name.js +12 -0
  119. package/dist/ts/src/lib/resolve-site-name.js.map +1 -0
  120. package/dist/{src → ts/src}/lib/route-utils.d.ts +26 -6
  121. package/dist/ts/src/lib/route-utils.d.ts.map +1 -0
  122. package/dist/{src → ts/src}/lib/route-utils.js +33 -15
  123. package/dist/ts/src/lib/route-utils.js.map +1 -0
  124. package/dist/{src → ts/src}/lib/routing-config.d.ts +7 -1
  125. package/dist/ts/src/lib/routing-config.d.ts.map +1 -0
  126. package/dist/{src → ts/src}/lib/routing-config.js +13 -0
  127. package/dist/ts/src/lib/routing-config.js.map +1 -0
  128. package/dist/ts/src/lib/serialize-props.d.ts.map +1 -0
  129. package/dist/{src → ts/src}/lib/serialize-props.js +1 -0
  130. package/dist/ts/src/lib/serialize-props.js.map +1 -0
  131. package/dist/ts/src/lib/unknown-components.d.ts +21 -0
  132. package/dist/ts/src/lib/unknown-components.d.ts.map +1 -0
  133. package/dist/ts/src/lib/unknown-components.js +49 -0
  134. package/dist/ts/src/lib/unknown-components.js.map +1 -0
  135. package/dist/{src → ts/src}/lib/virtual-module-generators.d.ts +0 -24
  136. package/dist/ts/src/lib/virtual-module-generators.d.ts.map +1 -0
  137. package/dist/ts/src/lib/virtual-module-generators.js +51 -0
  138. package/dist/ts/src/lib/virtual-module-generators.js.map +1 -0
  139. package/dist/ts/src/lib/withHydration.d.ts.map +1 -0
  140. package/dist/{src → ts/src}/lib/withHydration.js +1 -0
  141. package/dist/ts/src/lib/withHydration.js.map +1 -0
  142. package/dist/ts/src/loader.d.ts +27 -0
  143. package/dist/ts/src/loader.d.ts.map +1 -0
  144. package/dist/{src → ts/src}/loader.js +33 -4
  145. package/dist/ts/src/loader.js.map +1 -0
  146. package/dist/ts/src/locales-helpers.d.ts.map +1 -0
  147. package/dist/{src → ts/src}/locales-helpers.js +1 -0
  148. package/dist/ts/src/locales-helpers.js.map +1 -0
  149. package/dist/ts/src/mime-types.d.ts.map +1 -0
  150. package/dist/{src → ts/src}/mime-types.js +1 -0
  151. package/dist/ts/src/mime-types.js.map +1 -0
  152. package/dist/ts/src/page-feed.d.ts +13 -0
  153. package/dist/ts/src/page-feed.d.ts.map +1 -0
  154. package/dist/ts/src/page-feed.js +20 -0
  155. package/dist/ts/src/page-feed.js.map +1 -0
  156. package/dist/ts/src/page-schemas.d.ts +6 -0
  157. package/dist/ts/src/page-schemas.d.ts.map +1 -0
  158. package/dist/ts/src/page-schemas.js +6 -0
  159. package/dist/ts/src/page-schemas.js.map +1 -0
  160. package/dist/ts/src/path-validation.d.ts.map +1 -0
  161. package/dist/{src → ts/src}/path-validation.js +1 -0
  162. package/dist/ts/src/path-validation.js.map +1 -0
  163. package/dist/{src → ts/src}/plugin-spa.d.ts +28 -10
  164. package/dist/ts/src/plugin-spa.d.ts.map +1 -0
  165. package/dist/{src → ts/src}/plugin-spa.js +280 -87
  166. package/dist/ts/src/plugin-spa.js.map +1 -0
  167. package/dist/ts/src/puck-manifest/components-endpoint.d.ts +30 -0
  168. package/dist/ts/src/puck-manifest/components-endpoint.d.ts.map +1 -0
  169. package/dist/ts/src/puck-manifest/components-endpoint.js +54 -0
  170. package/dist/ts/src/puck-manifest/components-endpoint.js.map +1 -0
  171. package/dist/ts/src/puck-manifest/field-projection.d.ts +91 -0
  172. package/dist/ts/src/puck-manifest/field-projection.d.ts.map +1 -0
  173. package/dist/ts/src/puck-manifest/field-projection.js +422 -0
  174. package/dist/ts/src/puck-manifest/field-projection.js.map +1 -0
  175. package/dist/ts/src/puck-manifest/index.d.ts +4 -0
  176. package/dist/ts/src/puck-manifest/index.d.ts.map +1 -0
  177. package/dist/ts/src/puck-manifest/index.js +3 -0
  178. package/dist/ts/src/puck-manifest/index.js.map +1 -0
  179. package/dist/ts/src/puck-manifest/literal.d.ts +163 -0
  180. package/dist/ts/src/puck-manifest/literal.d.ts.map +1 -0
  181. package/dist/ts/src/puck-manifest/literal.js +354 -0
  182. package/dist/ts/src/puck-manifest/literal.js.map +1 -0
  183. package/dist/ts/src/puck-manifest/read-config.d.ts +42 -0
  184. package/dist/ts/src/puck-manifest/read-config.d.ts.map +1 -0
  185. package/dist/ts/src/puck-manifest/read-config.js +517 -0
  186. package/dist/ts/src/puck-manifest/read-config.js.map +1 -0
  187. package/dist/ts/src/puck-manifest/read-field.d.ts +7 -0
  188. package/dist/ts/src/puck-manifest/read-field.d.ts.map +1 -0
  189. package/dist/ts/src/puck-manifest/read-field.js +11 -0
  190. package/dist/ts/src/puck-manifest/read-field.js.map +1 -0
  191. package/dist/ts/src/puck-manifest/read-wrapper.d.ts +147 -0
  192. package/dist/ts/src/puck-manifest/read-wrapper.d.ts.map +1 -0
  193. package/dist/ts/src/puck-manifest/read-wrapper.js +889 -0
  194. package/dist/ts/src/puck-manifest/read-wrapper.js.map +1 -0
  195. package/dist/ts/src/puck-manifest/reading-budget.d.ts +50 -0
  196. package/dist/ts/src/puck-manifest/reading-budget.d.ts.map +1 -0
  197. package/dist/ts/src/puck-manifest/reading-budget.js +113 -0
  198. package/dist/ts/src/puck-manifest/reading-budget.js.map +1 -0
  199. package/dist/ts/src/puck-manifest/resolve-reference.d.ts +4 -0
  200. package/dist/ts/src/puck-manifest/resolve-reference.d.ts.map +1 -0
  201. package/dist/ts/src/puck-manifest/resolve-reference.js +4 -0
  202. package/dist/ts/src/puck-manifest/resolve-reference.js.map +1 -0
  203. package/dist/ts/src/puck-manifest/source-reference.d.ts +96 -0
  204. package/dist/ts/src/puck-manifest/source-reference.d.ts.map +1 -0
  205. package/dist/ts/src/puck-manifest/source-reference.js +424 -0
  206. package/dist/ts/src/puck-manifest/source-reference.js.map +1 -0
  207. package/dist/ts/src/puck-manifest/syntax.d.ts +29 -0
  208. package/dist/ts/src/puck-manifest/syntax.d.ts.map +1 -0
  209. package/dist/ts/src/puck-manifest/syntax.js +79 -0
  210. package/dist/ts/src/puck-manifest/syntax.js.map +1 -0
  211. package/dist/ts/src/puck-manifest/types.d.ts +145 -0
  212. package/dist/ts/src/puck-manifest/types.d.ts.map +1 -0
  213. package/dist/ts/src/puck-manifest/types.js +2 -0
  214. package/dist/ts/src/puck-manifest/types.js.map +1 -0
  215. package/dist/ts/src/safe-json-stringify.d.ts.map +1 -0
  216. package/dist/{src → ts/src}/safe-json-stringify.js +1 -0
  217. package/dist/ts/src/safe-json-stringify.js.map +1 -0
  218. package/dist/ts/src/sandbox-frame-handler.d.ts +19 -0
  219. package/dist/ts/src/sandbox-frame-handler.d.ts.map +1 -0
  220. package/dist/ts/src/sandbox-frame-handler.js +27 -0
  221. package/dist/ts/src/sandbox-frame-handler.js.map +1 -0
  222. package/dist/{src → ts/src}/site-styles/content-wrapper-endpoint.d.ts +2 -5
  223. package/dist/ts/src/site-styles/content-wrapper-endpoint.d.ts.map +1 -0
  224. package/dist/{src → ts/src}/site-styles/content-wrapper-endpoint.js +5 -8
  225. package/dist/ts/src/site-styles/content-wrapper-endpoint.js.map +1 -0
  226. package/dist/{src → ts/src}/site-styles/render-endpoint.d.ts +4 -9
  227. package/dist/ts/src/site-styles/render-endpoint.d.ts.map +1 -0
  228. package/dist/{src → ts/src}/site-styles/render-endpoint.js +1 -0
  229. package/dist/ts/src/site-styles/render-endpoint.js.map +1 -0
  230. package/dist/{src → ts/src}/site-styles/styles-endpoint.d.ts +2 -4
  231. package/dist/ts/src/site-styles/styles-endpoint.d.ts.map +1 -0
  232. package/dist/{src → ts/src}/site-styles/styles-endpoint.js +3 -5
  233. package/dist/ts/src/site-styles/styles-endpoint.js.map +1 -0
  234. package/dist/ts/src/sitemap-options.d.ts +21 -0
  235. package/dist/ts/src/sitemap-options.d.ts.map +1 -0
  236. package/dist/ts/src/sitemap-options.js +92 -0
  237. package/dist/ts/src/sitemap-options.js.map +1 -0
  238. package/dist/ts/src/tiptap-html-static.d.ts +15 -0
  239. package/dist/ts/src/tiptap-html-static.d.ts.map +1 -0
  240. package/dist/ts/src/tiptap-html-static.js +67 -0
  241. package/dist/ts/src/tiptap-html-static.js.map +1 -0
  242. package/dist/{src → ts/src}/types.d.ts +26 -110
  243. package/dist/ts/src/types.d.ts.map +1 -0
  244. package/dist/ts/src/types.js +2 -0
  245. package/dist/ts/src/types.js.map +1 -0
  246. package/dist/virtual-modules.d.ts +12 -93
  247. package/node/content.ts +14 -0
  248. package/node/index.ts +22 -0
  249. package/package.json +159 -73
  250. package/src/asset-ref-base.ts +48 -0
  251. package/src/checks.ts +10 -0
  252. package/src/cms-handler.ts +280 -0
  253. package/src/collections.ts +262 -0
  254. package/src/components/HydrationWrapper.tsx +41 -0
  255. package/src/components/RenderWithFragments.tsx +204 -0
  256. package/src/components/RenderWithHydration.tsx +55 -0
  257. package/src/components.ts +3 -0
  258. package/src/discovery/astro-frontmatter.ts +24 -0
  259. package/src/discovery/discover.ts +108 -0
  260. package/src/discovery/extract-props-ts.ts +255 -0
  261. package/src/discovery/merge-registry.ts +411 -0
  262. package/src/discovery/registry-endpoint.ts +80 -0
  263. package/src/discovery/scan-components.ts +458 -0
  264. package/src/discovery/scan-mdx.ts +190 -0
  265. package/src/discovery/scan-overrides.ts +92 -0
  266. package/src/editor-descriptors.ts +96 -0
  267. package/src/env.d.ts +31 -0
  268. package/src/handlers/collection-content-api.ts +196 -0
  269. package/src/handlers/page-handler.astro +320 -0
  270. package/src/handlers/page-render-core.ts +456 -0
  271. package/src/hydration.ts +7 -0
  272. package/src/index.ts +111 -0
  273. package/src/internal/acorn-default.mjs +37 -0
  274. package/src/internal/declared-collections.ts +98 -0
  275. package/src/internal/page-collection-schema.ts +210 -0
  276. package/src/lib/content-config-guard.ts +48 -0
  277. package/src/lib/hydration-scanner.ts +176 -0
  278. package/src/lib/hydration-script.ts +126 -0
  279. package/src/lib/hydration-utils.ts +120 -0
  280. package/src/lib/resolve-locale.ts +22 -0
  281. package/src/lib/resolve-site-name.ts +10 -0
  282. package/src/lib/route-utils.ts +106 -0
  283. package/src/lib/routing-config.ts +126 -0
  284. package/src/lib/serialize-props.ts +7 -0
  285. package/src/lib/unknown-components.ts +64 -0
  286. package/src/lib/virtual-module-generators.ts +58 -0
  287. package/{dist/withHydration-DkKpkmzJ.d.mts → src/lib/withHydration.ts} +25 -8
  288. package/src/loader.ts +145 -0
  289. package/{dist/locales-helpers-BvYYqnJ5.d.mts → src/locales-helpers.ts} +21 -17
  290. package/src/mime-types.ts +19 -0
  291. package/src/page-feed.ts +26 -0
  292. package/src/page-schemas.ts +19 -0
  293. package/src/path-validation.ts +13 -0
  294. package/src/plugin-spa.ts +1480 -0
  295. package/src/puck-manifest/components-endpoint.ts +55 -0
  296. package/src/puck-manifest/field-projection.ts +510 -0
  297. package/src/puck-manifest/index.ts +3 -0
  298. package/src/puck-manifest/literal.ts +459 -0
  299. package/src/puck-manifest/read-config.ts +577 -0
  300. package/src/puck-manifest/read-field.ts +19 -0
  301. package/src/puck-manifest/read-wrapper.ts +1056 -0
  302. package/src/puck-manifest/reading-budget.ts +127 -0
  303. package/src/puck-manifest/resolve-reference.ts +9 -0
  304. package/src/puck-manifest/source-reference.ts +484 -0
  305. package/src/puck-manifest/syntax.ts +104 -0
  306. package/src/puck-manifest/types.ts +139 -0
  307. package/src/safe-json-stringify.ts +17 -0
  308. package/src/sandbox-frame-handler.ts +31 -0
  309. package/src/site-styles/content-wrapper-endpoint.ts +327 -0
  310. package/src/site-styles/render-endpoint.ts +331 -0
  311. package/src/site-styles/styles-endpoint.ts +184 -0
  312. package/src/sitemap-options.ts +115 -0
  313. package/src/tiptap-html-static.ts +84 -0
  314. package/{dist/types-CS9neadI.d.mts → src/types.ts} +87 -124
  315. package/src/virtual-modules.d.ts +74 -0
  316. package/dist/collections-Bd7EME4b.mjs +0 -129
  317. package/dist/collections-Bd7EME4b.mjs.map +0 -1
  318. package/dist/collections.d.mts +0 -35
  319. package/dist/collections.d.mts.map +0 -1
  320. package/dist/collections.mjs +0 -2
  321. package/dist/components.d.mts +0 -41
  322. package/dist/components.d.mts.map +0 -1
  323. package/dist/components.mjs +0 -223
  324. package/dist/components.mjs.map +0 -1
  325. package/dist/hydration.d.mts +0 -4
  326. package/dist/hydration.mjs +0 -2
  327. package/dist/index.d.mts +0 -108
  328. package/dist/index.d.mts.map +0 -1
  329. package/dist/index.mjs +0 -67
  330. package/dist/index.mjs.map +0 -1
  331. package/dist/internal/cms-handler.d.mts +0 -25
  332. package/dist/internal/cms-handler.d.mts.map +0 -1
  333. package/dist/internal/cms-handler.mjs +0 -314
  334. package/dist/internal/cms-handler.mjs.map +0 -1
  335. package/dist/lib/hydration-script.d.mts +0 -30
  336. package/dist/lib/hydration-script.d.mts.map +0 -1
  337. package/dist/lib/hydration-script.mjs +0 -84
  338. package/dist/lib/hydration-script.mjs.map +0 -1
  339. package/dist/locales-helpers-BvYYqnJ5.d.mts.map +0 -1
  340. package/dist/locales-helpers-qiwh7nxS.mjs +0 -54
  341. package/dist/locales-helpers-qiwh7nxS.mjs.map +0 -1
  342. package/dist/node/content.d.mts +0 -18
  343. package/dist/node/content.d.mts.map +0 -1
  344. package/dist/node/content.d.ts +0 -3
  345. package/dist/node/content.d.ts.map +0 -1
  346. package/dist/node/content.js +0 -2
  347. package/dist/node/content.mjs +0 -2
  348. package/dist/node/index.d.mts +0 -200
  349. package/dist/node/index.d.mts.map +0 -1
  350. package/dist/node/index.d.ts +0 -4
  351. package/dist/node/index.d.ts.map +0 -1
  352. package/dist/node/index.js +0 -3
  353. package/dist/node/index.mjs +0 -2513
  354. package/dist/node/index.mjs.map +0 -1
  355. package/dist/serialize-props-BHoNpzH6.mjs +0 -72
  356. package/dist/serialize-props-BHoNpzH6.mjs.map +0 -1
  357. package/dist/src/cms-handler.d.ts.map +0 -1
  358. package/dist/src/collections.d.ts +0 -32
  359. package/dist/src/collections.d.ts.map +0 -1
  360. package/dist/src/collections.js +0 -50
  361. package/dist/src/components/HydrationWrapper.d.ts.map +0 -1
  362. package/dist/src/components/RenderWithBlocks.d.ts.map +0 -1
  363. package/dist/src/components/RenderWithBlocks.js +0 -129
  364. package/dist/src/components/RenderWithHydration.d.ts.map +0 -1
  365. package/dist/src/components.d.ts +0 -4
  366. package/dist/src/components.d.ts.map +0 -1
  367. package/dist/src/components.js +0 -3
  368. package/dist/src/discovery/astro-frontmatter.d.ts.map +0 -1
  369. package/dist/src/discovery/extract-props-ts.d.ts.map +0 -1
  370. package/dist/src/discovery/merge-registry.d.ts.map +0 -1
  371. package/dist/src/discovery/registry-endpoint.d.ts +0 -42
  372. package/dist/src/discovery/registry-endpoint.d.ts.map +0 -1
  373. package/dist/src/discovery/registry-endpoint.js +0 -81
  374. package/dist/src/discovery/scan-components.d.ts.map +0 -1
  375. package/dist/src/discovery/scan-mdx.d.ts.map +0 -1
  376. package/dist/src/discovery/scan-overrides.d.ts.map +0 -1
  377. package/dist/src/hydration.d.ts.map +0 -1
  378. package/dist/src/index.d.ts +0 -11
  379. package/dist/src/index.d.ts.map +0 -1
  380. package/dist/src/index.js +0 -25
  381. package/dist/src/lib/hydration-scanner.d.ts.map +0 -1
  382. package/dist/src/lib/hydration-script.d.ts.map +0 -1
  383. package/dist/src/lib/hydration-utils.d.ts.map +0 -1
  384. package/dist/src/lib/page-api.d.ts +0 -77
  385. package/dist/src/lib/page-api.d.ts.map +0 -1
  386. package/dist/src/lib/page-api.js +0 -121
  387. package/dist/src/lib/route-utils.d.ts.map +0 -1
  388. package/dist/src/lib/routing-config.d.ts.map +0 -1
  389. package/dist/src/lib/serialize-props.d.ts.map +0 -1
  390. package/dist/src/lib/virtual-module-generators.d.ts.map +0 -1
  391. package/dist/src/lib/virtual-module-generators.js +0 -263
  392. package/dist/src/lib/withHydration.d.ts.map +0 -1
  393. package/dist/src/loader.d.ts +0 -14
  394. package/dist/src/loader.d.ts.map +0 -1
  395. package/dist/src/locales-helpers.d.ts.map +0 -1
  396. package/dist/src/mime-types.d.ts.map +0 -1
  397. package/dist/src/path-validation.d.ts.map +0 -1
  398. package/dist/src/plugin-spa.d.ts.map +0 -1
  399. package/dist/src/safe-json-stringify.d.ts.map +0 -1
  400. package/dist/src/site-styles/content-wrapper-endpoint.d.ts.map +0 -1
  401. package/dist/src/site-styles/render-endpoint.d.ts.map +0 -1
  402. package/dist/src/site-styles/styles-endpoint.d.ts.map +0 -1
  403. package/dist/src/types.d.ts.map +0 -1
  404. package/dist/src/types.js +0 -1
  405. package/dist/types-CS9neadI.d.mts.map +0 -1
  406. package/dist/withHydration-C256ox_6.mjs +0 -49
  407. package/dist/withHydration-C256ox_6.mjs.map +0 -1
  408. package/dist/withHydration-DkKpkmzJ.d.mts.map +0 -1
  409. /package/dist/{src → ts/src}/discovery/astro-frontmatter.d.ts +0 -0
  410. /package/dist/{src → ts/src}/discovery/extract-props-ts.d.ts +0 -0
  411. /package/dist/{src → ts/src}/discovery/scan-mdx.d.ts +0 -0
  412. /package/dist/{src → ts/src}/discovery/scan-overrides.d.ts +0 -0
  413. /package/dist/{src → ts/src}/hydration.d.ts +0 -0
  414. /package/dist/{src → ts/src}/lib/hydration-scanner.d.ts +0 -0
  415. /package/dist/{src → ts/src}/lib/hydration-script.d.ts +0 -0
  416. /package/dist/{src → ts/src}/lib/hydration-utils.d.ts +0 -0
  417. /package/dist/{src → ts/src}/lib/serialize-props.d.ts +0 -0
  418. /package/dist/{src → ts/src}/lib/withHydration.d.ts +0 -0
  419. /package/dist/{src → ts/src}/locales-helpers.d.ts +0 -0
  420. /package/dist/{src → ts/src}/mime-types.d.ts +0 -0
  421. /package/dist/{src → ts/src}/path-validation.d.ts +0 -0
  422. /package/dist/{src → ts/src}/safe-json-stringify.d.ts +0 -0
@@ -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";
2
- import { DataCollectionEntry, PageReference } from "@conloca/content-api";
3
- //#region src/types.d.ts
1
+ import type { DataBindingConfig, PageReference } from '@conloca/content-api';
2
+ import type { Data } from '@puckeditor/core';
3
+
4
4
  /**
5
5
  * Hydration strategy for Puck components in production.
6
6
  *
@@ -22,7 +22,10 @@ import { DataCollectionEntry, PageReference } from "@conloca/content-api";
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,6 +320,7 @@ interface RouteConfig {
298
320
  */
299
321
  dataBindings?: DataBindingConfig;
300
322
  }
323
+
301
324
  /**
302
325
  * Complete page data for rendering.
303
326
  *
@@ -309,13 +332,14 @@ interface RouteConfig {
309
332
  * - Page metadata for SEO/layouts
310
333
  * - Route information for context
311
334
  */
312
- interface PageData {
335
+ export interface PageData {
313
336
  /**
314
337
  * Unique page identifier from the content collection.
315
338
  *
316
339
  * Typically matches the URL path (e.g., 'about', 'blog/post-1').
317
340
  */
318
341
  id: string;
342
+
319
343
  /**
320
344
  * Page title from content metadata.
321
345
  *
@@ -327,6 +351,7 @@ interface PageData {
327
351
  * May be undefined if page has no title set.
328
352
  */
329
353
  title?: string;
354
+
330
355
  /**
331
356
  * Page description for SEO.
332
357
  *
@@ -335,6 +360,7 @@ interface PageData {
335
360
  * - Social sharing previews
336
361
  */
337
362
  description?: string;
363
+
338
364
  /**
339
365
  * URL pathname for this page.
340
366
  *
@@ -344,6 +370,7 @@ interface PageData {
344
370
  * @example '/blog/my-first-post'
345
371
  */
346
372
  pathname: string;
373
+
347
374
  /**
348
375
  * Puck editor data for rendering.
349
376
  *
@@ -355,12 +382,14 @@ interface PageData {
355
382
  * Passed directly to <Render config={} data={puckData} />
356
383
  */
357
384
  puckData: Data;
385
+
358
386
  /**
359
387
  * Content collection this page belongs to.
360
388
  *
361
389
  * @example 'pages', 'posts', 'docs'
362
390
  */
363
391
  collection: string;
392
+
364
393
  /**
365
394
  * Route configuration that matched this page.
366
395
  *
@@ -373,15 +402,18 @@ interface PageData {
373
402
  * @example 'pages', 'blog'
374
403
  */
375
404
  name: string;
405
+
376
406
  /**
377
407
  * Original pattern from RouteConfig.
378
408
  */
379
409
  pattern: string;
410
+
380
411
  /**
381
412
  * Route-specific metadata if configured.
382
413
  */
383
414
  meta?: Record<string, unknown>;
384
415
  };
416
+
385
417
  /**
386
418
  * Additional page metadata from content.
387
419
  *
@@ -389,29 +421,20 @@ interface PageData {
389
421
  * Schema depends on the site's content configuration.
390
422
  */
391
423
  meta?: Record<string, unknown>;
392
- /**
393
- * Timestamps for the page content.
394
- */
395
- timestamps?: {
396
- /**
397
- * When the page was first created.
398
- */
399
- created?: Date;
400
- /**
401
- * When the page was last modified.
402
- */
403
- modified?: Date;
404
- /**
405
- * When the page was published (if different from created).
406
- */
407
- published?: Date;
408
- };
424
+
425
+ /** The page's dates, as on PageReference. */
426
+ timestamps?: PageReference['timestamps'];
409
427
  }
428
+
410
429
  /**
411
430
  * Props passed to layout components wrapping page content.
412
431
  *
413
432
  * Layouts receive common props (title, description) that work with
414
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.
415
438
  *
416
439
  * @example Astro layout usage
417
440
  * ```astro
@@ -455,30 +478,48 @@ interface PageData {
455
478
  * }
456
479
  * ```
457
480
  */
458
- interface LayoutProps {
481
+ export interface LayoutProps {
459
482
  /**
460
483
  * Page title for the document head.
461
484
  */
462
485
  title: string;
486
+
463
487
  /**
464
488
  * Page description for SEO meta tag.
465
489
  */
466
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
+
467
499
  /**
468
500
  * The rendered Puck content.
469
501
  *
470
502
  * In Astro layouts, use <slot /> instead of {children}.
471
503
  * In React layouts, render {children} in the content area.
472
504
  */
473
- children?: unknown;
505
+ children?: unknown; // astro.JSX.Element | React.ReactNode
474
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
+
475
516
  /**
476
517
  * Resolved routing configuration with all fields required.
477
518
  *
478
519
  * This is what the page handler receives via the virtual module,
479
520
  * with all defaults applied.
480
521
  */
481
- interface ResolvedRoutingConfig {
522
+ export interface ResolvedRoutingConfig {
482
523
  enabled: boolean;
483
524
  routes: Record<string, Required<RouteConfig>>;
484
525
  fallback: '404' | 'passthrough';
@@ -488,94 +529,16 @@ interface ResolvedRoutingConfig {
488
529
  /** Default locale for content resolution. */
489
530
  locale: string;
490
531
  }
491
- /**
492
- * Configuration for automatic data collection injection into Puck components.
493
- *
494
- * Allows components to declare data dependencies on Conloca data collections,
495
- * which are automatically fetched and injected via Puck's metadata system.
496
- *
497
- * @example Route with data bindings
498
- * ```typescript
499
- * conlocaCMS({
500
- * routing: {
501
- * routes: {
502
- * pages: {
503
- * pattern: '/[...slug]',
504
- * dataBindings: {
505
- * collections: ['team', 'testimonials'],
506
- * },
507
- * },
508
- * },
509
- * },
510
- * });
511
- * ```
512
- */
513
- interface DataBindingConfig {
514
- /**
515
- * Collections to fetch and inject into component resolvers.
516
- *
517
- * Each collection name must match a data collection in the content directory.
518
- * The fetched data will be available in `metadata.collections[collectionName]`
519
- * within Puck component resolvers.
520
- *
521
- * @example ['team', 'testimonials', 'products']
522
- */
523
- collections?: string[];
524
- /**
525
- * Locale override for data fetching.
526
- *
527
- * Defaults to the route's locale setting (from routing.locale).
528
- * Use this to fetch data in a specific locale regardless of route config.
529
- */
530
- locale?: string;
531
- /**
532
- * Page discovery configuration for listing pages by path prefix.
533
- *
534
- * Enables components to access lists of pages matching a URL pattern,
535
- * useful for blog listings, category pages, and site navigation.
536
- *
537
- * @example Blog listing page
538
- * ```typescript
539
- * {
540
- * pattern: '/blog',
541
- * dataBindings: {
542
- * pages: {
543
- * prefix: '/blog/',
544
- * sort: 'date-desc',
545
- * limit: 10,
546
- * },
547
- * },
548
- * }
549
- * ```
550
- */
551
- pages?: {
552
- /**
553
- * Path prefix to filter pages.
554
- *
555
- * Only pages whose pathname starts with this prefix are included.
556
- * The listing page itself is excluded.
557
- *
558
- * @example '/blog/' matches '/blog/post-1', '/blog/post-2'
559
- */
560
- prefix: string;
561
- /**
562
- * Maximum number of pages to return.
563
- *
564
- * Useful for showing "latest N posts" on a homepage or sidebar.
565
- */
566
- limit?: number;
567
- /**
568
- * Sort order for returned pages.
569
- *
570
- * - 'date-desc': Newest first (by modified/created date)
571
- * - 'date-asc': Oldest first
572
- * - 'title': Alphabetical by title
573
- *
574
- * @default 'date-desc'
575
- */
576
- sort?: 'date-desc' | 'date-asc' | 'title';
577
- };
578
- }
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
+
579
542
  /**
580
543
  * Configuration for a page creation template.
581
544
  *
@@ -595,29 +558,29 @@ interface DataBindingConfig {
595
558
  * });
596
559
  * ```
597
560
  */
598
- interface TemplateConfig {
561
+ export interface TemplateConfig {
599
562
  /**
600
563
  * Display label shown in the template dropdown.
601
564
  * @example 'Blog Post', 'Landing Page', 'Documentation'
602
565
  */
603
566
  label: string;
567
+
604
568
  /**
605
569
  * Puck component name to pre-drop into the page.
606
570
  * Must match a component registered in the site's puck.config.
607
571
  * @example 'BlogPostTemplate', 'LandingPageTemplate'
608
572
  */
609
573
  component: string;
574
+
610
575
  /**
611
576
  * Optional path prefix to auto-apply when this template is selected.
612
577
  * If the user's path doesn't start with this prefix, it's added.
613
578
  * @example '/blog/' will turn '/my-post' into '/blog/my-post'
614
579
  */
615
580
  pathPrefix?: string;
581
+
616
582
  /**
617
583
  * Optional description shown in the dropdown.
618
584
  */
619
585
  description?: string;
620
586
  }
621
- //#endregion
622
- export { PageReference as a, TemplateConfig as c, PageData as i, HydrationStrategy as n, ResolvedRoutingConfig as o, LayoutProps as r, RoutingConfigInput as s, DataCollectionEntry as t };
623
- //# sourceMappingURL=types-CS9neadI.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' {}