@lupinum/ginko-content 0.1.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 (512) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +90 -0
  3. package/compatibility.json +27 -0
  4. package/dist/cli.d.mts +1 -0
  5. package/dist/cli.mjs +690 -0
  6. package/dist/cms-contract/build +1 -0
  7. package/dist/cms-contract/build.d.ts +44 -0
  8. package/dist/cms-contract/build.js +513 -0
  9. package/dist/cms-contract/index +1 -0
  10. package/dist/cms-contract/index.d.ts +25 -0
  11. package/dist/cms-contract/index.js +37 -0
  12. package/dist/cms-contract/mdc +1 -0
  13. package/dist/cms-contract/mdc.d.ts +32 -0
  14. package/dist/cms-contract/mdc.js +52 -0
  15. package/dist/cms-contract/path +1 -0
  16. package/dist/cms-contract/path.d.ts +12 -0
  17. package/dist/cms-contract/path.js +18 -0
  18. package/dist/cms-contract/schema +1 -0
  19. package/dist/cms-contract/schema.d.ts +18 -0
  20. package/dist/cms-contract/schema.js +13 -0
  21. package/dist/cms-contract/types +1 -0
  22. package/dist/cms-contract/types.d.ts +177 -0
  23. package/dist/cms-contract/types.js +0 -0
  24. package/dist/cms-import/index +1 -0
  25. package/dist/cms-import/index.d.ts +21 -0
  26. package/dist/cms-import/index.js +57 -0
  27. package/dist/config.d.mts +3 -0
  28. package/dist/config.mjs +3 -0
  29. package/dist/core/cache +1 -0
  30. package/dist/core/cache-hints +1 -0
  31. package/dist/core/cache-hints.d.ts +3 -0
  32. package/dist/core/cache-hints.js +55 -0
  33. package/dist/core/cache.d.ts +29 -0
  34. package/dist/core/cache.js +0 -0
  35. package/dist/core/content/collection +1 -0
  36. package/dist/core/content/collection.d.ts +3 -0
  37. package/dist/core/content/collection.js +52 -0
  38. package/dist/core/content/graph +1 -0
  39. package/dist/core/content/graph.d.ts +147 -0
  40. package/dist/core/content/graph.js +189 -0
  41. package/dist/core/content/ignore +1 -0
  42. package/dist/core/content/ignore.d.ts +5 -0
  43. package/dist/core/content/ignore.js +10 -0
  44. package/dist/core/content/locale +1 -0
  45. package/dist/core/content/locale.d.ts +61 -0
  46. package/dist/core/content/locale.js +77 -0
  47. package/dist/core/content/path +1 -0
  48. package/dist/core/content/path.d.ts +36 -0
  49. package/dist/core/content/path.js +143 -0
  50. package/dist/core/content/slug +1 -0
  51. package/dist/core/content/slug.d.ts +4 -0
  52. package/dist/core/content/slug.js +41 -0
  53. package/dist/core/content/sources +1 -0
  54. package/dist/core/content/sources.d.ts +2 -0
  55. package/dist/core/content/sources.js +6 -0
  56. package/dist/core/errors +1 -0
  57. package/dist/core/errors.d.ts +15 -0
  58. package/dist/core/errors.js +10 -0
  59. package/dist/core/markdown/tree +1 -0
  60. package/dist/core/markdown/tree.d.ts +9 -0
  61. package/dist/core/markdown/tree.js +47 -0
  62. package/dist/core/query/builder +1 -0
  63. package/dist/core/query/builder.d.ts +18 -0
  64. package/dist/core/query/builder.js +186 -0
  65. package/dist/core/query/execute +1 -0
  66. package/dist/core/query/execute.d.ts +52 -0
  67. package/dist/core/query/execute.js +304 -0
  68. package/dist/core/query/filter +1 -0
  69. package/dist/core/query/filter.d.ts +42 -0
  70. package/dist/core/query/filter.js +118 -0
  71. package/dist/core/query/json +1 -0
  72. package/dist/core/query/json.d.ts +2 -0
  73. package/dist/core/query/json.js +20 -0
  74. package/dist/core/query/lower +1 -0
  75. package/dist/core/query/lower.d.ts +14 -0
  76. package/dist/core/query/lower.js +121 -0
  77. package/dist/core/query/operators +1 -0
  78. package/dist/core/query/operators.d.ts +23 -0
  79. package/dist/core/query/operators.js +126 -0
  80. package/dist/core/query/params +1 -0
  81. package/dist/core/query/params.d.ts +15 -0
  82. package/dist/core/query/params.js +83 -0
  83. package/dist/core/query/plan +1 -0
  84. package/dist/core/query/plan.d.ts +110 -0
  85. package/dist/core/query/plan.js +0 -0
  86. package/dist/core/references/resolve +1 -0
  87. package/dist/core/references/resolve.d.ts +31 -0
  88. package/dist/core/references/resolve.js +121 -0
  89. package/dist/core/references/schema +1 -0
  90. package/dist/core/references/schema.d.ts +8 -0
  91. package/dist/core/references/schema.js +70 -0
  92. package/dist/core/result +1 -0
  93. package/dist/core/result.d.ts +27 -0
  94. package/dist/core/result.js +2 -0
  95. package/dist/features/collections/resolve +1 -0
  96. package/dist/features/collections/resolve.d.ts +63 -0
  97. package/dist/features/collections/resolve.js +76 -0
  98. package/dist/features/localization/config +1 -0
  99. package/dist/features/localization/config.d.ts +18 -0
  100. package/dist/features/localization/config.js +25 -0
  101. package/dist/features/localization/links +1 -0
  102. package/dist/features/localization/links.d.ts +1 -0
  103. package/dist/features/localization/links.js +69 -0
  104. package/dist/features/localization/path +1 -0
  105. package/dist/features/localization/path.d.ts +32 -0
  106. package/dist/features/localization/path.js +80 -0
  107. package/dist/features/localization/results +1 -0
  108. package/dist/features/localization/results.d.ts +42 -0
  109. package/dist/features/localization/results.js +149 -0
  110. package/dist/features/localization/translated-slugs +1 -0
  111. package/dist/features/localization/translated-slugs.d.ts +11 -0
  112. package/dist/features/localization/translated-slugs.js +80 -0
  113. package/dist/features/navigation/build +1 -0
  114. package/dist/features/navigation/build.d.ts +28 -0
  115. package/dist/features/navigation/build.js +104 -0
  116. package/dist/features/navigation/canonical +1 -0
  117. package/dist/features/navigation/canonical.d.ts +33 -0
  118. package/dist/features/navigation/canonical.js +149 -0
  119. package/dist/features/navigation/query +1 -0
  120. package/dist/features/navigation/query.d.ts +19 -0
  121. package/dist/features/navigation/query.js +51 -0
  122. package/dist/features/navigation/resolve +1 -0
  123. package/dist/features/navigation/resolve.d.ts +20 -0
  124. package/dist/features/navigation/resolve.js +79 -0
  125. package/dist/features/navigation/tree +1 -0
  126. package/dist/features/navigation/tree.d.ts +6 -0
  127. package/dist/features/navigation/tree.js +32 -0
  128. package/dist/features/search/navigation +1 -0
  129. package/dist/features/search/navigation.d.ts +6 -0
  130. package/dist/features/search/navigation.js +21 -0
  131. package/dist/features/search/sections +1 -0
  132. package/dist/features/search/sections.d.ts +21 -0
  133. package/dist/features/search/sections.js +98 -0
  134. package/dist/features/sitemap/query +1 -0
  135. package/dist/features/sitemap/query.d.ts +68 -0
  136. package/dist/features/sitemap/query.js +171 -0
  137. package/dist/integrations/nitro/context +1 -0
  138. package/dist/integrations/nitro/context.d.ts +63 -0
  139. package/dist/integrations/nitro/context.js +28 -0
  140. package/dist/integrations/nitro/ingest +1 -0
  141. package/dist/integrations/nitro/ingest.d.ts +18 -0
  142. package/dist/integrations/nitro/ingest.js +120 -0
  143. package/dist/integrations/nitro/preview +1 -0
  144. package/dist/integrations/nitro/preview.d.ts +5 -0
  145. package/dist/integrations/nitro/preview.js +21 -0
  146. package/dist/integrations/nitro/runtime-config +1 -0
  147. package/dist/integrations/nitro/runtime-config.d.ts +1 -0
  148. package/dist/integrations/nitro/runtime-config.js +4 -0
  149. package/dist/integrations/nitro/storage +1 -0
  150. package/dist/integrations/nitro/storage.d.ts +9 -0
  151. package/dist/integrations/nitro/storage.js +113 -0
  152. package/dist/integrations/vue/content-components +1 -0
  153. package/dist/integrations/vue/content-components.d.ts +24 -0
  154. package/dist/integrations/vue/content-components.js +67 -0
  155. package/dist/integrations/vue/html-tags +1 -0
  156. package/dist/integrations/vue/html-tags.d.ts +2 -0
  157. package/dist/integrations/vue/html-tags.js +119 -0
  158. package/dist/integrations/vue/markdown-refs +1 -0
  159. package/dist/integrations/vue/markdown-refs.d.ts +1 -0
  160. package/dist/integrations/vue/markdown-refs.js +1 -0
  161. package/dist/module.d.mts +2044 -0
  162. package/dist/module.json +12 -0
  163. package/dist/module.mjs +1381 -0
  164. package/dist/parsers/csv +1 -0
  165. package/dist/parsers/csv.d.ts +2 -0
  166. package/dist/parsers/csv.js +38 -0
  167. package/dist/parsers/from-csv +1 -0
  168. package/dist/parsers/from-csv.d.ts +20 -0
  169. package/dist/parsers/from-csv.js +85 -0
  170. package/dist/parsers/index +1 -0
  171. package/dist/parsers/index.d.ts +10 -0
  172. package/dist/parsers/index.js +50 -0
  173. package/dist/parsers/json +1 -0
  174. package/dist/parsers/json.d.ts +2 -0
  175. package/dist/parsers/json.js +29 -0
  176. package/dist/parsers/markdown +1 -0
  177. package/dist/parsers/markdown-plugins +1 -0
  178. package/dist/parsers/markdown-plugins.d.ts +3 -0
  179. package/dist/parsers/markdown-plugins.js +58 -0
  180. package/dist/parsers/markdown.d.ts +2 -0
  181. package/dist/parsers/markdown.js +64 -0
  182. package/dist/parsers/path-meta +1 -0
  183. package/dist/parsers/path-meta.d.ts +4 -0
  184. package/dist/parsers/path-meta.js +37 -0
  185. package/dist/parsers/utils +1 -0
  186. package/dist/parsers/utils.d.ts +2 -0
  187. package/dist/parsers/utils.js +3 -0
  188. package/dist/parsers/yaml +1 -0
  189. package/dist/parsers/yaml.d.ts +2 -0
  190. package/dist/parsers/yaml.js +19 -0
  191. package/dist/public/client +1 -0
  192. package/dist/public/client.d.ts +19 -0
  193. package/dist/public/client.js +26 -0
  194. package/dist/public/provider +1 -0
  195. package/dist/public/provider-errors +1 -0
  196. package/dist/public/provider-errors.d.ts +4 -0
  197. package/dist/public/provider-errors.js +28 -0
  198. package/dist/public/provider.d.ts +74 -0
  199. package/dist/public/provider.js +6 -0
  200. package/dist/public/server +1 -0
  201. package/dist/public/server.d.ts +19 -0
  202. package/dist/public/server.js +28 -0
  203. package/dist/runtime/app/components/ContentRenderer.d.vue.ts +62 -0
  204. package/dist/runtime/app/components/ContentRenderer.vue +84 -0
  205. package/dist/runtime/app/components/ContentRenderer.vue.d.ts +62 -0
  206. package/dist/runtime/app/components/ContentRendererInline.d.vue.ts +50 -0
  207. package/dist/runtime/app/components/ContentRendererInline.vue +97 -0
  208. package/dist/runtime/app/components/ContentRendererInline.vue.d.ts +50 -0
  209. package/dist/runtime/app/components/Prose/ProseCode.d.vue.ts +61 -0
  210. package/dist/runtime/app/components/Prose/ProseCode.vue +32 -0
  211. package/dist/runtime/app/components/Prose/ProseCode.vue.d.ts +61 -0
  212. package/dist/runtime/app/components/Prose/ProseCodeInline.d.vue.ts +13 -0
  213. package/dist/runtime/app/components/Prose/ProseCodeInline.vue +3 -0
  214. package/dist/runtime/app/components/Prose/ProseCodeInline.vue.d.ts +13 -0
  215. package/dist/runtime/app/components/Prose/ProseImg.d.vue.ts +59 -0
  216. package/dist/runtime/app/components/Prose/ProseImg.vue +59 -0
  217. package/dist/runtime/app/components/Prose/ProseImg.vue.d.ts +59 -0
  218. package/dist/runtime/app/components/Prose/ProsePre.d.vue.ts +79 -0
  219. package/dist/runtime/app/components/Prose/ProsePre.vue +42 -0
  220. package/dist/runtime/app/components/Prose/ProsePre.vue.d.ts +79 -0
  221. package/dist/runtime/app/components/internal/ContentRendererMarkdown.d.vue.ts +68 -0
  222. package/dist/runtime/app/components/internal/ContentRendererMarkdown.vue +99 -0
  223. package/dist/runtime/app/components/internal/ContentRendererMarkdown.vue.d.ts +68 -0
  224. package/dist/runtime/app/components/internal/MarkdownRenderer +1 -0
  225. package/dist/runtime/app/components/internal/MarkdownRenderer.d.ts +90 -0
  226. package/dist/runtime/app/components/internal/MarkdownRenderer.js +191 -0
  227. package/dist/runtime/app/composables/async-data +1 -0
  228. package/dist/runtime/app/composables/async-data.d.ts +2 -0
  229. package/dist/runtime/app/composables/async-data.js +4 -0
  230. package/dist/runtime/app/composables/content-i18n +1 -0
  231. package/dist/runtime/app/composables/content-i18n.d.ts +5 -0
  232. package/dist/runtime/app/composables/content-i18n.js +1 -0
  233. package/dist/runtime/app/composables/head +1 -0
  234. package/dist/runtime/app/composables/head.d.ts +11 -0
  235. package/dist/runtime/app/composables/head.js +98 -0
  236. package/dist/runtime/app/composables/locale +1 -0
  237. package/dist/runtime/app/composables/locale-context +1 -0
  238. package/dist/runtime/app/composables/locale-context.d.ts +5 -0
  239. package/dist/runtime/app/composables/locale-context.js +8 -0
  240. package/dist/runtime/app/composables/locale.d.ts +8 -0
  241. package/dist/runtime/app/composables/locale.js +15 -0
  242. package/dist/runtime/app/composables/navigation +1 -0
  243. package/dist/runtime/app/composables/navigation.d.ts +3 -0
  244. package/dist/runtime/app/composables/navigation.js +7 -0
  245. package/dist/runtime/app/composables/preview +1 -0
  246. package/dist/runtime/app/composables/preview.d.ts +5 -0
  247. package/dist/runtime/app/composables/preview.js +52 -0
  248. package/dist/runtime/app/composables/query-api +1 -0
  249. package/dist/runtime/app/composables/query-api.d.ts +27 -0
  250. package/dist/runtime/app/composables/query-api.js +46 -0
  251. package/dist/runtime/app/composables/route +1 -0
  252. package/dist/runtime/app/composables/route.d.ts +11 -0
  253. package/dist/runtime/app/composables/route.js +150 -0
  254. package/dist/runtime/app/composables/runtime +1 -0
  255. package/dist/runtime/app/composables/runtime.d.ts +2 -0
  256. package/dist/runtime/app/composables/runtime.js +7 -0
  257. package/dist/runtime/app/composables/search +1 -0
  258. package/dist/runtime/app/composables/search.d.ts +58 -0
  259. package/dist/runtime/app/composables/search.js +321 -0
  260. package/dist/runtime/app/composables/site-data +1 -0
  261. package/dist/runtime/app/composables/site-data.d.ts +12 -0
  262. package/dist/runtime/app/composables/site-data.js +12 -0
  263. package/dist/runtime/app/composables/toc +1 -0
  264. package/dist/runtime/app/composables/toc.d.ts +10 -0
  265. package/dist/runtime/app/composables/toc.js +31 -0
  266. package/dist/runtime/app/composables/use-content +1 -0
  267. package/dist/runtime/app/composables/use-content.d.ts +188 -0
  268. package/dist/runtime/app/composables/use-content.js +307 -0
  269. package/dist/runtime/app/composables/useUnwrap +1 -0
  270. package/dist/runtime/app/composables/useUnwrap.d.ts +8 -0
  271. package/dist/runtime/app/composables/useUnwrap.js +35 -0
  272. package/dist/runtime/app/composables/utils +1 -0
  273. package/dist/runtime/app/composables/utils.d.ts +22 -0
  274. package/dist/runtime/app/composables/utils.js +76 -0
  275. package/dist/runtime/app/composables/web-socket +1 -0
  276. package/dist/runtime/app/composables/web-socket.d.ts +3 -0
  277. package/dist/runtime/app/composables/web-socket.js +65 -0
  278. package/dist/runtime/app/pages/content.d.vue.ts +3 -0
  279. package/dist/runtime/app/pages/content.vue +14 -0
  280. package/dist/runtime/app/pages/content.vue.d.ts +3 -0
  281. package/dist/runtime/app/plugins/markdown-components +1 -0
  282. package/dist/runtime/app/plugins/markdown-components.d.ts +2 -0
  283. package/dist/runtime/app/plugins/markdown-components.js +19 -0
  284. package/dist/runtime/app/plugins/ws +1 -0
  285. package/dist/runtime/app/plugins/ws.d.ts +2 -0
  286. package/dist/runtime/app/plugins/ws.js +7 -0
  287. package/dist/runtime/app.d.vue.ts +3 -0
  288. package/dist/runtime/app.vue +3 -0
  289. package/dist/runtime/app.vue.d.ts +3 -0
  290. package/dist/runtime/markdown/plugins +1 -0
  291. package/dist/runtime/markdown/plugins.d.ts +3 -0
  292. package/dist/runtime/markdown/plugins.js +39 -0
  293. package/dist/runtime/query/public-limits +1 -0
  294. package/dist/runtime/query/public-limits.d.ts +2 -0
  295. package/dist/runtime/query/public-limits.js +2 -0
  296. package/dist/runtime/query/resolve +1 -0
  297. package/dist/runtime/query/resolve.d.ts +5 -0
  298. package/dist/runtime/query/resolve.js +9 -0
  299. package/dist/runtime/query/routes +1 -0
  300. package/dist/runtime/query/routes.d.ts +33 -0
  301. package/dist/runtime/query/routes.js +21 -0
  302. package/dist/runtime/query/unified +1 -0
  303. package/dist/runtime/query/unified.d.ts +94 -0
  304. package/dist/runtime/query/unified.js +473 -0
  305. package/dist/runtime/server/api/cache +1 -0
  306. package/dist/runtime/server/api/cache.d.ts +8 -0
  307. package/dist/runtime/server/api/cache.js +26 -0
  308. package/dist/runtime/server/api/locales +1 -0
  309. package/dist/runtime/server/api/locales.d.ts +6 -0
  310. package/dist/runtime/server/api/locales.js +28 -0
  311. package/dist/runtime/server/api/navigation +1 -0
  312. package/dist/runtime/server/api/navigation.d.ts +2 -0
  313. package/dist/runtime/server/api/navigation.js +21 -0
  314. package/dist/runtime/server/api/query +1 -0
  315. package/dist/runtime/server/api/query.d.ts +2 -0
  316. package/dist/runtime/server/api/query.js +6 -0
  317. package/dist/runtime/server/api/revalidate +1 -0
  318. package/dist/runtime/server/api/revalidate.d.ts +6 -0
  319. package/dist/runtime/server/api/revalidate.js +156 -0
  320. package/dist/runtime/server/api/search +1 -0
  321. package/dist/runtime/server/api/search-index +1 -0
  322. package/dist/runtime/server/api/search-index.d.ts +2 -0
  323. package/dist/runtime/server/api/search-index.js +20 -0
  324. package/dist/runtime/server/api/search.d.ts +2 -0
  325. package/dist/runtime/server/api/search.js +40 -0
  326. package/dist/runtime/server/api/site-data +1 -0
  327. package/dist/runtime/server/api/site-data.d.ts +2 -0
  328. package/dist/runtime/server/api/site-data.js +22 -0
  329. package/dist/runtime/server/api/sitemap +1 -0
  330. package/dist/runtime/server/api/sitemap.d.ts +2 -0
  331. package/dist/runtime/server/api/sitemap.js +11 -0
  332. package/dist/runtime/server/cache-adapter +1 -0
  333. package/dist/runtime/server/cache-adapter.d.ts +2 -0
  334. package/dist/runtime/server/cache-adapter.js +11 -0
  335. package/dist/runtime/server/cache-adapters +1 -0
  336. package/dist/runtime/server/cache-adapters.d.ts +9 -0
  337. package/dist/runtime/server/cache-adapters.js +50 -0
  338. package/dist/runtime/server/cache-hints +1 -0
  339. package/dist/runtime/server/cache-hints.d.ts +5 -0
  340. package/dist/runtime/server/cache-hints.js +17 -0
  341. package/dist/runtime/server/collection-helpers +1 -0
  342. package/dist/runtime/server/collection-helpers.d.ts +13 -0
  343. package/dist/runtime/server/collection-helpers.js +99 -0
  344. package/dist/runtime/server/index +1 -0
  345. package/dist/runtime/server/index.d.ts +9 -0
  346. package/dist/runtime/server/index.js +15 -0
  347. package/dist/runtime/server/manifest +1 -0
  348. package/dist/runtime/server/manifest.d.ts +1 -0
  349. package/dist/runtime/server/manifest.js +1 -0
  350. package/dist/runtime/server/navigation +1 -0
  351. package/dist/runtime/server/navigation-query +1 -0
  352. package/dist/runtime/server/navigation-query.d.ts +4 -0
  353. package/dist/runtime/server/navigation-query.js +80 -0
  354. package/dist/runtime/server/navigation.d.ts +2 -0
  355. package/dist/runtime/server/navigation.js +9 -0
  356. package/dist/runtime/server/pagefind +1 -0
  357. package/dist/runtime/server/pagefind.d.ts +2 -0
  358. package/dist/runtime/server/pagefind.js +30 -0
  359. package/dist/runtime/server/plugins/cache +1 -0
  360. package/dist/runtime/server/plugins/cache.d.ts +2 -0
  361. package/dist/runtime/server/plugins/cache.js +17 -0
  362. package/dist/runtime/server/plugins/sitemap +1 -0
  363. package/dist/runtime/server/plugins/sitemap.d.ts +2 -0
  364. package/dist/runtime/server/plugins/sitemap.js +25 -0
  365. package/dist/runtime/server/preview +1 -0
  366. package/dist/runtime/server/preview.d.ts +1 -0
  367. package/dist/runtime/server/preview.js +1 -0
  368. package/dist/runtime/server/provider-query +1 -0
  369. package/dist/runtime/server/provider-query.d.ts +27 -0
  370. package/dist/runtime/server/provider-query.js +131 -0
  371. package/dist/runtime/server/provider-result +1 -0
  372. package/dist/runtime/server/provider-result.d.ts +10 -0
  373. package/dist/runtime/server/provider-result.js +30 -0
  374. package/dist/runtime/server/providers/filesystem +1 -0
  375. package/dist/runtime/server/providers/filesystem.d.ts +2 -0
  376. package/dist/runtime/server/providers/filesystem.js +47 -0
  377. package/dist/runtime/server/providers/index +1 -0
  378. package/dist/runtime/server/providers/index.d.ts +3 -0
  379. package/dist/runtime/server/providers/index.js +190 -0
  380. package/dist/runtime/server/query-api +1 -0
  381. package/dist/runtime/server/query-api.d.ts +28 -0
  382. package/dist/runtime/server/query-api.js +54 -0
  383. package/dist/runtime/server/query-executor +1 -0
  384. package/dist/runtime/server/query-executor.d.ts +4 -0
  385. package/dist/runtime/server/query-executor.js +121 -0
  386. package/dist/runtime/server/runtime-config +1 -0
  387. package/dist/runtime/server/runtime-config.d.ts +1 -0
  388. package/dist/runtime/server/runtime-config.js +1 -0
  389. package/dist/runtime/server/search +1 -0
  390. package/dist/runtime/server/search.d.ts +18 -0
  391. package/dist/runtime/server/search.js +134 -0
  392. package/dist/runtime/server/sitemap +1 -0
  393. package/dist/runtime/server/sitemap-provider +1 -0
  394. package/dist/runtime/server/sitemap-provider.d.ts +10 -0
  395. package/dist/runtime/server/sitemap-provider.js +11 -0
  396. package/dist/runtime/server/sitemap.d.ts +6 -0
  397. package/dist/runtime/server/sitemap.js +45 -0
  398. package/dist/runtime/server/storage +1 -0
  399. package/dist/runtime/server/storage-access +1 -0
  400. package/dist/runtime/server/storage-access.d.ts +1 -0
  401. package/dist/runtime/server/storage-access.js +9 -0
  402. package/dist/runtime/server/storage.d.ts +2 -0
  403. package/dist/runtime/server/storage.js +2 -0
  404. package/dist/runtime/server/validation +1 -0
  405. package/dist/runtime/server/validation.d.ts +1 -0
  406. package/dist/runtime/server/validation.js +6 -0
  407. package/dist/runtime/shared/search +1 -0
  408. package/dist/runtime/shared/search.d.ts +2 -0
  409. package/dist/runtime/shared/search.js +89 -0
  410. package/dist/runtime/transformers/component-resolver +1 -0
  411. package/dist/runtime/transformers/component-resolver.d.ts +10 -0
  412. package/dist/runtime/transformers/component-resolver.js +30 -0
  413. package/dist/runtime/transformers/csv/from-csv +1 -0
  414. package/dist/runtime/transformers/csv/from-csv.d.ts +1 -0
  415. package/dist/runtime/transformers/csv/from-csv.js +1 -0
  416. package/dist/runtime/transformers/csv/index +1 -0
  417. package/dist/runtime/transformers/csv/index.d.ts +1 -0
  418. package/dist/runtime/transformers/csv/index.js +1 -0
  419. package/dist/runtime/transformers/define +1 -0
  420. package/dist/runtime/transformers/define.d.ts +1 -0
  421. package/dist/runtime/transformers/define.js +1 -0
  422. package/dist/runtime/transformers/index +1 -0
  423. package/dist/runtime/transformers/index.d.ts +1 -0
  424. package/dist/runtime/transformers/index.js +1 -0
  425. package/dist/runtime/transformers/json +1 -0
  426. package/dist/runtime/transformers/json.d.ts +1 -0
  427. package/dist/runtime/transformers/json.js +1 -0
  428. package/dist/runtime/transformers/markdown +1 -0
  429. package/dist/runtime/transformers/markdown.d.ts +1 -0
  430. package/dist/runtime/transformers/markdown.js +1 -0
  431. package/dist/runtime/transformers/path-meta +1 -0
  432. package/dist/runtime/transformers/path-meta.d.ts +2 -0
  433. package/dist/runtime/transformers/path-meta.js +2 -0
  434. package/dist/runtime/transformers/utils +1 -0
  435. package/dist/runtime/transformers/utils.d.ts +1 -0
  436. package/dist/runtime/transformers/utils.js +1 -0
  437. package/dist/runtime/transformers/yaml +1 -0
  438. package/dist/runtime/transformers/yaml.d.ts +1 -0
  439. package/dist/runtime/transformers/yaml.js +1 -0
  440. package/dist/runtime/utils/content-components +1 -0
  441. package/dist/runtime/utils/content-components.d.ts +9 -0
  442. package/dist/runtime/utils/content-components.js +16 -0
  443. package/dist/runtime/utils/query +1 -0
  444. package/dist/runtime/utils/query.d.ts +5 -0
  445. package/dist/runtime/utils/query.js +18 -0
  446. package/dist/runtime/virtual/transformers.d.ts +4 -0
  447. package/dist/runtime/virtual.d.ts +7 -0
  448. package/dist/storage/cache +1 -0
  449. package/dist/storage/cache.d.ts +32 -0
  450. package/dist/storage/cache.js +42 -0
  451. package/dist/storage/content +1 -0
  452. package/dist/storage/content.d.ts +41 -0
  453. package/dist/storage/content.js +86 -0
  454. package/dist/storage/contents +1 -0
  455. package/dist/storage/contents.d.ts +5 -0
  456. package/dist/storage/contents.js +116 -0
  457. package/dist/storage/driver +1 -0
  458. package/dist/storage/driver.d.ts +28 -0
  459. package/dist/storage/driver.js +22 -0
  460. package/dist/storage/graph +1 -0
  461. package/dist/storage/graph.d.ts +3 -0
  462. package/dist/storage/graph.js +14 -0
  463. package/dist/storage/manifest +1 -0
  464. package/dist/storage/manifest.d.ts +18 -0
  465. package/dist/storage/manifest.js +68 -0
  466. package/dist/storage/references +1 -0
  467. package/dist/storage/references.d.ts +13 -0
  468. package/dist/storage/references.js +78 -0
  469. package/dist/storage/validation +1 -0
  470. package/dist/storage/validation.d.ts +46 -0
  471. package/dist/storage/validation.js +341 -0
  472. package/dist/testing/provider-contract +1 -0
  473. package/dist/testing/provider-contract.d.ts +31 -0
  474. package/dist/testing/provider-contract.js +237 -0
  475. package/dist/testing/provider-fixture +1 -0
  476. package/dist/testing/provider-fixture.d.ts +65 -0
  477. package/dist/testing/provider-fixture.js +606 -0
  478. package/dist/types/api +1 -0
  479. package/dist/types/api.d.ts +47 -0
  480. package/dist/types/api.js +1 -0
  481. package/dist/types/config +1 -0
  482. package/dist/types/config.d.ts +281 -0
  483. package/dist/types/config.js +28 -0
  484. package/dist/types/content +1 -0
  485. package/dist/types/content.d.ts +311 -0
  486. package/dist/types/content.js +1 -0
  487. package/dist/types/fields +1 -0
  488. package/dist/types/fields.d.ts +81 -0
  489. package/dist/types/fields.js +146 -0
  490. package/dist/types/index +1 -0
  491. package/dist/types/index.d.ts +6 -0
  492. package/dist/types/index.js +6 -0
  493. package/dist/types/module +1 -0
  494. package/dist/types/module.d.ts +428 -0
  495. package/dist/types/module.js +0 -0
  496. package/dist/types/picomatch.d.ts +8 -0
  497. package/dist/types/query +1 -0
  498. package/dist/types/query.d.ts +862 -0
  499. package/dist/types/query.js +1 -0
  500. package/dist/types/reference +1 -0
  501. package/dist/types/reference.d.ts +1 -0
  502. package/dist/types/reference.js +1 -0
  503. package/dist/types/runtime +1 -0
  504. package/dist/types/runtime.d.ts +45 -0
  505. package/dist/types/runtime.js +1 -0
  506. package/dist/types/search +1 -0
  507. package/dist/types/search.d.ts +64 -0
  508. package/dist/types/search.js +0 -0
  509. package/dist/types/virtual.d.ts +19 -0
  510. package/dist/types.d.mts +11 -0
  511. package/dist/web-types.json +466 -0
  512. package/package.json +135 -0
