blume 2.0.2 → 2.0.3

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 (293) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/dist/cli/{chunk-6k4ftwze.js → chunk-1d7ve1dm.js} +1 -1
  3. package/dist/cli/{chunk-zp79m0ts.js → chunk-2eytanqx.js} +2 -2
  4. package/dist/cli/{chunk-8g8ytmgx.js → chunk-2hsdwb9n.js} +19 -19
  5. package/dist/cli/{chunk-8g8ytmgx.js.map → chunk-2hsdwb9n.js.map} +1 -1
  6. package/dist/cli/{chunk-g698a744.js → chunk-2z928egk.js} +5 -5
  7. package/dist/cli/{chunk-ppzjqwx2.js → chunk-35d4wj9f.js} +17 -18
  8. package/dist/cli/{chunk-ppzjqwx2.js.map → chunk-35d4wj9f.js.map} +3 -3
  9. package/dist/cli/{chunk-mqc662a6.js → chunk-364znk6q.js} +2 -2
  10. package/dist/cli/{chunk-gs7r695n.js → chunk-3em5wd2y.js} +21 -8
  11. package/dist/cli/{chunk-gs7r695n.js.map → chunk-3em5wd2y.js.map} +3 -3
  12. package/dist/cli/{chunk-k7pj68a8.js → chunk-5f86nr5m.js} +15 -15
  13. package/dist/cli/{chunk-hr8ne106.js → chunk-5m5nmvyq.js} +68 -43
  14. package/dist/cli/chunk-5m5nmvyq.js.map +13 -0
  15. package/dist/cli/{chunk-91ws1n6j.js → chunk-5xvm6tfj.js} +14 -14
  16. package/dist/cli/{chunk-w4bxdvsa.js → chunk-6dsbexzp.js} +14 -14
  17. package/dist/cli/{chunk-00gs3wqs.js → chunk-8ktnccpt.js} +1 -1
  18. package/dist/cli/{chunk-j85scx15.js → chunk-9t7a85s3.js} +130 -44
  19. package/dist/cli/chunk-9t7a85s3.js.map +10 -0
  20. package/dist/cli/{chunk-bbnwccaz.js → chunk-a58773jm.js} +2 -2
  21. package/dist/cli/{chunk-nfcyttvj.js → chunk-acanzt5p.js} +9 -9
  22. package/dist/cli/{chunk-nfcyttvj.js.map → chunk-acanzt5p.js.map} +1 -1
  23. package/dist/cli/{chunk-wdrt2k2v.js → chunk-akbpwfxc.js} +90 -26
  24. package/dist/cli/chunk-akbpwfxc.js.map +10 -0
  25. package/dist/cli/{chunk-sqw4ekg1.js → chunk-b07cmahc.js} +2 -2
  26. package/dist/cli/{chunk-xh43dwgw.js → chunk-c8chx29p.js} +42 -29
  27. package/dist/cli/{chunk-xh43dwgw.js.map → chunk-c8chx29p.js.map} +9 -9
  28. package/dist/cli/{chunk-7mbqtmgb.js → chunk-crgn1q09.js} +21 -12
  29. package/dist/cli/chunk-crgn1q09.js.map +10 -0
  30. package/dist/cli/chunk-e04dxsz1.js +39 -0
  31. package/dist/cli/chunk-e04dxsz1.js.map +10 -0
  32. package/dist/cli/{chunk-4e9b9ra6.js → chunk-ey84smr6.js} +3 -3
  33. package/dist/cli/{chunk-d1v5rhy0.js → chunk-g4hq16wv.js} +13 -13
  34. package/dist/cli/{chunk-273ygyr4.js → chunk-ga0pf4aj.js} +7 -7
  35. package/dist/cli/{chunk-273ygyr4.js.map → chunk-ga0pf4aj.js.map} +3 -3
  36. package/dist/cli/{chunk-pbg5a4s3.js → chunk-hm3vjy5s.js} +64 -45
  37. package/dist/cli/chunk-hm3vjy5s.js.map +19 -0
  38. package/dist/cli/{chunk-5r8g91qn.js → chunk-j85vccga.js} +306 -107
  39. package/dist/cli/chunk-j85vccga.js.map +36 -0
  40. package/dist/cli/{chunk-n1yg3tj3.js → chunk-p3v96n38.js} +6 -6
  41. package/dist/cli/{chunk-n1yg3tj3.js.map → chunk-p3v96n38.js.map} +3 -3
  42. package/dist/cli/{chunk-7vtckvaw.js → chunk-p73c0m7w.js} +14 -14
  43. package/dist/cli/{chunk-7vtckvaw.js.map → chunk-p73c0m7w.js.map} +1 -1
  44. package/dist/cli/{chunk-qkb5a8sa.js → chunk-pehfxfta.js} +3 -3
  45. package/dist/cli/{chunk-v6ya5kcb.js → chunk-pv29h0wf.js} +1223 -978
  46. package/dist/cli/{chunk-v6ya5kcb.js.map → chunk-pv29h0wf.js.map} +47 -46
  47. package/dist/cli/{chunk-6dtt0zfn.js → chunk-q58y5e6a.js} +10 -10
  48. package/dist/cli/{chunk-6dtt0zfn.js.map → chunk-q58y5e6a.js.map} +3 -3
  49. package/dist/cli/{chunk-fsmrqk8a.js → chunk-r20tn01b.js} +1 -1
  50. package/dist/cli/{chunk-bfwp9vp6.js → chunk-r9rcc4w7.js} +7 -7
  51. package/dist/cli/{chunk-h7k3nq3v.js → chunk-tkacnehg.js} +2 -2
  52. package/dist/cli/{chunk-h2ez8dzb.js → chunk-tzmab476.js} +4 -4
  53. package/dist/cli/{chunk-3yce002v.js → chunk-vg9r4eb9.js} +6 -6
  54. package/dist/cli/{chunk-3yce002v.js.map → chunk-vg9r4eb9.js.map} +4 -4
  55. package/dist/cli/{chunk-hqp2ajnh.js → chunk-wrr3j9w9.js} +16 -17
  56. package/dist/cli/{chunk-hqp2ajnh.js.map → chunk-wrr3j9w9.js.map} +7 -7
  57. package/dist/cli/{chunk-ddndchfr.js → chunk-yfyb25rh.js} +38 -26
  58. package/dist/cli/chunk-yfyb25rh.js.map +14 -0
  59. package/dist/cli/index.js +20 -18
  60. package/dist/cli/index.js.map +3 -3
  61. package/dist/types/ai/link-headers.d.ts +8 -1
  62. package/dist/types/ai/openapi-components.d.ts +5 -2
  63. package/dist/types/ai/relative-links.d.ts +9 -7
  64. package/dist/types/ai/skills.d.ts +4 -1
  65. package/dist/types/ai/tar.d.ts +1 -3
  66. package/dist/types/analytics/index.d.ts +2 -0
  67. package/dist/types/analytics/one-dollar-stats.d.ts +48 -0
  68. package/dist/types/analytics/schema.d.ts +14 -0
  69. package/dist/types/astro/integration.d.ts +3 -2
  70. package/dist/types/core/base-path.d.ts +21 -7
  71. package/dist/types/core/config-input.d.ts +9 -7
  72. package/dist/types/core/directive-diagnostics.d.ts +12 -0
  73. package/dist/types/core/heading-markers.d.ts +5 -7
  74. package/dist/types/core/i18n.d.ts +2 -0
  75. package/dist/types/core/last-modified.d.ts +10 -0
  76. package/dist/types/core/meta.d.ts +8 -0
  77. package/dist/types/core/schema.d.ts +7 -0
  78. package/dist/types/core/sources/lower.d.ts +29 -16
  79. package/dist/types/core/sources/normalize.d.ts +13 -1
  80. package/dist/types/core/sources/watch.d.ts +12 -5
  81. package/dist/types/core/standard-schema.d.ts +5 -0
  82. package/dist/types/deploy/artifacts.d.ts +6 -4
  83. package/dist/types/deploy/headers.d.ts +5 -0
  84. package/dist/types/deploy/platforms/types.d.ts +8 -0
  85. package/dist/types/deploy/redirects.d.ts +24 -13
  86. package/dist/types/markdown/directives.d.ts +62 -0
  87. package/dist/types/markdown/features.d.ts +21 -0
  88. package/dist/types/markdown/mdast.d.ts +63 -0
  89. package/dist/types/openapi/asyncapi.d.ts +4 -2
  90. package/docs/02-deployment.mdx +4 -2
  91. package/docs/08-faq.mdx +1 -1
  92. package/docs/advanced/custom-pages.mdx +3 -3
  93. package/docs/cli/audit.mdx +17 -1
  94. package/docs/cli/evals.mdx +3 -3
  95. package/docs/cli/translate.mdx +3 -3
  96. package/docs/cli/version.mdx +1 -1
  97. package/docs/configuration/analytics.mdx +20 -1
  98. package/docs/configuration/customization.mdx +2 -0
  99. package/docs/configuration/search.mdx +1 -1
  100. package/docs/content/components.mdx +1 -1
  101. package/docs/content/frontmatter.mdx +1 -1
  102. package/docs/content/i18n.mdx +2 -0
  103. package/docs/content/index.mdx +4 -2
  104. package/docs/content/islands.mdx +1 -1
  105. package/docs/content/meta.mdx +3 -1
  106. package/docs/content/sources.mdx +1 -5
  107. package/docs/content/syntax.mdx +14 -0
  108. package/docs/content/versioning.mdx +1 -1
  109. package/docs/discoverability/agent-discovery.mdx +1 -1
  110. package/docs/discoverability/index.mdx +2 -1
  111. package/docs/discoverability/markdown.mdx +2 -2
  112. package/docs/discoverability/open-graph.mdx +5 -3
  113. package/docs/discoverability/rss.mdx +1 -1
  114. package/docs/references/asyncapi.mdx +1 -1
  115. package/docs/references/graphql.mdx +1 -1
  116. package/docs/references/openapi.mdx +5 -3
  117. package/package.json +1 -1
  118. package/skills/blume-migrate/references/fumadocs.md +1 -1
  119. package/skills/blume-migrate/references/nextra.md +1 -1
  120. package/skills/blume-migrate/scripts/mintlify-codemod.mjs +7 -2
  121. package/src/ai/agent-readability.ts +2 -2
  122. package/src/ai/ai-catalog.ts +6 -2
  123. package/src/ai/api/handlers.ts +2 -2
  124. package/src/ai/api/spec.ts +2 -2
  125. package/src/ai/api-catalog.ts +6 -2
  126. package/src/ai/changelog-markdown.ts +2 -2
  127. package/src/ai/link-headers.ts +14 -5
  128. package/src/ai/llms.ts +18 -7
  129. package/src/ai/mcp/discovery.ts +2 -2
  130. package/src/ai/mcp/query.ts +2 -2
  131. package/src/ai/mcp/server.ts +2 -2
  132. package/src/ai/openapi-components.ts +22 -6
  133. package/src/ai/relative-links.ts +42 -26
  134. package/src/ai/serializers.ts +2 -1
  135. package/src/ai/skills.ts +14 -1
  136. package/src/ai/tar.ts +139 -12
  137. package/src/analytics/head.ts +4 -0
  138. package/src/analytics/index.ts +5 -0
  139. package/src/analytics/one-dollar-stats.ts +86 -0
  140. package/src/analytics/schema.ts +2 -0
  141. package/src/astro/generate.ts +1 -1
  142. package/src/astro/include-hmr.ts +31 -12
  143. package/src/astro/include-refresh.ts +19 -8
  144. package/src/astro/integration.ts +108 -14
  145. package/src/astro/runtime-modules.ts +28 -13
  146. package/src/astro/templates.ts +81 -37
  147. package/src/audit/checks/links.ts +8 -1
  148. package/src/audit/graph.ts +3 -1
  149. package/src/audit/run.ts +12 -9
  150. package/src/audit/snapshot.ts +5 -0
  151. package/src/cli/args.ts +32 -0
  152. package/src/cli/commands/audit.ts +4 -1
  153. package/src/cli/commands/doctor.ts +3 -1
  154. package/src/cli/commands/eval.ts +19 -11
  155. package/src/cli/commands/translate.ts +9 -12
  156. package/src/cli/commands/validate.ts +3 -1
  157. package/src/cli/dev-lock.ts +157 -37
  158. package/src/cli/report-format.ts +11 -6
  159. package/src/components/colors.ts +19 -0
  160. package/src/components/content/Badge.astro +5 -3
  161. package/src/components/content/Component.astro +2 -2
  162. package/src/components/content/Tab.astro +0 -1
  163. package/src/components/content/Tabs.astro +4 -0
  164. package/src/components/content/badge-color.ts +5 -2
  165. package/src/components/content/base-href.ts +13 -36
  166. package/src/components/islands/assistant.tsx +21 -4
  167. package/src/components/islands/base-path.ts +47 -10
  168. package/src/components/islands/hooks.ts +35 -19
  169. package/src/components/islands/webmcp.ts +4 -2
  170. package/src/components/layout/Breadcrumbs.astro +5 -2
  171. package/src/components/layout/DiscoveryLinks.astro +9 -5
  172. package/src/components/layout/Header.astro +2 -2
  173. package/src/components/layout/LanguageSwitcher.astro +2 -2
  174. package/src/components/layout/NavSelector.astro +2 -2
  175. package/src/components/layout/NavTabMenu.astro +3 -3
  176. package/src/components/layout/NavTree.astro +16 -6
  177. package/src/components/layout/PageActions.astro +4 -3
  178. package/src/components/layout/PageLayout.astro +7 -6
  179. package/src/components/layout/Pagination.astro +3 -3
  180. package/src/components/layout/RootLayout.astro +5 -5
  181. package/src/components/layout/Search.astro +33 -13
  182. package/src/components/layout/VersionBanner.astro +2 -2
  183. package/src/components/layout/analytics-client.ts +12 -0
  184. package/src/components/layout/toc-active.ts +41 -0
  185. package/src/components/layout/toc-element.ts +8 -14
  186. package/src/components/openapi/ApiTagOperations.astro +2 -2
  187. package/src/components/openapi/AsyncApiOperation.astro +7 -4
  188. package/src/components/openapi/GraphqlChip.astro +2 -2
  189. package/src/components/openapi/Operation.astro +2 -0
  190. package/src/components/openapi/Playground.astro +4 -4
  191. package/src/components/openapi/RequestPanel.astro +5 -2
  192. package/src/components/openapi/SchemaTable.astro +7 -0
  193. package/src/components/openapi/async.ts +38 -6
  194. package/src/components/openapi/helpers.ts +19 -9
  195. package/src/components/openapi/message-composer.ts +6 -1
  196. package/src/components/openapi/message.ts +17 -2
  197. package/src/components/openapi/operation-model.ts +81 -11
  198. package/src/components/openapi/panel.ts +4 -2
  199. package/src/components/openapi/param-style.ts +181 -0
  200. package/src/components/openapi/playground-client.ts +73 -16
  201. package/src/components/openapi/request.ts +190 -26
  202. package/src/components/openapi/schema-tree.ts +30 -24
  203. package/src/components/openapi/snippets.ts +85 -6
  204. package/src/components/openapi/ws-client.ts +18 -2
  205. package/src/core/base-path.ts +62 -16
  206. package/src/core/config-input.ts +9 -7
  207. package/src/core/diagnostics.ts +2 -0
  208. package/src/core/directive-diagnostics.ts +99 -0
  209. package/src/core/frontmatter.ts +21 -18
  210. package/src/core/heading-markers.ts +5 -18
  211. package/src/core/i18n.ts +31 -3
  212. package/src/core/last-modified.ts +25 -3
  213. package/src/core/locale-links.ts +5 -1
  214. package/src/core/meta.ts +33 -19
  215. package/src/core/navigation.ts +28 -8
  216. package/src/core/project-graph.ts +27 -5
  217. package/src/core/schema.ts +24 -4
  218. package/src/core/sources/contentful-rich-text.ts +27 -20
  219. package/src/core/sources/filesystem.ts +20 -2
  220. package/src/core/sources/github-releases.ts +25 -6
  221. package/src/core/sources/lexical.ts +23 -18
  222. package/src/core/sources/lower.ts +201 -34
  223. package/src/core/sources/mdx-remote.ts +51 -16
  224. package/src/core/sources/normalize.ts +325 -90
  225. package/src/core/sources/notion.ts +52 -25
  226. package/src/core/sources/obsidian.ts +23 -6
  227. package/src/core/sources/portable-text.ts +38 -21
  228. package/src/core/sources/strapi-blocks.ts +20 -16
  229. package/src/core/sources/watch.ts +20 -7
  230. package/src/core/standard-schema.ts +10 -6
  231. package/src/core/version-cut.ts +52 -15
  232. package/src/deploy/artifacts.ts +27 -6
  233. package/src/deploy/cloudflare-negotiation.ts +4 -12
  234. package/src/deploy/headers.ts +8 -4
  235. package/src/deploy/node-headers.ts +1 -1
  236. package/src/deploy/platforms/cloudflare.ts +12 -3
  237. package/src/deploy/platforms/netlify.ts +1 -0
  238. package/src/deploy/platforms/node.ts +1 -0
  239. package/src/deploy/platforms/static.ts +1 -0
  240. package/src/deploy/platforms/types.ts +8 -0
  241. package/src/deploy/platforms/vercel.ts +1 -0
  242. package/src/deploy/redirects.ts +54 -18
  243. package/src/deploy/robots.ts +2 -2
  244. package/src/deploy/rss.ts +4 -3
  245. package/src/deploy/sitemap.ts +7 -5
  246. package/src/markdown/base-links.ts +34 -36
  247. package/src/markdown/directives.ts +242 -36
  248. package/src/markdown/features.ts +17 -0
  249. package/src/markdown/index.ts +7 -6
  250. package/src/markdown/mdast.ts +5 -2
  251. package/src/markdown/relative-links.ts +12 -4
  252. package/src/og/card.ts +129 -5
  253. package/src/og/derive.ts +41 -31
  254. package/src/og/index.ts +1 -0
  255. package/src/openapi/asyncapi.ts +4 -2
  256. package/src/openapi/model.ts +22 -14
  257. package/src/openapi/proxy.ts +63 -10
  258. package/src/openapi/render-mdx.ts +41 -2
  259. package/src/registry/eject.ts +181 -24
  260. package/src/search/adapters/version-scope.ts +30 -0
  261. package/src/search/documents.ts +67 -26
  262. package/src/search/popular.ts +2 -1
  263. package/src/seo/jsonld.ts +7 -3
  264. package/src/translate/meta.ts +68 -24
  265. package/src/translate/run.ts +3 -3
  266. package/src/translate/validate.ts +4 -1
  267. package/src/translate/work-list.ts +56 -17
  268. package/dist/cli/chunk-5r8g91qn.js.map +0 -34
  269. package/dist/cli/chunk-7mbqtmgb.js.map +0 -10
  270. package/dist/cli/chunk-ddndchfr.js.map +0 -14
  271. package/dist/cli/chunk-esh98wmb.js +0 -23
  272. package/dist/cli/chunk-esh98wmb.js.map +0 -10
  273. package/dist/cli/chunk-hr8ne106.js.map +0 -13
  274. package/dist/cli/chunk-j85scx15.js.map +0 -10
  275. package/dist/cli/chunk-pbg5a4s3.js.map +0 -19
  276. package/dist/cli/chunk-wdrt2k2v.js.map +0 -10
  277. /package/dist/cli/{chunk-6k4ftwze.js.map → chunk-1d7ve1dm.js.map} +0 -0
  278. /package/dist/cli/{chunk-zp79m0ts.js.map → chunk-2eytanqx.js.map} +0 -0
  279. /package/dist/cli/{chunk-g698a744.js.map → chunk-2z928egk.js.map} +0 -0
  280. /package/dist/cli/{chunk-mqc662a6.js.map → chunk-364znk6q.js.map} +0 -0
  281. /package/dist/cli/{chunk-k7pj68a8.js.map → chunk-5f86nr5m.js.map} +0 -0
  282. /package/dist/cli/{chunk-91ws1n6j.js.map → chunk-5xvm6tfj.js.map} +0 -0
  283. /package/dist/cli/{chunk-w4bxdvsa.js.map → chunk-6dsbexzp.js.map} +0 -0
  284. /package/dist/cli/{chunk-00gs3wqs.js.map → chunk-8ktnccpt.js.map} +0 -0
  285. /package/dist/cli/{chunk-bbnwccaz.js.map → chunk-a58773jm.js.map} +0 -0
  286. /package/dist/cli/{chunk-sqw4ekg1.js.map → chunk-b07cmahc.js.map} +0 -0
  287. /package/dist/cli/{chunk-4e9b9ra6.js.map → chunk-ey84smr6.js.map} +0 -0
  288. /package/dist/cli/{chunk-d1v5rhy0.js.map → chunk-g4hq16wv.js.map} +0 -0
  289. /package/dist/cli/{chunk-qkb5a8sa.js.map → chunk-pehfxfta.js.map} +0 -0
  290. /package/dist/cli/{chunk-fsmrqk8a.js.map → chunk-r20tn01b.js.map} +0 -0
  291. /package/dist/cli/{chunk-bfwp9vp6.js.map → chunk-r9rcc4w7.js.map} +0 -0
  292. /package/dist/cli/{chunk-h7k3nq3v.js.map → chunk-tkacnehg.js.map} +0 -0
  293. /package/dist/cli/{chunk-h2ez8dzb.js.map → chunk-tzmab476.js.map} +0 -0
