blume 2.1.3 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (377) hide show
  1. package/AGENTS.md +1 -1
  2. package/CHANGELOG.md +126 -0
  3. package/README.md +4 -4
  4. package/dist/cli/{chunk-74wfhv79.js → chunk-05f21r8h.js} +1 -1
  5. package/dist/cli/{chunk-9qzgg6mj.js → chunk-1cm0h819.js} +3 -3
  6. package/dist/cli/{chunk-nbyvgnnm.js → chunk-1rkxzg3n.js} +104 -47
  7. package/dist/cli/chunk-1rkxzg3n.js.map +36 -0
  8. package/dist/cli/{chunk-desvm72z.js → chunk-2nr29y95.js} +22 -26
  9. package/dist/cli/chunk-2nr29y95.js.map +13 -0
  10. package/dist/cli/{chunk-32khwcb6.js → chunk-49r370mb.js} +42 -69
  11. package/dist/cli/{chunk-32khwcb6.js.map → chunk-49r370mb.js.map} +9 -10
  12. package/dist/cli/{chunk-ms9z66nz.js → chunk-4rftmttv.js} +2 -2
  13. package/dist/cli/{chunk-s0bdnc7v.js → chunk-79bzzkx4.js} +5 -4
  14. package/dist/cli/chunk-79bzzkx4.js.map +10 -0
  15. package/dist/cli/{chunk-hvcxng5f.js → chunk-7tekknev.js} +6 -6
  16. package/dist/cli/{chunk-dv2z0rzf.js → chunk-8b489v1b.js} +38 -13
  17. package/dist/cli/{chunk-dv2z0rzf.js.map → chunk-8b489v1b.js.map} +5 -4
  18. package/dist/cli/{chunk-0pmb4tr4.js → chunk-8f8xw4x2.js} +1195 -222
  19. package/dist/cli/chunk-8f8xw4x2.js.map +44 -0
  20. package/dist/cli/chunk-96snx8yy.js +329 -0
  21. package/dist/cli/chunk-96snx8yy.js.map +13 -0
  22. package/dist/cli/{chunk-ckrcm08h.js → chunk-a3ydrqny.js} +48 -62
  23. package/dist/cli/{chunk-ckrcm08h.js.map → chunk-a3ydrqny.js.map} +4 -5
  24. package/dist/cli/{chunk-bxwhtvw8.js → chunk-ahc5gc9h.js} +5 -5
  25. package/dist/cli/{chunk-dpy8qdjf.js → chunk-as09pafp.js} +73 -182
  26. package/dist/cli/chunk-as09pafp.js.map +18 -0
  27. package/dist/cli/{chunk-tfycddbt.js → chunk-bjk964fp.js} +2 -2
  28. package/dist/cli/{chunk-gfc5fqvf.js → chunk-br0n8n3e.js} +18 -18
  29. package/dist/cli/{chunk-gfc5fqvf.js.map → chunk-br0n8n3e.js.map} +1 -1
  30. package/dist/cli/{chunk-297ajdcv.js → chunk-c69tw29j.js} +6 -6
  31. package/dist/cli/{chunk-297ajdcv.js.map → chunk-c69tw29j.js.map} +3 -3
  32. package/dist/cli/chunk-cn3dy3hz.js +146 -0
  33. package/dist/cli/chunk-cn3dy3hz.js.map +11 -0
  34. package/dist/cli/{chunk-124fvmzq.js → chunk-dm4mg9bj.js} +11064 -8742
  35. package/dist/cli/{chunk-124fvmzq.js.map → chunk-dm4mg9bj.js.map} +78 -64
  36. package/dist/cli/{chunk-dqhg54mr.js → chunk-dmx6cezx.js} +1 -1
  37. package/dist/cli/{chunk-60hz265r.js → chunk-dpcahcrb.js} +24 -11
  38. package/dist/cli/chunk-dpcahcrb.js.map +10 -0
  39. package/dist/cli/{chunk-a57yh0h9.js → chunk-dyk3r7jw.js} +7 -7
  40. package/dist/cli/{chunk-a57yh0h9.js.map → chunk-dyk3r7jw.js.map} +1 -1
  41. package/dist/cli/{chunk-twy7psdz.js → chunk-enk76qd5.js} +14 -10
  42. package/dist/cli/chunk-enk76qd5.js.map +10 -0
  43. package/dist/cli/{chunk-k3gr1nm9.js → chunk-fqy4n3q2.js} +13 -16
  44. package/dist/cli/{chunk-k3gr1nm9.js.map → chunk-fqy4n3q2.js.map} +3 -3
  45. package/dist/cli/{chunk-sc93apfs.js → chunk-frk2wdq1.js} +17 -17
  46. package/dist/cli/{chunk-sc93apfs.js.map → chunk-frk2wdq1.js.map} +2 -2
  47. package/dist/cli/{chunk-kdpzw38a.js → chunk-gprwej7h.js} +95 -7
  48. package/dist/cli/chunk-gprwej7h.js.map +11 -0
  49. package/dist/cli/chunk-kkrteb15.js +157 -0
  50. package/dist/cli/chunk-kkrteb15.js.map +10 -0
  51. package/dist/cli/{chunk-ave1wcbr.js → chunk-m9bp2hc1.js} +1 -1
  52. package/dist/cli/{chunk-58bt3hag.js → chunk-mrvh4c88.js} +4 -4
  53. package/dist/cli/{chunk-5cmts6dv.js → chunk-p8zg3a2h.js} +7 -7
  54. package/dist/cli/{chunk-5cmts6dv.js.map → chunk-p8zg3a2h.js.map} +1 -1
  55. package/dist/cli/{chunk-0w6hs479.js → chunk-rkqae7kh.js} +30 -18
  56. package/dist/cli/chunk-rkqae7kh.js.map +10 -0
  57. package/dist/cli/{chunk-bqxaqn5p.js → chunk-t5xx74rd.js} +8 -8
  58. package/dist/cli/{chunk-bqxaqn5p.js.map → chunk-t5xx74rd.js.map} +1 -1
  59. package/dist/cli/{chunk-1f882900.js → chunk-th0pgaj5.js} +2 -2
  60. package/dist/cli/{chunk-dhwtqnnd.js → chunk-vnbvhgmd.js} +2 -2
  61. package/dist/cli/{chunk-gxtg6ed2.js → chunk-vzy9rh6y.js} +21 -21
  62. package/dist/cli/{chunk-gxtg6ed2.js.map → chunk-vzy9rh6y.js.map} +3 -3
  63. package/dist/cli/{chunk-j1x92mx9.js → chunk-w6e455pz.js} +1 -1
  64. package/dist/cli/chunk-wehv26ry.js +155 -0
  65. package/dist/cli/chunk-wehv26ry.js.map +11 -0
  66. package/dist/cli/{chunk-y4msrwm9.js → chunk-xgq4eytj.js} +15 -15
  67. package/dist/cli/{chunk-36bxs9c7.js → chunk-xt0qvz1t.js} +27 -23
  68. package/dist/cli/chunk-xt0qvz1t.js.map +10 -0
  69. package/dist/cli/index.js +78 -42
  70. package/dist/cli/index.js.map +7 -6
  71. package/dist/types/ai/changelog-components.d.ts +18 -0
  72. package/dist/types/ai/changelog-markdown.d.ts +12 -0
  73. package/dist/types/ai/openapi-components.d.ts +7 -7
  74. package/dist/types/ai/operation-details.d.ts +39 -0
  75. package/dist/types/ai/relative-links.d.ts +3 -1
  76. package/dist/types/ai/serializers.d.ts +6 -4
  77. package/dist/types/analytics/head.d.ts +4 -2
  78. package/dist/types/analytics/script.d.ts +8 -2
  79. package/dist/types/components/content/youtube.d.ts +20 -0
  80. package/dist/types/components/layout/nav-utils.d.ts +8 -0
  81. package/dist/types/components/openapi/example-panels.d.ts +33 -0
  82. package/dist/types/components/openapi/helpers.d.ts +53 -11
  83. package/dist/types/components/openapi/snippets.d.ts +7 -1
  84. package/dist/types/core/alert-diagnostics.d.ts +10 -0
  85. package/dist/types/core/builtin-tags.d.ts +16 -0
  86. package/dist/types/core/changelog-list.d.ts +48 -0
  87. package/dist/types/core/closest-match.d.ts +6 -0
  88. package/dist/types/core/code-fence-diagnostics.d.ts +18 -0
  89. package/dist/types/core/code-fences.d.ts +8 -1
  90. package/dist/types/core/config-input.d.ts +1 -1
  91. package/dist/types/core/content-assets.d.ts +16 -18
  92. package/dist/types/core/diagnostics.d.ts +14 -0
  93. package/dist/types/core/directive-diagnostics.d.ts +22 -8
  94. package/dist/types/core/former-routes.d.ts +14 -0
  95. package/dist/types/core/github.d.ts +5 -4
  96. package/dist/types/core/heading-markers.d.ts +65 -2
  97. package/dist/types/core/hidden-pages.d.ts +3 -0
  98. package/dist/types/core/includes.d.ts +23 -0
  99. package/dist/types/core/last-modified.d.ts +18 -6
  100. package/dist/types/core/links.d.ts +42 -2
  101. package/dist/types/core/load-module.d.ts +19 -4
  102. package/dist/types/core/manifest.d.ts +14 -1
  103. package/dist/types/core/markdown-mirrors.d.ts +22 -0
  104. package/dist/types/core/mdx-elements.d.ts +32 -0
  105. package/dist/types/core/mdx-syntax.d.ts +100 -0
  106. package/dist/types/core/meta-diagnostics.d.ts +7 -0
  107. package/dist/types/core/meta.d.ts +32 -5
  108. package/dist/types/core/nav-diagnostics.d.ts +9 -2
  109. package/dist/types/core/navigation.d.ts +13 -0
  110. package/dist/types/core/ordering-prefix.d.ts +6 -0
  111. package/dist/types/core/pinned-ids.d.ts +23 -0
  112. package/dist/types/core/project-graph.d.ts +9 -1
  113. package/dist/types/core/redirect-patterns.d.ts +18 -0
  114. package/dist/types/core/relative-files.d.ts +31 -0
  115. package/dist/types/core/schema.d.ts +267 -7
  116. package/dist/types/core/sources/normalize.d.ts +101 -9
  117. package/dist/types/core/sources/types.d.ts +16 -0
  118. package/dist/types/core/static-files.d.ts +10 -0
  119. package/dist/types/core/static-host.d.ts +42 -0
  120. package/dist/types/core/svg-images.d.ts +26 -0
  121. package/dist/types/core/syntax-diagnostics.d.ts +14 -0
  122. package/dist/types/core/types.d.ts +42 -1
  123. package/dist/types/deploy/generated-files.d.ts +41 -0
  124. package/dist/types/deploy/redirects.d.ts +21 -7
  125. package/dist/types/markdown/code-title.d.ts +9 -5
  126. package/dist/types/markdown/directives.d.ts +8 -0
  127. package/dist/types/markdown/fence-language.d.ts +51 -0
  128. package/dist/types/markdown/fence-meta.d.ts +5 -0
  129. package/dist/types/markdown/github-alerts.d.ts +35 -0
  130. package/dist/types/openapi/asyncapi.d.ts +6 -5
  131. package/dist/types/openapi/checks.d.ts +10 -5
  132. package/dist/types/openapi/model.d.ts +55 -8
  133. package/dist/types/openapi/parse.d.ts +4 -1
  134. package/dist/types/sources/filesystem.d.ts +14 -4
  135. package/dist/types/sources/mdx-remote.d.ts +6 -3
  136. package/dist/types/sources/registry.d.ts +3 -3
  137. package/dist/types/theme/color.d.ts +33 -0
  138. package/dist/types/theme/palette.d.ts +122 -0
  139. package/docs/01-quickstart.mdx +1 -1
  140. package/docs/02-deployment.mdx +23 -8
  141. package/docs/04-migrating.mdx +16 -4
  142. package/docs/advanced/changelog.mdx +27 -1
  143. package/docs/advanced/skills.mdx +1 -1
  144. package/docs/cli/audit.mdx +1 -1
  145. package/docs/cli/doctor.mdx +2 -2
  146. package/docs/cli/evals.mdx +1 -1
  147. package/docs/cli/index.mdx +4 -2
  148. package/docs/cli/validate.mdx +10 -7
  149. package/docs/configuration/analytics.mdx +2 -0
  150. package/docs/configuration/customization.mdx +3 -1
  151. package/docs/configuration/index.mdx +2 -2
  152. package/docs/configuration/theming.mdx +5 -1
  153. package/docs/content/components.mdx +26 -6
  154. package/docs/content/frontmatter.mdx +1 -1
  155. package/docs/content/includes.mdx +6 -2
  156. package/docs/content/index.mdx +11 -1
  157. package/docs/content/islands.mdx +2 -0
  158. package/docs/content/meta.mdx +9 -3
  159. package/docs/content/navigation.mdx +14 -6
  160. package/docs/content/sources/obsidian.mdx +1 -1
  161. package/docs/content/sources/remote-mdx.mdx +3 -1
  162. package/docs/content/syntax.mdx +76 -8
  163. package/docs/content/variables.mdx +3 -1
  164. package/docs/discoverability/agent-discovery.mdx +1 -1
  165. package/docs/discoverability/json-api.mdx +1 -1
  166. package/docs/discoverability/llms-txt.mdx +1 -1
  167. package/docs/discoverability/markdown.mdx +2 -2
  168. package/docs/discoverability/open-graph.mdx +1 -1
  169. package/docs/discoverability/sitemap-and-robots.mdx +1 -1
  170. package/docs/references/graphql.mdx +2 -0
  171. package/docs/references/openapi.mdx +45 -7
  172. package/package.json +4 -4
  173. package/skills/blume/SKILL.md +2 -2
  174. package/skills/blume-migrate/SKILL.md +49 -27
  175. package/skills/blume-migrate/references/docsify.md +262 -0
  176. package/skills/blume-migrate/references/docus.md +298 -0
  177. package/skills/blume-migrate/references/docusaurus.md +3 -3
  178. package/skills/blume-migrate/references/fern.md +327 -0
  179. package/skills/blume-migrate/references/fumadocs.md +1 -1
  180. package/skills/blume-migrate/references/gitbook.md +267 -0
  181. package/skills/blume-migrate/references/github-wiki.md +259 -0
  182. package/skills/blume-migrate/references/jekyll.md +253 -0
  183. package/skills/blume-migrate/references/mdbook.md +256 -0
  184. package/skills/blume-migrate/references/mintlify.md +5 -5
  185. package/skills/blume-migrate/references/mkdocs.md +236 -0
  186. package/skills/blume-migrate/references/monorepo.md +20 -8
  187. package/skills/blume-migrate/references/nextra.md +2 -2
  188. package/skills/blume-migrate/references/readme.md +257 -0
  189. package/skills/blume-migrate/references/redocly.md +198 -0
  190. package/skills/blume-migrate/references/starlight.md +3 -3
  191. package/skills/blume-migrate/references/vitepress.md +204 -0
  192. package/skills/blume-migrate/references/vuepress.md +271 -0
  193. package/skills/blume-migrate/scripts/docsify-codemod.mjs +2387 -0
  194. package/skills/blume-migrate/scripts/docus-codemod.mjs +2542 -0
  195. package/skills/blume-migrate/scripts/fern-codemod.mjs +2633 -0
  196. package/skills/blume-migrate/scripts/github-wiki-codemod.mjs +2808 -0
  197. package/skills/blume-migrate/scripts/include-excerpts.mjs +649 -0
  198. package/skills/blume-migrate/scripts/jekyll-codemod.mjs +3649 -0
  199. package/skills/blume-migrate/scripts/mintlify-codemod.mjs +17 -13
  200. package/skills/blume-migrate/scripts/mkdocs-codemod.mjs +2526 -0
  201. package/skills/blume-migrate/scripts/operation-routes.mjs +508 -0
  202. package/skills/blume-migrate/scripts/pin-heading-ids.mjs +1049 -0
  203. package/skills/blume-migrate/scripts/readme-codemod.mjs +4139 -0
  204. package/skills/blume-migrate/scripts/vitepress-codemod.mjs +1511 -0
  205. package/src/ai/changelog-components.ts +24 -0
  206. package/src/ai/changelog-markdown.ts +45 -41
  207. package/src/ai/component-markdown.ts +22 -9
  208. package/src/ai/llms.ts +36 -5
  209. package/src/ai/markdown.ts +2 -2
  210. package/src/ai/openapi-components.ts +25 -9
  211. package/src/ai/operation-details.ts +208 -0
  212. package/src/ai/relative-links.ts +48 -8
  213. package/src/ai/serializers.ts +7 -6
  214. package/src/ai/site-skill.ts +6 -2
  215. package/src/analytics/head.ts +11 -5
  216. package/src/analytics/script.ts +13 -3
  217. package/src/astro/generate.ts +32 -6
  218. package/src/astro/index.ts +1 -0
  219. package/src/astro/integration.ts +27 -1
  220. package/src/astro/mdx-source-errors.ts +46 -0
  221. package/src/astro/templates.ts +89 -185
  222. package/src/audit/checks/redirects.ts +5 -1
  223. package/src/audit/redirects.ts +36 -19
  224. package/src/audit/report.ts +22 -9
  225. package/src/audit/run.ts +12 -28
  226. package/src/audit/terms.ts +23 -0
  227. package/src/audit/url.ts +2 -2
  228. package/src/cli/build-failure.ts +256 -7
  229. package/src/cli/command-meta.ts +1 -1
  230. package/src/cli/commands/audit.ts +1 -1
  231. package/src/cli/commands/build.ts +12 -3
  232. package/src/cli/commands/check.ts +13 -2
  233. package/src/cli/commands/dev.ts +1 -1
  234. package/src/cli/commands/doctor.ts +4 -2
  235. package/src/cli/commands/init.ts +3 -3
  236. package/src/cli/commands/preview.ts +17 -1
  237. package/src/cli/commands/validate.ts +22 -10
  238. package/src/cli/prepare.ts +1 -1
  239. package/src/cli/preview-pages.ts +161 -0
  240. package/src/cli/unknown-flags.ts +1 -42
  241. package/src/components/code-copy.ts +51 -0
  242. package/src/components/code-language.ts +75 -0
  243. package/src/components/content/AccordionItem.astro +16 -1
  244. package/src/components/content/Callout.astro +11 -1
  245. package/src/components/content/Changelog.astro +189 -0
  246. package/src/components/content/CodeBlock.astro +8 -11
  247. package/src/components/content/Tabs.astro +16 -2
  248. package/src/components/content/YouTube.astro +6 -4
  249. package/src/components/content/code-block.ts +33 -0
  250. package/src/components/content/content-strings.ts +5 -1
  251. package/src/components/content/inline-markdown.ts +35 -8
  252. package/src/components/content/youtube.ts +49 -7
  253. package/src/components/layout/Analytics.astro +5 -1
  254. package/src/components/layout/NavTree.astro +8 -3
  255. package/src/components/layout/RootLayout.astro +18 -31
  256. package/src/components/layout/nav-utils.ts +14 -0
  257. package/src/components/layout/search/pagefind.ts +2 -1
  258. package/src/components/openapi/Operation.astro +4 -0
  259. package/src/components/openapi/PanelTabs.astro +9 -3
  260. package/src/components/openapi/RequestBody.astro +42 -8
  261. package/src/components/openapi/RequestPanel.astro +34 -53
  262. package/src/components/openapi/example-panels.ts +110 -0
  263. package/src/components/openapi/helpers.ts +195 -20
  264. package/src/components/openapi/operation-model.ts +63 -26
  265. package/src/components/openapi/request.ts +13 -0
  266. package/src/components/openapi/snippets.ts +14 -2
  267. package/src/core/alert-diagnostics.ts +89 -0
  268. package/src/core/builtin-tags.ts +76 -0
  269. package/src/core/changelog-list.ts +87 -0
  270. package/src/core/closest-match.ts +41 -0
  271. package/src/core/code-fence-diagnostics.ts +267 -0
  272. package/src/core/code-fences.ts +43 -7
  273. package/src/core/component-diagnostics.ts +65 -12
  274. package/src/core/config-input.ts +1 -1
  275. package/src/core/config.ts +46 -1
  276. package/src/core/content-assets.ts +64 -144
  277. package/src/core/diagnostics.ts +36 -3
  278. package/src/core/directive-diagnostics.ts +265 -47
  279. package/src/core/former-routes.ts +46 -0
  280. package/src/core/git-ignored.ts +53 -0
  281. package/src/core/github.ts +5 -4
  282. package/src/core/heading-markers.ts +156 -2
  283. package/src/core/hidden-pages.ts +64 -0
  284. package/src/core/includes.ts +181 -41
  285. package/src/core/last-modified.ts +47 -10
  286. package/src/core/links.ts +438 -83
  287. package/src/core/load-module.ts +98 -9
  288. package/src/core/manifest.ts +12 -9
  289. package/src/core/markdown-mirrors.ts +52 -0
  290. package/src/core/mdx-elements.ts +153 -0
  291. package/src/core/mdx-syntax.ts +377 -0
  292. package/src/core/meta-diagnostics.ts +134 -0
  293. package/src/core/meta.ts +154 -55
  294. package/src/core/nav-diagnostics.ts +16 -4
  295. package/src/core/navigation.ts +70 -10
  296. package/src/core/ordering-prefix.ts +22 -2
  297. package/src/core/pinned-ids.ts +141 -0
  298. package/src/core/project-graph.ts +221 -29
  299. package/src/core/redirect-patterns.ts +41 -0
  300. package/src/core/relative-files.ts +145 -0
  301. package/src/core/schema.ts +17 -3
  302. package/src/core/sources/mdx-remote.ts +75 -14
  303. package/src/core/sources/normalize.ts +885 -179
  304. package/src/core/sources/notion.ts +5 -4
  305. package/src/core/sources/obsidian.ts +2 -5
  306. package/src/core/sources/types.ts +17 -0
  307. package/src/core/static-files.ts +40 -0
  308. package/src/core/static-host.ts +125 -0
  309. package/src/core/svg-images.ts +98 -0
  310. package/src/core/syntax-diagnostics.ts +491 -0
  311. package/src/core/types.ts +43 -1
  312. package/src/deploy/artifacts.ts +2 -28
  313. package/src/deploy/generated-files.ts +128 -0
  314. package/src/deploy/platforms/vercel.ts +25 -1
  315. package/src/deploy/redirects.ts +43 -16
  316. package/src/deploy/sitemap.ts +2 -1
  317. package/src/markdown/base-links.ts +87 -6
  318. package/src/markdown/code-title.ts +29 -13
  319. package/src/markdown/content-assets.ts +210 -0
  320. package/src/markdown/directives.ts +69 -5
  321. package/src/markdown/fence-language.ts +106 -0
  322. package/src/markdown/fence-meta.ts +42 -0
  323. package/src/markdown/github-alerts.ts +172 -0
  324. package/src/markdown/heading-anchors.ts +265 -56
  325. package/src/markdown/include.ts +30 -3
  326. package/src/markdown/index.ts +145 -40
  327. package/src/markdown/prompt-text.ts +95 -0
  328. package/src/markdown/relative-links.ts +37 -2
  329. package/src/markdown/route-snapshot.ts +22 -12
  330. package/src/markdown/svg-fallback.ts +51 -0
  331. package/src/markdown/title-heading.ts +134 -0
  332. package/src/migrate/migrate.ts +127 -2
  333. package/src/og/card.ts +14 -4
  334. package/src/openapi/asyncapi.ts +14 -6
  335. package/src/openapi/checks.ts +160 -15
  336. package/src/openapi/model.ts +172 -33
  337. package/src/openapi/parse.ts +13 -4
  338. package/src/openapi/render-mdx.ts +55 -9
  339. package/src/openapi/source.ts +87 -6
  340. package/src/registry/eject.ts +0 -1
  341. package/src/search/documents.ts +10 -2
  342. package/src/sources/filesystem.ts +28 -3
  343. package/src/sources/mdx-remote.ts +7 -15
  344. package/src/theme/color.ts +14 -0
  345. package/src/theme/entry.ts +22 -1
  346. package/src/theme/palette.ts +74 -1
  347. package/dist/cli/chunk-0pmb4tr4.js.map +0 -35
  348. package/dist/cli/chunk-0w6hs479.js.map +0 -10
  349. package/dist/cli/chunk-150jk7km.js +0 -52
  350. package/dist/cli/chunk-150jk7km.js.map +0 -10
  351. package/dist/cli/chunk-36bxs9c7.js.map +0 -10
  352. package/dist/cli/chunk-53jqw8z0.js +0 -89
  353. package/dist/cli/chunk-53jqw8z0.js.map +0 -10
  354. package/dist/cli/chunk-60hz265r.js.map +0 -10
  355. package/dist/cli/chunk-desvm72z.js.map +0 -14
  356. package/dist/cli/chunk-dpy8qdjf.js.map +0 -17
  357. package/dist/cli/chunk-es8h0v3j.js +0 -441
  358. package/dist/cli/chunk-es8h0v3j.js.map +0 -11
  359. package/dist/cli/chunk-kdpzw38a.js.map +0 -11
  360. package/dist/cli/chunk-nbyvgnnm.js.map +0 -36
  361. package/dist/cli/chunk-s0bdnc7v.js.map +0 -10
  362. package/dist/cli/chunk-twy7psdz.js.map +0 -10
  363. package/dist/cli/chunk-ydp3065p.js +0 -64
  364. package/dist/cli/chunk-ydp3065p.js.map +0 -10
  365. /package/dist/cli/{chunk-74wfhv79.js.map → chunk-05f21r8h.js.map} +0 -0
  366. /package/dist/cli/{chunk-9qzgg6mj.js.map → chunk-1cm0h819.js.map} +0 -0
  367. /package/dist/cli/{chunk-ms9z66nz.js.map → chunk-4rftmttv.js.map} +0 -0
  368. /package/dist/cli/{chunk-hvcxng5f.js.map → chunk-7tekknev.js.map} +0 -0
  369. /package/dist/cli/{chunk-bxwhtvw8.js.map → chunk-ahc5gc9h.js.map} +0 -0
  370. /package/dist/cli/{chunk-tfycddbt.js.map → chunk-bjk964fp.js.map} +0 -0
  371. /package/dist/cli/{chunk-dqhg54mr.js.map → chunk-dmx6cezx.js.map} +0 -0
  372. /package/dist/cli/{chunk-ave1wcbr.js.map → chunk-m9bp2hc1.js.map} +0 -0
  373. /package/dist/cli/{chunk-58bt3hag.js.map → chunk-mrvh4c88.js.map} +0 -0
  374. /package/dist/cli/{chunk-1f882900.js.map → chunk-th0pgaj5.js.map} +0 -0
  375. /package/dist/cli/{chunk-dhwtqnnd.js.map → chunk-vnbvhgmd.js.map} +0 -0
  376. /package/dist/cli/{chunk-j1x92mx9.js.map → chunk-w6e455pz.js.map} +0 -0
  377. /package/dist/cli/{chunk-y4msrwm9.js.map → chunk-xgq4eytj.js.map} +0 -0