@@ -0,0 +1,2044 @@
1
+ import * as _nuxt_schema from '@nuxt/schema';
2
+ import { MarkdownOptions as MarkdownOptions$1, ParsedContent as ParsedContent$1 } from '../dist/types/content';
3
+ import { ContentCollectionConfig as ContentCollectionConfig$1, ContentCollectionI18nConfig as ContentCollectionI18nConfig$1 } from '../dist/types/config';
4
+ export { defineCollection, defineContentConfig, reference } from '../dist/types/config';
5
+ import { StorageValue } from 'unstorage';
6
+ import { ModuleOptions as ModuleOptions$1, ContentContext as ContentContext$1, ContentRevalidateOptions as ContentRevalidateOptions$1 } from '../dist/types/module';
7
+ import { ContentSearchPublicRuntimeConfig as ContentSearchPublicRuntimeConfig$1 } from '../dist/types/search';
8
+ import { ZodType, z } from 'zod';
9
+ import { ListenOptions } from 'listhen';
10
+
11
+ /**
12
+ * Locale settings for a collection that ships translated variants.
13
+ */
14
+ interface ContentCollectionI18nConfig {
15
+ /**
16
+ * Locale treated as the canonical variant when no locale is specified.
17
+ */
18
+ defaultLocale: string;
19
+ /**
20
+ * Every locale code that can produce a concrete variant for the collection.
21
+ */
22
+ locales: string[];
23
+ }
24
+ type ContentCollectionSource = string | string[];
25
+ /**
26
+ * Public route mount for route-backed collections.
27
+ *
28
+ * A single string applies to every locale. A locale map lets translated apps
29
+ * express roots such as `{ en: '/docs', de: '/dokumentation' }`.
30
+ */
31
+ type ContentCollectionRouteConfig = string | Record<string, string>;
32
+ type ContentCmsFieldType = 'text' | 'textarea' | 'richtext' | 'slug' | 'email' | 'url' | 'number' | 'range' | 'select' | 'multiselect' | 'radio' | 'checkbox' | 'toggle' | 'date' | 'datetime' | 'time' | 'json' | 'object' | 'array' | 'blocks' | 'relation' | 'relations' | 'image' | 'images' | 'file' | 'icon' | 'code' | 'color' | 'divider' | 'section';
33
+ interface ContentCmsRelationConfig {
34
+ collectionId: string;
35
+ multiple?: boolean;
36
+ }
37
+ interface ContentCmsFieldConfig {
38
+ type?: ContentCmsFieldType;
39
+ label?: string | Record<string, string> | null;
40
+ description?: string | null;
41
+ required?: boolean;
42
+ localized?: boolean;
43
+ hidden?: boolean;
44
+ searchable?: boolean;
45
+ sortable?: boolean;
46
+ order?: number;
47
+ width?: 'full' | 'half';
48
+ defaultValue?: unknown;
49
+ validation?: Record<string, unknown> | null;
50
+ condition?: Record<string, unknown> | null;
51
+ options?: string[] | null;
52
+ relation?: ContentCmsRelationConfig | null;
53
+ fields?: Record<string, ContentCmsFieldConfig> | ContentCmsFieldConfig[] | null;
54
+ min?: number | null;
55
+ max?: number | null;
56
+ step?: number | null;
57
+ slugFrom?: string | null;
58
+ language?: string | null;
59
+ }
60
+ interface ContentCmsCollectionConfig {
61
+ label?: string | Record<string, string>;
62
+ type?: 'flat' | 'tree';
63
+ icon?: string;
64
+ route?: {
65
+ mode?: 'route' | 'none';
66
+ pathPrefix?: string;
67
+ slugMode?: 'shared' | 'localized' | 'stable' | 'localizedStable';
68
+ rootSlug?: string | null;
69
+ singleton?: boolean;
70
+ };
71
+ fields?: Record<string, ContentCmsFieldConfig>;
72
+ settings?: unknown;
73
+ }
74
+ /**
75
+ * Object source shape accepted for Nuxt Content v3 migration.
76
+ */
77
+ interface ContentCollectionSourceObject {
78
+ /**
79
+ * Source glob or globs included in the collection.
80
+ */
81
+ include: ContentCollectionSource;
82
+ /**
83
+ * Source glob or globs excluded from the collection.
84
+ */
85
+ exclude?: ContentCollectionSource;
86
+ }
87
+ /**
88
+ * Declarative collection definition used by `content.config.ts`.
89
+ */
90
+ interface ContentCollectionConfig<TSchema extends ZodType | undefined = ZodType | undefined> {
91
+ /**
92
+ * Source glob or source descriptor understood by the filesystem ingestion
93
+ * layer. CMS-backed projects do not need a runtime source; filesystem
94
+ * imports/seeding should be modeled by provider-owned import tooling.
95
+ */
96
+ source?: ContentCollectionSource;
97
+ /**
98
+ * Source glob or globs excluded from this collection.
99
+ */
100
+ exclude?: ContentCollectionSource;
101
+ /**
102
+ * Optional Zod schema applied to every parsed entry in the collection.
103
+ */
104
+ schema?: TSchema;
105
+ /**
106
+ * When `true`, reject documents with frontmatter fields not declared in `schema`.
107
+ */
108
+ strict?: boolean;
109
+ /**
110
+ * Per-collection locale settings. Use `true` to inherit the module-level i18n config.
111
+ */
112
+ i18n?: true | ContentCollectionI18nConfig;
113
+ /**
114
+ * Public route mount for this collection. Used to resolve `by.route`
115
+ * selectors and to emit requested-locale URLs for fallback content.
116
+ */
117
+ route?: ContentCollectionRouteConfig;
118
+ /**
119
+ * Opt-in to fully translated path segments per locale (ADR-0008). When `true`,
120
+ * the content graph pairs locale variants by numeric prefix on filenames so
121
+ * each locale can carry its own slug text, e.g. `1.guide/` ↔ `1.documentation/`.
122
+ *
123
+ * @default false
124
+ */
125
+ translatedSlugs?: boolean;
126
+ /**
127
+ * Include this collection in content-owned sitemap output and prerender route
128
+ * discovery. Route-backed collections are included by default; data-only or
129
+ * app-internal collections should opt out with `false`.
130
+ *
131
+ * @default true
132
+ */
133
+ sitemap?: boolean;
134
+ /**
135
+ * Optional CMS editor metadata for providers such as `@lupinum/ginko-cms`.
136
+ *
137
+ * The content collection remains the source of truth; this metadata only
138
+ * fills editor-specific gaps that cannot be inferred safely from route,
139
+ * source, i18n, and schema information.
140
+ */
141
+ cms?: ContentCmsCollectionConfig;
142
+ }
143
+ type ContentCollectionKind = 'page' | 'data';
144
+ type BuiltinContentProviderName = 'filesystem' | 'cms' | 'ginko-cms' | 'ginko';
145
+ type ContentProviderName = BuiltinContentProviderName | (string & {});
146
+ type DefineCollectionOptions<TSchema extends ZodType | undefined = ZodType | undefined> = Omit<ContentCollectionConfig<TSchema>, 'source' | 'exclude'>;
147
+ interface DefineCollectionObject<TSchema extends ZodType | undefined = ZodType | undefined> extends DefineCollectionOptions<TSchema> {
148
+ /**
149
+ * Nuxt Content v3-compatible collection kind. Ginko does not keep separate
150
+ * page/data collection runtimes; `data` collections default to `sitemap: false`.
151
+ */
152
+ type: ContentCollectionKind;
153
+ /**
154
+ * Source glob, globs, or v3-compatible `{ include, exclude }` object.
155
+ * Required for filesystem-backed collections; optional for CMS-backed
156
+ * collections.
157
+ */
158
+ source?: ContentCollectionSource | ContentCollectionSourceObject;
159
+ }
160
+ /**
161
+ * Root object returned from `defineContentConfig`.
162
+ */
163
+ interface ContentConfig<TCollections extends Record<string, ContentCollectionConfig> = Record<string, ContentCollectionConfig>> {
164
+ /**
165
+ * Content backing implementation. `filesystem` is the default. `cms`,
166
+ * `ginko-cms`, and `ginko` resolve to the official Ginko CMS provider when
167
+ * `@lupinum/ginko-cms` is installed.
168
+ */
169
+ provider?: ContentProviderName;
170
+ /**
171
+ * External provider modules keyed by provider name. Built-in providers do not
172
+ * need to be registered here.
173
+ */
174
+ providers?: Record<string, string>;
175
+ /**
176
+ * Named content collections keyed by the identifier used at query time.
177
+ */
178
+ collections?: TCollections;
179
+ }
180
+ /**
181
+ * Infer the runtime data shape for a collection from its Zod schema.
182
+ */
183
+ type CollectionSchema<TCollection> = TCollection extends {
184
+ schema?: infer TSchema;
185
+ } ? TSchema extends ZodType ? z.infer<TSchema> : Record<string, unknown> : Record<string, unknown>;
186
+ /**
187
+ * Zod string schema tagged as a Nuxt Content reference field.
188
+ */
189
+ interface ContentReferenceSchema extends z.ZodString {
190
+ /**
191
+ * Serialized descriptor in the form `__nuxt_content_ref__:<collection>`.
192
+ */
193
+ description: string;
194
+ }
195
+ /**
196
+ * Typed handle returned by `defineCollection`. Carries the collection's name
197
+ * and i18n discriminator at the type level so the unified query API
198
+ * (`one`, `many`, `useContentOne`, ...) can require `locale` only when the
199
+ * collection is internationalized.
200
+ *
201
+ * The handle extends `ContentCollectionConfig` so it can be stored directly
202
+ * in `defineContentConfig({ collections: ... })`.
203
+ */
204
+ interface ContentCollectionHandle<Name extends string = string, TSchema extends ZodType | undefined = ZodType | undefined, TI18n extends boolean = boolean> extends ContentCollectionConfig<TSchema> {
205
+ /**
206
+ * Stable identifier used at query time, e.g. `'docs'` or `'blog'`.
207
+ */
208
+ readonly name: Name;
209
+ /**
210
+ * Phantom flag — `true` when the collection ships translated variants.
211
+ * Used by the type system to make `locale` required on i18n queries.
212
+ *
213
+ * @internal
214
+ */
215
+ readonly __i18n: TI18n;
216
+ /**
217
+ * Phantom marker — Zod schema bound at definition time. Used to infer the
218
+ * returned document shape at query time.
219
+ *
220
+ * @internal
221
+ */
222
+ readonly __schema: TSchema;
223
+ }
224
+
225
+ type LayoutKey = string;
226
+ interface ContentSeoImage {
227
+ src: string;
228
+ alt?: string;
229
+ width?: number;
230
+ height?: number;
231
+ }
232
+ interface ContentSeoMeta {
233
+ title?: string;
234
+ description?: string;
235
+ image?: string | ContentSeoImage;
236
+ }
237
+ /**
238
+ * Internal metadata attached to every parsed content record.
239
+ */
240
+ interface ParsedContentInternalMeta {
241
+ /**
242
+ * Stable unique id for the parsed source record.
243
+ */
244
+ _id: string;
245
+ /**
246
+ * Backing source name when multiple content sources are configured.
247
+ */
248
+ _source?: string;
249
+ /**
250
+ * Canonical content path. This is source-agnostic, so the same route can be
251
+ * backed by local files, remote storage, or generated data.
252
+ */
253
+ _path?: string;
254
+ /**
255
+ * Human-readable title resolved from frontmatter or generated metadata.
256
+ */
257
+ title?: string;
258
+ /**
259
+ * Human-readable summary used in listings, search, and SEO helpers.
260
+ */
261
+ description?: string;
262
+ /**
263
+ * Conventional SEO frontmatter shared by pages and app templates.
264
+ */
265
+ seo?: ContentSeoMeta;
266
+ /**
267
+ * Stable authored alias for internal content links.
268
+ */
269
+ ref?: string;
270
+ /**
271
+ * Marks the document as a draft.
272
+ */
273
+ _draft?: boolean;
274
+ /**
275
+ * Marks the document as a partial that should not become a page by default.
276
+ */
277
+ _partial?: boolean;
278
+ /**
279
+ * Locale code for the concrete variant.
280
+ */
281
+ _locale?: string;
282
+ /**
283
+ * Locale-agnostic content identity used to resolve variants.
284
+ */
285
+ _canonicalKey?: string;
286
+ /**
287
+ * Requested route path before locale fallback.
288
+ */
289
+ _requestedPath?: string;
290
+ /**
291
+ * Requested public route before locale fallback.
292
+ */
293
+ _requestedRoute?: string;
294
+ /**
295
+ * Requested authored reference before locale fallback.
296
+ */
297
+ _requestedRef?: string;
298
+ /**
299
+ * Requested locale before locale fallback.
300
+ */
301
+ _requestedLocale?: string;
302
+ /**
303
+ * Resolved locale after locale fallback.
304
+ */
305
+ _resolvedLocale?: string;
306
+ /**
307
+ * Whether the returned content was resolved through fallback.
308
+ */
309
+ _fallback?: boolean;
310
+ /**
311
+ * Locales that have a concrete variant for this document.
312
+ */
313
+ _availableLocales?: string[];
314
+ /**
315
+ * Map of available locale code to its locale-specific path.
316
+ */
317
+ _variantPaths?: Record<string, string>;
318
+ /**
319
+ * Resolved markdown `$ref` links for the current runtime locale.
320
+ */
321
+ _resolvedRefs?: Record<string, string>;
322
+ /**
323
+ * Collection name, when matched by a configured collection glob.
324
+ */
325
+ _collection?: string;
326
+ /**
327
+ * Marks folder-scoped navigation metadata documents.
328
+ */
329
+ _navigation?: boolean;
330
+ /**
331
+ * Parsed document kind.
332
+ */
333
+ _type?: 'markdown' | 'yaml' | 'json' | 'csv';
334
+ /**
335
+ * Source file path relative to the content root.
336
+ */
337
+ _file?: string;
338
+ /**
339
+ * Source file extension.
340
+ */
341
+ _extension?: 'md' | 'yaml' | 'yml' | 'json' | 'json5' | 'csv';
342
+ }
343
+ /**
344
+ * One entry in a generated table of contents.
345
+ */
346
+ interface TocLink {
347
+ id: string;
348
+ text: string;
349
+ depth: number;
350
+ children?: TocLink[];
351
+ }
352
+ /**
353
+ * Parsed table of contents generated from markdown headings.
354
+ */
355
+ interface Toc {
356
+ title: string;
357
+ depth: number;
358
+ searchDepth: number;
359
+ links: TocLink[];
360
+ }
361
+ /**
362
+ * Options object passed to a markdown plugin.
363
+ */
364
+ type MarkdownPluginOptions = Record<string, unknown>;
365
+ /**
366
+ * User-authored plugin declaration in module options.
367
+ */
368
+ type MarkdownPluginDescriptor = string | [string, MarkdownPluginOptions];
369
+ /**
370
+ * Normalized plugin declaration after resolution.
371
+ */
372
+ type ResolvedMarkdownPlugin = {
373
+ name: string;
374
+ options: MarkdownPluginOptions;
375
+ };
376
+ /**
377
+ * Object-shaped markdown AST node.
378
+ */
379
+ interface MarkdownNode {
380
+ type: string;
381
+ tag?: string;
382
+ value?: string;
383
+ props?: Record<string, unknown>;
384
+ content?: unknown;
385
+ children?: MarkdownNode[];
386
+ attributes?: Record<string, unknown>;
387
+ fmAttributes?: Record<string, unknown>;
388
+ }
389
+ /**
390
+ * Root node for the object-based markdown AST.
391
+ */
392
+ interface MarkdownRoot {
393
+ type: 'root';
394
+ children: MarkdownNode[];
395
+ props?: Record<string, any>;
396
+ toc?: Toc;
397
+ }
398
+ /**
399
+ * Resolved markdown runtime options.
400
+ */
401
+ interface MarkdownOptions {
402
+ plugins: ResolvedMarkdownPlugin[];
403
+ tags: Record<string, string>;
404
+ anchorLinks: {
405
+ depth: number;
406
+ exclude: number[];
407
+ };
408
+ image?: 'auto' | 'img' | 'nuxt-image';
409
+ }
410
+ /**
411
+ * Flexible parsed content shape that allows user-defined frontmatter fields.
412
+ */
413
+ interface ParsedContentMeta extends ParsedContentInternalMeta {
414
+ /**
415
+ * Preferred layout key for page rendering.
416
+ */
417
+ layout?: LayoutKey;
418
+ [key: string]: unknown;
419
+ }
420
+ /**
421
+ * Strict parsed content shape with no open-ended index signature.
422
+ */
423
+ interface StrictParsedContentMeta extends ParsedContentInternalMeta {
424
+ /**
425
+ * Preferred layout key for page rendering.
426
+ */
427
+ layout?: LayoutKey;
428
+ }
429
+ /**
430
+ * Parsed content document including the rendered body payload.
431
+ */
432
+ interface ParsedContent extends ParsedContentMeta {
433
+ /**
434
+ * Optional excerpt payload.
435
+ */
436
+ excerpt?: MarkdownRoot;
437
+ /**
438
+ * Parsed body payload. `null` means the source had no renderable body.
439
+ */
440
+ body: MarkdownRoot | null;
441
+ }
442
+ /**
443
+ * Strict parsed content document including the rendered body payload.
444
+ */
445
+ interface StrictParsedContent extends StrictParsedContentMeta {
446
+ /**
447
+ * Optional excerpt payload.
448
+ */
449
+ excerpt?: MarkdownRoot;
450
+ /**
451
+ * Parsed body payload. `null` means the source had no renderable body.
452
+ */
453
+ body: MarkdownRoot | null;
454
+ }
455
+ /**
456
+ * Specialized parsed content shape for markdown sources.
457
+ */
458
+ interface MarkdownParsedContent extends ParsedContent {
459
+ _type: 'markdown';
460
+ /**
461
+ * Whether the markdown source rendered no meaningful body content.
462
+ */
463
+ _empty: boolean;
464
+ /**
465
+ * Description resolved from frontmatter or excerpt generation.
466
+ */
467
+ description: string;
468
+ /**
469
+ * Object AST excerpt generated from the markdown body.
470
+ */
471
+ excerpt?: MarkdownRoot;
472
+ /**
473
+ * Parsed Markdown body with included table of contents.
474
+ */
475
+ body: MarkdownRoot & {
476
+ toc?: Toc;
477
+ };
478
+ }
479
+ /**
480
+ * Transformer hook used during ingestion.
481
+ */
482
+ interface ContentTransformer {
483
+ /**
484
+ * Stable transformer name used in logs and generated manifests.
485
+ */
486
+ name: string;
487
+ /**
488
+ * File extensions handled by the transformer.
489
+ */
490
+ extensions: string[];
491
+ /**
492
+ * Optional parse hook that turns raw source content into a parsed document.
493
+ */
494
+ parse?(id: string, content: StorageValue, options: unknown): Promise<ParsedContent> | ParsedContent;
495
+ /**
496
+ * Optional post-parse hook that mutates or enriches a parsed document.
497
+ */
498
+ transform?(content: ParsedContent, options: unknown): Promise<ParsedContent> | ParsedContent;
499
+ }
500
+ /**
501
+ * Ingestion options passed to the transform pipeline.
502
+ */
503
+ interface TransformContentOptions {
504
+ transformers?: ContentTransformer[];
505
+ [key: string]: unknown;
506
+ }
507
+ /**
508
+ * Navigation node returned by content navigation helpers.
509
+ */
510
+ interface NavItem {
511
+ title: string;
512
+ /**
513
+ * Nuxt Content compatible route path used by Nuxt UI content components.
514
+ */
515
+ path: string;
516
+ /**
517
+ * Canonical content route without locale prefix.
518
+ */
519
+ _path: string;
520
+ stem?: string;
521
+ page?: false;
522
+ _id?: string;
523
+ _canonicalKey?: string;
524
+ _locale?: string;
525
+ _fallback?: boolean;
526
+ _draft?: boolean;
527
+ children?: NavItem[];
528
+ [key: string]: unknown;
529
+ }
530
+ /**
531
+ * Public alias for navigation items returned by query helpers.
532
+ */
533
+ type ContentNavigationItem = NavItem;
534
+
535
+ /**
536
+ * Response envelope returned when a query resolves to a list.
537
+ */
538
+ interface ContentQueryFindResponse<T> {
539
+ /**
540
+ * Matched documents after filtering, sorting, and projection.
541
+ */
542
+ result: Array<T>;
543
+ /**
544
+ * Number of records skipped before the returned page.
545
+ */
546
+ skip: number;
547
+ /**
548
+ * Requested page size.
549
+ */
550
+ limit: number;
551
+ /**
552
+ * Total match count before paging is applied.
553
+ */
554
+ total: number;
555
+ }
556
+ /**
557
+ * Response envelope returned when a query resolves to one document.
558
+ */
559
+ interface ContentQueryFindOneResponse<T> {
560
+ /**
561
+ * First matched document, or `undefined` when nothing matched.
562
+ */
563
+ result: T | undefined;
564
+ }
565
+ /**
566
+ * Response envelope returned when a query resolves to a count.
567
+ */
568
+ interface ContentQueryCountResponse {
569
+ /**
570
+ * Number of matched documents.
571
+ */
572
+ result: number;
573
+ }
574
+ /**
575
+ * Low-level transport response for the content query engine.
576
+ *
577
+ * Most application code should use the builder helpers (`.all()`, `.first()`,
578
+ * `.count()`) instead of reading this union directly.
579
+ */
580
+ type ContentQueryResponse<T> = ContentQueryFindResponse<T> | ContentQueryFindOneResponse<T> | ContentQueryCountResponse;
581
+
582
+ /**
583
+ * Query
584
+ */
585
+ interface ContentQuerySortParams {
586
+ /**
587
+ * Locale specifier for sorting
588
+ * A string with a BCP 47 language tag
589
+ *
590
+ * @default undefined
591
+ */
592
+ $locale?: string;
593
+ /**
594
+ * Whether numeric collation should be used, such that "1" < "2" < "10".
595
+ * Possible values are `true` and `false`;
596
+ *
597
+ * @default false
598
+ */
599
+ $numeric?: boolean;
600
+ /**
601
+ * Whether upper case or lower case should sort first.
602
+ * Possible values are `"upper"`, `"lower"`, or `"false"`
603
+ *
604
+ * @default "depends on locale"
605
+ */
606
+ $caseFirst?: 'upper' | 'lower' | 'false';
607
+ /**
608
+ * Which differences in the strings should lead to non-zero result values. Possible values are:
609
+ * - "base": Only strings that differ in base letters compare as unequal. Examples: a ≠ b, a = á, a = A.
610
+ * - "accent": Only strings that differ in base letters or accents and other diacritic marks compare as unequal. Examples: a ≠ b, a ≠ á, a = A.
611
+ * - "case": Only strings that differ in base letters or case compare as unequal. Examples: a ≠ b, a = á, a ≠ A.
612
+ * - "variant": Strings that differ in base letters, accents and other diacritic marks, or case compare as unequal. Other differences may also be taken into consideration. Examples: a ≠ b, a ≠ á, a ≠ A.
613
+ *
614
+ * @default "variant"
615
+ */
616
+ $sensitivity?: 'base' | 'accent' | 'case' | 'variant';
617
+ }
618
+ interface ContentQuerySortFields {
619
+ [field: string]: -1 | 1;
620
+ }
621
+ type ContentQuerySortOptions = ContentQuerySortParams | ContentQuerySortFields;
622
+ /**
623
+ * @internal
624
+ */
625
+ interface ContentQueryBuilderWhere extends Partial<Record<keyof ParsedContentInternalMeta, string | number | boolean | RegExp | ContentQueryBuilderWhere>> {
626
+ /**
627
+ * Match only if all nested conditions are true.
628
+ **/
629
+ $and?: ContentQueryBuilderWhere[];
630
+ /**
631
+ * Match if any nested condition is true.
632
+ **/
633
+ $or?: ContentQueryBuilderWhere[];
634
+ /**
635
+ * Match when the nested condition is false.
636
+ **/
637
+ $not?: string | number | boolean | RegExp | ContentQueryBuilderWhere;
638
+ /**
639
+ * Match if item equals condition.
640
+ **/
641
+ $eq?: string | number | boolean | RegExp;
642
+ /**
643
+ * Match if item does not equal condition.
644
+ **/
645
+ $ne?: string | number | boolean | RegExp;
646
+ /**
647
+ * Check if item is greater than condition.
648
+ */
649
+ $gt?: number | string;
650
+ /**
651
+ * Check if item is greater than or equal to condition.
652
+ */
653
+ $gte?: number | string;
654
+ /**
655
+ * Check if item is less than condition.
656
+ */
657
+ $lt?: number | string;
658
+ /**
659
+ * Check if item is less than or equal to condition.
660
+ */
661
+ $lte?: number | string;
662
+ /**
663
+ * Provides regular expression capabilities for pattern matching strings.
664
+ */
665
+ $regex?: RegExp | string;
666
+ /**
667
+ * Match when a string field starts with the given prefix.
668
+ */
669
+ $prefix?: string;
670
+ /**
671
+ * Match if type of item equals condition.
672
+ */
673
+ $type?: string;
674
+ /**
675
+ * Check key existence.
676
+ */
677
+ $exists?: boolean;
678
+ /**
679
+ * Match if item contains every condition or every rule in the condition array.
680
+ **/
681
+ $contains?: Array<string | number | boolean> | string | number | boolean;
682
+ /**
683
+ * Match if item contains at least one rule from the condition array.
684
+ */
685
+ $containsAny?: Array<string | number | boolean>;
686
+ /**
687
+ * Ignore case when checking string containment.
688
+ **/
689
+ $icontains?: string;
690
+ /**
691
+ * Match if item is in condition array.
692
+ **/
693
+ $in?: Array<string | number | boolean>;
694
+ [key: string]: string | number | boolean | RegExp | ContentQueryBuilderWhere | Array<string | number | boolean | ContentQueryBuilderWhere> | undefined;
695
+ }
696
+ /**
697
+ * @internal
698
+ */
699
+ interface ContentQueryBuilderParams {
700
+ collection?: string;
701
+ first?: boolean;
702
+ skip?: number;
703
+ limit?: number;
704
+ only?: string[];
705
+ without?: string[];
706
+ sort?: ContentQuerySortOptions[];
707
+ where?: ContentQueryBuilderWhere[] | ContentQueryBuilderWhere;
708
+ canonical?: boolean;
709
+ navigationFields?: string[];
710
+ resolveLocale?: {
711
+ locale?: string;
712
+ fallback?: string[] | boolean;
713
+ exact?: boolean;
714
+ };
715
+ [key: string]: unknown;
716
+ }
717
+ type QueryScalar = string | number | boolean | Date;
718
+ type InternalQueryKeys = Extract<keyof ParsedContentInternalMeta, `_${string}`>;
719
+ type CollectionQueryKey<T> = Extract<keyof T, string> | InternalQueryKeys;
720
+ type CollectionQueryField<T> = CollectionQueryKey<T>;
721
+ type CollectionQueryFieldValue<T, K extends CollectionQueryField<T>> = K extends keyof T ? NonNullable<T[K]> : K extends InternalQueryKeys ? NonNullable<ParsedContentInternalMeta[K]> : never;
722
+ type EqualityValue<T> = T extends QueryScalar ? T | RegExp : T;
723
+ type ComparableValue<T> = T extends string | number | Date ? T : never;
724
+ type MembershipValue<T> = T extends Array<infer U> ? Array<U> : T extends QueryScalar ? Array<T> : never;
725
+ type ContainsValue<T> = T extends string ? string : T extends Array<infer U> ? U | Array<U> : never;
726
+ type ContainsAnyValue<T> = T extends Array<infer U> ? Array<U> : never;
727
+ type RegexValue<T> = T extends string ? RegExp | string : never;
728
+ type IContainsValue<T> = T extends string ? string : never;
729
+ type TypeValue = 'string' | 'number' | 'boolean' | 'object' | 'undefined';
730
+ type CollectionQueryOperator<T> = '=' | '!=' | 'EXISTS' | 'TYPE' | (ComparableValue<T> extends never ? never : '>' | '>=' | '<' | '<=') | (MembershipValue<T> extends never ? never : 'IN' | 'NOT IN') | (ContainsValue<T> extends never ? never : 'CONTAINS') | (ContainsAnyValue<T> extends never ? never : 'CONTAINS_ANY') | (RegexValue<T> extends never ? never : 'REGEX') | (IContainsValue<T> extends never ? never : 'ICONTAINS');
731
+ type CollectionQueryValue<T, O extends CollectionQueryOperator<T>> = O extends '=' | '!=' ? EqualityValue<T> : O extends '>' | '>=' | '<' | '<=' ? ComparableValue<T> : O extends 'IN' | 'NOT IN' ? MembershipValue<T> : O extends 'CONTAINS' ? ContainsValue<T> : O extends 'CONTAINS_ANY' ? ContainsAnyValue<T> : O extends 'REGEX' ? RegexValue<T> : O extends 'ICONTAINS' ? IContainsValue<T> : O extends 'EXISTS' ? boolean | undefined : O extends 'TYPE' ? TypeValue : never;
732
+ type QueryOrderDirection = 'ASC' | 'DESC';
733
+ interface QueryOrderOptions {
734
+ /**
735
+ * BCP 47 locale passed to `Intl.Collator` for string ordering.
736
+ */
737
+ locale?: string;
738
+ /**
739
+ * Enable numeric ordering so `"2"` sorts before `"10"`.
740
+ */
741
+ numeric?: boolean;
742
+ /**
743
+ * Control whether upper- or lower-case letters sort first.
744
+ */
745
+ caseFirst?: ContentQuerySortParams['$caseFirst'];
746
+ /**
747
+ * Collation sensitivity used by string comparison.
748
+ */
749
+ sensitivity?: ContentQuerySortParams['$sensitivity'];
750
+ }
751
+ /**
752
+ * Builder passed to grouped `andWhere` / `orWhere` callbacks.
753
+ */
754
+ interface QueryGroupBuilder<T = ParsedContentMeta> {
755
+ where<K extends CollectionQueryField<T>, O extends CollectionQueryOperator<CollectionQueryFieldValue<T, K>>>(field: K, operator: O, value?: CollectionQueryValue<CollectionQueryFieldValue<T, K>, O>): QueryGroupBuilder<T>;
756
+ andWhere(groupFactory: QueryGroupFunction<T>): QueryGroupBuilder<T>;
757
+ orWhere(groupFactory: QueryGroupFunction<T>): QueryGroupBuilder<T>;
758
+ }
759
+ /**
760
+ * Factory used to build grouped nested conditions.
761
+ */
762
+ type QueryGroupFunction<T = ParsedContentMeta> = (group: QueryGroupBuilder<T>) => QueryGroupBuilder<T>;
763
+ /**
764
+ * Options for locale-aware navigation queries.
765
+ */
766
+ interface ContentCollectionNavigationOptions<TField extends string = string> {
767
+ /**
768
+ * Extra document fields to merge onto each returned navigation item.
769
+ */
770
+ fields?: TField[];
771
+ /**
772
+ * Locale to resolve against for translated collections.
773
+ */
774
+ locale?: string;
775
+ /**
776
+ * When `true`, keep canonical paths instead of locale-prefixed paths.
777
+ */
778
+ canonical?: boolean;
779
+ }
780
+ /**
781
+ * Options for previous/next navigation helpers.
782
+ */
783
+ type ContentCollectionItemSurroundingsOptions<TField extends string = string> = ContentCollectionNavigationOptions<TField>;
784
+ /**
785
+ * Options for extracting searchable sections from collection pages.
786
+ */
787
+ interface ContentCollectionSearchSectionsOptions {
788
+ /**
789
+ * Tags ignored while flattening page content into search text.
790
+ */
791
+ ignoredTags?: string[];
792
+ /**
793
+ * Extra top-level fields copied from each page onto every emitted section.
794
+ */
795
+ extraFields?: string[];
796
+ /**
797
+ * Query predicate applied before extracting searchable sections.
798
+ */
799
+ filterQuery?: ContentQueryBuilderWhere;
800
+ /**
801
+ * Lowest heading level that starts a new section.
802
+ */
803
+ minHeading?: `h${1 | 2 | 3 | 4 | 5 | 6}`;
804
+ /**
805
+ * Highest heading level that starts a new section.
806
+ */
807
+ maxHeading?: `h${1 | 2 | 3 | 4 | 5 | 6}`;
808
+ /**
809
+ * Locale to resolve against for translated collections.
810
+ */
811
+ locale?: string;
812
+ /**
813
+ * When `true`, keep canonical paths instead of locale-prefixed paths.
814
+ */
815
+ canonical?: boolean;
816
+ }
817
+ /**
818
+ * Options for locale-aware page resolution.
819
+ */
820
+ interface ContentCollectionPageOptions {
821
+ /**
822
+ * Preferred locale to resolve.
823
+ */
824
+ locale?: string;
825
+ /**
826
+ * Enable or customize locale fallback resolution.
827
+ *
828
+ * Pass `true` to use configured fallbacks, or an explicit locale list to
829
+ * override the configured chain for this query.
830
+ */
831
+ fallback?: string[] | boolean;
832
+ /**
833
+ * When `true`, keep canonical paths in the returned route metadata.
834
+ */
835
+ canonical?: boolean;
836
+ }
837
+ /**
838
+ * Options for route metadata resolution without loading full page content.
839
+ */
840
+ interface ContentCollectionRouteMetaOptions {
841
+ /**
842
+ * Preferred locale to resolve.
843
+ */
844
+ locale?: string;
845
+ /**
846
+ * Enable or customize locale fallback resolution.
847
+ */
848
+ fallback?: string[] | boolean;
849
+ }
850
+ /**
851
+ * Options for resolving an authored reference value into a document.
852
+ */
853
+ interface ResolveContentReferenceOptions {
854
+ /**
855
+ * Preferred locale to resolve.
856
+ */
857
+ locale?: string;
858
+ /**
859
+ * Enable or customize locale fallback resolution.
860
+ */
861
+ fallback?: string[] | boolean;
862
+ /**
863
+ * When `true`, require an exact locale match and skip fallback lookup.
864
+ */
865
+ exact?: boolean;
866
+ /**
867
+ * Restrict resolution to a single collection.
868
+ */
869
+ collection?: string;
870
+ }
871
+ /**
872
+ * Locale variant entry returned by the internal locale-variant endpoint.
873
+ */
874
+ interface ContentLocaleEntry {
875
+ /**
876
+ * Stable locale-agnostic identity shared by every translated variant.
877
+ */
878
+ canonicalKey: string;
879
+ /**
880
+ * Locale code for the matching variant.
881
+ */
882
+ locale: string;
883
+ /**
884
+ * Resolved route path for the variant, when the variant is routable.
885
+ */
886
+ path?: string;
887
+ }
888
+ /**
889
+ * Route metadata for a single locale variant of a page.
890
+ */
891
+ interface ContentLocaleRoute {
892
+ locale: string;
893
+ path: string;
894
+ canonicalPath: string;
895
+ }
896
+ /**
897
+ * One entry in the per-locale path map attached to a localized document.
898
+ *
899
+ * `translated` is `true` when a concrete variant exists in that locale, `false`
900
+ * when the resolver fell back to another locale's path. `fallback` names the
901
+ * locale that supplied the path when `translated` is false.
902
+ */
903
+ interface LocalePathEntry {
904
+ /**
905
+ * Locale-prefixed route path (the URL the user navigates to).
906
+ */
907
+ path: string;
908
+ /**
909
+ * `true` when this locale has its own variant; `false` when the path was
910
+ * supplied by a fallback locale.
911
+ */
912
+ translated: boolean;
913
+ /**
914
+ * Locale that backed this entry when `translated` is `false`.
915
+ */
916
+ fallback?: string;
917
+ }
918
+ /**
919
+ * Public resolution metadata attached to localized content results.
920
+ *
921
+ * Internal `_requestedLocale`, `_resolvedLocale`, and `_fallback` fields remain
922
+ * storage/query implementation details. UI code should read this object.
923
+ */
924
+ interface ContentResolvedMeta {
925
+ /**
926
+ * Locale of the concrete content variant that backed this result.
927
+ */
928
+ locale: string;
929
+ /**
930
+ * Locale requested by the caller, when locale resolution was part of the
931
+ * query.
932
+ */
933
+ requestedLocale?: string;
934
+ /**
935
+ * `true` when the concrete content variant came from a different locale than
936
+ * the requested locale.
937
+ */
938
+ fallback: boolean;
939
+ /**
940
+ * Locale that supplied the content when `fallback` is true.
941
+ */
942
+ fallbackLocale?: string;
943
+ /**
944
+ * Public route path returned to the user.
945
+ */
946
+ path: string;
947
+ /**
948
+ * Requested route path before locale fallback, when known.
949
+ */
950
+ requestedPath?: string;
951
+ /**
952
+ * Requested public route before locale fallback, when known.
953
+ */
954
+ requestedRoute?: string;
955
+ /**
956
+ * Requested authored ref before locale fallback, when known.
957
+ */
958
+ requestedRef?: string;
959
+ /**
960
+ * Locales that have concrete variants for this content identity.
961
+ */
962
+ availableLocales: string[];
963
+ }
964
+ /**
965
+ * Locale-aware routing metadata attached to route-backed page payloads.
966
+ */
967
+ interface ContentRouteMeta {
968
+ locale: string;
969
+ defaultLocale: string;
970
+ path: string;
971
+ canonicalPath: string;
972
+ variants: ContentLocaleRoute[];
973
+ /**
974
+ * Map of every configured locale to its localized path. Includes a
975
+ * `translated` flag and a `fallback` source when a locale has no variant.
976
+ */
977
+ localePaths: Record<string, LocalePathEntry>;
978
+ /**
979
+ * Public explanation of the locale/path resolution used for this result.
980
+ */
981
+ resolved: ContentResolvedMeta;
982
+ }
983
+ /**
984
+ * Full page payload returned by route-aware unified query helpers and internal route helpers.
985
+ */
986
+ type ContentPageResult<T = ParsedContentMeta> = T & ContentRouteMeta & {
987
+ /**
988
+ * Locale-agnostic path stem derived from the source file.
989
+ */
990
+ stem: string;
991
+ /**
992
+ * Source file extension when it can be inferred.
993
+ */
994
+ extension?: string;
995
+ };
996
+ /**
997
+ * Alternate locale entry used in sitemap output.
998
+ */
999
+ interface ContentSitemapAlternative {
1000
+ hreflang: string;
1001
+ href: string;
1002
+ }
1003
+ /**
1004
+ * Sitemap image entry discovered from page content or metadata.
1005
+ */
1006
+ interface ContentSitemapImage {
1007
+ loc: string;
1008
+ }
1009
+ /**
1010
+ * Sitemap entry produced by `queryCollectionsSitemapEntries`.
1011
+ */
1012
+ interface ContentSitemapEntry {
1013
+ loc: string;
1014
+ _sitemap?: string;
1015
+ alternatives?: ContentSitemapAlternative[];
1016
+ images?: ContentSitemapImage[];
1017
+ }
1018
+ /**
1019
+ * Searchable document section produced by the internal search-section builder.
1020
+ */
1021
+ interface ContentSearchSection {
1022
+ /**
1023
+ * Stable section id, usually the page path or path plus anchor hash.
1024
+ */
1025
+ id: string;
1026
+ /**
1027
+ * Heading or page title for the section.
1028
+ */
1029
+ title: string;
1030
+ /**
1031
+ * Ancestor heading trail leading to this section.
1032
+ */
1033
+ titles: string[];
1034
+ /**
1035
+ * Heading depth that opened the section.
1036
+ */
1037
+ level: number;
1038
+ /**
1039
+ * Flattened text content used by the search index.
1040
+ */
1041
+ content: string;
1042
+ [key: string]: unknown;
1043
+ }
1044
+ interface ContentQueryBuilder<T = ParsedContentMeta> {
1045
+ /**
1046
+ * Filter results with an explicit field/operator/value clause.
1047
+ */
1048
+ where<K extends CollectionQueryField<T>, O extends CollectionQueryOperator<CollectionQueryFieldValue<T, K>>>(field: K, operator: O, value?: CollectionQueryValue<CollectionQueryFieldValue<T, K>, O>): ContentQueryBuilder<T>;
1049
+ /**
1050
+ * Add a grouped AND clause.
1051
+ */
1052
+ andWhere(groupFactory: QueryGroupFunction<T>): ContentQueryBuilder<T>;
1053
+ /**
1054
+ * Add a grouped OR clause.
1055
+ */
1056
+ orWhere(groupFactory: QueryGroupFunction<T>): ContentQueryBuilder<T>;
1057
+ /**
1058
+ * Select a subset of fields.
1059
+ */
1060
+ select<const K extends readonly Extract<keyof T, string>[]>(...fields: K): ContentQueryBuilder<Pick<T, K[number]>>;
1061
+ /**
1062
+ * Order the result set by a field.
1063
+ */
1064
+ order<K extends CollectionQueryField<T>>(field: K, direction: QueryOrderDirection, options?: QueryOrderOptions): ContentQueryBuilder<T>;
1065
+ /**
1066
+ * Limit number of results.
1067
+ */
1068
+ limit(count: number): ContentQueryBuilder<T>;
1069
+ /**
1070
+ * Skip number of results.
1071
+ */
1072
+ skip(count: number): ContentQueryBuilder<T>;
1073
+ /**
1074
+ * Retrieve query builder params.
1075
+ * @internal
1076
+ */
1077
+ params: () => ContentQueryBuilderParams;
1078
+ /**
1079
+ * Filter contents based on locale.
1080
+ */
1081
+ locale(locale: string, options?: {
1082
+ fallback?: boolean | string[];
1083
+ }): ContentQueryBuilder<T>;
1084
+ /**
1085
+ * Fetch list of contents.
1086
+ */
1087
+ all(): Promise<Array<T>>;
1088
+ /**
1089
+ * Fetch the first matched content.
1090
+ */
1091
+ first(): Promise<T | undefined>;
1092
+ /**
1093
+ * Count matched contents.
1094
+ */
1095
+ count(): Promise<number>;
1096
+ }
1097
+ interface CollectionQueryBuilder<T = ParsedContentMeta> extends ContentQueryBuilder<T> {
1098
+ select<const K extends readonly Extract<keyof T, string>[]>(...fields: K): CollectionQueryBuilder<Pick<T, K[number]>>;
1099
+ }
1100
+ /**
1101
+ * Minimal request shape consumed by the query transport.
1102
+ */
1103
+ interface ContentQueryRequest {
1104
+ params(): ContentQueryBuilderParams;
1105
+ }
1106
+ /**
1107
+ * Internal transport used by the immutable query builder.
1108
+ */
1109
+ type ContentQueryFetcher<T> = (query: ContentQueryRequest) => Promise<ContentQueryResponse<T>>;
1110
+ type QueryMatchOperator = (item: unknown, condition: unknown) => boolean;
1111
+ interface ContentCollectionMap {
1112
+ }
1113
+ interface ContentCollectionI18nMap {
1114
+ }
1115
+ type ContentCollectionName = keyof ContentCollectionMap & string;
1116
+ type ContentCollectionItem<K extends ContentCollectionName> = ContentCollectionMap[K];
1117
+ /**
1118
+ * ============================================================================
1119
+ * Unified Query API — public surface (ADR-0016)
1120
+ * ============================================================================
1121
+ *
1122
+ * The types below back the unified query API exposed via `one`, `many`,
1123
+ * `resolveOne`, `variants`, `tree`, `neighbors` and their `useContent*`
1124
+ * composable mirrors. The public vocabulary is deliberately split:
1125
+ *
1126
+ * - `by` identifies exactly one document by route path or authored ref.
1127
+ * - `where` filters a result set by document fields.
1128
+ * - `resolveOne` returns diagnostics; `one` is the ergonomic doc-only view.
1129
+ */
1130
+ /**
1131
+ * MongoDB-style operator object applied to a single field. Mirrors the subset
1132
+ * of `ContentQueryBuilderWhere` operators that are safe for public use.
1133
+ *
1134
+ * @template TValue Concrete field value type (used to narrow operator operands).
1135
+ */
1136
+ interface QueryOperators<TValue = unknown> {
1137
+ $eq?: TValue;
1138
+ $ne?: TValue;
1139
+ $gt?: TValue;
1140
+ $gte?: TValue;
1141
+ $lt?: TValue;
1142
+ $lte?: TValue;
1143
+ $in?: TValue[];
1144
+ $nin?: TValue[];
1145
+ $exists?: boolean;
1146
+ $contains?: TValue | TValue[];
1147
+ $containsAny?: TValue[];
1148
+ $icontains?: string;
1149
+ $type?: 'string' | 'number' | 'boolean' | 'object' | 'undefined';
1150
+ $prefix?: TValue extends string ? string : never;
1151
+ $not?: TValue | QueryOperators<TValue>;
1152
+ }
1153
+ /**
1154
+ * Identify exactly one document. `path` is stored content `_path`, `route` is
1155
+ * public app URL, and `ref` is authored stable identity. They are mutually
1156
+ * exclusive at the type level.
1157
+ */
1158
+ type ContentSelector = {
1159
+ path: string;
1160
+ route?: never;
1161
+ ref?: never;
1162
+ } | {
1163
+ route: string;
1164
+ path?: never;
1165
+ ref?: never;
1166
+ } | {
1167
+ ref: string;
1168
+ path?: never;
1169
+ route?: never;
1170
+ };
1171
+ type WhereValue<T> = T | QueryOperators<T>;
1172
+ type PathWhere = string | QueryOperators<string>;
1173
+ /**
1174
+ * MongoDB-style filter object generic on the document shape. `where.path` is a
1175
+ * documented route-path filter and compiles to the internal `_path` field.
1176
+ */
1177
+ type QueryWhere<T = ParsedContentMeta> = {
1178
+ path?: PathWhere;
1179
+ $and?: QueryWhere<T>[];
1180
+ $or?: QueryWhere<T>[];
1181
+ $not?: QueryWhere<T>;
1182
+ } & {
1183
+ [K in Exclude<keyof T, 'path'>]?: WhereValue<NonNullable<T[K]>>;
1184
+ };
1185
+ /**
1186
+ * Sort spec: `asc` / `desc` are preferred; `1` / `-1` remain accepted because
1187
+ * they map directly to the transport shape.
1188
+ */
1189
+ type SortDirection = 'asc' | 'desc' | 1 | -1;
1190
+ type SortSpec<T = ParsedContentMeta> = string extends keyof T ? {
1191
+ [key: string]: SortDirection | undefined;
1192
+ } : {
1193
+ [K in keyof T]?: SortDirection;
1194
+ };
1195
+ /**
1196
+ * Schema of a collection handle (recovered from its `__schema` phantom).
1197
+ *
1198
+ * Uses `StrictParsedContentMeta` (no `[key: string]: unknown` index signature)
1199
+ * as the base so `keyof HandleSchema<H>` is a finite union of the user's
1200
+ * declared schema fields plus the internal `_*` meta fields. This is what
1201
+ * makes `QueryWhere<HandleSchema<H>>` reject typo'd field names at compile time.
1202
+ */
1203
+ type HandleSchema<H> = H extends {
1204
+ __schema: infer S;
1205
+ } ? S extends {
1206
+ _output: infer O;
1207
+ } ? O & StrictParsedContentMeta : StrictParsedContentMeta : StrictParsedContentMeta;
1208
+ type SelectFields<H> = H extends string ? ReadonlyArray<string> : ReadonlyArray<Extract<keyof HandleSchema<H>, string>>;
1209
+ /**
1210
+ * Runtime document shape inferred from a collection handle.
1211
+ */
1212
+ type DocumentFromHandle<H> = H extends {
1213
+ __schema: {
1214
+ _output: infer O;
1215
+ };
1216
+ } ? O & ParsedContent : ParsedContent;
1217
+ /**
1218
+ * Explicit reference population map. Keys are fields on the source document;
1219
+ * values are target collection handles.
1220
+ */
1221
+ type PopulateSpec = Record<string, ContentCollectionHandle | string>;
1222
+ type PopulatedDocument<T, P> = P extends undefined ? T : P extends PopulateSpec ? string extends keyof P ? T : Omit<T, keyof P> & {
1223
+ [K in keyof P & keyof T]: T[K] extends ReadonlyArray<unknown> ? Array<LocalizedDoc<DocumentFromHandle<P[K]>>> : LocalizedDoc<DocumentFromHandle<P[K]>> | null;
1224
+ } : T;
1225
+ type PopulateFromOptions<O> = O extends {
1226
+ populate?: infer P;
1227
+ } ? P : undefined;
1228
+ type PopulateOption<P extends PopulateSpec | undefined = undefined> = {
1229
+ populate?: P;
1230
+ };
1231
+ /**
1232
+ * Whether a collection handle declares i18n at the type level.
1233
+ */
1234
+ type HandleIsI18n<H> = H extends {
1235
+ __i18n: infer I;
1236
+ } ? I extends true ? true : false : false;
1237
+ /**
1238
+ * Locale option made required when the handle is i18n.
1239
+ */
1240
+ type LocaleOption<H, OptKey extends string = 'locale'> = HandleIsI18n<H> extends true ? {
1241
+ [K in OptKey]: string;
1242
+ } : {
1243
+ [K in OptKey]?: string;
1244
+ };
1245
+ type SourceIsI18n<S> = S extends ReadonlyArray<infer I> ? true extends HandleIsI18n<I> ? true : false : HandleIsI18n<S>;
1246
+ type BacklinksLocaleOption<Target, Source> = HandleIsI18n<Target> extends true ? {
1247
+ locale: string;
1248
+ } : SourceIsI18n<Source> extends true ? {
1249
+ locale: string;
1250
+ } : {
1251
+ locale?: string;
1252
+ };
1253
+ type LocaleFallback = false | true | 'default' | string | string[];
1254
+ /**
1255
+ * Document shape returned from `one`, `many` and `resolveOne`. Every doc carries the
1256
+ * route metadata (`path`, `localePaths`, `locale`, ...) the route resolver
1257
+ * already produces, so locale switching needs no extra round trip.
1258
+ */
1259
+ type LocalizedDoc<T = ParsedContentMeta> = T & ContentRouteMeta & {
1260
+ /**
1261
+ * Locale-agnostic path stem derived from the source file.
1262
+ */
1263
+ stem?: string;
1264
+ /**
1265
+ * Source file extension when it can be inferred.
1266
+ */
1267
+ extension?: string;
1268
+ };
1269
+ /**
1270
+ * Explain how `resolveOne` interpreted the request and what it matched.
1271
+ */
1272
+ interface ResolutionEnvelope {
1273
+ requested: {
1274
+ collection: string;
1275
+ by: ContentSelector;
1276
+ locale?: string;
1277
+ fallback?: LocaleFallback;
1278
+ };
1279
+ normalized: {
1280
+ by: ContentSelector;
1281
+ };
1282
+ matched: {
1283
+ found: boolean;
1284
+ collection: string;
1285
+ path?: string;
1286
+ canonicalPath?: string;
1287
+ ref?: string;
1288
+ locale?: string;
1289
+ };
1290
+ fallback: {
1291
+ used: boolean;
1292
+ locale?: string;
1293
+ };
1294
+ }
1295
+ /**
1296
+ * Result returned by `resolveOne`.
1297
+ */
1298
+ interface ResolveOneResult<T = ParsedContentMeta> {
1299
+ doc: LocalizedDoc<T> | null;
1300
+ explain: ResolutionEnvelope;
1301
+ }
1302
+ /**
1303
+ * Options accepted by `resolveOne(handle, options)` and `one(handle, options)`.
1304
+ */
1305
+ type ResolveOneOptions<H = unknown, P extends PopulateSpec | undefined = undefined> = {
1306
+ by: ContentSelector;
1307
+ fallback?: LocaleFallback;
1308
+ select?: SelectFields<H>;
1309
+ } & LocaleOption<H> & PopulateOption<P>;
1310
+ type OneOptions<H = unknown, P extends PopulateSpec | undefined = undefined> = ResolveOneOptions<H, P>;
1311
+ /**
1312
+ * Options accepted by `many(handle, options)`.
1313
+ */
1314
+ type ManyOptions<H = unknown, P extends PopulateSpec | undefined = undefined> = {
1315
+ where?: QueryWhere<HandleSchema<H>>;
1316
+ sort?: SortSpec<HandleSchema<H>>;
1317
+ limit?: number;
1318
+ skip?: number;
1319
+ fallback?: LocaleFallback;
1320
+ select?: SelectFields<H>;
1321
+ } & LocaleOption<H> & PopulateOption<P>;
1322
+ /**
1323
+ * Options accepted by `paginate(handle, options)`.
1324
+ */
1325
+ type PaginationOptions<H = unknown, P extends PopulateSpec | undefined = undefined> = Omit<ManyOptions<H, P>, 'skip' | 'limit'> & {
1326
+ /**
1327
+ * One-based page number.
1328
+ *
1329
+ * @default 1
1330
+ */
1331
+ page?: number;
1332
+ /**
1333
+ * Number of documents per page.
1334
+ *
1335
+ * @default 10
1336
+ */
1337
+ limit?: number;
1338
+ };
1339
+ /**
1340
+ * Result returned by `paginate()` and `useContentPagination()`.
1341
+ */
1342
+ interface PaginationResult<T = ParsedContentMeta> {
1343
+ data: Array<LocalizedDoc<T>>;
1344
+ page: number;
1345
+ limit: number;
1346
+ total: number;
1347
+ pageCount: number;
1348
+ hasNext: boolean;
1349
+ hasPrev: boolean;
1350
+ nextPage: number | null;
1351
+ prevPage: number | null;
1352
+ }
1353
+ type BacklinkSource = ContentCollectionHandle | string;
1354
+ type SourceName<S> = S extends string ? S : S extends {
1355
+ name: infer N;
1356
+ } ? Extract<N, string> : string;
1357
+ type BacklinkFields<S = BacklinkSource | ReadonlyArray<BacklinkSource>> = ReadonlyArray<string> | Partial<Record<SourceName<S extends ReadonlyArray<infer I> ? I : S>, ReadonlyArray<string>>>;
1358
+ type DocumentFromSource<S> = S extends ReadonlyArray<infer I> ? DocumentFromHandle<I> : DocumentFromHandle<S>;
1359
+ /**
1360
+ * Options accepted by `backlinks(targetHandle, options)`.
1361
+ */
1362
+ type BacklinksOptions<Target = unknown, Source extends BacklinkSource | ReadonlyArray<BacklinkSource> = BacklinkSource | ReadonlyArray<BacklinkSource>, P extends PopulateSpec | undefined = undefined> = {
1363
+ /**
1364
+ * Target document to find incoming references for.
1365
+ */
1366
+ by: ContentSelector;
1367
+ /**
1368
+ * Source collection handle(s) to scan for references.
1369
+ */
1370
+ from: Source;
1371
+ /**
1372
+ * Explicit reference fields on the source collection(s). When omitted,
1373
+ * fields are inferred from source handles that use `reference()`.
1374
+ */
1375
+ fields?: BacklinkFields<Source>;
1376
+ sort?: SortSpec<DocumentFromSource<Source>>;
1377
+ limit?: number;
1378
+ skip?: number;
1379
+ fallback?: LocaleFallback;
1380
+ select?: Source extends string ? ReadonlyArray<string> : ReadonlyArray<Extract<keyof DocumentFromSource<Source>, string>>;
1381
+ } & BacklinksLocaleOption<Target, Source> & PopulateOption<P>;
1382
+ type BacklinksResult<Source extends BacklinkSource | ReadonlyArray<BacklinkSource> = BacklinkSource | ReadonlyArray<BacklinkSource>, P extends PopulateSpec | undefined = undefined> = Array<LocalizedDoc<PopulatedDocument<DocumentFromSource<Source>, P>>>;
1383
+ /**
1384
+ * Options accepted by `variants(handle, options)`.
1385
+ */
1386
+ type VariantsOptions<H = unknown> = {
1387
+ by: ContentSelector;
1388
+ /**
1389
+ * Restrict to a subset of locales. Defaults to all configured locales.
1390
+ */
1391
+ locales?: string[];
1392
+ } & LocaleOption<H>;
1393
+ /**
1394
+ * Variant entry returned by `variants()` and `useContentVariants()`.
1395
+ */
1396
+ interface ContentVariant<_T = ParsedContentMeta> {
1397
+ locale: string;
1398
+ path: string;
1399
+ translated: boolean;
1400
+ fallback?: string;
1401
+ }
1402
+ /**
1403
+ * Options accepted by `tree(handle, options)`.
1404
+ */
1405
+ type TreeOptions<H = unknown, Fields extends ReadonlyArray<keyof HandleSchema<H> | string> | undefined = undefined> = {
1406
+ where?: QueryWhere<HandleSchema<H>>;
1407
+ sort?: SortSpec<HandleSchema<H>>;
1408
+ fields?: Fields;
1409
+ fallback?: LocaleFallback;
1410
+ } & LocaleOption<H>;
1411
+ /**
1412
+ * Typed navigation item. Requested `fields` are preserved in the return type
1413
+ * without keeping the old open index signature.
1414
+ */
1415
+ type ContentTreeItem<T = ParsedContentMeta, Fields extends ReadonlyArray<keyof T | string> | undefined = undefined> = {
1416
+ title: string;
1417
+ path: string;
1418
+ _path?: string;
1419
+ children?: Array<ContentTreeItem<T, Fields>>;
1420
+ } & (Fields extends ReadonlyArray<infer K> ? Pick<T, Extract<K, keyof T>> : Record<never, never>);
1421
+
1422
+ /**
1423
+ * Options accepted by `neighbors(handle, options)`.
1424
+ *
1425
+ * Identifying the anchor document lives in `filter`, same as every other
1426
+ * verb. Only the reserved selectors `path` and `ref` are accepted.
1427
+ */
1428
+ type NeighborsOptions<H = unknown> = {
1429
+ by: ContentSelector;
1430
+ fallback?: LocaleFallback;
1431
+ fields?: SelectFields<H>;
1432
+ } & LocaleOption<H>;
1433
+ /**
1434
+ * Result of `neighbors()` and `useContentNeighbors()`.
1435
+ */
1436
+ interface NeighborsResult<T = ParsedContentMeta> {
1437
+ prev: ContentTreeItem<T> | null;
1438
+ next: ContentTreeItem<T> | null;
1439
+ }
1440
+
1441
+ type ContentSearchEngine = 'minisearch' | 'pagefind' | 'cms';
1442
+ interface ContentMiniSearchOptions {
1443
+ /**
1444
+ * Fields indexed by MiniSearch.
1445
+ *
1446
+ * @default ['title', 'content', 'headings']
1447
+ */
1448
+ fields: string[];
1449
+ /**
1450
+ * Fields copied into search result payloads.
1451
+ *
1452
+ * @default ['path', 'title', 'excerpt', 'anchor', 'locale']
1453
+ */
1454
+ storeFields: string[];
1455
+ /**
1456
+ * Per-field relevance boosts.
1457
+ *
1458
+ * @default { title: 4, headings: 2, content: 1 }
1459
+ */
1460
+ boost: Record<string, number>;
1461
+ /**
1462
+ * MiniSearch fuzzy search setting.
1463
+ *
1464
+ * @default 0.2
1465
+ */
1466
+ fuzzy: number | boolean;
1467
+ /**
1468
+ * Enable prefix matching.
1469
+ *
1470
+ * @default true
1471
+ */
1472
+ prefix: boolean;
1473
+ }
1474
+ interface ContentSearchPublicRuntimeConfig {
1475
+ apiBaseURL: string;
1476
+ indexURL: string;
1477
+ engine: ContentSearchEngine;
1478
+ minisearch: ContentMiniSearchOptions;
1479
+ }
1480
+ interface ContentSearchIndexRecord {
1481
+ id: string;
1482
+ path: string;
1483
+ title: string;
1484
+ excerpt: string;
1485
+ content: string;
1486
+ headings: string[];
1487
+ anchor?: string;
1488
+ locale?: string;
1489
+ [field: string]: unknown;
1490
+ }
1491
+ interface ContentSearchResult {
1492
+ path: string;
1493
+ title: string;
1494
+ excerpt: string;
1495
+ score: number;
1496
+ anchor?: string;
1497
+ locale?: string;
1498
+ [field: string]: unknown;
1499
+ }
1500
+ interface ContentProviderSearchRequest {
1501
+ term: string;
1502
+ locale?: string;
1503
+ collections?: string[];
1504
+ }
1505
+
1506
+ type MountOptions = {
1507
+ driver: 'fs' | 'http' | string;
1508
+ name?: string;
1509
+ prefix?: string;
1510
+ [options: string]: unknown;
1511
+ };
1512
+ interface ContentI18nOptions {
1513
+ /**
1514
+ * Enable locale-aware content behavior.
1515
+ *
1516
+ * `true` means "detect from Nuxt I18n and/or content.config".
1517
+ *
1518
+ * @default true
1519
+ */
1520
+ enabled?: boolean;
1521
+ /**
1522
+ * List of locale codes used by content.
1523
+ *
1524
+ * @default []
1525
+ */
1526
+ locales?: string[];
1527
+ /**
1528
+ * Default locale for top level contents.
1529
+ *
1530
+ * @default undefined
1531
+ */
1532
+ defaultLocale?: string;
1533
+ /**
1534
+ * Ordered locale fallback chains keyed by locale code.
1535
+ *
1536
+ * @default {}
1537
+ */
1538
+ fallback?: Record<string, string[]>;
1539
+ /**
1540
+ * Use numeric prefixes as the canonical cross-locale identity source.
1541
+ *
1542
+ * Example:
1543
+ * `en/1.guide/1.getting-started.md` and `de/1.leitfaden/1.erste-schritte.md`
1544
+ * share the same canonical key `1/1`.
1545
+ *
1546
+ * This is intentionally opt-in.
1547
+ *
1548
+ * @default false
1549
+ */
1550
+ translatedSlugs?: boolean;
1551
+ /**
1552
+ * Treat translated-slug warnings as build/runtime validation errors.
1553
+ *
1554
+ * @default false
1555
+ */
1556
+ strictTranslatedSlugs?: boolean;
1557
+ }
1558
+ interface ContentSitemapOptions {
1559
+ /**
1560
+ * Route suffix appended to `content.api.baseURL`.
1561
+ *
1562
+ * @default '/sitemap'
1563
+ */
1564
+ path?: string;
1565
+ /**
1566
+ * Collections to include in the generated content sitemap source.
1567
+ *
1568
+ * When omitted, all configured collections are considered.
1569
+ *
1570
+ * @default undefined
1571
+ */
1572
+ include?: string[];
1573
+ /**
1574
+ * Collections to exclude from the generated content sitemap source.
1575
+ *
1576
+ * @default []
1577
+ */
1578
+ exclude?: string[];
1579
+ /**
1580
+ * Include draft content in sitemap entries.
1581
+ *
1582
+ * Production default is `false`.
1583
+ * Development remains permissive for easier debugging.
1584
+ *
1585
+ * @default undefined
1586
+ */
1587
+ includeDrafts?: boolean;
1588
+ /**
1589
+ * Optional build-time validation for generated sitemap output.
1590
+ *
1591
+ * This is intended as a release-safety check for content-heavy sites where
1592
+ * shipping an empty docs/blog sitemap is a production failure.
1593
+ *
1594
+ * @default disabled
1595
+ */
1596
+ assert?: ContentSitemapAssertOptions;
1597
+ }
1598
+ interface ContentSitemapAssertSitemapOptions {
1599
+ /**
1600
+ * Allow this sitemap to contain zero URLs.
1601
+ *
1602
+ * When `true`, URL count assertions are skipped for this sitemap.
1603
+ *
1604
+ * @default inherits global `allowEmpty`
1605
+ */
1606
+ allowEmpty?: boolean;
1607
+ /**
1608
+ * Minimum number of URLs required for this sitemap.
1609
+ *
1610
+ * @default inherits global `minUrlsPerSitemap`
1611
+ */
1612
+ minUrls?: number;
1613
+ /**
1614
+ * Require at least one image entry in this sitemap.
1615
+ *
1616
+ * @default inherits global `requireImages`
1617
+ */
1618
+ requireImages?: boolean;
1619
+ }
1620
+ interface ContentSitemapAssertOptions {
1621
+ /**
1622
+ * Enable sitemap artifact assertions.
1623
+ *
1624
+ * @default false
1625
+ */
1626
+ enabled?: boolean;
1627
+ /**
1628
+ * Which build path should enforce assertions.
1629
+ *
1630
+ * `generate` maps to static generation, `build` maps to non-static builds,
1631
+ * and `both` enables both paths.
1632
+ *
1633
+ * @default 'generate'
1634
+ */
1635
+ mode?: 'generate' | 'build' | 'both';
1636
+ /**
1637
+ * Allow discovered sitemap files to contain zero URLs.
1638
+ *
1639
+ * @default false
1640
+ */
1641
+ allowEmpty?: boolean;
1642
+ /**
1643
+ * Minimum number of URLs required in each discovered sitemap.
1644
+ *
1645
+ * @default 1
1646
+ */
1647
+ minUrlsPerSitemap?: number;
1648
+ /**
1649
+ * Require at least one image entry in each discovered sitemap.
1650
+ *
1651
+ * @default false
1652
+ */
1653
+ requireImages?: boolean;
1654
+ /**
1655
+ * Collections that must contribute at least one route to the content sitemap.
1656
+ *
1657
+ * This is preferred over hardcoded URL checks because it asserts the real
1658
+ * content invariant rather than a single route sample.
1659
+ *
1660
+ * @default []
1661
+ */
1662
+ requiredCollections?: string[];
1663
+ /**
1664
+ * Optional per-sitemap overrides keyed by sitemap name, for example `en-US`.
1665
+ *
1666
+ * @default {}
1667
+ */
1668
+ sitemaps?: Record<string, ContentSitemapAssertSitemapOptions>;
1669
+ }
1670
+ interface ContentSearchOptions {
1671
+ /**
1672
+ * Base route used for the built-in search api.
1673
+ *
1674
+ * Defaults to `${content.api.baseURL}/search`.
1675
+ */
1676
+ apiBaseURL?: string;
1677
+ /**
1678
+ * Search engine used by `useContentSearchResults`.
1679
+ *
1680
+ * @default 'minisearch'
1681
+ */
1682
+ engine?: ContentSearchEngine;
1683
+ /**
1684
+ * HTML tags ignored when flattening rich content into search text.
1685
+ *
1686
+ * @default ['script', 'style', 'pre']
1687
+ */
1688
+ ignoredTags?: string[];
1689
+ /**
1690
+ * Query predicate applied before records are indexed.
1691
+ *
1692
+ * @default { _draft: false, _partial: false }
1693
+ */
1694
+ filterQuery?: ContentQueryBuilderWhere;
1695
+ /**
1696
+ * Collections included in the built-in index.
1697
+ *
1698
+ * When omitted, all configured collections are indexed.
1699
+ */
1700
+ collections?: string[];
1701
+ /**
1702
+ * Extra top-level document fields copied into each generated search record.
1703
+ *
1704
+ * Use this when `minisearch.fields`, `minisearch.storeFields`, or
1705
+ * `minisearch.boost` refer to frontmatter fields such as `tags`.
1706
+ *
1707
+ * @default []
1708
+ */
1709
+ extraFields?: string[];
1710
+ /**
1711
+ * MiniSearch index and ranking options.
1712
+ */
1713
+ minisearch?: Partial<ContentMiniSearchOptions>;
1714
+ }
1715
+ interface ContentPreviewOptions {
1716
+ /**
1717
+ * Server-side token required before preview storage can be read.
1718
+ */
1719
+ token?: string;
1720
+ }
1721
+ interface ContentRevalidateOptions {
1722
+ /**
1723
+ * Server-side token required before the built-in revalidation endpoint accepts
1724
+ * tag/path invalidation requests.
1725
+ */
1726
+ token: string;
1727
+ /**
1728
+ * Allow token-only revalidation requests without HMAC headers.
1729
+ *
1730
+ * This is intended for local/dev compatibility only. Production CMS delivery
1731
+ * should leave this disabled so requests are timestamped and signed.
1732
+ *
1733
+ * @default false
1734
+ */
1735
+ allowUnsigned?: boolean;
1736
+ }
1737
+ interface ModuleOptions {
1738
+ api: {
1739
+ /**
1740
+ * Base route that will be used for content api
1741
+ *
1742
+ * @default '/api/_content'
1743
+ */
1744
+ baseURL: string;
1745
+ };
1746
+ /**
1747
+ * Locale-aware content behavior.
1748
+ */
1749
+ i18n: boolean | ContentI18nOptions;
1750
+ /**
1751
+ * Content-owned sitemap source configuration for Nuxt SEO.
1752
+ *
1753
+ * When enabled, Ginko exposes a JSON endpoint that can be consumed by
1754
+ * `@nuxtjs/sitemap` through `sitemap.sources`.
1755
+ */
1756
+ sitemap: boolean | ContentSitemapOptions;
1757
+ /**
1758
+ * Built-in full-text search configuration.
1759
+ *
1760
+ * When enabled, Ginko exposes JSON/Pagefind search endpoints under
1761
+ * the content api base route. Import `useContentSearchResults()` from
1762
+ * `@lupinum/ginko-content/client` to consume them from app components.
1763
+ */
1764
+ search: false | ContentSearchOptions;
1765
+ /**
1766
+ * Preview storage access configuration.
1767
+ *
1768
+ * Preview mode is disabled unless a token is configured and the incoming
1769
+ * preview token matches it.
1770
+ */
1771
+ preview?: false | ContentPreviewOptions;
1772
+ /**
1773
+ * Built-in cache revalidation endpoint configuration.
1774
+ *
1775
+ * When a token is configured, callers must send it as
1776
+ * `x-ginko-revalidate-token` or `authorization: Bearer <token>`.
1777
+ */
1778
+ revalidate?: false | ContentRevalidateOptions;
1779
+ /**
1780
+ * Optional server-side cache adapter module.
1781
+ *
1782
+ * The module must default-export a `ContentCacheAdapter`, or export one as
1783
+ * `contentCacheAdapter` or `cacheAdapter`.
1784
+ */
1785
+ cache?: false | string;
1786
+ /**
1787
+ * Disable content watcher and hot content reload.
1788
+ * Note: Watcher is a development feature and will not includes in the production.
1789
+ *
1790
+ * @default true
1791
+ */
1792
+ watch: false | {
1793
+ ws: Partial<ListenOptions>;
1794
+ };
1795
+ /**
1796
+ * Contents can be located in multiple places, in multiple directories or even in remote git repositories.
1797
+ * Using sources option you can tell Content module where to look for contents.
1798
+ *
1799
+ * @default ['content']
1800
+ */
1801
+ sources: Record<string, MountOptions>;
1802
+ /**
1803
+ * List of ignore patterns that will be used to exclude content from parsing, rendering and watching.
1804
+ *
1805
+ * Note that files with a leading . or - are ignored by default
1806
+ *
1807
+ * @default []
1808
+ */
1809
+ ignores: Array<string>;
1810
+ /**
1811
+ * Content module uses Comark under the hood to parse markdown files.
1812
+ */
1813
+ markdown: {
1814
+ /**
1815
+ * Tags will be used to replace markdown components and render custom components instead of default ones.
1816
+ *
1817
+ * @default {}
1818
+ */
1819
+ tags?: Record<string, string>;
1820
+ /**
1821
+ * Ordered list of Comark plugin descriptors.
1822
+ *
1823
+ * @default []
1824
+ */
1825
+ plugins?: MarkdownPluginDescriptor[];
1826
+ /**
1827
+ * Anchor link generation config
1828
+ *
1829
+ * @default {}
1830
+ */
1831
+ anchorLinks?: boolean | {
1832
+ /**
1833
+ * Sets the maximal depth for anchor link generation
1834
+ *
1835
+ * @default 4
1836
+ */
1837
+ depth?: number;
1838
+ /**
1839
+ * Excludes headings from link generation when they are in the depth range.
1840
+ *
1841
+ * @default [1]
1842
+ */
1843
+ exclude?: number[];
1844
+ };
1845
+ /**
1846
+ * Markdown image renderer.
1847
+ *
1848
+ * `auto` uses Nuxt Image when `<NuxtImg>` is available and otherwise
1849
+ * falls back to a native `<img>`.
1850
+ *
1851
+ * @default 'auto'
1852
+ */
1853
+ image?: 'auto' | 'img' | 'nuxt-image';
1854
+ };
1855
+ /**
1856
+ * Options for yaml parser.
1857
+ *
1858
+ * @default {}
1859
+ */
1860
+ yaml: false | Record<string, unknown>;
1861
+ /**
1862
+ * Options for yaml parser.
1863
+ *
1864
+ * @default {}
1865
+ */
1866
+ csv: false | {
1867
+ json?: boolean;
1868
+ delimiter?: string;
1869
+ };
1870
+ /**
1871
+ * Enable/Disable navigation.
1872
+ *
1873
+ * @default {}
1874
+ */
1875
+ navigation: false | {
1876
+ fields: Array<string>;
1877
+ };
1878
+ /**
1879
+ * Typed collection definitions loaded from `content.config.*`.
1880
+ *
1881
+ * Globs are relative to the content source root.
1882
+ *
1883
+ * @default {}
1884
+ */
1885
+ collections?: Record<string, ContentCollectionConfig>;
1886
+ /**
1887
+ * Backing implementation for public content reads.
1888
+ *
1889
+ * `filesystem` is the default. `cms`, `ginko-cms`, and `ginko` resolve to the
1890
+ * official Ginko CMS provider when `@lupinum/ginko-cms` is installed.
1891
+ */
1892
+ provider?: ContentProviderName;
1893
+ /**
1894
+ * External provider modules keyed by provider name.
1895
+ */
1896
+ providers?: Record<string, string>;
1897
+ /**
1898
+ * Enable automatic usage of `useContentHead`
1899
+ *
1900
+ * @default true
1901
+ */
1902
+ contentHead?: boolean;
1903
+ /**
1904
+ * Enable to keep uppercase characters in the generated routes.
1905
+ *
1906
+ * @default false
1907
+ */
1908
+ respectPathCase: boolean;
1909
+ experimental: {
1910
+ stripQueryParameters?: boolean;
1911
+ };
1912
+ }
1913
+ interface ResolvedContentI18nOptions {
1914
+ locales: string[];
1915
+ defaultLocale?: string;
1916
+ fallback: Record<string, string[]>;
1917
+ translatedSlugs: boolean;
1918
+ strictTranslatedSlugs: boolean;
1919
+ }
1920
+ interface ContentContext extends ModuleOptions {
1921
+ transformers: Array<string>;
1922
+ sitemap: false | ContentSitemapOptions;
1923
+ locales: string[];
1924
+ defaultLocale?: string;
1925
+ localeFallback: Record<string, string[]>;
1926
+ translatedSlugs: boolean;
1927
+ strictTranslatedSlugs: boolean;
1928
+ }
1929
+
1930
+ interface ContentCacheArtifact<T = ParsedContent> {
1931
+ parsed: T;
1932
+ hash: string;
1933
+ }
1934
+ interface ManifestVariant {
1935
+ canonicalKey: string;
1936
+ contentId: string;
1937
+ locale: string;
1938
+ path?: string;
1939
+ }
1940
+ interface ContentManifest {
1941
+ byCanonical: Record<string, Record<string, ManifestVariant>>;
1942
+ byRef: Record<string, string>;
1943
+ byRoute: Record<string, string>;
1944
+ paths: Record<string, string[]>;
1945
+ collections: Record<string, string[]>;
1946
+ }
1947
+ interface ResolvedVariant extends ManifestVariant {
1948
+ requestedLocale?: string;
1949
+ resolvedLocale?: string;
1950
+ fallback: boolean;
1951
+ availableLocales: string[];
1952
+ }
1953
+ interface ParseContentOptions {
1954
+ validate?: boolean;
1955
+ csv?: ModuleOptions['csv'];
1956
+ yaml?: ModuleOptions['yaml'];
1957
+ markdown?: ModuleOptions['markdown'];
1958
+ transformers?: ContentTransformer[];
1959
+ pathMeta?: {
1960
+ locales?: ContentContext['locales'];
1961
+ defaultLocale?: ContentContext['defaultLocale'];
1962
+ translatedSlugs?: ContentContext['translatedSlugs'];
1963
+ respectPathCase?: ModuleOptions['respectPathCase'];
1964
+ collections?: Record<string, ContentCollectionConfig>;
1965
+ collectionResolver?: (file: string) => string | undefined;
1966
+ };
1967
+ [key: string]: unknown;
1968
+ }
1969
+ type TransformContentSource = string | StorageValue;
1970
+
1971
+ declare function createSearchRuntimeConfig(search: Exclude<ModuleOptions$1['search'], false>, apiBaseURL: string): ContentSearchPublicRuntimeConfig$1;
1972
+
1973
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions$1, ModuleOptions$1, false>;
1974
+
1975
+ interface ModuleHooks {
1976
+ 'content:context'(ctx: ContentContext$1): void;
1977
+ }
1978
+ interface ModulePublicRuntimeConfig {
1979
+ experimental: {
1980
+ stripQueryParameters: boolean;
1981
+ };
1982
+ api: {
1983
+ baseURL: string;
1984
+ };
1985
+ sitemap: {
1986
+ path: string;
1987
+ include?: string[];
1988
+ exclude?: string[];
1989
+ includeDrafts?: boolean;
1990
+ } | false;
1991
+ integrity: number | undefined;
1992
+ respectPathCase: boolean;
1993
+ defaultLocale: ContentContext$1['defaultLocale'];
1994
+ locales: ContentContext$1['locales'];
1995
+ provider: ContentContext$1['provider'];
1996
+ providers: ContentContext$1['providers'];
1997
+ collections: Record<string, {
1998
+ source: ContentCollectionConfig$1['source'];
1999
+ exclude?: ContentCollectionConfig$1['exclude'];
2000
+ strict: boolean;
2001
+ i18n?: ContentCollectionI18nConfig$1;
2002
+ sitemap?: boolean;
2003
+ }>;
2004
+ localeFallback: ContentContext$1['localeFallback'];
2005
+ translatedSlugs: ContentContext$1['translatedSlugs'];
2006
+ strictTranslatedSlugs: ContentContext$1['strictTranslatedSlugs'];
2007
+ markdown: MarkdownOptions$1;
2008
+ wsUrl?: string;
2009
+ navigation: ModuleOptions$1['navigation'];
2010
+ search: ReturnType<typeof createSearchRuntimeConfig> | false;
2011
+ contentHead: ModuleOptions$1['contentHead'];
2012
+ }
2013
+ interface ModulePrivateRuntimeConfig {
2014
+ /**
2015
+ * Internal version that represents cache format.
2016
+ * This is used to invalidate cache when the format changes.
2017
+ */
2018
+ cacheVersion: string;
2019
+ cacheIntegrity: string;
2020
+ revalidate?: false | ContentRevalidateOptions$1;
2021
+ }
2022
+ declare module '@nuxt/schema' {
2023
+ interface NuxtHooks {
2024
+ 'content:context': (ctx: ContentContext$1) => void | Promise<void>;
2025
+ }
2026
+ interface PublicRuntimeConfig {
2027
+ content: ModulePublicRuntimeConfig;
2028
+ }
2029
+ interface PrivateRuntimeConfig {
2030
+ content: ModulePrivateRuntimeConfig & ContentContext$1;
2031
+ }
2032
+ }
2033
+ declare module 'nitropack' {
2034
+ interface NitroRuntimeHooks {
2035
+ 'content:file:beforeParse': (file: {
2036
+ _id: string;
2037
+ body: StorageValue;
2038
+ }) => void;
2039
+ 'content:file:afterParse': (file: ParsedContent$1) => void;
2040
+ }
2041
+ }
2042
+
2043
+ export { _default as default };
2044
+ export type { BacklinkFields, BacklinkSource, BacklinksOptions, BacklinksResult, BuiltinContentProviderName, CollectionQueryBuilder, CollectionQueryOperator, CollectionQueryValue, CollectionSchema, ContentCacheArtifact, ContentCmsCollectionConfig, ContentCmsFieldConfig, ContentCmsFieldType, ContentCmsRelationConfig, ContentCollectionConfig, ContentCollectionHandle, ContentCollectionI18nConfig, ContentCollectionI18nMap, ContentCollectionItem, ContentCollectionItemSurroundingsOptions, ContentCollectionKind, ContentCollectionMap, ContentCollectionName, ContentCollectionNavigationOptions, ContentCollectionPageOptions, ContentCollectionRouteConfig, ContentCollectionRouteMetaOptions, ContentCollectionSearchSectionsOptions, ContentCollectionSource, ContentCollectionSourceObject, ContentConfig, ContentContext, ContentI18nOptions, ContentLocaleEntry, ContentLocaleRoute, ContentManifest, ContentMiniSearchOptions, ContentNavigationItem, ContentPageResult, ContentPreviewOptions, ContentProviderName, ContentProviderSearchRequest, ContentQueryBuilder, ContentQueryBuilderParams, ContentQueryBuilderWhere, ContentQueryFetcher, ContentQueryRequest, ContentQuerySortFields, ContentQuerySortOptions, ContentQuerySortParams, ContentReferenceSchema, ContentResolvedMeta, ContentRevalidateOptions, ContentRouteMeta, ContentSearchEngine, ContentSearchIndexRecord, ContentSearchOptions, ContentSearchPublicRuntimeConfig, ContentSearchResult, ContentSearchSection, ContentSelector, ContentSeoImage, ContentSeoMeta, ContentSitemapAlternative, ContentSitemapAssertOptions, ContentSitemapAssertSitemapOptions, ContentSitemapEntry, ContentSitemapImage, ContentSitemapOptions, ContentTransformer, ContentTreeItem, ContentVariant, DefineCollectionObject, DefineCollectionOptions, DocumentFromHandle, LocaleFallback, LocalePathEntry, LocalizedDoc, ManifestVariant, ManyOptions, MarkdownNode, MarkdownOptions, MarkdownParsedContent, MarkdownPluginDescriptor, MarkdownPluginOptions, MarkdownRoot, ModuleHooks, ModuleOptions, MountOptions, NavItem, NeighborsOptions, NeighborsResult, OneOptions, PaginationOptions, PaginationResult, ParseContentOptions, ParsedContent, ParsedContentInternalMeta, ParsedContentMeta, PopulateFromOptions, PopulateSpec, PopulatedDocument, QueryGroupBuilder, QueryGroupFunction, QueryMatchOperator, QueryOperators, QueryOrderDirection, QueryOrderOptions, QueryWhere, ResolutionEnvelope, ResolveContentReferenceOptions, ResolveOneOptions, ResolveOneResult, ResolvedContentI18nOptions, ResolvedMarkdownPlugin, ResolvedVariant, SortDirection, SortSpec, StrictParsedContent, StrictParsedContentMeta, Toc, TocLink, TransformContentOptions, TransformContentSource, TreeOptions, VariantsOptions };