@@ -48,6 +48,8 @@ export { logrocket } from "./logrocket.ts";
48
48
  export type { LogrocketAdapter, LogrocketOptions } from "./logrocket.ts";
49
49
  export { mixpanel } from "./mixpanel.ts";
50
50
  export type { MixpanelAdapter, MixpanelOptions, MixpanelRegion, } from "./mixpanel.ts";
51
+ export { oneDollarStats } from "./one-dollar-stats.ts";
52
+ export type { OneDollarStatsAdapter, OneDollarStatsOptions, } from "./one-dollar-stats.ts";
51
53
  export { pirsch } from "./pirsch.ts";
52
54
  export type { PirschAdapter, PirschOptions } from "./pirsch.ts";
53
55
  export { plausible } from "./plausible.ts";
@@ -0,0 +1,48 @@
1
+ import { z } from "zod";
2
+ import type { AdapterDescriptor } from "../core/adapter.ts";
3
+ import type { HeadScript } from "./head.ts";
4
+ /** The script OneDollarStats' install snippet loads. */
5
+ export declare const ONE_DOLLAR_STATS_SCRIPT_SRC = "https://assets.onedollarstats.com/stonks.js";
6
+ /** The options {@link oneDollarStats} checks itself. */
7
+ export interface OneDollarStatsNamedOptions {
8
+ /**
9
+ * A bare host name, e.g. `docs.example.com`. The tracker reports every
10
+ * event under it on every host, not just `localhost`.
11
+ */
12
+ hostname?: string;
13
+ }
14
+ /**
15
+ * Options for {@link oneDollarStats}: any tracker setting, forwarded as a
16
+ * `data-` attribute on the tag (`hostname` → `data-hostname`, `devmode`,
17
+ * `url`, `autocollect`, `"hash-routing"`, …).
18
+ */
19
+ export type OneDollarStatsOptions = OneDollarStatsNamedOptions & {
20
+ [setting: string]: string;
21
+ };
22
+ export declare const oneDollarStatsOptionsSchema: z.ZodObject<{
23
+ hostname: z.ZodOptional<z.ZodString>;
24
+ }, z.core.$catchall<z.ZodString>>;
25
+ export type OneDollarStatsAdapter = AdapterDescriptor<"one-dollar-stats", OneDollarStatsOptions>;
26
+ export declare const oneDollarStatsAdapterSchema: z.ZodObject<{
27
+ kind: z.ZodLiteral<"one-dollar-stats">;
28
+ options: z.ZodObject<{
29
+ hostname: z.ZodOptional<z.ZodString>;
30
+ }, z.core.$catchall<z.ZodString>>;
31
+ requiredSecrets: z.ZodArray<z.ZodString>;
32
+ runtimeDeps: z.ZodArray<z.ZodString>;
33
+ }, z.core.$strict>;
34
+ /**
35
+ * OneDollarStats. Needs no keys — the dashboard matches events to a site by
36
+ * the domain they come from.
37
+ */
38
+ export declare const oneDollarStats: (options?: OneDollarStatsOptions) => OneDollarStatsAdapter;
39
+ /**
40
+ * The deferred tag from the install instructions, with every option as its
41
+ * own `data-` attribute. The tracker reads them from `document.currentScript`,
42
+ * so the tag stays a classic external script. It hooks `pushState` and
43
+ * `popstate` itself, so client-router navigations need no extra hook.
44
+ *
45
+ * The tracker turns hash routing on whenever `data-hash-routing` is present,
46
+ * whatever its value, so `"hash-routing": "false"` leaves the attribute off.
47
+ */
48
+ export declare const oneDollarStatsHead: (options: OneDollarStatsOptions) => HeadScript[];
@@ -106,6 +106,13 @@ export declare const analyticsAdapterSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
106
106
  }, z.core.$catchall<z.ZodJSONSchema>>;