@@ -121,7 +121,9 @@ declare const pageMetaBaseSchema: z.ZodObject<{
121
121
  title: z.ZodOptional<z.ZodString>;
122
122
  type: z.ZodOptional<z.ZodString>;
123
123
  }, z.core.$strict>;
124
- export declare const pageMetaSchema: z.ZodObject<{
124
+ export type PageMeta = z.infer<typeof pageMetaBaseSchema>;
125
+ export type PageMetaInput = z.input<typeof pageMetaBaseSchema>;
126
+ export declare const pageMetaSchema: z.ZodPipe<z.ZodObject<{
125
127
  ai: z.ZodPrefault<z.ZodObject<{
126
128
  exclude: z.ZodDefault<z.ZodBoolean>;
127
129
  }, z.core.$strict>>;
@@ -202,9 +204,135 @@ export declare const pageMetaSchema: z.ZodObject<{
202
204
  slug: z.ZodOptional<z.ZodString>;
203
205
  title: z.ZodOptional<z.ZodString>;
204
206
  type: z.ZodOptional<z.ZodString>;
205
- }, z.core.$strict>;
206
- export type PageMeta = z.infer<typeof pageMetaBaseSchema>;
207
- export type PageMetaInput = z.input<typeof pageMetaBaseSchema>;
207
+ }, z.core.$strict>, z.ZodTransform<{
208
+ ai: {
209
+ exclude: boolean;
210
+ };
211
+ deprecated: boolean;
212
+ draft: boolean;
213
+ hidden: boolean;
214
+ narration: boolean;
215
+ noindex: boolean;
216
+ pagination: boolean;
217
+ search: {
218
+ exclude: boolean;
219
+ boost?: number | undefined;
220
+ keywords?: string[] | undefined;
221
+ tags?: string[] | undefined;
222
+ };
223
+ seo: {
224
+ noindex: boolean;
225
+ canonical?: string | undefined;
226
+ description?: string | undefined;
227
+ image?: string | undefined;
228
+ title?: string | undefined;
229
+ x?: {
230
+ creator?: string | undefined;
231
+ } | undefined;
232
+ };
233
+ sidebar: {
234
+ hidden: boolean;
235
+ badge?: string | undefined;
236
+ display?: "flat" | "group" | "page" | undefined;
237
+ icon?: string | undefined;
238
+ label?: string | undefined;
239
+ order?: number | undefined;
240
+ };
241
+ api?: string | undefined;
242
+ authMethod?: "none" | "key" | "bearer" | "basic" | undefined;
243
+ authors?: string | {
244
+ [x: string]: unknown;
245
+ name: string;
246
+ avatar?: string | undefined;
247
+ image?: string | undefined;
248
+ url?: string | undefined;
249
+ } | (string | {
250
+ [x: string]: unknown;
251
+ name: string;
252
+ avatar?: string | undefined;
253
+ image?: string | undefined;
254
+ url?: string | undefined;
255
+ })[] | undefined;
256
+ changelog?: {
257
+ category?: string | undefined;
258
+ date?: string | undefined;
259
+ version?: string | undefined;
260
+ } | undefined;
261
+ date?: string | undefined;
262
+ description?: string | undefined;
263
+ icon?: string | undefined;
264
+ lastModified?: string | undefined;
265
+ mode?: "default" | "custom" | "wide" | "center" | "frame" | undefined;
266
+ playground?: "none" | "interactive" | "simple" | undefined;
267
+ related?: false | (string | Record<string, string>)[] | undefined;
268
+ slug?: string | undefined;
269
+ title?: string | undefined;
270
+ type?: string | undefined;
271
+ }, {
272
+ ai: {
273
+ exclude: boolean;
274
+ };
275
+ deprecated: boolean;
276
+ draft: boolean;
277
+ hidden: boolean;
278
+ narration: boolean;
279
+ noindex: boolean;
280
+ pagination: boolean;
281
+ search: {
282
+ exclude: boolean;
283
+ boost?: number | undefined;
284
+ keywords?: string[] | undefined;
285
+ tags?: string[] | undefined;
286
+ };
287
+ seo: {
288
+ noindex: boolean;
289
+ canonical?: string | undefined;
290
+ description?: string | undefined;
291
+ image?: string | undefined;
292
+ title?: string | undefined;
293
+ x?: {
294
+ creator?: string | undefined;
295
+ } | undefined;
296
+ };
297
+ sidebar: {
298
+ hidden: boolean;
299
+ badge?: string | undefined;
300
+ display?: "flat" | "group" | "page" | undefined;
301
+ icon?: string | undefined;
302
+ label?: string | undefined;
303
+ order?: number | undefined;
304
+ };
305
+ api?: string | undefined;
306
+ authMethod?: "none" | "key" | "bearer" | "basic" | undefined;
307
+ authors?: string | {
308
+ [x: string]: unknown;
309
+ name: string;
310
+ avatar?: string | undefined;
311
+ image?: string | undefined;
312
+ url?: string | undefined;
313
+ } | (string | {
314
+ [x: string]: unknown;
315
+ name: string;
316
+ avatar?: string | undefined;
317
+ image?: string | undefined;
318
+ url?: string | undefined;
319
+ })[] | undefined;
320
+ changelog?: {
321
+ category?: string | undefined;
322
+ date?: string | undefined;
323
+ version?: string | undefined;
324
+ } | undefined;
325
+ date?: string | undefined;
326
+ description?: string | undefined;
327
+ icon?: string | undefined;
328
+ lastModified?: string | undefined;
329
+ mode?: "default" | "custom" | "wide" | "center" | "frame" | undefined;
330
+ playground?: "none" | "interactive" | "simple" | undefined;
331
+ related?: false | (string | Record<string, string>)[] | undefined;
332
+ slug?: string | undefined;
333
+ title?: string | undefined;
334
+ type?: string | undefined;
335
+ }>>;
208
336
  /**
209
337
  * The page schema as the generated content collections declare it, so
210
338
  * `entry.data` is typed and normalized (dates as ISO strings, X handles with
@@ -216,7 +344,7 @@ export type PageMetaInput = z.input<typeof pageMetaBaseSchema>;
216
344
  * diagnostic — Blume continues without it unless `--strict` — so the
217
345
  * collection must not turn that dropped page into a failed content sync.
218
346
  */
219
- export declare const pageCollectionSchema: z.ZodCatch<z.ZodObject<{
347
+ export declare const pageCollectionSchema: z.ZodCatch<z.ZodPipe<z.ZodObject<{
220
348
  ai: z.ZodPrefault<z.ZodObject<{
221
349
  exclude: z.ZodDefault<z.ZodBoolean>;
222
350
  }, z.core.$strict>>;
@@ -297,7 +425,139 @@ export declare const pageCollectionSchema: z.ZodCatch<z.ZodObject<{
297
425
  slug: z.ZodOptional<z.ZodString>;
298
426
  title: z.ZodOptional<z.ZodString>;
299
427
  type: z.ZodOptional<z.ZodString>;
300
- }, z.core.$loose>>;
428
+ }, z.core.$loose>, z.ZodTransform<{
429
+ [x: string]: unknown;
430
+ ai: {
431
+ exclude: boolean;
432
+ };
433
+ deprecated: boolean;
434
+ draft: boolean;
435
+ hidden: boolean;
436
+ narration: boolean;
437
+ noindex: boolean;
438
+ pagination: boolean;
439
+ search: {
440
+ exclude: boolean;
441
+ boost?: number | undefined;
442
+ keywords?: string[] | undefined;
443
+ tags?: string[] | undefined;
444
+ };
445
+ seo: {
446
+ noindex: boolean;
447
+ canonical?: string | undefined;
448
+ description?: string | undefined;
449
+ image?: string | undefined;
450
+ title?: string | undefined;
451
+ x?: {
452
+ creator?: string | undefined;
453
+ } | undefined;
454
+ };
455
+ sidebar: {
456
+ hidden: boolean;
457
+ badge?: string | undefined;
458
+ display?: "flat" | "group" | "page" | undefined;
459
+ icon?: string | undefined;
460
+ label?: string | undefined;
461
+ order?: number | undefined;
462
+ };
463
+ api?: string | undefined;
464
+ authMethod?: "none" | "key" | "bearer" | "basic" | undefined;
465
+ authors?: string | {
466
+ [x: string]: unknown;
467
+ name: string;
468
+ avatar?: string | undefined;
469
+ image?: string | undefined;
470
+ url?: string | undefined;
471
+ } | (string | {
472
+ [x: string]: unknown;
473
+ name: string;
474
+ avatar?: string | undefined;
475
+ image?: string | undefined;
476
+ url?: string | undefined;
477
+ })[] | undefined;
478
+ changelog?: {
479
+ category?: string | undefined;
480
+ date?: string | undefined;
481
+ version?: string | undefined;
482
+ } | undefined;
483
+ date?: string | undefined;
484
+ description?: string | undefined;
485
+ icon?: string | undefined;
486
+ lastModified?: string | undefined;
487
+ mode?: "default" | "custom" | "wide" | "center" | "frame" | undefined;
488
+ playground?: "none" | "interactive" | "simple" | undefined;
489
+ related?: false | (string | Record<string, string>)[] | undefined;
490
+ slug?: string | undefined;
491
+ title?: string | undefined;
492
+ type?: string | undefined;
493
+ }, {
494
+ [x: string]: unknown;
495
+ ai: {
496
+ exclude: boolean;
497
+ };
498
+ deprecated: boolean;
499
+ draft: boolean;
500
+ hidden: boolean;
501
+ narration: boolean;
502
+ noindex: boolean;
503
+ pagination: boolean;
504
+ search: {
505
+ exclude: boolean;
506
+ boost?: number | undefined;
507
+ keywords?: string[] | undefined;
508
+ tags?: string[] | undefined;
509
+ };
510
+ seo: {
511
+ noindex: boolean;
512
+ canonical?: string | undefined;
513
+ description?: string | undefined;
514
+ image?: string | undefined;
515
+ title?: string | undefined;
516
+ x?: {
517
+ creator?: string | undefined;
518
+ } | undefined;
519
+ };
520
+ sidebar: {
521
+ hidden: boolean;
522
+ badge?: string | undefined;
523
+ display?: "flat" | "group" | "page" | undefined;
524
+ icon?: string | undefined;
525
+ label?: string | undefined;
526
+ order?: number | undefined;
527
+ };
528
+ api?: string | undefined;
529
+ authMethod?: "none" | "key" | "bearer" | "basic" | undefined;
530
+ authors?: string | {
531
+ [x: string]: unknown;
532
+ name: string;
533
+ avatar?: string | undefined;
534
+ image?: string | undefined;
535
+ url?: string | undefined;
536
+ } | (string | {
537
+ [x: string]: unknown;
538
+ name: string;
539
+ avatar?: string | undefined;
540
+ image?: string | undefined;
541
+ url?: string | undefined;
542
+ })[] | undefined;
543
+ changelog?: {
544
+ category?: string | undefined;
545
+ date?: string | undefined;
546
+ version?: string | undefined;
547
+ } | undefined;
548
+ date?: string | undefined;
549
+ description?: string | undefined;
550
+ icon?: string | undefined;
551
+ lastModified?: string | undefined;
552
+ mode?: "default" | "custom" | "wide" | "center" | "frame" | undefined;
553
+ playground?: "none" | "interactive" | "simple" | undefined;
554
+ related?: false | (string | Record<string, string>)[] | undefined;
555
+ slug?: string | undefined;
556
+ title?: string | undefined;
557
+ type?: string | undefined;
558
+ }>>>;
559
+ /** Built-in page frontmatter keys; custom keys must never redeclare one. */
560
+ export declare const BUILT_IN_PAGE_META_KEYS: ReadonlySet<string>;
301
561
  export declare const folderMetaSchema: z.ZodObject<{
302
562
  collapsed: z.ZodOptional<z.ZodBoolean>;
303
563
  directory: z.ZodOptional<z.ZodEnum<{
@@ -1760,7 +2020,7 @@ export declare const blumeConfigSchema: z.ZodObject<{
1760
2020
  options: z.ZodObject<{
1761
2021
  pollInterval: z.ZodOptional<z.ZodNumber>;
1762
2022
  prefix: z.ZodOptional<z.ZodString>;
1763
- exclude: z.ZodDefault<z.ZodArray<z.ZodString>>;
2023
+ exclude: z.ZodPipe<z.ZodDefault<z.ZodArray<z.ZodString>>, z.ZodTransform<string[], string[]>>;
1764
2024
  include: z.ZodDefault<z.ZodArray<z.ZodString>>;
1765
2025
  root: z.ZodDefault<z.ZodString>;
1766
2026
  }, z.core.$strict>;
@@ -41,10 +41,29 @@ export declare const unloadablePathDiagnostic: (path: string, file: string) => D
41
41
  * line, so its 0-based line is already the file's line minus one.
42
42
  */
43
43
  export declare const frontmatterYamlDiagnostic: (error: YAMLException, file: string) => Diagnostic;
44
+ export declare const ATTRIBUTE: string;
45
+ /** A heading's trailing `{#id}` marker, where its text holds one. */
46
+ export interface TrailingCurlyMarker {
47
+ /** Whether the braces also set classes or attributes (`{ #id .wide }`). */
48
+ attributes: boolean;
49
+ id: string;
50
+ /** Where the marker starts in the text. */
51
+ index: number;
52
+ /** The braces as written. */
53
+ marker: string;
54
+ }
55
+ /**
56
+ * The `{#id}` marker a heading's text ends with: one of the spellings
57
+ * `BARE_CURLY_MARKER` matches, or an attribute list that sets an id among
58
+ * other attributes (see `HEADING_ATTRIBUTE_LIST`).
59
+ */
60
+ export declare const trailingCurlyMarker: (text: string) => TrailingCurlyMarker | undefined;
44
61
  export declare const HTML_COMMENT: RegExp;
45
62
  export declare const INLINE_CODE: RegExp;
46
- /** A heading whose trailing `{#id}` marker is unescaped — see `BARE_CURLY_MARKER`. */
63
+ /** A heading whose trailing `{#id}` marker is unescaped — see `trailingCurlyMarker`. */
47
64
  export interface CurlyMarker {
65
+ /** Whether the braces also set classes or attributes (`{ #id .wide }`). */
66
+ attributes: boolean;
48
67
  id: string;
49
68
  /** 1-based line of the heading (a setext heading's first text line) in the body. */
50
69
  line: number;
@@ -61,10 +80,10 @@ export interface HeadingSite {
61
80
  /** Everything one walk over a body yields for the anchor index. */
62
81
  export interface BodyScan {
63
82
  /**
64
- * Raw HTML element ids (`<a id="…">`) outside headings, fences, inline
65
- * code, comments, and `<Prompt>` regions — fragment-link targets that
66
- * `blume validate` accepts alongside heading slugs. Deduplicated, in
67
- * document order.
83
+ * Raw HTML element ids (`<a id="…">`) and `<a name="…">` names outside
84
+ * headings, fences, inline code, comments, and `<Prompt>` regions —
85
+ * fragment-link targets that `blume validate` accepts alongside heading
86
+ * slugs. Deduplicated, in document order.
68
87
  */
69
88
  anchors: string[];
70
89
  /** Headings whose trailing `{#id}` marker is unescaped, for `.mdx` pages. */
@@ -83,10 +102,77 @@ export interface BodyScan {
83
102
  */
84
103
  export declare const scanBody: (body: string) => BodyScan;
85
104
  export declare const extractHeadings: (body: string) => Heading[];
86
- export declare const MD_IMAGE: RegExp;
87
- /** Column (0-based, within `matched`) where a link/image match's target starts. */
88
- export declare const targetOffsetIn: (matched: string, target: string, title: string | undefined) => number;
89
- export declare const extractLinks: (body: string, lineOffset?: number) => PageLink[];
105
+ /**
106
+ * Rewrite the target of every image embed on one line with `rewrite`, which
107
+ * gets the target as the renderer reads it (see `readDestination`) and
108
+ * returns the new one, or `null` to leave it as written. Inline code is
109
+ * skipped: matches run on a copy with code spans blanked, and replacements
110
+ * splice into the real line by index, which the same-length mask keeps in
111
+ * step. A rewritten target is written back in the form its destination took.
112
+ */
113
+ export declare const rewriteImageTargets: (line: string, rewrite: (target: string) => string | null) => string;
114
+ /** A string `href` or `src` on an element, as {@link rewriteElementUrls} reads it. */
115
+ export interface ElementUrl {
116
+ attribute: string;
117
+ /** The element's name as written: `img`, `a`, `Card`. */
118
+ tag: string;
119
+ value: string;
120
+ }
121
+ /**
122
+ * Whether an element URL is one `blume validate` reads as a link (see
123
+ * `ELEMENT_HREF` and `ELEMENT_SRC`): a media element's `src`, or an `<a>`'s or
124
+ * a component's `href`. Only these name a file the build publishes from
125
+ * beside the page.
126
+ */
127
+ export declare const isLinkElementUrl: (url: ElementUrl) => boolean;
128
+ /**
129
+ * Rewrite every `<Card img="…">` value in `text` (outside code) with
130
+ * `rewrite`, which returns the new value or `null` to leave one as written.
131
+ * The include expander rebases a partial's values with it and the
132
+ * content-asset rewriter points them at their served URL, exactly as both
133
+ * treat image embeds, so a card's image resolves like `![](./cover.png)`.
134
+ */
135
+ export declare const rewriteCardImages: (text: string, rewrite: (target: string) => string | null) => string;
136
+ /**
137
+ * Rewrite every element's string `href` or `src` in `text` (outside code)
138
+ * with `rewrite`, which returns the new value or `null` to leave one as
139
+ * written. The include expander rebases a partial's files with it, the
140
+ * content-asset rewriter points them at their served URL, and the render
141
+ * plugins rewrite raw HTML with it.
142
+ */
143
+ export declare const rewriteElementUrls: (text: string, rewrite: (url: ElementUrl) => string | null) => string;
144
+ /**
145
+ * Rewrite the target of every Markdown link in `text` (outside code) with
146
+ * `rewrite`, which gets the target as the renderer reads it and returns the
147
+ * new one, or `null` to leave it as written: inline links (an image embed is
148
+ * no link; see {@link rewriteImageTargets}), links whose label wraps onto
149
+ * later lines, and link-reference definitions (`[spec]: ./spec.pdf`). Each
150
+ * rewritten target is written back in the form its destination took.
151
+ */
152
+ export declare const rewriteLinkTargets: (text: string, rewrite: (target: string) => string | null) => string;
153
+ /** A link-reference definition, as {@link linkDefinitions} reads one. */
154
+ export interface LinkDefinition {
155
+ /** The label as CommonMark matches it: case-folded, spaces collapsed. */
156
+ key: string;
157
+ /** The definition on a line of its own, out of any container. */
158
+ text: string;
159
+ }
160
+ /**
161
+ * Every link-reference definition in `text` (`[label]: /url "Title"`,
162
+ * outside code; footnotes aren't links), in order, the first of each label
163
+ * only, since that's the one that renders. A definition is read from its own
164
+ * line: its destination and any title there, and nothing else, since a line
165
+ * with more after them is text.
166
+ */
167
+ export declare const linkDefinitions: (text: string) => LinkDefinition[];
168
+ /**
169
+ * Extract link targets from a markdown body for later validation, recording the
170
+ * 1-based line/column of each target. Skips fenced code blocks, inline code,
171
+ * and — given the page's `format` — comments, none of which render a link.
172
+ * `lineOffset` shifts every recorded line: the body is frontmatter-stripped, so
173
+ * diagnostics that point into the raw file must add the stripped block's height.
174
+ */
175
+ export declare const extractLinks: (body: string, lineOffset?: number, format?: "md" | "mdx") => PageLink[];
90
176
  /**
91
177
  * Every `<Component path>` in an `.mdx` body, with the 1-based position of its
92
178
  * value; lines are shifted by `lineOffset`, as {@link extractLinks} does. Code
@@ -146,6 +232,12 @@ export interface EntryRoute extends Pick<EntryPlacement, "locales" | "version">
146
232
  * through {@link localizedRoute} for the route one locale publishes at.
147
233
  */
148
234
  logicalRoute: string;
235
+ /**
236
+ * The logical route an earlier Blume published the entry at, when it
237
+ * differs: a date-named file or folder (`12-05-2022`) lost its first number
238
+ * as an ordering prefix. Its old URL redirects to the new one.
239
+ */
240
+ formerLogicalRoute?: string;
149
241
  /** The prefixed, locale- and version-stripped nav path. */
150
242
  navPath: string;
151
243
  segments: string[];
@@ -65,6 +65,15 @@ export interface SourceEntry {
65
65
  includes: string[];
66
66
  };
67
67
  }
68
+ /**
69
+ * A redirect a source asks for: from a route one of its pages used to have
70
+ * to the route it has now, both locale-stripped and without `basePath`, as
71
+ * the page routes its entries map to.
72
+ */
73
+ export interface SourceRedirect {
74
+ from: string;
75
+ to: string;
76
+ }
68
77
  /** The result of a single `ContentSource.load()` call. */
69
78
  export interface SourceLoadResult {
70
79
  entries: SourceEntry[];
@@ -78,6 +87,13 @@ export interface SourceLoadResult {
78
87
  * beneath user-authored meta files, which always win.
79
88
  */
80
89
  folderMeta?: Record<string, FolderMeta>;
90
+ /**
91
+ * Redirects from routes the source's pages moved off: the OpenAPI source
92
+ * keeps the URLs earlier releases gave operation pages working. Added to
93
+ * the config's `redirects` after them, skipping any whose `from` a page or
94
+ * a configured redirect already owns.
95
+ */
96
+ redirects?: SourceRedirect[];
81
97
  }
82
98
  /**
83
99
  * Per-source runtime context, handed to an adapter factory at construction so
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Whether a root-relative path names a file the site serves outside its pages,
3
+ * as a static host answers it: a file in `public/`, a `public/` folder's
4
+ * `index.html` (`/demo` and `/demo/` for `public/demo/index.html`), or one of
5
+ * the files Blume generates (`generated`, base-less paths like `/llms.txt`;
6
+ * see `deploy/generated-files.ts`). `publicDir` is `null` when the project has
7
+ * no `public/` folder, which ships no files then. Paths come decoded, without
8
+ * `deployment.base`, which a host mounts `public/` under.
9
+ */
10
+ export declare const staticFileResolver: (publicDir: string | null, generated?: Iterable<string>) => ((path: string) => boolean);
@@ -0,0 +1,42 @@
1
+ /**
2
+ * What a static host does with the URLs `blume dev` and `blume preview`
3
+ * would otherwise answer on their own terms. Astro's `trailingSlash: "never"`
4
+ * has both 404 a slashed URL (`/guide/`), which every host answers: Vercel
5
+ * redirects it to `/guide`, and the others serve `guide/index.html`. And a
6
+ * folder of HTML shipped in `public/` (`public/demo/index.html`) is served at
7
+ * `/demo/`, `/demo` redirecting there, so the relative links inside it
8
+ * resolve against the folder; the dev server 404s both spellings, and Vite's
9
+ * preview serves only the slashless one.
10
+ */
11
+ import type { IncomingMessage, Server } from "node:http";
12
+ /** How to answer a request ahead of the server's own handlers. */
13
+ export type HostAnswer = {
14
+ kind: "redirect";
15
+ location: string;
16
+ status: number;
17
+ } | {
18
+ kind: "rewrite";
19
+ url: string;
20
+ };
21
+ /**
22
+ * Whether `public/<path>/index.html` exists: a folder of HTML the site ships
23
+ * as is. `path` is the decoded request path with `deployment.base` stripped.
24
+ */
25
+ export declare const publicFolder: (publicDir: string) => (path: string) => boolean;
26
+ /**
27
+ * How a static host answers a URL's trailing slash, or null to leave the
28
+ * request alone. A slashed URL redirects to its slashless page, its query
29
+ * kept, unless it names a public folder, which serves its `index.html`; a
30
+ * slashless public folder redirects to its slashed URL. `base` is the
31
+ * normalized `deployment.base`, which the URL carries and `public/` doesn't.
32
+ * The redirect is a `301`, a `308` for a method a `301` would turn into a
33
+ * `GET`, as Astro answers on a server-rendered route.
34
+ */
35
+ export declare const trailingSlashAnswer: (request: Pick<IncomingMessage, "method" | "url">, base: string, isPublicFolder: (path: string) => boolean) => HostAnswer | null;
36
+ /**
37
+ * Answer every request on `server` with `answer` first: a redirect is sent
38
+ * then and there, and a rewrite changes the URL the server's own handlers
39
+ * (Vite's middleware) then see. They're the request listeners the server
40
+ * already has, so this goes ahead of every middleware, Astro's included.
41
+ */
42
+ export declare const answerRequestsFirst: (server: Server, answer: (request: IncomingMessage) => HostAnswer | null, headers?: Record<string, string>) => void;
@@ -0,0 +1,26 @@
1
+ import type { Diagnostic, PageRecord } from "./types.ts";
2
+ /**
3
+ * Colocated SVGs Astro's image pipeline can't measure. Astro reads an image's
4
+ * size before it optimizes it, and for an SVG it looks for the `<svg>` tag in
5
+ * the file's first 1,000 bytes only, then needs a width and height or a
6
+ * viewBox on that tag. A draw.io export carries its whole diagram in a
7
+ * `content` attribute on the tag, which pushes the tag's end past that
8
+ * window, so one diagram fails the build (`NoImageMetadata`). Blume serves
9
+ * such an SVG as it is instead, from the endpoint that already serves content
10
+ * images to agents (`/blume-assets/content/…`), and warns about it
11
+ * (`BLUME_SVG_UNOPTIMIZED`). A browser draws an SVG at any size, so the
12
+ * only loss is the intrinsic `width`/`height` the optimized `<img>` carries.
13
+ */
14
+ /** Whether the file at `path` is an SVG Astro can't read the size of. */
15
+ export declare const isUnmeasurableSvg: (path: string) => Promise<boolean>;
16
+ /**
17
+ * The URL an unmeasurable SVG is served at, unbased (the base links plugin
18
+ * mounts `deployment.base`), or null when `target` isn't a colocated image
19
+ * Astro can measure no size for.
20
+ */
21
+ export declare const unmeasurableSvgUrl: (sourceDir: string, target: string, projectRoot: string) => Promise<string | null>;
22
+ /**
23
+ * A warning for each image embed of a colocated SVG Astro can't measure, at
24
+ * the line that embeds it (in a partial, when an `<include>` brought it in).
25
+ */
26
+ export declare const unmeasurableSvgDiagnostics: (pages: readonly PageRecord[]) => Promise<Diagnostic[]>;
@@ -0,0 +1,14 @@
1
+ import type { SourceEntry } from "./sources/types.ts";
2
+ import type { Diagnostic, PageRecord } from "./types.ts";
3
+ /** The site's pages by the names a wiki link can call them (see {@link wikiKey}). */
4
+ export type PageNameIndex = ReadonlyMap<string, readonly PageRecord[]>;
5
+ /** Index pages by file name and title, for {@link syntaxDiagnostics}. */
6
+ export declare const indexPageNames: (pages: readonly PageRecord[]) => PageNameIndex;
7
+ /**
8
+ * Warn about syntax from other docs tools in an entry's body (see the module
9
+ * comment). `pages` are the site's pages by name, which a wiki link resolves
10
+ * against, preferring one in the entry's own `locale`. Lines point into the
11
+ * file the author wrote, a partial's own file for syntax an `<include>`
12
+ * brought in.
13
+ */
14
+ export declare const syntaxDiagnostics: (entry: SourceEntry, sourceName: string, pages?: PageNameIndex, locale?: string) => Diagnostic[];
@@ -45,8 +45,13 @@ export interface Heading {
45
45
  }
46
46
  /** A link target discovered in page content, anchored to its source line. */
47
47
  export interface PageLink {
48
- /** Raw link target as written, e.g. `./foo`, `/api#auth`, `https://x.dev`. */
48
+ /** Raw link target as written, e.g. `./foo`, `/api#auth`, `https://x.dev`.
49
+ * A Markdown destination is read as the renderer reads it: without its
50
+ * `<…>` brackets, and with backslash escapes resolved. */
49
51
  target: string;
52
+ /** Length of the target's text in the source, when escapes make it differ
53
+ * from `target`'s (`image\(1\).png` is read as `image(1).png`). */
54
+ sourceLength?: number;
50
55
  /** Set when the target was written as an image embed (`![alt](target)`) —
51
56
  * only those go through the image pipeline; a plain link to the same path
52
57
  * resolves as a site route. */
@@ -55,6 +60,11 @@ export interface PageLink {
55
60
  * the Markdown pipeline neither resolves its relative path file-style nor
56
61
  * mounts the base path on it, so it's checked the way a browser reads it. */
57
62
  raw?: boolean;
63
+ /** The element, when the target is a media element's `src` (`img`,
64
+ * `source`, `video`, `audio`). It's `raw` too: the browser resolves it as
65
+ * written, unless it names a file beside the page, which the build
66
+ * publishes and points it at. */
67
+ src?: string;
58
68
  /** 1-based line number in the source file. */
59
69
  line: number;
60
70
  /** 1-based column of the target within the line. */
@@ -75,6 +85,25 @@ export interface ExampleUse {
75
85
  /** Absolute path of the included partial it was written in, if not the page. */
76
86
  file?: string;
77
87
  }
88
+ /**
89
+ * A JSX element in an `.mdx` body whose props don't render as written (see
90
+ * `core/mdx-elements.ts`), located like a {@link PageLink}: an HTML element
91
+ * with a JavaScript event handler (`handler`), or a childless built-in given
92
+ * props it doesn't take (`prop`).
93
+ */
94
+ export interface ElementUse {
95
+ /** 1-based column of the element's `<` within the line. */
96
+ column: number;
97
+ /** Absolute path of the included partial it was written in, if not the page. */
98
+ file?: string;
99
+ kind: "handler" | "prop";
100
+ /** 1-based line number in the source file. */
101
+ line: number;
102
+ /** The handler props, or the props the built-in doesn't take. */
103
+ props: string[];
104
+ /** The element's name as written (`button`, `Badge`). */
105
+ tag: string;
106
+ }
78
107
  /**
79
108
  * Resolved project paths. Computed once per CLI invocation and threaded
80
109
  * through the core pipeline.
@@ -162,6 +191,12 @@ export interface PageRecord {
162
191
  * checks skip these.
163
192
  */
164
193
  fallback?: boolean;
194
+ /**
195
+ * The route an earlier Blume published the page at, when it differs from
196
+ * `route`: a date-named file or folder (`12-05-2022`) lost its first number
197
+ * as an ordering prefix. The scan redirects it to `route`.
198
+ */
199
+ formerRoute?: string;
165
200
  /**
166
201
  * True for pages from a source that publishes one language only (GitHub
167
202
  * Releases): they render without a language switcher.
@@ -202,6 +237,12 @@ export interface PageRecord {
202
237
  componentsUsed?: string[];
203
238
  /** The string `path` of each `<Component>` example in the body (`.mdx` only). */
204
239
  examplesUsed?: ExampleUse[];
240
+ /**
241
+ * Childless built-ins given props they don't take (`.mdx` only). Reported
242
+ * once the project's own components are known, since an override takes
243
+ * whatever props it declares.
244
+ */
245
+ unknownProps?: ElementUse[];
205
246
  /** Resolved "last updated" ISO date, when the feature is enabled. */
206
247
  lastModified?: string;
207
248
  /** Absolute paths of files this page `<include>`s, transitively. Drives the