blume 1.7.2 → 2.0.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 +19 -0
- package/CHANGELOG.md +227 -0
- package/README.md +34 -21
- package/dist/cli/chunk-11j0384y.js +148 -0
- package/dist/cli/chunk-11j0384y.js.map +10 -0
- package/dist/cli/{chunk-xhtpx3ff.js → chunk-1w8dp3qb.js} +17 -16
- package/dist/cli/{chunk-xhtpx3ff.js.map → chunk-1w8dp3qb.js.map} +3 -3
- package/dist/cli/chunk-2q1dwty4.js +75 -0
- package/dist/cli/chunk-2q1dwty4.js.map +11 -0
- package/dist/cli/chunk-41za066z.js +122 -0
- package/dist/cli/chunk-41za066z.js.map +11 -0
- package/dist/cli/chunk-5a2z0198.js +133 -0
- package/dist/cli/chunk-5a2z0198.js.map +10 -0
- package/dist/cli/{chunk-9he6crym.js → chunk-6k8vp3ta.js} +25 -13
- package/dist/cli/{chunk-9he6crym.js.map → chunk-6k8vp3ta.js.map} +4 -4
- package/dist/cli/{chunk-mt76t7dj.js → chunk-79njf86q.js} +133 -54
- package/dist/cli/chunk-79njf86q.js.map +11 -0
- package/dist/cli/{chunk-3w7b2vcx.js → chunk-7ez8ny0t.js} +2 -2
- package/dist/cli/{chunk-688e0dde.js → chunk-88cpgt6h.js} +1 -1
- package/dist/cli/chunk-a9kptbw5.js +361 -0
- package/dist/cli/chunk-a9kptbw5.js.map +14 -0
- package/dist/cli/chunk-abh8yjkn.js +31 -0
- package/dist/cli/chunk-abh8yjkn.js.map +10 -0
- package/dist/cli/chunk-b5aj94ah.js +91 -0
- package/dist/cli/chunk-b5aj94ah.js.map +10 -0
- package/dist/cli/{chunk-hs3gbh8p.js → chunk-bctazmbk.js} +9 -5
- package/dist/cli/chunk-bctazmbk.js.map +10 -0
- package/dist/cli/chunk-beat36xx.js +279 -0
- package/dist/cli/chunk-beat36xx.js.map +10 -0
- package/dist/cli/chunk-bnbmcwfb.js +145 -0
- package/dist/cli/chunk-bnbmcwfb.js.map +11 -0
- package/dist/cli/{chunk-9bkjd11x.js → chunk-bw22s759.js} +15 -5
- package/dist/cli/{chunk-9bkjd11x.js.map → chunk-bw22s759.js.map} +4 -4
- package/dist/cli/chunk-by2290sx.js +39 -0
- package/dist/cli/chunk-by2290sx.js.map +10 -0
- package/dist/cli/chunk-d1tadaw7.js +79 -0
- package/dist/cli/chunk-d1tadaw7.js.map +10 -0
- package/dist/cli/{chunk-t3tj0dgr.js → chunk-d80hr03s.js} +24 -19
- package/dist/cli/chunk-d80hr03s.js.map +15 -0
- package/dist/cli/chunk-ernrthtr.js +97 -0
- package/dist/cli/chunk-ernrthtr.js.map +10 -0
- package/dist/cli/chunk-f2972sbt.js +374 -0
- package/dist/cli/chunk-f2972sbt.js.map +10 -0
- package/dist/cli/{chunk-exeeb35e.js → chunk-f7t03s3g.js} +2 -2
- package/dist/cli/{chunk-2z47ypj8.js → chunk-fa25z98p.js} +16 -3
- package/dist/cli/chunk-fa25z98p.js.map +11 -0
- package/dist/cli/{chunk-12dxjqk7.js → chunk-fh5hj5jt.js} +44 -21
- package/dist/cli/chunk-fh5hj5jt.js.map +10 -0
- package/dist/cli/{chunk-8cd8tj54.js → chunk-j8mw0za6.js} +86 -57
- package/dist/cli/chunk-j8mw0za6.js.map +35 -0
- package/dist/cli/chunk-jts8mvcz.js +106 -0
- package/dist/cli/{chunk-2mzebbbz.js.map → chunk-jts8mvcz.js.map} +6 -4
- package/dist/cli/{chunk-ejjx8znq.js → chunk-mnqj32sj.js} +505 -536
- package/dist/cli/chunk-mnqj32sj.js.map +12 -0
- package/dist/cli/{chunk-196vjxp9.js → chunk-mwt1k8n7.js} +100 -372
- package/dist/cli/chunk-mwt1k8n7.js.map +10 -0
- package/dist/cli/chunk-nk3ts2xk.js +51 -0
- package/dist/cli/chunk-nk3ts2xk.js.map +10 -0
- package/dist/cli/{chunk-n9sra6sy.js → chunk-pat2zzwc.js} +10 -14
- package/dist/cli/{chunk-n9sra6sy.js.map → chunk-pat2zzwc.js.map} +2 -2
- package/dist/cli/chunk-pnnvybbk.js +176 -0
- package/dist/cli/chunk-pnnvybbk.js.map +11 -0
- package/dist/cli/{chunk-cvky9gb2.js → chunk-sqn5t4q0.js} +81 -87
- package/dist/cli/chunk-sqn5t4q0.js.map +10 -0
- package/dist/cli/{chunk-eevwt1sc.js → chunk-tzne8qfq.js} +15 -15
- package/dist/cli/{chunk-eevwt1sc.js.map → chunk-tzne8qfq.js.map} +1 -1
- package/dist/cli/chunk-xaz13gwg.js +12449 -0
- package/dist/cli/chunk-xaz13gwg.js.map +182 -0
- package/dist/cli/chunk-y3e45rc8.js +102 -0
- package/dist/cli/chunk-y3e45rc8.js.map +10 -0
- package/dist/cli/chunk-z01ze5c1.js +261 -0
- package/dist/cli/chunk-z01ze5c1.js.map +10 -0
- package/dist/cli/{chunk-5n7t497w.js → chunk-z1f5arsg.js} +247 -755
- package/dist/cli/chunk-z1f5arsg.js.map +36 -0
- package/dist/cli/{chunk-hdm2dkd2.js → chunk-zg2gtj10.js} +1086 -2596
- package/dist/cli/chunk-zg2gtj10.js.map +35 -0
- package/dist/cli/{chunk-ppfvdcd4.js → chunk-zxccj738.js} +1 -1
- package/dist/cli/index.js +214 -57
- package/dist/cli/index.js.map +8 -7
- package/dist/types/ai/agent-readability.d.ts +52 -0
- package/dist/types/ai/ai-catalog.d.ts +42 -0
- package/dist/types/ai/api/paths.d.ts +17 -0
- package/dist/types/ai/api-catalog.d.ts +18 -0
- package/dist/types/ai/ask.d.ts +368 -0
- package/dist/types/ai/changelog-markdown.d.ts +2 -0
- package/dist/types/ai/component-markdown.d.ts +2 -2
- package/dist/types/ai/index.d.ts +24 -0
- package/dist/types/ai/link-headers.d.ts +24 -0
- package/dist/types/ai/llms.d.ts +25 -0
- package/dist/types/ai/markdown.d.ts +45 -0
- package/dist/types/ai/mcp/discovery.d.ts +68 -0
- package/dist/types/ai/mcp/tools.d.ts +16 -0
- package/dist/types/ai/openapi-components.d.ts +43 -0
- package/dist/types/ai/relative-links.d.ts +26 -0
- package/dist/types/ai/serializers.d.ts +15 -0
- package/dist/types/ai/skills.d.ts +42 -0
- package/dist/types/ai/tar.d.ts +25 -0
- package/dist/types/ai/visibility.d.ts +17 -0
- package/dist/types/ai/web-bot-auth.d.ts +16 -0
- package/dist/types/analytics/adobe.d.ts +35 -0
- package/dist/types/analytics/amplitude.d.ts +50 -0
- package/dist/types/analytics/clarity.d.ts +31 -0
- package/dist/types/analytics/clearbit.d.ts +29 -0
- package/dist/types/analytics/cloudflare.d.ts +41 -0
- package/dist/types/analytics/fathom.d.ts +41 -0
- package/dist/types/analytics/google-analytics.d.ts +44 -0
- package/dist/types/analytics/google-tag-manager.d.ts +40 -0
- package/dist/types/analytics/head.d.ts +30 -0
- package/dist/types/analytics/heap.d.ts +40 -0
- package/dist/types/analytics/hightouch.d.ts +44 -0
- package/dist/types/analytics/hotjar.d.ts +33 -0
- package/dist/types/analytics/index.d.ts +61 -0
- package/dist/types/analytics/inline.d.ts +17 -0
- package/dist/types/analytics/logrocket.d.ts +44 -0
- package/dist/types/analytics/mixpanel.d.ts +67 -0
- package/dist/types/analytics/pirsch.d.ts +42 -0
- package/dist/types/analytics/plausible.d.ts +56 -0
- package/dist/types/analytics/posthog.d.ts +45 -0
- package/dist/types/analytics/schema.d.ts +320 -0
- package/dist/types/analytics/script.d.ts +46 -0
- package/dist/types/analytics/segment.d.ts +50 -0
- package/dist/types/analytics/vercel.d.ts +48 -0
- package/dist/types/astro/integration.d.ts +76 -0
- package/dist/types/astro/markdown-negotiation.d.ts +23 -0
- package/dist/types/astro/module-types.d.ts +14 -0
- package/dist/types/astro/pages.d.ts +44 -0
- package/dist/types/cli/env.d.ts +12 -0
- package/dist/types/cli/init/scaffold.d.ts +154 -0
- package/dist/types/components/layout/nav-utils.d.ts +11 -0
- package/dist/types/core/adapter.d.ts +47 -0
- package/dist/types/core/api-name.d.ts +7 -0
- package/dist/types/core/changelog-index.d.ts +13 -0
- package/dist/types/core/config-input.d.ts +209 -505
- package/dist/types/core/config.d.ts +60 -34
- package/dist/types/core/content-assets.d.ts +76 -0
- package/dist/types/core/custom-pages.d.ts +33 -0
- package/dist/types/core/data.d.ts +28 -11
- package/dist/types/core/define-components.d.ts +12 -9
- package/dist/types/core/deployment-env.d.ts +6 -11
- package/dist/types/core/frontmatter.d.ts +10 -0
- package/dist/types/core/graph.d.ts +18 -0
- package/dist/types/core/heading-markers.d.ts +54 -0
- package/dist/types/core/i18n-ui.d.ts +6 -2
- package/dist/types/core/i18n.d.ts +87 -0
- package/dist/types/core/includes.d.ts +138 -0
- package/dist/types/core/last-modified.d.ts +47 -0
- package/dist/types/core/links.d.ts +95 -0
- package/dist/types/core/locale-links.d.ts +60 -0
- package/dist/types/core/manifest.d.ts +17 -0
- package/dist/types/core/meta.d.ts +38 -0
- package/dist/types/core/nav-diagnostics.d.ts +26 -0
- package/dist/types/core/navigation.d.ts +6 -0
- package/dist/types/core/node-require.d.ts +19 -0
- package/dist/types/core/package-json.d.ts +13 -0
- package/dist/types/core/probe.d.ts +42 -0
- package/dist/types/core/project-graph.d.ts +51 -0
- package/dist/types/core/project.d.ts +2 -0
- package/dist/types/core/safe-href.d.ts +2 -0
- package/dist/types/core/safe-links.d.ts +26 -0
- package/dist/types/core/schema.d.ts +2291 -441
- package/dist/types/core/site-url.d.ts +16 -0
- package/dist/types/core/sources/assets.d.ts +36 -0
- package/dist/types/core/sources/cache.d.ts +37 -0
- package/dist/types/core/sources/collection.d.ts +28 -0
- package/dist/types/core/sources/contentful-rich-text.d.ts +31 -0
- package/dist/types/core/sources/contentful.d.ts +40 -0
- package/dist/types/core/sources/filesystem.d.ts +24 -0
- package/dist/types/core/sources/github-releases.d.ts +31 -0
- package/dist/types/core/sources/json.d.ts +30 -0
- package/dist/types/core/sources/lexical.d.ts +19 -0
- package/dist/types/core/sources/lower.d.ts +75 -0
- package/dist/types/core/sources/mdx-remote.d.ts +28 -0
- package/dist/types/core/sources/normalize.d.ts +147 -0
- package/dist/types/core/sources/notion.d.ts +131 -0
- package/dist/types/core/sources/obsidian.d.ts +46 -0
- package/dist/types/core/sources/payload.d.ts +39 -0
- package/dist/types/core/sources/portable-text.d.ts +42 -0
- package/dist/types/core/sources/read.d.ts +23 -0
- package/dist/types/core/sources/remote.d.ts +74 -0
- package/dist/types/core/sources/resolve.d.ts +19 -0
- package/dist/types/core/sources/sanity.d.ts +43 -0
- package/dist/types/core/sources/strapi-blocks.d.ts +12 -0
- package/dist/types/core/sources/strapi.d.ts +33 -0
- package/dist/types/core/sources/types.d.ts +7 -0
- package/dist/types/core/sources/watch.d.ts +45 -0
- package/dist/types/core/text-width.d.ts +11 -0
- package/dist/types/core/types.d.ts +20 -1
- package/dist/types/core/unrecognized-keys.d.ts +7 -0
- package/dist/types/core/versions.d.ts +72 -0
- package/dist/types/core/yaml.d.ts +9 -0
- package/dist/types/deploy/adapter-output.d.ts +45 -0
- package/dist/types/deploy/adapters/cloudflare.d.ts +40 -0
- package/dist/types/deploy/adapters/index.d.ts +29 -0
- package/dist/types/deploy/adapters/netlify.d.ts +37 -0
- package/dist/types/deploy/adapters/node.d.ts +37 -0
- package/dist/types/deploy/adapters/registry.d.ts +133 -0
- package/dist/types/deploy/adapters/types.d.ts +71 -0
- package/dist/types/deploy/adapters/vercel.d.ts +38 -0
- package/dist/types/deploy/artifacts.d.ts +65 -0
- package/dist/types/deploy/cloudflare-negotiation.d.ts +196 -0
- package/dist/types/deploy/function-bundle.d.ts +80 -0
- package/dist/types/deploy/headers.d.ts +50 -0
- package/dist/types/deploy/node-headers.d.ts +42 -0
- package/dist/types/deploy/platforms/cloudflare.d.ts +40 -0
- package/dist/types/deploy/platforms/index.d.ts +18 -0
- package/dist/types/deploy/platforms/netlify.d.ts +13 -0
- package/dist/types/deploy/platforms/node.d.ts +11 -0
- package/dist/types/deploy/platforms/paths.d.ts +27 -0
- package/dist/types/deploy/platforms/static.d.ts +10 -0
- package/dist/types/deploy/platforms/types.d.ts +104 -0
- package/dist/types/deploy/platforms/vercel.d.ts +32 -0
- package/dist/types/deploy/redirects.d.ts +53 -0
- package/dist/types/deploy/robots.d.ts +8 -0
- package/dist/types/deploy/rss.d.ts +31 -0
- package/dist/types/deploy/sitemap.d.ts +21 -0
- package/dist/types/deploy/vercel-negotiation.d.ts +109 -0
- package/dist/types/markdown/code-title.d.ts +32 -0
- package/dist/types/markdown/fence-meta.d.ts +23 -0
- package/dist/types/markdown/themes.d.ts +3 -3
- package/dist/types/openapi/asyncapi.d.ts +129 -0
- package/dist/types/openapi/graphql-build.d.ts +8 -0
- package/dist/types/openapi/graphql.d.ts +122 -0
- package/dist/types/openapi/model.d.ts +158 -0
- package/dist/types/openapi/parse.d.ts +57 -0
- package/dist/types/openapi/references.d.ts +37 -25
- package/dist/types/openapi/render-mdx.d.ts +33 -0
- package/dist/types/openapi/sentence.d.ts +7 -0
- package/dist/types/openapi/signature.d.ts +10 -0
- package/dist/types/openapi/source.d.ts +22 -0
- package/dist/types/openapi/spec-dependency-error.d.ts +10 -0
- package/dist/types/reference/asyncapi.d.ts +166 -0
- package/dist/types/reference/graphql.d.ts +181 -0
- package/dist/types/reference/index.d.ts +32 -0
- package/dist/types/reference/openapi.d.ts +165 -0
- package/dist/types/reference/options.d.ts +157 -0
- package/dist/types/reference/scalar.d.ts +136 -0
- package/dist/types/reference/schema.d.ts +630 -0
- package/dist/types/search/adapters/algolia.d.ts +32 -0
- package/dist/types/search/adapters/flexsearch.d.ts +12 -0
- package/dist/types/search/adapters/index.d.ts +31 -0
- package/dist/types/search/adapters/mixedbread.d.ts +22 -0
- package/dist/types/search/adapters/orama-cloud.d.ts +33 -0
- package/dist/types/search/adapters/orama.d.ts +13 -0
- package/dist/types/search/adapters/pagefind.d.ts +12 -0
- package/dist/types/search/adapters/registry.d.ts +228 -0
- package/dist/types/search/adapters/types.d.ts +34 -0
- package/dist/types/search/adapters/typesense.d.ts +42 -0
- package/dist/types/search/build.d.ts +23 -0
- package/dist/types/search/documents.d.ts +90 -0
- package/dist/types/search/facets.d.ts +3 -0
- package/dist/types/search/sync/algolia.d.ts +14 -0
- package/dist/types/search/sync/index.d.ts +14 -0
- package/dist/types/search/sync/orama-cloud.d.ts +10 -0
- package/dist/types/search/sync/typesense.d.ts +14 -0
- package/dist/types/sources/contentful.d.ts +68 -0
- package/dist/types/sources/custom.d.ts +20 -0
- package/dist/types/sources/filesystem.d.ts +42 -0
- package/dist/types/sources/github-releases.d.ts +46 -0
- package/dist/types/sources/index.d.ts +48 -0
- package/dist/types/sources/mdx-remote.d.ts +63 -0
- package/dist/types/sources/notion.d.ts +65 -0
- package/dist/types/sources/obsidian.d.ts +34 -0
- package/dist/types/sources/payload.d.ts +68 -0
- package/dist/types/sources/registry.d.ts +1414 -0
- package/dist/types/sources/sanity.d.ts +69 -0
- package/dist/types/sources/shared.d.ts +46 -0
- package/dist/types/sources/strapi.d.ts +66 -0
- package/dist/types/theme/icon-kind.d.ts +11 -0
- package/dist/types/theme/icons.d.ts +20 -0
- package/docs/01-quickstart.mdx +18 -18
- package/docs/02-deployment.mdx +50 -26
- package/docs/03-upgrading.mdx +351 -0
- package/docs/04-migrating.mdx +58 -0
- package/docs/08-faq.mdx +3 -3
- package/docs/advanced/blog.mdx +13 -6
- package/docs/advanced/changelog.mdx +23 -35
- package/docs/advanced/custom-pages.mdx +20 -8
- package/docs/advanced/meta.ts +1 -8
- package/docs/advanced/skills.mdx +8 -0
- package/docs/cli/audit.mdx +646 -0
- package/docs/cli/doctor.mdx +29 -0
- package/docs/{reference/eval.mdx → cli/evals.mdx} +9 -8
- package/docs/cli/index.mdx +105 -0
- package/docs/cli/meta.ts +7 -0
- package/docs/{reference → cli}/translate.mdx +1 -1
- package/docs/cli/validate.mdx +41 -0
- package/docs/cli/version.mdx +40 -0
- package/docs/configuration/analytics.mdx +350 -59
- package/docs/configuration/ask-ai.mdx +176 -61
- package/docs/configuration/customization.mdx +15 -9
- package/docs/configuration/index.mdx +52 -31
- package/docs/configuration/search.mdx +75 -54
- package/docs/configuration/theming.mdx +24 -15
- package/docs/content/components.mdx +21 -5
- package/docs/{reference → content}/frontmatter.mdx +37 -1
- package/docs/content/i18n.mdx +8 -6
- package/docs/content/includes.mdx +2 -4
- package/docs/content/index.mdx +1 -1
- package/docs/content/islands.mdx +10 -5
- package/docs/content/meta.mdx +1 -1
- package/docs/content/meta.ts +1 -0
- package/docs/content/navigation.mdx +12 -7
- package/docs/content/sources.mdx +145 -50
- package/docs/content/syntax.mdx +26 -12
- package/docs/content/versioning.mdx +3 -3
- package/docs/discoverability/agent-discovery.mdx +91 -10
- package/docs/discoverability/index.mdx +5 -5
- package/docs/discoverability/json-api.mdx +4 -4
- package/docs/discoverability/llms-txt.mdx +6 -6
- package/docs/discoverability/markdown.mdx +4 -4
- package/docs/discoverability/mcp.mdx +11 -11
- package/docs/discoverability/sitemap-and-robots.mdx +3 -3
- package/docs/index.mdx +2 -2
- package/docs/references/asyncapi.mdx +59 -0
- package/docs/{advanced → references}/graphql.mdx +45 -32
- package/docs/{reference → references}/meta.ts +2 -2
- package/docs/references/openapi.mdx +171 -0
- package/docs/references/scalar.mdx +64 -0
- package/package.json +42 -8
- package/skills/blume/SKILL.md +21 -8
- package/skills/blume-migrate/SKILL.md +22 -21
- package/skills/blume-migrate/assets/oxfmt@0.67.0.patch +49 -0
- package/skills/blume-migrate/references/docusaurus.md +5 -4
- package/skills/blume-migrate/references/fumadocs.md +4 -4
- package/skills/blume-migrate/references/mintlify.md +23 -8
- package/skills/blume-migrate/references/monorepo.md +6 -6
- package/skills/blume-migrate/references/starlight.md +4 -4
- package/src/ai/agent-readability.ts +26 -22
- package/src/ai/ai-catalog.ts +259 -0
- package/src/ai/api/handlers.ts +46 -11
- package/src/ai/api-catalog.ts +8 -8
- package/src/ai/ask-data.ts +1 -1
- package/src/ai/ask.ts +624 -100
- package/src/ai/changelog-markdown.ts +91 -0
- package/src/ai/component-markdown.ts +328 -12
- package/src/ai/index.ts +45 -0
- package/src/ai/link-headers.ts +19 -6
- package/src/ai/llms.ts +26 -15
- package/src/ai/markdown.ts +35 -5
- package/src/ai/mcp/data.ts +9 -5
- package/src/ai/mcp/discovery.ts +1 -1
- package/src/ai/openapi-components.ts +4 -1
- package/src/ai/relative-links.ts +170 -0
- package/src/ai/serializers.ts +2 -2
- package/src/ai/skills.ts +1 -1
- package/src/ai/web-bot-auth.ts +2 -2
- package/src/analytics/adobe.ts +46 -0
- package/src/analytics/amplitude.ts +79 -0
- package/src/analytics/clarity.ts +46 -0
- package/src/analytics/clearbit.ts +47 -0
- package/src/analytics/cloudflare.ts +67 -0
- package/src/analytics/fathom.ts +64 -0
- package/src/analytics/google-analytics.ts +84 -0
- package/src/analytics/google-tag-manager.ts +61 -0
- package/src/analytics/head.ts +130 -0
- package/src/analytics/heap.ts +65 -0
- package/src/analytics/hightouch.ts +77 -0
- package/src/analytics/hotjar.ts +47 -0
- package/src/analytics/index.ts +71 -0
- package/src/analytics/inline.ts +21 -0
- package/src/analytics/logrocket.ts +71 -0
- package/src/analytics/mixpanel.ts +92 -0
- package/src/analytics/pirsch.ts +66 -0
- package/src/analytics/plausible.ts +83 -0
- package/src/analytics/posthog.ts +78 -0
- package/src/analytics/schema.ts +60 -0
- package/src/analytics/script.ts +60 -0
- package/src/analytics/segment.ts +85 -0
- package/src/analytics/vercel.ts +50 -0
- package/src/astro/adapter-root.ts +7 -9
- package/src/astro/component-slots.ts +131 -91
- package/src/astro/generate.ts +114 -345
- package/src/astro/integration.ts +2 -6
- package/src/astro/pages.ts +13 -101
- package/src/astro/render-deps.ts +379 -0
- package/src/astro/runtime-deps.ts +201 -0
- package/src/astro/templates.ts +554 -541
- package/src/audit/agent.ts +24 -0
- package/src/audit/catalog.ts +2 -2
- package/src/audit/checks/assets.ts +2 -2
- package/src/audit/checks/dns-aid.ts +1 -1
- package/src/audit/checks/duplicates.ts +3 -1
- package/src/audit/checks/i18n.ts +1 -1
- package/src/audit/checks/indexability.ts +7 -7
- package/src/audit/checks/links.ts +2 -2
- package/src/audit/checks/llms.ts +6 -6
- package/src/audit/checks/network.ts +3 -3
- package/src/audit/checks/og-image.ts +2 -2
- package/src/audit/checks/robots.ts +1 -1
- package/src/audit/checks/sitemap.ts +2 -2
- package/src/audit/checks/social.ts +1 -1
- package/src/audit/run.ts +4 -3
- package/src/audit/terms.ts +31 -0
- package/src/audit/url.ts +13 -13
- package/src/cli/command-meta.ts +10 -0
- package/src/cli/commands/audit.ts +39 -20
- package/src/cli/commands/build.ts +71 -314
- package/src/cli/commands/check.ts +1 -0
- package/src/cli/commands/dev.ts +40 -1
- package/src/cli/commands/doctor.ts +90 -14
- package/src/cli/commands/eject.ts +44 -7
- package/src/cli/commands/eval.ts +2 -2
- package/src/cli/commands/init.ts +161 -41
- package/src/cli/commands/migrate.ts +121 -0
- package/src/cli/commands/preview.ts +7 -1
- package/src/cli/commands/translate.ts +2 -2
- package/src/cli/commands/upgrade.ts +141 -0
- package/src/cli/commands/version.ts +57 -44
- package/src/cli/eject-scripts.ts +121 -6
- package/src/cli/index.ts +11 -1
- package/src/cli/init/install.ts +70 -0
- package/src/cli/init/questions.ts +7 -0
- package/src/cli/init/scaffold.ts +459 -75
- package/src/cli/lazy-command.ts +37 -1
- package/src/cli/prepare.ts +40 -6
- package/src/cli/required-secrets.ts +38 -11
- package/src/cli/unknown-flags.ts +266 -0
- package/src/cli/yarn-pnp.ts +52 -0
- package/src/components/content/AccordionItem.astro +7 -1
- package/src/components/content/Card.astro +4 -3
- package/src/components/content/ColorItem.astro +22 -4
- package/src/components/content/GithubInfo.astro +2 -2
- package/src/components/content/Prompt.astro +25 -25
- package/src/components/content/Tabs.astro +3 -1
- package/src/components/content/Tile.astro +2 -3
- package/src/components/content/Tooltip.astro +57 -9
- package/src/components/content/content-strings.ts +34 -0
- package/src/components/content/diff.ts +1 -1
- package/src/components/content/mermaid-element.ts +13 -2
- package/src/components/content/prompt-markdown.ts +292 -0
- package/src/components/content/tooltip-id.ts +41 -0
- package/src/components/islands/hooks.ts +75 -3
- package/src/components/layout/Analytics.astro +21 -79
- package/src/components/layout/Banner.astro +3 -1
- package/src/components/layout/DiscoveryLinks.astro +69 -0
- package/src/components/layout/Header.astro +83 -20
- package/src/components/layout/LanguageSwitcher.astro +4 -1
- package/src/components/layout/Logo.astro +23 -2
- package/src/components/layout/NavSelector.astro +13 -2
- package/src/components/layout/NavTree.astro +12 -3
- package/src/components/layout/NavTreeScript.astro +17 -3
- package/src/components/layout/PageActions.astro +3 -3
- package/src/components/layout/PageFeedback.astro +11 -1
- package/src/components/layout/PageLayout.astro +52 -5
- package/src/components/layout/ReferenceLayout.astro +21 -12
- package/src/components/layout/RootLayout.astro +69 -43
- package/src/components/layout/Search.astro +30 -6
- package/src/components/layout/WebMcp.astro +1 -1
- package/src/components/layout/analytics-client.ts +101 -15
- package/src/components/layout/drawer-inert.ts +113 -15
- package/src/components/layout/dropdown-clamp.ts +105 -0
- package/src/components/layout/head-scripts.ts +15 -6
- package/src/components/layout/nav-utils.ts +17 -0
- package/src/components/layout/search/algolia.ts +8 -8
- package/src/components/layout/search/orama-cloud.ts +9 -7
- package/src/components/layout/search/typesense.ts +11 -17
- package/src/components/openapi/MessageComposer.astro +2 -2
- package/src/components/openapi/Playground.astro +2 -2
- package/src/components/openapi/playground-client.ts +79 -10
- package/src/core/changelog-index.ts +24 -0
- package/src/core/component-overrides.ts +399 -154
- package/src/core/config-input.ts +212 -543
- package/src/core/config.ts +130 -41
- package/src/core/custom-pages.ts +105 -0
- package/src/core/data.ts +32 -11
- package/src/core/define-components.ts +12 -9
- package/src/core/deployment-env.ts +18 -74
- package/src/core/diagnostics.ts +14 -7
- package/src/core/graph.ts +69 -25
- package/src/core/i18n-ui.ts +6 -2
- package/src/core/i18n.ts +17 -0
- package/src/core/includes.ts +156 -38
- package/src/core/last-modified.ts +6 -11
- package/src/core/links.ts +166 -2
- package/src/core/manifest.ts +10 -3
- package/src/core/navigation.ts +137 -19
- package/src/core/new-tab.ts +35 -0
- package/src/core/node-require.ts +21 -0
- package/src/core/project-graph.ts +42 -26
- package/src/core/project.ts +9 -4
- package/src/core/request-body.ts +61 -0
- package/src/core/safe-href.ts +28 -0
- package/src/core/safe-links.ts +68 -0
- package/src/core/schema.ts +531 -721
- package/src/core/server-features.ts +8 -9
- package/src/core/sources/assets.ts +47 -11
- package/src/core/sources/collection.ts +67 -0
- package/src/core/sources/contentful-rich-text.ts +285 -0
- package/src/core/sources/contentful.ts +173 -0
- package/src/core/sources/github-releases.ts +51 -1
- package/src/core/sources/json.ts +71 -0
- package/src/core/sources/lexical.ts +195 -0
- package/src/core/sources/lower.ts +226 -0
- package/src/core/sources/normalize.ts +52 -2
- package/src/core/sources/notion.ts +39 -28
- package/src/core/sources/payload.ts +135 -0
- package/src/core/sources/portable-text.ts +11 -16
- package/src/core/sources/remote.ts +226 -0
- package/src/core/sources/resolve.ts +104 -166
- package/src/core/sources/sanity.ts +16 -49
- package/src/core/sources/strapi-blocks.ts +124 -0
- package/src/core/sources/strapi.ts +191 -0
- package/src/core/sources/types.ts +12 -1
- package/src/core/types.ts +20 -1
- package/src/core/ui-packs/ar.ts +6 -2
- package/src/core/ui-packs/bg.ts +6 -2
- package/src/core/ui-packs/bn.ts +6 -2
- package/src/core/ui-packs/ca.ts +3 -1
- package/src/core/ui-packs/cs.ts +6 -2
- package/src/core/ui-packs/da.ts +6 -2
- package/src/core/ui-packs/de.ts +6 -2
- package/src/core/ui-packs/el.ts +3 -1
- package/src/core/ui-packs/es.ts +3 -1
- package/src/core/ui-packs/fa.ts +6 -2
- package/src/core/ui-packs/fi.ts +6 -2
- package/src/core/ui-packs/fr.ts +3 -1
- package/src/core/ui-packs/he.ts +6 -2
- package/src/core/ui-packs/hi.ts +6 -2
- package/src/core/ui-packs/hr.ts +6 -2
- package/src/core/ui-packs/hu.ts +6 -2
- package/src/core/ui-packs/id.ts +6 -2
- package/src/core/ui-packs/it.ts +3 -1
- package/src/core/ui-packs/ja.ts +3 -1
- package/src/core/ui-packs/ko.ts +3 -1
- package/src/core/ui-packs/nl.ts +6 -2
- package/src/core/ui-packs/no.ts +6 -2
- package/src/core/ui-packs/pl.ts +6 -2
- package/src/core/ui-packs/pt-br.ts +3 -1
- package/src/core/ui-packs/pt.ts +3 -1
- package/src/core/ui-packs/ro.ts +6 -2
- package/src/core/ui-packs/ru.ts +6 -2
- package/src/core/ui-packs/sk.ts +6 -2
- package/src/core/ui-packs/sr.ts +6 -2
- package/src/core/ui-packs/sv.ts +6 -2
- package/src/core/ui-packs/th.ts +3 -1
- package/src/core/ui-packs/tr.ts +6 -2
- package/src/core/ui-packs/uk.ts +6 -2
- package/src/core/ui-packs/vi.ts +3 -1
- package/src/core/ui-packs/zh-tw.ts +3 -1
- package/src/core/ui-packs/zh.ts +3 -1
- package/src/core/unrecognized-keys.ts +10 -0
- package/src/core/version-cut.ts +116 -8
- package/src/deploy/adapter-output.ts +57 -97
- package/src/deploy/adapters/cloudflare.ts +39 -0
- package/src/deploy/adapters/index.ts +41 -0
- package/src/deploy/adapters/netlify.ts +34 -0
- package/src/deploy/adapters/node.ts +34 -0
- package/src/deploy/adapters/registry.ts +127 -0
- package/src/deploy/adapters/types.ts +92 -0
- package/src/deploy/adapters/vercel.ts +35 -0
- package/src/deploy/artifacts.ts +67 -28
- package/src/deploy/cloudflare-negotiation.ts +179 -100
- package/src/deploy/function-bundle.ts +18 -3
- package/src/deploy/headers.ts +129 -22
- package/src/deploy/node-headers.ts +198 -0
- package/src/deploy/platforms/cloudflare.ts +312 -0
- package/src/deploy/platforms/index.ts +67 -0
- package/src/deploy/platforms/netlify.ts +52 -0
- package/src/deploy/platforms/node.ts +40 -0
- package/src/deploy/platforms/paths.ts +42 -0
- package/src/deploy/platforms/static.ts +29 -0
- package/src/deploy/platforms/types.ts +112 -0
- package/src/deploy/platforms/vercel.ts +193 -0
- package/src/deploy/redirects.ts +30 -18
- package/src/deploy/robots.ts +3 -3
- package/src/deploy/rss.ts +2 -2
- package/src/deploy/sitemap.ts +2 -2
- package/src/deploy/vercel-negotiation.ts +27 -4
- package/src/eval/agents.ts +32 -1
- package/src/eval/findings.ts +19 -11
- package/src/eval/report.ts +10 -2
- package/src/markdown/external-links.ts +65 -0
- package/src/markdown/include.ts +45 -27
- package/src/markdown/index.ts +34 -9
- package/src/markdown/inline-code.ts +12 -6
- package/src/markdown/relative-links.ts +324 -0
- package/src/markdown/themes.ts +3 -3
- package/src/migrate/migrate.ts +149 -0
- package/src/openapi/parse.ts +64 -16
- package/src/openapi/proxy.ts +62 -10
- package/src/openapi/references.ts +147 -147
- package/src/openapi/render-mdx.ts +32 -10
- package/src/openapi/scalar.ts +15 -13
- package/src/openapi/sentence.ts +14 -0
- package/src/openapi/source.ts +37 -21
- package/src/openapi/spec-dependency-error.ts +15 -0
- package/src/reference/asyncapi.ts +83 -0
- package/src/reference/graphql.ts +89 -0
- package/src/reference/index.ts +40 -0
- package/src/reference/openapi.ts +83 -0
- package/src/reference/options.ts +201 -0
- package/src/reference/scalar.ts +136 -0
- package/src/reference/schema.ts +88 -0
- package/src/registry/eject.ts +97 -42
- package/src/search/adapters/algolia.ts +46 -0
- package/src/search/adapters/flexsearch.ts +29 -0
- package/src/search/adapters/index.ts +39 -0
- package/src/search/adapters/mixedbread.ts +39 -0
- package/src/search/adapters/orama-cloud.ts +51 -0
- package/src/search/adapters/orama.ts +24 -0
- package/src/search/adapters/pagefind.ts +27 -0
- package/src/search/adapters/registry.ts +131 -0
- package/src/search/adapters/types.ts +46 -0
- package/src/search/adapters/typesense.ts +57 -0
- package/src/search/build.ts +33 -7
- package/src/search/documents.ts +6 -0
- package/src/search/sync/algolia.ts +12 -11
- package/src/search/sync/index.ts +35 -20
- package/src/search/sync/orama-cloud.ts +12 -9
- package/src/search/sync/typesense.ts +15 -13
- package/src/sources/contentful.ts +63 -0
- package/src/sources/custom.ts +38 -0
- package/src/sources/filesystem.ts +51 -0
- package/src/sources/github-releases.ts +52 -0
- package/src/sources/index.ts +60 -0
- package/src/sources/mdx-remote.ts +76 -0
- package/src/sources/notion.ts +63 -0
- package/src/sources/obsidian.ts +38 -0
- package/src/sources/payload.ts +60 -0
- package/src/sources/registry.ts +182 -0
- package/src/sources/sanity.ts +66 -0
- package/src/sources/shared.ts +52 -0
- package/src/sources/strapi.ts +58 -0
- package/src/theme/entry.ts +47 -2
- package/src/translate/report.ts +40 -7
- package/src/upgrade/upgrade.ts +499 -0
- package/dist/cli/chunk-12dxjqk7.js.map +0 -10
- package/dist/cli/chunk-196vjxp9.js.map +0 -13
- package/dist/cli/chunk-2mzebbbz.js +0 -69
- package/dist/cli/chunk-2z47ypj8.js.map +0 -11
- package/dist/cli/chunk-30e87n55.js +0 -108
- package/dist/cli/chunk-30e87n55.js.map +0 -10
- package/dist/cli/chunk-450a7rcr.js +0 -185
- package/dist/cli/chunk-450a7rcr.js.map +0 -11
- package/dist/cli/chunk-5n7t497w.js.map +0 -40
- package/dist/cli/chunk-61j18dwk.js +0 -5342
- package/dist/cli/chunk-61j18dwk.js.map +0 -58
- package/dist/cli/chunk-88by27n5.js +0 -17
- package/dist/cli/chunk-88by27n5.js.map +0 -10
- package/dist/cli/chunk-8cd8tj54.js.map +0 -34
- package/dist/cli/chunk-aztttvb3.js +0 -381
- package/dist/cli/chunk-aztttvb3.js.map +0 -12
- package/dist/cli/chunk-cvky9gb2.js.map +0 -11
- package/dist/cli/chunk-ejjx8znq.js.map +0 -15
- package/dist/cli/chunk-fmceyezb.js +0 -1007
- package/dist/cli/chunk-fmceyezb.js.map +0 -13
- package/dist/cli/chunk-hdm2dkd2.js.map +0 -48
- package/dist/cli/chunk-hs3gbh8p.js.map +0 -10
- package/dist/cli/chunk-jbj4qhfw.js +0 -30
- package/dist/cli/chunk-jbj4qhfw.js.map +0 -10
- package/dist/cli/chunk-mqb2ka8m.js +0 -68
- package/dist/cli/chunk-mqb2ka8m.js.map +0 -10
- package/dist/cli/chunk-mt76t7dj.js.map +0 -11
- package/dist/cli/chunk-q4rae3bg.js +0 -60
- package/dist/cli/chunk-q4rae3bg.js.map +0 -10
- package/dist/cli/chunk-ra1v2nc2.js +0 -35
- package/dist/cli/chunk-ra1v2nc2.js.map +0 -10
- package/dist/cli/chunk-t3tj0dgr.js.map +0 -15
- package/dist/cli/chunk-tqa1s0k8.js +0 -69
- package/dist/cli/chunk-tqa1s0k8.js.map +0 -11
- package/dist/cli/chunk-vh9w1sgp.js +0 -73
- package/dist/cli/chunk-vh9w1sgp.js.map +0 -10
- package/dist/cli/chunk-vkrsvbr5.js +0 -107
- package/dist/cli/chunk-vkrsvbr5.js.map +0 -11
- package/dist/cli/chunk-vrfp10qk.js +0 -81
- package/dist/cli/chunk-vrfp10qk.js.map +0 -10
- package/dist/cli/chunk-wjt80jps.js +0 -1049
- package/dist/cli/chunk-wjt80jps.js.map +0 -24
- package/docs/advanced/api-reference.mdx +0 -240
- package/docs/reference/cli.mdx +0 -197
- package/skills/blume-migrate/assets/oxfmt@0.55.0.patch +0 -20
- package/src/components/content/changelog-element.ts +0 -69
- package/src/search/providers.ts +0 -91
- /package/dist/cli/{chunk-3w7b2vcx.js.map → chunk-7ez8ny0t.js.map} +0 -0
- /package/dist/cli/{chunk-688e0dde.js.map → chunk-88cpgt6h.js.map} +0 -0
- /package/dist/cli/{chunk-exeeb35e.js.map → chunk-f7t03s3g.js.map} +0 -0
- /package/dist/cli/{chunk-ppfvdcd4.js.map → chunk-zxccj738.js.map} +0 -0
|
@@ -6,11 +6,28 @@ import {
|
|
|
6
6
|
enrichDiagnostic
|
|
7
7
|
} from "./index.js";
|
|
8
8
|
import {
|
|
9
|
+
OPENAPI_PATH,
|
|
10
|
+
API_PAGES_PATH,
|
|
11
|
+
API_PAGE_PATH,
|
|
12
|
+
API_NAVIGATION_PATH,
|
|
13
|
+
API_SEARCH_PATH,
|
|
14
|
+
apiNamePhrase,
|
|
9
15
|
resolveReferences,
|
|
10
16
|
referenceRoutes,
|
|
11
17
|
hasScalarReferences,
|
|
12
|
-
|
|
18
|
+
builtinProxyReferences,
|
|
13
19
|
needsPlaygroundProxy,
|
|
20
|
+
buildMcpDiscovery,
|
|
21
|
+
buildMcpServerCard,
|
|
22
|
+
hasAiCatalog,
|
|
23
|
+
buildHomeLinkHeader,
|
|
24
|
+
resolveDocsCollection,
|
|
25
|
+
discoverPages,
|
|
26
|
+
routeIsTaken,
|
|
27
|
+
hasGeneratedChangelog,
|
|
28
|
+
customOgRoutes,
|
|
29
|
+
resolveFallbackLocale,
|
|
30
|
+
resolveAskBackend,
|
|
14
31
|
GOOGLE_FONTS,
|
|
15
32
|
isFontSlug,
|
|
16
33
|
fontLocaleCodes,
|
|
@@ -20,44 +37,40 @@ import {
|
|
|
20
37
|
editBaseUrl,
|
|
21
38
|
apiUrl,
|
|
22
39
|
EN_UI,
|
|
23
|
-
resolveUIStrings
|
|
24
|
-
} from "./chunk-61j18dwk.js";
|
|
25
|
-
import {
|
|
26
|
-
resolveFallbackLocale,
|
|
27
|
-
validateSearchPopularIcons,
|
|
28
|
-
validateNavTargets,
|
|
40
|
+
resolveUIStrings,
|
|
29
41
|
buildIncludeGraph,
|
|
30
|
-
|
|
42
|
+
rewriteRelativeImages,
|
|
43
|
+
collectContentAssets,
|
|
44
|
+
buildRssFeeds,
|
|
45
|
+
renderRssFeed,
|
|
31
46
|
isOpenApiSource,
|
|
32
|
-
|
|
33
|
-
|
|
47
|
+
buildRawMarkdown,
|
|
48
|
+
markdownRoutePaths
|
|
49
|
+
} from "./chunk-xaz13gwg.js";
|
|
34
50
|
import {
|
|
51
|
+
trimChar,
|
|
52
|
+
normalizeBasePath,
|
|
53
|
+
withBasePath,
|
|
35
54
|
siteRoot,
|
|
36
|
-
|
|
37
|
-
} from "./chunk-
|
|
55
|
+
absoluteUrl2
|
|
56
|
+
} from "./chunk-jts8mvcz.js";
|
|
57
|
+
import {
|
|
58
|
+
validateSearchPopularIcons,
|
|
59
|
+
validateNavTargets
|
|
60
|
+
} from "./chunk-zg2gtj10.js";
|
|
38
61
|
import {
|
|
39
|
-
buildRssFeeds,
|
|
40
|
-
renderRssFeed,
|
|
41
|
-
buildRawMarkdown,
|
|
42
|
-
markdownRoutePaths,
|
|
43
62
|
buildSearchDocuments,
|
|
44
63
|
buildMcpData
|
|
45
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-a9kptbw5.js";
|
|
46
65
|
import {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
API_NAVIGATION_PATH,
|
|
51
|
-
API_SEARCH_PATH
|
|
52
|
-
} from "./chunk-tqa1s0k8.js";
|
|
66
|
+
emptyComponentOverrides,
|
|
67
|
+
analyzeComponentOverrides
|
|
68
|
+
} from "./chunk-f2972sbt.js";
|
|
53
69
|
import {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
} from "./chunk-450a7rcr.js";
|
|
70
|
+
writeTextAtomic
|
|
71
|
+
} from "./chunk-jq5n4avg.js";
|
|
57
72
|
import {
|
|
58
|
-
|
|
59
|
-
askBackendRuntimeDep,
|
|
60
|
-
buildHomeLinkHeader,
|
|
73
|
+
planComponentSlots,
|
|
61
74
|
publishRuntimeModules,
|
|
62
75
|
runtimeDependencies,
|
|
63
76
|
astroConfigTemplate,
|
|
@@ -89,52 +102,31 @@ import {
|
|
|
89
102
|
apiNavigationTemplate,
|
|
90
103
|
apiSearchTemplate,
|
|
91
104
|
apiNotFoundTemplate,
|
|
92
|
-
islandWrapperTemplate,
|
|
93
|
-
islandMapTemplate,
|
|
94
105
|
exampleSlug,
|
|
95
106
|
exampleWrapperTemplate,
|
|
96
107
|
exampleMapTemplate,
|
|
97
108
|
examplesPageTemplate,
|
|
98
109
|
runtimePackageTemplate,
|
|
99
110
|
runtimeTsconfigTemplate
|
|
100
|
-
} from "./chunk-
|
|
101
|
-
import {
|
|
102
|
-
discoverPages,
|
|
103
|
-
routeIsTaken,
|
|
104
|
-
hasGeneratedChangelog,
|
|
105
|
-
customOgRoutes
|
|
106
|
-
} from "./chunk-vrfp10qk.js";
|
|
107
|
-
import {
|
|
108
|
-
writeTextAtomic
|
|
109
|
-
} from "./chunk-jq5n4avg.js";
|
|
111
|
+
} from "./chunk-mnqj32sj.js";
|
|
110
112
|
import {
|
|
111
113
|
registry
|
|
112
|
-
} from "./chunk-
|
|
113
|
-
import {
|
|
114
|
-
MCP_TOOLS
|
|
115
|
-
} from "./chunk-ra1v2nc2.js";
|
|
114
|
+
} from "./chunk-88cpgt6h.js";
|
|
116
115
|
import {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
trimChar,
|
|
122
|
-
normalizeBasePath,
|
|
123
|
-
withBasePath
|
|
124
|
-
} from "./chunk-2mzebbbz.js";
|
|
125
|
-
|
|
126
|
-
// src/ai/web-bot-auth.ts
|
|
127
|
-
var SIGNATURES_DIRECTORY_PATH = "/.well-known/http-message-signatures-directory";
|
|
128
|
-
var SIGNATURES_DIRECTORY_TYPE = "application/http-message-signatures-directory+json";
|
|
116
|
+
readClientMode,
|
|
117
|
+
discoverIslands,
|
|
118
|
+
missingDependencyDiagnostic
|
|
119
|
+
} from "./chunk-bnbmcwfb.js";
|
|
129
120
|
|
|
130
121
|
// src/astro/integration.ts
|
|
131
122
|
import { join as join3, relative, resolve as resolve2 } from "pathe";
|
|
132
123
|
|
|
133
124
|
// src/deploy/artifacts.ts
|
|
134
|
-
import { dirname, join as join2, resolve } from "pathe";
|
|
125
|
+
import { dirname as dirname2, join as join2, resolve } from "pathe";
|
|
135
126
|
|
|
136
127
|
// src/search/build.ts
|
|
137
|
-
import {
|
|
128
|
+
import { close, createIndex } from "pagefind";
|
|
129
|
+
import { dirname, join } from "pathe";
|
|
138
130
|
|
|
139
131
|
// src/deploy/sitemap.ts
|
|
140
132
|
import { escape as escapeXml } from "html-escaper";
|
|
@@ -219,7 +211,7 @@ import {
|
|
|
219
211
|
rm,
|
|
220
212
|
writeFile
|
|
221
213
|
} from "node:fs/promises";
|
|
222
|
-
import { dirname as
|
|
214
|
+
import { dirname as dirname3, join as join4 } from "pathe";
|
|
223
215
|
var ogCacheDir = (context) => existsSync(join4(context.root, "node_modules")) ? join4(context.root, "node_modules", ".cache", "blume", "og") : join4(context.outDir, ".cache", "og");
|
|
224
216
|
var REGISTRY_KEY2 = Symbol.for("blume.og-cache");
|
|
225
217
|
var registry3 = () => {
|
|
@@ -248,11 +240,11 @@ var cardCacheTally = () => {
|
|
|
248
240
|
|
|
249
241
|
// src/astro/generate.ts
|
|
250
242
|
import { createHash } from "node:crypto";
|
|
251
|
-
import { existsSync as existsSync6, readFileSync as readFileSync3, realpathSync } from "node:fs";
|
|
243
|
+
import { existsSync as existsSync6, readFileSync as readFileSync3, realpathSync as realpathSync2 } from "node:fs";
|
|
252
244
|
import {
|
|
253
245
|
lstat,
|
|
254
246
|
mkdir as mkdir2,
|
|
255
|
-
readFile as
|
|
247
|
+
readFile as readFile4,
|
|
256
248
|
readlink,
|
|
257
249
|
realpath,
|
|
258
250
|
rm as rm2,
|
|
@@ -260,17 +252,9 @@ import {
|
|
|
260
252
|
} from "node:fs/promises";
|
|
261
253
|
import { createRequire as createRequire2 } from "node:module";
|
|
262
254
|
import { pathToFileURL } from "node:url";
|
|
263
|
-
import
|
|
264
|
-
import {
|
|
265
|
-
|
|
266
|
-
dirname as dirname6,
|
|
267
|
-
isAbsolute as isAbsolute6,
|
|
268
|
-
join as join11,
|
|
269
|
-
normalize,
|
|
270
|
-
relative as relative4,
|
|
271
|
-
resolve as resolve6
|
|
272
|
-
} from "pathe";
|
|
273
|
-
import { glob as glob3 } from "tinyglobby";
|
|
255
|
+
import pMap2 from "p-map";
|
|
256
|
+
import { dirname as dirname7, isAbsolute as isAbsolute6, join as join11, normalize as normalize2, relative as relative5, resolve as resolve6 } from "pathe";
|
|
257
|
+
import { glob as glob2 } from "tinyglobby";
|
|
274
258
|
|
|
275
259
|
// src/ai/api/problem.ts
|
|
276
260
|
var PROBLEM_TYPE = "application/problem+json";
|
|
@@ -591,7 +575,7 @@ var ROUTE_PARAM = {
|
|
|
591
575
|
};
|
|
592
576
|
var serverUrl = (input) => {
|
|
593
577
|
if (input.site) {
|
|
594
|
-
return input.base ?
|
|
578
|
+
return input.base ? absoluteUrl2(input.site, input.base) : siteRoot(input.site);
|
|
595
579
|
}
|
|
596
580
|
return input.base || "/";
|
|
597
581
|
};
|
|
@@ -779,7 +763,7 @@ var buildApiSpec = (input) => {
|
|
|
779
763
|
if (input.site) {
|
|
780
764
|
document.externalDocs = {
|
|
781
765
|
description: `${input.name} documentation`,
|
|
782
|
-
url:
|
|
766
|
+
url: absoluteUrl2(input.site, withBasePath(input.base, "/"))
|
|
783
767
|
};
|
|
784
768
|
}
|
|
785
769
|
return document;
|
|
@@ -801,72 +785,10 @@ var buildAskData = async (project) => {
|
|
|
801
785
|
route: doc.route,
|
|
802
786
|
title: doc.title
|
|
803
787
|
})),
|
|
804
|
-
site: project.config.deployment.site ?? null
|
|
788
|
+
site: project.config.deployment.options.site ?? null
|
|
805
789
|
};
|
|
806
790
|
};
|
|
807
791
|
|
|
808
|
-
// src/ai/mcp/discovery.ts
|
|
809
|
-
var serverUrl2 = (input) => {
|
|
810
|
-
const path = withBasePath(input.base, input.route);
|
|
811
|
-
return input.site ? absoluteUrl(input.site, path) : path;
|
|
812
|
-
};
|
|
813
|
-
var buildMcpDiscovery = (input) => ({
|
|
814
|
-
servers: [
|
|
815
|
-
{
|
|
816
|
-
name: input.name,
|
|
817
|
-
transport: "streamable-http",
|
|
818
|
-
url: serverUrl2(input)
|
|
819
|
-
}
|
|
820
|
-
]
|
|
821
|
-
});
|
|
822
|
-
var SERVER_CARD_SCHEMA = "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json";
|
|
823
|
-
var CARD_TEXT_MAX = 100;
|
|
824
|
-
var truncate = (text) => text.length > CARD_TEXT_MAX ? `${text.slice(0, CARD_TEXT_MAX - 1)}…` : text;
|
|
825
|
-
var NON_ASCII_SLUG = /[^a-z0-9]+/gu;
|
|
826
|
-
var COMBINING_MARKS = /\p{M}+/gu;
|
|
827
|
-
var asciiSlugify = (text) => trimChar(text.normalize("NFKD").replace(COMBINING_MARKS, "").toLowerCase().replace(NON_ASCII_SLUG, "-"), "-");
|
|
828
|
-
var reverseDnsName = (input) => {
|
|
829
|
-
let namespace = "localhost";
|
|
830
|
-
if (input.site) {
|
|
831
|
-
try {
|
|
832
|
-
namespace = new URL(input.site).hostname.split(".").toReversed().join(".");
|
|
833
|
-
} catch {}
|
|
834
|
-
}
|
|
835
|
-
return `${namespace}/${asciiSlugify(input.name) || "docs"}`;
|
|
836
|
-
};
|
|
837
|
-
var HTTP_URL = /^https?:\/\//u;
|
|
838
|
-
var buildMcpServerCard = (input) => {
|
|
839
|
-
const url = serverUrl2(input);
|
|
840
|
-
const card = {
|
|
841
|
-
$schema: SERVER_CARD_SCHEMA,
|
|
842
|
-
capabilities: {
|
|
843
|
-
resources: { listChanged: false, subscribe: false },
|
|
844
|
-
tools: { listChanged: false }
|
|
845
|
-
},
|
|
846
|
-
description: truncate(`Model Context Protocol server for the ${input.name} documentation.`),
|
|
847
|
-
name: reverseDnsName(input),
|
|
848
|
-
serverInfo: { name: input.name, version: input.version },
|
|
849
|
-
title: truncate(input.name),
|
|
850
|
-
tools: MCP_TOOLS.map((tool) => ({
|
|
851
|
-
annotations: tool.annotations,
|
|
852
|
-
description: tool.description,
|
|
853
|
-
name: tool.name,
|
|
854
|
-
title: tool.title
|
|
855
|
-
})),
|
|
856
|
-
transport: "streamable-http",
|
|
857
|
-
transports: [{ endpoint: url, type: "streamable-http" }],
|
|
858
|
-
url,
|
|
859
|
-
version: input.version
|
|
860
|
-
};
|
|
861
|
-
if (HTTP_URL.test(url)) {
|
|
862
|
-
card.remotes = [{ type: "streamable-http", url }];
|
|
863
|
-
}
|
|
864
|
-
if (input.site) {
|
|
865
|
-
card.websiteUrl = siteRoot(input.site);
|
|
866
|
-
}
|
|
867
|
-
return card;
|
|
868
|
-
};
|
|
869
|
-
|
|
870
792
|
// src/components/layout/nav-utils.ts
|
|
871
793
|
var hasDeferrableGroups = (sidebar) => sidebar.some((node) => node.kind === "group" && ((node.display ?? "flat") !== "flat" || hasDeferrableGroups(node.children)));
|
|
872
794
|
var navVariants = (data, hiddenDefault = null) => [
|
|
@@ -947,271 +869,6 @@ var validateUsedComponents = (pages, extraTags, registryNames) => {
|
|
|
947
869
|
return diagnostics;
|
|
948
870
|
};
|
|
949
871
|
|
|
950
|
-
// src/core/component-overrides.ts
|
|
951
|
-
import { existsSync as existsSync2 } from "node:fs";
|
|
952
|
-
import { dirname as dirname3, extname, isAbsolute, resolve as resolve3 } from "pathe";
|
|
953
|
-
import ts from "typescript";
|
|
954
|
-
var GROUPS = ["mdx", "layout", "islands"];
|
|
955
|
-
var GROUP_SET = new Set(GROUPS);
|
|
956
|
-
var isGroup = (name) => GROUP_SET.has(name);
|
|
957
|
-
var FRAMEWORK_BY_EXT = new Map([
|
|
958
|
-
["jsx", "react"],
|
|
959
|
-
["svelte", "svelte"],
|
|
960
|
-
["tsx", "react"],
|
|
961
|
-
["vue", "vue"]
|
|
962
|
-
]);
|
|
963
|
-
var FRAMEWORK_LABEL = {
|
|
964
|
-
react: "React",
|
|
965
|
-
svelte: "Svelte",
|
|
966
|
-
vue: "Vue"
|
|
967
|
-
};
|
|
968
|
-
var COMPONENT_EXTS = [
|
|
969
|
-
"astro",
|
|
970
|
-
"tsx",
|
|
971
|
-
"ts",
|
|
972
|
-
"jsx",
|
|
973
|
-
"js",
|
|
974
|
-
"mjs",
|
|
975
|
-
"vue",
|
|
976
|
-
"svelte"
|
|
977
|
-
];
|
|
978
|
-
var HYDRATION_MODES = new Set([
|
|
979
|
-
"idle",
|
|
980
|
-
"load",
|
|
981
|
-
"media",
|
|
982
|
-
"only",
|
|
983
|
-
"visible"
|
|
984
|
-
]);
|
|
985
|
-
var isHydrationMode = (value) => HYDRATION_MODES.has(value);
|
|
986
|
-
var emptyAnalysis = () => ({
|
|
987
|
-
islands: [],
|
|
988
|
-
layout: [],
|
|
989
|
-
mdx: [],
|
|
990
|
-
warnings: []
|
|
991
|
-
});
|
|
992
|
-
var propName = (name) => ts.isIdentifier(name) || ts.isStringLiteral(name) ? name.text : undefined;
|
|
993
|
-
var addImportBindings = (map, statement) => {
|
|
994
|
-
if (!ts.isImportDeclaration(statement) || !ts.isStringLiteral(statement.moduleSpecifier)) {
|
|
995
|
-
return;
|
|
996
|
-
}
|
|
997
|
-
const specifier = statement.moduleSpecifier.text;
|
|
998
|
-
const clause = statement.importClause;
|
|
999
|
-
if (!clause) {
|
|
1000
|
-
return;
|
|
1001
|
-
}
|
|
1002
|
-
if (clause.name) {
|
|
1003
|
-
map.set(clause.name.text, { imported: "default", specifier });
|
|
1004
|
-
}
|
|
1005
|
-
const named = clause.namedBindings;
|
|
1006
|
-
if (named && ts.isNamedImports(named)) {
|
|
1007
|
-
for (const element of named.elements) {
|
|
1008
|
-
map.set(element.name.text, {
|
|
1009
|
-
imported: (element.propertyName ?? element.name).text,
|
|
1010
|
-
specifier
|
|
1011
|
-
});
|
|
1012
|
-
}
|
|
1013
|
-
}
|
|
1014
|
-
};
|
|
1015
|
-
var collectImports = (sourceFile) => {
|
|
1016
|
-
const map = new Map;
|
|
1017
|
-
for (const statement of sourceFile.statements) {
|
|
1018
|
-
addImportBindings(map, statement);
|
|
1019
|
-
}
|
|
1020
|
-
return map;
|
|
1021
|
-
};
|
|
1022
|
-
var unwrapObject = (expression) => {
|
|
1023
|
-
if (ts.isObjectLiteralExpression(expression)) {
|
|
1024
|
-
return expression;
|
|
1025
|
-
}
|
|
1026
|
-
if (ts.isCallExpression(expression)) {
|
|
1027
|
-
const [arg] = expression.arguments;
|
|
1028
|
-
return arg && ts.isObjectLiteralExpression(arg) ? arg : undefined;
|
|
1029
|
-
}
|
|
1030
|
-
if (ts.isAsExpression(expression) || ts.isParenthesizedExpression(expression)) {
|
|
1031
|
-
return unwrapObject(expression.expression);
|
|
1032
|
-
}
|
|
1033
|
-
return;
|
|
1034
|
-
};
|
|
1035
|
-
var findDefaultExportObject = (sourceFile) => {
|
|
1036
|
-
for (const statement of sourceFile.statements) {
|
|
1037
|
-
if (ts.isExportAssignment(statement) && !statement.isExportEquals) {
|
|
1038
|
-
return unwrapObject(statement.expression);
|
|
1039
|
-
}
|
|
1040
|
-
}
|
|
1041
|
-
return;
|
|
1042
|
-
};
|
|
1043
|
-
var probeExtension = (base) => {
|
|
1044
|
-
for (const extension of COMPONENT_EXTS) {
|
|
1045
|
-
const candidate = `${base}.${extension}`;
|
|
1046
|
-
if (existsSync2(candidate)) {
|
|
1047
|
-
return candidate;
|
|
1048
|
-
}
|
|
1049
|
-
}
|
|
1050
|
-
return null;
|
|
1051
|
-
};
|
|
1052
|
-
var toImport = (specifier, imported, dir) => {
|
|
1053
|
-
const relative = specifier.startsWith(".") || isAbsolute(specifier);
|
|
1054
|
-
let path = specifier;
|
|
1055
|
-
let extension = extname(specifier).slice(1).toLowerCase();
|
|
1056
|
-
if (relative) {
|
|
1057
|
-
const absolute = isAbsolute(specifier) ? specifier : resolve3(dir, specifier);
|
|
1058
|
-
if (extension) {
|
|
1059
|
-
path = absolute;
|
|
1060
|
-
} else {
|
|
1061
|
-
const probed = probeExtension(absolute);
|
|
1062
|
-
path = probed ?? absolute;
|
|
1063
|
-
extension = probed ? extname(probed).slice(1).toLowerCase() : "";
|
|
1064
|
-
}
|
|
1065
|
-
}
|
|
1066
|
-
return {
|
|
1067
|
-
framework: FRAMEWORK_BY_EXT.get(extension) ?? null,
|
|
1068
|
-
name: imported,
|
|
1069
|
-
path
|
|
1070
|
-
};
|
|
1071
|
-
};
|
|
1072
|
-
var resolveIdentifier = (name, imports, dir) => {
|
|
1073
|
-
const binding = imports.get(name);
|
|
1074
|
-
return binding ? toImport(binding.specifier, binding.imported, dir) : null;
|
|
1075
|
-
};
|
|
1076
|
-
var applyDescriptorProperty = (descriptor, property, imports, dir) => {
|
|
1077
|
-
if (ts.isShorthandPropertyAssignment(property)) {
|
|
1078
|
-
if (property.name.text === "component") {
|
|
1079
|
-
descriptor.hadComponent = true;
|
|
1080
|
-
descriptor.source = resolveIdentifier(property.name.text, imports, dir);
|
|
1081
|
-
}
|
|
1082
|
-
return;
|
|
1083
|
-
}
|
|
1084
|
-
if (!ts.isPropertyAssignment(property)) {
|
|
1085
|
-
return;
|
|
1086
|
-
}
|
|
1087
|
-
const name = propName(property.name);
|
|
1088
|
-
const init = property.initializer;
|
|
1089
|
-
if (name === "component") {
|
|
1090
|
-
descriptor.hadComponent = true;
|
|
1091
|
-
if (ts.isStringLiteral(init)) {
|
|
1092
|
-
descriptor.source = toImport(init.text, "default", dir);
|
|
1093
|
-
} else if (ts.isIdentifier(init)) {
|
|
1094
|
-
descriptor.source = resolveIdentifier(init.text, imports, dir);
|
|
1095
|
-
}
|
|
1096
|
-
} else if (name === "client" && ts.isStringLiteral(init) && isHydrationMode(init.text)) {
|
|
1097
|
-
descriptor.client = init.text;
|
|
1098
|
-
} else if (name === "media" && ts.isStringLiteral(init)) {
|
|
1099
|
-
descriptor.media = init.text;
|
|
1100
|
-
}
|
|
1101
|
-
};
|
|
1102
|
-
var readDescriptor = (object, imports, dir) => {
|
|
1103
|
-
const descriptor = { hadComponent: false, source: null };
|
|
1104
|
-
for (const property of object.properties) {
|
|
1105
|
-
applyDescriptorProperty(descriptor, property, imports, dir);
|
|
1106
|
-
}
|
|
1107
|
-
return descriptor;
|
|
1108
|
-
};
|
|
1109
|
-
var finalize = (key, group, descriptor, label, identifier, warnings) => {
|
|
1110
|
-
const { client, media, source } = descriptor;
|
|
1111
|
-
if (group === "islands") {
|
|
1112
|
-
if (!source) {
|
|
1113
|
-
warnings.push(`Island override "${key}" couldn't be resolved to a file. Reference it by an imported component or a path string with an extension.`);
|
|
1114
|
-
return null;
|
|
1115
|
-
}
|
|
1116
|
-
if (!source.framework) {
|
|
1117
|
-
warnings.push(`Island override "${key}" (${label}) is not a React, Vue, or Svelte component; only framework components can be islands.`);
|
|
1118
|
-
return null;
|
|
1119
|
-
}
|
|
1120
|
-
}
|
|
1121
|
-
if (client === "media" && !media) {
|
|
1122
|
-
warnings.push(`Override "${key}" uses client: "media" but no \`media\` query was given; it will hydrate as if \`client: "load"\`.`);
|
|
1123
|
-
}
|
|
1124
|
-
if (client === "only" && source && !source.framework) {
|
|
1125
|
-
warnings.push(`Override "${key}" uses client: "only" but its framework couldn't be inferred; reference a .tsx/.jsx/.vue/.svelte file.`);
|
|
1126
|
-
}
|
|
1127
|
-
if (!client && source?.framework) {
|
|
1128
|
-
warnings.push(`Override "${key}" points to a ${FRAMEWORK_LABEL[source.framework]} component (${label}) but has no hydration mode, so it renders as static HTML with no interactivity. Add one, e.g. \`${key}: { component: ${JSON.stringify(label)}, client: "load" }\`.`);
|
|
1129
|
-
}
|
|
1130
|
-
const normalized = { identifier, key, source };
|
|
1131
|
-
if (client) {
|
|
1132
|
-
normalized.client = client;
|
|
1133
|
-
}
|
|
1134
|
-
if (media) {
|
|
1135
|
-
normalized.media = media;
|
|
1136
|
-
}
|
|
1137
|
-
return normalized;
|
|
1138
|
-
};
|
|
1139
|
-
var normalizeEntry = (entry, group, imports, dir, warnings) => {
|
|
1140
|
-
const defaultClient = group === "islands" ? "visible" : undefined;
|
|
1141
|
-
if (ts.isShorthandPropertyAssignment(entry)) {
|
|
1142
|
-
const name = entry.name.text;
|
|
1143
|
-
return finalize(name, group, {
|
|
1144
|
-
client: defaultClient,
|
|
1145
|
-
hadComponent: true,
|
|
1146
|
-
source: resolveIdentifier(name, imports, dir)
|
|
1147
|
-
}, name, true, warnings);
|
|
1148
|
-
}
|
|
1149
|
-
if (!ts.isPropertyAssignment(entry)) {
|
|
1150
|
-
return null;
|
|
1151
|
-
}
|
|
1152
|
-
const key = propName(entry.name);
|
|
1153
|
-
if (!key) {
|
|
1154
|
-
return null;
|
|
1155
|
-
}
|
|
1156
|
-
const value = entry.initializer;
|
|
1157
|
-
if (ts.isIdentifier(value)) {
|
|
1158
|
-
return finalize(key, group, {
|
|
1159
|
-
client: defaultClient,
|
|
1160
|
-
hadComponent: true,
|
|
1161
|
-
source: resolveIdentifier(value.text, imports, dir)
|
|
1162
|
-
}, value.text, true, warnings);
|
|
1163
|
-
}
|
|
1164
|
-
if (ts.isStringLiteral(value)) {
|
|
1165
|
-
return finalize(key, group, {
|
|
1166
|
-
client: defaultClient,
|
|
1167
|
-
hadComponent: true,
|
|
1168
|
-
source: toImport(value.text, "default", dir)
|
|
1169
|
-
}, value.text, false, warnings);
|
|
1170
|
-
}
|
|
1171
|
-
if (ts.isObjectLiteralExpression(value)) {
|
|
1172
|
-
const descriptor = readDescriptor(value, imports, dir);
|
|
1173
|
-
if (!descriptor.hadComponent) {
|
|
1174
|
-
warnings.push(`Override "${key}" is an object without a \`component\` field; expected \`{ component, client }\`.`);
|
|
1175
|
-
return null;
|
|
1176
|
-
}
|
|
1177
|
-
if (!descriptor.source) {
|
|
1178
|
-
warnings.push(`Override "${key}"'s \`component\` couldn't be resolved to a file. Reference an imported component or a path string with an extension.`);
|
|
1179
|
-
return null;
|
|
1180
|
-
}
|
|
1181
|
-
return finalize(key, group, { ...descriptor, client: descriptor.client ?? defaultClient }, key, false, warnings);
|
|
1182
|
-
}
|
|
1183
|
-
return { identifier: false, key, source: null };
|
|
1184
|
-
};
|
|
1185
|
-
var collectGroupOverrides = (property, imports, dir, result) => {
|
|
1186
|
-
if (!ts.isPropertyAssignment(property)) {
|
|
1187
|
-
return;
|
|
1188
|
-
}
|
|
1189
|
-
const name = propName(property.name);
|
|
1190
|
-
if (!(name && isGroup(name)) || !ts.isObjectLiteralExpression(property.initializer)) {
|
|
1191
|
-
return;
|
|
1192
|
-
}
|
|
1193
|
-
for (const entry of property.initializer.properties) {
|
|
1194
|
-
const normalized = normalizeEntry(entry, name, imports, dir, result.warnings);
|
|
1195
|
-
if (normalized) {
|
|
1196
|
-
result[name].push(normalized);
|
|
1197
|
-
}
|
|
1198
|
-
}
|
|
1199
|
-
};
|
|
1200
|
-
var analyzeComponentOverrides = (source, filePath) => {
|
|
1201
|
-
const result = emptyAnalysis();
|
|
1202
|
-
const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true, filePath.endsWith("tsx") ? ts.ScriptKind.TSX : ts.ScriptKind.TS);
|
|
1203
|
-
const object = findDefaultExportObject(sourceFile);
|
|
1204
|
-
if (!object) {
|
|
1205
|
-
return result;
|
|
1206
|
-
}
|
|
1207
|
-
const imports = collectImports(sourceFile);
|
|
1208
|
-
const dir = dirname3(filePath);
|
|
1209
|
-
for (const property of object.properties) {
|
|
1210
|
-
collectGroupOverrides(property, imports, dir, result);
|
|
1211
|
-
}
|
|
1212
|
-
return result;
|
|
1213
|
-
};
|
|
1214
|
-
|
|
1215
872
|
// src/core/svg-dimensions.ts
|
|
1216
873
|
var ROOT = /<svg\s(?:[^>"']|"[^"]*"|'[^']*')*>/u;
|
|
1217
874
|
var WIDTH = /\swidth=(?<quote>['"])(?<value>[^%]+?)\k<quote>/u;
|
|
@@ -1276,14 +933,14 @@ var svgDimensions = (svg) => {
|
|
|
1276
933
|
};
|
|
1277
934
|
|
|
1278
935
|
// src/core/tsconfig-aliases.ts
|
|
1279
|
-
import { existsSync as
|
|
1280
|
-
import { dirname as dirname4, join as join5, resolve as
|
|
1281
|
-
import
|
|
936
|
+
import { existsSync as existsSync2 } from "node:fs";
|
|
937
|
+
import { dirname as dirname4, join as join5, resolve as resolve3 } from "pathe";
|
|
938
|
+
import ts from "typescript";
|
|
1282
939
|
var PARSE_HOST = {
|
|
1283
|
-
fileExists:
|
|
940
|
+
fileExists: ts.sys.fileExists,
|
|
1284
941
|
readDirectory: () => [],
|
|
1285
|
-
readFile:
|
|
1286
|
-
useCaseSensitiveFileNames:
|
|
942
|
+
readFile: ts.sys.readFile,
|
|
943
|
+
useCaseSensitiveFileNames: ts.sys.useCaseSensitiveFileNames
|
|
1287
944
|
};
|
|
1288
945
|
var isPathTarget = (target) => typeof target === "string";
|
|
1289
946
|
var toAlias = (key, value, baseDir) => {
|
|
@@ -1296,19 +953,19 @@ var toAlias = (key, value, baseDir) => {
|
|
|
1296
953
|
if (find === "" || find === "*") {
|
|
1297
954
|
return null;
|
|
1298
955
|
}
|
|
1299
|
-
return { find, replacement:
|
|
956
|
+
return { find, replacement: resolve3(baseDir, target) };
|
|
1300
957
|
};
|
|
1301
958
|
var resolveTsconfigAliases = (root) => {
|
|
1302
|
-
const entry = ["tsconfig.json", "jsconfig.json"].map((name) => join5(root, name)).find((file) =>
|
|
959
|
+
const entry = ["tsconfig.json", "jsconfig.json"].map((name) => join5(root, name)).find((file) => existsSync2(file));
|
|
1303
960
|
if (!entry) {
|
|
1304
961
|
return {};
|
|
1305
962
|
}
|
|
1306
|
-
const { config, error } =
|
|
963
|
+
const { config, error } = ts.readConfigFile(entry, ts.sys.readFile);
|
|
1307
964
|
if (error) {
|
|
1308
965
|
return {};
|
|
1309
966
|
}
|
|
1310
967
|
const configDir = dirname4(entry);
|
|
1311
|
-
const { options } =
|
|
968
|
+
const { options } = ts.parseJsonConfigFileContent(config, PARSE_HOST, configDir, undefined, entry);
|
|
1312
969
|
const { paths } = options;
|
|
1313
970
|
if (!paths) {
|
|
1314
971
|
return {};
|
|
@@ -1459,10 +1116,10 @@ var MERMAID_FENCE = /^[ \t]*(?:`{3,}|~{3,})[ \t]*mermaid\b/mu;
|
|
|
1459
1116
|
var hasMermaidFence = (text) => MERMAID_FENCE.test(text);
|
|
1460
1117
|
|
|
1461
1118
|
// src/og/derive.ts
|
|
1462
|
-
import { existsSync as
|
|
1463
|
-
import { isAbsolute
|
|
1119
|
+
import { existsSync as existsSync3 } from "node:fs";
|
|
1120
|
+
import { isAbsolute, join as join6 } from "pathe";
|
|
1464
1121
|
var CARD_WEIGHTS = [400, 600];
|
|
1465
|
-
var absoluteSrc = (root, src) =>
|
|
1122
|
+
var absoluteSrc = (root, src) => isAbsolute(src) ? src : join6(root, src);
|
|
1466
1123
|
var isNumericWeight = (weight) => typeof weight === "number";
|
|
1467
1124
|
var isRangeWeight = (weight) => typeof weight === "string";
|
|
1468
1125
|
var isFontName = (value) => typeof value === "string";
|
|
@@ -1563,11 +1220,11 @@ var missingFontFiles = (options, root) => {
|
|
|
1563
1220
|
sources.push(absoluteSrc(root, font.src));
|
|
1564
1221
|
}
|
|
1565
1222
|
}
|
|
1566
|
-
return [...new Set(sources)].filter((path) => !
|
|
1223
|
+
return [...new Set(sources)].filter((path) => !existsSync3(path));
|
|
1567
1224
|
};
|
|
1568
1225
|
|
|
1569
1226
|
// src/og/logo.ts
|
|
1570
|
-
import { existsSync as
|
|
1227
|
+
import { existsSync as existsSync4, readFileSync } from "node:fs";
|
|
1571
1228
|
import { join as join7 } from "pathe";
|
|
1572
1229
|
var resolveOgLogo = (project, source) => {
|
|
1573
1230
|
if (!source?.toLowerCase().endsWith(".svg")) {
|
|
@@ -1577,13 +1234,13 @@ var resolveOgLogo = (project, source) => {
|
|
|
1577
1234
|
const file = [
|
|
1578
1235
|
join7(project.context.root, "public", relative),
|
|
1579
1236
|
join7(project.context.root, relative)
|
|
1580
|
-
].find((path) =>
|
|
1237
|
+
].find((path) => existsSync4(path));
|
|
1581
1238
|
return file ? readFileSync(file, "utf-8") : undefined;
|
|
1582
1239
|
};
|
|
1583
1240
|
|
|
1584
1241
|
// src/openapi/scalar.ts
|
|
1585
1242
|
import { readFile as readFile2 } from "node:fs/promises";
|
|
1586
|
-
import { isAbsolute as
|
|
1243
|
+
import { isAbsolute as isAbsolute2, join as join8 } from "pathe";
|
|
1587
1244
|
|
|
1588
1245
|
// src/theme/palette.ts
|
|
1589
1246
|
var FALLBACK_ACCENT = "oklch(0.62 0.16 250)";
|
|
@@ -1679,7 +1336,7 @@ var specConfiguration = async (spec, root) => {
|
|
|
1679
1336
|
if (URL_SPEC.test(spec)) {
|
|
1680
1337
|
return { config: { url: spec } };
|
|
1681
1338
|
}
|
|
1682
|
-
const absolute =
|
|
1339
|
+
const absolute = isAbsolute2(spec) ? spec : join8(root, spec);
|
|
1683
1340
|
try {
|
|
1684
1341
|
return { config: { content: await readFile2(absolute, "utf-8") } };
|
|
1685
1342
|
} catch {
|
|
@@ -1690,7 +1347,7 @@ var specConfiguration = async (spec, root) => {
|
|
|
1690
1347
|
}
|
|
1691
1348
|
};
|
|
1692
1349
|
var acceptScalarReference = (ref, seen, contentRoutes, warnings) => {
|
|
1693
|
-
if (ref.
|
|
1350
|
+
if (ref.kind !== "scalar") {
|
|
1694
1351
|
return null;
|
|
1695
1352
|
}
|
|
1696
1353
|
if (seen.has(ref.route)) {
|
|
@@ -1725,12 +1382,13 @@ var buildReferenceFiles = async (options) => {
|
|
|
1725
1382
|
warnings.push(spec.warning);
|
|
1726
1383
|
}
|
|
1727
1384
|
const pagePath = referencePagePath(ref.route);
|
|
1385
|
+
const { theme, ...passthrough } = ref.scalar ?? {};
|
|
1728
1386
|
files.push({
|
|
1729
1387
|
content: scalarReferenceTemplate({
|
|
1730
1388
|
configuration: {
|
|
1731
1389
|
...spec.config,
|
|
1732
|
-
...themeConfiguration(config,
|
|
1733
|
-
...
|
|
1390
|
+
...themeConfiguration(config, theme),
|
|
1391
|
+
...passthrough
|
|
1734
1392
|
},
|
|
1735
1393
|
noindex: ref.noindex,
|
|
1736
1394
|
route: ref.route,
|
|
@@ -1759,6 +1417,7 @@ var CODE_PADDING_BLOCK_REM = 1;
|
|
|
1759
1417
|
|
|
1760
1418
|
// src/theme/entry.ts
|
|
1761
1419
|
var CODE_SCROLL_INSET_REM = 0.375;
|
|
1420
|
+
var EXTERNAL_LINK_MASK = `url("data:image/svg+xml,${encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M7 7h10v10M7 17L17 7"/></svg>')}")`;
|
|
1762
1421
|
var DARK_VARIANT = `/* Dark mode is driven by data-theme on the <html> element. */
|
|
1763
1422
|
@custom-variant dark (&:where([data-theme="dark"], [data-theme="dark"] *));`;
|
|
1764
1423
|
var COLOR_SCHEME_DEFAULTS = `:root {
|
|
@@ -1985,10 +1644,13 @@ ${THEME_MAPPING}
|
|
|
1985
1644
|
@apply -my-1 flex flex-1 items-center gap-1.5 rounded py-1 transition-colors aria-[current=page]:text-foreground aria-[current=page]:font-semibold;
|
|
1986
1645
|
}
|
|
1987
1646
|
@utility blume-nav-heading {
|
|
1988
|
-
@apply mb-
|
|
1647
|
+
@apply mb-1 flex items-center gap-1.5 px-2.5 py-1.5 font-medium text-foreground text-sm;
|
|
1989
1648
|
}
|
|
1649
|
+
/* The linked heading fills the heading's own box with negative margins, so
|
|
1650
|
+
its hover/active pill is the page row's exactly (same padding and radius)
|
|
1651
|
+
and an unlinked heading beside it keeps the same text position. */
|
|
1990
1652
|
@utility blume-nav-heading-link {
|
|
1991
|
-
@apply -
|
|
1653
|
+
@apply -mx-2.5 -my-1.5 flex flex-1 items-center gap-1.5 rounded-[0.65rem] px-2.5 py-1.5 text-foreground transition-colors hover:bg-muted aria-[current=page]:bg-muted;
|
|
1992
1654
|
}
|
|
1993
1655
|
|
|
1994
1656
|
/* Theme Tailwind Typography (prose) with Blume tokens. */
|
|
@@ -2009,6 +1671,11 @@ ${THEME_MAPPING}
|
|
|
2009
1671
|
--tw-prose-pre-bg: var(--blume-code-background);
|
|
2010
1672
|
--tw-prose-th-borders: var(--blume-border);
|
|
2011
1673
|
--tw-prose-td-borders: var(--blume-border);
|
|
1674
|
+
/* Neutralized: the plugin defaults are near-black text and shadow with no
|
|
1675
|
+
dark counterpart (Blume never applies prose-invert), and the kbd rule
|
|
1676
|
+
below draws the badge with Blume tokens instead. */
|
|
1677
|
+
--tw-prose-kbd: inherit;
|
|
1678
|
+
--tw-prose-kbd-shadows: transparent;
|
|
2012
1679
|
color: var(--blume-muted-foreground);
|
|
2013
1680
|
font-size: 0.875rem;
|
|
2014
1681
|
line-height: 1.7;
|
|
@@ -2119,6 +1786,22 @@ ${THEME_MAPPING}
|
|
|
2119
1786
|
text-decoration: none;
|
|
2120
1787
|
}
|
|
2121
1788
|
|
|
1789
|
+
/* External Markdown links (markdown.externalLinks) open in a new tab and trail
|
|
1790
|
+
the same Lucide arrow-up-right the featured sidebar links use, as a mask so it
|
|
1791
|
+
takes the link's color. A link wrapping only an image (a badge, a logo)
|
|
1792
|
+
skips the arrow. */
|
|
1793
|
+
.prose :where(a[data-blume-external]:not(:has(img, svg)))::after {
|
|
1794
|
+
background-color: currentColor;
|
|
1795
|
+
content: "";
|
|
1796
|
+
display: inline-block;
|
|
1797
|
+
height: 0.75em;
|
|
1798
|
+
margin-inline-start: 0.125em;
|
|
1799
|
+
-webkit-mask: ${EXTERNAL_LINK_MASK} center / contain no-repeat;
|
|
1800
|
+
mask: ${EXTERNAL_LINK_MASK} center / contain no-repeat;
|
|
1801
|
+
opacity: 0.6;
|
|
1802
|
+
width: 0.75em;
|
|
1803
|
+
}
|
|
1804
|
+
|
|
2122
1805
|
.prose :where(hr) {
|
|
2123
1806
|
margin: 2.5rem 0;
|
|
2124
1807
|
}
|
|
@@ -2538,6 +2221,24 @@ pre:has(.line.focused):hover .line:not(.focused) {
|
|
|
2538
2221
|
content: none;
|
|
2539
2222
|
}
|
|
2540
2223
|
|
|
2224
|
+
/* Keyboard keys (<kbd>) render as the same bordered badge the search dialog
|
|
2225
|
+
uses for its shortcut hints. Typography's own kbd rule is scoped with
|
|
2226
|
+
:not(.not-prose *), so it never reaches a key inside <Steps>, <Callout>,
|
|
2227
|
+
<Card>, or any other not-prose component; this rule is deliberately
|
|
2228
|
+
unscoped from that exclusion so a key looks the same everywhere in the
|
|
2229
|
+
content column. Unlayered, so it outranks the plugin's layered rule. */
|
|
2230
|
+
.prose kbd {
|
|
2231
|
+
background: var(--blume-muted);
|
|
2232
|
+
border: 1px solid var(--blume-border);
|
|
2233
|
+
border-radius: 0.25rem;
|
|
2234
|
+
box-shadow: none;
|
|
2235
|
+
color: inherit;
|
|
2236
|
+
font-family: var(--font-mono);
|
|
2237
|
+
font-size: 0.85em;
|
|
2238
|
+
font-weight: 500;
|
|
2239
|
+
padding: 0.125rem 0.25rem;
|
|
2240
|
+
}
|
|
2241
|
+
|
|
2541
2242
|
/* Inline code highlighting: Shiki colors the tokens of a \`code\`{:lang} snippet
|
|
2542
2243
|
via the same dual-theme CSS variables as fenced blocks, keeping the inline
|
|
2543
2244
|
pill background. Always on — it only fires on the trailing {:lang} marker. */
|
|
@@ -2629,15 +2330,15 @@ ${options.userCss}
|
|
|
2629
2330
|
`;
|
|
2630
2331
|
|
|
2631
2332
|
// src/theme/sources.ts
|
|
2632
|
-
import { dirname as dirname5, isAbsolute as
|
|
2333
|
+
import { dirname as dirname5, isAbsolute as isAbsolute3, relative as relative2, resolve as resolve4 } from "pathe";
|
|
2633
2334
|
var SOURCE_DIRECTIVE = /@source(?<not>\s+not)?\s+(?<quote>["'])(?<path>[^"']+)\k<quote>/gu;
|
|
2634
2335
|
var rebaseSourceDirectives = (css, options) => {
|
|
2635
2336
|
const base = dirname5(options.from);
|
|
2636
2337
|
return css.replace(SOURCE_DIRECTIVE, (directive, not, quote, path) => {
|
|
2637
|
-
if (
|
|
2338
|
+
if (isAbsolute3(path)) {
|
|
2638
2339
|
return directive;
|
|
2639
2340
|
}
|
|
2640
|
-
const rebased = relative2(options.to,
|
|
2341
|
+
const rebased = relative2(options.to, resolve4(base, path));
|
|
2641
2342
|
return `@source${not ?? ""} ${quote}${rebased}${quote}`;
|
|
2642
2343
|
});
|
|
2643
2344
|
};
|
|
@@ -2724,192 +2425,12 @@ var twoslashCss = () => {
|
|
|
2724
2425
|
${OVERRIDES}`;
|
|
2725
2426
|
};
|
|
2726
2427
|
|
|
2727
|
-
// src/astro/component-slots.ts
|
|
2728
|
-
var EMPTY_MODULE = `// Generated by Blume. Do not edit.
|
|
2729
|
-
import type { ComponentOverride } from "blume/core/define-components.ts";
|
|
2730
|
-
export const mdxComponents: Record<string, ComponentOverride> = {};
|
|
2731
|
-
export const layoutOverrides: Record<string, ComponentOverride> = {};
|
|
2732
|
-
`;
|
|
2733
|
-
var attributeValue = (value) => value.replaceAll(/["\n\r]/gu, " ").trim();
|
|
2734
|
-
var CLIENT_LOAD = "client:load";
|
|
2735
|
-
var directiveFor = (override) => {
|
|
2736
|
-
const framework = override.source?.framework;
|
|
2737
|
-
switch (override.client) {
|
|
2738
|
-
case "idle": {
|
|
2739
|
-
return "client:idle";
|
|
2740
|
-
}
|
|
2741
|
-
case "visible": {
|
|
2742
|
-
return "client:visible";
|
|
2743
|
-
}
|
|
2744
|
-
case "media": {
|
|
2745
|
-
return override.media ? `client:media="${attributeValue(override.media)}"` : CLIENT_LOAD;
|
|
2746
|
-
}
|
|
2747
|
-
case "only": {
|
|
2748
|
-
return framework ? `client:only="${attributeValue(framework)}"` : CLIENT_LOAD;
|
|
2749
|
-
}
|
|
2750
|
-
default: {
|
|
2751
|
-
return CLIENT_LOAD;
|
|
2752
|
-
}
|
|
2753
|
-
}
|
|
2754
|
-
};
|
|
2755
|
-
var importClause = (variable, name, path) => name === "default" ? `import ${variable} from ${JSON.stringify(path)};` : `import { ${name} as ${variable} } from ${JSON.stringify(path)};`;
|
|
2756
|
-
var wrapperContent = (override) => {
|
|
2757
|
-
const { name, path } = override.source;
|
|
2758
|
-
const clause = name === "default" ? `import Component from ${JSON.stringify(path)};` : `import { ${name} as Component } from ${JSON.stringify(path)};`;
|
|
2759
|
-
return `---
|
|
2760
|
-
// Generated by Blume. Do not edit.
|
|
2761
|
-
${clause}
|
|
2762
|
-
---
|
|
2763
|
-
<Component ${directiveFor(override)} {...Astro.props}><slot /></Component>
|
|
2764
|
-
`;
|
|
2765
|
-
};
|
|
2766
|
-
var sanitize = (value) => value.replaceAll(/[^A-Za-z0-9]/gu, (char) => `_${(char.codePointAt(0) ?? 0).toString(16)}_`);
|
|
2767
|
-
var planComponentSlots = (componentsFile, analysis) => {
|
|
2768
|
-
const frameworks = new Set;
|
|
2769
|
-
if (!componentsFile) {
|
|
2770
|
-
return { frameworks, module: EMPTY_MODULE, wrappers: [] };
|
|
2771
|
-
}
|
|
2772
|
-
if (!analysis) {
|
|
2773
|
-
return {
|
|
2774
|
-
frameworks,
|
|
2775
|
-
module: `// Generated by Blume. Do not edit.
|
|
2776
|
-
import overrides from ${JSON.stringify(componentsFile)};
|
|
2777
|
-
export const mdxComponents = overrides.mdx ?? {};
|
|
2778
|
-
export const layoutOverrides = overrides.layout ?? {};
|
|
2779
|
-
`,
|
|
2780
|
-
wrappers: []
|
|
2781
|
-
};
|
|
2782
|
-
}
|
|
2783
|
-
const wrappers = [];
|
|
2784
|
-
const importLines = [];
|
|
2785
|
-
const mdxEntries = [];
|
|
2786
|
-
const layoutEntries = [];
|
|
2787
|
-
let counter = 0;
|
|
2788
|
-
const mdxOverrides = [...analysis.mdx, ...analysis.islands];
|
|
2789
|
-
const plan = (override, group, entries) => {
|
|
2790
|
-
const { source } = override;
|
|
2791
|
-
if (source?.framework) {
|
|
2792
|
-
frameworks.add(source.framework);
|
|
2793
|
-
}
|
|
2794
|
-
if (override.identifier && !override.client) {
|
|
2795
|
-
return;
|
|
2796
|
-
}
|
|
2797
|
-
if (!source) {
|
|
2798
|
-
return;
|
|
2799
|
-
}
|
|
2800
|
-
const variable = `__blumeSlot${counter}`;
|
|
2801
|
-
counter += 1;
|
|
2802
|
-
if (override.client) {
|
|
2803
|
-
const name = `${group}-${sanitize(override.key)}`;
|
|
2804
|
-
wrappers.push({ content: wrapperContent(override), name });
|
|
2805
|
-
importLines.push(importClause(variable, "default", `./component-slots/${name}.astro`));
|
|
2806
|
-
} else {
|
|
2807
|
-
importLines.push(importClause(variable, source.name, source.path));
|
|
2808
|
-
}
|
|
2809
|
-
entries.push(`${JSON.stringify(override.key)}: ${variable}`);
|
|
2810
|
-
};
|
|
2811
|
-
for (const override of mdxOverrides) {
|
|
2812
|
-
plan(override, "mdx", mdxEntries);
|
|
2813
|
-
}
|
|
2814
|
-
for (const override of analysis.layout) {
|
|
2815
|
-
plan(override, "layout", layoutEntries);
|
|
2816
|
-
}
|
|
2817
|
-
const moduleSource = `// Generated by Blume. Do not edit.
|
|
2818
|
-
import overrides from ${JSON.stringify(componentsFile)};
|
|
2819
|
-
${importLines.join(`
|
|
2820
|
-
`)}${importLines.length ? `
|
|
2821
|
-
` : ""}export const mdxComponents = { ...(overrides.mdx ?? {})${mdxEntries.length ? `, ${mdxEntries.join(", ")}` : ""} };
|
|
2822
|
-
export const layoutOverrides = { ...(overrides.layout ?? {})${layoutEntries.length ? `, ${layoutEntries.join(", ")}` : ""} };
|
|
2823
|
-
`;
|
|
2824
|
-
return { frameworks, module: moduleSource, wrappers };
|
|
2825
|
-
};
|
|
2826
|
-
|
|
2827
2428
|
// src/astro/examples.ts
|
|
2828
|
-
import { readFile as readFile4 } from "node:fs/promises";
|
|
2829
|
-
import pMap2 from "p-map";
|
|
2830
|
-
import { isAbsolute as isAbsolute5, join as join10, relative as relative3 } from "pathe";
|
|
2831
|
-
import { glob as glob2 } from "tinyglobby";
|
|
2832
|
-
|
|
2833
|
-
// src/astro/islands.ts
|
|
2834
2429
|
import { readFile as readFile3 } from "node:fs/promises";
|
|
2835
2430
|
import pMap from "p-map";
|
|
2836
|
-
import {
|
|
2431
|
+
import { isAbsolute as isAbsolute4, join as join9, relative as relative3 } from "pathe";
|
|
2837
2432
|
import { glob } from "tinyglobby";
|
|
2838
|
-
var
|
|
2839
|
-
var READ_CONCURRENCY = 16;
|
|
2840
|
-
var VALID_MODES = new Set([
|
|
2841
|
-
"idle",
|
|
2842
|
-
"load",
|
|
2843
|
-
"only",
|
|
2844
|
-
"visible"
|
|
2845
|
-
]);
|
|
2846
|
-
var isClientMode = (mode) => VALID_MODES.has(mode);
|
|
2847
|
-
var FRAMEWORK_BY_EXT2 = new Map([
|
|
2848
|
-
["jsx", "react"],
|
|
2849
|
-
["svelte", "svelte"],
|
|
2850
|
-
["tsx", "react"],
|
|
2851
|
-
["vue", "vue"]
|
|
2852
|
-
]);
|
|
2853
|
-
var ISLAND_FILE = /\.(?<ext>jsx|svelte|tsx|vue)$/u;
|
|
2854
|
-
var CLIENT_EXPORT = /export\s+const\s+client\s*(?::[^=]+)?=\s*["'](?<mode>\w+)["']/u;
|
|
2855
|
-
var readClientMode = (source, file, warnings) => {
|
|
2856
|
-
const mode = source.match(CLIENT_EXPORT)?.groups?.mode;
|
|
2857
|
-
if (!mode) {
|
|
2858
|
-
return DEFAULT_CLIENT;
|
|
2859
|
-
}
|
|
2860
|
-
if (!isClientMode(mode)) {
|
|
2861
|
-
warnings.push(`Island "${file}" declares an unknown client mode "${mode}"; defaulting to "${DEFAULT_CLIENT}". Use "load", "idle", "visible", or "only".`);
|
|
2862
|
-
return DEFAULT_CLIENT;
|
|
2863
|
-
}
|
|
2864
|
-
return mode;
|
|
2865
|
-
};
|
|
2866
|
-
var discoverIslands = async (root) => {
|
|
2867
|
-
const dir = join9(root, "islands");
|
|
2868
|
-
const matches = await glob(["**/*"], {
|
|
2869
|
-
absolute: true,
|
|
2870
|
-
cwd: dir,
|
|
2871
|
-
onlyFiles: true
|
|
2872
|
-
});
|
|
2873
|
-
const files = matches.toSorted();
|
|
2874
|
-
const sources = await pMap(files, (file) => readFile3(file, "utf-8"), {
|
|
2875
|
-
concurrency: READ_CONCURRENCY
|
|
2876
|
-
});
|
|
2877
|
-
const islands = [];
|
|
2878
|
-
const warnings = [];
|
|
2879
|
-
const seen = new Map;
|
|
2880
|
-
const collectIsland = (file, source) => {
|
|
2881
|
-
const base = basename(file);
|
|
2882
|
-
const ext = base.match(ISLAND_FILE)?.groups?.ext;
|
|
2883
|
-
const framework = ext ? FRAMEWORK_BY_EXT2.get(ext) : undefined;
|
|
2884
|
-
if (!framework) {
|
|
2885
|
-
return;
|
|
2886
|
-
}
|
|
2887
|
-
const name = base.replace(ISLAND_FILE, "");
|
|
2888
|
-
if (!/^[A-Z][A-Za-z0-9_]*$/u.test(name)) {
|
|
2889
|
-
warnings.push(`Island "${file}" must have a PascalCase identifier filename to be used in MDX (letters, digits, and underscores only, e.g. Counter.tsx → <Counter />); skipping it.`);
|
|
2890
|
-
return;
|
|
2891
|
-
}
|
|
2892
|
-
const existing = seen.get(name);
|
|
2893
|
-
if (existing) {
|
|
2894
|
-
warnings.push(`Two islands both resolve to <${name}> ("${existing}" and "${file}"); ignoring the second. Give them distinct filenames.`);
|
|
2895
|
-
return;
|
|
2896
|
-
}
|
|
2897
|
-
seen.set(name, file);
|
|
2898
|
-
islands.push({
|
|
2899
|
-
client: readClientMode(source, file, warnings),
|
|
2900
|
-
file,
|
|
2901
|
-
framework,
|
|
2902
|
-
name
|
|
2903
|
-
});
|
|
2904
|
-
};
|
|
2905
|
-
for (const [index, file] of files.entries()) {
|
|
2906
|
-
collectIsland(file, sources[index] ?? "");
|
|
2907
|
-
}
|
|
2908
|
-
return { islands, warnings };
|
|
2909
|
-
};
|
|
2910
|
-
|
|
2911
|
-
// src/astro/examples.ts
|
|
2912
|
-
var FRAMEWORK_BY_EXT3 = {
|
|
2433
|
+
var FRAMEWORK_BY_EXT = {
|
|
2913
2434
|
astro: "astro",
|
|
2914
2435
|
jsx: "react",
|
|
2915
2436
|
svelte: "svelte",
|
|
@@ -2918,11 +2439,11 @@ var FRAMEWORK_BY_EXT3 = {
|
|
|
2918
2439
|
};
|
|
2919
2440
|
var EXAMPLE_FILE = /\.(?<ext>astro|jsx|svelte|tsx|vue)$/u;
|
|
2920
2441
|
var DEFAULT_EXAMPLE_GLOB = "**/*.{astro,jsx,svelte,tsx,vue}";
|
|
2921
|
-
var
|
|
2442
|
+
var READ_CONCURRENCY = 16;
|
|
2922
2443
|
var EXAMPLE_SCAN_GLOB = "**/*.{astro,jsx,svelte,ts,tsx,vue}";
|
|
2923
2444
|
var exampleScanRoots = (root, examplesDir) => {
|
|
2924
2445
|
const path = relative3(root, examplesDir);
|
|
2925
|
-
const outside = path.startsWith("..") ||
|
|
2446
|
+
const outside = path.startsWith("..") || isAbsolute4(path);
|
|
2926
2447
|
return outside ? [root, examplesDir] : [root];
|
|
2927
2448
|
};
|
|
2928
2449
|
var GLOB_MAGIC = /[!*?[\]{}]/u;
|
|
@@ -2936,22 +2457,22 @@ var splitGlobBase = (pattern) => {
|
|
|
2936
2457
|
};
|
|
2937
2458
|
var discoverExamples = async (root, pattern = "examples") => {
|
|
2938
2459
|
const { base, rest } = GLOB_MAGIC.test(pattern) ? splitGlobBase(pattern) : { base: pattern, rest: DEFAULT_EXAMPLE_GLOB };
|
|
2939
|
-
const dir =
|
|
2940
|
-
const matches = await
|
|
2460
|
+
const dir = join9(root, base);
|
|
2461
|
+
const matches = await glob([rest], {
|
|
2941
2462
|
absolute: true,
|
|
2942
2463
|
cwd: dir,
|
|
2943
2464
|
onlyFiles: true
|
|
2944
2465
|
});
|
|
2945
2466
|
const files = matches.toSorted();
|
|
2946
|
-
const sources = await
|
|
2947
|
-
concurrency:
|
|
2467
|
+
const sources = await pMap(files, (file) => readFile3(file, "utf-8"), {
|
|
2468
|
+
concurrency: READ_CONCURRENCY
|
|
2948
2469
|
});
|
|
2949
2470
|
const examples = [];
|
|
2950
2471
|
const warnings = [];
|
|
2951
2472
|
const seen = new Map;
|
|
2952
2473
|
const collectExample = (file, source) => {
|
|
2953
2474
|
const ext = file.match(EXAMPLE_FILE)?.groups?.ext;
|
|
2954
|
-
const framework = ext ?
|
|
2475
|
+
const framework = ext ? FRAMEWORK_BY_EXT[ext] : undefined;
|
|
2955
2476
|
if (!(ext && framework)) {
|
|
2956
2477
|
return;
|
|
2957
2478
|
}
|
|
@@ -2981,16 +2502,39 @@ var exampleMarkdownLookup = (examples) => Object.fromEntries(examples.map((examp
|
|
|
2981
2502
|
{ lang: example.lang, source: example.source }
|
|
2982
2503
|
]));
|
|
2983
2504
|
|
|
2984
|
-
// src/astro/
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2505
|
+
// src/astro/render-deps.ts
|
|
2506
|
+
import { existsSync as existsSync5, realpathSync } from "node:fs";
|
|
2507
|
+
import {
|
|
2508
|
+
basename,
|
|
2509
|
+
dirname as dirname6,
|
|
2510
|
+
isAbsolute as isAbsolute5,
|
|
2511
|
+
join as join10,
|
|
2512
|
+
normalize,
|
|
2513
|
+
relative as relative4,
|
|
2514
|
+
resolve as resolve5
|
|
2515
|
+
} from "pathe";
|
|
2516
|
+
var depsCandidates = (pkgDir) => [
|
|
2517
|
+
join10(pkgDir, "node_modules"),
|
|
2518
|
+
dirname6(pkgDir)
|
|
2519
|
+
];
|
|
2520
|
+
var candidateHolding = (pkgDir, ...segments) => depsCandidates(pkgDir).find((dir) => existsSync5(join10(dir, ...segments))) ?? null;
|
|
2521
|
+
var packageDirFrom = (name, fromDir) => {
|
|
2522
|
+
let dir = normalize(fromDir);
|
|
2523
|
+
while (true) {
|
|
2524
|
+
const candidate = join10(dir, "node_modules", name);
|
|
2525
|
+
if (existsSync5(join10(candidate, "package.json"))) {
|
|
2526
|
+
return normalize(realpathSync(candidate));
|
|
2527
|
+
}
|
|
2528
|
+
const parent = dirname6(dir);
|
|
2529
|
+
if (parent === dir) {
|
|
2530
|
+
return null;
|
|
2531
|
+
}
|
|
2532
|
+
dir = parent;
|
|
2992
2533
|
}
|
|
2993
2534
|
};
|
|
2535
|
+
|
|
2536
|
+
// src/astro/generate.ts
|
|
2537
|
+
var BLUME_SRC = join11(packageRoot(), "src");
|
|
2994
2538
|
var resolveReactCompiler = (config, needsReact, pkgDir = packageRoot()) => {
|
|
2995
2539
|
if (!(needsReact && config.react.compiler)) {
|
|
2996
2540
|
return null;
|
|
@@ -3006,20 +2550,20 @@ var reactCompilerWarnings = (config, needsReact, compilerPath) => needsReact &&
|
|
|
3006
2550
|
] : [];
|
|
3007
2551
|
var resolveAstroPackageJson = (modulesDir) => {
|
|
3008
2552
|
try {
|
|
3009
|
-
return
|
|
2553
|
+
return realpathSync2(join11(modulesDir, "astro", "package.json"));
|
|
3010
2554
|
} catch {
|
|
3011
2555
|
return null;
|
|
3012
2556
|
}
|
|
3013
2557
|
};
|
|
3014
2558
|
var resolvedAstroHit = (fromDir) => {
|
|
3015
|
-
let dir =
|
|
2559
|
+
let dir = normalize2(fromDir);
|
|
3016
2560
|
while (true) {
|
|
3017
2561
|
const modulesDir = join11(dir, "node_modules");
|
|
3018
2562
|
const pkg = resolveAstroPackageJson(modulesDir);
|
|
3019
2563
|
if (pkg) {
|
|
3020
2564
|
return { modulesDir, pkg };
|
|
3021
2565
|
}
|
|
3022
|
-
const parent =
|
|
2566
|
+
const parent = dirname7(dir);
|
|
3023
2567
|
if (parent === dir) {
|
|
3024
2568
|
return null;
|
|
3025
2569
|
}
|
|
@@ -3028,16 +2572,11 @@ var resolvedAstroHit = (fromDir) => {
|
|
|
3028
2572
|
};
|
|
3029
2573
|
var sameRealDir = (a, b) => {
|
|
3030
2574
|
try {
|
|
3031
|
-
return
|
|
2575
|
+
return realpathSync2(a) === realpathSync2(b);
|
|
3032
2576
|
} catch {
|
|
3033
2577
|
return false;
|
|
3034
2578
|
}
|
|
3035
2579
|
};
|
|
3036
|
-
var depsCandidates = (pkgDir) => [
|
|
3037
|
-
join11(pkgDir, "node_modules"),
|
|
3038
|
-
dirname6(pkgDir)
|
|
3039
|
-
];
|
|
3040
|
-
var candidateHolding = (pkgDir, ...segments) => depsCandidates(pkgDir).find((dir) => existsSync6(join11(dir, ...segments))) ?? null;
|
|
3041
2580
|
var symlinkDir = async (target, link) => {
|
|
3042
2581
|
try {
|
|
3043
2582
|
await symlink(target, link, "dir");
|
|
@@ -3057,13 +2596,13 @@ var linkDepsJunction = async (link, depsDir) => {
|
|
|
3057
2596
|
return;
|
|
3058
2597
|
}
|
|
3059
2598
|
try {
|
|
3060
|
-
if (resolve6(
|
|
2599
|
+
if (resolve6(dirname7(link), await readlink(link)) === resolve6(depsDir)) {
|
|
3061
2600
|
return;
|
|
3062
2601
|
}
|
|
3063
2602
|
} catch {}
|
|
3064
2603
|
await rm2(link, { force: true });
|
|
3065
2604
|
}
|
|
3066
|
-
await mkdir2(
|
|
2605
|
+
await mkdir2(dirname7(link), { recursive: true });
|
|
3067
2606
|
await symlinkDir(depsDir, link);
|
|
3068
2607
|
};
|
|
3069
2608
|
var readPkgVersion = (pkgJsonPath) => {
|
|
@@ -3125,54 +2664,6 @@ var ensureDepsLink = async (outDir, pkgDir = packageRoot()) => {
|
|
|
3125
2664
|
}
|
|
3126
2665
|
return astroConflictWarning(blumeAstro, outDirHit?.pkg ?? null);
|
|
3127
2666
|
};
|
|
3128
|
-
var ISLAND_FRAMEWORK_DEPS = new Map([
|
|
3129
|
-
["svelte", "@astrojs/svelte"],
|
|
3130
|
-
["vue", "@astrojs/vue"]
|
|
3131
|
-
]);
|
|
3132
|
-
var DEPLOYMENT_ADAPTER_DEPS = new Map([
|
|
3133
|
-
["cloudflare", "@astrojs/cloudflare"],
|
|
3134
|
-
["netlify", "@astrojs/netlify"]
|
|
3135
|
-
]);
|
|
3136
|
-
var islandFrameworkWarnings = (frameworks, root) => {
|
|
3137
|
-
const warnings = [];
|
|
3138
|
-
for (const framework of frameworks) {
|
|
3139
|
-
const dep = ISLAND_FRAMEWORK_DEPS.get(framework);
|
|
3140
|
-
if (dep && !canResolveFrom(root, dep)) {
|
|
3141
|
-
warnings.push(`Islands use ${framework}, which needs "${dep}". Install it (e.g. \`npm install ${dep} ${framework}\`).`);
|
|
3142
|
-
}
|
|
3143
|
-
}
|
|
3144
|
-
return warnings;
|
|
3145
|
-
};
|
|
3146
|
-
var deploymentAdapterWarnings = (deployment, root, pkgDir = packageRoot()) => {
|
|
3147
|
-
const dep = deployment.output === "server" && deployment.adapter ? DEPLOYMENT_ADAPTER_DEPS.get(deployment.adapter) : undefined;
|
|
3148
|
-
if (dep && !(canResolveFrom(root, dep) || canResolveFrom(pkgDir, dep))) {
|
|
3149
|
-
return [
|
|
3150
|
-
`Deployment adapter "${deployment.adapter}" needs "${dep}", which isn't installed. Run \`npm install ${dep}\` (or your package manager's equivalent).`
|
|
3151
|
-
];
|
|
3152
|
-
}
|
|
3153
|
-
return [];
|
|
3154
|
-
};
|
|
3155
|
-
var searchProviderWarnings = (provider, root, pkgDir = packageRoot()) => {
|
|
3156
|
-
const warnings = [];
|
|
3157
|
-
for (const dep of searchProviderMeta(provider).runtimeDeps) {
|
|
3158
|
-
if (!(canResolveFrom(root, dep) || canResolveFrom(pkgDir, dep))) {
|
|
3159
|
-
warnings.push(`Search provider "${provider}" needs "${dep}", which isn't installed. Run \`npm install ${dep}\` (or your package manager's equivalent).`);
|
|
3160
|
-
}
|
|
3161
|
-
}
|
|
3162
|
-
return warnings;
|
|
3163
|
-
};
|
|
3164
|
-
var askProviderWarnings = (ask, root, pkgDir = packageRoot()) => {
|
|
3165
|
-
if (!ask?.enabled || ask.endpoint) {
|
|
3166
|
-
return [];
|
|
3167
|
-
}
|
|
3168
|
-
const dep = askBackendRuntimeDep(ask);
|
|
3169
|
-
if (!dep || canResolveFrom(root, dep) || canResolveFrom(pkgDir, dep)) {
|
|
3170
|
-
return [];
|
|
3171
|
-
}
|
|
3172
|
-
return [
|
|
3173
|
-
`Ask AI provider "${ask.provider}" needs "${dep}", which isn't installed. Run \`npm install ${dep}\` (or your package manager's equivalent).`
|
|
3174
|
-
];
|
|
3175
|
-
};
|
|
3176
2667
|
var examplesCssFile = (root, config) => config.examples.css ? join11(root, config.examples.css) : null;
|
|
3177
2668
|
var writeExamplesPreview = async (options) => {
|
|
3178
2669
|
const { config, hasExamples, root, srcDir, write } = options;
|
|
@@ -3189,7 +2680,7 @@ var readOptional = async (path) => {
|
|
|
3189
2680
|
return "";
|
|
3190
2681
|
}
|
|
3191
2682
|
try {
|
|
3192
|
-
return await
|
|
2683
|
+
return await readFile4(path, "utf-8");
|
|
3193
2684
|
} catch {
|
|
3194
2685
|
return "";
|
|
3195
2686
|
}
|
|
@@ -3199,7 +2690,7 @@ var readUserCss = async (file, outputDir) => {
|
|
|
3199
2690
|
return file ? rebaseSourceDirectives(css, { from: file, to: outputDir }) : css;
|
|
3200
2691
|
};
|
|
3201
2692
|
var detectNeedsReact = async (root) => {
|
|
3202
|
-
const matches = await
|
|
2693
|
+
const matches = await glob2(["**/*.{tsx,jsx}"], {
|
|
3203
2694
|
cwd: root,
|
|
3204
2695
|
ignore: ["**/node_modules/**", "**/.blume/**", "**/dist/**"],
|
|
3205
2696
|
onlyFiles: true
|
|
@@ -3207,15 +2698,15 @@ var detectNeedsReact = async (root) => {
|
|
|
3207
2698
|
return matches.length > 0;
|
|
3208
2699
|
};
|
|
3209
2700
|
var containsMath = (content) => content.includes("$$") || content.includes("<Math");
|
|
3210
|
-
var
|
|
2701
|
+
var READ_CONCURRENCY2 = 16;
|
|
3211
2702
|
var detectUsesMath = async (root, staged = []) => {
|
|
3212
|
-
const files = await
|
|
2703
|
+
const files = await glob2(["**/*.{md,mdx}"], {
|
|
3213
2704
|
cwd: root,
|
|
3214
2705
|
ignore: ["**/node_modules/**", "**/.blume/**", "**/dist/**"],
|
|
3215
2706
|
onlyFiles: true
|
|
3216
2707
|
});
|
|
3217
|
-
const contents = await
|
|
3218
|
-
concurrency:
|
|
2708
|
+
const contents = await pMap2(files, (file) => readOptional(join11(root, file)), {
|
|
2709
|
+
concurrency: READ_CONCURRENCY2
|
|
3219
2710
|
});
|
|
3220
2711
|
return [...contents, ...staged].some(containsMath);
|
|
3221
2712
|
};
|
|
@@ -3225,14 +2716,14 @@ var loadIntegrationBridge = async (config, context) => {
|
|
|
3225
2716
|
return;
|
|
3226
2717
|
}
|
|
3227
2718
|
return {
|
|
3228
|
-
configFile:
|
|
2719
|
+
configFile: relative5(context.outDir, context.configFile),
|
|
3229
2720
|
sourceHash: hashConfigSource(await readOptional(context.configFile))
|
|
3230
2721
|
};
|
|
3231
2722
|
};
|
|
3232
2723
|
var writeIfChanged = async (path, content) => {
|
|
3233
2724
|
let existing = null;
|
|
3234
2725
|
try {
|
|
3235
|
-
existing = await
|
|
2726
|
+
existing = await readFile4(path, "utf-8");
|
|
3236
2727
|
} catch {
|
|
3237
2728
|
existing = null;
|
|
3238
2729
|
}
|
|
@@ -3243,14 +2734,14 @@ var writeIfChanged = async (path, content) => {
|
|
|
3243
2734
|
return true;
|
|
3244
2735
|
};
|
|
3245
2736
|
var pruneOrphans = async (srcDir, written) => {
|
|
3246
|
-
const existing = await
|
|
2737
|
+
const existing = await glob2("**/*", {
|
|
3247
2738
|
absolute: true,
|
|
3248
2739
|
cwd: srcDir,
|
|
3249
2740
|
onlyFiles: true
|
|
3250
2741
|
});
|
|
3251
2742
|
const removals = [];
|
|
3252
2743
|
for (const path of existing) {
|
|
3253
|
-
const normalized =
|
|
2744
|
+
const normalized = normalize2(path);
|
|
3254
2745
|
if (!written.has(normalized)) {
|
|
3255
2746
|
removals.push(rm2(normalized, { force: true }));
|
|
3256
2747
|
}
|
|
@@ -3262,7 +2753,7 @@ var collectStaged = (project) => {
|
|
|
3262
2753
|
for (const page of project.graph.pages) {
|
|
3263
2754
|
if (page.collection === "staged" && page.entryId && page.body) {
|
|
3264
2755
|
const text = page.sourcePath ? rewriteRelativeImages({
|
|
3265
|
-
deployBase: project.config.deployment.base,
|
|
2756
|
+
deployBase: project.config.deployment.options.base,
|
|
3266
2757
|
projectRoot: project.context.root,
|
|
3267
2758
|
source: page.body.text,
|
|
3268
2759
|
sourcePath: page.sourcePath
|
|
@@ -3277,7 +2768,7 @@ var writeStagedContent = async (out, staged) => {
|
|
|
3277
2768
|
const written = new Set;
|
|
3278
2769
|
await Promise.all([...staged].map(async ([entryId, text]) => {
|
|
3279
2770
|
const path = join11(contentDir, entryId);
|
|
3280
|
-
written.add(
|
|
2771
|
+
written.add(normalize2(path));
|
|
3281
2772
|
await writeIfChanged(path, text);
|
|
3282
2773
|
}));
|
|
3283
2774
|
if (existsSync6(contentDir)) {
|
|
@@ -3434,7 +2925,7 @@ var resolveOgSite = (config) => {
|
|
|
3434
2925
|
if (configured !== undefined) {
|
|
3435
2926
|
return configured;
|
|
3436
2927
|
}
|
|
3437
|
-
return config.deployment.site ? `${new URL(config.deployment.site).host}${normalizeBasePath(config.deployment.base)}` : undefined;
|
|
2928
|
+
return config.deployment.options.site ? `${new URL(config.deployment.options.site).host}${normalizeBasePath(config.deployment.options.base)}` : undefined;
|
|
3438
2929
|
};
|
|
3439
2930
|
var resolveOgDescription = (config) => {
|
|
3440
2931
|
const configured = config.seo.og.description;
|
|
@@ -3460,9 +2951,9 @@ var buildRuntimeData = (project) => {
|
|
|
3460
2951
|
if (!(editBase && sourcePath)) {
|
|
3461
2952
|
return null;
|
|
3462
2953
|
}
|
|
3463
|
-
const rel =
|
|
2954
|
+
const rel = relative5(context.root, sourcePath).split("\\").join("/");
|
|
3464
2955
|
const editDir = trimChar(github?.dir ?? "", "/");
|
|
3465
|
-
const editPath =
|
|
2956
|
+
const editPath = normalize2(editDir ? join11(editDir, rel) : rel);
|
|
3466
2957
|
if (editPath.startsWith("..") || isAbsolute6(editPath)) {
|
|
3467
2958
|
return null;
|
|
3468
2959
|
}
|
|
@@ -3498,7 +2989,7 @@ var buildRuntimeData = (project) => {
|
|
|
3498
2989
|
])) : {};
|
|
3499
2990
|
const data = {
|
|
3500
2991
|
config: {
|
|
3501
|
-
analytics: config.analytics
|
|
2992
|
+
analytics: config.analytics,
|
|
3502
2993
|
appleIcon: resolveAppleIcon(project),
|
|
3503
2994
|
ask: config.ai.ask?.enabled ? {
|
|
3504
2995
|
endpoint: config.ai.ask.endpoint ?? null,
|
|
@@ -3506,15 +2997,16 @@ var buildRuntimeData = (project) => {
|
|
|
3506
2997
|
} : null,
|
|
3507
2998
|
banner: resolveBanner(config),
|
|
3508
2999
|
basePath: config.basePath,
|
|
3509
|
-
codeThemes: config.markdown.
|
|
3000
|
+
codeThemes: config.markdown.code.theme,
|
|
3510
3001
|
codeWrap: config.markdown.code.wrap,
|
|
3511
3002
|
dateFormat: config.dateFormat,
|
|
3512
3003
|
description: config.description,
|
|
3513
3004
|
discovery: {
|
|
3514
|
-
agentReadability: config.
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3005
|
+
agentReadability: config.agents.agentReadability,
|
|
3006
|
+
aiCatalog: hasAiCatalog(config),
|
|
3007
|
+
api: config.agents.api,
|
|
3008
|
+
llmsTxt: config.agents.llmsTxt.enabled,
|
|
3009
|
+
sitemap: config.seo.sitemap && Boolean(config.deployment.options.site)
|
|
3518
3010
|
},
|
|
3519
3011
|
favicon: resolveFavicon(project),
|
|
3520
3012
|
feedback: config.feedback,
|
|
@@ -3535,9 +3027,9 @@ var buildRuntimeData = (project) => {
|
|
|
3535
3027
|
} : null,
|
|
3536
3028
|
imageZoom: config.markdown.imageZoom,
|
|
3537
3029
|
logo,
|
|
3538
|
-
mcp: config.
|
|
3539
|
-
name: config.
|
|
3540
|
-
route: config.
|
|
3030
|
+
mcp: config.agents.mcp.enabled ? {
|
|
3031
|
+
name: config.agents.mcp.name ?? config.title,
|
|
3032
|
+
route: config.agents.mcp.route
|
|
3541
3033
|
} : null,
|
|
3542
3034
|
og: {
|
|
3543
3035
|
description: resolveOgDescription(config),
|
|
@@ -3549,19 +3041,19 @@ var buildRuntimeData = (project) => {
|
|
|
3549
3041
|
openInChat: config.ai.openInChat,
|
|
3550
3042
|
repoUrl: repoUrl2,
|
|
3551
3043
|
search: {
|
|
3552
|
-
enabled: config.search.provider !== "none",
|
|
3044
|
+
enabled: config.search.provider.mode !== "none",
|
|
3553
3045
|
popular: resolveSearchPopular(config.search.popular, config.basePath),
|
|
3554
|
-
provider: config.search.provider
|
|
3046
|
+
provider: config.search.provider.kind
|
|
3555
3047
|
},
|
|
3556
|
-
site: config.deployment.site ?? null,
|
|
3048
|
+
site: config.deployment.options.site ?? null,
|
|
3557
3049
|
structuredData: config.seo.structuredData,
|
|
3558
3050
|
theme: config.theme,
|
|
3559
3051
|
title: config.title,
|
|
3560
3052
|
toc: config.toc,
|
|
3561
3053
|
versions: config.versions ?? null,
|
|
3562
3054
|
webmcp: {
|
|
3563
|
-
enabled: config.
|
|
3564
|
-
llms: config.
|
|
3055
|
+
enabled: config.agents.webmcp,
|
|
3056
|
+
llms: config.agents.llmsTxt.enabled
|
|
3565
3057
|
},
|
|
3566
3058
|
x: config.seo.x
|
|
3567
3059
|
},
|
|
@@ -3592,6 +3084,7 @@ var buildRuntimeData = (project) => {
|
|
|
3592
3084
|
indexable: route.indexable,
|
|
3593
3085
|
lastModified: route.lastModified ?? null,
|
|
3594
3086
|
locale: route.locale,
|
|
3087
|
+
monolingual: route.monolingual ?? false,
|
|
3595
3088
|
path: route.path,
|
|
3596
3089
|
title: route.title,
|
|
3597
3090
|
version: route.version,
|
|
@@ -3605,7 +3098,7 @@ var buildRuntimeData = (project) => {
|
|
|
3605
3098
|
};
|
|
3606
3099
|
var planMcp = (project, srcDir, userPages) => {
|
|
3607
3100
|
const { config } = project;
|
|
3608
|
-
const { route } = config.
|
|
3101
|
+
const { route } = config.agents.mcp;
|
|
3609
3102
|
const dir = join11(srcDir, "blume-mcp");
|
|
3610
3103
|
const base = {
|
|
3611
3104
|
dir,
|
|
@@ -3615,14 +3108,14 @@ var planMcp = (project, srcDir, userPages) => {
|
|
|
3615
3108
|
srcDir,
|
|
3616
3109
|
warnings: []
|
|
3617
3110
|
};
|
|
3618
|
-
if (!config.
|
|
3111
|
+
if (!config.agents.mcp.enabled) {
|
|
3619
3112
|
return base;
|
|
3620
3113
|
}
|
|
3621
3114
|
if (routeIsTaken(userPages, project.graph.pages, route)) {
|
|
3622
3115
|
return {
|
|
3623
3116
|
...base,
|
|
3624
3117
|
warnings: [
|
|
3625
|
-
`MCP server route "${route}" is already used by a content or custom page; the MCP server was not generated. Set a different "
|
|
3118
|
+
`MCP server route "${route}" is already used by a content or custom page; the MCP server was not generated. Set a different "agents.mcp.route" in blume.config.ts.`
|
|
3626
3119
|
]
|
|
3627
3120
|
};
|
|
3628
3121
|
}
|
|
@@ -3670,10 +3163,10 @@ var ownsApiRest = (page) => page.pattern.startsWith("/api/[");
|
|
|
3670
3163
|
var contentUnderApi = (page) => page.route === "/api" || page.route.startsWith("/api/");
|
|
3671
3164
|
var planApi = (project, srcDir, userPages) => {
|
|
3672
3165
|
const { config, context } = project;
|
|
3673
|
-
const server = config.deployment.output === "server";
|
|
3166
|
+
const server = config.deployment.options.output === "server";
|
|
3674
3167
|
return {
|
|
3675
3168
|
catchAll: server && !userPages.some(ownsApiRest) && !project.graph.pages.some(contentUnderApi),
|
|
3676
|
-
enabled: config.
|
|
3169
|
+
enabled: config.agents.api,
|
|
3677
3170
|
server,
|
|
3678
3171
|
spec: !routeIsTaken(userPages, project.graph.pages, OPENAPI_PATH) && !existsSync6(join11(context.root, "public", "openapi.json")),
|
|
3679
3172
|
srcDir
|
|
@@ -3699,10 +3192,10 @@ var writeApiFiles = async (project, plan, write, data, mcp) => {
|
|
|
3699
3192
|
}
|
|
3700
3193
|
if (plan.spec) {
|
|
3701
3194
|
writes.push(write(join11(plan.srcDir, "pages", "openapi.json.ts"), staticJsonEndpointTemplate(buildApiSpec({
|
|
3702
|
-
agentReadability: config.
|
|
3195
|
+
agentReadability: config.agents.agentReadability,
|
|
3703
3196
|
base: data.base,
|
|
3704
3197
|
description: config.description,
|
|
3705
|
-
llmsTxt: config.
|
|
3198
|
+
llmsTxt: config.agents.llmsTxt.enabled,
|
|
3706
3199
|
mcpRoute,
|
|
3707
3200
|
name: config.title,
|
|
3708
3201
|
search: plan.server,
|
|
@@ -3738,13 +3231,13 @@ var specOriginsOf = (spec) => {
|
|
|
3738
3231
|
};
|
|
3739
3232
|
var specOrigins = (data) => [...new Set(Object.values(data).flatMap(specOriginsOf))].toSorted();
|
|
3740
3233
|
var proxyAllowlistWarnings = (config, data) => {
|
|
3741
|
-
const
|
|
3234
|
+
const proxied = new Set(builtinProxyReferences(config).map((reference) => reference.slug));
|
|
3742
3235
|
const warnings = [];
|
|
3743
3236
|
for (const spec of Object.values(data)) {
|
|
3744
|
-
if (!
|
|
3237
|
+
if (!proxied.has(spec.slug) || specOriginsOf(spec).length > 0) {
|
|
3745
3238
|
continue;
|
|
3746
3239
|
}
|
|
3747
|
-
warnings.push(spec.kind === "graphql" ? `The "${spec.label}" GraphQL reference (${spec.route}) has playground.proxy: true, but no absolute endpoint is configured for it, so the built-in proxy has no origin to allow and will refuse every request its playground sends. Set the graphql
|
|
3240
|
+
warnings.push(spec.kind === "graphql" ? `The "${spec.label}" GraphQL reference (${spec.route}) has playground.proxy: true, but no absolute endpoint is configured for it, so the built-in proxy has no origin to allow and will refuse every request its playground sends. Set \`endpoint\` on the graphql() adapter (or the source) to the live GraphQL URL, or point playground.proxy at an external proxy URL.` : `The "${spec.label}" reference (${spec.route}) has playground.proxy: true, but its spec declares no absolute servers[].url (relative and templated URLs carry no origin), so the built-in proxy has no origin to allow and will refuse every request its playground sends. Add an absolute server URL to the spec, or point playground.proxy at an external proxy URL.`);
|
|
3748
3241
|
}
|
|
3749
3242
|
return warnings;
|
|
3750
3243
|
};
|
|
@@ -3753,14 +3246,13 @@ var writeAskFiles = async (project, srcDir, write, modules) => {
|
|
|
3753
3246
|
if (!(ask?.enabled && !ask.endpoint)) {
|
|
3754
3247
|
return;
|
|
3755
3248
|
}
|
|
3756
|
-
const
|
|
3757
|
-
if (grounded) {
|
|
3249
|
+
const backend = resolveAskBackend(ask.provider);
|
|
3250
|
+
if (backend.grounded) {
|
|
3758
3251
|
modules.set("blume:ask-data", JSON.stringify(await buildAskData(project)));
|
|
3759
3252
|
}
|
|
3760
|
-
await write(join11(srcDir, "pages", "api", "ask.ts"), askEndpointTemplate(
|
|
3253
|
+
await write(join11(srcDir, "pages", "api", "ask.ts"), askEndpointTemplate(backend, {
|
|
3761
3254
|
cors: ask.cors,
|
|
3762
3255
|
instructions: ask.instructions,
|
|
3763
|
-
reasoning: ask.reasoning,
|
|
3764
3256
|
retrieval: ask.retrieval
|
|
3765
3257
|
}));
|
|
3766
3258
|
};
|
|
@@ -3775,14 +3267,18 @@ var writeNotFoundPage = async (write, srcDir, pages, contentPages) => {
|
|
|
3775
3267
|
]);
|
|
3776
3268
|
};
|
|
3777
3269
|
var diagnosticWarning = (diagnostic) => diagnostic.suggestion ? `${diagnostic.message} ${diagnostic.suggestion}` : diagnostic.message;
|
|
3778
|
-
var
|
|
3779
|
-
const
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3270
|
+
var dependencyPreflight = async (project, frameworks) => {
|
|
3271
|
+
const build = project.mode === "build";
|
|
3272
|
+
const diagnostic = await missingDependencyDiagnostic(project.config, project.context.root, build ? "error" : "warning", frameworks);
|
|
3273
|
+
if (!diagnostic) {
|
|
3274
|
+
return [];
|
|
3275
|
+
}
|
|
3276
|
+
if (build) {
|
|
3277
|
+
throw new BlumeError(diagnostic);
|
|
3278
|
+
}
|
|
3279
|
+
return [diagnosticWarning(diagnostic)];
|
|
3785
3280
|
};
|
|
3281
|
+
var analyzeComponentsFile = async (componentsFile) => componentsFile ? analyzeComponentOverrides(await readFile4(componentsFile, "utf-8"), componentsFile) : emptyComponentOverrides();
|
|
3786
3282
|
var projectOgFonts = (project) => resolveOgFonts({
|
|
3787
3283
|
ogFonts: project.config.seo.og.fonts,
|
|
3788
3284
|
themeFonts: project.config.theme.fonts,
|
|
@@ -3825,7 +3321,7 @@ var generateRuntime = async (project) => {
|
|
|
3825
3321
|
const examplesThemePath = join11(srcDir, "generated", "examples.css");
|
|
3826
3322
|
const written = new Set;
|
|
3827
3323
|
const write = (path, content) => {
|
|
3828
|
-
written.add(
|
|
3324
|
+
written.add(normalize2(path));
|
|
3829
3325
|
return writeIfChanged(path, content);
|
|
3830
3326
|
};
|
|
3831
3327
|
const modules = new Map;
|
|
@@ -3849,7 +3345,7 @@ var generateRuntime = async (project) => {
|
|
|
3849
3345
|
integrationBridge,
|
|
3850
3346
|
islandDiscovery,
|
|
3851
3347
|
exampleDiscovery,
|
|
3852
|
-
|
|
3348
|
+
overrideAnalysis
|
|
3853
3349
|
] = await Promise.all([
|
|
3854
3350
|
context.pagesRoot ? discoverPages(context.pagesRoot) : Promise.resolve([]),
|
|
3855
3351
|
detectNeedsReact(context.root),
|
|
@@ -3859,19 +3355,17 @@ var generateRuntime = async (project) => {
|
|
|
3859
3355
|
loadIntegrationBridge(config, context),
|
|
3860
3356
|
discoverIslands(context.root),
|
|
3861
3357
|
discoverExamples(context.root, config.examples.source),
|
|
3862
|
-
|
|
3358
|
+
analyzeComponentsFile(context.componentsFile)
|
|
3863
3359
|
]);
|
|
3864
|
-
const
|
|
3865
|
-
|
|
3866
|
-
tags: overrideTags,
|
|
3867
|
-
warnings: overrideWarnings
|
|
3868
|
-
} = componentSlots;
|
|
3360
|
+
const slotPlan = planComponentSlots(islandDiscovery.islands, overrideAnalysis);
|
|
3361
|
+
const overrideWarnings = overrideAnalysis.warnings;
|
|
3869
3362
|
project.examples = exampleMarkdownLookup(exampleDiscovery.examples);
|
|
3870
3363
|
const frameworks = new Set([
|
|
3871
3364
|
...islandDiscovery.islands.map((island) => island.framework),
|
|
3872
3365
|
...exampleDiscovery.examples.map((example) => example.framework),
|
|
3873
3366
|
...slotPlan.frameworks
|
|
3874
3367
|
]);
|
|
3368
|
+
const dependencyWarnings = await dependencyPreflight(project, frameworks);
|
|
3875
3369
|
const needsReact = detectedReact || askEnabled || frameworks.has("react");
|
|
3876
3370
|
const needsVue = frameworks.has("vue");
|
|
3877
3371
|
const needsSvelte = frameworks.has("svelte");
|
|
@@ -3894,7 +3388,7 @@ var generateRuntime = async (project) => {
|
|
|
3894
3388
|
const proxyOrigins = specOrigins(openApiData);
|
|
3895
3389
|
const hasStaged = staged.size > 0;
|
|
3896
3390
|
const hasFilesystemSource = project.sources.some((source) => !source.staged);
|
|
3897
|
-
const docsCollection = resolveDocsCollection(config, context);
|
|
3391
|
+
const docsCollection = resolveDocsCollection(config, context.root);
|
|
3898
3392
|
const [structural] = await Promise.all([
|
|
3899
3393
|
Promise.all([
|
|
3900
3394
|
write(join11(out, "astro.config.mjs"), astroConfigTemplate({
|
|
@@ -3936,7 +3430,6 @@ var generateRuntime = async (project) => {
|
|
|
3936
3430
|
writeNavFragments(write, srcDir, navFragments),
|
|
3937
3431
|
write(askPath, askComponentTemplate(askEnabled)),
|
|
3938
3432
|
write(join11(srcDir, "generated", "components.ts"), slotPlan.module),
|
|
3939
|
-
write(join11(srcDir, "generated", "islands.ts"), islandMapTemplate(islandDiscovery.islands)),
|
|
3940
3433
|
write(join11(srcDir, "generated", "examples.ts"), exampleMapTemplate(exampleDiscovery.examples, config.basePath)),
|
|
3941
3434
|
write(examplesThemePath, examplesEntryTemplate({
|
|
3942
3435
|
configTokens: buildThemeCss(config.theme),
|
|
@@ -3954,7 +3447,6 @@ var generateRuntime = async (project) => {
|
|
|
3954
3447
|
userTheme
|
|
3955
3448
|
}))
|
|
3956
3449
|
]),
|
|
3957
|
-
Promise.all(islandDiscovery.islands.map((island) => write(join11(srcDir, "generated", "islands", `${island.name}.astro`), islandWrapperTemplate(island)))),
|
|
3958
3450
|
Promise.all(slotPlan.wrappers.map((wrapper) => write(join11(srcDir, "generated", "component-slots", `${wrapper.name}.astro`), wrapper.content))),
|
|
3959
3451
|
Promise.all(exampleDiscovery.examples.map((example) => write(join11(srcDir, "generated", "examples", `${exampleSlug(example.path)}.astro`), exampleWrapperTemplate(example)))),
|
|
3960
3452
|
writeAskFiles(project, srcDir, write, modules),
|
|
@@ -3976,7 +3468,6 @@ var generateRuntime = async (project) => {
|
|
|
3976
3468
|
await write(join11(srcDir, "pages", "changelog.astro"), changelogIndexTemplate({
|
|
3977
3469
|
exportEpub,
|
|
3978
3470
|
exportPdf,
|
|
3979
|
-
mathEnabled: usesMath,
|
|
3980
3471
|
needsReact,
|
|
3981
3472
|
staged: hasStaged
|
|
3982
3473
|
}));
|
|
@@ -3993,13 +3484,14 @@ var generateRuntime = async (project) => {
|
|
|
3993
3484
|
write(searchClientPath, searchClientTemplate(config)),
|
|
3994
3485
|
write(featuresPath, featuresTemplate(clientFeatures))
|
|
3995
3486
|
]);
|
|
3996
|
-
|
|
3487
|
+
const searchAdapter = config.search.provider;
|
|
3488
|
+
if (searchAdapter.mode === "static") {
|
|
3997
3489
|
const documents = await buildSearchDocuments(project);
|
|
3998
3490
|
modules.set("blume:search-index", JSON.stringify(documents));
|
|
3999
3491
|
await write(join11(srcDir, "pages", "blume-search.json.ts"), searchEndpointTemplate());
|
|
4000
3492
|
}
|
|
4001
|
-
if (
|
|
4002
|
-
await write(join11(srcDir, "pages", "api", "search.ts"), mixedbreadSearchEndpointTemplate(
|
|
3493
|
+
if (searchAdapter.kind === "mixedbread") {
|
|
3494
|
+
await write(join11(srcDir, "pages", "api", "search.ts"), mixedbreadSearchEndpointTemplate(searchAdapter.options));
|
|
4003
3495
|
}
|
|
4004
3496
|
await write(join11(srcDir, "generated", "includes.json"), `${JSON.stringify(buildIncludeGraph(project.graph.pages))}
|
|
4005
3497
|
`);
|
|
@@ -4041,9 +3533,9 @@ var generateRuntime = async (project) => {
|
|
|
4041
3533
|
].map(diagnosticWarning));
|
|
4042
3534
|
const knownComponentTags = new Set([
|
|
4043
3535
|
...islandDiscovery.islands.map((island) => island.name),
|
|
4044
|
-
...
|
|
3536
|
+
...overrideAnalysis.mdx.map((entry) => entry.key)
|
|
4045
3537
|
]);
|
|
4046
|
-
warnings.push(...validateUsedComponents(project.graph.pages, knownComponentTags, new Set(registry.map((item) => item.name))).map(diagnosticWarning), ...
|
|
3538
|
+
warnings.push(...validateUsedComponents(project.graph.pages, knownComponentTags, new Set(registry.map((item) => item.name))).map(diagnosticWarning), ...dependencyWarnings);
|
|
4047
3539
|
if (hasScalarReferences(config)) {
|
|
4048
3540
|
const references = await buildReferenceFiles({
|
|
4049
3541
|
config,
|
|
@@ -4066,7 +3558,7 @@ var generateRuntime = async (project) => {
|
|
|
4066
3558
|
return { structuralChange: structural.some(Boolean), warnings };
|
|
4067
3559
|
};
|
|
4068
3560
|
|
|
4069
|
-
export {
|
|
3561
|
+
export { publishBuildProject, refreshBlumeContent, showBlumeErrorOverlay, ogCacheDir, pruneCardCache, cardCacheTally, buildAskData, buildThemeCss, buildReferenceFiles, tailwindEntryTemplate, examplesEntryTemplate, rebaseSourceDirectives, twoslashCss, EXAMPLE_SCAN_GLOB, exampleScanRoots, discoverExamples, exampleMarkdownLookup, packageDirFrom, detectNeedsReact, detectUsesMath, collectStaged, buildRuntimeData, analyzeComponentsFile, languageIconCssFor, clientFeaturesFor, generateRuntime };
|
|
4070
3562
|
|
|
4071
|
-
//# debugId=
|
|
4072
|
-
//# sourceMappingURL=chunk-
|
|
3563
|
+
//# debugId=8216F00B3292FE6F64756E2164756E21
|
|
3564
|
+
//# sourceMappingURL=chunk-z1f5arsg.js.map
|