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.
- package/AGENTS.md +1 -1
- package/CHANGELOG.md +126 -0
- package/README.md +4 -4
- package/dist/cli/{chunk-74wfhv79.js → chunk-05f21r8h.js} +1 -1
- package/dist/cli/{chunk-9qzgg6mj.js → chunk-1cm0h819.js} +3 -3
- package/dist/cli/{chunk-nbyvgnnm.js → chunk-1rkxzg3n.js} +104 -47
- package/dist/cli/chunk-1rkxzg3n.js.map +36 -0
- package/dist/cli/{chunk-desvm72z.js → chunk-2nr29y95.js} +22 -26
- package/dist/cli/chunk-2nr29y95.js.map +13 -0
- package/dist/cli/{chunk-32khwcb6.js → chunk-49r370mb.js} +42 -69
- package/dist/cli/{chunk-32khwcb6.js.map → chunk-49r370mb.js.map} +9 -10
- package/dist/cli/{chunk-ms9z66nz.js → chunk-4rftmttv.js} +2 -2
- package/dist/cli/{chunk-s0bdnc7v.js → chunk-79bzzkx4.js} +5 -4
- package/dist/cli/chunk-79bzzkx4.js.map +10 -0
- package/dist/cli/{chunk-hvcxng5f.js → chunk-7tekknev.js} +6 -6
- package/dist/cli/{chunk-dv2z0rzf.js → chunk-8b489v1b.js} +38 -13
- package/dist/cli/{chunk-dv2z0rzf.js.map → chunk-8b489v1b.js.map} +5 -4
- package/dist/cli/{chunk-0pmb4tr4.js → chunk-8f8xw4x2.js} +1195 -222
- package/dist/cli/chunk-8f8xw4x2.js.map +44 -0
- package/dist/cli/chunk-96snx8yy.js +329 -0
- package/dist/cli/chunk-96snx8yy.js.map +13 -0
- package/dist/cli/{chunk-ckrcm08h.js → chunk-a3ydrqny.js} +48 -62
- package/dist/cli/{chunk-ckrcm08h.js.map → chunk-a3ydrqny.js.map} +4 -5
- package/dist/cli/{chunk-bxwhtvw8.js → chunk-ahc5gc9h.js} +5 -5
- package/dist/cli/{chunk-dpy8qdjf.js → chunk-as09pafp.js} +73 -182
- package/dist/cli/chunk-as09pafp.js.map +18 -0
- package/dist/cli/{chunk-tfycddbt.js → chunk-bjk964fp.js} +2 -2
- package/dist/cli/{chunk-gfc5fqvf.js → chunk-br0n8n3e.js} +18 -18
- package/dist/cli/{chunk-gfc5fqvf.js.map → chunk-br0n8n3e.js.map} +1 -1
- package/dist/cli/{chunk-297ajdcv.js → chunk-c69tw29j.js} +6 -6
- package/dist/cli/{chunk-297ajdcv.js.map → chunk-c69tw29j.js.map} +3 -3
- package/dist/cli/chunk-cn3dy3hz.js +146 -0
- package/dist/cli/chunk-cn3dy3hz.js.map +11 -0
- package/dist/cli/{chunk-124fvmzq.js → chunk-dm4mg9bj.js} +11064 -8742
- package/dist/cli/{chunk-124fvmzq.js.map → chunk-dm4mg9bj.js.map} +78 -64
- package/dist/cli/{chunk-dqhg54mr.js → chunk-dmx6cezx.js} +1 -1
- package/dist/cli/{chunk-60hz265r.js → chunk-dpcahcrb.js} +24 -11
- package/dist/cli/chunk-dpcahcrb.js.map +10 -0
- package/dist/cli/{chunk-a57yh0h9.js → chunk-dyk3r7jw.js} +7 -7
- package/dist/cli/{chunk-a57yh0h9.js.map → chunk-dyk3r7jw.js.map} +1 -1
- package/dist/cli/{chunk-twy7psdz.js → chunk-enk76qd5.js} +14 -10
- package/dist/cli/chunk-enk76qd5.js.map +10 -0
- package/dist/cli/{chunk-k3gr1nm9.js → chunk-fqy4n3q2.js} +13 -16
- package/dist/cli/{chunk-k3gr1nm9.js.map → chunk-fqy4n3q2.js.map} +3 -3
- package/dist/cli/{chunk-sc93apfs.js → chunk-frk2wdq1.js} +17 -17
- package/dist/cli/{chunk-sc93apfs.js.map → chunk-frk2wdq1.js.map} +2 -2
- package/dist/cli/{chunk-kdpzw38a.js → chunk-gprwej7h.js} +95 -7
- package/dist/cli/chunk-gprwej7h.js.map +11 -0
- package/dist/cli/chunk-kkrteb15.js +157 -0
- package/dist/cli/chunk-kkrteb15.js.map +10 -0
- package/dist/cli/{chunk-ave1wcbr.js → chunk-m9bp2hc1.js} +1 -1
- package/dist/cli/{chunk-58bt3hag.js → chunk-mrvh4c88.js} +4 -4
- package/dist/cli/{chunk-5cmts6dv.js → chunk-p8zg3a2h.js} +7 -7
- package/dist/cli/{chunk-5cmts6dv.js.map → chunk-p8zg3a2h.js.map} +1 -1
- package/dist/cli/{chunk-0w6hs479.js → chunk-rkqae7kh.js} +30 -18
- package/dist/cli/chunk-rkqae7kh.js.map +10 -0
- package/dist/cli/{chunk-bqxaqn5p.js → chunk-t5xx74rd.js} +8 -8
- package/dist/cli/{chunk-bqxaqn5p.js.map → chunk-t5xx74rd.js.map} +1 -1
- package/dist/cli/{chunk-1f882900.js → chunk-th0pgaj5.js} +2 -2
- package/dist/cli/{chunk-dhwtqnnd.js → chunk-vnbvhgmd.js} +2 -2
- package/dist/cli/{chunk-gxtg6ed2.js → chunk-vzy9rh6y.js} +21 -21
- package/dist/cli/{chunk-gxtg6ed2.js.map → chunk-vzy9rh6y.js.map} +3 -3
- package/dist/cli/{chunk-j1x92mx9.js → chunk-w6e455pz.js} +1 -1
- package/dist/cli/chunk-wehv26ry.js +155 -0
- package/dist/cli/chunk-wehv26ry.js.map +11 -0
- package/dist/cli/{chunk-y4msrwm9.js → chunk-xgq4eytj.js} +15 -15
- package/dist/cli/{chunk-36bxs9c7.js → chunk-xt0qvz1t.js} +27 -23
- package/dist/cli/chunk-xt0qvz1t.js.map +10 -0
- package/dist/cli/index.js +78 -42
- package/dist/cli/index.js.map +7 -6
- package/dist/types/ai/changelog-components.d.ts +18 -0
- package/dist/types/ai/changelog-markdown.d.ts +12 -0
- package/dist/types/ai/openapi-components.d.ts +7 -7
- package/dist/types/ai/operation-details.d.ts +39 -0
- package/dist/types/ai/relative-links.d.ts +3 -1
- package/dist/types/ai/serializers.d.ts +6 -4
- package/dist/types/analytics/head.d.ts +4 -2
- package/dist/types/analytics/script.d.ts +8 -2
- package/dist/types/components/content/youtube.d.ts +20 -0
- package/dist/types/components/layout/nav-utils.d.ts +8 -0
- package/dist/types/components/openapi/example-panels.d.ts +33 -0
- package/dist/types/components/openapi/helpers.d.ts +53 -11
- package/dist/types/components/openapi/snippets.d.ts +7 -1
- package/dist/types/core/alert-diagnostics.d.ts +10 -0
- package/dist/types/core/builtin-tags.d.ts +16 -0
- package/dist/types/core/changelog-list.d.ts +48 -0
- package/dist/types/core/closest-match.d.ts +6 -0
- package/dist/types/core/code-fence-diagnostics.d.ts +18 -0
- package/dist/types/core/code-fences.d.ts +8 -1
- package/dist/types/core/config-input.d.ts +1 -1
- package/dist/types/core/content-assets.d.ts +16 -18
- package/dist/types/core/diagnostics.d.ts +14 -0
- package/dist/types/core/directive-diagnostics.d.ts +22 -8
- package/dist/types/core/former-routes.d.ts +14 -0
- package/dist/types/core/github.d.ts +5 -4
- package/dist/types/core/heading-markers.d.ts +65 -2
- package/dist/types/core/hidden-pages.d.ts +3 -0
- package/dist/types/core/includes.d.ts +23 -0
- package/dist/types/core/last-modified.d.ts +18 -6
- package/dist/types/core/links.d.ts +42 -2
- package/dist/types/core/load-module.d.ts +19 -4
- package/dist/types/core/manifest.d.ts +14 -1
- package/dist/types/core/markdown-mirrors.d.ts +22 -0
- package/dist/types/core/mdx-elements.d.ts +32 -0
- package/dist/types/core/mdx-syntax.d.ts +100 -0
- package/dist/types/core/meta-diagnostics.d.ts +7 -0
- package/dist/types/core/meta.d.ts +32 -5
- package/dist/types/core/nav-diagnostics.d.ts +9 -2
- package/dist/types/core/navigation.d.ts +13 -0
- package/dist/types/core/ordering-prefix.d.ts +6 -0
- package/dist/types/core/pinned-ids.d.ts +23 -0
- package/dist/types/core/project-graph.d.ts +9 -1
- package/dist/types/core/redirect-patterns.d.ts +18 -0
- package/dist/types/core/relative-files.d.ts +31 -0
- package/dist/types/core/schema.d.ts +267 -7
- package/dist/types/core/sources/normalize.d.ts +101 -9
- package/dist/types/core/sources/types.d.ts +16 -0
- package/dist/types/core/static-files.d.ts +10 -0
- package/dist/types/core/static-host.d.ts +42 -0
- package/dist/types/core/svg-images.d.ts +26 -0
- package/dist/types/core/syntax-diagnostics.d.ts +14 -0
- package/dist/types/core/types.d.ts +42 -1
- package/dist/types/deploy/generated-files.d.ts +41 -0
- package/dist/types/deploy/redirects.d.ts +21 -7
- package/dist/types/markdown/code-title.d.ts +9 -5
- package/dist/types/markdown/directives.d.ts +8 -0
- package/dist/types/markdown/fence-language.d.ts +51 -0
- package/dist/types/markdown/fence-meta.d.ts +5 -0
- package/dist/types/markdown/github-alerts.d.ts +35 -0
- package/dist/types/openapi/asyncapi.d.ts +6 -5
- package/dist/types/openapi/checks.d.ts +10 -5
- package/dist/types/openapi/model.d.ts +55 -8
- package/dist/types/openapi/parse.d.ts +4 -1
- package/dist/types/sources/filesystem.d.ts +14 -4
- package/dist/types/sources/mdx-remote.d.ts +6 -3
- package/dist/types/sources/registry.d.ts +3 -3
- package/dist/types/theme/color.d.ts +33 -0
- package/dist/types/theme/palette.d.ts +122 -0
- package/docs/01-quickstart.mdx +1 -1
- package/docs/02-deployment.mdx +23 -8
- package/docs/04-migrating.mdx +16 -4
- package/docs/advanced/changelog.mdx +27 -1
- package/docs/advanced/skills.mdx +1 -1
- package/docs/cli/audit.mdx +1 -1
- package/docs/cli/doctor.mdx +2 -2
- package/docs/cli/evals.mdx +1 -1
- package/docs/cli/index.mdx +4 -2
- package/docs/cli/validate.mdx +10 -7
- package/docs/configuration/analytics.mdx +2 -0
- package/docs/configuration/customization.mdx +3 -1
- package/docs/configuration/index.mdx +2 -2
- package/docs/configuration/theming.mdx +5 -1
- package/docs/content/components.mdx +26 -6
- package/docs/content/frontmatter.mdx +1 -1
- package/docs/content/includes.mdx +6 -2
- package/docs/content/index.mdx +11 -1
- package/docs/content/islands.mdx +2 -0
- package/docs/content/meta.mdx +9 -3
- package/docs/content/navigation.mdx +14 -6
- package/docs/content/sources/obsidian.mdx +1 -1
- package/docs/content/sources/remote-mdx.mdx +3 -1
- package/docs/content/syntax.mdx +76 -8
- package/docs/content/variables.mdx +3 -1
- package/docs/discoverability/agent-discovery.mdx +1 -1
- package/docs/discoverability/json-api.mdx +1 -1
- package/docs/discoverability/llms-txt.mdx +1 -1
- package/docs/discoverability/markdown.mdx +2 -2
- package/docs/discoverability/open-graph.mdx +1 -1
- package/docs/discoverability/sitemap-and-robots.mdx +1 -1
- package/docs/references/graphql.mdx +2 -0
- package/docs/references/openapi.mdx +45 -7
- package/package.json +4 -4
- package/skills/blume/SKILL.md +2 -2
- package/skills/blume-migrate/SKILL.md +49 -27
- package/skills/blume-migrate/references/docsify.md +262 -0
- package/skills/blume-migrate/references/docus.md +298 -0
- package/skills/blume-migrate/references/docusaurus.md +3 -3
- package/skills/blume-migrate/references/fern.md +327 -0
- package/skills/blume-migrate/references/fumadocs.md +1 -1
- package/skills/blume-migrate/references/gitbook.md +267 -0
- package/skills/blume-migrate/references/github-wiki.md +259 -0
- package/skills/blume-migrate/references/jekyll.md +253 -0
- package/skills/blume-migrate/references/mdbook.md +256 -0
- package/skills/blume-migrate/references/mintlify.md +5 -5
- package/skills/blume-migrate/references/mkdocs.md +236 -0
- package/skills/blume-migrate/references/monorepo.md +20 -8
- package/skills/blume-migrate/references/nextra.md +2 -2
- package/skills/blume-migrate/references/readme.md +257 -0
- package/skills/blume-migrate/references/redocly.md +198 -0
- package/skills/blume-migrate/references/starlight.md +3 -3
- package/skills/blume-migrate/references/vitepress.md +204 -0
- package/skills/blume-migrate/references/vuepress.md +271 -0
- package/skills/blume-migrate/scripts/docsify-codemod.mjs +2387 -0
- package/skills/blume-migrate/scripts/docus-codemod.mjs +2542 -0
- package/skills/blume-migrate/scripts/fern-codemod.mjs +2633 -0
- package/skills/blume-migrate/scripts/github-wiki-codemod.mjs +2808 -0
- package/skills/blume-migrate/scripts/include-excerpts.mjs +649 -0
- package/skills/blume-migrate/scripts/jekyll-codemod.mjs +3649 -0
- package/skills/blume-migrate/scripts/mintlify-codemod.mjs +17 -13
- package/skills/blume-migrate/scripts/mkdocs-codemod.mjs +2526 -0
- package/skills/blume-migrate/scripts/operation-routes.mjs +508 -0
- package/skills/blume-migrate/scripts/pin-heading-ids.mjs +1049 -0
- package/skills/blume-migrate/scripts/readme-codemod.mjs +4139 -0
- package/skills/blume-migrate/scripts/vitepress-codemod.mjs +1511 -0
- package/src/ai/changelog-components.ts +24 -0
- package/src/ai/changelog-markdown.ts +45 -41
- package/src/ai/component-markdown.ts +22 -9
- package/src/ai/llms.ts +36 -5
- package/src/ai/markdown.ts +2 -2
- package/src/ai/openapi-components.ts +25 -9
- package/src/ai/operation-details.ts +208 -0
- package/src/ai/relative-links.ts +48 -8
- package/src/ai/serializers.ts +7 -6
- package/src/ai/site-skill.ts +6 -2
- package/src/analytics/head.ts +11 -5
- package/src/analytics/script.ts +13 -3
- package/src/astro/generate.ts +32 -6
- package/src/astro/index.ts +1 -0
- package/src/astro/integration.ts +27 -1
- package/src/astro/mdx-source-errors.ts +46 -0
- package/src/astro/templates.ts +89 -185
- package/src/audit/checks/redirects.ts +5 -1
- package/src/audit/redirects.ts +36 -19
- package/src/audit/report.ts +22 -9
- package/src/audit/run.ts +12 -28
- package/src/audit/terms.ts +23 -0
- package/src/audit/url.ts +2 -2
- package/src/cli/build-failure.ts +256 -7
- package/src/cli/command-meta.ts +1 -1
- package/src/cli/commands/audit.ts +1 -1
- package/src/cli/commands/build.ts +12 -3
- package/src/cli/commands/check.ts +13 -2
- package/src/cli/commands/dev.ts +1 -1
- package/src/cli/commands/doctor.ts +4 -2
- package/src/cli/commands/init.ts +3 -3
- package/src/cli/commands/preview.ts +17 -1
- package/src/cli/commands/validate.ts +22 -10
- package/src/cli/prepare.ts +1 -1
- package/src/cli/preview-pages.ts +161 -0
- package/src/cli/unknown-flags.ts +1 -42
- package/src/components/code-copy.ts +51 -0
- package/src/components/code-language.ts +75 -0
- package/src/components/content/AccordionItem.astro +16 -1
- package/src/components/content/Callout.astro +11 -1
- package/src/components/content/Changelog.astro +189 -0
- package/src/components/content/CodeBlock.astro +8 -11
- package/src/components/content/Tabs.astro +16 -2
- package/src/components/content/YouTube.astro +6 -4
- package/src/components/content/code-block.ts +33 -0
- package/src/components/content/content-strings.ts +5 -1
- package/src/components/content/inline-markdown.ts +35 -8
- package/src/components/content/youtube.ts +49 -7
- package/src/components/layout/Analytics.astro +5 -1
- package/src/components/layout/NavTree.astro +8 -3
- package/src/components/layout/RootLayout.astro +18 -31
- package/src/components/layout/nav-utils.ts +14 -0
- package/src/components/layout/search/pagefind.ts +2 -1
- package/src/components/openapi/Operation.astro +4 -0
- package/src/components/openapi/PanelTabs.astro +9 -3
- package/src/components/openapi/RequestBody.astro +42 -8
- package/src/components/openapi/RequestPanel.astro +34 -53
- package/src/components/openapi/example-panels.ts +110 -0
- package/src/components/openapi/helpers.ts +195 -20
- package/src/components/openapi/operation-model.ts +63 -26
- package/src/components/openapi/request.ts +13 -0
- package/src/components/openapi/snippets.ts +14 -2
- package/src/core/alert-diagnostics.ts +89 -0
- package/src/core/builtin-tags.ts +76 -0
- package/src/core/changelog-list.ts +87 -0
- package/src/core/closest-match.ts +41 -0
- package/src/core/code-fence-diagnostics.ts +267 -0
- package/src/core/code-fences.ts +43 -7
- package/src/core/component-diagnostics.ts +65 -12
- package/src/core/config-input.ts +1 -1
- package/src/core/config.ts +46 -1
- package/src/core/content-assets.ts +64 -144
- package/src/core/diagnostics.ts +36 -3
- package/src/core/directive-diagnostics.ts +265 -47
- package/src/core/former-routes.ts +46 -0
- package/src/core/git-ignored.ts +53 -0
- package/src/core/github.ts +5 -4
- package/src/core/heading-markers.ts +156 -2
- package/src/core/hidden-pages.ts +64 -0
- package/src/core/includes.ts +181 -41
- package/src/core/last-modified.ts +47 -10
- package/src/core/links.ts +438 -83
- package/src/core/load-module.ts +98 -9
- package/src/core/manifest.ts +12 -9
- package/src/core/markdown-mirrors.ts +52 -0
- package/src/core/mdx-elements.ts +153 -0
- package/src/core/mdx-syntax.ts +377 -0
- package/src/core/meta-diagnostics.ts +134 -0
- package/src/core/meta.ts +154 -55
- package/src/core/nav-diagnostics.ts +16 -4
- package/src/core/navigation.ts +70 -10
- package/src/core/ordering-prefix.ts +22 -2
- package/src/core/pinned-ids.ts +141 -0
- package/src/core/project-graph.ts +221 -29
- package/src/core/redirect-patterns.ts +41 -0
- package/src/core/relative-files.ts +145 -0
- package/src/core/schema.ts +17 -3
- package/src/core/sources/mdx-remote.ts +75 -14
- package/src/core/sources/normalize.ts +885 -179
- package/src/core/sources/notion.ts +5 -4
- package/src/core/sources/obsidian.ts +2 -5
- package/src/core/sources/types.ts +17 -0
- package/src/core/static-files.ts +40 -0
- package/src/core/static-host.ts +125 -0
- package/src/core/svg-images.ts +98 -0
- package/src/core/syntax-diagnostics.ts +491 -0
- package/src/core/types.ts +43 -1
- package/src/deploy/artifacts.ts +2 -28
- package/src/deploy/generated-files.ts +128 -0
- package/src/deploy/platforms/vercel.ts +25 -1
- package/src/deploy/redirects.ts +43 -16
- package/src/deploy/sitemap.ts +2 -1
- package/src/markdown/base-links.ts +87 -6
- package/src/markdown/code-title.ts +29 -13
- package/src/markdown/content-assets.ts +210 -0
- package/src/markdown/directives.ts +69 -5
- package/src/markdown/fence-language.ts +106 -0
- package/src/markdown/fence-meta.ts +42 -0
- package/src/markdown/github-alerts.ts +172 -0
- package/src/markdown/heading-anchors.ts +265 -56
- package/src/markdown/include.ts +30 -3
- package/src/markdown/index.ts +145 -40
- package/src/markdown/prompt-text.ts +95 -0
- package/src/markdown/relative-links.ts +37 -2
- package/src/markdown/route-snapshot.ts +22 -12
- package/src/markdown/svg-fallback.ts +51 -0
- package/src/markdown/title-heading.ts +134 -0
- package/src/migrate/migrate.ts +127 -2
- package/src/og/card.ts +14 -4
- package/src/openapi/asyncapi.ts +14 -6
- package/src/openapi/checks.ts +160 -15
- package/src/openapi/model.ts +172 -33
- package/src/openapi/parse.ts +13 -4
- package/src/openapi/render-mdx.ts +55 -9
- package/src/openapi/source.ts +87 -6
- package/src/registry/eject.ts +0 -1
- package/src/search/documents.ts +10 -2
- package/src/sources/filesystem.ts +28 -3
- package/src/sources/mdx-remote.ts +7 -15
- package/src/theme/color.ts +14 -0
- package/src/theme/entry.ts +22 -1
- package/src/theme/palette.ts +74 -1
- package/dist/cli/chunk-0pmb4tr4.js.map +0 -35
- package/dist/cli/chunk-0w6hs479.js.map +0 -10
- package/dist/cli/chunk-150jk7km.js +0 -52
- package/dist/cli/chunk-150jk7km.js.map +0 -10
- package/dist/cli/chunk-36bxs9c7.js.map +0 -10
- package/dist/cli/chunk-53jqw8z0.js +0 -89
- package/dist/cli/chunk-53jqw8z0.js.map +0 -10
- package/dist/cli/chunk-60hz265r.js.map +0 -10
- package/dist/cli/chunk-desvm72z.js.map +0 -14
- package/dist/cli/chunk-dpy8qdjf.js.map +0 -17
- package/dist/cli/chunk-es8h0v3j.js +0 -441
- package/dist/cli/chunk-es8h0v3j.js.map +0 -11
- package/dist/cli/chunk-kdpzw38a.js.map +0 -11
- package/dist/cli/chunk-nbyvgnnm.js.map +0 -36
- package/dist/cli/chunk-s0bdnc7v.js.map +0 -10
- package/dist/cli/chunk-twy7psdz.js.map +0 -10
- package/dist/cli/chunk-ydp3065p.js +0 -64
- package/dist/cli/chunk-ydp3065p.js.map +0 -10
- /package/dist/cli/{chunk-74wfhv79.js.map → chunk-05f21r8h.js.map} +0 -0
- /package/dist/cli/{chunk-9qzgg6mj.js.map → chunk-1cm0h819.js.map} +0 -0
- /package/dist/cli/{chunk-ms9z66nz.js.map → chunk-4rftmttv.js.map} +0 -0
- /package/dist/cli/{chunk-hvcxng5f.js.map → chunk-7tekknev.js.map} +0 -0
- /package/dist/cli/{chunk-bxwhtvw8.js.map → chunk-ahc5gc9h.js.map} +0 -0
- /package/dist/cli/{chunk-tfycddbt.js.map → chunk-bjk964fp.js.map} +0 -0
- /package/dist/cli/{chunk-dqhg54mr.js.map → chunk-dmx6cezx.js.map} +0 -0
- /package/dist/cli/{chunk-ave1wcbr.js.map → chunk-m9bp2hc1.js.map} +0 -0
- /package/dist/cli/{chunk-58bt3hag.js.map → chunk-mrvh4c88.js.map} +0 -0
- /package/dist/cli/{chunk-1f882900.js.map → chunk-th0pgaj5.js.map} +0 -0
- /package/dist/cli/{chunk-dhwtqnnd.js.map → chunk-vnbvhgmd.js.map} +0 -0
- /package/dist/cli/{chunk-j1x92mx9.js.map → chunk-w6e455pz.js.map} +0 -0
- /package/dist/cli/{chunk-y4msrwm9.js.map → chunk-xgq4eytj.js.map} +0 -0
|
@@ -22,7 +22,9 @@ export interface RelativeLinkBase {
|
|
|
22
22
|
* `/install`. A `.md`/`.mdx` target is a file link: `resolveFile` maps its
|
|
23
23
|
* decoded path, relative to the linking file, to the route that file
|
|
24
24
|
* publishes at, so a target with its own `slug` or an ordering prefix still
|
|
25
|
-
* lands on its page instead of on its raw Markdown source.
|
|
25
|
+
* lands on its page instead of on its raw Markdown source. A file renamed
|
|
26
|
+
* from `.md` to `.mdx`, or back, is found under its other extension first,
|
|
27
|
+
* so a link written before the rename keeps that slug or prefix. Without
|
|
26
28
|
* `resolveFile`, or for a file it doesn't know, the target resolves
|
|
27
29
|
* route-relative with the extension dropped.
|
|
28
30
|
*
|
|
@@ -31,6 +33,23 @@ export interface RelativeLinkBase {
|
|
|
31
33
|
* name (`./node.js` for `node.js.mdx`, `./v1.2`) is still a page link.
|
|
32
34
|
*/
|
|
33
35
|
export declare const resolveRelativeHref: (href: string, from: RelativeLinkBase, resolveFile?: (path: string) => string | undefined, hasRoute?: (route: string) => boolean) => string | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Where a root-relative link to a content file (`/guide/new.md`, the way
|
|
38
|
+
* VitePress, Docsify, and TypeDoc write one) lands: the route of the source
|
|
39
|
+
* file it names under the content root, with the authored `?query#hash`
|
|
40
|
+
* kept, or `undefined` when it names no source file (or isn't a root-relative
|
|
41
|
+
* `.md`/`.mdx` link at all). It's read as written from the content root, or,
|
|
42
|
+
* when it starts with `deployment.base`, as including the base (see
|
|
43
|
+
* `withBasePath`). `routeOfFile` maps an absolute source path to the route
|
|
44
|
+
* that file publishes at. A link that names no source file is left alone:
|
|
45
|
+
* `/guide/new.md` is also the URL of a page's Markdown copy, which a link may
|
|
46
|
+
* mean on purpose.
|
|
47
|
+
*/
|
|
48
|
+
export declare const resolveRootFileHref: (href: string, options: {
|
|
49
|
+
contentRoot: string;
|
|
50
|
+
deployBase: string;
|
|
51
|
+
routeOfFile: (file: string) => string | undefined;
|
|
52
|
+
}) => string | undefined;
|
|
34
53
|
/**
|
|
35
54
|
* Whether a content file is its folder's index, from its name as written on
|
|
36
55
|
* disk: `index.md(x)` after an ordering prefix, optionally carrying one of
|
|
@@ -92,14 +111,35 @@ export declare const validateLinks: (graph: ContentGraph, options: {
|
|
|
92
111
|
* full-route-set resolution in `nav-diagnostics.ts`/`generateRuntime`.
|
|
93
112
|
*/
|
|
94
113
|
extraRoutes?: string[];
|
|
114
|
+
/**
|
|
115
|
+
* The files the build generates beside `public/` (`/llms.txt`,
|
|
116
|
+
* `/sitemap.xml`; see `deploy/generated-files.ts`), base-less: links to
|
|
117
|
+
* them resolve like links to `public/` files.
|
|
118
|
+
*/
|
|
119
|
+
generatedFiles?: string[];
|
|
95
120
|
/** Locale routing when i18n is on; links then resolve into the page's locale. */
|
|
96
121
|
i18n?: LocaleRouting | null;
|
|
122
|
+
/** The project's `public/` folder, or `null` when it has none (and so
|
|
123
|
+
* ships no public files). */
|
|
97
124
|
publicDir: string | null;
|
|
98
125
|
checkExternal?: boolean;
|
|
99
126
|
/** External URLs not to request (`--ignore`). Internal links are always checked. */
|
|
100
127
|
ignore?: (url: string) => boolean;
|
|
101
|
-
/**
|
|
128
|
+
/**
|
|
129
|
+
* Configured redirects: their `from` paths count as valid link targets,
|
|
130
|
+
* and an internal `to` must land somewhere the site serves.
|
|
131
|
+
*/
|
|
102
132
|
redirects?: {
|
|
103
133
|
from: string;
|
|
134
|
+
to: string;
|
|
104
135
|
}[];
|
|
136
|
+
/** The config file the redirects are written in, for their positions. */
|
|
137
|
+
configFile?: string;
|
|
138
|
+
/**
|
|
139
|
+
* The `docs` collection's content root, which a root-relative link to a
|
|
140
|
+
* content file (`/guide/new.md`) is read from.
|
|
141
|
+
*/
|
|
142
|
+
contentRoot?: string;
|
|
143
|
+
/** `deployment.base` (`""` or `/seg`), which such a link may start with. */
|
|
144
|
+
deployBase?: string;
|
|
105
145
|
}) => Promise<Diagnostic[]>;
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* jiti aliases that resolve `blume` and every subpath it exports to the
|
|
3
|
+
* running Blume package, read from its own `exports` map. Without them a user
|
|
4
|
+
* module resolves `blume` by walking up from its own folder, so a `meta.ts`
|
|
5
|
+
* under a content root outside the project (`content.root: "../docs"`, a
|
|
6
|
+
* sibling workspace package) or a file `blume.config.ts` imports from beside
|
|
7
|
+
* the project can't find the `blume` installed in the project. A wildcard
|
|
8
|
+
* export (`./core/*`) becomes a prefix alias (`blume/core/`), which jiti
|
|
9
|
+
* extends with the rest of the specifier.
|
|
10
|
+
*/
|
|
11
|
+
export declare const blumeModuleAliases: () => Record<string, string>;
|
|
1
12
|
/**
|
|
2
13
|
* Create a loader for user-authored ESM/TS modules (`blume.config.ts`,
|
|
3
|
-
* `meta.ts`)
|
|
4
|
-
*
|
|
5
|
-
* which is what makes dev-server regeneration reflect config/meta changes.
|
|
14
|
+
* `meta.ts`), in which `blume` resolves to the running package wherever the
|
|
15
|
+
* module lives (see {@link blumeModuleAliases}).
|
|
6
16
|
*/
|
|
7
17
|
export declare const createModuleLoader: () => ((file: string) => Promise<unknown>);
|
|
8
18
|
/**
|
|
@@ -12,6 +22,11 @@ export declare const createModuleLoader: () => ((file: string) => Promise<unknow
|
|
|
12
22
|
* exports `null`/`undefined`, resolves to `undefined` so the caller can say
|
|
13
23
|
* so, instead of validating `{}` (a bare `defineConfig({…})` call) or
|
|
14
24
|
* `{ config }` (a named export). jiti's default interop is off because it
|
|
15
|
-
* throws on `export default null`.
|
|
25
|
+
* throws on `export default null`. Turning it off changes how jiti compiles
|
|
26
|
+
* every module the config reaches, Blume's own source included, but jiti keys
|
|
27
|
+
* its disk cache by file and source alone, so this loader keeps a cache of its
|
|
28
|
+
* own: sharing one, it would run code compiled for {@link createModuleLoader}
|
|
29
|
+
* (and that loader, code compiled for this one), whichever loaded the file
|
|
30
|
+
* first.
|
|
16
31
|
*/
|
|
17
32
|
export declare const createDefaultExportLoader: typeof createModuleLoader;
|
|
@@ -8,7 +8,20 @@ export declare const MANIFEST_VERSION = 1;
|
|
|
8
8
|
* site search provider is enabled, so features like the MCP server can index
|
|
9
9
|
* docs even when on-page search is off.
|
|
10
10
|
*/
|
|
11
|
-
export declare const contentIndexable: (page: PageRecord, config: ResolvedConfig) => boolean;
|
|
11
|
+
export declare const contentIndexable: (page: PageRecord, config: ResolvedConfig, graph: ContentGraph) => boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Fallback materialization: render the fallback locale's content at the
|
|
14
|
+
* localized URL for any translation a non-default locale is missing, so static
|
|
15
|
+
* output is fully prerendered (render-fallback, no client redirect). Fallback
|
|
16
|
+
* routes are not indexed and carry no `hreflang` of their own.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* The description a page's `<head>` emits — `seo.description` over the front
|
|
20
|
+
* matter `description` — mirrored onto its route so the OG card's subtitle
|
|
21
|
+
* matches the page's `og:description`, and the summary page indexes like
|
|
22
|
+
* `llms.txt` give it.
|
|
23
|
+
*/
|
|
24
|
+
export declare const metaDescription: (page: PageRecord) => string | undefined;
|
|
12
25
|
/** Build the runtime manifest that bridges core and the generated Astro app. */
|
|
13
26
|
export declare const buildManifest: (options: {
|
|
14
27
|
context: ProjectContext;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { RouteSet } from "./locale-links.ts";
|
|
2
|
+
/**
|
|
3
|
+
* Where Blume serves each page's raw Markdown: a copy beside the page, named
|
|
4
|
+
* for its route (`/guide.md`, `/guide.mdx`; see `rawMarkdownEndpointTemplate`).
|
|
5
|
+
*/
|
|
6
|
+
/** The extensions every page's Markdown copies are served at. */
|
|
7
|
+
export declare const MIRROR_EXTENSIONS: readonly [".md", ".mdx"];
|
|
8
|
+
/** The name a page's Markdown copies are served under, from its route. */
|
|
9
|
+
export declare const mirrorName: (route: string) => string;
|
|
10
|
+
/**
|
|
11
|
+
* The page whose Markdown copies are served under `name`, if any are: the
|
|
12
|
+
* root's under `/index`, and a page's under its own route. `/index` is no
|
|
13
|
+
* page's route, yet it names the root's copies, so a path that isn't a page
|
|
14
|
+
* can still name a served copy.
|
|
15
|
+
*/
|
|
16
|
+
export declare const mirrorOwner: (pages: RouteSet, name: string) => string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* The page a served Markdown copy at `path` belongs to (`/guide.md` the page
|
|
19
|
+
* `/guide`'s, `/index.mdx` the root's), or `undefined` when `path` is no
|
|
20
|
+
* served copy.
|
|
21
|
+
*/
|
|
22
|
+
export declare const mirroredPage: (pages: RouteSet, path: string) => string | undefined;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Nodes } from "mdast";
|
|
2
|
+
import type { ElementUse } from "./types.ts";
|
|
3
|
+
/**
|
|
4
|
+
* JSX elements in an `.mdx` body whose props don't render as written:
|
|
5
|
+
*
|
|
6
|
+
* - `handler`: an HTML element with a JavaScript event handler
|
|
7
|
+
* (`<button onClick={() => …}>`). The page is static HTML, so the function
|
|
8
|
+
* is written into the attribute as text and never runs. A string handler
|
|
9
|
+
* (`onclick="…"`) is inline script the browser does run, and is left alone.
|
|
10
|
+
* - `prop`: a built-in that shows its children (see `BUILTIN_CHILD_PROPS`),
|
|
11
|
+
* used without any, with props it doesn't take. Those are ignored, so the
|
|
12
|
+
* element renders without the content they carry.
|
|
13
|
+
*/
|
|
14
|
+
type JsxElement = Extract<Nodes, {
|
|
15
|
+
type: "mdxJsxFlowElement" | "mdxJsxTextElement";
|
|
16
|
+
}>;
|
|
17
|
+
type AttributeValue = Extract<JsxElement["attributes"][number], {
|
|
18
|
+
type: "mdxJsxAttribute";
|
|
19
|
+
}>["value"];
|
|
20
|
+
type ExpressionValue = Extract<AttributeValue, {
|
|
21
|
+
type: string;
|
|
22
|
+
}>;
|
|
23
|
+
/** Whether an attribute's value is a `{…}` expression, not a string or nothing. */
|
|
24
|
+
export declare const isExpression: (value: AttributeValue) => value is ExpressionValue;
|
|
25
|
+
/**
|
|
26
|
+
* Every element in an `.mdx` body whose props don't render as written (see
|
|
27
|
+
* the module comment), in source order, its line shifted by `lineOffset`. The
|
|
28
|
+
* body is parsed only when a cheap test finds a suspect, and a body MDX can't
|
|
29
|
+
* parse fails to render with its own error, so it yields none.
|
|
30
|
+
*/
|
|
31
|
+
export declare const extractElementUses: (body: string, lineOffset?: number) => ElementUse[];
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { SourceEntry } from "./sources/types.ts";
|
|
2
|
+
import type { Diagnostic } from "./types.ts";
|
|
3
|
+
import type { ContentVariables } from "./variables.ts";
|
|
4
|
+
/**
|
|
5
|
+
* MDX that doesn't parse, found before Astro compiles it. The parse is
|
|
6
|
+
* Sätteri's, with the feature set the renderer uses, so a body that fails it
|
|
7
|
+
* here fails `astro build` too: Astro compiles every `.mdx` file in the
|
|
8
|
+
* collection, drafts and pages the scan dropped included. Parsing only (no
|
|
9
|
+
* plugins, no render) keeps it cheap enough to run on every page.
|
|
10
|
+
*
|
|
11
|
+
* - `BLUME_MDX_SYNTAX` (error): the page's own text doesn't parse, so the
|
|
12
|
+
* build fails at it.
|
|
13
|
+
* - `BLUME_MDX_SYNTAX` (warning): the page parses, but not once its
|
|
14
|
+
* `<include>`s are spliced in. Reported in the partial. The render splices a
|
|
15
|
+
* partial more leniently than this parse reads it, so the page may still
|
|
16
|
+
* build, with the partial's markup rendered wrong (an HTML comment shown as
|
|
17
|
+
* text, an unclosed `<img>` taking in what follows it).
|
|
18
|
+
*
|
|
19
|
+
* The same reading locates a build failure Astro reports with no line: an
|
|
20
|
+
* `.mdx` page that throws while it renders (a `{…}` expression reading a name
|
|
21
|
+
* nothing defines), or a partial that breaks the including page's compile.
|
|
22
|
+
*/
|
|
23
|
+
/** Where MDX stopped reading a text, and why. */
|
|
24
|
+
export interface MdxSyntaxError {
|
|
25
|
+
column: number;
|
|
26
|
+
line: number;
|
|
27
|
+
/** Sätteri's message, without its leading position and trailing rule id. */
|
|
28
|
+
reason: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The first MDX syntax error in `text`, a page body with its front matter
|
|
32
|
+
* off, or null when it parses.
|
|
33
|
+
*
|
|
34
|
+
* Only the verdict is needed, so the parse stays native: Sätteri's tree is
|
|
35
|
+
* dropped unread rather than built as JavaScript objects, which costs as much
|
|
36
|
+
* again as the parse itself on every page. A parse error carries its own
|
|
37
|
+
* position, so node positions aren't tracked either.
|
|
38
|
+
*/
|
|
39
|
+
export declare const mdxSyntaxError: (text: string) => MdxSyntaxError | null;
|
|
40
|
+
/** A position in the file the author wrote. */
|
|
41
|
+
interface Site {
|
|
42
|
+
column?: number;
|
|
43
|
+
file: string;
|
|
44
|
+
line: number;
|
|
45
|
+
}
|
|
46
|
+
/** Maps a line and column of the parsed text to the file it came from. */
|
|
47
|
+
type SiteOf = (line: number, column?: number) => Site;
|
|
48
|
+
/**
|
|
49
|
+
* The `BLUME_MDX_SYNTAX` diagnostic for `error`, read from a text whose lines
|
|
50
|
+
* `siteOf` places.
|
|
51
|
+
*/
|
|
52
|
+
export declare const mdxSyntaxDiagnostic: (error: MdxSyntaxError, siteOf: SiteOf, options: {
|
|
53
|
+
includedIn?: string;
|
|
54
|
+
severity: Diagnostic["severity"];
|
|
55
|
+
}) => Diagnostic;
|
|
56
|
+
/** What the scan learned from parsing an `.mdx` entry. */
|
|
57
|
+
export interface MdxSyntaxCheck {
|
|
58
|
+
diagnostics: Diagnostic[];
|
|
59
|
+
/** Whether the page's own text fails to parse, so its build would fail. */
|
|
60
|
+
unparsable: boolean;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Parse an `.mdx` entry's body, and its include-expanded text when it has
|
|
64
|
+
* one (see the module comment). The body is read as the build reads it: with
|
|
65
|
+
* the site's variables substituted, which the scan has already done when
|
|
66
|
+
* there was no expansion to do it in.
|
|
67
|
+
*/
|
|
68
|
+
export declare const mdxSyntaxCheck: (entry: SourceEntry, sourceName: string, variables?: ContentVariables) => MdxSyntaxCheck;
|
|
69
|
+
/** A page as the build failure locator reads it. */
|
|
70
|
+
export interface FailedPage {
|
|
71
|
+
/** The owning source's content root, which bounds its includes. */
|
|
72
|
+
contentRoot?: string;
|
|
73
|
+
/** How a message names the page: its path from the project root. */
|
|
74
|
+
name: string;
|
|
75
|
+
sourcePath: string;
|
|
76
|
+
variables?: ContentVariables;
|
|
77
|
+
}
|
|
78
|
+
/** What a build failure in an `.mdx` page said about itself. */
|
|
79
|
+
export type MdxFailure = {
|
|
80
|
+
kind: "syntax";
|
|
81
|
+
} | {
|
|
82
|
+
kind: "undefined-name";
|
|
83
|
+
name: string;
|
|
84
|
+
};
|
|
85
|
+
/** Where a build failure happened in the files the author wrote. */
|
|
86
|
+
export interface MdxFailureSite extends Site {
|
|
87
|
+
/** For a syntax failure, the parse's own diagnostic. */
|
|
88
|
+
diagnostic?: Diagnostic;
|
|
89
|
+
/** For an undefined name, the expression that reads it, braces included. */
|
|
90
|
+
expression?: string;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Locate a build failure Astro reported against an `.mdx` page with no line:
|
|
94
|
+
* the expression that reads an undefined name, or the syntax error that
|
|
95
|
+
* stopped the compile (which, when the page's own text parsed, sits in a
|
|
96
|
+
* partial it includes). Null when the page can't be read or the cause can't
|
|
97
|
+
* be found in it.
|
|
98
|
+
*/
|
|
99
|
+
export declare const locateMdxFailure: (page: FailedPage, failure: MdxFailure) => Promise<MdxFailureSite | null>;
|
|
100
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { DiscoveredFolderMeta } from "./meta.ts";
|
|
2
|
+
import type { Diagnostic, PageRecord } from "./types.ts";
|
|
3
|
+
/** Folder-meta diagnostics against every page the sources produced. */
|
|
4
|
+
export declare const folderMetaDiagnostics: (discovered: DiscoveredFolderMeta, pages: readonly PageRecord[], options?: {
|
|
5
|
+
localeDirs?: readonly string[];
|
|
6
|
+
versionDirs?: readonly string[];
|
|
7
|
+
}) => Promise<Diagnostic[]>;
|
|
@@ -19,6 +19,26 @@ export interface FolderMetaSource {
|
|
|
19
19
|
* translates through this too, so it covers exactly the ones the scan reads.
|
|
20
20
|
*/
|
|
21
21
|
export declare const findFolderMetaFiles: (source: FolderMetaSource, patterns?: readonly string[]) => Promise<string[]>;
|
|
22
|
+
/** Folder meta by key: per-locale `meta.*` files, and shared `meta.$.*` ones. */
|
|
23
|
+
export interface FolderMetaMaps {
|
|
24
|
+
meta: Map<string, FolderMeta>;
|
|
25
|
+
shared: Map<string, FolderMeta>;
|
|
26
|
+
}
|
|
27
|
+
/** A folder-meta file Blume found but doesn't read, and the key it would have. */
|
|
28
|
+
export interface UnreadFolderMeta {
|
|
29
|
+
/** Its folder, relative to the source root. */
|
|
30
|
+
dir: string;
|
|
31
|
+
file: string;
|
|
32
|
+
key: string;
|
|
33
|
+
}
|
|
34
|
+
/** What {@link discoverFolderMeta} found across the sources. */
|
|
35
|
+
export interface DiscoveredFolderMeta extends FolderMetaMaps {
|
|
36
|
+
diagnostics: Diagnostic[];
|
|
37
|
+
/** The file each meta in `meta` and `shared` was read from. */
|
|
38
|
+
files: Map<FolderMeta, string>;
|
|
39
|
+
/** Meta files under a source root that no source's `include` globs reach. */
|
|
40
|
+
unread: UnreadFolderMeta[];
|
|
41
|
+
}
|
|
22
42
|
/**
|
|
23
43
|
* Discover `meta.{ts,js,mjs}` files across the given filesystem sources. Keys are
|
|
24
44
|
* the source's route prefix joined with the directory relative to that source's
|
|
@@ -43,8 +63,15 @@ export declare const findFolderMetaFiles: (source: FolderMetaSource, patterns?:
|
|
|
43
63
|
export declare const discoverFolderMeta: (sources: string | FolderMetaSource[], options?: {
|
|
44
64
|
localeDirs?: readonly string[];
|
|
45
65
|
versionDirs?: readonly string[];
|
|
46
|
-
}) => Promise<
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
66
|
+
}) => Promise<DiscoveredFolderMeta>;
|
|
67
|
+
/**
|
|
68
|
+
* Lay the folder meta content sources derive (the OpenAPI source's tag
|
|
69
|
+
* titles and order) beneath the user's `meta.ts` and `meta.$.ts` files, field
|
|
70
|
+
* by field: a user file's own keys win, and the generated ones fill the rest,
|
|
71
|
+
* so a `meta.ts` that only renames a tag group keeps its generated `order`.
|
|
72
|
+
* Generated meta is locale-agnostic, keyed like `meta.$.*`, so it also sits
|
|
73
|
+
* beneath a locale's own `meta.ts` (`fr/reference/pets` over
|
|
74
|
+
* `reference/pets`). It doesn't reach into an archived version's snapshot,
|
|
75
|
+
* whose groups read only meta keyed under the version.
|
|
76
|
+
*/
|
|
77
|
+
export declare const withGeneratedFolderMeta: (user: FolderMetaMaps, generated: Map<string, FolderMeta>, localeDirs?: readonly string[]) => FolderMetaMaps;
|
|
@@ -14,9 +14,16 @@ export declare const validateSearchPopularIcons: (popular: {
|
|
|
14
14
|
* Warn when a config-linked tab/selector target has no matching page. `routes`
|
|
15
15
|
* must be the full set of servable routes — content, custom `.astro` pages, and
|
|
16
16
|
* generated routes — so this runs where all three are known (`generateRuntime`),
|
|
17
|
-
* not in the content-only graph build.
|
|
17
|
+
* not in the content-only graph build. `servesFile` answers for the files the
|
|
18
|
+
* site serves beside its pages — `public/` and the generated ones (see
|
|
19
|
+
* `staticFileResolver`) — so a featured link to `/spec.pdf` or `/llms.txt`
|
|
20
|
+
* resolves too.
|
|
21
|
+
*
|
|
22
|
+
* A tab is checked where it links: its `href` — the author's, or the
|
|
23
|
+
* section's first page that navigation resolved for a `path` with no page of
|
|
24
|
+
* its own — and its `path` only when it links there.
|
|
18
25
|
*/
|
|
19
|
-
export declare const validateNavTargets: (navigation: Navigation, routes: Set<string
|
|
26
|
+
export declare const validateNavTargets: (navigation: Navigation, routes: Set<string>, servesFile?: (path: string) => boolean) => Diagnostic[];
|
|
20
27
|
/**
|
|
21
28
|
* Warn about explicit `navigation.sidebar` items that can't render as written,
|
|
22
29
|
* instead of dropping them without a word: a page ref that matches no page
|
|
@@ -25,6 +25,19 @@ export declare const isRootTab: (tab: NavTab, root: string) => boolean;
|
|
|
25
25
|
* named alike read alike.
|
|
26
26
|
*/
|
|
27
27
|
export declare const titleWord: (word: string) => string;
|
|
28
|
+
/**
|
|
29
|
+
* A page's key in its folder meta `pages` list: its file name without the
|
|
30
|
+
* extension, ordering prefix, or parentheses (`01-quickstart.mdx` is
|
|
31
|
+
* `quickstart`).
|
|
32
|
+
*/
|
|
33
|
+
export declare const pageKey: (filename: string) => string;
|
|
34
|
+
/**
|
|
35
|
+
* The keys a folder meta `pages` list can name, by group path: each folder's
|
|
36
|
+
* pages and subfolders, keyed as `buildFileSystemSidebar` keys its nodes (the
|
|
37
|
+
* name without its extension, ordering prefix, or parentheses). Read off nav
|
|
38
|
+
* paths, so it covers pages the sidebar leaves out, like hidden ones.
|
|
39
|
+
*/
|
|
40
|
+
export declare const folderChildKeys: (navPaths: Iterable<string>) => Map<string, Set<string>>;
|
|
28
41
|
/**
|
|
29
42
|
* An explicit-sidebar ref (`"guides/"`, `"/guides/index"`, `"index"`) in the
|
|
30
43
|
* slashless route form pages are keyed by (`/guides`, `/`).
|
|
@@ -2,3 +2,9 @@
|
|
|
2
2
|
export declare const orderingPrefix: (name: string) => string | undefined;
|
|
3
3
|
/** `name` without its ordering prefix (`01-intro` -> `intro`). */
|
|
4
4
|
export declare const stripOrderingPrefix: (name: string) => string;
|
|
5
|
+
/**
|
|
6
|
+
* The name an earlier Blume routed `name` as, when it differs from today's:
|
|
7
|
+
* a {@link DATE_NAME} lost its first number as an ordering prefix
|
|
8
|
+
* (`12-05-2022` routed as `05-2022`, `2024-01` as `01`).
|
|
9
|
+
*/
|
|
10
|
+
export declare const formerRouteName: (name: string) => string | undefined;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A pinned heading id (`## Heading [#a--b]`, `{#a--b}`) is used verbatim, but
|
|
3
|
+
* the parse that reads it applies smart punctuation (Astro's `smartypants`,
|
|
4
|
+
* on by default) to the whole heading first: `--` became `–`, `...` became
|
|
5
|
+
* `…`, and quotes curled, so the id rendered as `a–b` while every link
|
|
6
|
+
* written to it says `#a--b`. Smart punctuation leaves a backslash-escaped
|
|
7
|
+
* character alone, so before a source is parsed, the punctuation in each
|
|
8
|
+
* heading's trailing markers is escaped where the author wrote it, and the
|
|
9
|
+
* parse reads the id as typed. An id with a typed `–` keeps it.
|
|
10
|
+
*
|
|
11
|
+
* The page render, each `<include>` splice, and the scan-time heading reader
|
|
12
|
+
* all escape their source this way, so the rendered id and the anchor index
|
|
13
|
+
* `blume validate` checks against agree.
|
|
14
|
+
*/
|
|
15
|
+
import type { SourceFormat } from "satteri";
|
|
16
|
+
/**
|
|
17
|
+
* `source` with the smart-punctuation characters in each heading's pinned id
|
|
18
|
+
* backslash-escaped, so a parse with smart punctuation reads the id as
|
|
19
|
+
* written. `source` must be the whole text the parse will read, link
|
|
20
|
+
* definitions included: they decide which brackets are links. A source
|
|
21
|
+
* without such a pin is returned as is, unparsed.
|
|
22
|
+
*/
|
|
23
|
+
export declare const escapePinnedIds: (source: string, format: SourceFormat) => string;
|
|
@@ -21,8 +21,16 @@ export interface BlumeProject {
|
|
|
21
21
|
graph: ContentGraph;
|
|
22
22
|
manifest: BlumeManifest;
|
|
23
23
|
diagnostics: Diagnostic[];
|
|
24
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* Entries excluded from the graph because their frontmatter failed
|
|
26
|
+
* validation, or (in a build) their MDX doesn't parse.
|
|
27
|
+
*/
|
|
25
28
|
droppedPages: number;
|
|
29
|
+
/**
|
|
30
|
+
* The local `.mdx` files a build dropped because they don't parse, which
|
|
31
|
+
* the docs collection leaves out so Astro never compiles them.
|
|
32
|
+
*/
|
|
33
|
+
unparsable: string[];
|
|
26
34
|
/** The instantiated content sources, for lazy entry reads (search/AI/raw). */
|
|
27
35
|
sources: ContentSource[];
|
|
28
36
|
/**
|
|
@@ -61,6 +61,13 @@ export interface RedirectRule {
|
|
|
61
61
|
status: number;
|
|
62
62
|
to: string;
|
|
63
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* The literal start of a `to` that reads a capture, up to its first
|
|
66
|
+
* reference: `/guides/` for `/guides/:slug*`, `/new/article-` for
|
|
67
|
+
* `/new/article-*`. `undefined` for a `to` that reads none, which is one
|
|
68
|
+
* exact path.
|
|
69
|
+
*/
|
|
70
|
+
export declare const destinationPrefix: (to: string) => string | undefined;
|
|
64
71
|
/** Whether a path is a pattern, rather than one exact path. */
|
|
65
72
|
export declare const isPatternPath: (path: string) => boolean;
|
|
66
73
|
/** Why a redirect's ends can't work, and which end to fix. */
|
|
@@ -80,6 +87,17 @@ export declare const redirectPatternError: (from: string, to: string) => Redirec
|
|
|
80
87
|
* rules; an exact redirect gets none.
|
|
81
88
|
*/
|
|
82
89
|
export declare const expandRedirect: (redirect: RedirectEnds) => RedirectRule[];
|
|
90
|
+
/**
|
|
91
|
+
* The bare path a pattern ending in a rest also matches, as the exact
|
|
92
|
+
* redirect every host is given for it: `/beta/:slug*` (or `/beta/*`) to
|
|
93
|
+
* `/v2/:slug*` sends `/beta` itself to `/v2`. Null for an exact redirect,
|
|
94
|
+
* a pattern with no rest, and one whose bare path still holds a capture
|
|
95
|
+
* (`/:lang/*`), which names no single path.
|
|
96
|
+
*/
|
|
97
|
+
export declare const bareRedirect: (redirect: RedirectEnds) => {
|
|
98
|
+
from: string;
|
|
99
|
+
to: string;
|
|
100
|
+
} | null;
|
|
83
101
|
/** Put exact redirects ahead of patterns, which hosts try in order. */
|
|
84
102
|
export declare const exactFirst: <Redirect extends {
|
|
85
103
|
from: string;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether a target is *shaped* like a colocated image reference: a relative
|
|
3
|
+
* filesystem path with an image extension. Exported so link validation can
|
|
4
|
+
* tell "not a colocated candidate" apart from "a candidate that resolves
|
|
5
|
+
* nowhere" — the former falls through to the public-dir probe, the latter is
|
|
6
|
+
* a broken reference beside the page source.
|
|
7
|
+
*/
|
|
8
|
+
export declare const isRelativeImageTarget: (target: string) => boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Resolve one image target against its page's directory. Returns the absolute
|
|
11
|
+
* file path when the target is relative, is an image, and exists on disk —
|
|
12
|
+
* anything else (remote URLs, `public/` absolutes, broken refs, code-block
|
|
13
|
+
* examples that happen to look like paths) is null and left untouched. Shared
|
|
14
|
+
* with link validation, so what counts as a colocated image is decided once.
|
|
15
|
+
*/
|
|
16
|
+
export declare const resolveRelativeImage: (sourceDir: string, target: string) => string | null;
|
|
17
|
+
/** A file a link names beside its page, and the link's `?query#fragment`. */
|
|
18
|
+
export interface RelativeFile {
|
|
19
|
+
path: string;
|
|
20
|
+
suffix: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Resolve the file a link, an element's `src`, or an `href` names beside its
|
|
24
|
+
* page (`./spec.pdf`, `../files/data.csv#L2`): a relative path whose name
|
|
25
|
+
* carries an extension other than a page's (`.md`, `.mdx`), on disk as
|
|
26
|
+
* written (see `existsAsWritten`). Its `?query` or `#fragment` is set aside,
|
|
27
|
+
* so `./spec.pdf#page=2` opens the served file at that page. Anything else is
|
|
28
|
+
* null: a page link, a URL, a root path, a missing file. Shared with link
|
|
29
|
+
* validation, which accepts what this resolves.
|
|
30
|
+
*/
|
|
31
|
+
export declare const resolveRelativeFile: (sourceDir: string, target: string) => RelativeFile | null;
|