blume 2.1.2 → 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 +133 -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 +10 -9
- 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
|
@@ -83,7 +83,10 @@ export declare const soleAllOfMember: (schema: SchemaLike) => SchemaLike | undef
|
|
|
83
83
|
/**
|
|
84
84
|
* Resolve one level of `$ref` against the document's component schemas. A
|
|
85
85
|
* single-member `allOf` wrapper resolves like its member, with the wrapper's
|
|
86
|
-
* own keywords on top: its `description` is about this field.
|
|
86
|
+
* own keywords on top: its `description` is about this field. So does a
|
|
87
|
+
* `$ref` with keywords beside it, which OpenAPI 3.1 allows and .NET writes
|
|
88
|
+
* for every enum-typed property: the `description` beside the `$ref` is the
|
|
89
|
+
* property's, the referenced one the type's.
|
|
87
90
|
*/
|
|
88
91
|
export declare const resolveSchema: (schemas: Record<string, SchemaLike>, schema?: SchemaLike) => SchemaLike;
|
|
89
92
|
/**
|
|
@@ -121,16 +124,30 @@ export interface ObjectPropertySet {
|
|
|
121
124
|
* the merged required set.
|
|
122
125
|
*/
|
|
123
126
|
export declare const objectProperties: (schema: SchemaLike, schemas: Record<string, SchemaLike>) => ObjectPropertySet;
|
|
127
|
+
/** Which way an example travels: to the API, or back from it. */
|
|
128
|
+
export type ExampleDirection = "request" | "response";
|
|
129
|
+
/**
|
|
130
|
+
* An example value with the properties that don't travel `direction` left
|
|
131
|
+
* out, at every depth its schema describes: `readOnly` ones from a request,
|
|
132
|
+
* which the server sets, and `writeOnly` ones from a response, which it
|
|
133
|
+
* never returns. openapi-sampler skips those only in the values it builds; a
|
|
134
|
+
* declared example (a model's `example`, which TypeSpec writes, or a media
|
|
135
|
+
* type's) keeps them, so a request sample would send the model's `id`. A
|
|
136
|
+
* property the schema doesn't describe stays as written.
|
|
137
|
+
*/
|
|
138
|
+
export declare const forDirection: (value: SpecValue, schema: SchemaLike | undefined, schemas: Record<string, SchemaLike>, direction: ExampleDirection) => SpecValue;
|
|
124
139
|
/**
|
|
125
140
|
* Build a representative example value for a schema via openapi-sampler
|
|
126
141
|
* (Redoc's generator): declared `example`/`const`/`default`/`enum` values
|
|
127
|
-
* win,
|
|
128
|
-
* and circular `$ref` chains —
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
142
|
+
* win, a value beside a `$ref` included, formats produce realistic
|
|
143
|
+
* placeholders (`email`, `uuid`, `date-time`), and circular `$ref` chains —
|
|
144
|
+
* which keeping refs intact allows — terminate safely. A request sample
|
|
145
|
+
* leaves out `readOnly` fields (a server-generated field has no place in
|
|
146
|
+
* one); a response sample leaves out `writeOnly` fields (a password the
|
|
147
|
+
* client sends never comes back) and keeps the `readOnly` ones. That holds
|
|
148
|
+
* inside a declared value the sampler copies too (see {@link forDirection}).
|
|
132
149
|
*/
|
|
133
|
-
export declare const exampleValue: (schema: SchemaLike | undefined, schemas: Record<string, SchemaLike>, direction?:
|
|
150
|
+
export declare const exampleValue: (schema: SchemaLike | undefined, schemas: Record<string, SchemaLike>, direction?: ExampleDirection) => SpecValue;
|
|
134
151
|
/** Where an author can declare an example: a parameter or a media type. */
|
|
135
152
|
export interface ExampleCarrier {
|
|
136
153
|
example?: SpecValue;
|
|
@@ -146,13 +163,38 @@ export interface ExampleCarrier {
|
|
|
146
163
|
* declared.
|
|
147
164
|
*/
|
|
148
165
|
export declare const declaredExample: (carrier: ExampleCarrier, components?: ComponentsLike) => SpecValue;
|
|
166
|
+
/** A media type: the schema of a body and the examples it declares. */
|
|
167
|
+
export type MediaLike = ExampleCarrier & {
|
|
168
|
+
schema?: SchemaLike;
|
|
169
|
+
};
|
|
170
|
+
/**
|
|
171
|
+
* A media type's example for a body travelling `direction`: the declared
|
|
172
|
+
* one, else a sample built from its schema, with the properties that don't
|
|
173
|
+
* travel that way left out (see {@link forDirection}).
|
|
174
|
+
*/
|
|
175
|
+
export declare const mediaExample: (media: MediaLike, schemas: Record<string, SchemaLike>, direction: ExampleDirection, components?: ComponentsLike) => SpecValue;
|
|
149
176
|
/**
|
|
150
177
|
* A response media type's example for the Response panel: the declared one,
|
|
151
178
|
* else a sample built for the response direction (`readOnly` kept,
|
|
152
|
-
* `writeOnly`
|
|
179
|
+
* `writeOnly` left out).
|
|
153
180
|
*/
|
|
154
|
-
export declare const responseExample: (media:
|
|
155
|
-
|
|
156
|
-
|
|
181
|
+
export declare const responseExample: (media: MediaLike, schemas: Record<string, SchemaLike>, components?: ComponentsLike) => SpecValue;
|
|
182
|
+
/** One of a media type's named examples, as a tab or the Markdown copy shows it. */
|
|
183
|
+
export interface NamedExample {
|
|
184
|
+
/** The example's key in the `examples` map. */
|
|
185
|
+
key: string;
|
|
186
|
+
/** Its `summary`, else its key. */
|
|
187
|
+
label: string;
|
|
188
|
+
value: SpecValue;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Every example a media type's `examples` map names, in order, `$ref`s to
|
|
192
|
+
* `#/components/examples` resolved, each labeled by its `summary` or else
|
|
193
|
+
* its key, with the properties that don't travel `direction` left out. Empty
|
|
194
|
+
* unless the map names two or more: Scalar's upgrade files a 3.0 `example`
|
|
195
|
+
* as the one entry `default`, which is no name to show, and a lone example
|
|
196
|
+
* is the one {@link mediaExample} already gives.
|
|
197
|
+
*/
|
|
198
|
+
export declare const namedExamples: (media: MediaLike, schemas: Record<string, SchemaLike>, direction: ExampleDirection, components?: ComponentsLike) => NamedExample[];
|
|
157
199
|
/** Pretty-print a JSON value for an example/code block. */
|
|
158
200
|
export declare const toJson: <T>(value: T) => string;
|
|
@@ -53,8 +53,14 @@ export interface SampleLanguageInfo {
|
|
|
53
53
|
export declare const sampleLanguageInfo: (raw: string) => SampleLanguageInfo | null;
|
|
54
54
|
/** `openapi()`'s default `codeSamples`, which hand-written endpoint pages always use. */
|
|
55
55
|
export declare const DEFAULT_SAMPLE_LANGUAGES: string[];
|
|
56
|
+
/**
|
|
57
|
+
* The configured ids Blume generates no sample for, as written: the ones
|
|
58
|
+
* {@link sampleLanguages} drops, which the reference source warns about.
|
|
59
|
+
*/
|
|
60
|
+
export declare const unknownSampleLanguages: (ids: string[] | false) => string[];
|
|
56
61
|
/**
|
|
57
62
|
* The sample languages to render, resolved from config ids (unknown ids
|
|
58
|
-
* dropped), in order. `false` and
|
|
63
|
+
* dropped, with a warning from the reference source), in order. `false` and
|
|
64
|
+
* an empty list both render none.
|
|
59
65
|
*/
|
|
60
66
|
export declare const sampleLanguages: (ids: string[] | false) => SampleLanguage[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SourceEntry } from "./sources/types.ts";
|
|
2
|
+
import type { Diagnostic } from "./types.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Warn about GitHub alerts (`> [!NOTE]`) in an `.md` entry, which renders
|
|
5
|
+
* them as plain quotes that show the marker as text: alerts become callouts
|
|
6
|
+
* only in `.mdx`, where Blume renders components (see
|
|
7
|
+
* `markdown/github-alerts.ts`). Lines point into the file the author wrote, a
|
|
8
|
+
* partial's own file for an alert an `<include>` brought in.
|
|
9
|
+
*/
|
|
10
|
+
export declare const alertDiagnostics: (entry: SourceEntry, sourceName: string) => Diagnostic[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The MDX component tags Blume ships (the keys of the catch-all's component map,
|
|
3
|
+
* plus composed sub-parts like `Color.Item`/`Tree.File`). Used by the
|
|
4
|
+
* missing-component diagnostic to tell an unknown `<Tag>` from a built-in. Keep
|
|
5
|
+
* in sync with the component map in `astro/templates.ts`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const BUILTIN_MDX_TAGS: Set<string>;
|
|
8
|
+
/**
|
|
9
|
+
* The props each built-in that shows its children takes, keyed by MDX tag. A
|
|
10
|
+
* childless use with any other prop renders without the content its author
|
|
11
|
+
* meant it to carry (VitePress writes `<Badge type="tip" text="beta" />`, and
|
|
12
|
+
* Blume's Badge shows only its children), which the unknown-prop diagnostic
|
|
13
|
+
* reports. Each list is the component's own `Props` (or what it reads from
|
|
14
|
+
* `Astro.props`); a test checks them against the `.astro` files.
|
|
15
|
+
*/
|
|
16
|
+
export declare const BUILTIN_CHILD_PROPS: ReadonlyMap<string, readonly string[]>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The policy the changelog index lists by, shared by the surfaces that build
|
|
3
|
+
* it: the `<Changelog />` component (reading Astro collection entries) and
|
|
4
|
+
* `ai/changelog-markdown.ts` (reading the build-time page graph for the
|
|
5
|
+
* `/changelog.md` mirror and MCP `get_page`).
|
|
6
|
+
*
|
|
7
|
+
* The data sources genuinely differ — a collection entry on the Astro side, a
|
|
8
|
+
* `PageRecord` on the Node side — so what lives here is the *decisions*, not
|
|
9
|
+
* the access: which date a row carries, what order rows come in, and how they
|
|
10
|
+
* fall into year groups. Keeping them in one place is what stops the rendered
|
|
11
|
+
* page and the Markdown an agent reads from drifting apart.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* A changelog entry's date, from `date` or the `changelog.date` it may live
|
|
15
|
+
* under instead. Front matter hands either a `Date` (an unquoted YAML date) or
|
|
16
|
+
* a string, and an unparseable value is treated as no date at all rather than
|
|
17
|
+
* failing the build — a malformed date costs the row its stamp and its year
|
|
18
|
+
* group, not the page.
|
|
19
|
+
*/
|
|
20
|
+
export declare const parseChangelogDate: (value: Date | string | null | undefined) => Date | null;
|
|
21
|
+
/**
|
|
22
|
+
* Newest first. An undated entry sorts as the epoch, so undated rows collect
|
|
23
|
+
* at the end of the list (and, through {@link groupChangelogYears}, into a
|
|
24
|
+
* final group with no year label).
|
|
25
|
+
*/
|
|
26
|
+
export declare const compareChangelogDates: (a: Date | null, b: Date | null) => number;
|
|
27
|
+
/** One year's run of rows. `year` is `null` for the undated group. */
|
|
28
|
+
export interface ChangelogYearGroup<T> {
|
|
29
|
+
items: T[];
|
|
30
|
+
year: string | null;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Consecutive rows sharing a year, in list order, so the index reads as a year
|
|
34
|
+
* rail beside its rows. Runs are consecutive rather than keyed, which matters
|
|
35
|
+
* only for a list that isn't sorted by date: such a list keeps its order and
|
|
36
|
+
* repeats the year heading instead of silently regrouping around it.
|
|
37
|
+
*
|
|
38
|
+
* `yearOf` returns the label the surface wants — a locale-formatted year on the
|
|
39
|
+
* rendered page, a plain number in Markdown — or `null` for an undated row.
|
|
40
|
+
*/
|
|
41
|
+
export declare const groupChangelogYears: <T>(items: T[], yearOf: (item: T) => string | null) => ChangelogYearGroup<T>[];
|
|
42
|
+
/**
|
|
43
|
+
* Make each row's anchor unique. Repeated labels slug to the same id (two
|
|
44
|
+
* entries with neither a title nor a version both fall back to "update"), so
|
|
45
|
+
* the later ones take a `-2`, `-3`, … suffix and the first keeps the plain
|
|
46
|
+
* slug — every row ends up with its own hash anchor.
|
|
47
|
+
*/
|
|
48
|
+
export declare const uniqueAnchorIds: (ids: string[]) => string[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The candidate closest to `name`, when it's close enough to be the likely
|
|
3
|
+
* intent: at most two edits away, and fewer edits than half the candidate's
|
|
4
|
+
* length, so a short typo doesn't "suggest" an unrelated short word.
|
|
5
|
+
*/
|
|
6
|
+
export declare const closestMatch: (name: string, candidates: readonly string[]) => string | undefined;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { SourceEntry } from "./sources/types.ts";
|
|
2
|
+
import type { Diagnostic } from "./types.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Warn about code fences that don't render as their author meant:
|
|
5
|
+
*
|
|
6
|
+
* - `BLUME_UNKNOWN_CODE_LANGUAGE`: a language Shiki doesn't know, so the block
|
|
7
|
+
* renders as plain text. Shiki itself only logs a console line naming the
|
|
8
|
+
* language, with no page or line.
|
|
9
|
+
* - `BLUME_CODE_FENCE_OPTION`: an option another docs tool reads, like MkDocs'
|
|
10
|
+
* `hl_lines="2 3"`, Docusaurus' `showLineNumbers`, Mintlify's `lines`, or
|
|
11
|
+
* rustdoc's `no_run`, which Blume ignores. None of them becomes part of the
|
|
12
|
+
* block's title. The suggestion gives the Blume spelling, or says to remove
|
|
13
|
+
* an option Blume has no use for.
|
|
14
|
+
*
|
|
15
|
+
* Lines point into the file the author wrote, a partial's own file for a
|
|
16
|
+
* fence an `<include>` brought in.
|
|
17
|
+
*/
|
|
18
|
+
export declare const codeFenceDiagnostics: (entry: SourceEntry, sourceName: string) => Diagnostic[];
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* The open fence's delimiter char, its run length, and the block-quote depth
|
|
3
|
+
* it opened at, or null outside one.
|
|
4
|
+
*/
|
|
2
5
|
export type FenceState = {
|
|
3
6
|
delimiter: "`" | "~";
|
|
4
7
|
length: number;
|
|
8
|
+
quotes: number;
|
|
5
9
|
} | null;
|
|
6
10
|
/**
|
|
7
11
|
* Advance the fenced-code state for one line: an opening fence records its
|
|
8
12
|
* delimiter and run length, only a bare run of the same character at least as
|
|
9
13
|
* long closes it (CommonMark), and any other line leaves the state untouched.
|
|
14
|
+
* A fence inside block quotes is read past the quote markers it opened under,
|
|
15
|
+
* and a line without them ends the quote, and the fence with it: code takes
|
|
16
|
+
* no lazy continuation lines (CommonMark).
|
|
10
17
|
*/
|
|
11
18
|
export declare const nextFenceState: (line: string, fence: FenceState) => FenceState;
|
|
@@ -147,7 +147,7 @@ export interface ChangelogConfig {
|
|
|
147
147
|
export interface ContentConfig {
|
|
148
148
|
/** Default page `type` for content that sets none. Defaults to `doc`. */
|
|
149
149
|
defaultType?: string;
|
|
150
|
-
/** Glob patterns to ignore
|
|
150
|
+
/** Glob patterns to ignore, on top of `["**\/_*", "**\/.*"]`; a `!pattern` entry stops ignoring that pattern, a default included. Shorthand; not allowed beside `sources`. */
|
|
151
151
|
exclude?: string[];
|
|
152
152
|
/** Glob patterns to include. Defaults to `["**\/*.{md,mdx}"]`. Shorthand; not allowed beside `sources`. */
|
|
153
153
|
include?: string[];
|
|
@@ -10,8 +10,15 @@ import type { PageRecord } from "./types.ts";
|
|
|
10
10
|
* `/blume-assets/content/<project-relative path>` by a generated endpoint (see
|
|
11
11
|
* `contentAssetsEndpointTemplate`), and these helpers rewrite the relative
|
|
12
12
|
* references in agent-facing output to that URL.
|
|
13
|
+
*
|
|
14
|
+
* Other files beside a page are published the same way: a link to one
|
|
15
|
+
* (`[spec](./spec.pdf)`, a reference definition), a raw HTML or `.mdx`
|
|
16
|
+
* element's `src` (`<img src="./diagram.png">`, `<video>`, `<source>`,
|
|
17
|
+
* `<audio>`), and an `<a>`'s or a component's `href`. Nothing else serves
|
|
18
|
+
* them, so the HTML render points those at the same URLs (see
|
|
19
|
+
* `markdown/content-assets.ts`).
|
|
13
20
|
*/
|
|
14
|
-
/** The endpoint route prefix colocated content
|
|
21
|
+
/** The endpoint route prefix colocated content files are served under. */
|
|
15
22
|
export declare const CONTENT_ASSETS_PREFIX = "/blume-assets/content";
|
|
16
23
|
/**
|
|
17
24
|
* The endpoint param a colocated image is served under: its project-relative
|
|
@@ -21,29 +28,20 @@ export declare const CONTENT_ASSETS_PREFIX = "/blume-assets/content";
|
|
|
21
28
|
*/
|
|
22
29
|
export declare const contentAssetParam: (projectRoot: string, absPath: string) => string;
|
|
23
30
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* nowhere" — the former falls through to the public-dir probe, the latter is
|
|
28
|
-
* a broken reference beside the page source.
|
|
31
|
+
* The URL a colocated image's endpoint param is served at, under
|
|
32
|
+
* `deployment.base` when set, encoded for a Markdown or HTML URL with its `/`
|
|
33
|
+
* separators kept.
|
|
29
34
|
*/
|
|
30
|
-
export declare const
|
|
35
|
+
export declare const contentAssetUrl: (param: string, deployBase?: string) => string;
|
|
31
36
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* anything else (remote URLs, `public/` absolutes, broken refs, code-block
|
|
35
|
-
* examples that happen to look like paths) is null and left untouched. Shared
|
|
36
|
-
* with link validation, so what counts as a colocated image is decided once.
|
|
37
|
-
*/
|
|
38
|
-
export declare const resolveRelativeImage: (sourceDir: string, target: string) => string | null;
|
|
39
|
-
/**
|
|
40
|
-
* Rewrite a page's relative image references to their served
|
|
37
|
+
* Rewrite a page's relative image references, and its links and element
|
|
38
|
+
* URLs naming other files beside it, to their served
|
|
41
39
|
* `/blume-assets/content/…` URLs (under `deployment.base` when set). Fenced
|
|
42
40
|
* code blocks and inline code are skipped; only references whose file actually
|
|
43
41
|
* exists next to the source are touched. `register` observes each rewritten
|
|
44
42
|
* asset so a caller can accumulate the files the endpoint must serve.
|
|
45
43
|
*/
|
|
46
|
-
export declare const
|
|
44
|
+
export declare const rewriteRelativeAssets: (options: {
|
|
47
45
|
source: string;
|
|
48
46
|
sourcePath: string;
|
|
49
47
|
projectRoot: string;
|
|
@@ -51,7 +49,7 @@ export declare const rewriteRelativeImages: (options: {
|
|
|
51
49
|
register?: (param: string, absPath: string) => void;
|
|
52
50
|
}) => string;
|
|
53
51
|
/**
|
|
54
|
-
* Every colocated
|
|
52
|
+
* Every colocated file the project's pages reference, keyed by endpoint param.
|
|
55
53
|
* Serialized to `generated/content-assets.json`, which the
|
|
56
54
|
* `/blume-assets/[...asset]` endpoint reads to serve the original files. Runs
|
|
57
55
|
* the same rewrite the agent-Markdown builders apply — over the same
|
|
@@ -10,6 +10,20 @@ export declare const createDiagnostic: (diagnostic: Diagnostic) => Diagnostic;
|
|
|
10
10
|
export declare const resolveDocsUrl: (code: string) => string | undefined;
|
|
11
11
|
/** Fill in `docsUrl` from the code map where a diagnostic doesn't set its own. */
|
|
12
12
|
export declare const enrichDiagnostic: (diagnostic: Diagnostic) => Diagnostic;
|
|
13
|
+
/**
|
|
14
|
+
* Best-effort source position for a Zod issue path (e.g. `["seo", "title"]`,
|
|
15
|
+
* `["redirects", 2, "status"]`) in the raw config / frontmatter text. Narrows
|
|
16
|
+
* segment by segment: a key is found among its parent's own entries (or, where
|
|
17
|
+
* there are no brackets, in the parent's indented lines), an index picks that
|
|
18
|
+
* element of an array literal. A segment that isn't there — a missing key —
|
|
19
|
+
* stops the walk at its parent, so the position never escapes into a sibling.
|
|
20
|
+
* Returns 1-based line/column, or undefined when not even the first segment
|
|
21
|
+
* matches.
|
|
22
|
+
*/
|
|
23
|
+
export declare const locatePath: (source: string, path: readonly (string | number)[]) => {
|
|
24
|
+
column: number;
|
|
25
|
+
line: number;
|
|
26
|
+
} | undefined;
|
|
13
27
|
/**
|
|
14
28
|
* Locate a front matter key in a content file, e.g. `["seo", "description"]` in
|
|
15
29
|
* `docs/api.mdx`. Scoped to the front matter block so a `title:` written in the
|
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
import type { SourceEntry } from "./sources/types.ts";
|
|
2
2
|
import type { Diagnostic } from "./types.ts";
|
|
3
3
|
/**
|
|
4
|
-
* Warn about
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
4
|
+
* Warn about the `:::` directives in an entry that don't render as their
|
|
5
|
+
* author meant. In `.mdx`:
|
|
6
|
+
*
|
|
7
|
+
* - `BLUME_UNKNOWN_DIRECTIVE`: a `:::name` container that isn't a callout.
|
|
8
|
+
* The page keeps its content — the body renders between the literal `:::`
|
|
9
|
+
* lines (see `markdown/directives.ts`) — but a typo like `:::warnig`, or a
|
|
10
|
+
* `:::details` carried over from another docs tool, should read as the
|
|
11
|
+
* mistake it is rather than as a finished page.
|
|
12
|
+
* - `BLUME_DIRECTIVE_OPENING_TEXT`: a callout opener with text after its
|
|
13
|
+
* name, which the page drops (`:::tip Some title`).
|
|
14
|
+
* - `BLUME_DIRECTIVE_CLOSING_TEXT`: a closing fence with text after it, which
|
|
15
|
+
* the page drops (`::: card` inside a `:::warning`).
|
|
16
|
+
* - `BLUME_DIRECTIVE_SPACED_NAME`: a spaced callout opener (`::: tip`), which
|
|
17
|
+
* the page shows as text.
|
|
18
|
+
*
|
|
19
|
+
* In `.md`, which renders no directives:
|
|
20
|
+
*
|
|
21
|
+
* - `BLUME_MD_DIRECTIVE`: a `:::name` opener, which the page shows as text.
|
|
22
|
+
*
|
|
23
|
+
* Lines point into the file the author wrote, a partial's own file for a
|
|
24
|
+
* directive an `<include>` brought in.
|
|
11
25
|
*/
|
|
12
|
-
export declare const
|
|
26
|
+
export declare const directiveDiagnostics: (entry: SourceEntry, sourceName: string) => Diagnostic[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ResolvedConfig } from "./schema.ts";
|
|
2
|
+
import type { PageRecord } from "./types.ts";
|
|
3
|
+
type Redirect = ResolvedConfig["redirects"][number];
|
|
4
|
+
/**
|
|
5
|
+
* Redirects from the routes an earlier Blume published pages at
|
|
6
|
+
* (`PageRecord.formerRoute`) to where they publish now, so a date-named
|
|
7
|
+
* page's old URL keeps working. None is added where the old URL is still
|
|
8
|
+
* served (another page, or a custom page, lives there now), where an authored
|
|
9
|
+
* redirect already starts, or where two pages once resolved to it: that was a
|
|
10
|
+
* duplicate route, which failed the build, so the URL never served either.
|
|
11
|
+
* Both ends are written base-less, like authored redirects.
|
|
12
|
+
*/
|
|
13
|
+
export declare const formerRouteRedirects: (pages: readonly PageRecord[], served: ReadonlySet<string>, config: Pick<ResolvedConfig, "basePath" | "redirects">) => Redirect[];
|
|
14
|
+
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Repository URL derivation for `config.github`.
|
|
3
3
|
*
|
|
4
|
-
* Every repo-derived link — the
|
|
5
|
-
* manifest's `repository` — is built from `host`, which defaults to
|
|
6
|
-
* but accepts a GitHub Enterprise origin so self-hosted and
|
|
7
|
-
* installations get working links instead of ones pointing at the
|
|
4
|
+
* Every repo-derived link — the footer's repository link, per-page edit links,
|
|
5
|
+
* the agent manifest's `repository` — is built from `host`, which defaults to
|
|
6
|
+
* github.com but accepts a GitHub Enterprise origin so self-hosted and
|
|
7
|
+
* data-resident installations get working links instead of ones pointing at the
|
|
8
|
+
* public site.
|
|
8
9
|
*
|
|
9
10
|
* The REST base is derived from the host unless `api` is set explicitly, since
|
|
10
11
|
* the two Enterprise flavors expose it differently: Enterprise Cloud with data
|
|
@@ -13,7 +13,9 @@
|
|
|
13
13
|
* Both heading pipelines share this parser — the render-time hast plugin
|
|
14
14
|
* (`markdown/heading-anchors.ts`) and the scan-time source scanner
|
|
15
15
|
* (`core/sources/normalize.ts`) — so the rendered `id`, the TOC entry, and the
|
|
16
|
-
* anchor index `blume validate` checks against always agree.
|
|
16
|
+
* anchor index `blume validate` checks against always agree. Both also escape
|
|
17
|
+
* a pinned id's punctuation before they parse (`core/pinned-ids.ts`), so
|
|
18
|
+
* smart punctuation never rewrites the id an author pinned.
|
|
17
19
|
*/
|
|
18
20
|
import type GithubSlugger from "github-slugger";
|
|
19
21
|
/**
|
|
@@ -22,6 +24,64 @@ import type GithubSlugger from "github-slugger";
|
|
|
22
24
|
* `remarkPluginFrontmatter` to filter the TOC.
|
|
23
25
|
*/
|
|
24
26
|
export declare const TOC_HIDDEN_KEY = "__blumeTocHidden";
|
|
27
|
+
/**
|
|
28
|
+
* Frontmatter key carrying TOC text out of a render, keyed by slug, for the
|
|
29
|
+
* headings whose TOC entry must read differently from the heading's text
|
|
30
|
+
* content: a heading holding a `<Badge>` lists without the badge's text. The
|
|
31
|
+
* page template reads it back the way it reads {@link TOC_HIDDEN_KEY}.
|
|
32
|
+
*/
|
|
33
|
+
export declare const TOC_TEXT_KEY = "__blumeTocText";
|
|
34
|
+
/**
|
|
35
|
+
* A heading's auto-generated anchor id, registered with the document slugger.
|
|
36
|
+
* The text is trimmed first: a heading that opens or ends with something that
|
|
37
|
+
* has no text (an inline component, an image, raw HTML) would otherwise slug
|
|
38
|
+
* that edge whitespace into a leading or trailing dash. A slug can still end
|
|
39
|
+
* in dashes when the slugger drops a symbol after a space (`Features ✨`);
|
|
40
|
+
* those go too, so no id ends in a dash.
|
|
41
|
+
*/
|
|
42
|
+
export declare const headingSlug: (slugger: GithubSlugger, text: string) => string;
|
|
43
|
+
/**
|
|
44
|
+
* A heading's text with its badges taken out. `pieces` is the heading's text
|
|
45
|
+
* in order, with `null` where a badge stood; a badge between two words
|
|
46
|
+
* leaves one space, not the two around it (`Install <Badge>beta</Badge> now`
|
|
47
|
+
* reads `Install now`).
|
|
48
|
+
*/
|
|
49
|
+
export declare const joinHeadingText: (pieces: readonly (string | null)[]) => string;
|
|
50
|
+
/**
|
|
51
|
+
* How a raw HTML node in a heading reads for its anchor: a `<Badge>` tag that
|
|
52
|
+
* opens or closes a run of badge text (a self-closing one is a badge with no
|
|
53
|
+
* text), the opening tag of an `<a>` (`target` its `id`, else its `name`),
|
|
54
|
+
* the `</a>` that closes one, or none of these.
|
|
55
|
+
*/
|
|
56
|
+
export type RawHeadingTag = {
|
|
57
|
+
kind: "anchor-close";
|
|
58
|
+
} | {
|
|
59
|
+
kind: "anchor-open";
|
|
60
|
+
selfClosing: boolean;
|
|
61
|
+
target?: string;
|
|
62
|
+
} | {
|
|
63
|
+
kind: "badge";
|
|
64
|
+
selfClosing: boolean;
|
|
65
|
+
closing: boolean;
|
|
66
|
+
} | {
|
|
67
|
+
kind: "other";
|
|
68
|
+
};
|
|
69
|
+
/** Classify a raw HTML node in a heading — see {@link RawHeadingTag}. */
|
|
70
|
+
export declare const rawHeadingTag: (value: string) => RawHeadingTag;
|
|
71
|
+
/**
|
|
72
|
+
* A JSX attribute: a name with a string value or an `{expression}` one, or a
|
|
73
|
+
* `{...spread}` (no name).
|
|
74
|
+
*/
|
|
75
|
+
export interface JsxAttribute {
|
|
76
|
+
name?: string;
|
|
77
|
+
type: string;
|
|
78
|
+
value?: string | {
|
|
79
|
+
type: string;
|
|
80
|
+
value?: string;
|
|
81
|
+
} | null;
|
|
82
|
+
}
|
|
83
|
+
/** A JSX `<a>`'s own fragment target: its string `id`, else its `name`. */
|
|
84
|
+
export declare const jsxAnchorTarget: (attributes: readonly JsxAttribute[]) => string | undefined;
|
|
25
85
|
/**
|
|
26
86
|
* Register a pinned `[#id]` with the document slugger, the way
|
|
27
87
|
* `GithubSlugger#slug` registers the slugs it returns — so a later heading
|
|
@@ -32,7 +92,10 @@ export declare const TOC_HIDDEN_KEY = "__blumeTocHidden";
|
|
|
32
92
|
*/
|
|
33
93
|
export declare const occupySlug: (slugger: GithubSlugger, id: string) => void;
|
|
34
94
|
export interface HeadingMarkers {
|
|
35
|
-
/**
|
|
95
|
+
/**
|
|
96
|
+
* Author-pinned anchor id from `[#id]` or `{#id}`, used verbatim (never
|
|
97
|
+
* re-slugged, and never smart-punctuated: see `core/pinned-ids.ts`).
|
|
98
|
+
*/
|
|
36
99
|
id?: string;
|
|
37
100
|
/** The heading text with every trailing marker stripped. */
|
|
38
101
|
text: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { LinkDefinition } from "./sources/normalize.ts";
|
|
1
2
|
import type { Diagnostic } from "./types.ts";
|
|
2
3
|
/**
|
|
3
4
|
* Cheap pre-filter so include-free content (the overwhelmingly common case)
|
|
@@ -116,6 +117,28 @@ export declare const expandIncludes: (body: string, options: {
|
|
|
116
117
|
/** Raw-file line of `body`'s first line, minus one (default `0`). */
|
|
117
118
|
lineOffset?: number;
|
|
118
119
|
}) => Promise<IncludeExpansion>;
|
|
120
|
+
/**
|
|
121
|
+
* `text` with each of `definitions` it doesn't define itself appended, so a
|
|
122
|
+
* reference in it resolves through a definition written elsewhere in the
|
|
123
|
+
* page (CommonMark definitions are document-wide). Definitions render
|
|
124
|
+
* nothing; they're left off a text that ends in an open code fence, where
|
|
125
|
+
* they'd show as code.
|
|
126
|
+
*/
|
|
127
|
+
export declare const withDefinitions: (text: string, definitions: readonly LinkDefinition[]) => string;
|
|
128
|
+
/**
|
|
129
|
+
* A page's source with the link-reference definitions its included partials
|
|
130
|
+
* write appended, for the render to parse. Each partial is spliced after the
|
|
131
|
+
* page is parsed (see `markdown/include.ts`), so a reference in the page
|
|
132
|
+
* (`[PEP 508]`) to a definition in a partial would otherwise stay text,
|
|
133
|
+
* though an include reads as if written inline. The definitions come from
|
|
134
|
+
* the expansion every surface shares, so a partial's definition of a file
|
|
135
|
+
* beside it is already rebased onto the page. The page's own definition of
|
|
136
|
+
* a label wins.
|
|
137
|
+
*/
|
|
138
|
+
export declare const withIncludedDefinitions: (body: string, options: {
|
|
139
|
+
sourcePath: string;
|
|
140
|
+
contentRoot?: string;
|
|
141
|
+
}) => Promise<string>;
|
|
119
142
|
/**
|
|
120
143
|
* Resolve one include statement to its fully-expanded markdown text — the
|
|
121
144
|
* render plugin's entry point (it finds the statements as AST nodes and only
|
|
@@ -4,13 +4,23 @@ export interface ResolvedLastModified {
|
|
|
4
4
|
enabled: boolean;
|
|
5
5
|
source: "git" | "frontmatter";
|
|
6
6
|
}
|
|
7
|
+
export declare const gitEnv: () => NodeJS.ProcessEnv;
|
|
7
8
|
/** Normalize the `lastModified` config (`false | "git" | "frontmatter"`) into `{ enabled, source }`. */
|
|
8
9
|
export declare const resolveLastModifiedConfig: (value: false | "git" | "frontmatter") => ResolvedLastModified;
|
|
9
10
|
/**
|
|
10
|
-
* Parse `git log --format=%x00%cI --name-
|
|
11
|
-
* repo-root-relative path →
|
|
12
|
-
* NUL-prefixed date line followed by
|
|
13
|
-
*
|
|
11
|
+
* Parse `git log --format=%x00%cI --name-status -M100%` output into a map of
|
|
12
|
+
* repo-root-relative path → the committer ISO date of the newest commit that
|
|
13
|
+
* changed the file. Each commit emits a NUL-prefixed date line followed by a
|
|
14
|
+
* status line per path it touched (`M\tpath`, `R100\told\tnew`); since git
|
|
15
|
+
* logs newest-first, the first date seen for a path wins. Blank lines are
|
|
16
|
+
* ignored.
|
|
17
|
+
*
|
|
18
|
+
* A rename (`-M100%` reports only exact ones, where the content is unchanged)
|
|
19
|
+
* follows the file the way `git log --follow` does for one path: it dates
|
|
20
|
+
* nothing itself, and the older commits that name the old path date the file
|
|
21
|
+
* under its current name, so renaming `page.md` to `page.mdx` keeps the page's
|
|
22
|
+
* date. A file whose visible history starts at a rename (a shallow clone cut
|
|
23
|
+
* off the commits before it) takes the rename's date.
|
|
14
24
|
*/
|
|
15
25
|
export declare const parseGitLog: (output: string) => Map<string, string>;
|
|
16
26
|
/**
|
|
@@ -33,8 +43,10 @@ export declare const gitRepositoryRoot: (root: string) => string | null;
|
|
|
33
43
|
/**
|
|
34
44
|
* Resolve each source file's last-modified date from git history, keyed by
|
|
35
45
|
* absolute source path. Runs a single `git log` over the given content roots
|
|
36
|
-
* (each local source's own root, which may diverge from `content.root`)
|
|
37
|
-
*
|
|
46
|
+
* (each local source's own root, which may diverge from `content.root`),
|
|
47
|
+
* following renames within them (see `parseGitLog`; a file moved in from
|
|
48
|
+
* outside every root dates from the move), and maps repo-root-relative paths
|
|
49
|
+
* back to the given absolute paths
|
|
38
50
|
* (monorepo-safe via `rev-parse --show-toplevel`). Returns an empty map if git
|
|
39
51
|
* is unavailable or the project isn't a repo — the feature then simply shows
|
|
40
52
|
* no dates.
|