blume 2.1.3 → 2.2.1
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 +134 -0
- package/README.md +4 -4
- package/dist/cli/{chunk-y4msrwm9.js → chunk-080mfch6.js} +15 -15
- package/dist/cli/{chunk-gfc5fqvf.js → chunk-1ch3ct3r.js} +18 -18
- package/dist/cli/{chunk-gfc5fqvf.js.map → chunk-1ch3ct3r.js.map} +1 -1
- package/dist/cli/{chunk-32khwcb6.js → chunk-2ssh60qh.js} +42 -69
- package/dist/cli/{chunk-32khwcb6.js.map → chunk-2ssh60qh.js.map} +9 -10
- package/dist/cli/{chunk-9qzgg6mj.js → chunk-34wap3ed.js} +3 -3
- package/dist/cli/{chunk-k3gr1nm9.js → chunk-40vk8kgf.js} +13 -16
- package/dist/cli/{chunk-k3gr1nm9.js.map → chunk-40vk8kgf.js.map} +3 -3
- package/dist/cli/chunk-487b95qy.js +329 -0
- package/dist/cli/chunk-487b95qy.js.map +13 -0
- package/dist/cli/chunk-4zxh25hc.js +157 -0
- package/dist/cli/chunk-4zxh25hc.js.map +10 -0
- package/dist/cli/chunk-69rjf786.js +146 -0
- package/dist/cli/chunk-69rjf786.js.map +11 -0
- package/dist/cli/{chunk-dqhg54mr.js → chunk-9h8mh2tk.js} +3 -3
- package/dist/cli/{chunk-dqhg54mr.js.map → chunk-9h8mh2tk.js.map} +2 -2
- package/dist/cli/{chunk-bqxaqn5p.js → chunk-9jqmq5hv.js} +8 -8
- package/dist/cli/{chunk-bqxaqn5p.js.map → chunk-9jqmq5hv.js.map} +1 -1
- package/dist/cli/{chunk-dv2z0rzf.js → chunk-aafhwx74.js} +38 -13
- package/dist/cli/{chunk-dv2z0rzf.js.map → chunk-aafhwx74.js.map} +5 -4
- package/dist/cli/{chunk-desvm72z.js → chunk-b680sv30.js} +22 -26
- package/dist/cli/chunk-b680sv30.js.map +13 -0
- package/dist/cli/{chunk-0w6hs479.js → chunk-beb0z983.js} +30 -18
- package/dist/cli/chunk-beb0z983.js.map +10 -0
- package/dist/cli/{chunk-1f882900.js → chunk-c5bjxq8v.js} +2 -2
- package/dist/cli/chunk-e1n41w9m.js +155 -0
- package/dist/cli/chunk-e1n41w9m.js.map +11 -0
- package/dist/cli/{chunk-sc93apfs.js → chunk-etckvbrh.js} +17 -17
- package/dist/cli/{chunk-sc93apfs.js.map → chunk-etckvbrh.js.map} +2 -2
- package/dist/cli/{chunk-bxwhtvw8.js → chunk-f260jdrn.js} +5 -5
- package/dist/cli/{chunk-74wfhv79.js → chunk-fnxgtjeq.js} +1 -1
- package/dist/cli/{chunk-ms9z66nz.js → chunk-gwy55cx3.js} +2 -2
- package/dist/cli/{chunk-ms9z66nz.js.map → chunk-gwy55cx3.js.map} +2 -2
- package/dist/cli/{chunk-dhwtqnnd.js → chunk-gxhcf2hs.js} +2 -2
- package/dist/cli/{chunk-tfycddbt.js → chunk-h0qwdbem.js} +2 -2
- package/dist/cli/{chunk-nbyvgnnm.js → chunk-hktq4j5r.js} +109 -49
- package/dist/cli/chunk-hktq4j5r.js.map +36 -0
- package/dist/cli/{chunk-twy7psdz.js → chunk-hn3g2b89.js} +14 -10
- package/dist/cli/chunk-hn3g2b89.js.map +10 -0
- package/dist/cli/{chunk-j1x92mx9.js → chunk-j4nfgn2j.js} +1 -1
- package/dist/cli/{chunk-dpy8qdjf.js → chunk-k45sq16q.js} +74 -183
- package/dist/cli/chunk-k45sq16q.js.map +18 -0
- package/dist/cli/{chunk-5cmts6dv.js → chunk-kmswjxj9.js} +7 -7
- package/dist/cli/{chunk-5cmts6dv.js.map → chunk-kmswjxj9.js.map} +1 -1
- package/dist/cli/{chunk-36bxs9c7.js → chunk-nqna8dzp.js} +27 -23
- package/dist/cli/chunk-nqna8dzp.js.map +10 -0
- package/dist/cli/{chunk-a57yh0h9.js → chunk-p834rkcn.js} +7 -7
- package/dist/cli/{chunk-a57yh0h9.js.map → chunk-p834rkcn.js.map} +1 -1
- package/dist/cli/{chunk-60hz265r.js → chunk-ppa6mg4d.js} +24 -11
- package/dist/cli/chunk-ppa6mg4d.js.map +10 -0
- package/dist/cli/{chunk-s0bdnc7v.js → chunk-q1wwrxzw.js} +5 -4
- package/dist/cli/chunk-q1wwrxzw.js.map +10 -0
- package/dist/cli/{chunk-ave1wcbr.js → chunk-qcyxkj44.js} +1 -1
- package/dist/cli/{chunk-124fvmzq.js → chunk-r5nm9w0c.js} +11183 -8806
- package/dist/cli/{chunk-124fvmzq.js.map → chunk-r5nm9w0c.js.map} +82 -66
- package/dist/cli/{chunk-ckrcm08h.js → chunk-rtvgmg2j.js} +48 -62
- package/dist/cli/{chunk-ckrcm08h.js.map → chunk-rtvgmg2j.js.map} +4 -5
- package/dist/cli/{chunk-297ajdcv.js → chunk-t2h8pwy1.js} +6 -6
- package/dist/cli/{chunk-297ajdcv.js.map → chunk-t2h8pwy1.js.map} +3 -3
- package/dist/cli/{chunk-gxtg6ed2.js → chunk-x60e15st.js} +21 -21
- package/dist/cli/{chunk-gxtg6ed2.js.map → chunk-x60e15st.js.map} +3 -3
- package/dist/cli/{chunk-58bt3hag.js → chunk-x7bh6d9j.js} +4 -4
- package/dist/cli/{chunk-hvcxng5f.js → chunk-ydqzkhjn.js} +6 -6
- package/dist/cli/{chunk-kdpzw38a.js → chunk-yg8ckc3g.js} +95 -7
- package/dist/cli/chunk-yg8ckc3g.js.map +11 -0
- package/dist/cli/{chunk-0pmb4tr4.js → chunk-zxd5jrgx.js} +1205 -222
- package/dist/cli/chunk-zxd5jrgx.js.map +44 -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 +38 -6
- package/dist/types/core/content-assets.d.ts +16 -18
- package/dist/types/core/data.d.ts +6 -2
- 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/mcp-clients.d.ts +47 -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 +16 -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 +322 -11
- 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/ratelimit/index.d.ts +2 -0
- package/dist/types/ratelimit/memory.d.ts +1 -1
- package/dist/types/ratelimit/schema.d.ts +40 -0
- package/dist/types/ratelimit/unkey.d.ts +48 -0
- 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 +24 -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 +7 -6
- package/docs/configuration/rate-limiting.mdx +20 -1
- package/docs/configuration/theming.mdx +5 -1
- package/docs/content/components.mdx +26 -6
- package/docs/content/frontmatter.mdx +1 -1
- package/docs/content/i18n.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/mcp.mdx +40 -8
- 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 +51 -29
- 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 +5 -5
- 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 +5 -5
- 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 +47 -11
- 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 +93 -189
- 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/required-secrets.ts +0 -1
- 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/PageActions.astro +81 -23
- package/src/components/layout/RootLayout.astro +35 -32
- package/src/components/layout/SiteFooter.astro +31 -8
- 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 +39 -5
- package/src/core/config.ts +46 -1
- package/src/core/content-assets.ts +64 -144
- package/src/core/data.ts +10 -3
- 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/mcp-clients.ts +87 -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 +41 -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 +110 -6
- 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/ratelimit/index.ts +2 -0
- package/src/ratelimit/memory.ts +1 -1
- package/src/ratelimit/runtime.ts +81 -0
- package/src/ratelimit/schema.ts +2 -0
- package/src/ratelimit/unkey.ts +61 -0
- package/src/registry/eject.ts +0 -1
- package/src/registry/registry.ts +1 -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-y4msrwm9.js.map → chunk-080mfch6.js.map} +0 -0
- /package/dist/cli/{chunk-9qzgg6mj.js.map → chunk-34wap3ed.js.map} +0 -0
- /package/dist/cli/{chunk-1f882900.js.map → chunk-c5bjxq8v.js.map} +0 -0
- /package/dist/cli/{chunk-bxwhtvw8.js.map → chunk-f260jdrn.js.map} +0 -0
- /package/dist/cli/{chunk-74wfhv79.js.map → chunk-fnxgtjeq.js.map} +0 -0
- /package/dist/cli/{chunk-dhwtqnnd.js.map → chunk-gxhcf2hs.js.map} +0 -0
- /package/dist/cli/{chunk-tfycddbt.js.map → chunk-h0qwdbem.js.map} +0 -0
- /package/dist/cli/{chunk-j1x92mx9.js.map → chunk-j4nfgn2j.js.map} +0 -0
- /package/dist/cli/{chunk-ave1wcbr.js.map → chunk-qcyxkj44.js.map} +0 -0
- /package/dist/cli/{chunk-58bt3hag.js.map → chunk-x7bh6d9j.js.map} +0 -0
- /package/dist/cli/{chunk-hvcxng5f.js.map → chunk-ydqzkhjn.js.map} +0 -0
|
@@ -41,10 +41,29 @@ export declare const unloadablePathDiagnostic: (path: string, file: string) => D
|
|
|
41
41
|
* line, so its 0-based line is already the file's line minus one.
|
|
42
42
|
*/
|
|
43
43
|
export declare const frontmatterYamlDiagnostic: (error: YAMLException, file: string) => Diagnostic;
|
|
44
|
+
export declare const ATTRIBUTE: string;
|
|
45
|
+
/** A heading's trailing `{#id}` marker, where its text holds one. */
|
|
46
|
+
export interface TrailingCurlyMarker {
|
|
47
|
+
/** Whether the braces also set classes or attributes (`{ #id .wide }`). */
|
|
48
|
+
attributes: boolean;
|
|
49
|
+
id: string;
|
|
50
|
+
/** Where the marker starts in the text. */
|
|
51
|
+
index: number;
|
|
52
|
+
/** The braces as written. */
|
|
53
|
+
marker: string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The `{#id}` marker a heading's text ends with: one of the spellings
|
|
57
|
+
* `BARE_CURLY_MARKER` matches, or an attribute list that sets an id among
|
|
58
|
+
* other attributes (see `HEADING_ATTRIBUTE_LIST`).
|
|
59
|
+
*/
|
|
60
|
+
export declare const trailingCurlyMarker: (text: string) => TrailingCurlyMarker | undefined;
|
|
44
61
|
export declare const HTML_COMMENT: RegExp;
|
|
45
62
|
export declare const INLINE_CODE: RegExp;
|
|
46
|
-
/** A heading whose trailing `{#id}` marker is unescaped — see `
|
|
63
|
+
/** A heading whose trailing `{#id}` marker is unescaped — see `trailingCurlyMarker`. */
|
|
47
64
|
export interface CurlyMarker {
|
|
65
|
+
/** Whether the braces also set classes or attributes (`{ #id .wide }`). */
|
|
66
|
+
attributes: boolean;
|
|
48
67
|
id: string;
|
|
49
68
|
/** 1-based line of the heading (a setext heading's first text line) in the body. */
|
|
50
69
|
line: number;
|
|
@@ -61,10 +80,10 @@ export interface HeadingSite {
|
|
|
61
80
|
/** Everything one walk over a body yields for the anchor index. */
|
|
62
81
|
export interface BodyScan {
|
|
63
82
|
/**
|
|
64
|
-
* Raw HTML element ids (`<a id="…">`)
|
|
65
|
-
* code, comments, and `<Prompt>` regions —
|
|
66
|
-
* `blume validate` accepts alongside heading
|
|
67
|
-
* document order.
|
|
83
|
+
* Raw HTML element ids (`<a id="…">`) and `<a name="…">` names outside
|
|
84
|
+
* headings, fences, inline code, comments, and `<Prompt>` regions —
|
|
85
|
+
* fragment-link targets that `blume validate` accepts alongside heading
|
|
86
|
+
* slugs. Deduplicated, in document order.
|
|
68
87
|
*/
|
|
69
88
|
anchors: string[];
|
|
70
89
|
/** Headings whose trailing `{#id}` marker is unescaped, for `.mdx` pages. */
|
|
@@ -83,10 +102,77 @@ export interface BodyScan {
|
|
|
83
102
|
*/
|
|
84
103
|
export declare const scanBody: (body: string) => BodyScan;
|
|
85
104
|
export declare const extractHeadings: (body: string) => Heading[];
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
105
|
+
/**
|
|
106
|
+
* Rewrite the target of every image embed on one line with `rewrite`, which
|
|
107
|
+
* gets the target as the renderer reads it (see `readDestination`) and
|
|
108
|
+
* returns the new one, or `null` to leave it as written. Inline code is
|
|
109
|
+
* skipped: matches run on a copy with code spans blanked, and replacements
|
|
110
|
+
* splice into the real line by index, which the same-length mask keeps in
|
|
111
|
+
* step. A rewritten target is written back in the form its destination took.
|
|
112
|
+
*/
|
|
113
|
+
export declare const rewriteImageTargets: (line: string, rewrite: (target: string) => string | null) => string;
|
|
114
|
+
/** A string `href` or `src` on an element, as {@link rewriteElementUrls} reads it. */
|
|
115
|
+
export interface ElementUrl {
|
|
116
|
+
attribute: string;
|
|
117
|
+
/** The element's name as written: `img`, `a`, `Card`. */
|
|
118
|
+
tag: string;
|
|
119
|
+
value: string;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Whether an element URL is one `blume validate` reads as a link (see
|
|
123
|
+
* `ELEMENT_HREF` and `ELEMENT_SRC`): a media element's `src`, or an `<a>`'s or
|
|
124
|
+
* a component's `href`. Only these name a file the build publishes from
|
|
125
|
+
* beside the page.
|
|
126
|
+
*/
|
|
127
|
+
export declare const isLinkElementUrl: (url: ElementUrl) => boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Rewrite every `<Card img="…">` value in `text` (outside code) with
|
|
130
|
+
* `rewrite`, which returns the new value or `null` to leave one as written.
|
|
131
|
+
* The include expander rebases a partial's values with it and the
|
|
132
|
+
* content-asset rewriter points them at their served URL, exactly as both
|
|
133
|
+
* treat image embeds, so a card's image resolves like ``.
|
|
134
|
+
*/
|
|
135
|
+
export declare const rewriteCardImages: (text: string, rewrite: (target: string) => string | null) => string;
|
|
136
|
+
/**
|
|
137
|
+
* Rewrite every element's string `href` or `src` in `text` (outside code)
|
|
138
|
+
* with `rewrite`, which returns the new value or `null` to leave one as
|
|
139
|
+
* written. The include expander rebases a partial's files with it, the
|
|
140
|
+
* content-asset rewriter points them at their served URL, and the render
|
|
141
|
+
* plugins rewrite raw HTML with it.
|
|
142
|
+
*/
|
|
143
|
+
export declare const rewriteElementUrls: (text: string, rewrite: (url: ElementUrl) => string | null) => string;
|
|
144
|
+
/**
|
|
145
|
+
* Rewrite the target of every Markdown link in `text` (outside code) with
|
|
146
|
+
* `rewrite`, which gets the target as the renderer reads it and returns the
|
|
147
|
+
* new one, or `null` to leave it as written: inline links (an image embed is
|
|
148
|
+
* no link; see {@link rewriteImageTargets}), links whose label wraps onto
|
|
149
|
+
* later lines, and link-reference definitions (`[spec]: ./spec.pdf`). Each
|
|
150
|
+
* rewritten target is written back in the form its destination took.
|
|
151
|
+
*/
|
|
152
|
+
export declare const rewriteLinkTargets: (text: string, rewrite: (target: string) => string | null) => string;
|
|
153
|
+
/** A link-reference definition, as {@link linkDefinitions} reads one. */
|
|
154
|
+
export interface LinkDefinition {
|
|
155
|
+
/** The label as CommonMark matches it: case-folded, spaces collapsed. */
|
|
156
|
+
key: string;
|
|
157
|
+
/** The definition on a line of its own, out of any container. */
|
|
158
|
+
text: string;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Every link-reference definition in `text` (`[label]: /url "Title"`,
|
|
162
|
+
* outside code; footnotes aren't links), in order, the first of each label
|
|
163
|
+
* only, since that's the one that renders. A definition is read from its own
|
|
164
|
+
* line: its destination and any title there, and nothing else, since a line
|
|
165
|
+
* with more after them is text.
|
|
166
|
+
*/
|
|
167
|
+
export declare const linkDefinitions: (text: string) => LinkDefinition[];
|
|
168
|
+
/**
|
|
169
|
+
* Extract link targets from a markdown body for later validation, recording the
|
|
170
|
+
* 1-based line/column of each target. Skips fenced code blocks, inline code,
|
|
171
|
+
* and — given the page's `format` — comments, none of which render a link.
|
|
172
|
+
* `lineOffset` shifts every recorded line: the body is frontmatter-stripped, so
|
|
173
|
+
* diagnostics that point into the raw file must add the stripped block's height.
|
|
174
|
+
*/
|
|
175
|
+
export declare const extractLinks: (body: string, lineOffset?: number, format?: "md" | "mdx") => PageLink[];
|
|
90
176
|
/**
|
|
91
177
|
* Every `<Component path>` in an `.mdx` body, with the 1-based position of its
|
|
92
178
|
* value; lines are shifted by `lineOffset`, as {@link extractLinks} does. Code
|
|
@@ -146,6 +232,12 @@ export interface EntryRoute extends Pick<EntryPlacement, "locales" | "version">
|
|
|
146
232
|
* through {@link localizedRoute} for the route one locale publishes at.
|
|
147
233
|
*/
|
|
148
234
|
logicalRoute: string;
|
|
235
|
+
/**
|
|
236
|
+
* The logical route an earlier Blume published the entry at, when it
|
|
237
|
+
* differs: a date-named file or folder (`12-05-2022`) lost its first number
|
|
238
|
+
* as an ordering prefix. Its old URL redirects to the new one.
|
|
239
|
+
*/
|
|
240
|
+
formerLogicalRoute?: string;
|
|
149
241
|
/** The prefixed, locale- and version-stripped nav path. */
|
|
150
242
|
navPath: string;
|
|
151
243
|
segments: string[];
|
|
@@ -65,6 +65,15 @@ export interface SourceEntry {
|
|
|
65
65
|
includes: string[];
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* A redirect a source asks for: from a route one of its pages used to have
|
|
70
|
+
* to the route it has now, both locale-stripped and without `basePath`, as
|
|
71
|
+
* the page routes its entries map to.
|
|
72
|
+
*/
|
|
73
|
+
export interface SourceRedirect {
|
|
74
|
+
from: string;
|
|
75
|
+
to: string;
|
|
76
|
+
}
|
|
68
77
|
/** The result of a single `ContentSource.load()` call. */
|
|
69
78
|
export interface SourceLoadResult {
|
|
70
79
|
entries: SourceEntry[];
|
|
@@ -78,6 +87,13 @@ export interface SourceLoadResult {
|
|
|
78
87
|
* beneath user-authored meta files, which always win.
|
|
79
88
|
*/
|
|
80
89
|
folderMeta?: Record<string, FolderMeta>;
|
|
90
|
+
/**
|
|
91
|
+
* Redirects from routes the source's pages moved off: the OpenAPI source
|
|
92
|
+
* keeps the URLs earlier releases gave operation pages working. Added to
|
|
93
|
+
* the config's `redirects` after them, skipping any whose `from` a page or
|
|
94
|
+
* a configured redirect already owns.
|
|
95
|
+
*/
|
|
96
|
+
redirects?: SourceRedirect[];
|
|
81
97
|
}
|
|
82
98
|
/**
|
|
83
99
|
* Per-source runtime context, handed to an adapter factory at construction so
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether a root-relative path names a file the site serves outside its pages,
|
|
3
|
+
* as a static host answers it: a file in `public/`, a `public/` folder's
|
|
4
|
+
* `index.html` (`/demo` and `/demo/` for `public/demo/index.html`), or one of
|
|
5
|
+
* the files Blume generates (`generated`, base-less paths like `/llms.txt`;
|
|
6
|
+
* see `deploy/generated-files.ts`). `publicDir` is `null` when the project has
|
|
7
|
+
* no `public/` folder, which ships no files then. Paths come decoded, without
|
|
8
|
+
* `deployment.base`, which a host mounts `public/` under.
|
|
9
|
+
*/
|
|
10
|
+
export declare const staticFileResolver: (publicDir: string | null, generated?: Iterable<string>) => ((path: string) => boolean);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a static host does with the URLs `blume dev` and `blume preview`
|
|
3
|
+
* would otherwise answer on their own terms. Astro's `trailingSlash: "never"`
|
|
4
|
+
* has both 404 a slashed URL (`/guide/`), which every host answers: Vercel
|
|
5
|
+
* redirects it to `/guide`, and the others serve `guide/index.html`. And a
|
|
6
|
+
* folder of HTML shipped in `public/` (`public/demo/index.html`) is served at
|
|
7
|
+
* `/demo/`, `/demo` redirecting there, so the relative links inside it
|
|
8
|
+
* resolve against the folder; the dev server 404s both spellings, and Vite's
|
|
9
|
+
* preview serves only the slashless one.
|
|
10
|
+
*/
|
|
11
|
+
import type { IncomingMessage, Server } from "node:http";
|
|
12
|
+
/** How to answer a request ahead of the server's own handlers. */
|
|
13
|
+
export type HostAnswer = {
|
|
14
|
+
kind: "redirect";
|
|
15
|
+
location: string;
|
|
16
|
+
status: number;
|
|
17
|
+
} | {
|
|
18
|
+
kind: "rewrite";
|
|
19
|
+
url: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Whether `public/<path>/index.html` exists: a folder of HTML the site ships
|
|
23
|
+
* as is. `path` is the decoded request path with `deployment.base` stripped.
|
|
24
|
+
*/
|
|
25
|
+
export declare const publicFolder: (publicDir: string) => (path: string) => boolean;
|
|
26
|
+
/**
|
|
27
|
+
* How a static host answers a URL's trailing slash, or null to leave the
|
|
28
|
+
* request alone. A slashed URL redirects to its slashless page, its query
|
|
29
|
+
* kept, unless it names a public folder, which serves its `index.html`; a
|
|
30
|
+
* slashless public folder redirects to its slashed URL. `base` is the
|
|
31
|
+
* normalized `deployment.base`, which the URL carries and `public/` doesn't.
|
|
32
|
+
* The redirect is a `301`, a `308` for a method a `301` would turn into a
|
|
33
|
+
* `GET`, as Astro answers on a server-rendered route.
|
|
34
|
+
*/
|
|
35
|
+
export declare const trailingSlashAnswer: (request: Pick<IncomingMessage, "method" | "url">, base: string, isPublicFolder: (path: string) => boolean) => HostAnswer | null;
|
|
36
|
+
/**
|
|
37
|
+
* Answer every request on `server` with `answer` first: a redirect is sent
|
|
38
|
+
* then and there, and a rewrite changes the URL the server's own handlers
|
|
39
|
+
* (Vite's middleware) then see. They're the request listeners the server
|
|
40
|
+
* already has, so this goes ahead of every middleware, Astro's included.
|
|
41
|
+
*/
|
|
42
|
+
export declare const answerRequestsFirst: (server: Server, answer: (request: IncomingMessage) => HostAnswer | null, headers?: Record<string, string>) => void;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Diagnostic, PageRecord } from "./types.ts";
|
|
2
|
+
/**
|
|
3
|
+
* Colocated SVGs Astro's image pipeline can't measure. Astro reads an image's
|
|
4
|
+
* size before it optimizes it, and for an SVG it looks for the `<svg>` tag in
|
|
5
|
+
* the file's first 1,000 bytes only, then needs a width and height or a
|
|
6
|
+
* viewBox on that tag. A draw.io export carries its whole diagram in a
|
|
7
|
+
* `content` attribute on the tag, which pushes the tag's end past that
|
|
8
|
+
* window, so one diagram fails the build (`NoImageMetadata`). Blume serves
|
|
9
|
+
* such an SVG as it is instead, from the endpoint that already serves content
|
|
10
|
+
* images to agents (`/blume-assets/content/…`), and warns about it
|
|
11
|
+
* (`BLUME_SVG_UNOPTIMIZED`). A browser draws an SVG at any size, so the
|
|
12
|
+
* only loss is the intrinsic `width`/`height` the optimized `<img>` carries.
|
|
13
|
+
*/
|
|
14
|
+
/** Whether the file at `path` is an SVG Astro can't read the size of. */
|
|
15
|
+
export declare const isUnmeasurableSvg: (path: string) => Promise<boolean>;
|
|
16
|
+
/**
|
|
17
|
+
* The URL an unmeasurable SVG is served at, unbased (the base links plugin
|
|
18
|
+
* mounts `deployment.base`), or null when `target` isn't a colocated image
|
|
19
|
+
* Astro can measure no size for.
|
|
20
|
+
*/
|
|
21
|
+
export declare const unmeasurableSvgUrl: (sourceDir: string, target: string, projectRoot: string) => Promise<string | null>;
|
|
22
|
+
/**
|
|
23
|
+
* A warning for each image embed of a colocated SVG Astro can't measure, at
|
|
24
|
+
* the line that embeds it (in a partial, when an `<include>` brought it in).
|
|
25
|
+
*/
|
|
26
|
+
export declare const unmeasurableSvgDiagnostics: (pages: readonly PageRecord[]) => Promise<Diagnostic[]>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SourceEntry } from "./sources/types.ts";
|
|
2
|
+
import type { Diagnostic, PageRecord } from "./types.ts";
|
|
3
|
+
/** The site's pages by the names a wiki link can call them (see {@link wikiKey}). */
|
|
4
|
+
export type PageNameIndex = ReadonlyMap<string, readonly PageRecord[]>;
|
|
5
|
+
/** Index pages by file name and title, for {@link syntaxDiagnostics}. */
|
|
6
|
+
export declare const indexPageNames: (pages: readonly PageRecord[]) => PageNameIndex;
|
|
7
|
+
/**
|
|
8
|
+
* Warn about syntax from other docs tools in an entry's body (see the module
|
|
9
|
+
* comment). `pages` are the site's pages by name, which a wiki link resolves
|
|
10
|
+
* against, preferring one in the entry's own `locale`. Lines point into the
|
|
11
|
+
* file the author wrote, a partial's own file for syntax an `<include>`
|
|
12
|
+
* brought in.
|
|
13
|
+
*/
|
|
14
|
+
export declare const syntaxDiagnostics: (entry: SourceEntry, sourceName: string, pages?: PageNameIndex, locale?: string) => Diagnostic[];
|
|
@@ -45,8 +45,13 @@ export interface Heading {
|
|
|
45
45
|
}
|
|
46
46
|
/** A link target discovered in page content, anchored to its source line. */
|
|
47
47
|
export interface PageLink {
|
|
48
|
-
/** Raw link target as written, e.g. `./foo`, `/api#auth`, `https://x.dev`.
|
|
48
|
+
/** Raw link target as written, e.g. `./foo`, `/api#auth`, `https://x.dev`.
|
|
49
|
+
* A Markdown destination is read as the renderer reads it: without its
|
|
50
|
+
* `<…>` brackets, and with backslash escapes resolved. */
|
|
49
51
|
target: string;
|
|
52
|
+
/** Length of the target's text in the source, when escapes make it differ
|
|
53
|
+
* from `target`'s (`image\(1\).png` is read as `image(1).png`). */
|
|
54
|
+
sourceLength?: number;
|
|
50
55
|
/** Set when the target was written as an image embed (``) —
|
|
51
56
|
* only those go through the image pipeline; a plain link to the same path
|
|
52
57
|
* resolves as a site route. */
|
|
@@ -55,6 +60,11 @@ export interface PageLink {
|
|
|
55
60
|
* the Markdown pipeline neither resolves its relative path file-style nor
|
|
56
61
|
* mounts the base path on it, so it's checked the way a browser reads it. */
|
|
57
62
|
raw?: boolean;
|
|
63
|
+
/** The element, when the target is a media element's `src` (`img`,
|
|
64
|
+
* `source`, `video`, `audio`). It's `raw` too: the browser resolves it as
|
|
65
|
+
* written, unless it names a file beside the page, which the build
|
|
66
|
+
* publishes and points it at. */
|
|
67
|
+
src?: string;
|
|
58
68
|
/** 1-based line number in the source file. */
|
|
59
69
|
line: number;
|
|
60
70
|
/** 1-based column of the target within the line. */
|
|
@@ -75,6 +85,25 @@ export interface ExampleUse {
|
|
|
75
85
|
/** Absolute path of the included partial it was written in, if not the page. */
|
|
76
86
|
file?: string;
|
|
77
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* A JSX element in an `.mdx` body whose props don't render as written (see
|
|
90
|
+
* `core/mdx-elements.ts`), located like a {@link PageLink}: an HTML element
|
|
91
|
+
* with a JavaScript event handler (`handler`), or a childless built-in given
|
|
92
|
+
* props it doesn't take (`prop`).
|
|
93
|
+
*/
|
|
94
|
+
export interface ElementUse {
|
|
95
|
+
/** 1-based column of the element's `<` within the line. */
|
|
96
|
+
column: number;
|
|
97
|
+
/** Absolute path of the included partial it was written in, if not the page. */
|
|
98
|
+
file?: string;
|
|
99
|
+
kind: "handler" | "prop";
|
|
100
|
+
/** 1-based line number in the source file. */
|
|
101
|
+
line: number;
|
|
102
|
+
/** The handler props, or the props the built-in doesn't take. */
|
|
103
|
+
props: string[];
|
|
104
|
+
/** The element's name as written (`button`, `Badge`). */
|
|
105
|
+
tag: string;
|
|
106
|
+
}
|
|
78
107
|
/**
|
|
79
108
|
* Resolved project paths. Computed once per CLI invocation and threaded
|
|
80
109
|
* through the core pipeline.
|
|
@@ -162,6 +191,12 @@ export interface PageRecord {
|
|
|
162
191
|
* checks skip these.
|
|
163
192
|
*/
|
|
164
193
|
fallback?: boolean;
|
|
194
|
+
/**
|
|
195
|
+
* The route an earlier Blume published the page at, when it differs from
|
|
196
|
+
* `route`: a date-named file or folder (`12-05-2022`) lost its first number
|
|
197
|
+
* as an ordering prefix. The scan redirects it to `route`.
|
|
198
|
+
*/
|
|
199
|
+
formerRoute?: string;
|
|
165
200
|
/**
|
|
166
201
|
* True for pages from a source that publishes one language only (GitHub
|
|
167
202
|
* Releases): they render without a language switcher.
|
|
@@ -202,6 +237,12 @@ export interface PageRecord {
|
|
|
202
237
|
componentsUsed?: string[];
|
|
203
238
|
/** The string `path` of each `<Component>` example in the body (`.mdx` only). */
|
|
204
239
|
examplesUsed?: ExampleUse[];
|
|
240
|
+
/**
|
|
241
|
+
* Childless built-ins given props they don't take (`.mdx` only). Reported
|
|
242
|
+
* once the project's own components are known, since an override takes
|
|
243
|
+
* whatever props it declares.
|
|
244
|
+
*/
|
|
245
|
+
unknownProps?: ElementUse[];
|
|
205
246
|
/** Resolved "last updated" ISO date, when the feature is enabled. */
|
|
206
247
|
lastModified?: string;
|
|
207
248
|
/** Absolute paths of files this page `<include>`s, transitively. Drives the
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { SkillArtifact } from "../ai/skills.ts";
|
|
2
|
+
import type { BlumeProject } from "../core/project-graph.ts";
|
|
3
|
+
import type { ResolvedConfig } from "../core/schema.ts";
|
|
4
|
+
/** A generated `.well-known` discovery document: `null` content when it's off. */
|
|
5
|
+
export interface WellKnownFile {
|
|
6
|
+
content: string | null;
|
|
7
|
+
label: string;
|
|
8
|
+
path: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The generated `.well-known` discovery documents — the Web Bot Auth signature
|
|
12
|
+
* directory, the RFC 9727 API catalog, and the AI catalog under both the
|
|
13
|
+
* ai-catalog spec's well-known URI and the ARD v0.91 one (see
|
|
14
|
+
* `ai/ai-catalog.ts`) — each with `null` content when its feature is off.
|
|
15
|
+
*/
|
|
16
|
+
export declare const wellKnownFiles: (config: ResolvedConfig, skills: readonly SkillArtifact[]) => WellKnownFile[];
|
|
17
|
+
/**
|
|
18
|
+
* The files a build serves beside its pages that don't come from `public/`,
|
|
19
|
+
* as base-less root-relative paths: what `publishBuildArtifacts` writes once
|
|
20
|
+
* Astro is done (llms.txt, the sitemap, robots.txt, `agent-readability.json`,
|
|
21
|
+
* the `.well-known` discovery documents, the Agent Skills index, `skill.md`)
|
|
22
|
+
* and the generated endpoints at fixed paths (the RSS feeds, the JSON docs
|
|
23
|
+
* API and its OpenAPI description, the MCP discovery documents). Each is
|
|
24
|
+
* listed under the gate its writer reads, so a feature the config switches
|
|
25
|
+
* off drops its file here too: `blume validate` accepts a link to
|
|
26
|
+
* `/llms.txt` exactly when the build writes one.
|
|
27
|
+
*
|
|
28
|
+
* Read from the config alone, before a build: the skill archives a build
|
|
29
|
+
* publishes beside the index, and the platform files (`_redirects`,
|
|
30
|
+
* `_headers`, `vercel.json`), aren't listed. A page's Markdown copy
|
|
31
|
+
* (`/guide.md`) is its route's, and resolves through the page.
|
|
32
|
+
*/
|
|
33
|
+
export declare const generatedFilePaths: (project: BlumeProject) => string[];
|
|
34
|
+
/**
|
|
35
|
+
* Whether a base-less path is a file the project's site serves beside its
|
|
36
|
+
* pages: one in `public/` (`/spec.pdf`, a folder's `index.html`) or one the
|
|
37
|
+
* build generates (`/llms.txt`). What `generateRuntime` and `blume doctor`
|
|
38
|
+
* check navigation entries against, beside the routes, as `blume validate`
|
|
39
|
+
* checks links.
|
|
40
|
+
*/
|
|
41
|
+
export declare const servedFiles: (project: BlumeProject) => ((path: string) => boolean);
|
|
@@ -41,15 +41,29 @@ export declare const applyBaseToAstroRedirects: (redirects: Redirect[], basePath
|
|
|
41
41
|
* public file (see {@link baseRedirectTarget}).
|
|
42
42
|
*/
|
|
43
43
|
export declare const applyBaseToPlatformRedirects: (redirects: Redirect[], basePath: string, deployBase: string, routes: RouteSet) => Redirect[];
|
|
44
|
+
/**
|
|
45
|
+
* Whether `from` names a page's own `index.html` (`/guide/index.html` for the
|
|
46
|
+
* page `/guide`, `/index.html` for the root), a URL a migrated site may have
|
|
47
|
+
* linked. A static build writes the page there, and Astro writes a redirect
|
|
48
|
+
* page to `<from>/index.html`, which would need that file to be a folder:
|
|
49
|
+
* the build fails with `EISDIR`. Hosts serve the page at that URL anyway,
|
|
50
|
+
* unless a redirect rule answers it first. `pages` are the served page
|
|
51
|
+
* routes, which carry `basePath`, as `from` does.
|
|
52
|
+
*/
|
|
53
|
+
export declare const isPageIndexFile: (from: string, pages: RouteSet) => boolean;
|
|
44
54
|
/**
|
|
45
55
|
* Based `redirects`, each exact one that moves a page followed by the same
|
|
46
|
-
* redirect for the page's Markdown copies: from a path no page
|
|
47
|
-
* to one a page is, `/old.md` goes to `/new.md` (and `.mdx`
|
|
48
|
-
* would otherwise 404 for an agent still reading the old
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
56
|
+
* redirect for the page's Markdown copies: from a path whose copies no page
|
|
57
|
+
* serves to one a page is served at, `/old.md` goes to `/new.md` (and `.mdx`
|
|
58
|
+
* alike), where it would otherwise 404 for an agent still reading the old
|
|
59
|
+
* URL. A served copy never gives way: `/index` names the root's copies, so
|
|
60
|
+
* `/index` → `/` moving them would turn the home page's `/index.md` into a
|
|
61
|
+
* redirect to itself. A pattern gets none; one that carries its capture over
|
|
62
|
+
* (`/beta/:slug*` → `/v2/:slug*`) already moves `/beta/guide.md` along. Nor
|
|
63
|
+
* does a redirect from an `.html` file (`/guide.html`, from a migrated site),
|
|
64
|
+
* which had no copy to move. `pages` are the served page routes (carrying
|
|
65
|
+
* `basePath`, not `deployment.base`), and `bases` the deployment base each
|
|
66
|
+
* end carries: Astro's config leaves it off `from` (see
|
|
53
67
|
* {@link applyBaseToAstroRedirects}).
|
|
54
68
|
*/
|
|
55
69
|
export declare const withMirrorRedirects: (redirects: Redirect[], pages: RouteSet, bases: {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Code-fence meta. A Shiki transformer reads the tokens after the language and
|
|
3
3
|
* promotes them to attributes on the rendered `<pre>`:
|
|
4
4
|
*
|
|
5
|
-
* - a title — the
|
|
6
|
-
* becomes `data-title`; the theme's code header
|
|
7
|
-
* language label.
|
|
5
|
+
* - a title — the bare words (```ts blume.config.ts, ```js Install the
|
|
6
|
+
* client) or `title="..."` — becomes `data-title`; the theme's code header
|
|
7
|
+
* shows it, falling back to the language label.
|
|
8
8
|
* - the `lineNumbers` keyword (```ts file.ts lineNumbers) becomes
|
|
9
9
|
* `data-line-numbers`; the theme renders a counter-driven line-number gutter.
|
|
10
10
|
* - the `wrap` keyword becomes `data-wrap`: this block's long lines wrap
|
|
@@ -24,6 +24,7 @@ export declare const EXPANDABLE_MIN_LINES = 16;
|
|
|
24
24
|
/** The slice of Shiki's transformer `this` context Blume reads. */
|
|
25
25
|
interface CodeMetaContext {
|
|
26
26
|
options: {
|
|
27
|
+
lang?: string;
|
|
27
28
|
meta?: {
|
|
28
29
|
__raw?: string;
|
|
29
30
|
};
|
|
@@ -40,8 +41,11 @@ export interface CodeTitleTransformer {
|
|
|
40
41
|
name: string;
|
|
41
42
|
pre: (this: CodeMetaContext, node: PreNode) => void;
|
|
42
43
|
}
|
|
43
|
-
/**
|
|
44
|
-
|
|
44
|
+
/**
|
|
45
|
+
* The title a fence's meta string promotes to `data-title`, if any. `lang` is
|
|
46
|
+
* the fence's language, which decides the other tools' keywords it drops.
|
|
47
|
+
*/
|
|
48
|
+
export declare const parseCodeTitle: (raw: string | undefined, lang?: string) => string | undefined;
|
|
45
49
|
/** How many lines a block's code runs to, a trailing newline aside. */
|
|
46
50
|
export declare const lineCount: (source?: string) => number;
|
|
47
51
|
/** Build the transformer. Runs after Shiki's built-in `data-language` hook. */
|
|
@@ -31,6 +31,14 @@ interface CalloutAliases {
|
|
|
31
31
|
export declare const CALLOUT_ALIASES: Readonly<CalloutAliases>;
|
|
32
32
|
/** Resolve a directive name to a Callout type, or `null` if it is not one. */
|
|
33
33
|
export declare const calloutTypeFor: (name: string) => string | null;
|
|
34
|
+
/**
|
|
35
|
+
* A node's phrasing children (a directive label's, a paragraph's) written
|
|
36
|
+
* back as inline Markdown, for a component prop that renders it — a callout
|
|
37
|
+
* title. Text, emphasis, strong, strikethrough, code, and links keep their
|
|
38
|
+
* formatting; anything else reads as its text (an image as nothing, raw HTML
|
|
39
|
+
* as its literal source), the way a flattened title always did.
|
|
40
|
+
*/
|
|
41
|
+
export declare const phrasingMarkdown: (parent: MdastNode) => string;
|
|
34
42
|
/**
|
|
35
43
|
* A text or leaf directive exactly as the author wrote it. The slice by
|
|
36
44
|
* offsets is the exact text — `[label]` and `{attrs}` included — and is
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A code fence's language, read the way authors coming from other docs tools
|
|
3
|
+
* write it. Shiki matches language ids exactly, so two common spellings used
|
|
4
|
+
* to fall back to plain text with only a console line:
|
|
5
|
+
*
|
|
6
|
+
* - a capitalized id (```` ```JSON ````, ```` ```Dockerfile ````): Shiki's ids
|
|
7
|
+
* and aliases are all lowercase, so the id is lowercased when that names a
|
|
8
|
+
* language and the spelling as written doesn't.
|
|
9
|
+
* - a line range glued to the id (```` ```js{2} ````, the VitePress and
|
|
10
|
+
* VuePress form): the range moves into the fence meta, ahead of any meta
|
|
11
|
+
* already there, where the line-highlight transformer reads it.
|
|
12
|
+
* - a line range glued to a bracketed title (```` ```ts [file.ts]{2} ````,
|
|
13
|
+
* the Docus form): a space splits it off, so the title is the bracketed
|
|
14
|
+
* word alone and the range stays a range.
|
|
15
|
+
*
|
|
16
|
+
* Every other fence keeps its language and meta exactly as written.
|
|
17
|
+
*/
|
|
18
|
+
import type { MdastNode } from "./mdast.ts";
|
|
19
|
+
/** Whether Shiki highlights `lang` as written: a bundled id, alias, or plain. */
|
|
20
|
+
export declare const isKnownLanguage: (lang: string) => boolean;
|
|
21
|
+
/** A fence's language and meta, after {@link normalizeFence}. */
|
|
22
|
+
export interface Fence {
|
|
23
|
+
lang: string;
|
|
24
|
+
meta: string | null;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The language and meta a fence means, or null when it means what it says.
|
|
28
|
+
* A range glued to the language moves into the meta and one glued to a
|
|
29
|
+
* bracketed title splits off it, then a capitalized language that only names
|
|
30
|
+
* a known language in lowercase is lowercased.
|
|
31
|
+
*/
|
|
32
|
+
export declare const normalizeFence: (lang: string | null | undefined, meta: string | null | undefined) => Fence | null;
|
|
33
|
+
/** The code node slice the plugin reads. */
|
|
34
|
+
interface CodeNode extends MdastNode {
|
|
35
|
+
lang?: string | null;
|
|
36
|
+
meta?: string | null;
|
|
37
|
+
}
|
|
38
|
+
/** The visitor context slice the plugin writes through. */
|
|
39
|
+
interface FenceContext {
|
|
40
|
+
setProperty: (node: CodeNode, key: "lang" | "meta", value: string | null) => void;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Satteri MDAST plugin applying {@link normalizeFence} to every fence. It runs
|
|
44
|
+
* before the plugins that read a fence's language (`package-install`, `ts2js`,
|
|
45
|
+
* mermaid) and before Shiki, so all of them see the normalized fence.
|
|
46
|
+
*/
|
|
47
|
+
export declare const fenceLanguagePlugin: () => {
|
|
48
|
+
code(node: CodeNode, ctx: FenceContext): void;
|
|
49
|
+
name: string;
|
|
50
|
+
};
|
|
51
|
+
export {};
|
|
@@ -19,5 +19,10 @@ export declare const metaTokens: (meta: string | null | undefined) => string[];
|
|
|
19
19
|
* a block title.
|
|
20
20
|
*/
|
|
21
21
|
export declare const RESERVED_META_KEYWORDS: ReadonlySet<string>;
|
|
22
|
+
export declare const RUST_META_KEYWORDS: ReadonlySet<string>;
|
|
23
|
+
/** The fence languages rustdoc's and mdBook's keywords apply to. */
|
|
24
|
+
export declare const RUST_LANGUAGES: ReadonlySet<string>;
|
|
25
|
+
/** Whether `token` is another tool's keyword in a fence of language `lang`. */
|
|
26
|
+
export declare const isForeignKeyword: (token: string, lang: string | null | undefined) => boolean;
|
|
22
27
|
/** A Shiki `{1,3-5}` line-range token. */
|
|
23
28
|
export declare const isLineRange: (token: string) => boolean;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { MdastNode, MdastVisitorContext } from "./mdast.ts";
|
|
2
|
+
/**
|
|
3
|
+
* The callout each GitHub alert renders as. `IMPORTANT` has no callout of its
|
|
4
|
+
* own and reads as a note (`:::important` does too), and `CAUTION` — GitHub's
|
|
5
|
+
* red "risks or negative outcomes" alert — as danger.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ALERT_CALLOUTS: ReadonlyMap<string, string>;
|
|
8
|
+
/** An alert marker as written (`[!NOTE]`) and the callout it renders as. */
|
|
9
|
+
export interface AlertMarker {
|
|
10
|
+
callout: string;
|
|
11
|
+
marker: string;
|
|
12
|
+
}
|
|
13
|
+
/** The alert marker a quote's first text opens with, if any. */
|
|
14
|
+
export declare const alertMarkerOf: (text: string) => AlertMarker | undefined;
|
|
15
|
+
/** The visitor-context slice the alert visitor uses. */
|
|
16
|
+
interface AlertVisitorContext extends MdastVisitorContext {
|
|
17
|
+
parent?: (node: MdastNode) => MdastNode | undefined;
|
|
18
|
+
source?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Satteri MDAST plugin for GitHub alerts in `.mdx`: a quote whose first line
|
|
22
|
+
* is `[!NOTE]`, `[!TIP]`, `[!IMPORTANT]`, `[!WARNING]`, or `[!CAUTION]`
|
|
23
|
+
* renders as the matching `<Callout>` (see {@link ALERT_CALLOUTS}), as on
|
|
24
|
+
* GitHub. An alert quoted inside another stays a quote, as GitHub leaves it.
|
|
25
|
+
* `.md` pages render no components, so their alerts stay quotes, which
|
|
26
|
+
* `blume check` warns about (`core/alert-diagnostics.ts`).
|
|
27
|
+
*/
|
|
28
|
+
export declare const githubAlertsPlugin: () => {
|
|
29
|
+
blockquote(node: MdastNode, ctx: AlertVisitorContext): void;
|
|
30
|
+
name: string;
|
|
31
|
+
options: {
|
|
32
|
+
position: boolean;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ApiOperationRef,
|
|
1
|
+
import type { ApiOperationRef, CollectedOperations } from "./model.ts";
|
|
2
2
|
/**
|
|
3
3
|
* Blume's own AsyncAPI model — the second front-end of the API reference
|
|
4
4
|
* pipeline. Specs are normalized to AsyncAPI 3.x at parse time (see
|
|
@@ -108,10 +108,11 @@ export declare const applyAsyncApiTraits: (document: AsyncApiDocument) => AsyncA
|
|
|
108
108
|
* see plain channel/operation objects, trait-free.
|
|
109
109
|
*/
|
|
110
110
|
export declare const normalizeAsyncApiDocument: (document: AsyncApiDocument) => AsyncApiDocument;
|
|
111
|
-
/**
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
/**
|
|
112
|
+
* The route-mapped operations, ordered tags, moved routes, and skip warnings
|
|
113
|
+
* of one document.
|
|
114
|
+
*/
|
|
115
|
+
export interface AsyncApiOperationCatalog extends CollectedOperations {
|
|
115
116
|
warnings: string[];
|
|
116
117
|
}
|
|
117
118
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { JsonValue } from "../core/adapter.ts";
|
|
1
2
|
import type { ApiDocument } from "./model.ts";
|
|
2
3
|
/**
|
|
3
4
|
* Targeted checks for spec mistakes that would otherwise render silently
|
|
@@ -14,14 +15,18 @@ export interface SpecIssue {
|
|
|
14
15
|
message: string;
|
|
15
16
|
suggestion: string;
|
|
16
17
|
}
|
|
17
|
-
/**
|
|
18
|
-
* How a warning names an operation: `GET /pets`, or a webhook by its name
|
|
19
|
-
* (`Webhook "newPet" (POST)`), since a webhook has no path.
|
|
20
|
-
*/
|
|
21
|
-
export declare const operationLabel: (name: string, method: string, webhook: boolean) => string;
|
|
22
18
|
/**
|
|
23
19
|
* Check a parsed document for the mistakes above, and for the OpenAPI 3.2
|
|
24
20
|
* features Blume doesn't render yet. `$ref` path items are skipped: the
|
|
25
21
|
* extractor already reports them as missing from the reference.
|
|
26
22
|
*/
|
|
27
23
|
export declare const specIssues: (document: ApiDocument) => SpecIssue[];
|
|
24
|
+
/**
|
|
25
|
+
* A spec written as OpenAPI 3.1 or later that still uses `nullable`, which
|
|
26
|
+
* 3.1 removed for `type: [T, "null"]`. Read as written (before Blume
|
|
27
|
+
* upgrades a 3.0 spec, which rewrites `nullable` itself), since that's the
|
|
28
|
+
* document the author edits. Blume still renders those values as nullable,
|
|
29
|
+
* but validators and SDK generators that follow 3.1 read them as never
|
|
30
|
+
* null. One warning per spec, naming the first few places.
|
|
31
|
+
*/
|
|
32
|
+
export declare const nullableIssues: (document: JsonValue) => SpecIssue[];
|