107
107
  requiredSecrets: z.ZodArray<z.ZodString>;
108
108
  runtimeDeps: z.ZodArray<z.ZodString>;
109
+ }, z.core.$strict>, z.ZodObject<{
110
+ kind: z.ZodLiteral<"one-dollar-stats">;
111
+ options: z.ZodObject<{
112
+ hostname: z.ZodOptional<z.ZodString>;
113
+ }, z.core.$catchall<z.ZodString>>;
114
+ requiredSecrets: z.ZodArray<z.ZodString>;
115
+ runtimeDeps: z.ZodArray<z.ZodString>;
109
116
  }, z.core.$strict>, z.ZodObject<{
110
117
  kind: z.ZodLiteral<"pirsch">;
111
118
  options: z.ZodObject<{
@@ -275,6 +282,13 @@ export declare const analyticsConfigSchema: z.ZodDefault<z.ZodArray<z.ZodDiscrim
275
282
  }, z.core.$catchall<z.ZodJSONSchema>>;
276
283
  requiredSecrets: z.ZodArray<z.ZodString>;
277
284
  runtimeDeps: z.ZodArray<z.ZodString>;
285
+ }, z.core.$strict>, z.ZodObject<{
286
+ kind: z.ZodLiteral<"one-dollar-stats">;
287
+ options: z.ZodObject<{
288
+ hostname: z.ZodOptional<z.ZodString>;
289
+ }, z.core.$catchall<z.ZodString>>;
290
+ requiredSecrets: z.ZodArray<z.ZodString>;
291
+ runtimeDeps: z.ZodArray<z.ZodString>;
278
292
  }, z.core.$strict>, z.ZodObject<{
279
293
  kind: z.ZodLiteral<"pirsch">;
280
294
  options: z.ZodObject<{
@@ -53,8 +53,9 @@ export interface BlumeIntegrationOptions {
53
53
  /**
54
54
  * Homepage `Link` header value for agent discovery (see
55
55
  * `ai/link-headers.ts`); the dev-server counterpart of the `_headers` /
56
- * Vercel-config emission, so `curl -I` against `blume dev` shows what the
57
- * deployed site will send. Published the same way as `contentRoutes`.
56
+ * Vercel-config emission, so `curl -I` against `blume dev` shows it too —
57
+ * built for the `"dev"` surface, which leaves out the targets only a build
58
+ * writes. Published the same way as `contentRoutes`.
58
59
  */
59
60
  homeLinkHeader?: string;
60
61
  /**
@@ -48,16 +48,18 @@ export declare const isExternalUrl: (target: string) => boolean;
48
48
  /**
49
49
  * Idempotently prepend `basePath` to a root-relative route. A route already
50
50
  * equal to or nested under the base is returned unchanged, so authors who write
51
- * the base by hand (`/docs/x`) aren't double-prefixed to `/docs/docs/x`.
51
+ * the base by hand (`/docs/x`, `/docs#install`) aren't double-prefixed to
52
+ * `/docs/docs/x`.
52
53
  */
53
54
  export declare const withBasePath: (basePath: string, route: string) => string;
54
55
  /**
55
- * Mount a route Blume generates from content under `basePath`,
56
- * unconditionally. {@link withBasePath} leaves a route that already starts
57
- * with the base alone, which is right for a link an author based by hand but
58
- * wrong for a content route: with `basePath: "/docs"`, `docs/guide.md` routes
59
- * to `/docs/guide` before the base and publishes at `/docs/docs/guide`, not on
60
- * top of the root `guide.md`.
56
+ * Mount a route Blume generates under a base, unconditionally: `basePath` for
57
+ * a content route, `deployment.base` for any generated URL (a sitemap entry,
58
+ * a feed item). {@link withBasePath} leaves a route that already starts with
59
+ * the base alone, which is right for a link an author based by hand but wrong
60
+ * for a generated route: with `basePath: "/docs"`, `docs/guide.md` routes to
61
+ * `/docs/guide` before the base and publishes at `/docs/docs/guide`, not on
62
+ * top of the root `guide.md` — and likewise under `deployment.base: "/docs"`.
61
63
  */
62
64
  export declare const mountBasePath: (basePath: string, route: string) => string;
63
65
  /**
@@ -69,6 +71,18 @@ export declare const mountBasePath: (basePath: string, route: string) => string;
69
71
  * and a route already under the full composite is returned unchanged.
70
72
  */
71
73
  export declare const withComposedBasePath: (deployBase: string, basePath: string, route: string) => string;
74
+ /**
75
+ * Base a root-relative link an author wrote as if mounted at root — a content
76
+ * link (`markdown/base-links.ts`, `components/content/base-href.ts`) or a
77
+ * redirect target (`deploy/redirects.ts`) — by what it names. A page gains the
78
+ * composed stack ({@link withComposedBasePath}). A public asset — a path whose
79
+ * final segment carries a file extension, with no page served there (a dotted
80
+ * route like `/releases/v1.2` is still a page) — gains the deployment base
81
+ * alone: Astro serves `public/` under `deployment.base`, but never under
82
+ * `basePath`. `servesPage` answers whether a page is served at a
83
+ * `basePath`-prefixed, fragment-less path. Other targets pass through.
84
+ */
85
+ export declare const withAuthoredBasePath: (deployBase: string, basePath: string, target: string, servesPage: (route: string) => boolean) => string;
72
86
  /**
73
87
  * Remove `basePath` from the front of a route (`/docs/guide` -> `/guide`,
74
88
  * `/docs` -> `/`). A route not under the base is returned unchanged. Inverse of
@@ -850,13 +850,15 @@ export interface OgConfig {
850
850
  */
851
851
  enabled?: boolean;
852
852
  /**
853
- * Fonts for the generated card, extending Takumi's Latin-only default so
854
- * non-Latin titles (CJK, and so on) render instead of tofu. A bare string is
855
- * a Google Fonts family fetched at build; the name-only object form pins
856
- * weights (`700`, `[400, 700]`, or a `"100..900"` variable range) and
857
- * styles; the `src` form reads a local font file from the project instead.
858
- * When omitted and `theme.fonts` is explicitly configured, the theme's
859
- * display and body fonts are used automatically — pass `[]` to opt out.
853
+ * Fonts for the generated card, replacing the default stack: Takumi's
854
+ * Latin-only built-in font plus a Noto fallback per script, which a card
855
+ * fetches only when its text needs one. A bare string is a Google Fonts
856
+ * family fetched at build; the name-only object form pins weights (`700`,
857
+ * `[400, 700]`, or a `"100..900"` variable range) and styles; the `src`
858
+ * form reads a local font file from the project instead. When omitted and
859
+ * `theme.fonts` is explicitly configured, the theme's display and body
860
+ * fonts are used automatically, ahead of the fallbacks — pass `[]` to opt
861
+ * out of both.
860
862
  */
861
863
  fonts?: (string | {
862
864
  name: string;
@@ -0,0 +1,12 @@
1
+ import type { SourceEntry } from "./sources/types.ts";
2
+ import type { Diagnostic } from "./types.ts";
3
+ /**
4
+ * Warn about each `:::name` container in an `.mdx` entry that isn't a callout.
5
+ * The page keeps its content — the body renders between the literal `:::`
6
+ * lines (see `markdown/directives.ts`) — but a typo like `:::warnig`, or a
7
+ * `:::details` carried over from another docs tool, should read as the
8
+ * mistake it is rather than as a finished page. Lines point into the file
9
+ * the author wrote, a partial's own file for a container an `<include>`
10
+ * brought in.
11
+ */
12
+ export declare const unknownDirectiveDiagnostics: (entry: SourceEntry, sourceName: string) => Diagnostic[];
@@ -44,11 +44,9 @@ export interface HeadingMarkers {
44
44
  * the heading count (mid-text brackets are ordinary prose); when a marker kind
45
45
  * repeats, the last one written wins.
46
46
  *
47
- * `isRefDefined` reports whether a link-reference definition exists for a
48
- * bracket's label (`toc`, `!toc`, `#id`): a defined bracket is a CommonMark
49
- * shortcut link, not a marker — the renderer sees a resolved `<a>` element
50
- * there and strips nothing at or before it, so the parse stops the same way.
51
- * The render-time hast plugin never passes it (resolved links are already
52
- * elements by the time it runs); the raw-source scanner does.
47
+ * Callers pass the heading's trailing text node after a Markdown parse, so a
48
+ * bracket that a link-reference definition turns into a CommonMark shortcut
49
+ * link (`[toc]` with a `[toc]: …` definition) is already an element there and
50
+ * never reaches this parse.
53
51
  */
54
- export declare const parseHeadingMarkers: (text: string, isRefDefined?: (label: string) => boolean) => HeadingMarkers;
52
+ export declare const parseHeadingMarkers: (text: string) => HeadingMarkers;
@@ -89,5 +89,7 @@ export declare const localeTargetPath: (rel: string, ext: string, locale: string
89
89
  * recognizes) but aren't declared in `i18n.locales`. Without this they're
90
90
  * silently treated as default-locale content under a `/<code>/…` route, which
91
91
  * is almost never intended — usually a translation that wasn't registered.
92
+ * A folder named after the default locale gets the same treatment (see
93
+ * {@link defaultLocaleFolderDiagnostic}).
92
94
  */
93
95
  export declare const i18nDiagnostics: (pages: PageRecord[], i18n: ResolvedI18nConfig, versions?: ResolvedVersionsConfig) => Diagnostic[];
@@ -13,6 +13,16 @@ export declare const resolveLastModifiedConfig: (value: false | "git" | "frontma
13
13
  * newest-first, the first date seen for a path wins. Blank lines are ignored.
14
14
  */
15
15
  export declare const parseGitLog: (output: string) => Map<string, string>;
16
+ /**
17
+ * `path` with every symlink resolved, the spelling git prints paths in: a
18
+ * project opened through a link (`/tmp/site` on macOS, where `/tmp` links to
19
+ * `/private/tmp`) gets `/private/tmp/site` from `rev-parse --show-toplevel`,
20
+ * so the project's own spelling would compare as outside the repository and
21
+ * every page would go undated. The native realpath also expands a Windows
22
+ * 8.3 short name (`RUNNER~1`), which git does too. A path that doesn't exist
23
+ * stays as written.
24
+ */
25
+ export declare const realPath: (path: string) => string;
16
26
  /**
17
27
  * The toplevel of the repository containing `root`, or null when git is
18
28
  * unavailable or the project isn't a repo. Callers use it to decide which
@@ -11,6 +11,14 @@ export interface FolderMetaSource {
11
11
  include?: readonly string[];
12
12
  exclude?: readonly string[];
13
13
  }
14
+ /**
15
+ * The folder-meta files a filesystem source contributes: `patterns` (every
16
+ * meta module name, shared `meta.$.*` included, by default) under the source's
17
+ * root, minus its `exclude` globs, dependencies, and build output, and only in
18
+ * folders its `include` globs reach. `blume translate` finds the meta files it
19
+ * translates through this too, so it covers exactly the ones the scan reads.
20
+ */
21
+ export declare const findFolderMetaFiles: (source: FolderMetaSource, patterns?: readonly string[]) => Promise<string[]>;
14
22
  /**
15
23
  * Discover `meta.{ts,js,mjs}` files across the given filesystem sources. Keys are
16
24
  * the source's route prefix joined with the directory relative to that source's
@@ -1014,6 +1014,13 @@ export declare const blumeConfigSchema: z.ZodObject<{
1014
1014
  }, z.core.$catchall<z.ZodJSONSchema>>;
1015
1015
  requiredSecrets: z.ZodArray<z.ZodString>;
1016
1016
  runtimeDeps: z.ZodArray<z.ZodString>;
1017
+ }, z.core.$strict>, z.ZodObject<{
1018
+ kind: z.ZodLiteral<"one-dollar-stats">;
1019
+ options: z.ZodObject<{
1020
+ hostname: z.ZodOptional<z.ZodString>;
1021
+ }, z.core.$catchall<z.ZodString>>;
1022
+ requiredSecrets: z.ZodArray<z.ZodString>;
1023
+ runtimeDeps: z.ZodArray<z.ZodString>;
1017
1024
  }, z.core.$strict>, z.ZodObject<{
1018
1025
  kind: z.ZodLiteral<"pirsch">;
1019
1026
  options: z.ZodObject<{
@@ -4,6 +4,10 @@
4
4
  * blocks) renders inline runs, wraps them in block syntax, and joins blocks
5
5
  * with blank lines; these helpers keep that Markdown identical across them.
6
6
  */
7
+ /**
8
+ * CMS text as Markdown that renders as written, wherever it lands — a link
9
+ * label included, where GFM autolinks nothing, so every special is escaped.
10
+ */
7
11
  export declare const escapeMarkdownText: (text: string) => string;
8
12
  /** The marks a lowerer can put on an inline run. */
9
13
  export interface InlineMarks {
@@ -12,6 +16,17 @@ export interface InlineMarks {
12
16
  italic?: boolean;
13
17
  strike?: boolean;
14
18
  }
19
+ /** A run of CMS text and the marks on it. */
20
+ export interface InlineRun {
21
+ marks: InlineMarks;
22
+ text: string;
23
+ }
24
+ /** Inline Markdown a lowerer rendered itself: a link, an embed, a break. */
25
+ export interface InlineMarkdown {
26
+ markdown: string;
27
+ }
28
+ /** One piece of a block's inline content, in order. */
29
+ export type InlinePart = InlineMarkdown | InlineRun;
15
30
  /**
16
31
  * A code span whose delimiter outruns any backtick run inside it, padded with
17
32
  * a space on each side when the code starts or ends with a backtick (the
@@ -22,28 +37,26 @@ export declare const codeSpan: (code: string) => string;
22
37
  * A block's inline text, guarded where only the whole block can tell. Runs
23
38
  * are escaped one at a time, but "import" ending one run and a space or code
24
39
  * span opening the next form an MDX `import` statement only once they are
25
- * joined, and whitespace the first runs put in front of a block turns it into
26
- * an indented code block. Apply it to the joined text of a paragraph,
27
- * heading, quote, or list item — never to code.
40
+ * joined, whitespace the first runs put in front of a block turns it into
41
+ * an indented code block, two struck runs fuse into literal tildes, and a
42
+ * trailing ` #` is a heading's closing sequence. Apply it to the joined text
43
+ * of a paragraph, heading, quote, or list item — never to code.
28
44
  */
29
45
  export declare const guardBlockStart: (text: string) => string;
30
- /**
31
- * Wrap a text run in the Markdown for its marks. Code stays verbatim inside
32
- * the backticks (an escape would render as a backslash); everything else is
33
- * escaped first. Whitespace at either edge moves outside the delimiters,
34
- * since `** bold **` is not strong emphasis but `**bold**` is — editors
35
- * routinely bold a word together with the space after it.
36
- */
37
- export declare const renderInline: (text: string, marks: InlineMarks) => string;
46
+ /** A block's inline content as Markdown. */
47
+ export declare const renderInline: (parts: InlinePart[]) => string;
38
48
  /** A link or image destination as Markdown carries it verbatim. */
39
49
  export declare const destination: (url: string) => string;
40
50
  /**
41
- * A Markdown link, or the label alone when the target is missing — or unsafe:
42
- * CMS content is the editor's, not the site author's, so a destination that
43
- * isn't a web, mail, or relative address (`javascript:`, `data:`) never
44
- * becomes a clickable link on the docs site (see `safe-links.ts`).
51
+ * A Markdown link over inline parts, or the parts alone when the target is
52
+ * missing — or unsafe: CMS content is the editor's, not the site author's, so
53
+ * a destination that isn't a web, mail, or relative address (`javascript:`,
54
+ * `data:`) never becomes a clickable link on the docs site (see
55
+ * `safe-links.ts`). The parts stay parts then, so their runs merge with their
56
+ * neighbors'. A label escapes a bare URL too: GFM autolinks nothing inside a
57
+ * link, so its specials would read as syntax.
45
58
  */
46
- export declare const renderLink: (label: string, href?: string) => string;
59
+ export declare const linkParts: (parts: InlinePart[], href?: string) => InlinePart[];
47
60
  /** The ATX prefix for a heading level, clamped to Markdown's six. */
48
61
  export declare const headingPrefix: (level: number) => string;
49
62
  /** Quote every line of a block. */
@@ -21,6 +21,15 @@ export declare const slugify: (text: string) => string;
21
21
  * document. Each segment is slugged on its own and the separators kept.
22
22
  */
23
23
  export declare const slugifyPath: (text: string) => string;
24
+ /**
25
+ * The error for a content file Astro's content loader can't read, or
26
+ * undefined when it can. A `#` or `?` anywhere in the path the loader is
27
+ * handed (`sdks/c#.md`, `faq/why?.md`) truncates the file URL it reads
28
+ * through, so the read fails with ENOENT and the page renders "Page not
29
+ * found" at its route. A source leaves such a file out of its scan and
30
+ * reports this instead of publishing a route that can never render.
31
+ */
32
+ export declare const unloadablePathDiagnostic: (path: string, file: string) => Diagnostic | undefined;
24
33
  export declare const HTML_COMMENT: RegExp;
25
34
  export declare const INLINE_CODE: RegExp;
26
35
  /** A heading whose trailing `{#id}` marker is unescaped — see `BARE_CURLY_MARKER`. */
@@ -54,7 +63,10 @@ export interface BodyScan {
54
63
  /**
55
64
  * Scan a body for its headings, explicit HTML anchors, and unescaped `{#id}`
56
65
  * markers in one fence-aware walk (the same walk `extractHeadings` exposes for
57
- * headings alone).
66
+ * headings alone). The body is the page's content with its front matter
67
+ * already stripped — the renderers read front matter off the page and never
68
+ * again from its body — so a leading `---` block is a thematic break and
69
+ * content, in `.md` and `.mdx` alike.
58
70
  */
59
71
  export declare const scanBody: (body: string) => BodyScan;
60
72
  export declare const extractHeadings: (body: string) => Heading[];
@@ -32,14 +32,21 @@ export declare const baselineScanIgnore: () => string[];
32
32
  * the scan share the same never-content directory set.
33
33
  */
34
34
  export declare const BLUME_WATCH_IGNORE_DIRS: string[];
35
- /** Extract single-segment ignore dirs (`foo`) from `foo/**`-style excludes. */
35
+ /**
36
+ * Extract root-anchored ignore dirs (`/foo`) from `foo/**`-style excludes. The
37
+ * scan's glob `foo/**` matches `foo` at the source root only, so the watcher
38
+ * skips that one directory: a nested `guides/foo/` is still content, and an
39
+ * edit there must still reload.
40
+ */
36
41
  export declare const excludeDirSegments: (patterns: readonly string[]) => string[];
37
42
  /**
38
43
  * Build a recursive-watch listener that fires `onChange` for content changes but
39
- * ignores events whose path crosses an ignored directory segment — one in
40
- * `ignoreDirs`, or one `ignoreSegment` rejects, for a scan whose skip rule is
41
- * a shape (every dot-name) rather than a list. A missing `filename` — rare;
42
- * the platform couldn't name the changed path — falls through to `onChange`
44
+ * ignores events whose path crosses an ignored directory — a segment named in
45
+ * `ignoreDirs` at any depth, or one `ignoreSegment` rejects, for a scan whose
46
+ * skip rule is a shape (every dot-name) rather than a list. An entry written
47
+ * with a leading slash (`/drafts`, see {@link excludeDirSegments}) names a
48
+ * directory at the watched root only. A missing `filename` — rare; the
49
+ * platform couldn't name the changed path — falls through to `onChange`
43
50
  * rather than silently dropping a real edit. Exported for testing.
44
51
  */
45
52
  export declare const ignoringWatchListener: (onChange: () => void, ignoreDirs?: Iterable<string>, ignoreSegment?: (segment: string) => boolean) => WatchListener<string>;
@@ -41,5 +41,10 @@ export interface StandardSchema<Input = unknown, Output = Input> {
41
41
  * Whether a config-supplied value implements the `~standard` contract. Generic
42
42
  * so it can decode any input at the config boundary (`z.custom` hands it the
43
43
  * raw config value) while narrowing whatever type the caller holds.
44
+ *
45
+ * The contract is the `~standard` property, whatever carries it: Zod and
46
+ * Valibot schemas are objects, but an ArkType type is a callable function. The
47
+ * optional-chained probe reads the property off either, and off `null`,
48
+ * `undefined`, or a primitive it finds nothing.
44
49
  */
45
50
  export declare const isStandardSchema: <T>(value: T) => value is T & StandardSchema;
@@ -8,10 +8,12 @@ import type { BlumeProject } from "../core/project-graph.ts";
8
8
  * Written from the integration's `astro:build:done` hook — Astro's channel
9
9
  * for exactly this kind of post-build work — into the directory Astro
10
10
  * reports as the client output (`dist/`, or `dist/client` for a server
11
- * build). The Vercel adapter copies that directory into its Build Output
12
- * static tree in a later hook, so the artifacts ride along; every other
13
- * adapter serves it directly. Running inside the hook rather than after
14
- * `astro build` returns means an ejected project keeps producing them.
11
+ * build, or `dist/client/<base>/` on Cloudflare, whose `_headers` goes to
12
+ * the root the platform serves above it). The Vercel adapter copies that
13
+ * directory into its Build Output static tree in a later hook, so the
14
+ * artifacts ride along; every other adapter serves it directly. Running
15
+ * inside the hook rather than after `astro build` returns means an ejected
16
+ * project keeps producing them.
15
17
  *
16
18
  * Every file yields to one the user ships in `public/` (Astro copied it into
17
19
  * the output before this runs).
@@ -65,6 +65,11 @@ export interface VercelHeader {
65
65
  }[];
66
66
  source: string;
67
67
  }
68
+ /**
69
+ * A literal path as `path-to-regexp` source text — what a `vercel.json`
70
+ * `source` is — with each syntax character escaped, so it matches only itself.
71
+ */
72
+ export declare const escapeVercelSource: (path: string) => string;
68
73
  /**
69
74
  * The {@link headerRules} as `vercel.json` `headers` entries. Vercel reads no
70
75
  * `_headers` file, so a static deploy of `dist/` carries the same rules here —
@@ -103,6 +103,14 @@ export interface DeployPlatform {
103
103
  readsHeaderFiles: Record<DeployOutput, boolean>;
104
104
  /** The redirect files a static build writes, beside the manifest. */
105
105
  redirectFiles: RedirectFile[];
106
+ /**
107
+ * Whether the adapter moves a server build's client output under
108
+ * `deployment.base` (`dist/client/<base>/`, the directory Astro then hands
109
+ * `astro:build:done`) while the platform keeps serving `serverStaticDir`
110
+ * as the assets root. The files the platform reads there, like `_headers`,
111
+ * belong above the directory Astro reports.
112
+ */
113
+ serverClientUnderBase: boolean;
106
114
  /** Where a server build's deploy bundle lands. */
107
115
  serverOutputDir: (context: ProjectContext) => string;
108
116
  /** The directory a server build serves as static files. */
@@ -1,3 +1,5 @@
1
+ import type { RouteSet } from "../core/locale-links.ts";
2
+ import type { BlumeProject } from "../core/project-graph.ts";
1
3
  import type { ResolvedConfig } from "../core/schema.ts";
2
4
  import type { VercelHeader } from "./headers.ts";
3
5
  /**
@@ -15,29 +17,36 @@ type Redirect = ResolvedConfig["redirects"][number];
15
17
  * - `from` gains only `basePath`. Astro builds the match pattern with
16
18
  * `deployment.base` already applied (`getPattern(segments, config.base)`), so
17
19
  * adding it here would serve the redirect at `{base}{base}/from`.
18
- * - `to` gains the full `{deployment.base}{basePath}` stack. Astro resolves a
19
- * destination that matches a known route by regenerating it from that route's
20
- * segments, which carry no base — and passes an unmatched destination through
21
- * verbatim. Neither path prepends `base`, so a root-relative `to` escapes the
22
- * base entirely (withastro/astro#7774, still the behavior in Astro 7).
20
+ * - `to` gains the full `{deployment.base}{basePath}` stack, or the deployment
21
+ * base alone for a public file (see {@link baseRedirectTarget}). Astro
22
+ * resolves a destination that matches a known route by regenerating it from
23
+ * that route's segments, which carry no base — and passes an unmatched
24
+ * destination through verbatim. Neither path prepends `base`, so a
25
+ * root-relative `to` escapes the base entirely (withastro/astro#7774, still
26
+ * the behavior in Astro 7).
23
27
  *
24
- * Both sides are authored as if mounted at root; external `to` URLs pass
25
- * through. Idempotent, so a hand-written base isn't doubled.
28
+ * Both sides are authored as if mounted at root; `routes` (the served page
29
+ * routes, carrying `basePath`) tell a dotted page route like `/releases/v1.2`
30
+ * from a file. Idempotent, so a hand-written base isn't doubled.
26
31
  */
27
- export declare const applyBaseToAstroRedirects: (redirects: Redirect[], basePath: string, deployBase: string) => Redirect[];
32
+ export declare const applyBaseToAstroRedirects: (redirects: Redirect[], basePath: string, deployBase: string, routes: RouteSet) => Redirect[];
28
33
  /**
29
34
  * Base a redirect for the host platform files below. Unlike Astro's config,
30
- * these are matched against the real served URL, so both sides carry the full
31
- * `{deployment.base}{basePath}` stack.
35
+ * these are matched against the real served URL, so `from` carries the full
36
+ * `{deployment.base}{basePath}` stack, and so does `to` unless it names a
37
+ * public file (see {@link baseRedirectTarget}).
32
38
  */
33
- export declare const applyBaseToPlatformRedirects: (redirects: Redirect[], basePath: string, deployBase: string) => Redirect[];
39
+ export declare const applyBaseToPlatformRedirects: (redirects: Redirect[], basePath: string, deployBase: string, routes: RouteSet) => Redirect[];
34
40
  /**
35
41
  * The configured redirects as the host platform matches them, via
36
42
  * {@link applyBaseToPlatformRedirects}. The one basing every consumer must
37
43
  * share: the emitted redirect files and the Cloudflare worker-first redirect
38
44
  * exemptions both compare these paths against real served URLs.
39
45
  */
40
- export declare const platformRedirects: (config: ResolvedConfig) => Redirect[];
46
+ export declare const platformRedirects: (project: {
47
+ config: ResolvedConfig;
48
+ manifest: Pick<BlumeProject["manifest"], "routes">;
49
+ }) => Redirect[];
41
50
  /**
42
51
  * `_redirects` text (Netlify + Cloudflare Pages): `from to status` per line.
43
52
  * `force` appends Netlify's `!` to each status (`301!`), so the rule wins over
@@ -50,7 +59,9 @@ export declare const buildNetlifyRedirects: (redirects: Redirect[], force?: bool
50
59
  * header rules are given (see `buildVercelHeaders`). Uses `statusCode` (Vercel's
51
60
  * alternative to the boolean `permanent`) so the configured code ships exactly:
52
61
  * `permanent` would silently coerce a 301 to 308 and a 302 to 307, diverging
53
- * from the `_redirects` file, which preserves exact codes.
62
+ * from the `_redirects` file, which preserves exact codes. A `source` is a
63
+ * `path-to-regexp` pattern, so each exact `from` path is escaped: unescaped,
64
+ * `/c++-guide` fails the whole config and `/faq(old)` never matches.
54
65
  */
55
66
  export declare const buildVercelConfig: (redirects: Redirect[], headers?: readonly VercelHeader[]) => string;
56
67
  /** Structured manifest for hosts that need manual wiring. */
@@ -0,0 +1,62 @@
1
+ import type { MdastNode, MdastVisitorContext } from "./mdast.ts";
2
+ export interface DirectiveNode extends MdastNode {
3
+ attributes?: Record<string, string | null | undefined> | null;
4
+ children?: MdastNode[] | null;
5
+ name: string;
6
+ position?: {
7
+ start?: {
8
+ offset?: number;
9
+ };
10
+ end?: {
11
+ offset?: number;
12
+ };
13
+ };
14
+ }
15
+ /**
16
+ * The visitor-context slice the directive visitors use. `source` is the page
17
+ * the directive offsets index into; without it the literal fallback rebuilds
18
+ * a directive from its node instead. `parent` walks up to an enclosing
19
+ * container directive, which renders the directives inside it itself.
20
+ */
21
+ interface DirectiveVisitorContext extends MdastVisitorContext {
22
+ parent?: (node: MdastNode) => MdastNode | undefined;
23
+ source?: string;
24
+ }
25
+ /** Directive names that map directly onto a Callout type. */
26
+ export declare const CALLOUT_TYPES: ReadonlySet<string>;
27
+ /** Friendly aliases for the canonical Callout types. */
28
+ interface CalloutAliases {
29
+ [alias: string]: string;
30
+ }
31
+ export declare const CALLOUT_ALIASES: Readonly<CalloutAliases>;
32
+ /** Resolve a directive name to a Callout type, or `null` if it is not one. */
33
+ export declare const calloutTypeFor: (name: string) => string | null;
34
+ /**
35
+ * A text or leaf directive exactly as the author wrote it. The slice by
36
+ * offsets is the exact text — `[label]` and `{attrs}` included — and is
37
+ * trusted only when it opens with the directive's own marker and name;
38
+ * content an `<include>` spliced in carries no offsets into this page, so it
39
+ * is rebuilt from the node instead.
40
+ */
41
+ export declare const directiveSource: (node: DirectiveNode, marker: string, source: string) => string;
42
+ /**
43
+ * Satteri MDAST plugin for directives. Container directives (`:::note`,
44
+ * `:::warning`, `:::tip`, …) map onto Blume's `<Callout>` component, and any
45
+ * other container renders its body between its literal fence lines (see
46
+ * {@link renderContainer}).
47
+ *
48
+ * Blume handles no text (`:name`) or leaf (`::name`) directives, and prose is
49
+ * full of text that parses as one — `16:9`, `10:30am`, `og:image`,
50
+ * `pets:read` — so both render as the literal source the author wrote instead
51
+ * of vanishing.
52
+ */
53
+ export declare const directiveToCalloutPlugin: () => {
54
+ containerDirective(node: DirectiveNode, ctx: DirectiveVisitorContext): void;
55
+ leafDirective: (node: DirectiveNode, ctx: DirectiveVisitorContext) => void;
56
+ name: string;
57
+ options: {
58
+ position: boolean;
59
+ };
60
+ textDirective: (node: DirectiveNode, ctx: DirectiveVisitorContext) => void;
61
+ };
62
+ export {};
@@ -19,3 +19,24 @@ export declare const MDX_FEATURES: {
19
19
  subscript: true;
20
20
  superscript: true;
21
21
  };
22
+ /**
23
+ * The feature sets for a page body, once its front matter is off. Astro reads
24
+ * a page's front matter itself and hands the renderer the body alone, and the
25
+ * search extractor strips it first too — so front matter parsing is off here:
26
+ * left on, a body that opens with a `---` rule read everything up to the next
27
+ * `---` line as front matter and dropped it from the page.
28
+ */
29
+ export declare const MARKDOWN_BODY_FEATURES: {
30
+ frontmatter: false;
31
+ subscript: true;
32
+ superscript: true;
33
+ };
34
+ export declare const MDX_BODY_FEATURES: {
35
+ frontmatter: false;
36
+ directive: true;
37
+ math: {
38
+ singleDollarTextMath: false;
39
+ };
40
+ subscript: true;
41
+ superscript: true;
42
+ };