blume 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +65 -0
- package/dist/cli/{chunk-6k4ftwze.js → chunk-1d7ve1dm.js} +1 -1
- package/dist/cli/{chunk-zp79m0ts.js → chunk-2eytanqx.js} +2 -2
- package/dist/cli/{chunk-8g8ytmgx.js → chunk-2hsdwb9n.js} +19 -19
- package/dist/cli/{chunk-8g8ytmgx.js.map → chunk-2hsdwb9n.js.map} +1 -1
- package/dist/cli/{chunk-g698a744.js → chunk-2z928egk.js} +5 -5
- package/dist/cli/{chunk-ppzjqwx2.js → chunk-35d4wj9f.js} +17 -18
- package/dist/cli/{chunk-ppzjqwx2.js.map → chunk-35d4wj9f.js.map} +3 -3
- package/dist/cli/{chunk-mqc662a6.js → chunk-364znk6q.js} +2 -2
- package/dist/cli/{chunk-gs7r695n.js → chunk-3em5wd2y.js} +21 -8
- package/dist/cli/{chunk-gs7r695n.js.map → chunk-3em5wd2y.js.map} +3 -3
- package/dist/cli/{chunk-k7pj68a8.js → chunk-5f86nr5m.js} +15 -15
- package/dist/cli/{chunk-hr8ne106.js → chunk-5m5nmvyq.js} +68 -43
- package/dist/cli/chunk-5m5nmvyq.js.map +13 -0
- package/dist/cli/{chunk-91ws1n6j.js → chunk-5xvm6tfj.js} +14 -14
- package/dist/cli/{chunk-w4bxdvsa.js → chunk-6dsbexzp.js} +14 -14
- package/dist/cli/{chunk-00gs3wqs.js → chunk-8ktnccpt.js} +1 -1
- package/dist/cli/{chunk-j85scx15.js → chunk-9t7a85s3.js} +130 -44
- package/dist/cli/chunk-9t7a85s3.js.map +10 -0
- package/dist/cli/{chunk-bbnwccaz.js → chunk-a58773jm.js} +2 -2
- package/dist/cli/{chunk-nfcyttvj.js → chunk-acanzt5p.js} +9 -9
- package/dist/cli/{chunk-nfcyttvj.js.map → chunk-acanzt5p.js.map} +1 -1
- package/dist/cli/{chunk-wdrt2k2v.js → chunk-akbpwfxc.js} +90 -26
- package/dist/cli/chunk-akbpwfxc.js.map +10 -0
- package/dist/cli/{chunk-sqw4ekg1.js → chunk-b07cmahc.js} +2 -2
- package/dist/cli/{chunk-xh43dwgw.js → chunk-c8chx29p.js} +42 -29
- package/dist/cli/{chunk-xh43dwgw.js.map → chunk-c8chx29p.js.map} +9 -9
- package/dist/cli/{chunk-7mbqtmgb.js → chunk-crgn1q09.js} +21 -12
- package/dist/cli/chunk-crgn1q09.js.map +10 -0
- package/dist/cli/chunk-e04dxsz1.js +39 -0
- package/dist/cli/chunk-e04dxsz1.js.map +10 -0
- package/dist/cli/{chunk-4e9b9ra6.js → chunk-ey84smr6.js} +3 -3
- package/dist/cli/{chunk-d1v5rhy0.js → chunk-g4hq16wv.js} +13 -13
- package/dist/cli/{chunk-273ygyr4.js → chunk-ga0pf4aj.js} +7 -7
- package/dist/cli/{chunk-273ygyr4.js.map → chunk-ga0pf4aj.js.map} +3 -3
- package/dist/cli/{chunk-pbg5a4s3.js → chunk-hm3vjy5s.js} +64 -45
- package/dist/cli/chunk-hm3vjy5s.js.map +19 -0
- package/dist/cli/{chunk-5r8g91qn.js → chunk-j85vccga.js} +306 -107
- package/dist/cli/chunk-j85vccga.js.map +36 -0
- package/dist/cli/{chunk-n1yg3tj3.js → chunk-p3v96n38.js} +6 -6
- package/dist/cli/{chunk-n1yg3tj3.js.map → chunk-p3v96n38.js.map} +3 -3
- package/dist/cli/{chunk-7vtckvaw.js → chunk-p73c0m7w.js} +14 -14
- package/dist/cli/{chunk-7vtckvaw.js.map → chunk-p73c0m7w.js.map} +1 -1
- package/dist/cli/{chunk-qkb5a8sa.js → chunk-pehfxfta.js} +3 -3
- package/dist/cli/{chunk-v6ya5kcb.js → chunk-pv29h0wf.js} +1223 -978
- package/dist/cli/{chunk-v6ya5kcb.js.map → chunk-pv29h0wf.js.map} +47 -46
- package/dist/cli/{chunk-6dtt0zfn.js → chunk-q58y5e6a.js} +10 -10
- package/dist/cli/{chunk-6dtt0zfn.js.map → chunk-q58y5e6a.js.map} +3 -3
- package/dist/cli/{chunk-fsmrqk8a.js → chunk-r20tn01b.js} +1 -1
- package/dist/cli/{chunk-bfwp9vp6.js → chunk-r9rcc4w7.js} +7 -7
- package/dist/cli/{chunk-h7k3nq3v.js → chunk-tkacnehg.js} +2 -2
- package/dist/cli/{chunk-h2ez8dzb.js → chunk-tzmab476.js} +4 -4
- package/dist/cli/{chunk-3yce002v.js → chunk-vg9r4eb9.js} +6 -6
- package/dist/cli/{chunk-3yce002v.js.map → chunk-vg9r4eb9.js.map} +4 -4
- package/dist/cli/{chunk-hqp2ajnh.js → chunk-wrr3j9w9.js} +16 -17
- package/dist/cli/{chunk-hqp2ajnh.js.map → chunk-wrr3j9w9.js.map} +7 -7
- package/dist/cli/{chunk-ddndchfr.js → chunk-yfyb25rh.js} +38 -26
- package/dist/cli/chunk-yfyb25rh.js.map +14 -0
- package/dist/cli/index.js +20 -18
- package/dist/cli/index.js.map +3 -3
- package/dist/types/ai/link-headers.d.ts +8 -1
- package/dist/types/ai/openapi-components.d.ts +5 -2
- package/dist/types/ai/relative-links.d.ts +9 -7
- package/dist/types/ai/skills.d.ts +4 -1
- package/dist/types/ai/tar.d.ts +1 -3
- package/dist/types/analytics/index.d.ts +2 -0
- package/dist/types/analytics/one-dollar-stats.d.ts +48 -0
- package/dist/types/analytics/schema.d.ts +14 -0
- package/dist/types/astro/integration.d.ts +3 -2
- package/dist/types/core/base-path.d.ts +21 -7
- package/dist/types/core/config-input.d.ts +9 -7
- package/dist/types/core/directive-diagnostics.d.ts +12 -0
- package/dist/types/core/heading-markers.d.ts +5 -7
- package/dist/types/core/i18n.d.ts +2 -0
- package/dist/types/core/last-modified.d.ts +10 -0
- package/dist/types/core/meta.d.ts +8 -0
- package/dist/types/core/schema.d.ts +7 -0
- package/dist/types/core/sources/lower.d.ts +29 -16
- package/dist/types/core/sources/normalize.d.ts +13 -1
- package/dist/types/core/sources/watch.d.ts +12 -5
- package/dist/types/core/standard-schema.d.ts +5 -0
- package/dist/types/deploy/artifacts.d.ts +6 -4
- package/dist/types/deploy/headers.d.ts +5 -0
- package/dist/types/deploy/platforms/types.d.ts +8 -0
- package/dist/types/deploy/redirects.d.ts +24 -13
- package/dist/types/markdown/directives.d.ts +62 -0
- package/dist/types/markdown/features.d.ts +21 -0
- package/dist/types/markdown/mdast.d.ts +63 -0
- package/dist/types/openapi/asyncapi.d.ts +4 -2
- package/docs/02-deployment.mdx +4 -2
- package/docs/08-faq.mdx +1 -1
- package/docs/advanced/custom-pages.mdx +3 -3
- package/docs/cli/audit.mdx +17 -1
- package/docs/cli/evals.mdx +3 -3
- package/docs/cli/translate.mdx +3 -3
- package/docs/cli/version.mdx +1 -1
- package/docs/configuration/analytics.mdx +20 -1
- package/docs/configuration/customization.mdx +2 -0
- package/docs/configuration/search.mdx +1 -1
- package/docs/content/components.mdx +1 -1
- package/docs/content/frontmatter.mdx +1 -1
- package/docs/content/i18n.mdx +2 -0
- package/docs/content/index.mdx +4 -2
- package/docs/content/islands.mdx +1 -1
- package/docs/content/meta.mdx +3 -1
- package/docs/content/sources.mdx +1 -5
- package/docs/content/syntax.mdx +14 -0
- package/docs/content/versioning.mdx +1 -1
- package/docs/discoverability/agent-discovery.mdx +1 -1
- package/docs/discoverability/index.mdx +2 -1
- package/docs/discoverability/markdown.mdx +2 -2
- package/docs/discoverability/open-graph.mdx +5 -3
- package/docs/discoverability/rss.mdx +1 -1
- package/docs/references/asyncapi.mdx +1 -1
- package/docs/references/graphql.mdx +1 -1
- package/docs/references/openapi.mdx +5 -3
- package/package.json +1 -1
- package/skills/blume-migrate/references/fumadocs.md +1 -1
- package/skills/blume-migrate/references/nextra.md +1 -1
- package/skills/blume-migrate/scripts/mintlify-codemod.mjs +7 -2
- package/src/ai/agent-readability.ts +2 -2
- package/src/ai/ai-catalog.ts +6 -2
- package/src/ai/api/handlers.ts +2 -2
- package/src/ai/api/spec.ts +2 -2
- package/src/ai/api-catalog.ts +6 -2
- package/src/ai/changelog-markdown.ts +2 -2
- package/src/ai/link-headers.ts +14 -5
- package/src/ai/llms.ts +18 -7
- package/src/ai/mcp/discovery.ts +2 -2
- package/src/ai/mcp/query.ts +2 -2
- package/src/ai/mcp/server.ts +2 -2
- package/src/ai/openapi-components.ts +22 -6
- package/src/ai/relative-links.ts +42 -26
- package/src/ai/serializers.ts +2 -1
- package/src/ai/skills.ts +14 -1
- package/src/ai/tar.ts +139 -12
- package/src/analytics/head.ts +4 -0
- package/src/analytics/index.ts +5 -0
- package/src/analytics/one-dollar-stats.ts +86 -0
- package/src/analytics/schema.ts +2 -0
- package/src/astro/generate.ts +1 -1
- package/src/astro/include-hmr.ts +31 -12
- package/src/astro/include-refresh.ts +19 -8
- package/src/astro/integration.ts +108 -14
- package/src/astro/runtime-modules.ts +28 -13
- package/src/astro/templates.ts +81 -37
- package/src/audit/checks/links.ts +8 -1
- package/src/audit/graph.ts +3 -1
- package/src/audit/run.ts +12 -9
- package/src/audit/snapshot.ts +5 -0
- package/src/cli/args.ts +32 -0
- package/src/cli/commands/audit.ts +4 -1
- package/src/cli/commands/doctor.ts +3 -1
- package/src/cli/commands/eval.ts +19 -11
- package/src/cli/commands/translate.ts +9 -12
- package/src/cli/commands/validate.ts +3 -1
- package/src/cli/dev-lock.ts +157 -37
- package/src/cli/report-format.ts +11 -6
- package/src/components/colors.ts +19 -0
- package/src/components/content/Badge.astro +5 -3
- package/src/components/content/Component.astro +2 -2
- package/src/components/content/Tab.astro +0 -1
- package/src/components/content/Tabs.astro +4 -0
- package/src/components/content/badge-color.ts +5 -2
- package/src/components/content/base-href.ts +13 -36
- package/src/components/islands/assistant.tsx +21 -4
- package/src/components/islands/base-path.ts +47 -10
- package/src/components/islands/hooks.ts +35 -19
- package/src/components/islands/webmcp.ts +4 -2
- package/src/components/layout/Breadcrumbs.astro +5 -2
- package/src/components/layout/DiscoveryLinks.astro +9 -5
- package/src/components/layout/Header.astro +2 -2
- package/src/components/layout/LanguageSwitcher.astro +2 -2
- package/src/components/layout/NavSelector.astro +2 -2
- package/src/components/layout/NavTabMenu.astro +3 -3
- package/src/components/layout/NavTree.astro +16 -6
- package/src/components/layout/PageActions.astro +4 -3
- package/src/components/layout/PageLayout.astro +7 -6
- package/src/components/layout/Pagination.astro +3 -3
- package/src/components/layout/RootLayout.astro +5 -5
- package/src/components/layout/Search.astro +33 -13
- package/src/components/layout/VersionBanner.astro +2 -2
- package/src/components/layout/analytics-client.ts +12 -0
- package/src/components/layout/toc-active.ts +41 -0
- package/src/components/layout/toc-element.ts +8 -14
- package/src/components/openapi/ApiTagOperations.astro +2 -2
- package/src/components/openapi/AsyncApiOperation.astro +7 -4
- package/src/components/openapi/GraphqlChip.astro +2 -2
- package/src/components/openapi/Operation.astro +2 -0
- package/src/components/openapi/Playground.astro +4 -4
- package/src/components/openapi/RequestPanel.astro +5 -2
- package/src/components/openapi/SchemaTable.astro +7 -0
- package/src/components/openapi/async.ts +38 -6
- package/src/components/openapi/helpers.ts +19 -9
- package/src/components/openapi/message-composer.ts +6 -1
- package/src/components/openapi/message.ts +17 -2
- package/src/components/openapi/operation-model.ts +81 -11
- package/src/components/openapi/panel.ts +4 -2
- package/src/components/openapi/param-style.ts +181 -0
- package/src/components/openapi/playground-client.ts +73 -16
- package/src/components/openapi/request.ts +190 -26
- package/src/components/openapi/schema-tree.ts +30 -24
- package/src/components/openapi/snippets.ts +85 -6
- package/src/components/openapi/ws-client.ts +18 -2
- package/src/core/base-path.ts +62 -16
- package/src/core/config-input.ts +9 -7
- package/src/core/diagnostics.ts +2 -0
- package/src/core/directive-diagnostics.ts +99 -0
- package/src/core/frontmatter.ts +21 -18
- package/src/core/heading-markers.ts +5 -18
- package/src/core/i18n.ts +31 -3
- package/src/core/last-modified.ts +25 -3
- package/src/core/locale-links.ts +5 -1
- package/src/core/meta.ts +33 -19
- package/src/core/navigation.ts +28 -8
- package/src/core/project-graph.ts +27 -5
- package/src/core/schema.ts +24 -4
- package/src/core/sources/contentful-rich-text.ts +27 -20
- package/src/core/sources/filesystem.ts +20 -2
- package/src/core/sources/github-releases.ts +25 -6
- package/src/core/sources/lexical.ts +23 -18
- package/src/core/sources/lower.ts +201 -34
- package/src/core/sources/mdx-remote.ts +51 -16
- package/src/core/sources/normalize.ts +325 -90
- package/src/core/sources/notion.ts +52 -25
- package/src/core/sources/obsidian.ts +23 -6
- package/src/core/sources/portable-text.ts +38 -21
- package/src/core/sources/strapi-blocks.ts +20 -16
- package/src/core/sources/watch.ts +20 -7
- package/src/core/standard-schema.ts +10 -6
- package/src/core/version-cut.ts +52 -15
- package/src/deploy/artifacts.ts +27 -6
- package/src/deploy/cloudflare-negotiation.ts +4 -12
- package/src/deploy/headers.ts +8 -4
- package/src/deploy/node-headers.ts +1 -1
- package/src/deploy/platforms/cloudflare.ts +12 -3
- package/src/deploy/platforms/netlify.ts +1 -0
- package/src/deploy/platforms/node.ts +1 -0
- package/src/deploy/platforms/static.ts +1 -0
- package/src/deploy/platforms/types.ts +8 -0
- package/src/deploy/platforms/vercel.ts +1 -0
- package/src/deploy/redirects.ts +54 -18
- package/src/deploy/robots.ts +2 -2
- package/src/deploy/rss.ts +4 -3
- package/src/deploy/sitemap.ts +7 -5
- package/src/markdown/base-links.ts +34 -36
- package/src/markdown/directives.ts +242 -36
- package/src/markdown/features.ts +17 -0
- package/src/markdown/index.ts +7 -6
- package/src/markdown/mdast.ts +5 -2
- package/src/markdown/relative-links.ts +12 -4
- package/src/og/card.ts +129 -5
- package/src/og/derive.ts +41 -31
- package/src/og/index.ts +1 -0
- package/src/openapi/asyncapi.ts +4 -2
- package/src/openapi/model.ts +22 -14
- package/src/openapi/proxy.ts +63 -10
- package/src/openapi/render-mdx.ts +41 -2
- package/src/registry/eject.ts +181 -24
- package/src/search/adapters/version-scope.ts +30 -0
- package/src/search/documents.ts +67 -26
- package/src/search/popular.ts +2 -1
- package/src/seo/jsonld.ts +7 -3
- package/src/translate/meta.ts +68 -24
- package/src/translate/run.ts +3 -3
- package/src/translate/validate.ts +4 -1
- package/src/translate/work-list.ts +56 -17
- package/dist/cli/chunk-5r8g91qn.js.map +0 -34
- package/dist/cli/chunk-7mbqtmgb.js.map +0 -10
- package/dist/cli/chunk-ddndchfr.js.map +0 -14
- package/dist/cli/chunk-esh98wmb.js +0 -23
- package/dist/cli/chunk-esh98wmb.js.map +0 -10
- package/dist/cli/chunk-hr8ne106.js.map +0 -13
- package/dist/cli/chunk-j85scx15.js.map +0 -10
- package/dist/cli/chunk-pbg5a4s3.js.map +0 -19
- package/dist/cli/chunk-wdrt2k2v.js.map +0 -10
- /package/dist/cli/{chunk-6k4ftwze.js.map → chunk-1d7ve1dm.js.map} +0 -0
- /package/dist/cli/{chunk-zp79m0ts.js.map → chunk-2eytanqx.js.map} +0 -0
- /package/dist/cli/{chunk-g698a744.js.map → chunk-2z928egk.js.map} +0 -0
- /package/dist/cli/{chunk-mqc662a6.js.map → chunk-364znk6q.js.map} +0 -0
- /package/dist/cli/{chunk-k7pj68a8.js.map → chunk-5f86nr5m.js.map} +0 -0
- /package/dist/cli/{chunk-91ws1n6j.js.map → chunk-5xvm6tfj.js.map} +0 -0
- /package/dist/cli/{chunk-w4bxdvsa.js.map → chunk-6dsbexzp.js.map} +0 -0
- /package/dist/cli/{chunk-00gs3wqs.js.map → chunk-8ktnccpt.js.map} +0 -0
- /package/dist/cli/{chunk-bbnwccaz.js.map → chunk-a58773jm.js.map} +0 -0
- /package/dist/cli/{chunk-sqw4ekg1.js.map → chunk-b07cmahc.js.map} +0 -0
- /package/dist/cli/{chunk-4e9b9ra6.js.map → chunk-ey84smr6.js.map} +0 -0
- /package/dist/cli/{chunk-d1v5rhy0.js.map → chunk-g4hq16wv.js.map} +0 -0
- /package/dist/cli/{chunk-qkb5a8sa.js.map → chunk-pehfxfta.js.map} +0 -0
- /package/dist/cli/{chunk-fsmrqk8a.js.map → chunk-r20tn01b.js.map} +0 -0
- /package/dist/cli/{chunk-bfwp9vp6.js.map → chunk-r9rcc4w7.js.map} +0 -0
- /package/dist/cli/{chunk-h7k3nq3v.js.map → chunk-tkacnehg.js.map} +0 -0
- /package/dist/cli/{chunk-h2ez8dzb.js.map → chunk-tzmab476.js.map} +0 -0
|
@@ -16,159 +16,12 @@ import {
|
|
|
16
16
|
withBasePath,
|
|
17
17
|
mountBasePath,
|
|
18
18
|
withComposedBasePath,
|
|
19
|
+
withAuthoredBasePath,
|
|
19
20
|
stripBasePath,
|
|
20
21
|
siteRoot,
|
|
21
22
|
absoluteUrl2,
|
|
22
23
|
MCP_TOOLS
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
|
|
25
|
-
// src/core/custom-pages.ts
|
|
26
|
-
import { extname, relative } from "pathe";
|
|
27
|
-
import { glob, globSync } from "tinyglobby";
|
|
28
|
-
var PAGE_GLOB = ["**/*.astro"];
|
|
29
|
-
var isPrivatePage = (rel) => rel.split("/").some((segment) => segment.startsWith("_"));
|
|
30
|
-
var toPageRoutes = (pagesRoot, files) => {
|
|
31
|
-
files.sort();
|
|
32
|
-
const routes = [];
|
|
33
|
-
for (const file of files) {
|
|
34
|
-
const rel = relative(pagesRoot, file);
|
|
35
|
-
if (isPrivatePage(rel)) {
|
|
36
|
-
continue;
|
|
37
|
-
}
|
|
38
|
-
const withoutExt = rel.slice(0, rel.length - extname(rel).length);
|
|
39
|
-
const parts = withoutExt.split("/");
|
|
40
|
-
if (parts.at(-1) === "index") {
|
|
41
|
-
parts.pop();
|
|
42
|
-
}
|
|
43
|
-
const pattern = parts.length === 0 ? "/" : `/${parts.join("/")}`;
|
|
44
|
-
routes.push({ entrypoint: file, pattern });
|
|
45
|
-
}
|
|
46
|
-
return routes;
|
|
47
|
-
};
|
|
48
|
-
var discoverPages = async (pagesRoot) => toPageRoutes(pagesRoot, await glob(PAGE_GLOB, { absolute: true, cwd: pagesRoot, onlyFiles: true }));
|
|
49
|
-
var discoverPagesSync = (pagesRoot) => toPageRoutes(pagesRoot, globSync(PAGE_GLOB, { absolute: true, cwd: pagesRoot, onlyFiles: true }));
|
|
50
|
-
var PRIVATE_SEGMENT = /^[._]/u;
|
|
51
|
-
var staticSegments = (pattern) => {
|
|
52
|
-
const segments = pattern.split("/").filter(Boolean);
|
|
53
|
-
return segments.some((part) => PRIVATE_SEGMENT.test(part) || part.includes("[")) ? null : segments;
|
|
54
|
-
};
|
|
55
|
-
var customStaticRoutes = (pages) => {
|
|
56
|
-
const routes = new Set;
|
|
57
|
-
for (const { pattern } of pages) {
|
|
58
|
-
const segments = staticSegments(pattern);
|
|
59
|
-
if (segments !== null) {
|
|
60
|
-
routes.add(segments.length === 0 ? "/" : `/${segments.join("/")}`);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
return [...routes];
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
// src/core/sources/collection.ts
|
|
67
|
-
import { isAbsolute, join, resolve } from "pathe";
|
|
68
|
-
|
|
69
|
-
// src/sources/filesystem.ts
|
|
70
|
-
import { z as z3 } from "zod";
|
|
71
|
-
|
|
72
|
-
// src/core/adapter.ts
|
|
73
|
-
import { z } from "zod";
|
|
74
|
-
var adapterDescriptorSchema = (kind, options) => z.strictObject({
|
|
75
|
-
kind: z.literal(kind),
|
|
76
|
-
options,
|
|
77
|
-
requiredSecrets: z.array(z.string()),
|
|
78
|
-
runtimeDeps: z.array(z.string())
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
// src/sources/shared.ts
|
|
82
|
-
import { z as z2 } from "zod";
|
|
83
|
-
var DEFAULT_CONTENT_GLOB = "**/*.{md,mdx}";
|
|
84
|
-
var sharedSourceOptionsSchema = z2.strictObject({
|
|
85
|
-
pollInterval: z2.number().positive().optional(),
|
|
86
|
-
prefix: z2.string().optional()
|
|
87
|
-
});
|
|
88
|
-
var sourceFieldMapSchema = z2.strictObject({
|
|
89
|
-
body: z2.string().optional(),
|
|
90
|
-
description: z2.string().optional(),
|
|
91
|
-
lastModified: z2.string().optional(),
|
|
92
|
-
slug: z2.string().optional(),
|
|
93
|
-
title: z2.string().optional()
|
|
94
|
-
});
|
|
95
|
-
var queryParamsSchema = z2.record(z2.string(), z2.string());
|
|
96
|
-
|
|
97
|
-
// src/sources/filesystem.ts
|
|
98
|
-
var DEFAULT_CONTENT_INCLUDE = [DEFAULT_CONTENT_GLOB];
|
|
99
|
-
var DEFAULT_CONTENT_EXCLUDE = ["**/_*", "**/.*"];
|
|
100
|
-
var filesystemOptionsSchema = sharedSourceOptionsSchema.extend({
|
|
101
|
-
exclude: z3.array(z3.string()).default(DEFAULT_CONTENT_EXCLUDE),
|
|
102
|
-
include: z3.array(z3.string()).default(DEFAULT_CONTENT_INCLUDE),
|
|
103
|
-
root: z3.string().default("docs")
|
|
104
|
-
});
|
|
105
|
-
var filesystemAdapterSchema = adapterDescriptorSchema("filesystem", filesystemOptionsSchema);
|
|
106
|
-
var filesystem = (options = {}) => ({
|
|
107
|
-
kind: "filesystem",
|
|
108
|
-
options,
|
|
109
|
-
requiredSecrets: [],
|
|
110
|
-
runtimeDeps: []
|
|
111
|
-
});
|
|
112
|
-
|
|
113
|
-
// src/core/sources/collection.ts
|
|
114
|
-
var resolveSourceRoot = (projectRoot, root) => isAbsolute(root) ? root : join(resolve(projectRoot), root);
|
|
115
|
-
var sourcesOfKind = (config, kind) => config.content.sources.filter((source) => source.kind === kind);
|
|
116
|
-
var resolveDocsCollection = (config, projectRoot) => {
|
|
117
|
-
const [first, ...rest] = sourcesOfKind(config, "filesystem");
|
|
118
|
-
if (!first) {
|
|
119
|
-
return {
|
|
120
|
-
base: resolveSourceRoot(projectRoot, "docs"),
|
|
121
|
-
exclude: DEFAULT_CONTENT_EXCLUDE,
|
|
122
|
-
include: DEFAULT_CONTENT_INCLUDE
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
const include = [
|
|
126
|
-
...new Set([first, ...rest].flatMap((source) => source.options.include))
|
|
127
|
-
];
|
|
128
|
-
const exclude = first.options.exclude.filter((pattern) => rest.every((source) => source.options.exclude.includes(pattern)));
|
|
129
|
-
return {
|
|
130
|
-
base: resolveSourceRoot(projectRoot, first.options.root),
|
|
131
|
-
exclude,
|
|
132
|
-
include
|
|
133
|
-
};
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
// src/core/changelog-index.ts
|
|
137
|
-
var CHANGELOG_INDEX_ROUTE = "/changelog";
|
|
138
|
-
var hasChangelogIndex = (pages, config) => pages.some((page) => page.contentType === "changelog" && !(page.meta.draft || page.meta.sidebar.hidden)) || sourcesOfKind(config, "github-releases").length > 0;
|
|
139
|
-
|
|
140
|
-
// src/astro/pages.ts
|
|
141
|
-
var routeIsTaken = (pages, contentPages, route) => pages.some((page) => page.pattern === route) || contentPages.some((page) => page.route === route);
|
|
142
|
-
var hasGeneratedChangelog = (project, userPages) => hasChangelogIndex(project.graph.pages, project.config) && !routeIsTaken(userPages, project.graph.pages, CHANGELOG_INDEX_ROUTE);
|
|
143
|
-
var humanizeSegment = (segment) => segment.split(/[-_]/u).filter(Boolean).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
144
|
-
var customOgRoutes = (pages, siteTitle, titles = {}) => {
|
|
145
|
-
const overrides = new Map(Object.entries(titles).map(([route, title]) => [
|
|
146
|
-
`/${route.split("/").filter(Boolean).join("/")}`,
|
|
147
|
-
title
|
|
148
|
-
]));
|
|
149
|
-
const seen = new Set;
|
|
150
|
-
const routes = [];
|
|
151
|
-
const collectRoute = (pattern) => {
|
|
152
|
-
const segments = staticSegments(pattern);
|
|
153
|
-
if (segments === null) {
|
|
154
|
-
return;
|
|
155
|
-
}
|
|
156
|
-
const slug = segments.length === 0 ? "index" : segments.join("/");
|
|
157
|
-
if (seen.has(slug)) {
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
160
|
-
seen.add(slug);
|
|
161
|
-
const last = segments.at(-1);
|
|
162
|
-
routes.push({
|
|
163
|
-
slug,
|
|
164
|
-
title: overrides.get(`/${segments.join("/")}`) ?? (last ? humanizeSegment(last) : siteTitle)
|
|
165
|
-
});
|
|
166
|
-
};
|
|
167
|
-
for (const { pattern } of pages) {
|
|
168
|
-
collectRoute(pattern);
|
|
169
|
-
}
|
|
170
|
-
return routes;
|
|
171
|
-
};
|
|
24
|
+
} from "./chunk-3em5wd2y.js";
|
|
172
25
|
|
|
173
26
|
// src/core/ui-packs/ar.ts
|
|
174
27
|
var ar = {
|
|
@@ -4346,6 +4199,12 @@ var localeTargetPath = (rel, ext, locale, i18n, folders = []) => {
|
|
|
4346
4199
|
const folder = folders.includes(locale) ? locale : folders.find((name) => name.toLowerCase() === locale.toLowerCase()) ?? locale;
|
|
4347
4200
|
return `${folder}/${rel}`;
|
|
4348
4201
|
};
|
|
4202
|
+
var defaultLocaleFolderDiagnostic = (folder, i18n) => ({
|
|
4203
|
+
code: "BLUME_I18N_DEFAULT_LOCALE_FOLDER",
|
|
4204
|
+
message: `Folder "${folder}/" is named after the default locale, but "${i18n.defaultLocale}" pages live at the content root — its pages publish at ${localizeRoute(`/${folder}`, i18n.defaultLocale, i18n)}/… instead.`,
|
|
4205
|
+
severity: "warning",
|
|
4206
|
+
suggestion: `Move the contents of "${folder}/" up to the content root; only the other locales get a folder.`
|
|
4207
|
+
});
|
|
4349
4208
|
var i18nDiagnostics = (pages, i18n, versions) => {
|
|
4350
4209
|
const configured = new Set(i18n.locales.map((locale) => locale.code.toLowerCase()));
|
|
4351
4210
|
const versionDirs = new Set(versions?.archived.map((version) => version.id));
|
|
@@ -4353,7 +4212,13 @@ var i18nDiagnostics = (pages, i18n, versions) => {
|
|
|
4353
4212
|
const diagnostics = [];
|
|
4354
4213
|
for (const page of pages) {
|
|
4355
4214
|
const parts = page.source.ref.split("/");
|
|
4356
|
-
const
|
|
4215
|
+
const folder = parts[0] && versionDirs.has(parts[0]) ? parts[1] : parts[0];
|
|
4216
|
+
const first = folder?.toLowerCase();
|
|
4217
|
+
if (folder !== undefined && first === i18n.defaultLocale.toLowerCase() && !seen.has(first)) {
|
|
4218
|
+
seen.add(first);
|
|
4219
|
+
diagnostics.push(defaultLocaleFolderDiagnostic(folder, i18n));
|
|
4220
|
+
continue;
|
|
4221
|
+
}
|
|
4357
4222
|
if (first && !seen.has(first) && KNOWN_LOCALES.has(first) && !configured.has(first)) {
|
|
4358
4223
|
seen.add(first);
|
|
4359
4224
|
diagnostics.push({
|
|
@@ -4367,6 +4232,154 @@ var i18nDiagnostics = (pages, i18n, versions) => {
|
|
|
4367
4232
|
return diagnostics;
|
|
4368
4233
|
};
|
|
4369
4234
|
|
|
4235
|
+
// src/core/custom-pages.ts
|
|
4236
|
+
import { extname, relative } from "pathe";
|
|
4237
|
+
import { glob, globSync } from "tinyglobby";
|
|
4238
|
+
var PAGE_GLOB = ["**/*.astro"];
|
|
4239
|
+
var isPrivatePage = (rel) => rel.split("/").some((segment) => segment.startsWith("_"));
|
|
4240
|
+
var toPageRoutes = (pagesRoot, files) => {
|
|
4241
|
+
files.sort();
|
|
4242
|
+
const routes = [];
|
|
4243
|
+
for (const file of files) {
|
|
4244
|
+
const rel = relative(pagesRoot, file);
|
|
4245
|
+
if (isPrivatePage(rel)) {
|
|
4246
|
+
continue;
|
|
4247
|
+
}
|
|
4248
|
+
const withoutExt = rel.slice(0, rel.length - extname(rel).length);
|
|
4249
|
+
const parts = withoutExt.split("/");
|
|
4250
|
+
if (parts.at(-1) === "index") {
|
|
4251
|
+
parts.pop();
|
|
4252
|
+
}
|
|
4253
|
+
const pattern = parts.length === 0 ? "/" : `/${parts.join("/")}`;
|
|
4254
|
+
routes.push({ entrypoint: file, pattern });
|
|
4255
|
+
}
|
|
4256
|
+
return routes;
|
|
4257
|
+
};
|
|
4258
|
+
var discoverPages = async (pagesRoot) => toPageRoutes(pagesRoot, await glob(PAGE_GLOB, { absolute: true, cwd: pagesRoot, onlyFiles: true }));
|
|
4259
|
+
var discoverPagesSync = (pagesRoot) => toPageRoutes(pagesRoot, globSync(PAGE_GLOB, { absolute: true, cwd: pagesRoot, onlyFiles: true }));
|
|
4260
|
+
var PRIVATE_SEGMENT = /^[._]/u;
|
|
4261
|
+
var staticSegments = (pattern) => {
|
|
4262
|
+
const segments = pattern.split("/").filter(Boolean);
|
|
4263
|
+
return segments.some((part) => PRIVATE_SEGMENT.test(part) || part.includes("[")) ? null : segments;
|
|
4264
|
+
};
|
|
4265
|
+
var customStaticRoutes = (pages) => {
|
|
4266
|
+
const routes = new Set;
|
|
4267
|
+
for (const { pattern } of pages) {
|
|
4268
|
+
const segments = staticSegments(pattern);
|
|
4269
|
+
if (segments !== null) {
|
|
4270
|
+
routes.add(segments.length === 0 ? "/" : `/${segments.join("/")}`);
|
|
4271
|
+
}
|
|
4272
|
+
}
|
|
4273
|
+
return [...routes];
|
|
4274
|
+
};
|
|
4275
|
+
|
|
4276
|
+
// src/core/sources/collection.ts
|
|
4277
|
+
import { isAbsolute, join, resolve } from "pathe";
|
|
4278
|
+
|
|
4279
|
+
// src/sources/filesystem.ts
|
|
4280
|
+
import { z as z3 } from "zod";
|
|
4281
|
+
|
|
4282
|
+
// src/core/adapter.ts
|
|
4283
|
+
import { z } from "zod";
|
|
4284
|
+
var adapterDescriptorSchema = (kind, options) => z.strictObject({
|
|
4285
|
+
kind: z.literal(kind),
|
|
4286
|
+
options,
|
|
4287
|
+
requiredSecrets: z.array(z.string()),
|
|
4288
|
+
runtimeDeps: z.array(z.string())
|
|
4289
|
+
});
|
|
4290
|
+
|
|
4291
|
+
// src/sources/shared.ts
|
|
4292
|
+
import { z as z2 } from "zod";
|
|
4293
|
+
var DEFAULT_CONTENT_GLOB = "**/*.{md,mdx}";
|
|
4294
|
+
var sharedSourceOptionsSchema = z2.strictObject({
|
|
4295
|
+
pollInterval: z2.number().positive().optional(),
|
|
4296
|
+
prefix: z2.string().optional()
|
|
4297
|
+
});
|
|
4298
|
+
var sourceFieldMapSchema = z2.strictObject({
|
|
4299
|
+
body: z2.string().optional(),
|
|
4300
|
+
description: z2.string().optional(),
|
|
4301
|
+
lastModified: z2.string().optional(),
|
|
4302
|
+
slug: z2.string().optional(),
|
|
4303
|
+
title: z2.string().optional()
|
|
4304
|
+
});
|
|
4305
|
+
var queryParamsSchema = z2.record(z2.string(), z2.string());
|
|
4306
|
+
|
|
4307
|
+
// src/sources/filesystem.ts
|
|
4308
|
+
var DEFAULT_CONTENT_INCLUDE = [DEFAULT_CONTENT_GLOB];
|
|
4309
|
+
var DEFAULT_CONTENT_EXCLUDE = ["**/_*", "**/.*"];
|
|
4310
|
+
var filesystemOptionsSchema = sharedSourceOptionsSchema.extend({
|
|
4311
|
+
exclude: z3.array(z3.string()).default(DEFAULT_CONTENT_EXCLUDE),
|
|
4312
|
+
include: z3.array(z3.string()).default(DEFAULT_CONTENT_INCLUDE),
|
|
4313
|
+
root: z3.string().default("docs")
|
|
4314
|
+
});
|
|
4315
|
+
var filesystemAdapterSchema = adapterDescriptorSchema("filesystem", filesystemOptionsSchema);
|
|
4316
|
+
var filesystem = (options = {}) => ({
|
|
4317
|
+
kind: "filesystem",
|
|
4318
|
+
options,
|
|
4319
|
+
requiredSecrets: [],
|
|
4320
|
+
runtimeDeps: []
|
|
4321
|
+
});
|
|
4322
|
+
|
|
4323
|
+
// src/core/sources/collection.ts
|
|
4324
|
+
var resolveSourceRoot = (projectRoot, root) => isAbsolute(root) ? root : join(resolve(projectRoot), root);
|
|
4325
|
+
var sourcesOfKind = (config, kind) => config.content.sources.filter((source) => source.kind === kind);
|
|
4326
|
+
var resolveDocsCollection = (config, projectRoot) => {
|
|
4327
|
+
const [first, ...rest] = sourcesOfKind(config, "filesystem");
|
|
4328
|
+
if (!first) {
|
|
4329
|
+
return {
|
|
4330
|
+
base: resolveSourceRoot(projectRoot, "docs"),
|
|
4331
|
+
exclude: DEFAULT_CONTENT_EXCLUDE,
|
|
4332
|
+
include: DEFAULT_CONTENT_INCLUDE
|
|
4333
|
+
};
|
|
4334
|
+
}
|
|
4335
|
+
const include = [
|
|
4336
|
+
...new Set([first, ...rest].flatMap((source) => source.options.include))
|
|
4337
|
+
];
|
|
4338
|
+
const exclude = first.options.exclude.filter((pattern) => rest.every((source) => source.options.exclude.includes(pattern)));
|
|
4339
|
+
return {
|
|
4340
|
+
base: resolveSourceRoot(projectRoot, first.options.root),
|
|
4341
|
+
exclude,
|
|
4342
|
+
include
|
|
4343
|
+
};
|
|
4344
|
+
};
|
|
4345
|
+
|
|
4346
|
+
// src/core/changelog-index.ts
|
|
4347
|
+
var CHANGELOG_INDEX_ROUTE = "/changelog";
|
|
4348
|
+
var hasChangelogIndex = (pages, config) => pages.some((page) => page.contentType === "changelog" && !(page.meta.draft || page.meta.sidebar.hidden)) || sourcesOfKind(config, "github-releases").length > 0;
|
|
4349
|
+
|
|
4350
|
+
// src/astro/pages.ts
|
|
4351
|
+
var routeIsTaken = (pages, contentPages, route) => pages.some((page) => page.pattern === route) || contentPages.some((page) => page.route === route);
|
|
4352
|
+
var hasGeneratedChangelog = (project, userPages) => hasChangelogIndex(project.graph.pages, project.config) && !routeIsTaken(userPages, project.graph.pages, CHANGELOG_INDEX_ROUTE);
|
|
4353
|
+
var humanizeSegment = (segment) => segment.split(/[-_]/u).filter(Boolean).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
4354
|
+
var customOgRoutes = (pages, siteTitle, titles = {}) => {
|
|
4355
|
+
const overrides = new Map(Object.entries(titles).map(([route, title]) => [
|
|
4356
|
+
`/${route.split("/").filter(Boolean).join("/")}`,
|
|
4357
|
+
title
|
|
4358
|
+
]));
|
|
4359
|
+
const seen = new Set;
|
|
4360
|
+
const routes = [];
|
|
4361
|
+
const collectRoute = (pattern) => {
|
|
4362
|
+
const segments = staticSegments(pattern);
|
|
4363
|
+
if (segments === null) {
|
|
4364
|
+
return;
|
|
4365
|
+
}
|
|
4366
|
+
const slug = segments.length === 0 ? "index" : segments.join("/");
|
|
4367
|
+
if (seen.has(slug)) {
|
|
4368
|
+
return;
|
|
4369
|
+
}
|
|
4370
|
+
seen.add(slug);
|
|
4371
|
+
const last = segments.at(-1);
|
|
4372
|
+
routes.push({
|
|
4373
|
+
slug,
|
|
4374
|
+
title: overrides.get(`/${segments.join("/")}`) ?? (last ? humanizeSegment(last) : siteTitle)
|
|
4375
|
+
});
|
|
4376
|
+
};
|
|
4377
|
+
for (const { pattern } of pages) {
|
|
4378
|
+
collectRoute(pattern);
|
|
4379
|
+
}
|
|
4380
|
+
return routes;
|
|
4381
|
+
};
|
|
4382
|
+
|
|
4370
4383
|
// src/core/links.ts
|
|
4371
4384
|
import { existsSync as existsSync2 } from "node:fs";
|
|
4372
4385
|
import { basename as basename2, dirname as dirname3, join as join4, normalize as normalize2, relative as relative4, resolve as resolve4 } from "pathe";
|
|
@@ -4486,6 +4499,26 @@ var loadWithCache = async (name, cache, fetchEntries, refresh = true) => {
|
|
|
4486
4499
|
import { existsSync, readFileSync } from "node:fs";
|
|
4487
4500
|
import GithubSlugger from "github-slugger";
|
|
4488
4501
|
import { extname as extname3 } from "pathe";
|
|
4502
|
+
import { markdownToMdast } from "satteri";
|
|
4503
|
+
|
|
4504
|
+
// src/markdown/features.ts
|
|
4505
|
+
var MARKDOWN_FEATURES = {
|
|
4506
|
+
subscript: true,
|
|
4507
|
+
superscript: true
|
|
4508
|
+
};
|
|
4509
|
+
var MDX_FEATURES = {
|
|
4510
|
+
...MARKDOWN_FEATURES,
|
|
4511
|
+
directive: true,
|
|
4512
|
+
math: { singleDollarTextMath: false }
|
|
4513
|
+
};
|
|
4514
|
+
var MARKDOWN_BODY_FEATURES = {
|
|
4515
|
+
...MARKDOWN_FEATURES,
|
|
4516
|
+
frontmatter: false
|
|
4517
|
+
};
|
|
4518
|
+
var MDX_BODY_FEATURES = {
|
|
4519
|
+
...MDX_FEATURES,
|
|
4520
|
+
frontmatter: false
|
|
4521
|
+
};
|
|
4489
4522
|
|
|
4490
4523
|
// src/core/heading-markers.ts
|
|
4491
4524
|
var TOC_HIDDEN_KEY = "__blumeTocHidden";
|
|
@@ -4493,16 +4526,12 @@ var occupySlug = (slugger, id) => {
|
|
|
4493
4526
|
slugger.occurrences[id] ??= 0;
|
|
4494
4527
|
};
|
|
4495
4528
|
var MARKER = /\s*(?:\{#(?<curlyId>[^\s}]+)\}|\[(?:#(?<id>[^\s\]]+)|(?<hide>!)?toc)\])\s*$/u;
|
|
4496
|
-
var parseHeadingMarkers = (text
|
|
4529
|
+
var parseHeadingMarkers = (text) => {
|
|
4497
4530
|
let remaining = text;
|
|
4498
4531
|
let id;
|
|
4499
4532
|
let toc;
|
|
4500
4533
|
for (let match = MARKER.exec(remaining);match?.groups; match = MARKER.exec(remaining)) {
|
|
4501
4534
|
const explicitId = match.groups.curlyId ?? match.groups.id;
|
|
4502
|
-
const label = explicitId === undefined ? `${match.groups.hide ?? ""}toc` : `#${explicitId}`;
|
|
4503
|
-
if (match.groups.curlyId === undefined && isRefDefined?.(label)) {
|
|
4504
|
-
break;
|
|
4505
|
-
}
|
|
4506
4535
|
remaining = remaining.slice(0, match.index);
|
|
4507
4536
|
if (explicitId === undefined) {
|
|
4508
4537
|
toc ??= match.groups.hide === undefined ? "only" : "hide";
|
|
@@ -4575,10 +4604,9 @@ var numericOrder = (segment) => {
|
|
|
4575
4604
|
const value = orderingPrefix(segment);
|
|
4576
4605
|
return value ? Math.trunc(Number(value)) : Number.POSITIVE_INFINITY;
|
|
4577
4606
|
};
|
|
4578
|
-
var
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
};
|
|
4607
|
+
var groupName = (raw) => (raw.match(GROUP_FOLDER) ?? stripOrderingPrefix(raw).match(GROUP_FOLDER))?.groups?.label;
|
|
4608
|
+
var folderOrder = (raw) => numericOrder(orderingPrefix(raw) === undefined ? groupName(raw) ?? raw : raw);
|
|
4609
|
+
var segmentKey = (raw) => stripOrderingPrefix(groupName(raw) ?? raw);
|
|
4582
4610
|
var isIndexStem = (stem) => stripOrderingPrefix(stem) === "index";
|
|
4583
4611
|
var stemOf = (filename) => filename.replace(extname2(filename), "");
|
|
4584
4612
|
var navStem = (navPath) => stemOf(navPath.split("/").at(-1) ?? navPath);
|
|
@@ -4597,7 +4625,7 @@ var ensureGroup = (parent, rawSegment) => {
|
|
|
4597
4625
|
return existing;
|
|
4598
4626
|
}
|
|
4599
4627
|
const path = parent.path ? `${parent.path}/${rawSegment}` : rawSegment;
|
|
4600
|
-
const group = createGroup(segmentKey(rawSegment), path, humanize(rawSegment
|
|
4628
|
+
const group = createGroup(segmentKey(rawSegment), path, humanize(groupName(rawSegment) ?? rawSegment), folderOrder(rawSegment));
|
|
4601
4629
|
parent.index.set(rawSegment, group);
|
|
4602
4630
|
parent.children.push(group);
|
|
4603
4631
|
return group;
|
|
@@ -4838,7 +4866,7 @@ var buildFileSystemSidebar = (pages, folderMeta, sharedMeta, metaPrefix, sharedM
|
|
|
4838
4866
|
}
|
|
4839
4867
|
const routeSegments = page.route.split("/").filter(Boolean);
|
|
4840
4868
|
const folderParts = isIndexStem(stem) ? routeSegments : routeSegments.slice(0, -1);
|
|
4841
|
-
const routeDirCount = dirs.filter((dir) =>
|
|
4869
|
+
const routeDirCount = dirs.filter((dir) => groupName(dir) === undefined).length;
|
|
4842
4870
|
const offset = Math.max(0, folderParts.length - routeDirCount);
|
|
4843
4871
|
const slugged = page.meta.slug !== undefined;
|
|
4844
4872
|
const leading = routeSegments.slice(0, Math.max(0, routeSegments.length - page.versionKey.split("/").filter(Boolean).length));
|
|
@@ -4847,7 +4875,7 @@ var buildFileSystemSidebar = (pages, folderMeta, sharedMeta, metaPrefix, sharedM
|
|
|
4847
4875
|
const folders = [];
|
|
4848
4876
|
for (const dir of dirs) {
|
|
4849
4877
|
parent = ensureGroup(parent, dir);
|
|
4850
|
-
if (
|
|
4878
|
+
if (groupName(dir) === undefined) {
|
|
4851
4879
|
consumed += 1;
|
|
4852
4880
|
folders.push(stripOrderingPrefix(dir));
|
|
4853
4881
|
}
|
|
@@ -5100,7 +5128,7 @@ var buildNavigation = (pages, options) => {
|
|
|
5100
5128
|
};
|
|
5101
5129
|
|
|
5102
5130
|
// src/core/schema.ts
|
|
5103
|
-
import { z as
|
|
5131
|
+
import { z as z54 } from "zod";
|
|
5104
5132
|
|
|
5105
5133
|
// src/ai/ask.ts
|
|
5106
5134
|
import { z as z4 } from "zod";
|
|
@@ -5338,7 +5366,7 @@ var resolveAskBackend = (provider = assistantAdapterSchema.parse(DEFAULT_ASSISTA
|
|
|
5338
5366
|
};
|
|
5339
5367
|
|
|
5340
5368
|
// src/analytics/schema.ts
|
|
5341
|
-
import { z as
|
|
5369
|
+
import { z as z26 } from "zod";
|
|
5342
5370
|
|
|
5343
5371
|
// src/analytics/adobe.ts
|
|
5344
5372
|
import { z as z5 } from "zod";
|
|
@@ -5448,61 +5476,70 @@ var mixpanelOptionsSchema = z18.object({
|
|
|
5448
5476
|
}).catchall(z18.json());
|
|
5449
5477
|
var mixpanelAdapterSchema = adapterDescriptorSchema("mixpanel", mixpanelOptionsSchema);
|
|
5450
5478
|
|
|
5451
|
-
// src/analytics/
|
|
5479
|
+
// src/analytics/one-dollar-stats.ts
|
|
5452
5480
|
import { z as z19 } from "zod";
|
|
5453
|
-
var
|
|
5454
|
-
|
|
5481
|
+
var oneDollarStatsOptionsSchema = z19.object({
|
|
5482
|
+
hostname: z19.string().regex(/^[\p{L}\p{N}-]+(?:\.[\p{L}\p{N}-]+)*(?::\d+)?$/u, {
|
|
5483
|
+
message: "`hostname` must be a bare host name like `docs.example.com`, without `https://`, a path, a query, or a fragment."
|
|
5484
|
+
}).optional()
|
|
5455
5485
|
}).catchall(z19.string());
|
|
5456
|
-
var
|
|
5486
|
+
var oneDollarStatsAdapterSchema = adapterDescriptorSchema("one-dollar-stats", oneDollarStatsOptionsSchema);
|
|
5457
5487
|
|
|
5458
|
-
// src/analytics/
|
|
5488
|
+
// src/analytics/pirsch.ts
|
|
5459
5489
|
import { z as z20 } from "zod";
|
|
5460
|
-
var
|
|
5461
|
-
|
|
5462
|
-
host: z20.string().min(1).optional()
|
|
5490
|
+
var pirschOptionsSchema = z20.object({
|
|
5491
|
+
code: z20.string().min(1)
|
|
5463
5492
|
}).catchall(z20.string());
|
|
5493
|
+
var pirschAdapterSchema = adapterDescriptorSchema("pirsch", pirschOptionsSchema);
|
|
5494
|
+
|
|
5495
|
+
// src/analytics/plausible.ts
|
|
5496
|
+
import { z as z21 } from "zod";
|
|
5497
|
+
var plausibleOptionsSchema = z21.object({
|
|
5498
|
+
domain: z21.string().min(1),
|
|
5499
|
+
host: z21.string().min(1).optional()
|
|
5500
|
+
}).catchall(z21.string());
|
|
5464
5501
|
var plausibleAdapterSchema = adapterDescriptorSchema("plausible", plausibleOptionsSchema);
|
|
5465
5502
|
|
|
5466
5503
|
// src/analytics/posthog.ts
|
|
5467
|
-
import { z as
|
|
5468
|
-
var posthogOptionsSchema =
|
|
5469
|
-
host:
|
|
5470
|
-
key:
|
|
5471
|
-
}).catchall(
|
|
5504
|
+
import { z as z22 } from "zod";
|
|
5505
|
+
var posthogOptionsSchema = z22.object({
|
|
5506
|
+
host: z22.string().optional(),
|
|
5507
|
+
key: z22.string().min(1)
|
|
5508
|
+
}).catchall(z22.json());
|
|
5472
5509
|
var posthogAdapterSchema = adapterDescriptorSchema("posthog", posthogOptionsSchema);
|
|
5473
5510
|
var POSTHOG_SPA_PAGEVIEWS = spaPageviews("__blumePosthogPath", 'posthog.capture("$pageview");');
|
|
5474
5511
|
|
|
5475
5512
|
// src/analytics/script.ts
|
|
5476
|
-
import { z as
|
|
5477
|
-
var scriptOptionsSchema =
|
|
5478
|
-
attributes:
|
|
5479
|
-
content:
|
|
5480
|
-
src:
|
|
5481
|
-
strategy:
|
|
5513
|
+
import { z as z23 } from "zod";
|
|
5514
|
+
var scriptOptionsSchema = z23.strictObject({
|
|
5515
|
+
attributes: z23.record(z23.string(), z23.string()).optional(),
|
|
5516
|
+
content: z23.string().optional(),
|
|
5517
|
+
src: z23.string().optional(),
|
|
5518
|
+
strategy: z23.enum(["async", "defer"]).optional()
|
|
5482
5519
|
}).refine((value) => Boolean(value.src) !== Boolean(value.content), {
|
|
5483
5520
|
message: "An analytics script must set exactly one of `src` or `content`."
|
|
5484
5521
|
});
|
|
5485
5522
|
var scriptAdapterSchema = adapterDescriptorSchema("script", scriptOptionsSchema);
|
|
5486
5523
|
|
|
5487
5524
|
// src/analytics/segment.ts
|
|
5488
|
-
import { z as
|
|
5489
|
-
var segmentOptionsSchema =
|
|
5490
|
-
cdn:
|
|
5491
|
-
key:
|
|
5492
|
-
}).catchall(
|
|
5525
|
+
import { z as z24 } from "zod";
|
|
5526
|
+
var segmentOptionsSchema = z24.object({
|
|
5527
|
+
cdn: z24.string().min(1).optional(),
|
|
5528
|
+
key: z24.string().min(1)
|
|
5529
|
+
}).catchall(z24.json());
|
|
5493
5530
|
var segmentAdapterSchema = adapterDescriptorSchema("segment", segmentOptionsSchema);
|
|
5494
5531
|
var SEGMENT_SPA_PAGEVIEWS = spaPageviews("__blumeSegmentPath", "analytics.page();");
|
|
5495
5532
|
|
|
5496
5533
|
// src/analytics/vercel.ts
|
|
5497
|
-
import { z as
|
|
5498
|
-
var vercelOptionsSchema =
|
|
5499
|
-
debug:
|
|
5500
|
-
mode:
|
|
5501
|
-
}).catchall(
|
|
5534
|
+
import { z as z25 } from "zod";
|
|
5535
|
+
var vercelOptionsSchema = z25.object({
|
|
5536
|
+
debug: z25.boolean().optional(),
|
|
5537
|
+
mode: z25.enum(["auto", "development", "production"]).optional()
|
|
5538
|
+
}).catchall(z25.json());
|
|
5502
5539
|
var vercelAdapterSchema = adapterDescriptorSchema("vercel", vercelOptionsSchema);
|
|
5503
5540
|
|
|
5504
5541
|
// src/analytics/schema.ts
|
|
5505
|
-
var analyticsAdapterSchema =
|
|
5542
|
+
var analyticsAdapterSchema = z26.discriminatedUnion("kind", [
|
|
5506
5543
|
adobeAdapterSchema,
|
|
5507
5544
|
amplitudeAdapterSchema,
|
|
5508
5545
|
clarityAdapterSchema,
|
|
@@ -5517,6 +5554,7 @@ var analyticsAdapterSchema = z25.discriminatedUnion("kind", [
|
|
|
5517
5554
|
hotjarAdapterSchema,
|
|
5518
5555
|
logrocketAdapterSchema,
|
|
5519
5556
|
mixpanelAdapterSchema,
|
|
5557
|
+
oneDollarStatsAdapterSchema,
|
|
5520
5558
|
pirschAdapterSchema,
|
|
5521
5559
|
plausibleAdapterSchema,
|
|
5522
5560
|
posthogAdapterSchema,
|
|
@@ -5525,24 +5563,24 @@ var analyticsAdapterSchema = z25.discriminatedUnion("kind", [
|
|
|
5525
5563
|
vercelAdapterSchema
|
|
5526
5564
|
]);
|
|
5527
5565
|
var ARRAY_HINT = 'analytics is a list of adapters — e.g. `analytics: [posthog({ key }), vercel(), plausible({ domain }), script({ src })]`, imported from "blume/analytics".';
|
|
5528
|
-
var analyticsConfigSchema =
|
|
5566
|
+
var analyticsConfigSchema = z26.array(analyticsAdapterSchema, {
|
|
5529
5567
|
error: (issue) => issue.code === "invalid_type" ? ARRAY_HINT : undefined
|
|
5530
5568
|
}).default([]);
|
|
5531
5569
|
|
|
5532
5570
|
// src/deploy/adapters/registry.ts
|
|
5533
|
-
import { z as
|
|
5571
|
+
import { z as z28 } from "zod";
|
|
5534
5572
|
|
|
5535
5573
|
// src/deploy/adapters/types.ts
|
|
5536
|
-
import { z as
|
|
5537
|
-
var siteUrlSchema =
|
|
5574
|
+
import { z as z27 } from "zod";
|
|
5575
|
+
var siteUrlSchema = z27.url({
|
|
5538
5576
|
error: 'Use an absolute http(s) URL with a host, like "https://docs.example.com" or "http://localhost:4321".',
|
|
5539
5577
|
protocol: /^https?$/u
|
|
5540
5578
|
});
|
|
5541
|
-
var deployOptionsSchema =
|
|
5542
|
-
base:
|
|
5543
|
-
output:
|
|
5579
|
+
var deployOptionsSchema = z27.object({
|
|
5580
|
+
base: z27.string().optional(),
|
|
5581
|
+
output: z27.enum(["static", "server"]).optional(),
|
|
5544
5582
|
site: siteUrlSchema.optional()
|
|
5545
|
-
}).catchall(
|
|
5583
|
+
}).catchall(z27.json());
|
|
5546
5584
|
var NAMED_OPTIONS = new Set(["base", "output", "site"]);
|
|
5547
5585
|
var deployPassthrough = (options) => Object.fromEntries(Object.entries(options).filter(([key]) => !NAMED_OPTIONS.has(key)));
|
|
5548
5586
|
var serverRuntimeDeps = (options, adapterPackage) => options.output === "static" ? [] : [adapterPackage];
|
|
@@ -5593,14 +5631,14 @@ var vercel = (options = {}) => ({
|
|
|
5593
5631
|
|
|
5594
5632
|
// src/deploy/adapters/registry.ts
|
|
5595
5633
|
var HINT = 'deployment takes a host adapter from "blume/deploy" — e.g. `deployment: vercel()`, `netlify({ output: "static" })`, `node({ site })` — or `{ site, base }` for a static build on any host. The 1.x `adapter`/`output` fields were removed.';
|
|
5596
|
-
var staticDeploymentSchema =
|
|
5597
|
-
base:
|
|
5598
|
-
kind:
|
|
5634
|
+
var staticDeploymentSchema = z28.strictObject({
|
|
5635
|
+
base: z28.string().optional(),
|
|
5636
|
+
kind: z28.literal("static").optional(),
|
|
5599
5637
|
site: siteUrlSchema.optional()
|
|
5600
5638
|
}, {
|
|
5601
5639
|
error: (issue) => issue.code === "unrecognized_keys" ? HINT : undefined
|
|
5602
5640
|
});
|
|
5603
|
-
var deploymentInputSchema =
|
|
5641
|
+
var deploymentInputSchema = z28.discriminatedUnion("kind", [
|
|
5604
5642
|
cloudflareAdapterSchema2,
|
|
5605
5643
|
netlifyAdapterSchema,
|
|
5606
5644
|
nodeAdapterSchema,
|
|
@@ -5764,31 +5802,31 @@ var builtinProxyReferences = (config) => blumeReferences(config).filter((ref) =>
|
|
|
5764
5802
|
var needsPlaygroundProxy = (config) => builtinProxyReferences(config).length > 0;
|
|
5765
5803
|
|
|
5766
5804
|
// src/reference/schema.ts
|
|
5767
|
-
import { z as
|
|
5805
|
+
import { z as z34 } from "zod";
|
|
5768
5806
|
|
|
5769
5807
|
// src/reference/asyncapi.ts
|
|
5770
|
-
import { z as
|
|
5808
|
+
import { z as z30 } from "zod";
|
|
5771
5809
|
|
|
5772
5810
|
// src/reference/options.ts
|
|
5773
|
-
import { z as
|
|
5811
|
+
import { z as z29 } from "zod";
|
|
5774
5812
|
var isBoolean = (value) => typeof value === "boolean";
|
|
5775
|
-
var referenceSourceSchema =
|
|
5776
|
-
includeInLlms:
|
|
5777
|
-
includeInSearch:
|
|
5778
|
-
label:
|
|
5779
|
-
noindex:
|
|
5780
|
-
route:
|
|
5781
|
-
seoDescriptionSuffix:
|
|
5782
|
-
spec:
|
|
5813
|
+
var referenceSourceSchema = z29.strictObject({
|
|
5814
|
+
includeInLlms: z29.boolean().default(true),
|
|
5815
|
+
includeInSearch: z29.boolean().default(true),
|
|
5816
|
+
label: z29.string().optional(),
|
|
5817
|
+
noindex: z29.boolean().default(false),
|
|
5818
|
+
route: z29.string().optional(),
|
|
5819
|
+
seoDescriptionSuffix: z29.boolean().default(true),
|
|
5820
|
+
spec: z29.string()
|
|
5783
5821
|
});
|
|
5784
5822
|
var graphqlSourceSchema = referenceSourceSchema.extend({
|
|
5785
|
-
endpoint:
|
|
5823
|
+
endpoint: z29.string().optional()
|
|
5786
5824
|
});
|
|
5787
|
-
var playgroundSchema =
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
enabled:
|
|
5791
|
-
proxy:
|
|
5825
|
+
var playgroundSchema = z29.union([
|
|
5826
|
+
z29.boolean(),
|
|
5827
|
+
z29.strictObject({
|
|
5828
|
+
enabled: z29.boolean().default(true),
|
|
5829
|
+
proxy: z29.union([z29.boolean(), z29.string()]).default(false)
|
|
5792
5830
|
})
|
|
5793
5831
|
]).default(true).transform((value) => isBoolean(value) ? { enabled: value, proxy: false } : value);
|
|
5794
5832
|
var RENDERER_REMOVED_HINT = '`renderer` was removed: the Scalar embed is its own adapter. Replace `openapi({ spec, renderer: "scalar", theme })` with a separate `scalar({ spec, theme })` entry in `reference`, imported from "blume/reference" — `route`, `sources`, `label`, and `noindex` carry over, and the native display options (`codeSamples`, `expandSchemas`, `playground`) don\'t apply to the embed.';
|
|
@@ -5802,10 +5840,10 @@ var rendererRemovedHint = {
|
|
|
5802
5840
|
}
|
|
5803
5841
|
};
|
|
5804
5842
|
var sharedOptions2 = (defaults) => ({
|
|
5805
|
-
codeSamples:
|
|
5843
|
+
codeSamples: z29.array(z29.string()).default(defaults.codeSamples),
|
|
5806
5844
|
playground: playgroundSchema,
|
|
5807
|
-
route:
|
|
5808
|
-
spec:
|
|
5845
|
+
route: z29.string().default(defaults.route),
|
|
5846
|
+
spec: z29.string().optional()
|
|
5809
5847
|
});
|
|
5810
5848
|
var liftSpec = (sourceSchema) => ({
|
|
5811
5849
|
spec,
|
|
@@ -5821,59 +5859,59 @@ var missingSourcesIssue = (factory) => ({
|
|
|
5821
5859
|
});
|
|
5822
5860
|
|
|
5823
5861
|
// src/reference/asyncapi.ts
|
|
5824
|
-
var asyncapiOptionsSchema =
|
|
5862
|
+
var asyncapiOptionsSchema = z30.strictObject({
|
|
5825
5863
|
...sharedOptions2({ codeSamples: [], route: "/events" }),
|
|
5826
|
-
expandSchemas:
|
|
5827
|
-
sources:
|
|
5864
|
+
expandSchemas: z30.boolean().default(false),
|
|
5865
|
+
sources: z30.array(referenceSourceSchema).default([])
|
|
5828
5866
|
}, rendererRemovedHint).transform(liftSpec(referenceSourceSchema)).refine(hasSources, missingSourcesIssue("asyncapi"));
|
|
5829
5867
|
var asyncapiAdapterSchema = adapterDescriptorSchema("asyncapi", asyncapiOptionsSchema);
|
|
5830
5868
|
|
|
5831
5869
|
// src/reference/graphql.ts
|
|
5832
|
-
import { z as
|
|
5833
|
-
var graphqlOptionsSchema =
|
|
5870
|
+
import { z as z31 } from "zod";
|
|
5871
|
+
var graphqlOptionsSchema = z31.strictObject({
|
|
5834
5872
|
...sharedOptions2({
|
|
5835
5873
|
codeSamples: ["curl", "js", "python"],
|
|
5836
5874
|
route: "/graphql"
|
|
5837
5875
|
}),
|
|
5838
|
-
endpoint:
|
|
5839
|
-
sources:
|
|
5876
|
+
endpoint: z31.string().optional(),
|
|
5877
|
+
sources: z31.array(graphqlSourceSchema).default([])
|
|
5840
5878
|
}).transform(liftSpec(graphqlSourceSchema)).refine(hasSources, missingSourcesIssue("graphql"));
|
|
5841
5879
|
var graphqlAdapterSchema = adapterDescriptorSchema("graphql", graphqlOptionsSchema);
|
|
5842
5880
|
|
|
5843
5881
|
// src/reference/openapi.ts
|
|
5844
|
-
import { z as
|
|
5845
|
-
var openapiOptionsSchema =
|
|
5882
|
+
import { z as z32 } from "zod";
|
|
5883
|
+
var openapiOptionsSchema = z32.strictObject({
|
|
5846
5884
|
...sharedOptions2({
|
|
5847
5885
|
codeSamples: ["curl", "js", "python"],
|
|
5848
5886
|
route: "/reference"
|
|
5849
5887
|
}),
|
|
5850
|
-
expandSchemas:
|
|
5851
|
-
sources:
|
|
5888
|
+
expandSchemas: z32.boolean().default(false),
|
|
5889
|
+
sources: z32.array(referenceSourceSchema).default([])
|
|
5852
5890
|
}, rendererRemovedHint).transform(liftSpec(referenceSourceSchema)).refine(hasSources, missingSourcesIssue("openapi"));
|
|
5853
5891
|
var openapiAdapterSchema = adapterDescriptorSchema("openapi", openapiOptionsSchema);
|
|
5854
5892
|
|
|
5855
5893
|
// src/reference/scalar.ts
|
|
5856
|
-
import { z as
|
|
5894
|
+
import { z as z33 } from "zod";
|
|
5857
5895
|
var SCALAR_RUNTIME_DEPS = ["@scalar/astro"];
|
|
5858
|
-
var scalarSourceSchema =
|
|
5859
|
-
label:
|
|
5860
|
-
noindex:
|
|
5861
|
-
route:
|
|
5862
|
-
spec:
|
|
5863
|
-
});
|
|
5864
|
-
var scalarOptionsSchema =
|
|
5865
|
-
route:
|
|
5866
|
-
sources:
|
|
5867
|
-
spec:
|
|
5868
|
-
theme:
|
|
5869
|
-
}).catchall(
|
|
5896
|
+
var scalarSourceSchema = z33.strictObject({
|
|
5897
|
+
label: z33.string().optional(),
|
|
5898
|
+
noindex: z33.boolean().default(false),
|
|
5899
|
+
route: z33.string().optional(),
|
|
5900
|
+
spec: z33.string()
|
|
5901
|
+
});
|
|
5902
|
+
var scalarOptionsSchema = z33.object({
|
|
5903
|
+
route: z33.string().default("/reference"),
|
|
5904
|
+
sources: z33.array(scalarSourceSchema).default([]),
|
|
5905
|
+
spec: z33.string().optional(),
|
|
5906
|
+
theme: z33.string().optional()
|
|
5907
|
+
}).catchall(z33.json()).transform(({ spec, sources, ...options }) => ({
|
|
5870
5908
|
...options,
|
|
5871
5909
|
sources: spec === undefined ? sources : [scalarSourceSchema.parse({ spec }), ...sources]
|
|
5872
5910
|
})).refine(hasSources, missingSourcesIssue("scalar"));
|
|
5873
5911
|
var scalarAdapterSchema = adapterDescriptorSchema("scalar", scalarOptionsSchema);
|
|
5874
5912
|
|
|
5875
5913
|
// src/reference/schema.ts
|
|
5876
|
-
var referenceAdapterSchema =
|
|
5914
|
+
var referenceAdapterSchema = z34.discriminatedUnion("kind", [
|
|
5877
5915
|
asyncapiAdapterSchema,
|
|
5878
5916
|
graphqlAdapterSchema,
|
|
5879
5917
|
openapiAdapterSchema,
|
|
@@ -5884,7 +5922,7 @@ var referenceAdapterSchema = z33.discriminatedUnion("kind", [
|
|
|
5884
5922
|
runtimeDeps: value.kind === "scalar" ? [...SCALAR_RUNTIME_DEPS] : []
|
|
5885
5923
|
}));
|
|
5886
5924
|
var LIST_HINT = 'reference is a list of adapters — e.g. `reference: [openapi({ spec }), asyncapi({ spec }), graphql({ spec, endpoint }), scalar({ spec })]`, imported from "blume/reference".';
|
|
5887
|
-
var referenceConfigSchema =
|
|
5925
|
+
var referenceConfigSchema = z34.array(referenceAdapterSchema, {
|
|
5888
5926
|
error: (issue) => issue.code === "invalid_type" ? LIST_HINT : undefined
|
|
5889
5927
|
}).default([]);
|
|
5890
5928
|
var REMOVED_KEYS = ["asyncapi", "graphql", "openapi"];
|
|
@@ -5901,8 +5939,8 @@ var removedReferenceKeysHint = (keys) => {
|
|
|
5901
5939
|
};
|
|
5902
5940
|
|
|
5903
5941
|
// src/search/adapters/orama.ts
|
|
5904
|
-
import { z as
|
|
5905
|
-
var oramaOptionsSchema =
|
|
5942
|
+
import { z as z35 } from "zod";
|
|
5943
|
+
var oramaOptionsSchema = z35.strictObject({});
|
|
5906
5944
|
var orama = (options = {}) => ({
|
|
5907
5945
|
kind: "orama",
|
|
5908
5946
|
mode: "static",
|
|
@@ -5912,15 +5950,15 @@ var orama = (options = {}) => ({
|
|
|
5912
5950
|
});
|
|
5913
5951
|
|
|
5914
5952
|
// src/search/adapters/registry.ts
|
|
5915
|
-
import { z as
|
|
5953
|
+
import { z as z42 } from "zod";
|
|
5916
5954
|
|
|
5917
5955
|
// src/search/adapters/algolia.ts
|
|
5918
|
-
import { z as
|
|
5919
|
-
var algoliaOptionsSchema =
|
|
5920
|
-
apiKey:
|
|
5921
|
-
appId:
|
|
5922
|
-
indexName:
|
|
5923
|
-
}).catchall(
|
|
5956
|
+
import { z as z36 } from "zod";
|
|
5957
|
+
var algoliaOptionsSchema = z36.object({
|
|
5958
|
+
apiKey: z36.string(),
|
|
5959
|
+
appId: z36.string(),
|
|
5960
|
+
indexName: z36.string()
|
|
5961
|
+
}).catchall(z36.json());
|
|
5924
5962
|
var algolia = (options) => ({
|
|
5925
5963
|
kind: "algolia",
|
|
5926
5964
|
mode: "hosted",
|
|
@@ -5930,8 +5968,8 @@ var algolia = (options) => ({
|
|
|
5930
5968
|
});
|
|
5931
5969
|
|
|
5932
5970
|
// src/search/adapters/flexsearch.ts
|
|
5933
|
-
import { z as
|
|
5934
|
-
var flexsearchOptionsSchema =
|
|
5971
|
+
import { z as z37 } from "zod";
|
|
5972
|
+
var flexsearchOptionsSchema = z37.strictObject({});
|
|
5935
5973
|
var flexsearch = (options = {}) => ({
|
|
5936
5974
|
kind: "flexsearch",
|
|
5937
5975
|
mode: "static",
|
|
@@ -5941,10 +5979,10 @@ var flexsearch = (options = {}) => ({
|
|
|
5941
5979
|
});
|
|
5942
5980
|
|
|
5943
5981
|
// src/search/adapters/mixedbread.ts
|
|
5944
|
-
import { z as
|
|
5945
|
-
var mixedbreadOptionsSchema =
|
|
5946
|
-
storeId:
|
|
5947
|
-
}).catchall(
|
|
5982
|
+
import { z as z38 } from "zod";
|
|
5983
|
+
var mixedbreadOptionsSchema = z38.object({
|
|
5984
|
+
storeId: z38.string()
|
|
5985
|
+
}).catchall(z38.json());
|
|
5948
5986
|
var mixedbread = (options) => ({
|
|
5949
5987
|
kind: "mixedbread",
|
|
5950
5988
|
mode: "server",
|
|
@@ -5954,12 +5992,12 @@ var mixedbread = (options) => ({
|
|
|
5954
5992
|
});
|
|
5955
5993
|
|
|
5956
5994
|
// src/search/adapters/orama-cloud.ts
|
|
5957
|
-
import { z as
|
|
5958
|
-
var oramaCloudOptionsSchema =
|
|
5959
|
-
apiKey:
|
|
5960
|
-
endpoint:
|
|
5961
|
-
indexId:
|
|
5962
|
-
}).catchall(
|
|
5995
|
+
import { z as z39 } from "zod";
|
|
5996
|
+
var oramaCloudOptionsSchema = z39.object({
|
|
5997
|
+
apiKey: z39.string(),
|
|
5998
|
+
endpoint: z39.string(),
|
|
5999
|
+
indexId: z39.string().optional()
|
|
6000
|
+
}).catchall(z39.json());
|
|
5963
6001
|
var oramaCloud = (options) => ({
|
|
5964
6002
|
kind: "orama-cloud",
|
|
5965
6003
|
mode: "hosted",
|
|
@@ -5969,8 +6007,8 @@ var oramaCloud = (options) => ({
|
|
|
5969
6007
|
});
|
|
5970
6008
|
|
|
5971
6009
|
// src/search/adapters/pagefind.ts
|
|
5972
|
-
import { z as
|
|
5973
|
-
var pagefindOptionsSchema =
|
|
6010
|
+
import { z as z40 } from "zod";
|
|
6011
|
+
var pagefindOptionsSchema = z40.strictObject({});
|
|
5974
6012
|
var pagefind = (options = {}) => ({
|
|
5975
6013
|
kind: "pagefind",
|
|
5976
6014
|
mode: "pagefind",
|
|
@@ -5980,14 +6018,14 @@ var pagefind = (options = {}) => ({
|
|
|
5980
6018
|
});
|
|
5981
6019
|
|
|
5982
6020
|
// src/search/adapters/typesense.ts
|
|
5983
|
-
import { z as
|
|
5984
|
-
var typesenseOptionsSchema =
|
|
5985
|
-
apiKey:
|
|
5986
|
-
collection:
|
|
5987
|
-
host:
|
|
5988
|
-
port:
|
|
5989
|
-
protocol:
|
|
5990
|
-
}).catchall(
|
|
6021
|
+
import { z as z41 } from "zod";
|
|
6022
|
+
var typesenseOptionsSchema = z41.object({
|
|
6023
|
+
apiKey: z41.string(),
|
|
6024
|
+
collection: z41.string(),
|
|
6025
|
+
host: z41.string(),
|
|
6026
|
+
port: z41.number().int().positive().optional(),
|
|
6027
|
+
protocol: z41.enum(["http", "https"]).optional()
|
|
6028
|
+
}).catchall(z41.json());
|
|
5991
6029
|
var typesense = (options) => ({
|
|
5992
6030
|
kind: "typesense",
|
|
5993
6031
|
mode: "hosted",
|
|
@@ -6004,7 +6042,7 @@ var NONE_SEARCH_ADAPTER = {
|
|
|
6004
6042
|
requiredSecrets: [],
|
|
6005
6043
|
runtimeDeps: []
|
|
6006
6044
|
};
|
|
6007
|
-
var descriptor = (kind, mode, options) => adapterDescriptorSchema(kind, options).extend({ mode:
|
|
6045
|
+
var descriptor = (kind, mode, options) => adapterDescriptorSchema(kind, options).extend({ mode: z42.literal(mode) });
|
|
6008
6046
|
var adapterVariants = [
|
|
6009
6047
|
descriptor("algolia", "hosted", algoliaOptionsSchema),
|
|
6010
6048
|
descriptor("flexsearch", "static", flexsearchOptionsSchema),
|
|
@@ -6014,9 +6052,9 @@ var adapterVariants = [
|
|
|
6014
6052
|
descriptor("pagefind", "pagefind", pagefindOptionsSchema),
|
|
6015
6053
|
descriptor("typesense", "hosted", typesenseOptionsSchema)
|
|
6016
6054
|
];
|
|
6017
|
-
var resolvedSearchAdapterSchema =
|
|
6055
|
+
var resolvedSearchAdapterSchema = z42.discriminatedUnion("kind", [
|
|
6018
6056
|
...adapterVariants,
|
|
6019
|
-
descriptor("none", "none",
|
|
6057
|
+
descriptor("none", "none", z42.strictObject({}))
|
|
6020
6058
|
]).transform((value) => {
|
|
6021
6059
|
switch (value.kind) {
|
|
6022
6060
|
case "algolia": {
|
|
@@ -6058,17 +6096,17 @@ var normalizeXHandle = (value) => {
|
|
|
6058
6096
|
};
|
|
6059
6097
|
|
|
6060
6098
|
// src/sources/registry.ts
|
|
6061
|
-
import { z as
|
|
6099
|
+
import { z as z52 } from "zod";
|
|
6062
6100
|
|
|
6063
6101
|
// src/sources/contentful.ts
|
|
6064
|
-
import { z as
|
|
6102
|
+
import { z as z43 } from "zod";
|
|
6065
6103
|
var contentfulOptionsSchema = sharedSourceOptionsSchema.extend({
|
|
6066
|
-
contentType:
|
|
6067
|
-
environment:
|
|
6104
|
+
contentType: z43.string(),
|
|
6105
|
+
environment: z43.string().optional(),
|
|
6068
6106
|
fields: sourceFieldMapSchema.optional(),
|
|
6069
|
-
locale:
|
|
6107
|
+
locale: z43.string().optional(),
|
|
6070
6108
|
params: queryParamsSchema.optional(),
|
|
6071
|
-
space:
|
|
6109
|
+
space: z43.string()
|
|
6072
6110
|
});
|
|
6073
6111
|
var contentfulAdapterSchema = adapterDescriptorSchema("contentful", contentfulOptionsSchema);
|
|
6074
6112
|
var contentful = (options) => ({
|
|
@@ -6079,8 +6117,8 @@ var contentful = (options) => ({
|
|
|
6079
6117
|
});
|
|
6080
6118
|
|
|
6081
6119
|
// src/sources/custom.ts
|
|
6082
|
-
import { z as
|
|
6083
|
-
var customOptionsSchema =
|
|
6120
|
+
import { z as z44 } from "zod";
|
|
6121
|
+
var customOptionsSchema = z44.custom((value) => typeof value === "object" && value !== null && ("load" in value) && typeof value.load === "function" && ("name" in value) && typeof value.name === "string", { message: "custom() takes a ContentSource (an object with name + load)" });
|
|
6084
6122
|
var customAdapterSchema = adapterDescriptorSchema("custom", customOptionsSchema);
|
|
6085
6123
|
var custom = (source) => ({
|
|
6086
6124
|
kind: "custom",
|
|
@@ -6090,13 +6128,13 @@ var custom = (source) => ({
|
|
|
6090
6128
|
});
|
|
6091
6129
|
|
|
6092
6130
|
// src/sources/github-releases.ts
|
|
6093
|
-
import { z as
|
|
6131
|
+
import { z as z45 } from "zod";
|
|
6094
6132
|
var githubReleasesOptionsSchema = sharedSourceOptionsSchema.extend({
|
|
6095
|
-
drafts:
|
|
6096
|
-
limit:
|
|
6097
|
-
owner:
|
|
6098
|
-
prereleases:
|
|
6099
|
-
repo:
|
|
6133
|
+
drafts: z45.boolean().optional(),
|
|
6134
|
+
limit: z45.number().positive().optional(),
|
|
6135
|
+
owner: z45.string(),
|
|
6136
|
+
prereleases: z45.boolean().optional(),
|
|
6137
|
+
repo: z45.string()
|
|
6100
6138
|
});
|
|
6101
6139
|
var githubReleasesAdapterSchema = adapterDescriptorSchema("github-releases", githubReleasesOptionsSchema);
|
|
6102
6140
|
var githubReleases = (options) => ({
|
|
@@ -6107,17 +6145,17 @@ var githubReleases = (options) => ({
|
|
|
6107
6145
|
});
|
|
6108
6146
|
|
|
6109
6147
|
// src/sources/mdx-remote.ts
|
|
6110
|
-
import { z as
|
|
6148
|
+
import { z as z46 } from "zod";
|
|
6111
6149
|
var mdxRemoteOptionsSchema = sharedSourceOptionsSchema.extend({
|
|
6112
|
-
files:
|
|
6113
|
-
github:
|
|
6114
|
-
owner:
|
|
6115
|
-
path:
|
|
6116
|
-
ref:
|
|
6117
|
-
repo:
|
|
6150
|
+
files: z46.array(z46.string()).optional(),
|
|
6151
|
+
github: z46.strictObject({
|
|
6152
|
+
owner: z46.string(),
|
|
6153
|
+
path: z46.string().default(""),
|
|
6154
|
+
ref: z46.string().default("main"),
|
|
6155
|
+
repo: z46.string()
|
|
6118
6156
|
}).optional(),
|
|
6119
|
-
include:
|
|
6120
|
-
url:
|
|
6157
|
+
include: z46.array(z46.string()).default([DEFAULT_CONTENT_GLOB]),
|
|
6158
|
+
url: z46.string().optional()
|
|
6121
6159
|
});
|
|
6122
6160
|
var mdxRemoteAdapterSchema = adapterDescriptorSchema("mdx-remote", mdxRemoteOptionsSchema);
|
|
6123
6161
|
var GITHUB_HOSTS = new Set(["api.github.com", "raw.githubusercontent.com"]);
|
|
@@ -6130,18 +6168,18 @@ var mdxRemote = (options) => ({
|
|
|
6130
6168
|
});
|
|
6131
6169
|
|
|
6132
6170
|
// src/sources/notion.ts
|
|
6133
|
-
import { z as
|
|
6171
|
+
import { z as z47 } from "zod";
|
|
6134
6172
|
var notionOptionsSchema = sharedSourceOptionsSchema.extend({
|
|
6135
|
-
concurrency:
|
|
6136
|
-
database:
|
|
6137
|
-
properties:
|
|
6138
|
-
description:
|
|
6139
|
-
order:
|
|
6140
|
-
slug:
|
|
6141
|
-
status:
|
|
6142
|
-
title:
|
|
6173
|
+
concurrency: z47.number().positive().optional(),
|
|
6174
|
+
database: z47.string(),
|
|
6175
|
+
properties: z47.strictObject({
|
|
6176
|
+
description: z47.string().optional(),
|
|
6177
|
+
order: z47.string().optional(),
|
|
6178
|
+
slug: z47.string().optional(),
|
|
6179
|
+
status: z47.string().optional(),
|
|
6180
|
+
title: z47.string().optional()
|
|
6143
6181
|
}).optional(),
|
|
6144
|
-
publishedValue:
|
|
6182
|
+
publishedValue: z47.string().optional()
|
|
6145
6183
|
});
|
|
6146
6184
|
var notionAdapterSchema = adapterDescriptorSchema("notion", notionOptionsSchema);
|
|
6147
6185
|
var notion = (options) => ({
|
|
@@ -6152,10 +6190,10 @@ var notion = (options) => ({
|
|
|
6152
6190
|
});
|
|
6153
6191
|
|
|
6154
6192
|
// src/sources/obsidian.ts
|
|
6155
|
-
import { z as
|
|
6193
|
+
import { z as z48 } from "zod";
|
|
6156
6194
|
var obsidianOptionsSchema = sharedSourceOptionsSchema.extend({
|
|
6157
|
-
exclude:
|
|
6158
|
-
vault:
|
|
6195
|
+
exclude: z48.array(z48.string()).optional(),
|
|
6196
|
+
vault: z48.string().min(1)
|
|
6159
6197
|
});
|
|
6160
6198
|
var obsidianAdapterSchema = adapterDescriptorSchema("obsidian", obsidianOptionsSchema);
|
|
6161
6199
|
var obsidian = (options) => ({
|
|
@@ -6166,14 +6204,14 @@ var obsidian = (options) => ({
|
|
|
6166
6204
|
});
|
|
6167
6205
|
|
|
6168
6206
|
// src/sources/payload.ts
|
|
6169
|
-
import { z as
|
|
6207
|
+
import { z as z49 } from "zod";
|
|
6170
6208
|
var payloadOptionsSchema = sharedSourceOptionsSchema.extend({
|
|
6171
|
-
authCollection:
|
|
6172
|
-
collection:
|
|
6173
|
-
depth:
|
|
6209
|
+
authCollection: z49.string().optional(),
|
|
6210
|
+
collection: z49.string(),
|
|
6211
|
+
depth: z49.number().int().nonnegative().optional(),
|
|
6174
6212
|
fields: sourceFieldMapSchema.optional(),
|
|
6175
6213
|
params: queryParamsSchema.optional(),
|
|
6176
|
-
url:
|
|
6214
|
+
url: z49.string()
|
|
6177
6215
|
});
|
|
6178
6216
|
var payloadAdapterSchema = adapterDescriptorSchema("payload", payloadOptionsSchema);
|
|
6179
6217
|
var payload = (options) => ({
|
|
@@ -6184,19 +6222,19 @@ var payload = (options) => ({
|
|
|
6184
6222
|
});
|
|
6185
6223
|
|
|
6186
6224
|
// src/sources/sanity.ts
|
|
6187
|
-
import { z as
|
|
6225
|
+
import { z as z50 } from "zod";
|
|
6188
6226
|
var sanityOptionsSchema = sharedSourceOptionsSchema.extend({
|
|
6189
|
-
apiVersion:
|
|
6190
|
-
dataset:
|
|
6191
|
-
fields:
|
|
6192
|
-
body:
|
|
6193
|
-
description:
|
|
6194
|
-
lastModified:
|
|
6195
|
-
slug:
|
|
6196
|
-
title:
|
|
6227
|
+
apiVersion: z50.string().optional(),
|
|
6228
|
+
dataset: z50.string(),
|
|
6229
|
+
fields: z50.strictObject({
|
|
6230
|
+
body: z50.string().optional(),
|
|
6231
|
+
description: z50.string().optional(),
|
|
6232
|
+
lastModified: z50.string().optional(),
|
|
6233
|
+
slug: z50.string().optional(),
|
|
6234
|
+
title: z50.string().optional()
|
|
6197
6235
|
}).optional(),
|
|
6198
|
-
projectId:
|
|
6199
|
-
query:
|
|
6236
|
+
projectId: z50.string(),
|
|
6237
|
+
query: z50.string()
|
|
6200
6238
|
});
|
|
6201
6239
|
var sanityAdapterSchema = adapterDescriptorSchema("sanity", sanityOptionsSchema);
|
|
6202
6240
|
var sanity = (options) => ({
|
|
@@ -6207,14 +6245,14 @@ var sanity = (options) => ({
|
|
|
6207
6245
|
});
|
|
6208
6246
|
|
|
6209
6247
|
// src/sources/strapi.ts
|
|
6210
|
-
import { z as
|
|
6248
|
+
import { z as z51 } from "zod";
|
|
6211
6249
|
var strapiOptionsSchema = sharedSourceOptionsSchema.extend({
|
|
6212
|
-
contentType:
|
|
6250
|
+
contentType: z51.string(),
|
|
6213
6251
|
fields: sourceFieldMapSchema.optional(),
|
|
6214
|
-
locale:
|
|
6252
|
+
locale: z51.string().optional(),
|
|
6215
6253
|
params: queryParamsSchema.optional(),
|
|
6216
|
-
populate:
|
|
6217
|
-
url:
|
|
6254
|
+
populate: z51.string().optional(),
|
|
6255
|
+
url: z51.string()
|
|
6218
6256
|
});
|
|
6219
6257
|
var strapiAdapterSchema = adapterDescriptorSchema("strapi", strapiOptionsSchema);
|
|
6220
6258
|
var strapi = (options) => ({
|
|
@@ -6237,7 +6275,7 @@ var adapterVariants2 = [
|
|
|
6237
6275
|
obsidianAdapterSchema,
|
|
6238
6276
|
customAdapterSchema
|
|
6239
6277
|
];
|
|
6240
|
-
var sourceAdapterUnion =
|
|
6278
|
+
var sourceAdapterUnion = z52.discriminatedUnion("kind", adapterVariants2);
|
|
6241
6279
|
var FACTORY_FOR_TYPE = new Map([
|
|
6242
6280
|
["custom", "custom"],
|
|
6243
6281
|
["filesystem", "filesystem"],
|
|
@@ -6250,7 +6288,7 @@ var FACTORY_FOR_TYPE = new Map([
|
|
|
6250
6288
|
var FACTORIES_HINT = 'content.sources takes adapters imported from "blume/sources" — filesystem({ root }), mdxRemote({ github }), githubReleases({ owner, repo }), sanity({ projectId, dataset, query }), notion({ database }), contentful({ space, contentType }), payload({ url, collection }), strapi({ url, contentType }), obsidian({ vault }), or custom(source).';
|
|
6251
6289
|
var ARRAY_HINT2 = `content.sources is a list of adapters — e.g. \`sources: [filesystem({ root: "docs" }), githubReleases({ owner, repo, prefix: "changelog" })]\`, imported from "blume/sources".`;
|
|
6252
6290
|
var isObjectLike = (value) => typeof value === "object" && value !== null;
|
|
6253
|
-
var legacyEntrySchema =
|
|
6291
|
+
var legacyEntrySchema = z52.looseObject({ type: z52.string() });
|
|
6254
6292
|
var entryHint = (type) => {
|
|
6255
6293
|
if (type === undefined) {
|
|
6256
6294
|
return FACTORIES_HINT;
|
|
@@ -6297,14 +6335,14 @@ var resolvedSourceAdapterSchema = sourceAdapterUnion.transform((value) => {
|
|
|
6297
6335
|
}
|
|
6298
6336
|
return custom(value.options);
|
|
6299
6337
|
});
|
|
6300
|
-
var sourceEntrySchema =
|
|
6338
|
+
var sourceEntrySchema = z52.custom((value) => isObjectLike(value) && ("kind" in value), {
|
|
6301
6339
|
abort: false,
|
|
6302
6340
|
error: (issue) => {
|
|
6303
6341
|
const legacy = legacyEntrySchema.safeParse(issue.input);
|
|
6304
6342
|
return entryHint(legacy.success ? legacy.data.type : undefined);
|
|
6305
6343
|
}
|
|
6306
6344
|
}).pipe(resolvedSourceAdapterSchema);
|
|
6307
|
-
var contentSourcesSchema =
|
|
6345
|
+
var contentSourcesSchema = z52.array(sourceEntrySchema, {
|
|
6308
6346
|
error: (issue) => issue.code === "invalid_type" ? ARRAY_HINT2 : undefined
|
|
6309
6347
|
});
|
|
6310
6348
|
|
|
@@ -6682,144 +6720,144 @@ var apiUrl = (github) => {
|
|
|
6682
6720
|
};
|
|
6683
6721
|
|
|
6684
6722
|
// src/core/i18n-ui.ts
|
|
6685
|
-
import { z as
|
|
6686
|
-
var uiStringsObject =
|
|
6687
|
-
actions:
|
|
6688
|
-
addToCursor:
|
|
6689
|
-
addToVscode:
|
|
6690
|
-
connectMcp:
|
|
6691
|
-
copied:
|
|
6692
|
-
copyClaudeCode:
|
|
6693
|
-
copyCode:
|
|
6694
|
-
copyCodex:
|
|
6695
|
-
copyFailed:
|
|
6696
|
-
copyMarkdown:
|
|
6697
|
-
copyServerUrl:
|
|
6698
|
-
edit:
|
|
6699
|
-
export:
|
|
6700
|
-
exportEpub:
|
|
6701
|
-
exportPdf:
|
|
6702
|
-
generating:
|
|
6703
|
-
openIn:
|
|
6704
|
-
openInChat:
|
|
6705
|
-
openInChatPrompt:
|
|
6706
|
-
scrollToTop:
|
|
6723
|
+
import { z as z53 } from "zod";
|
|
6724
|
+
var uiStringsObject = z53.object({
|
|
6725
|
+
actions: z53.object({
|
|
6726
|
+
addToCursor: z53.string().default("Add to Cursor"),
|
|
6727
|
+
addToVscode: z53.string().default("Add to VS Code"),
|
|
6728
|
+
connectMcp: z53.string().default("Connect to MCP"),
|
|
6729
|
+
copied: z53.string().default("Copied!"),
|
|
6730
|
+
copyClaudeCode: z53.string().default("Copy Claude Code command"),
|
|
6731
|
+
copyCode: z53.string().default("Copy code"),
|
|
6732
|
+
copyCodex: z53.string().default("Copy Codex command"),
|
|
6733
|
+
copyFailed: z53.string().default("Copy failed"),
|
|
6734
|
+
copyMarkdown: z53.string().default("Copy as Markdown"),
|
|
6735
|
+
copyServerUrl: z53.string().default("Copy server URL"),
|
|
6736
|
+
edit: z53.string().default("Edit on GitHub"),
|
|
6737
|
+
export: z53.string().default("Export"),
|
|
6738
|
+
exportEpub: z53.string().default("Export to EPUB"),
|
|
6739
|
+
exportPdf: z53.string().default("Export to PDF"),
|
|
6740
|
+
generating: z53.string().default("Generating…"),
|
|
6741
|
+
openIn: z53.string().default("Open in {name}"),
|
|
6742
|
+
openInChat: z53.string().default("Open in chat"),
|
|
6743
|
+
openInChatPrompt: z53.string().default("Read {url} so I can ask you questions about this page."),
|
|
6744
|
+
scrollToTop: z53.string().default("Scroll to top")
|
|
6707
6745
|
}).prefault({}),
|
|
6708
|
-
assistant:
|
|
6709
|
-
ai:
|
|
6710
|
-
clear:
|
|
6711
|
-
close:
|
|
6712
|
-
copy:
|
|
6713
|
-
empty:
|
|
6714
|
-
error:
|
|
6715
|
-
label:
|
|
6716
|
-
placeholder:
|
|
6717
|
-
send:
|
|
6718
|
-
tip:
|
|
6719
|
-
title:
|
|
6720
|
-
you:
|
|
6746
|
+
assistant: z53.object({
|
|
6747
|
+
ai: z53.string().default("AI"),
|
|
6748
|
+
clear: z53.string().default("Clear conversation"),
|
|
6749
|
+
close: z53.string().default("Close"),
|
|
6750
|
+
copy: z53.string().default("Copy conversation"),
|
|
6751
|
+
empty: z53.string().default("Ask a question about the docs."),
|
|
6752
|
+
error: z53.string().default("Sorry, something went wrong."),
|
|
6753
|
+
label: z53.string().default("Ask a question"),
|
|
6754
|
+
placeholder: z53.string().default("Ask a question…"),
|
|
6755
|
+
send: z53.string().default("Send"),
|
|
6756
|
+
tip: z53.string().default("Tip: You can open and close chat with"),
|
|
6757
|
+
title: z53.string().default("Assistant"),
|
|
6758
|
+
you: z53.string().default("You")
|
|
6721
6759
|
}).prefault({}),
|
|
6722
|
-
banner:
|
|
6723
|
-
dismiss:
|
|
6760
|
+
banner: z53.object({
|
|
6761
|
+
dismiss: z53.string().default("Dismiss announcement")
|
|
6724
6762
|
}).prefault({}),
|
|
6725
|
-
changelog:
|
|
6726
|
-
description:
|
|
6727
|
-
title:
|
|
6763
|
+
changelog: z53.object({
|
|
6764
|
+
description: z53.string().default("Product updates, new features, and fixes from every release."),
|
|
6765
|
+
title: z53.string().default("Changelog")
|
|
6728
6766
|
}).prefault({}),
|
|
6729
|
-
content:
|
|
6730
|
-
code:
|
|
6731
|
-
copyColor:
|
|
6732
|
-
copyPrompt:
|
|
6733
|
-
default:
|
|
6734
|
-
diagramError:
|
|
6735
|
-
forks:
|
|
6736
|
-
preview:
|
|
6737
|
-
prop:
|
|
6738
|
-
selectTab:
|
|
6739
|
-
showMore:
|
|
6740
|
-
stars:
|
|
6741
|
-
tab:
|
|
6742
|
-
type:
|
|
6743
|
-
update:
|
|
6767
|
+
content: z53.object({
|
|
6768
|
+
code: z53.string().default("Code"),
|
|
6769
|
+
copyColor: z53.string().default("Copy {name} color {value}"),
|
|
6770
|
+
copyPrompt: z53.string().default("Copy prompt"),
|
|
6771
|
+
default: z53.string().default("Default"),
|
|
6772
|
+
diagramError: z53.string().default("Could not render this diagram."),
|
|
6773
|
+
forks: z53.string().default("Forks"),
|
|
6774
|
+
preview: z53.string().default("Preview"),
|
|
6775
|
+
prop: z53.string().default("Prop"),
|
|
6776
|
+
selectTab: z53.string().default("Select tab"),
|
|
6777
|
+
showMore: z53.string().default("Show more"),
|
|
6778
|
+
stars: z53.string().default("Stars"),
|
|
6779
|
+
tab: z53.string().default("Tab {n}"),
|
|
6780
|
+
type: z53.string().default("Type"),
|
|
6781
|
+
update: z53.string().default("Update")
|
|
6744
6782
|
}).prefault({}),
|
|
6745
|
-
feedback:
|
|
6746
|
-
no:
|
|
6747
|
-
question:
|
|
6748
|
-
thanks:
|
|
6749
|
-
yes:
|
|
6783
|
+
feedback: z53.object({
|
|
6784
|
+
no: z53.string().default("No"),
|
|
6785
|
+
question: z53.string().default("Was this page helpful?"),
|
|
6786
|
+
thanks: z53.string().default("Thanks for your feedback!"),
|
|
6787
|
+
yes: z53.string().default("Yes")
|
|
6750
6788
|
}).prefault({}),
|
|
6751
|
-
languageSwitcher:
|
|
6752
|
-
label:
|
|
6753
|
-
untranslated:
|
|
6789
|
+
languageSwitcher: z53.object({
|
|
6790
|
+
label: z53.string().default("Language"),
|
|
6791
|
+
untranslated: z53.string().default("Not translated")
|
|
6754
6792
|
}).prefault({}),
|
|
6755
|
-
nav:
|
|
6756
|
-
back:
|
|
6757
|
-
breadcrumb:
|
|
6758
|
-
closeNavigation:
|
|
6759
|
-
deprecated:
|
|
6760
|
-
featured:
|
|
6761
|
-
githubRepository:
|
|
6762
|
-
navigation:
|
|
6763
|
-
opensInNewTab:
|
|
6764
|
-
primary:
|
|
6765
|
-
sections:
|
|
6766
|
-
toggleNavigation:
|
|
6767
|
-
toggleTheme:
|
|
6793
|
+
nav: z53.object({
|
|
6794
|
+
back: z53.string().default("Back"),
|
|
6795
|
+
breadcrumb: z53.string().default("Breadcrumb"),
|
|
6796
|
+
closeNavigation: z53.string().default("Close navigation"),
|
|
6797
|
+
deprecated: z53.string().default("deprecated"),
|
|
6798
|
+
featured: z53.string().default("Featured"),
|
|
6799
|
+
githubRepository: z53.string().default("GitHub repository"),
|
|
6800
|
+
navigation: z53.string().default("Navigation"),
|
|
6801
|
+
opensInNewTab: z53.string().default("Opens in a new tab"),
|
|
6802
|
+
primary: z53.string().default("Primary"),
|
|
6803
|
+
sections: z53.string().default("Sections"),
|
|
6804
|
+
toggleNavigation: z53.string().default("Toggle navigation"),
|
|
6805
|
+
toggleTheme: z53.string().default("Toggle color theme")
|
|
6768
6806
|
}).prefault({}),
|
|
6769
|
-
notFound:
|
|
6770
|
-
api:
|
|
6771
|
-
description:
|
|
6772
|
-
home:
|
|
6773
|
-
llms:
|
|
6774
|
-
sitemap:
|
|
6775
|
-
suggestions:
|
|
6776
|
-
title:
|
|
6807
|
+
notFound: z53.object({
|
|
6808
|
+
api: z53.string().default("JSON API description (openapi.json)"),
|
|
6809
|
+
description: z53.string().default("We couldn't find the page you're looking for."),
|
|
6810
|
+
home: z53.string().default("Back to home"),
|
|
6811
|
+
llms: z53.string().default("Docs index for AI agents (llms.txt)"),
|
|
6812
|
+
sitemap: z53.string().default("Sitemap"),
|
|
6813
|
+
suggestions: z53.string().default("Where to look next"),
|
|
6814
|
+
title: z53.string().default("Page not found")
|
|
6777
6815
|
}).prefault({}),
|
|
6778
|
-
page:
|
|
6779
|
-
lastUpdated:
|
|
6780
|
-
next:
|
|
6781
|
-
pagination:
|
|
6782
|
-
previous:
|
|
6783
|
-
skipToContent:
|
|
6816
|
+
page: z53.object({
|
|
6817
|
+
lastUpdated: z53.string().default("Last updated on"),
|
|
6818
|
+
next: z53.string().default("Next"),
|
|
6819
|
+
pagination: z53.string().default("Pagination"),
|
|
6820
|
+
previous: z53.string().default("Previous"),
|
|
6821
|
+
skipToContent: z53.string().default("Skip to content")
|
|
6784
6822
|
}).prefault({}),
|
|
6785
|
-
search:
|
|
6786
|
-
all:
|
|
6787
|
-
allLanguages:
|
|
6788
|
-
allVersions:
|
|
6789
|
-
assistant:
|
|
6790
|
-
assistantHint:
|
|
6791
|
-
button:
|
|
6792
|
-
devOnly:
|
|
6793
|
-
docs:
|
|
6794
|
-
error:
|
|
6795
|
-
label:
|
|
6796
|
-
latest:
|
|
6797
|
-
navigate:
|
|
6798
|
-
noResults:
|
|
6799
|
-
open:
|
|
6800
|
-
placeholder:
|
|
6801
|
-
popular:
|
|
6802
|
-
preview:
|
|
6803
|
-
results:
|
|
6823
|
+
search: z53.object({
|
|
6824
|
+
all: z53.string().default("All"),
|
|
6825
|
+
allLanguages: z53.string().default("All languages"),
|
|
6826
|
+
allVersions: z53.string().default("All versions"),
|
|
6827
|
+
assistant: z53.string().default("Assistant"),
|
|
6828
|
+
assistantHint: z53.string().default("Get an instant answer from AI"),
|
|
6829
|
+
button: z53.string().default("Search"),
|
|
6830
|
+
devOnly: z53.string().default("Search is available in the production build."),
|
|
6831
|
+
docs: z53.string().default("Docs"),
|
|
6832
|
+
error: z53.string().default("Something went wrong. Please try again."),
|
|
6833
|
+
label: z53.string().default("Search docs"),
|
|
6834
|
+
latest: z53.string().default("latest"),
|
|
6835
|
+
navigate: z53.string().default("navigate"),
|
|
6836
|
+
noResults: z53.string().default("No results found."),
|
|
6837
|
+
open: z53.string().default("open"),
|
|
6838
|
+
placeholder: z53.string().default("Search documentation…"),
|
|
6839
|
+
popular: z53.string().default("Popular"),
|
|
6840
|
+
preview: z53.string().default("preview"),
|
|
6841
|
+
results: z53.string().default("Results")
|
|
6804
6842
|
}).prefault({}),
|
|
6805
|
-
toc:
|
|
6806
|
-
title:
|
|
6843
|
+
toc: z53.object({
|
|
6844
|
+
title: z53.string().default("On this page")
|
|
6807
6845
|
}).prefault({}),
|
|
6808
|
-
versions:
|
|
6809
|
-
latest:
|
|
6810
|
-
notice:
|
|
6811
|
-
switcher:
|
|
6846
|
+
versions: z53.object({
|
|
6847
|
+
latest: z53.string().default("Go to latest"),
|
|
6848
|
+
notice: z53.string().default("You're viewing documentation for {version}. It may be out of date."),
|
|
6849
|
+
switcher: z53.string().default("Version")
|
|
6812
6850
|
}).prefault({})
|
|
6813
6851
|
});
|
|
6814
6852
|
var uiStringsSchema = uiStringsObject.prefault({});
|
|
6815
6853
|
var EN_UI = uiStringsObject.parse({});
|
|
6816
|
-
var uiStringsOverrideSchema =
|
|
6854
|
+
var uiStringsOverrideSchema = z53.record(z53.string(), z53.record(z53.string(), z53.string()));
|
|
6817
6855
|
var RENAMED_UI_KEYS = new Map([
|
|
6818
6856
|
["ask", "assistant"],
|
|
6819
6857
|
["search.askAi", "search.assistant"],
|
|
6820
6858
|
["search.askAiHint", "search.assistantHint"]
|
|
6821
6859
|
]);
|
|
6822
|
-
var uiLocaleOverridesSchema =
|
|
6860
|
+
var uiLocaleOverridesSchema = z53.record(z53.string(), uiStringsOverrideSchema).superRefine((value, ctx) => {
|
|
6823
6861
|
for (const [locale, override] of Object.entries(value)) {
|
|
6824
6862
|
const keys = Object.entries(override).flatMap(([group, strings]) => [
|
|
6825
6863
|
group,
|
|
@@ -6829,7 +6867,7 @@ var uiLocaleOverridesSchema = z52.record(z52.string(), uiStringsOverrideSchema).
|
|
|
6829
6867
|
const renamed = RENAMED_UI_KEYS.get(key);
|
|
6830
6868
|
if (renamed) {
|
|
6831
6869
|
ctx.addIssue({
|
|
6832
|
-
code:
|
|
6870
|
+
code: z53.ZodIssueCode.custom,
|
|
6833
6871
|
message: `i18n.ui.${locale}.${key} was renamed to i18n.ui.${locale}.${renamed}.`,
|
|
6834
6872
|
path: [locale, ...key.split(".")]
|
|
6835
6873
|
});
|
|
@@ -6881,14 +6919,14 @@ var openInChatProviders = [
|
|
|
6881
6919
|
];
|
|
6882
6920
|
|
|
6883
6921
|
// src/core/standard-schema.ts
|
|
6884
|
-
var isStandardSchema = (value) => typeof value
|
|
6922
|
+
var isStandardSchema = (value) => typeof value?.["~standard"]?.validate === "function";
|
|
6885
6923
|
|
|
6886
6924
|
// src/core/schema.ts
|
|
6887
|
-
var httpUrlSchema =
|
|
6925
|
+
var httpUrlSchema = z54.url({ protocol: /^https?$/u });
|
|
6888
6926
|
var isString2 = (value) => typeof value === "string";
|
|
6889
6927
|
var isBoolean2 = (value) => typeof value === "boolean";
|
|
6890
6928
|
var isObjectLike2 = (value) => typeof value === "object" && value !== null;
|
|
6891
|
-
var iconName =
|
|
6929
|
+
var iconName = z54.string().min(1);
|
|
6892
6930
|
var removedKeysHint = (hints) => ({
|
|
6893
6931
|
error: (issue) => {
|
|
6894
6932
|
if (issue.code !== "unrecognized_keys") {
|
|
@@ -6905,131 +6943,131 @@ var removedKeysHint = (hints) => ({
|
|
|
6905
6943
|
return messages.join(" ");
|
|
6906
6944
|
}
|
|
6907
6945
|
});
|
|
6908
|
-
var hydrationMode =
|
|
6909
|
-
var dateSchema =
|
|
6910
|
-
var sidebarDisplaySchema =
|
|
6911
|
-
var sidebarMetaSchema =
|
|
6912
|
-
badge:
|
|
6946
|
+
var hydrationMode = z54.enum(["load", "idle", "visible", "media", "only"]);
|
|
6947
|
+
var dateSchema = z54.union([z54.string(), z54.date()]).transform((value) => value instanceof Date ? value.toISOString() : value);
|
|
6948
|
+
var sidebarDisplaySchema = z54.enum(["flat", "group", "page"]);
|
|
6949
|
+
var sidebarMetaSchema = z54.strictObject({
|
|
6950
|
+
badge: z54.string().optional(),
|
|
6913
6951
|
display: sidebarDisplaySchema.optional(),
|
|
6914
|
-
hidden:
|
|
6952
|
+
hidden: z54.boolean().default(false),
|
|
6915
6953
|
icon: iconName.optional(),
|
|
6916
|
-
label:
|
|
6917
|
-
order:
|
|
6918
|
-
});
|
|
6919
|
-
var xHandleSchema =
|
|
6920
|
-
var seoMetaSchema =
|
|
6921
|
-
canonical:
|
|
6922
|
-
description:
|
|
6923
|
-
image:
|
|
6924
|
-
noindex:
|
|
6925
|
-
title:
|
|
6926
|
-
x:
|
|
6927
|
-
});
|
|
6928
|
-
var searchMetaSchema =
|
|
6929
|
-
exclude:
|
|
6930
|
-
tags:
|
|
6954
|
+
label: z54.string().optional(),
|
|
6955
|
+
order: z54.number().optional()
|
|
6956
|
+
});
|
|
6957
|
+
var xHandleSchema = z54.string().transform(normalizeXHandle).optional();
|
|
6958
|
+
var seoMetaSchema = z54.strictObject({
|
|
6959
|
+
canonical: z54.url().optional(),
|
|
6960
|
+
description: z54.string().optional(),
|
|
6961
|
+
image: z54.string().optional(),
|
|
6962
|
+
noindex: z54.boolean().default(false),
|
|
6963
|
+
title: z54.string().optional(),
|
|
6964
|
+
x: z54.strictObject({ creator: xHandleSchema }).optional()
|
|
6965
|
+
});
|
|
6966
|
+
var searchMetaSchema = z54.strictObject({
|
|
6967
|
+
exclude: z54.boolean().default(false),
|
|
6968
|
+
tags: z54.array(z54.string()).optional()
|
|
6931
6969
|
}, removedKeysHint({
|
|
6932
6970
|
boost: "search.boost was removed: search never read it, so the page ranked the same without it. Delete the field."
|
|
6933
6971
|
}));
|
|
6934
|
-
var aiMetaSchema =
|
|
6935
|
-
exclude:
|
|
6972
|
+
var aiMetaSchema = z54.strictObject({
|
|
6973
|
+
exclude: z54.boolean().default(false)
|
|
6936
6974
|
});
|
|
6937
|
-
var changelogMetaSchema =
|
|
6938
|
-
category:
|
|
6975
|
+
var changelogMetaSchema = z54.strictObject({
|
|
6976
|
+
category: z54.string().optional(),
|
|
6939
6977
|
date: dateSchema.optional(),
|
|
6940
|
-
version:
|
|
6941
|
-
});
|
|
6942
|
-
var authorSchema =
|
|
6943
|
-
|
|
6944
|
-
|
|
6945
|
-
avatar:
|
|
6946
|
-
image:
|
|
6947
|
-
name:
|
|
6948
|
-
url:
|
|
6949
|
-
}).catchall(
|
|
6978
|
+
version: z54.string().optional()
|
|
6979
|
+
});
|
|
6980
|
+
var authorSchema = z54.union([
|
|
6981
|
+
z54.string(),
|
|
6982
|
+
z54.object({
|
|
6983
|
+
avatar: z54.string().optional(),
|
|
6984
|
+
image: z54.string().optional(),
|
|
6985
|
+
name: z54.string(),
|
|
6986
|
+
url: z54.string().optional()
|
|
6987
|
+
}).catchall(z54.unknown())
|
|
6950
6988
|
]);
|
|
6951
|
-
var pageMetaBaseSchema =
|
|
6989
|
+
var pageMetaBaseSchema = z54.strictObject({
|
|
6952
6990
|
ai: aiMetaSchema.prefault({}),
|
|
6953
|
-
authors:
|
|
6991
|
+
authors: z54.union([authorSchema, z54.array(authorSchema)]).optional(),
|
|
6954
6992
|
changelog: changelogMetaSchema.optional(),
|
|
6955
6993
|
date: dateSchema.optional(),
|
|
6956
|
-
deprecated:
|
|
6957
|
-
description:
|
|
6958
|
-
draft:
|
|
6959
|
-
hidden:
|
|
6994
|
+
deprecated: z54.boolean().default(false),
|
|
6995
|
+
description: z54.string().optional(),
|
|
6996
|
+
draft: z54.boolean().default(false),
|
|
6997
|
+
hidden: z54.boolean().default(false),
|
|
6960
6998
|
icon: iconName.optional(),
|
|
6961
6999
|
lastModified: dateSchema.optional(),
|
|
6962
|
-
noindex:
|
|
7000
|
+
noindex: z54.boolean().default(false),
|
|
6963
7001
|
search: searchMetaSchema.prefault({}),
|
|
6964
7002
|
seo: seoMetaSchema.prefault({}),
|
|
6965
7003
|
sidebar: sidebarMetaSchema.prefault({}),
|
|
6966
|
-
slug:
|
|
6967
|
-
title:
|
|
6968
|
-
type:
|
|
7004
|
+
slug: z54.string().optional(),
|
|
7005
|
+
title: z54.string().optional(),
|
|
7006
|
+
type: z54.string().optional()
|
|
6969
7007
|
});
|
|
6970
7008
|
var pageMetaSchema = pageMetaBaseSchema;
|
|
6971
7009
|
var EMPTY_PAGE_META = pageMetaBaseSchema.parse({});
|
|
6972
7010
|
var pageCollectionSchema = pageMetaBaseSchema.loose().catch(() => EMPTY_PAGE_META);
|
|
6973
7011
|
var BUILT_IN_PAGE_META_KEYS = new Set(pageMetaBaseSchema.keyof().options);
|
|
6974
|
-
var customKeySchemaRecord = (where) =>
|
|
7012
|
+
var customKeySchemaRecord = (where) => z54.record(z54.string(), z54.custom(isStandardSchema, {
|
|
6975
7013
|
message: "Expected a Standard Schema (e.g. a Zod schema — any Zod version works)."
|
|
6976
7014
|
})).default({}).superRefine((value, ctx) => {
|
|
6977
7015
|
for (const key of Object.keys(value)) {
|
|
6978
7016
|
if (BUILT_IN_PAGE_META_KEYS.has(key)) {
|
|
6979
7017
|
ctx.addIssue({
|
|
6980
|
-
code:
|
|
7018
|
+
code: z54.ZodIssueCode.custom,
|
|
6981
7019
|
message: `"${key}" is a built-in frontmatter field and cannot be redeclared via ${where}.`,
|
|
6982
7020
|
path: [key]
|
|
6983
7021
|
});
|
|
6984
7022
|
}
|
|
6985
7023
|
}
|
|
6986
7024
|
});
|
|
6987
|
-
var folderMetaSchema =
|
|
6988
|
-
collapsed:
|
|
7025
|
+
var folderMetaSchema = z54.strictObject({
|
|
7026
|
+
collapsed: z54.boolean().optional(),
|
|
6989
7027
|
display: sidebarDisplaySchema.optional(),
|
|
6990
7028
|
icon: iconName.optional(),
|
|
6991
|
-
order:
|
|
6992
|
-
pages:
|
|
6993
|
-
title:
|
|
6994
|
-
});
|
|
6995
|
-
var logoImageSchema =
|
|
6996
|
-
|
|
6997
|
-
|
|
6998
|
-
alt:
|
|
6999
|
-
dark:
|
|
7000
|
-
light:
|
|
7029
|
+
order: z54.number().optional(),
|
|
7030
|
+
pages: z54.array(z54.string()).optional(),
|
|
7031
|
+
title: z54.string().optional()
|
|
7032
|
+
});
|
|
7033
|
+
var logoImageSchema = z54.union([
|
|
7034
|
+
z54.string(),
|
|
7035
|
+
z54.strictObject({
|
|
7036
|
+
alt: z54.string().optional(),
|
|
7037
|
+
dark: z54.string().optional(),
|
|
7038
|
+
light: z54.string().optional()
|
|
7001
7039
|
})
|
|
7002
7040
|
]);
|
|
7003
|
-
var logoConfigSchema =
|
|
7004
|
-
|
|
7005
|
-
|
|
7006
|
-
href:
|
|
7041
|
+
var logoConfigSchema = z54.union([
|
|
7042
|
+
z54.string(),
|
|
7043
|
+
z54.strictObject({
|
|
7044
|
+
href: z54.string().optional(),
|
|
7007
7045
|
image: logoImageSchema.optional(),
|
|
7008
|
-
text:
|
|
7046
|
+
text: z54.string().optional()
|
|
7009
7047
|
})
|
|
7010
7048
|
]);
|
|
7011
|
-
var bannerConfigSchema =
|
|
7012
|
-
|
|
7013
|
-
|
|
7014
|
-
content:
|
|
7015
|
-
dismissible:
|
|
7016
|
-
id:
|
|
7017
|
-
link:
|
|
7049
|
+
var bannerConfigSchema = z54.union([
|
|
7050
|
+
z54.string(),
|
|
7051
|
+
z54.strictObject({
|
|
7052
|
+
content: z54.string(),
|
|
7053
|
+
dismissible: z54.boolean().default(false),
|
|
7054
|
+
id: z54.string().optional(),
|
|
7055
|
+
link: z54.strictObject({ href: z54.string(), text: z54.string() }).optional()
|
|
7018
7056
|
})
|
|
7019
7057
|
]);
|
|
7020
|
-
var contentTypeConfigSchema =
|
|
7021
|
-
facets:
|
|
7058
|
+
var contentTypeConfigSchema = z54.strictObject({
|
|
7059
|
+
facets: z54.array(z54.string()).default([]),
|
|
7022
7060
|
frontmatter: customKeySchemaRecord("content.types")
|
|
7023
7061
|
});
|
|
7024
7062
|
var FILESYSTEM_SHORTHAND_KEYS = ["exclude", "include", "root"];
|
|
7025
|
-
var contentConfigSchema =
|
|
7026
|
-
defaultType:
|
|
7027
|
-
exclude:
|
|
7028
|
-
include:
|
|
7029
|
-
pages:
|
|
7030
|
-
root:
|
|
7063
|
+
var contentConfigSchema = z54.strictObject({
|
|
7064
|
+
defaultType: z54.string().default("doc"),
|
|
7065
|
+
exclude: z54.array(z54.string()).optional(),
|
|
7066
|
+
include: z54.array(z54.string()).optional(),
|
|
7067
|
+
pages: z54.string().default("pages"),
|
|
7068
|
+
root: z54.string().optional(),
|
|
7031
7069
|
sources: contentSourcesSchema.optional(),
|
|
7032
|
-
types:
|
|
7070
|
+
types: z54.record(z54.string(), contentTypeConfigSchema).default({})
|
|
7033
7071
|
}).superRefine((value, ctx) => {
|
|
7034
7072
|
if (!value.sources) {
|
|
7035
7073
|
return;
|
|
@@ -7037,7 +7075,7 @@ var contentConfigSchema = z53.strictObject({
|
|
|
7037
7075
|
for (const key of FILESYSTEM_SHORTHAND_KEYS) {
|
|
7038
7076
|
if (value[key] !== undefined) {
|
|
7039
7077
|
ctx.addIssue({
|
|
7040
|
-
code:
|
|
7078
|
+
code: z54.ZodIssueCode.custom,
|
|
7041
7079
|
message: `content.${key} is shorthand for a single filesystem() source and can't be combined with content.sources — move it into a filesystem({ ${key} }) entry in content.sources.`,
|
|
7042
7080
|
path: [key]
|
|
7043
7081
|
});
|
|
@@ -7049,122 +7087,122 @@ var contentConfigSchema = z53.strictObject({
|
|
|
7049
7087
|
resolvedSourceAdapterSchema.parse(filesystem({ exclude, include, root }))
|
|
7050
7088
|
]
|
|
7051
7089
|
}));
|
|
7052
|
-
var localizableLabelSchema =
|
|
7053
|
-
|
|
7054
|
-
|
|
7090
|
+
var localizableLabelSchema = z54.union([
|
|
7091
|
+
z54.string(),
|
|
7092
|
+
z54.record(z54.string(), z54.string()).refine((value) => Object.keys(value).length > 0, {
|
|
7055
7093
|
message: "Provide at least one locale's label."
|
|
7056
7094
|
})
|
|
7057
7095
|
]);
|
|
7058
|
-
var navTabSchema =
|
|
7059
|
-
href:
|
|
7096
|
+
var navTabSchema = z54.strictObject({
|
|
7097
|
+
href: z54.string().min(1).optional(),
|
|
7060
7098
|
icon: iconName.optional(),
|
|
7061
|
-
items:
|
|
7062
|
-
description:
|
|
7099
|
+
items: z54.array(z54.strictObject({
|
|
7100
|
+
description: z54.string().optional(),
|
|
7063
7101
|
icon: iconName.optional(),
|
|
7064
7102
|
label: localizableLabelSchema,
|
|
7065
|
-
path:
|
|
7066
|
-
tag:
|
|
7103
|
+
path: z54.string(),
|
|
7104
|
+
tag: z54.string().optional()
|
|
7067
7105
|
})).optional(),
|
|
7068
7106
|
label: localizableLabelSchema,
|
|
7069
|
-
path:
|
|
7107
|
+
path: z54.string().transform(normalizeRoute)
|
|
7070
7108
|
});
|
|
7071
|
-
var navSelectorItemSchema =
|
|
7072
|
-
description:
|
|
7109
|
+
var navSelectorItemSchema = z54.strictObject({
|
|
7110
|
+
description: z54.string().optional(),
|
|
7073
7111
|
icon: iconName.optional(),
|
|
7074
|
-
label:
|
|
7075
|
-
path:
|
|
7076
|
-
tag:
|
|
7077
|
-
});
|
|
7078
|
-
var navSelectorSchema =
|
|
7079
|
-
items:
|
|
7080
|
-
kind:
|
|
7081
|
-
label:
|
|
7082
|
-
});
|
|
7083
|
-
var directoryModeSchema =
|
|
7084
|
-
var sidebarItemSchema =
|
|
7085
|
-
|
|
7086
|
-
|
|
7087
|
-
badge:
|
|
7088
|
-
collapsed:
|
|
7112
|
+
label: z54.string(),
|
|
7113
|
+
path: z54.string(),
|
|
7114
|
+
tag: z54.string().optional()
|
|
7115
|
+
});
|
|
7116
|
+
var navSelectorSchema = z54.strictObject({
|
|
7117
|
+
items: z54.array(navSelectorItemSchema).default([]),
|
|
7118
|
+
kind: z54.enum(["dropdown", "language", "product", "version"]),
|
|
7119
|
+
label: z54.string()
|
|
7120
|
+
});
|
|
7121
|
+
var directoryModeSchema = z54.enum(["accordion", "card", "none"]);
|
|
7122
|
+
var sidebarItemSchema = z54.lazy(() => z54.union([
|
|
7123
|
+
z54.string(),
|
|
7124
|
+
z54.strictObject({
|
|
7125
|
+
badge: z54.string().optional(),
|
|
7126
|
+
collapsed: z54.boolean().optional(),
|
|
7089
7127
|
directory: directoryModeSchema.optional(),
|
|
7090
7128
|
display: sidebarDisplaySchema.optional(),
|
|
7091
|
-
href:
|
|
7129
|
+
href: z54.string().optional(),
|
|
7092
7130
|
icon: iconName.optional(),
|
|
7093
|
-
items:
|
|
7094
|
-
label:
|
|
7095
|
-
root:
|
|
7131
|
+
items: z54.array(sidebarItemSchema).optional(),
|
|
7132
|
+
label: z54.string(),
|
|
7133
|
+
root: z54.string().optional()
|
|
7096
7134
|
})
|
|
7097
7135
|
]));
|
|
7098
|
-
var fontFallbackSchema =
|
|
7099
|
-
var remoteFontSchema =
|
|
7136
|
+
var fontFallbackSchema = z54.enum(["sans", "serif", "mono"]);
|
|
7137
|
+
var remoteFontSchema = z54.strictObject({
|
|
7100
7138
|
fallback: fontFallbackSchema.optional(),
|
|
7101
|
-
name:
|
|
7102
|
-
provider:
|
|
7103
|
-
subsets:
|
|
7104
|
-
weights:
|
|
7105
|
-
});
|
|
7106
|
-
var localFontVariantSchema =
|
|
7107
|
-
src:
|
|
7108
|
-
style:
|
|
7109
|
-
weight:
|
|
7110
|
-
|
|
7111
|
-
|
|
7139
|
+
name: z54.string().min(1),
|
|
7140
|
+
provider: z54.enum(["google", "fontsource", "bunny", "fontshare"]).default("google"),
|
|
7141
|
+
subsets: z54.array(z54.string().min(1)).nonempty().optional(),
|
|
7142
|
+
weights: z54.array(z54.union([z54.number().int().positive(), z54.string().regex(/^\d+\.\.\d+$/u)])).nonempty().optional()
|
|
7143
|
+
});
|
|
7144
|
+
var localFontVariantSchema = z54.strictObject({
|
|
7145
|
+
src: z54.string().min(1),
|
|
7146
|
+
style: z54.enum(["normal", "italic", "oblique"]).optional(),
|
|
7147
|
+
weight: z54.union([
|
|
7148
|
+
z54.number().int().positive(),
|
|
7149
|
+
z54.string().regex(/^\d+(?:\.\.\d+)?$/u)
|
|
7112
7150
|
]).optional()
|
|
7113
7151
|
});
|
|
7114
|
-
var localFontSchema =
|
|
7152
|
+
var localFontSchema = z54.strictObject({
|
|
7115
7153
|
fallback: fontFallbackSchema.optional(),
|
|
7116
|
-
name:
|
|
7117
|
-
variants:
|
|
7154
|
+
name: z54.string().min(1),
|
|
7155
|
+
variants: z54.array(localFontVariantSchema).nonempty()
|
|
7118
7156
|
});
|
|
7119
|
-
var fontValueSchema =
|
|
7157
|
+
var fontValueSchema = z54.union([z54.string(), remoteFontSchema, localFontSchema]).superRefine((value, ctx) => {
|
|
7120
7158
|
if (isString2(value) && !isFontSlug(value)) {
|
|
7121
7159
|
ctx.addIssue({
|
|
7122
|
-
code:
|
|
7160
|
+
code: z54.ZodIssueCode.custom,
|
|
7123
7161
|
message: `Unknown font "${value}". Supported fonts: ${FONT_SLUGS.join(", ")}. For any other family, use the object form: { name: "..." } (remote provider) or { name: "...", variants: [...] } (local files).`
|
|
7124
7162
|
});
|
|
7125
7163
|
}
|
|
7126
7164
|
});
|
|
7127
|
-
var perModeValueSchema =
|
|
7128
|
-
|
|
7129
|
-
|
|
7130
|
-
dark:
|
|
7131
|
-
light:
|
|
7165
|
+
var perModeValueSchema = z54.union([
|
|
7166
|
+
z54.string(),
|
|
7167
|
+
z54.strictObject({
|
|
7168
|
+
dark: z54.string().optional(),
|
|
7169
|
+
light: z54.string().optional()
|
|
7132
7170
|
})
|
|
7133
7171
|
]).optional().transform((value) => isString2(value) ? { dark: value, light: value } : value);
|
|
7134
7172
|
var themeConfigFields = {
|
|
7135
|
-
accent:
|
|
7136
|
-
|
|
7137
|
-
|
|
7173
|
+
accent: z54.union([
|
|
7174
|
+
z54.string(),
|
|
7175
|
+
z54.strictObject({ dark: z54.string(), light: z54.string() })
|
|
7138
7176
|
]).default("blue").transform((value) => isString2(value) ? { dark: value, light: value } : value),
|
|
7139
|
-
action:
|
|
7177
|
+
action: z54.string().optional(),
|
|
7140
7178
|
background: perModeValueSchema,
|
|
7141
7179
|
backgroundImage: perModeValueSchema,
|
|
7142
|
-
fonts:
|
|
7180
|
+
fonts: z54.strictObject({
|
|
7143
7181
|
body: fontValueSchema.default("inter"),
|
|
7144
7182
|
display: fontValueSchema.default("inter"),
|
|
7145
7183
|
mono: fontValueSchema.default("ibm-plex-mono")
|
|
7146
7184
|
}).prefault({}),
|
|
7147
|
-
mode:
|
|
7148
|
-
radius:
|
|
7185
|
+
mode: z54.enum(["system", "light", "dark"]).default("system"),
|
|
7186
|
+
radius: z54.enum(["none", "sm", "md", "lg"]).default("md")
|
|
7149
7187
|
};
|
|
7150
|
-
var themeConfigSchema =
|
|
7188
|
+
var themeConfigSchema = z54.strictObject(themeConfigFields, removedKeysHint({
|
|
7151
7189
|
layout: "theme.layout was removed: the sidebar layout is the only one, so delete the field."
|
|
7152
7190
|
}));
|
|
7153
|
-
var searchPopularLinkSchema =
|
|
7154
|
-
href:
|
|
7191
|
+
var searchPopularLinkSchema = z54.strictObject({
|
|
7192
|
+
href: z54.string(),
|
|
7155
7193
|
icon: iconName.optional(),
|
|
7156
|
-
label:
|
|
7194
|
+
label: z54.string()
|
|
7157
7195
|
});
|
|
7158
|
-
var searchProviderSchema =
|
|
7196
|
+
var searchProviderSchema = z54.custom((value) => value === false || isObjectLike2(value), {
|
|
7159
7197
|
message: 'search.provider takes an adapter from "blume/search" — algolia({…}), pagefind(), … — not a provider name. The 1.x provider string was removed, and "none" is now `search: false`.'
|
|
7160
7198
|
}).transform((value) => value === false ? NONE_SEARCH_ADAPTER : value).pipe(resolvedSearchAdapterSchema);
|
|
7161
|
-
var searchIndexingSchema =
|
|
7162
|
-
includeCodeBlocks:
|
|
7163
|
-
includeHiddenPages:
|
|
7199
|
+
var searchIndexingSchema = z54.strictObject({
|
|
7200
|
+
includeCodeBlocks: z54.boolean().default(false),
|
|
7201
|
+
includeHiddenPages: z54.boolean().default(false)
|
|
7164
7202
|
}).prefault({});
|
|
7165
|
-
var searchOptionsSchema =
|
|
7203
|
+
var searchOptionsSchema = z54.strictObject({
|
|
7166
7204
|
indexing: searchIndexingSchema,
|
|
7167
|
-
popular:
|
|
7205
|
+
popular: z54.array(searchPopularLinkSchema).default([]),
|
|
7168
7206
|
provider: searchProviderSchema.default(() => orama())
|
|
7169
7207
|
}, removedKeysHint({
|
|
7170
7208
|
algolia: 'search.algolia moved into its adapter: `search: algolia({ appId, indexName, apiKey })` from "blume/search", where the 1.x `searchApiKey` is now `apiKey`.',
|
|
@@ -7172,32 +7210,32 @@ var searchOptionsSchema = z53.strictObject({
|
|
|
7172
7210
|
oramaCloud: 'search.oramaCloud moved into its adapter: `search: oramaCloud({ endpoint, apiKey, indexId })` from "blume/search".',
|
|
7173
7211
|
typesense: 'search.typesense moved into its adapter: `search: typesense({ host, collection, apiKey })` from "blume/search", where the 1.x `searchApiKey` is now `apiKey`.'
|
|
7174
7212
|
}));
|
|
7175
|
-
var searchConfigSchema =
|
|
7213
|
+
var searchConfigSchema = z54.custom((value) => value === false || isObjectLike2(value), {
|
|
7176
7214
|
message: 'search must be an adapter from "blume/search" (orama(), algolia({…}), …), false, or { provider, popular, indexing }. The 1.x provider string was removed.'
|
|
7177
7215
|
}).transform((value) => value === false || ("kind" in value) ? { provider: value } : value).pipe(searchOptionsSchema);
|
|
7178
7216
|
var PRIVATE_JWK_PARAMS = ["d", "p", "q", "dp", "dq", "qi", "oth", "k"];
|
|
7179
|
-
var publicJwkSchema =
|
|
7217
|
+
var publicJwkSchema = z54.record(z54.string(), z54.unknown()).superRefine((jwk, ctx) => {
|
|
7180
7218
|
if (!isString2(jwk.kty) || jwk.kty.length === 0) {
|
|
7181
7219
|
ctx.addIssue({
|
|
7182
|
-
code:
|
|
7220
|
+
code: z54.ZodIssueCode.custom,
|
|
7183
7221
|
message: 'A JWK must declare its key type ("kty").'
|
|
7184
7222
|
});
|
|
7185
7223
|
}
|
|
7186
7224
|
const leaked = PRIVATE_JWK_PARAMS.filter((param) => (param in jwk));
|
|
7187
7225
|
if (leaked.length > 0) {
|
|
7188
7226
|
ctx.addIssue({
|
|
7189
|
-
code:
|
|
7227
|
+
code: z54.ZodIssueCode.custom,
|
|
7190
7228
|
message: `The JWK contains private key material ("${leaked.join('", "')}") — the signatures directory is public, so list only public keys and keep the private key where the signing agent runs.`
|
|
7191
7229
|
});
|
|
7192
7230
|
}
|
|
7193
7231
|
});
|
|
7194
|
-
var mcpConfigSchema =
|
|
7195
|
-
enabled:
|
|
7196
|
-
instructions:
|
|
7197
|
-
name:
|
|
7198
|
-
route:
|
|
7232
|
+
var mcpConfigSchema = z54.strictObject({
|
|
7233
|
+
enabled: z54.boolean().default(false),
|
|
7234
|
+
instructions: z54.string().optional(),
|
|
7235
|
+
name: z54.string().optional(),
|
|
7236
|
+
route: z54.string().default("/mcp").transform(normalizeRoute)
|
|
7199
7237
|
});
|
|
7200
|
-
var assistantEndpointSchema =
|
|
7238
|
+
var assistantEndpointSchema = z54.string().trim().min(1).refine((value) => {
|
|
7201
7239
|
if (value.startsWith("/") && !value.startsWith("//")) {
|
|
7202
7240
|
return true;
|
|
7203
7241
|
}
|
|
@@ -7210,14 +7248,14 @@ var assistantEndpointSchema = z53.string().trim().min(1).refine((value) => {
|
|
|
7210
7248
|
}, {
|
|
7211
7249
|
message: "ai.assistant.endpoint must be an HTTP(S) URL or a root-relative path."
|
|
7212
7250
|
});
|
|
7213
|
-
var llmsTxtObjectSchema =
|
|
7214
|
-
details:
|
|
7215
|
-
enabled:
|
|
7216
|
-
openapi:
|
|
7251
|
+
var llmsTxtObjectSchema = z54.strictObject({
|
|
7252
|
+
details: z54.string().trim().min(1).optional(),
|
|
7253
|
+
enabled: z54.boolean().default(true),
|
|
7254
|
+
openapi: z54.boolean().default(true)
|
|
7217
7255
|
});
|
|
7218
|
-
var aiCatalogObjectSchema =
|
|
7219
|
-
enabled:
|
|
7220
|
-
queries:
|
|
7256
|
+
var aiCatalogObjectSchema = z54.strictObject({
|
|
7257
|
+
enabled: z54.boolean().default(true),
|
|
7258
|
+
queries: z54.record(z54.string().min(1), z54.array(z54.string().trim().min(1)).min(1)).default({})
|
|
7221
7259
|
});
|
|
7222
7260
|
var MOVED_TO_AGENTS = [
|
|
7223
7261
|
"api",
|
|
@@ -7234,36 +7272,36 @@ var movedToAgentsHints = (from) => Object.fromEntries(MOVED_TO_AGENTS.map((key)
|
|
|
7234
7272
|
`${from}.${key} moved to agents.${key}.`
|
|
7235
7273
|
]));
|
|
7236
7274
|
var aiConfigFields = {
|
|
7237
|
-
assistant:
|
|
7238
|
-
cors:
|
|
7239
|
-
|
|
7240
|
-
|
|
7275
|
+
assistant: z54.strictObject({
|
|
7276
|
+
cors: z54.array(z54.union([
|
|
7277
|
+
z54.literal("*"),
|
|
7278
|
+
z54.url({ protocol: /^https?$/u }).transform((value) => new URL(value).origin)
|
|
7241
7279
|
])).optional(),
|
|
7242
|
-
enabled:
|
|
7280
|
+
enabled: z54.boolean().default(false),
|
|
7243
7281
|
endpoint: assistantEndpointSchema.optional(),
|
|
7244
|
-
instructions:
|
|
7282
|
+
instructions: z54.string().trim().min(1).optional(),
|
|
7245
7283
|
provider: assistantAdapterSchema.prefault(DEFAULT_ASSISTANT_PROVIDER),
|
|
7246
|
-
retrieval:
|
|
7247
|
-
contextBudget:
|
|
7248
|
-
excerptChars:
|
|
7249
|
-
maxResults:
|
|
7284
|
+
retrieval: z54.strictObject({
|
|
7285
|
+
contextBudget: z54.number().int().positive().optional(),
|
|
7286
|
+
excerptChars: z54.number().int().positive().optional(),
|
|
7287
|
+
maxResults: z54.number().int().positive().optional()
|
|
7250
7288
|
}).optional(),
|
|
7251
|
-
suggestions:
|
|
7289
|
+
suggestions: z54.array(z54.strictObject({
|
|
7252
7290
|
icon: iconName.optional(),
|
|
7253
|
-
label:
|
|
7291
|
+
label: z54.string().min(1)
|
|
7254
7292
|
})).default([])
|
|
7255
7293
|
}, assistantMovedFieldsHint).superRefine((value, ctx) => {
|
|
7256
7294
|
if (value.cors && value.endpoint) {
|
|
7257
7295
|
ctx.addIssue({
|
|
7258
|
-
code:
|
|
7296
|
+
code: z54.ZodIssueCode.custom,
|
|
7259
7297
|
message: "ai.assistant.cors only applies to the generated route; with ai.assistant.endpoint, CORS is that backend's job.",
|
|
7260
7298
|
path: ["cors"]
|
|
7261
7299
|
});
|
|
7262
7300
|
}
|
|
7263
7301
|
}).optional(),
|
|
7264
|
-
openInChat:
|
|
7265
|
-
|
|
7266
|
-
|
|
7302
|
+
openInChat: z54.union([
|
|
7303
|
+
z54.boolean(),
|
|
7304
|
+
z54.array(z54.enum(openInChatProviders)).refine((value) => new Set(value).size === value.length, {
|
|
7267
7305
|
message: "ai.openInChat must not repeat a provider."
|
|
7268
7306
|
})
|
|
7269
7307
|
]).default(true).transform((value) => {
|
|
@@ -7273,94 +7311,94 @@ var aiConfigFields = {
|
|
|
7273
7311
|
return value;
|
|
7274
7312
|
})
|
|
7275
7313
|
};
|
|
7276
|
-
var aiConfigSchema =
|
|
7314
|
+
var aiConfigSchema = z54.strictObject(aiConfigFields, removedKeysHint({
|
|
7277
7315
|
...movedToAgentsHints("ai"),
|
|
7278
7316
|
ask: "ai.ask was renamed to ai.assistant."
|
|
7279
7317
|
}));
|
|
7280
|
-
var featuredLinkSchema =
|
|
7281
|
-
href:
|
|
7318
|
+
var featuredLinkSchema = z54.strictObject({
|
|
7319
|
+
href: z54.string(),
|
|
7282
7320
|
icon: iconName.optional(),
|
|
7283
|
-
label:
|
|
7321
|
+
label: z54.string()
|
|
7284
7322
|
});
|
|
7285
|
-
var headerActionSchema =
|
|
7286
|
-
href:
|
|
7287
|
-
label:
|
|
7323
|
+
var headerActionSchema = z54.strictObject({
|
|
7324
|
+
href: z54.string(),
|
|
7325
|
+
label: z54.string()
|
|
7288
7326
|
});
|
|
7289
|
-
var navigationConfigSchema =
|
|
7290
|
-
actions:
|
|
7327
|
+
var navigationConfigSchema = z54.strictObject({
|
|
7328
|
+
actions: z54.array(headerActionSchema).default([]),
|
|
7291
7329
|
cta: headerActionSchema.optional(),
|
|
7292
|
-
featured:
|
|
7293
|
-
repo:
|
|
7294
|
-
selectors:
|
|
7295
|
-
sidebar:
|
|
7296
|
-
|
|
7297
|
-
|
|
7330
|
+
featured: z54.array(featuredLinkSchema).default([]),
|
|
7331
|
+
repo: z54.union([z54.boolean(), httpUrlSchema]).default(true),
|
|
7332
|
+
selectors: z54.array(navSelectorSchema).default([]),
|
|
7333
|
+
sidebar: z54.union([
|
|
7334
|
+
z54.array(sidebarItemSchema),
|
|
7335
|
+
z54.strictObject({
|
|
7298
7336
|
display: sidebarDisplaySchema.default("flat"),
|
|
7299
|
-
items:
|
|
7337
|
+
items: z54.array(sidebarItemSchema).optional()
|
|
7300
7338
|
})
|
|
7301
7339
|
]).prefault({}).transform((value) => Array.isArray(value) ? { display: "flat", items: value } : value),
|
|
7302
|
-
tabs:
|
|
7340
|
+
tabs: z54.array(navTabSchema).default([])
|
|
7303
7341
|
});
|
|
7304
|
-
var exportConfigSchema =
|
|
7305
|
-
|
|
7306
|
-
|
|
7307
|
-
epub:
|
|
7308
|
-
pdf:
|
|
7342
|
+
var exportConfigSchema = z54.union([
|
|
7343
|
+
z54.boolean(),
|
|
7344
|
+
z54.strictObject({
|
|
7345
|
+
epub: z54.boolean().default(false),
|
|
7346
|
+
pdf: z54.boolean().default(false)
|
|
7309
7347
|
})
|
|
7310
7348
|
]).transform((value) => isBoolean2(value) ? { epub: value, pdf: value } : value);
|
|
7311
|
-
var localeSchema =
|
|
7312
|
-
code:
|
|
7313
|
-
dir:
|
|
7314
|
-
label:
|
|
7315
|
-
style:
|
|
7316
|
-
});
|
|
7317
|
-
var i18nConfigSchema =
|
|
7318
|
-
defaultLocale:
|
|
7319
|
-
fallbackLocale:
|
|
7320
|
-
hideDefaultLocalePrefix:
|
|
7321
|
-
locales:
|
|
7322
|
-
parser:
|
|
7349
|
+
var localeSchema = z54.strictObject({
|
|
7350
|
+
code: z54.string().min(1),
|
|
7351
|
+
dir: z54.enum(["ltr", "rtl"]).default("ltr"),
|
|
7352
|
+
label: z54.string(),
|
|
7353
|
+
style: z54.string().optional()
|
|
7354
|
+
});
|
|
7355
|
+
var i18nConfigSchema = z54.strictObject({
|
|
7356
|
+
defaultLocale: z54.string().default("en"),
|
|
7357
|
+
fallbackLocale: z54.string().nullable().optional(),
|
|
7358
|
+
hideDefaultLocalePrefix: z54.boolean().default(true),
|
|
7359
|
+
locales: z54.array(localeSchema).min(1),
|
|
7360
|
+
parser: z54.enum(["dir", "dot"]).default("dir"),
|
|
7323
7361
|
ui: uiLocaleOverridesSchema.optional()
|
|
7324
7362
|
}).superRefine((value, ctx) => {
|
|
7325
7363
|
const codes = new Set(value.locales.map((locale) => locale.code));
|
|
7326
7364
|
if (!codes.has(value.defaultLocale)) {
|
|
7327
7365
|
ctx.addIssue({
|
|
7328
|
-
code:
|
|
7366
|
+
code: z54.ZodIssueCode.custom,
|
|
7329
7367
|
message: `i18n.defaultLocale "${value.defaultLocale}" must match one of i18n.locales.`,
|
|
7330
7368
|
path: ["defaultLocale"]
|
|
7331
7369
|
});
|
|
7332
7370
|
}
|
|
7333
7371
|
if (value.fallbackLocale !== null && value.fallbackLocale !== undefined && !codes.has(value.fallbackLocale)) {
|
|
7334
7372
|
ctx.addIssue({
|
|
7335
|
-
code:
|
|
7373
|
+
code: z54.ZodIssueCode.custom,
|
|
7336
7374
|
message: `i18n.fallbackLocale "${value.fallbackLocale}" must match one of i18n.locales.`,
|
|
7337
7375
|
path: ["fallbackLocale"]
|
|
7338
7376
|
});
|
|
7339
7377
|
}
|
|
7340
7378
|
});
|
|
7341
7379
|
var VERSION_ID = /^[A-Za-z][\w.-]*$/u;
|
|
7342
|
-
var archivedVersionSchema =
|
|
7343
|
-
banner:
|
|
7344
|
-
canonical:
|
|
7345
|
-
id:
|
|
7346
|
-
label:
|
|
7347
|
-
noindex:
|
|
7348
|
-
});
|
|
7349
|
-
var versionsConfigSchema =
|
|
7350
|
-
archived:
|
|
7351
|
-
current:
|
|
7352
|
-
badge:
|
|
7353
|
-
label:
|
|
7380
|
+
var archivedVersionSchema = z54.strictObject({
|
|
7381
|
+
banner: z54.union([z54.boolean(), z54.string()]).default(true),
|
|
7382
|
+
canonical: z54.enum(["latest", "self"]).default("latest"),
|
|
7383
|
+
id: z54.string().regex(VERSION_ID, 'Version ids must start with a letter (e.g. "v1.0") and contain only letters, digits, dots, hyphens, and underscores.'),
|
|
7384
|
+
label: z54.string().optional(),
|
|
7385
|
+
noindex: z54.boolean().default(false)
|
|
7386
|
+
});
|
|
7387
|
+
var versionsConfigSchema = z54.strictObject({
|
|
7388
|
+
archived: z54.array(archivedVersionSchema).default([]),
|
|
7389
|
+
current: z54.strictObject({
|
|
7390
|
+
badge: z54.string().optional(),
|
|
7391
|
+
label: z54.string()
|
|
7354
7392
|
}),
|
|
7355
|
-
switcher:
|
|
7356
|
-
redirect:
|
|
7393
|
+
switcher: z54.strictObject({
|
|
7394
|
+
redirect: z54.enum(["same-page", "root"]).default("same-page")
|
|
7357
7395
|
}).prefault({})
|
|
7358
7396
|
}).superRefine((value, ctx) => {
|
|
7359
7397
|
const seen = new Set;
|
|
7360
7398
|
for (const [position, version] of value.archived.entries()) {
|
|
7361
7399
|
if (seen.has(version.id)) {
|
|
7362
7400
|
ctx.addIssue({
|
|
7363
|
-
code:
|
|
7401
|
+
code: z54.ZodIssueCode.custom,
|
|
7364
7402
|
message: `versions.archived declares "${version.id}" more than once.`,
|
|
7365
7403
|
path: ["archived", position, "id"]
|
|
7366
7404
|
});
|
|
@@ -7380,78 +7418,78 @@ var REDIRECT_START = {
|
|
|
7380
7418
|
message: "redirects take root-relative paths or full URLs: `to` must start with `/` (`/new-page`, not `new-page`) or be an absolute URL (`https://…`)."
|
|
7381
7419
|
}
|
|
7382
7420
|
};
|
|
7383
|
-
var exactRedirectPath = (end) =>
|
|
7421
|
+
var exactRedirectPath = (end) => z54.string().refine(REDIRECT_START[end].allows, {
|
|
7384
7422
|
message: REDIRECT_START[end].message
|
|
7385
7423
|
}).refine((path) => !REDIRECT_PATTERN.test(path.replace(URL_ORIGIN, "")), {
|
|
7386
7424
|
message: `redirects take exact paths: \`${end}\` can't hold a \`:param\` segment or a \`*\` wildcard. Add one redirect per path, or put pattern rules in your host's redirect config (vercel.json, _redirects).`
|
|
7387
7425
|
});
|
|
7388
|
-
var redirectSchema =
|
|
7426
|
+
var redirectSchema = z54.strictObject({
|
|
7389
7427
|
from: exactRedirectPath("from"),
|
|
7390
|
-
status:
|
|
7428
|
+
status: z54.union([z54.literal(301), z54.literal(302), z54.literal(307), z54.literal(308)]).default(301),
|
|
7391
7429
|
to: exactRedirectPath("to")
|
|
7392
7430
|
});
|
|
7393
|
-
var imageRemotePatternSchema =
|
|
7394
|
-
hostname:
|
|
7395
|
-
pathname:
|
|
7396
|
-
port:
|
|
7397
|
-
protocol:
|
|
7431
|
+
var imageRemotePatternSchema = z54.strictObject({
|
|
7432
|
+
hostname: z54.string().optional(),
|
|
7433
|
+
pathname: z54.string().optional(),
|
|
7434
|
+
port: z54.string().optional(),
|
|
7435
|
+
protocol: z54.string().optional()
|
|
7398
7436
|
});
|
|
7399
|
-
var imageConfigSchema =
|
|
7400
|
-
domains:
|
|
7401
|
-
remotePatterns:
|
|
7437
|
+
var imageConfigSchema = z54.strictObject({
|
|
7438
|
+
domains: z54.array(z54.string()).default([]),
|
|
7439
|
+
remotePatterns: z54.array(imageRemotePatternSchema).default([])
|
|
7402
7440
|
});
|
|
7403
|
-
var xConfigSchema =
|
|
7441
|
+
var xConfigSchema = z54.strictObject({
|
|
7404
7442
|
creator: xHandleSchema,
|
|
7405
7443
|
handle: xHandleSchema
|
|
7406
7444
|
});
|
|
7407
|
-
var ogColorSchema =
|
|
7408
|
-
var ogPaletteSchema =
|
|
7445
|
+
var ogColorSchema = z54.string();
|
|
7446
|
+
var ogPaletteSchema = z54.strictObject({
|
|
7409
7447
|
accent: ogColorSchema.optional(),
|
|
7410
7448
|
background: ogColorSchema.optional(),
|
|
7411
7449
|
border: ogColorSchema.optional(),
|
|
7412
7450
|
foreground: ogColorSchema.optional(),
|
|
7413
7451
|
muted: ogColorSchema.optional()
|
|
7414
7452
|
});
|
|
7415
|
-
var ogFontWeightSchema =
|
|
7416
|
-
|
|
7417
|
-
|
|
7418
|
-
|
|
7453
|
+
var ogFontWeightSchema = z54.union([
|
|
7454
|
+
z54.number().int().positive(),
|
|
7455
|
+
z54.array(z54.number().int().positive()),
|
|
7456
|
+
z54.string().regex(/^\d+\.\.\d+$/u)
|
|
7419
7457
|
]);
|
|
7420
|
-
var ogFontStyleSchema =
|
|
7421
|
-
var ogFontSchema =
|
|
7422
|
-
|
|
7423
|
-
|
|
7424
|
-
name:
|
|
7425
|
-
style:
|
|
7458
|
+
var ogFontStyleSchema = z54.enum(["normal", "italic"]);
|
|
7459
|
+
var ogFontSchema = z54.union([
|
|
7460
|
+
z54.string(),
|
|
7461
|
+
z54.strictObject({
|
|
7462
|
+
name: z54.string(),
|
|
7463
|
+
style: z54.union([ogFontStyleSchema, z54.array(ogFontStyleSchema)]).optional(),
|
|
7426
7464
|
weight: ogFontWeightSchema.optional()
|
|
7427
7465
|
}),
|
|
7428
|
-
|
|
7429
|
-
name:
|
|
7430
|
-
src:
|
|
7466
|
+
z54.strictObject({
|
|
7467
|
+
name: z54.string(),
|
|
7468
|
+
src: z54.string().min(1),
|
|
7431
7469
|
style: ogFontStyleSchema.optional(),
|
|
7432
|
-
weight:
|
|
7470
|
+
weight: z54.number().int().positive().optional()
|
|
7433
7471
|
})
|
|
7434
7472
|
]);
|
|
7435
|
-
var ogConfigSchema =
|
|
7436
|
-
description:
|
|
7437
|
-
enabled:
|
|
7438
|
-
fonts:
|
|
7439
|
-
logo:
|
|
7473
|
+
var ogConfigSchema = z54.strictObject({
|
|
7474
|
+
description: z54.union([z54.string(), z54.literal(false)]).optional(),
|
|
7475
|
+
enabled: z54.boolean().optional(),
|
|
7476
|
+
fonts: z54.array(ogFontSchema).optional(),
|
|
7477
|
+
logo: z54.union([z54.string(), z54.literal(false)]).optional(),
|
|
7440
7478
|
palette: ogPaletteSchema.optional(),
|
|
7441
|
-
site:
|
|
7442
|
-
titles:
|
|
7479
|
+
site: z54.union([z54.string(), z54.literal(false)]).optional(),
|
|
7480
|
+
titles: z54.record(z54.string(), z54.string()).optional()
|
|
7443
7481
|
});
|
|
7444
|
-
var rssConfigSchema =
|
|
7445
|
-
enabled:
|
|
7446
|
-
limit:
|
|
7447
|
-
types:
|
|
7482
|
+
var rssConfigSchema = z54.strictObject({
|
|
7483
|
+
enabled: z54.boolean().default(true),
|
|
7484
|
+
limit: z54.number().int().positive().default(50),
|
|
7485
|
+
types: z54.array(z54.string()).default(["blog", "changelog"])
|
|
7448
7486
|
});
|
|
7449
|
-
var contentSignalsObjectSchema =
|
|
7450
|
-
aiInput:
|
|
7451
|
-
aiTrain:
|
|
7452
|
-
search:
|
|
7487
|
+
var contentSignalsObjectSchema = z54.strictObject({
|
|
7488
|
+
aiInput: z54.boolean().default(true),
|
|
7489
|
+
aiTrain: z54.boolean().default(true),
|
|
7490
|
+
search: z54.boolean().default(true)
|
|
7453
7491
|
});
|
|
7454
|
-
var contentSignalsSchema =
|
|
7492
|
+
var contentSignalsSchema = z54.union([z54.boolean(), contentSignalsObjectSchema]).transform((value) => {
|
|
7455
7493
|
if (value === true) {
|
|
7456
7494
|
return contentSignalsObjectSchema.parse({});
|
|
7457
7495
|
}
|
|
@@ -7460,83 +7498,83 @@ var contentSignalsSchema = z53.union([z53.boolean(), contentSignalsObjectSchema]
|
|
|
7460
7498
|
}
|
|
7461
7499
|
return value;
|
|
7462
7500
|
});
|
|
7463
|
-
var postalAddressSchema =
|
|
7464
|
-
addressCountry:
|
|
7465
|
-
addressLocality:
|
|
7466
|
-
addressRegion:
|
|
7467
|
-
postalCode:
|
|
7468
|
-
streetAddress:
|
|
7501
|
+
var postalAddressSchema = z54.strictObject({
|
|
7502
|
+
addressCountry: z54.string().optional(),
|
|
7503
|
+
addressLocality: z54.string().optional(),
|
|
7504
|
+
addressRegion: z54.string().optional(),
|
|
7505
|
+
postalCode: z54.string().optional(),
|
|
7506
|
+
streetAddress: z54.string().optional()
|
|
7469
7507
|
});
|
|
7470
|
-
var organizationConfigSchema =
|
|
7508
|
+
var organizationConfigSchema = z54.strictObject({
|
|
7471
7509
|
address: postalAddressSchema.optional(),
|
|
7472
|
-
contactType:
|
|
7473
|
-
email:
|
|
7474
|
-
logo:
|
|
7475
|
-
name:
|
|
7476
|
-
sameAs:
|
|
7477
|
-
telephone:
|
|
7478
|
-
url:
|
|
7479
|
-
});
|
|
7480
|
-
var softwareConfigSchema =
|
|
7481
|
-
applicationCategory:
|
|
7482
|
-
description:
|
|
7483
|
-
license:
|
|
7484
|
-
name:
|
|
7485
|
-
operatingSystem:
|
|
7486
|
-
price:
|
|
7487
|
-
priceCurrency:
|
|
7488
|
-
sameAs:
|
|
7510
|
+
contactType: z54.string().default("customer support"),
|
|
7511
|
+
email: z54.email().optional(),
|
|
7512
|
+
logo: z54.string().optional(),
|
|
7513
|
+
name: z54.string().optional(),
|
|
7514
|
+
sameAs: z54.array(z54.url()).default([]),
|
|
7515
|
+
telephone: z54.string().optional(),
|
|
7516
|
+
url: z54.url().optional()
|
|
7517
|
+
});
|
|
7518
|
+
var softwareConfigSchema = z54.strictObject({
|
|
7519
|
+
applicationCategory: z54.string().default("DeveloperApplication"),
|
|
7520
|
+
description: z54.string().optional(),
|
|
7521
|
+
license: z54.string().optional(),
|
|
7522
|
+
name: z54.string().optional(),
|
|
7523
|
+
operatingSystem: z54.string().optional(),
|
|
7524
|
+
price: z54.union([z54.number().nonnegative(), z54.string()]).optional(),
|
|
7525
|
+
priceCurrency: z54.string().default("USD"),
|
|
7526
|
+
sameAs: z54.array(z54.url()).default([])
|
|
7489
7527
|
});
|
|
7490
7528
|
var seoConfigFields = {
|
|
7491
7529
|
og: ogConfigSchema.default({}),
|
|
7492
7530
|
organization: organizationConfigSchema.optional(),
|
|
7493
|
-
robots:
|
|
7531
|
+
robots: z54.boolean().default(true),
|
|
7494
7532
|
rss: rssConfigSchema.prefault({}),
|
|
7495
|
-
sitemap:
|
|
7496
|
-
software:
|
|
7533
|
+
sitemap: z54.boolean().default(true),
|
|
7534
|
+
software: z54.union([z54.boolean(), softwareConfigSchema]).optional().transform((value) => {
|
|
7497
7535
|
if (value === true) {
|
|
7498
7536
|
return softwareConfigSchema.parse({});
|
|
7499
7537
|
}
|
|
7500
7538
|
return value === false ? undefined : value;
|
|
7501
7539
|
}),
|
|
7502
|
-
structuredData:
|
|
7540
|
+
structuredData: z54.boolean().default(true),
|
|
7503
7541
|
x: xConfigSchema.default({})
|
|
7504
7542
|
};
|
|
7505
|
-
var seoConfigSchema =
|
|
7543
|
+
var seoConfigSchema = z54.strictObject(seoConfigFields, removedKeysHint({
|
|
7506
7544
|
agentReadability: "seo.agentReadability moved to agents.agentReadability.",
|
|
7507
7545
|
contentSignals: "seo.contentSignals moved to agents.contentSignals."
|
|
7508
7546
|
}));
|
|
7509
|
-
var agentsConfigSchema =
|
|
7510
|
-
agentReadability:
|
|
7511
|
-
api:
|
|
7512
|
-
catalog:
|
|
7547
|
+
var agentsConfigSchema = z54.strictObject({
|
|
7548
|
+
agentReadability: z54.boolean().default(true),
|
|
7549
|
+
api: z54.boolean().default(true),
|
|
7550
|
+
catalog: z54.union([z54.boolean(), aiCatalogObjectSchema]).default(true).transform((value) => isBoolean2(value) ? { enabled: value, queries: {} } : value),
|
|
7513
7551
|
contentSignals: contentSignalsSchema.prefault(true),
|
|
7514
|
-
llmsTxt:
|
|
7515
|
-
markdownComponents:
|
|
7552
|
+
llmsTxt: z54.union([z54.boolean(), llmsTxtObjectSchema]).default(true).transform((value) => isBoolean2(value) ? { enabled: value, openapi: true } : value),
|
|
7553
|
+
markdownComponents: z54.record(z54.string(), z54.custom((value) => typeof value === "function", {
|
|
7516
7554
|
message: "Expected a serializer function."
|
|
7517
7555
|
})).default({}),
|
|
7518
7556
|
mcp: mcpConfigSchema.prefault({}),
|
|
7519
|
-
skills:
|
|
7520
|
-
webBotAuth:
|
|
7521
|
-
keys:
|
|
7557
|
+
skills: z54.string().min(1).optional(),
|
|
7558
|
+
webBotAuth: z54.strictObject({
|
|
7559
|
+
keys: z54.array(publicJwkSchema).default([])
|
|
7522
7560
|
}).prefault({}),
|
|
7523
|
-
webmcp:
|
|
7561
|
+
webmcp: z54.boolean().default(true)
|
|
7524
7562
|
});
|
|
7525
7563
|
var githubOriginSchema = httpUrlSchema.transform((value) => new URL(value).origin);
|
|
7526
7564
|
var githubApiSchema = httpUrlSchema.transform((value) => {
|
|
7527
7565
|
const { origin, pathname } = new URL(value);
|
|
7528
7566
|
return trimEnd(`${origin}${pathname}`, "/");
|
|
7529
7567
|
});
|
|
7530
|
-
var githubConfigSchema =
|
|
7568
|
+
var githubConfigSchema = z54.strictObject({
|
|
7531
7569
|
api: githubApiSchema.optional(),
|
|
7532
|
-
branch:
|
|
7533
|
-
dir:
|
|
7570
|
+
branch: z54.string().default("main"),
|
|
7571
|
+
dir: z54.string().optional(),
|
|
7534
7572
|
host: githubOriginSchema.default(PUBLIC_HOST_URL),
|
|
7535
|
-
owner:
|
|
7536
|
-
repo:
|
|
7573
|
+
owner: z54.string(),
|
|
7574
|
+
repo: z54.string()
|
|
7537
7575
|
});
|
|
7538
7576
|
var isThemeObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
7539
|
-
var codeThemeSchema =
|
|
7577
|
+
var codeThemeSchema = z54.custom((value) => {
|
|
7540
7578
|
if (isString2(value)) {
|
|
7541
7579
|
return true;
|
|
7542
7580
|
}
|
|
@@ -7549,18 +7587,18 @@ var codeThemeSchema = z53.custom((value) => {
|
|
|
7549
7587
|
const hasContent = value.settings !== undefined || value.tokenColors !== undefined || value.colors !== undefined;
|
|
7550
7588
|
return settingsValid && tokenColorsValid && colorsValid && hasContent;
|
|
7551
7589
|
}, "Expected a Shiki theme name or custom theme object");
|
|
7552
|
-
var codeBlockThemeSchema =
|
|
7590
|
+
var codeBlockThemeSchema = z54.strictObject({
|
|
7553
7591
|
dark: codeThemeSchema.default("github-dark"),
|
|
7554
7592
|
light: codeThemeSchema.default("github-light")
|
|
7555
7593
|
});
|
|
7556
|
-
var examplesConfigSchema =
|
|
7557
|
-
|
|
7558
|
-
|
|
7559
|
-
css:
|
|
7560
|
-
source:
|
|
7594
|
+
var examplesConfigSchema = z54.union([
|
|
7595
|
+
z54.string(),
|
|
7596
|
+
z54.strictObject({
|
|
7597
|
+
css: z54.string().optional(),
|
|
7598
|
+
source: z54.string().default("examples")
|
|
7561
7599
|
})
|
|
7562
7600
|
]).transform((value) => isString2(value) ? { source: value } : value);
|
|
7563
|
-
var lastModifiedConfigSchema =
|
|
7601
|
+
var lastModifiedConfigSchema = z54.union([z54.literal(false), z54.enum(["git", "frontmatter"])], {
|
|
7564
7602
|
error: (issue) => issue.code === "invalid_union" ? 'lastModified takes false, "git", or "frontmatter": `true` became "git" and `{ type: "…" }` became the bare string.' : undefined
|
|
7565
7603
|
});
|
|
7566
7604
|
var DATE_FORM_FIELDS = [
|
|
@@ -7571,44 +7609,54 @@ var DATE_FORM_FIELDS = [
|
|
|
7571
7609
|
"month",
|
|
7572
7610
|
"day"
|
|
7573
7611
|
];
|
|
7574
|
-
var
|
|
7575
|
-
|
|
7576
|
-
|
|
7577
|
-
|
|
7578
|
-
|
|
7579
|
-
|
|
7580
|
-
|
|
7581
|
-
|
|
7582
|
-
|
|
7583
|
-
|
|
7612
|
+
var isKnownTimeZone = (timeZone) => {
|
|
7613
|
+
try {
|
|
7614
|
+
Intl.DateTimeFormat("en", { timeZone });
|
|
7615
|
+
return true;
|
|
7616
|
+
} catch {
|
|
7617
|
+
return false;
|
|
7618
|
+
}
|
|
7619
|
+
};
|
|
7620
|
+
var dateFormatConfigSchema = z54.strictObject({
|
|
7621
|
+
calendar: z54.string().optional(),
|
|
7622
|
+
dateStyle: z54.enum(["full", "long", "medium", "short"]).optional(),
|
|
7623
|
+
day: z54.enum(["numeric", "2-digit"]).optional(),
|
|
7624
|
+
era: z54.enum(["long", "short", "narrow"]).optional(),
|
|
7625
|
+
month: z54.enum(["numeric", "2-digit", "long", "short", "narrow"]).optional(),
|
|
7626
|
+
numberingSystem: z54.string().optional(),
|
|
7627
|
+
timeZone: z54.string().refine(isKnownTimeZone, {
|
|
7628
|
+
message: 'Unknown time zone; use an IANA name like "Asia/Tokyo" or "UTC".'
|
|
7629
|
+
}).optional(),
|
|
7630
|
+
weekday: z54.enum(["long", "short", "narrow"]).optional(),
|
|
7631
|
+
year: z54.enum(["numeric", "2-digit"]).optional()
|
|
7584
7632
|
}).refine((value) => value.dateStyle === undefined || value.weekday === undefined && value.era === undefined && value.year === undefined && value.month === undefined && value.day === undefined, {
|
|
7585
7633
|
message: "dateFormat.dateStyle can't be combined with weekday/era/year/month/day; use one or the other."
|
|
7586
7634
|
}).transform((value) => DATE_FORM_FIELDS.some((field) => value[field] !== undefined) ? value : { ...value, dateStyle: "long" });
|
|
7587
|
-
var codeConfigSchema =
|
|
7588
|
-
icons:
|
|
7635
|
+
var codeConfigSchema = z54.strictObject({
|
|
7636
|
+
icons: z54.boolean().default(true),
|
|
7589
7637
|
theme: codeBlockThemeSchema.prefault({}),
|
|
7590
|
-
wrap:
|
|
7638
|
+
wrap: z54.boolean().default(false)
|
|
7591
7639
|
});
|
|
7592
7640
|
var markdownConfigFields = {
|
|
7593
7641
|
code: codeConfigSchema.prefault({}),
|
|
7594
|
-
externalLinks:
|
|
7595
|
-
headingAnchors:
|
|
7596
|
-
imageZoom:
|
|
7642
|
+
externalLinks: z54.boolean().default(false),
|
|
7643
|
+
headingAnchors: z54.boolean().default(true),
|
|
7644
|
+
imageZoom: z54.boolean().default(true)
|
|
7597
7645
|
};
|
|
7598
|
-
var markdownConfigSchema =
|
|
7646
|
+
var markdownConfigSchema = z54.strictObject(markdownConfigFields, removedKeysHint({
|
|
7599
7647
|
codeBlocks: "markdown.codeBlocks was merged into markdown.code: move theme: { light, dark } under markdown.code."
|
|
7600
7648
|
}));
|
|
7601
|
-
var reactConfigSchema =
|
|
7602
|
-
compiler:
|
|
7649
|
+
var reactConfigSchema = z54.strictObject({
|
|
7650
|
+
compiler: z54.boolean().default(true)
|
|
7603
7651
|
});
|
|
7604
|
-
var frontmatterConfigSchema =
|
|
7652
|
+
var frontmatterConfigSchema = z54.strictObject({
|
|
7605
7653
|
extend: customKeySchemaRecord("frontmatter.extend")
|
|
7606
7654
|
});
|
|
7607
|
-
var tocConfigSchema =
|
|
7608
|
-
|
|
7609
|
-
|
|
7610
|
-
maxHeadingLevel:
|
|
7611
|
-
minHeadingLevel:
|
|
7655
|
+
var tocConfigSchema = z54.union([
|
|
7656
|
+
z54.boolean(),
|
|
7657
|
+
z54.strictObject({
|
|
7658
|
+
maxHeadingLevel: z54.number().int().min(1).max(6).optional(),
|
|
7659
|
+
minHeadingLevel: z54.number().int().min(1).max(6).optional()
|
|
7612
7660
|
})
|
|
7613
7661
|
]).default(true).transform((value) => {
|
|
7614
7662
|
if (isBoolean2(value)) {
|
|
@@ -7622,37 +7670,37 @@ var tocConfigSchema = z53.union([
|
|
|
7622
7670
|
}).refine((value) => value.minLevel <= value.maxLevel, {
|
|
7623
7671
|
message: "toc.minHeadingLevel must be less than or equal to toc.maxHeadingLevel."
|
|
7624
7672
|
});
|
|
7625
|
-
var blumeConfigSchema =
|
|
7673
|
+
var blumeConfigSchema = z54.strictObject({
|
|
7626
7674
|
agents: agentsConfigSchema.prefault({}),
|
|
7627
7675
|
ai: aiConfigSchema.prefault({}),
|
|
7628
7676
|
analytics: analyticsConfigSchema,
|
|
7629
7677
|
banner: bannerConfigSchema.optional(),
|
|
7630
|
-
basePath:
|
|
7678
|
+
basePath: z54.string().refine((value) => !URL_ORIGIN.test(value) && !/[#?]/u.test(value), {
|
|
7631
7679
|
message: `basePath takes a path like "/docs", not a URL: no scheme, host, query, or fragment. The site's origin goes in deployment.site.`
|
|
7632
7680
|
}).optional().transform((value) => normalizeBasePath(value)),
|
|
7633
7681
|
content: contentConfigSchema.prefault({}),
|
|
7634
7682
|
dateFormat: dateFormatConfigSchema.default({ dateStyle: "long" }),
|
|
7635
7683
|
deployment: resolvedDeploymentSchema.prefault({}),
|
|
7636
|
-
description:
|
|
7684
|
+
description: z54.string().optional(),
|
|
7637
7685
|
examples: examplesConfigSchema.prefault("examples"),
|
|
7638
7686
|
export: exportConfigSchema.prefault(false),
|
|
7639
|
-
feedback:
|
|
7687
|
+
feedback: z54.boolean().default(true),
|
|
7640
7688
|
frontmatter: frontmatterConfigSchema.prefault({}),
|
|
7641
7689
|
github: githubConfigSchema.optional(),
|
|
7642
7690
|
i18n: i18nConfigSchema.optional(),
|
|
7643
7691
|
image: imageConfigSchema.prefault({}),
|
|
7644
|
-
integrations:
|
|
7692
|
+
integrations: z54.array(z54.custom()).default([]),
|
|
7645
7693
|
lastModified: lastModifiedConfigSchema.default(false),
|
|
7646
7694
|
logo: logoConfigSchema.optional(),
|
|
7647
7695
|
markdown: markdownConfigSchema.prefault({}),
|
|
7648
7696
|
navigation: navigationConfigSchema.prefault({}),
|
|
7649
7697
|
react: reactConfigSchema.prefault({}),
|
|
7650
|
-
redirects:
|
|
7698
|
+
redirects: z54.array(redirectSchema).default([]),
|
|
7651
7699
|
reference: referenceConfigSchema,
|
|
7652
7700
|
search: searchConfigSchema.prefault({}),
|
|
7653
7701
|
seo: seoConfigSchema.prefault({}),
|
|
7654
7702
|
theme: themeConfigSchema.prefault({}),
|
|
7655
|
-
title:
|
|
7703
|
+
title: z54.string().default("Documentation"),
|
|
7656
7704
|
toc: tocConfigSchema,
|
|
7657
7705
|
versions: versionsConfigSchema.optional()
|
|
7658
7706
|
}, {
|
|
@@ -7663,7 +7711,7 @@ var blumeConfigSchema = z53.strictObject({
|
|
|
7663
7711
|
for (const [position, version] of config.versions.archived.entries()) {
|
|
7664
7712
|
if (localeCodes.has(version.id.toLowerCase())) {
|
|
7665
7713
|
ctx.addIssue({
|
|
7666
|
-
code:
|
|
7714
|
+
code: z54.ZodIssueCode.custom,
|
|
7667
7715
|
message: `Version id "${version.id}" is also a configured locale code — rename the version (e.g. "v${version.id}").`,
|
|
7668
7716
|
path: ["versions", "archived", position, "id"]
|
|
7669
7717
|
});
|
|
@@ -7674,7 +7722,7 @@ var blumeConfigSchema = z53.strictObject({
|
|
|
7674
7722
|
for (const key of Object.keys(typeConfig.frontmatter)) {
|
|
7675
7723
|
if (Object.hasOwn(config.frontmatter.extend, key)) {
|
|
7676
7724
|
ctx.addIssue({
|
|
7677
|
-
code:
|
|
7725
|
+
code: z54.ZodIssueCode.custom,
|
|
7678
7726
|
message: `"${key}" is already declared in frontmatter.extend and cannot be redeclared for type "${typeName}".`,
|
|
7679
7727
|
path: ["content", "types", typeName, "frontmatter", key]
|
|
7680
7728
|
});
|
|
@@ -7683,7 +7731,7 @@ var blumeConfigSchema = z53.strictObject({
|
|
|
7683
7731
|
for (const [position, facet] of typeConfig.facets.entries()) {
|
|
7684
7732
|
if (!(Object.hasOwn(typeConfig.frontmatter, facet) || Object.hasOwn(config.frontmatter.extend, facet))) {
|
|
7685
7733
|
ctx.addIssue({
|
|
7686
|
-
code:
|
|
7734
|
+
code: z54.ZodIssueCode.custom,
|
|
7687
7735
|
message: `Facet "${facet}" for type "${typeName}" is not a declared custom frontmatter key — add it to the type's frontmatter map or frontmatter.extend.`,
|
|
7688
7736
|
path: ["content", "types", typeName, "facets", position]
|
|
7689
7737
|
});
|
|
@@ -7735,15 +7783,24 @@ var GROUP_FOLDER2 = /^\((?<label>.+)\)$/u;
|
|
|
7735
7783
|
var WORD_SPLIT2 = /[-_]/u;
|
|
7736
7784
|
var stripNumericPrefix = (segment) => stripOrderingPrefix(segment);
|
|
7737
7785
|
var groupLabel = (segment) => segment.match(GROUP_FOLDER2)?.groups?.label ?? null;
|
|
7786
|
+
var orderedGroupLabel = (segment) => groupLabel(segment) ?? groupLabel(stripNumericPrefix(segment));
|
|
7738
7787
|
var slugify = (text) => text.normalize("NFC").toLowerCase().trim().replaceAll(/[^\p{L}\p{M}\p{N}\s_-]/gu, "").replaceAll(/[\s_]+/gu, "-").replaceAll(/-+/gu, "-").replaceAll(/^-|-$/gu, "");
|
|
7739
7788
|
var slugifyPath = (text) => text.split("/").map(slugify).filter(Boolean).join("/");
|
|
7740
7789
|
var titleCase = (value) => value.split(WORD_SPLIT2).filter(Boolean).map(titleWord).join(" ");
|
|
7741
|
-
var sanitizeSegment = (segment) => segment.replaceAll(/[
|
|
7790
|
+
var sanitizeSegment = (segment) => segment.replaceAll(/[:#?%\p{Cc}]/gu, "");
|
|
7791
|
+
var UNLOADABLE_PATH = /[#?]/u;
|
|
7792
|
+
var unloadablePathDiagnostic = (path, file) => UNLOADABLE_PATH.test(path) ? {
|
|
7793
|
+
code: "BLUME_UNLOADABLE_FILE_NAME",
|
|
7794
|
+
file,
|
|
7795
|
+
message: `"${path}" has a "#" or "?" in its path, which Astro's content loader reads as the start of a URL fragment or query, so it can't load the file. It was left out of the site.`,
|
|
7796
|
+
severity: "error",
|
|
7797
|
+
suggestion: `Rename the file (or its folder) without "#" or "?". Both are dropped from the page's URL anyway, so the page keeps its route.`
|
|
7798
|
+
} : undefined;
|
|
7742
7799
|
var addRouteSegment = (part, segments, groups, ordered) => {
|
|
7743
7800
|
if (part === "") {
|
|
7744
7801
|
return;
|
|
7745
7802
|
}
|
|
7746
|
-
const group = groupLabel(part);
|
|
7803
|
+
const group = ordered ? orderedGroupLabel(part) : groupLabel(part);
|
|
7747
7804
|
if (group !== null) {
|
|
7748
7805
|
groups.push(group);
|
|
7749
7806
|
return;
|
|
@@ -7775,21 +7832,8 @@ var ATX_HEADING = /^ {0,3}(?<hashes>#{1,6})\s+(?<text>.+?)(?:\s+#+)?\s*$/u;
|
|
|
7775
7832
|
var SETEXT_UNDERLINE = /^ {0,3}(?<marker>=+|-+)\s*$/u;
|
|
7776
7833
|
var PARAGRAPH_INTERRUPT = /^ {0,3}(?:[-+*][ \t]|\d{1,9}[.)][ \t]|>)/u;
|
|
7777
7834
|
var THEMATIC_BREAK = /^ {0,3}(?:(?:-[ \t]*){3,}|(?:\*[ \t]*){3,}|(?:_[ \t]*){3,})$/u;
|
|
7778
|
-
var FRONT_MATTER_CLOSE = /^(?:-{3}|\.{3})\s*$/u;
|
|
7779
7835
|
var PROMPT_OPEN = /^<Prompt(?![\w-])/u;
|
|
7780
7836
|
var PROMPT_CLOSE = /<\/Prompt>/u;
|
|
7781
|
-
var linesWithoutFrontMatter = (body) => {
|
|
7782
|
-
const lines = body.split(`
|
|
7783
|
-
`);
|
|
7784
|
-
if (!/^-{3}\s*$/u.test(lines[0] ?? "")) {
|
|
7785
|
-
return { lines, offset: 0 };
|
|
7786
|
-
}
|
|
7787
|
-
if ((lines[1] ?? "").trim() === "") {
|
|
7788
|
-
return { lines, offset: 0 };
|
|
7789
|
-
}
|
|
7790
|
-
const close = lines.findIndex((line, index) => index > 0 && FRONT_MATTER_CLOSE.test(line));
|
|
7791
|
-
return close === -1 ? { lines, offset: 0 } : { lines: lines.slice(close + 1), offset: close + 1 };
|
|
7792
|
-
};
|
|
7793
7837
|
var BARE_CURLY_MARKER = /(?<!\\)\{#(?<id>[^\s}]+)\}(?:\s*\[(?:#[^\s\]]+|!?toc)\])*\s*$/u;
|
|
7794
7838
|
var HTML_ID = /<[a-z][a-z0-9-]*(?:\s[^<>]*?)?\sid=(?:(?<quote>["'])(?<quoted>[^"'<>]+)\k<quote>|\{(?<jsxQuote>["'])(?<jsx>[^"'<>]+)\k<jsxQuote>\}|(?<bare>[^\s"'=<>`{}]+))/gu;
|
|
7795
7839
|
var HTML_COMMENT = /<!--[\s\S]*?-->/gu;
|
|
@@ -7806,7 +7850,19 @@ var finishPromptTag = (line, start, state) => {
|
|
|
7806
7850
|
}
|
|
7807
7851
|
state.promptDepth += 1;
|
|
7808
7852
|
};
|
|
7809
|
-
var
|
|
7853
|
+
var HEADING_FEATURES = {
|
|
7854
|
+
...MARKDOWN_FEATURES,
|
|
7855
|
+
frontmatter: false,
|
|
7856
|
+
gfm: true
|
|
7857
|
+
};
|
|
7858
|
+
var HEADING_PARSE = {
|
|
7859
|
+
features: { ...HEADING_FEATURES, smartPunctuation: true }
|
|
7860
|
+
};
|
|
7861
|
+
var HEADING_TEXT_PARSE = {
|
|
7862
|
+
features: { ...HEADING_FEATURES, smartPunctuation: false }
|
|
7863
|
+
};
|
|
7864
|
+
var INLINE_MARKUP = /[\\`*_~^[\]<&'"]|--|\.\.\./u;
|
|
7865
|
+
var SMART_PUNCTUATION = /['"]|--|\.\.\./u;
|
|
7810
7866
|
var REF_DEFINITION = /^(?: {0,3}|[ \t]*(?:(?:>|(?:[-*+]|\d{1,9}[.)])[ \t])[ \t]*)+)\[(?<label>[^\]]+)\]:[ \t]*(?<rest>.*)$/u;
|
|
7811
7867
|
var refDefinitionLabels = (lines) => {
|
|
7812
7868
|
const labels = new Set;
|
|
@@ -7829,21 +7885,99 @@ var refDefinitionLabels = (lines) => {
|
|
|
7829
7885
|
}
|
|
7830
7886
|
return labels;
|
|
7831
7887
|
};
|
|
7832
|
-
var
|
|
7833
|
-
|
|
7834
|
-
|
|
7835
|
-
const text = markers.text.trim();
|
|
7836
|
-
if (text === "" && (markers.id !== undefined || markers.toc !== undefined)) {
|
|
7837
|
-
return {
|
|
7838
|
-
heading: { depth, slug: slugger.slug(unescaped), text: unescaped },
|
|
7839
|
-
pinned: false
|
|
7840
|
-
};
|
|
7888
|
+
var definitionsFor = (raw, labels) => {
|
|
7889
|
+
if (!raw.includes("[")) {
|
|
7890
|
+
return "";
|
|
7841
7891
|
}
|
|
7842
|
-
|
|
7843
|
-
|
|
7844
|
-
|
|
7892
|
+
const folded = raw.replaceAll(/\s+/gu, " ").toLowerCase();
|
|
7893
|
+
let definitions = "";
|
|
7894
|
+
for (const label of labels) {
|
|
7895
|
+
if (folded.includes(label)) {
|
|
7896
|
+
definitions += `
|
|
7897
|
+
|
|
7898
|
+
[${label}]: /`;
|
|
7899
|
+
}
|
|
7845
7900
|
}
|
|
7846
|
-
return
|
|
7901
|
+
return definitions;
|
|
7902
|
+
};
|
|
7903
|
+
var footnoteNumbers = (body) => {
|
|
7904
|
+
const numbers = new Map;
|
|
7905
|
+
const visit = (nodes) => {
|
|
7906
|
+
for (const node of nodes) {
|
|
7907
|
+
if (node.type === "footnoteReference") {
|
|
7908
|
+
if (!numbers.has(node.identifier)) {
|
|
7909
|
+
numbers.set(node.identifier, numbers.size + 1);
|
|
7910
|
+
}
|
|
7911
|
+
} else if (node.type !== "footnoteDefinition" && "children" in node) {
|
|
7912
|
+
visit(node.children);
|
|
7913
|
+
}
|
|
7914
|
+
}
|
|
7915
|
+
};
|
|
7916
|
+
const tree = markdownToMdast(body, HEADING_PARSE);
|
|
7917
|
+
visit("children" in tree ? tree.children : []);
|
|
7918
|
+
return numbers;
|
|
7919
|
+
};
|
|
7920
|
+
var inlineText = (nodes, context) => nodes.map((node) => {
|
|
7921
|
+
if (node.type === "html" || node.type === "image" || node.type === "imageReference") {
|
|
7922
|
+
return "";
|
|
7923
|
+
}
|
|
7924
|
+
if (node.type === "break") {
|
|
7925
|
+
return `
|
|
7926
|
+
`;
|
|
7927
|
+
}
|
|
7928
|
+
if (node.type === "footnoteReference") {
|
|
7929
|
+
const number = context.footnotes().get(node.identifier);
|
|
7930
|
+
return number === undefined ? `[^${node.label ?? node.identifier}]` : String(number);
|
|
7931
|
+
}
|
|
7932
|
+
if ("children" in node) {
|
|
7933
|
+
return inlineText(node.children, context);
|
|
7934
|
+
}
|
|
7935
|
+
return "value" in node ? node.value : "";
|
|
7936
|
+
}).join("");
|
|
7937
|
+
var plainHeading = (raw) => {
|
|
7938
|
+
const markers = parseHeadingMarkers(raw);
|
|
7939
|
+
return markers.text === "" ? { text: raw } : { id: markers.id, text: markers.text, toc: markers.toc };
|
|
7940
|
+
};
|
|
7941
|
+
var renderHeading = (raw, form, context, parse) => {
|
|
7942
|
+
if (!INLINE_MARKUP.test(raw)) {
|
|
7943
|
+
return plainHeading(raw);
|
|
7944
|
+
}
|
|
7945
|
+
const source = form === "atx" ? `# ${raw}` : `${raw}
|
|
7946
|
+
=`;
|
|
7947
|
+
const tree = markdownToMdast(`${source}${definitionsFor(raw, context.labels)}`, parse);
|
|
7948
|
+
const heading = "children" in tree ? tree.children.at(0) : undefined;
|
|
7949
|
+
if (heading?.type !== "heading") {
|
|
7950
|
+
return plainHeading(raw);
|
|
7951
|
+
}
|
|
7952
|
+
const { children } = heading;
|
|
7953
|
+
const text = inlineText(children, context);
|
|
7954
|
+
const last = children.at(-1);
|
|
7955
|
+
if (last?.type !== "text") {
|
|
7956
|
+
return { text };
|
|
7957
|
+
}
|
|
7958
|
+
const markers = parseHeadingMarkers(last.value);
|
|
7959
|
+
const stripped = last.value.length - markers.text.length;
|
|
7960
|
+
if (stripped === 0 || markers.text === "" && children.length === 1) {
|
|
7961
|
+
return { text };
|
|
7962
|
+
}
|
|
7963
|
+
return {
|
|
7964
|
+
id: markers.id,
|
|
7965
|
+
text: text.slice(0, text.length - stripped),
|
|
7966
|
+
toc: markers.toc
|
|
7967
|
+
};
|
|
7968
|
+
};
|
|
7969
|
+
var toHeading = (depth, raw, form, slugger, context) => {
|
|
7970
|
+
const rendered = renderHeading(raw, form, context, HEADING_PARSE);
|
|
7971
|
+
const display = SMART_PUNCTUATION.test(raw) ? renderHeading(raw, form, context, HEADING_TEXT_PARSE).text : rendered.text;
|
|
7972
|
+
const text = display.replaceAll(/[\t\n\f\r ]+/gu, " ").trim();
|
|
7973
|
+
if (rendered.id !== undefined) {
|
|
7974
|
+
occupySlug(slugger, rendered.id);
|
|
7975
|
+
return { heading: { depth, slug: rendered.id, text }, pinned: true };
|
|
7976
|
+
}
|
|
7977
|
+
return {
|
|
7978
|
+
heading: { depth, slug: slugger.slug(rendered.text), text },
|
|
7979
|
+
pinned: false
|
|
7980
|
+
};
|
|
7847
7981
|
};
|
|
7848
7982
|
var pushHeading = (headings, state, scanned, line) => {
|
|
7849
7983
|
headings.push(scanned.heading);
|
|
@@ -7855,13 +7989,13 @@ var noteCurlyMarker = (text, line, state) => {
|
|
|
7855
7989
|
state.curlyMarkers.push({ id, line });
|
|
7856
7990
|
}
|
|
7857
7991
|
};
|
|
7858
|
-
var scanContentLine = (line, state, slugger, headings,
|
|
7992
|
+
var scanContentLine = (line, state, slugger, headings, context) => {
|
|
7859
7993
|
state.anchorLines.push(line.replaceAll(INLINE_CODE, ""));
|
|
7860
7994
|
const atx = line.match(ATX_HEADING);
|
|
7861
7995
|
if (atx?.groups) {
|
|
7862
7996
|
const depth = atx.groups.hashes?.length ?? 1;
|
|
7863
7997
|
const text = (atx.groups.text ?? "").trim();
|
|
7864
|
-
pushHeading(headings, state, toHeading(depth, text, slugger,
|
|
7998
|
+
pushHeading(headings, state, toHeading(depth, text, "atx", slugger, context), state.line);
|
|
7865
7999
|
noteCurlyMarker(text, state.line, state);
|
|
7866
8000
|
state.paragraph = [];
|
|
7867
8001
|
return;
|
|
@@ -7869,8 +8003,9 @@ var scanContentLine = (line, state, slugger, headings, isRefDefined) => {
|
|
|
7869
8003
|
const setext = line.match(SETEXT_UNDERLINE);
|
|
7870
8004
|
if (setext?.groups && state.paragraph.length > 0) {
|
|
7871
8005
|
const depth = setext.groups.marker?.startsWith("=") ? 1 : 2;
|
|
7872
|
-
const text = state.paragraph.join(
|
|
7873
|
-
|
|
8006
|
+
const text = state.paragraph.join(`
|
|
8007
|
+
`);
|
|
8008
|
+
pushHeading(headings, state, toHeading(depth, text, "setext", slugger, context), state.line - 1);
|
|
7874
8009
|
noteCurlyMarker(text, state.paragraphStart, state);
|
|
7875
8010
|
state.paragraph = [];
|
|
7876
8011
|
return;
|
|
@@ -7911,7 +8046,7 @@ var scanCommentLine = (line, state) => {
|
|
|
7911
8046
|
}
|
|
7912
8047
|
return false;
|
|
7913
8048
|
};
|
|
7914
|
-
var scanHeadingLine = (line, state, slugger, headings,
|
|
8049
|
+
var scanHeadingLine = (line, state, slugger, headings, context) => {
|
|
7915
8050
|
if (state.fence === null && state.promptDepth === 0 && !state.promptTag && scanCommentLine(line, state)) {
|
|
7916
8051
|
state.anchorLines.push(line.replaceAll(INLINE_CODE, ""));
|
|
7917
8052
|
state.paragraph = [];
|
|
@@ -7941,7 +8076,7 @@ var scanHeadingLine = (line, state, slugger, headings, isRefDefined) => {
|
|
|
7941
8076
|
state.paragraph = [];
|
|
7942
8077
|
return;
|
|
7943
8078
|
}
|
|
7944
|
-
scanContentLine(line, state, slugger, headings,
|
|
8079
|
+
scanContentLine(line, state, slugger, headings, context);
|
|
7945
8080
|
};
|
|
7946
8081
|
var scanBody = (body) => {
|
|
7947
8082
|
const headings = [];
|
|
@@ -7958,12 +8093,20 @@ var scanBody = (body) => {
|
|
|
7958
8093
|
promptTag: false,
|
|
7959
8094
|
sites: []
|
|
7960
8095
|
};
|
|
7961
|
-
const
|
|
7962
|
-
|
|
7963
|
-
|
|
8096
|
+
const lines = body.split(`
|
|
8097
|
+
`);
|
|
8098
|
+
let footnotes;
|
|
8099
|
+
const context = {
|
|
8100
|
+
footnotes: () => {
|
|
8101
|
+
footnotes ??= footnoteNumbers(lines.join(`
|
|
8102
|
+
`));
|
|
8103
|
+
return footnotes;
|
|
8104
|
+
},
|
|
8105
|
+
labels: refDefinitionLabels(lines)
|
|
8106
|
+
};
|
|
7964
8107
|
for (const [index, line] of lines.entries()) {
|
|
7965
|
-
state.line = index +
|
|
7966
|
-
scanHeadingLine(line, state, slugger, headings,
|
|
8108
|
+
state.line = index + 1;
|
|
8109
|
+
scanHeadingLine(line, state, slugger, headings, context);
|
|
7967
8110
|
}
|
|
7968
8111
|
const anchors = new Set;
|
|
7969
8112
|
const markup = state.anchorLines.join(`
|
|
@@ -8132,7 +8275,7 @@ var deriveTitle = (meta, headings, id) => {
|
|
|
8132
8275
|
const stem = stripNumericPrefix(base.replace(extname3(base), ""));
|
|
8133
8276
|
const folder = stem === "index" ? parts.at(-2) : undefined;
|
|
8134
8277
|
if (folder !== undefined) {
|
|
8135
|
-
return titleCase(stripNumericPrefix(
|
|
8278
|
+
return titleCase(stripNumericPrefix(orderedGroupLabel(folder) ?? folder));
|
|
8136
8279
|
}
|
|
8137
8280
|
return titleCase(stem);
|
|
8138
8281
|
};
|
|
@@ -8202,6 +8345,13 @@ var validateCustomKeys = (data, extend) => {
|
|
|
8202
8345
|
issues
|
|
8203
8346
|
};
|
|
8204
8347
|
};
|
|
8348
|
+
var DOT_SEGMENT = /(?:^|\/)\.{1,2}(?:\/|$)/u;
|
|
8349
|
+
var slugIssues = (slug) => slug !== undefined && DOT_SEGMENT.test(slug) ? [
|
|
8350
|
+
{
|
|
8351
|
+
message: `"${slug}" has a "." or ".." segment, which browsers resolve away, so no link could reach the page. Write the route out from the content root.`,
|
|
8352
|
+
path: ["slug"]
|
|
8353
|
+
}
|
|
8354
|
+
] : [];
|
|
8205
8355
|
var parseEntryMeta = (entry, ctx) => {
|
|
8206
8356
|
const entryType = isStringValue(entry.data.type) ? entry.data.type : ctx.defaultType;
|
|
8207
8357
|
const typeExtend = ctx.typeFrontmatter?.[entryType];
|
|
@@ -8209,7 +8359,11 @@ var parseEntryMeta = (entry, ctx) => {
|
|
|
8209
8359
|
const known = extend ? Object.fromEntries(Object.entries(entry.data).filter(([key]) => !Object.hasOwn(extend, key))) : entry.data;
|
|
8210
8360
|
const result = pageMetaSchema.safeParse(known);
|
|
8211
8361
|
const customResult = extend ? validateCustomKeys(entry.data, extend) : null;
|
|
8212
|
-
|
|
8362
|
+
const issues = [
|
|
8363
|
+
...result.success ? slugIssues(result.data.slug) : [],
|
|
8364
|
+
...customResult?.issues ?? []
|
|
8365
|
+
];
|
|
8366
|
+
if (result.success && issues.length === 0) {
|
|
8213
8367
|
return { custom: customResult?.custom, meta: result.data };
|
|
8214
8368
|
}
|
|
8215
8369
|
const source = entry.raw ?? (entry.sourcePath && existsSync(entry.sourcePath) ? readFileSync(entry.sourcePath, "utf-8") : undefined);
|
|
@@ -8221,7 +8375,7 @@ var parseEntryMeta = (entry, ctx) => {
|
|
|
8221
8375
|
return {
|
|
8222
8376
|
diagnostics: [
|
|
8223
8377
|
...result.success ? [] : diagnosticsFromZod(result.error, location),
|
|
8224
|
-
...
|
|
8378
|
+
...diagnosticsFromIssues(issues, location)
|
|
8225
8379
|
]
|
|
8226
8380
|
};
|
|
8227
8381
|
};
|
|
@@ -8319,8 +8473,12 @@ import {
|
|
|
8319
8473
|
var YAML_SCHEMA = CORE_SCHEMA.withTags(timestampTag, mergeTag, binaryTag, omapTag, pairsTag, setTag);
|
|
8320
8474
|
|
|
8321
8475
|
// src/core/frontmatter.ts
|
|
8476
|
+
var isYamlCollection = (value) => typeof value === "object" && value !== null;
|
|
8322
8477
|
var yamlEngine = {
|
|
8323
|
-
parse: (input) =>
|
|
8478
|
+
parse: (input) => {
|
|
8479
|
+
const value = load(input, { schema: YAML_SCHEMA });
|
|
8480
|
+
return isYamlCollection(value) ? value : {};
|
|
8481
|
+
},
|
|
8324
8482
|
stringify: (data) => dump(data)
|
|
8325
8483
|
};
|
|
8326
8484
|
var withYamlEngine = (options) => ({
|
|
@@ -8331,13 +8489,10 @@ var withYamlEngine = (options) => ({
|
|
|
8331
8489
|
}
|
|
8332
8490
|
});
|
|
8333
8491
|
var opensWithThematicBreak = (input) => {
|
|
8334
|
-
const [first = ""
|
|
8492
|
+
const [first = ""] = input.split(/\r?\n/u, 1);
|
|
8335
8493
|
if (!/^-{3}\s*$/u.test(first)) {
|
|
8336
8494
|
return false;
|
|
8337
8495
|
}
|
|
8338
|
-
if (second === undefined || second.trim() === "") {
|
|
8339
|
-
return true;
|
|
8340
|
-
}
|
|
8341
8496
|
return !input.includes(`
|
|
8342
8497
|
---`, 1);
|
|
8343
8498
|
};
|
|
@@ -8866,9 +9021,18 @@ var localizeHref = (href, options) => {
|
|
|
8866
9021
|
if (localized === based) {
|
|
8867
9022
|
return href;
|
|
8868
9023
|
}
|
|
8869
|
-
return `${
|
|
9024
|
+
return `${mountBasePath(options.deployBase, localized)}${suffix}`;
|
|
8870
9025
|
};
|
|
8871
9026
|
var routeSets = new WeakMap;
|
|
9027
|
+
var routeSetFor = (routes) => {
|
|
9028
|
+
const cached = routeSets.get(routes);
|
|
9029
|
+
if (cached) {
|
|
9030
|
+
return cached;
|
|
9031
|
+
}
|
|
9032
|
+
const built = new Set(routes.map((route) => route.path));
|
|
9033
|
+
routeSets.set(routes, built);
|
|
9034
|
+
return built;
|
|
9035
|
+
};
|
|
8872
9036
|
|
|
8873
9037
|
// src/core/probe.ts
|
|
8874
9038
|
import pMap from "p-map";
|
|
@@ -9227,7 +9391,7 @@ import { loadAll } from "js-yaml";
|
|
|
9227
9391
|
import { detect } from "package-manager-detector/detect";
|
|
9228
9392
|
import { basename as basename3, dirname as dirname4, isAbsolute as isAbsolute2, join as join5, relative as relative5 } from "pathe";
|
|
9229
9393
|
import picomatch from "picomatch";
|
|
9230
|
-
import { z as
|
|
9394
|
+
import { z as z55 } from "zod";
|
|
9231
9395
|
|
|
9232
9396
|
// src/core/package-json.ts
|
|
9233
9397
|
var toPackageName = (raw) => raw.toLowerCase().replaceAll(/[^a-z0-9._-]+/gu, "-").replaceAll(/^[-_.]+|[-_.]+$/gu, "") || "docs";
|
|
@@ -9787,8 +9951,8 @@ var readText = (path) => {
|
|
|
9787
9951
|
}
|
|
9788
9952
|
};
|
|
9789
9953
|
var pnpmWorkspaceRoot = (root) => nearestAncestor(root, (dir) => existsSync3(join5(dir, "pnpm-workspace.yaml")));
|
|
9790
|
-
var pnpmWorkspaceSchema =
|
|
9791
|
-
packages:
|
|
9954
|
+
var pnpmWorkspaceSchema = z55.looseObject({
|
|
9955
|
+
packages: z55.array(z55.string()).default([])
|
|
9792
9956
|
});
|
|
9793
9957
|
var GLOB_EDGES = /^\.\/|\/+$/gu;
|
|
9794
9958
|
var matchesAny = (globs, at) => globs.length > 0 && picomatch(globs)(at);
|
|
@@ -10017,7 +10181,7 @@ var linksetEntries = (config) => {
|
|
|
10017
10181
|
const site = config.deployment.options.site ?? null;
|
|
10018
10182
|
const deployBase = normalizeBasePath(config.deployment.options.base);
|
|
10019
10183
|
const abs = (path) => {
|
|
10020
|
-
const based =
|
|
10184
|
+
const based = mountBasePath(deployBase, path);
|
|
10021
10185
|
return site ? absoluteUrl2(site, based) : based;
|
|
10022
10186
|
};
|
|
10023
10187
|
const entries = [];
|
|
@@ -10054,7 +10218,7 @@ var hasApiCatalog = (config) => linksetEntries(config).length > 0;
|
|
|
10054
10218
|
|
|
10055
10219
|
// src/ai/mcp/discovery.ts
|
|
10056
10220
|
var serverUrl = (input) => {
|
|
10057
|
-
const path =
|
|
10221
|
+
const path = mountBasePath(input.base, input.route);
|
|
10058
10222
|
return input.site ? absoluteUrl2(input.site, path) : path;
|
|
10059
10223
|
};
|
|
10060
10224
|
var buildMcpDiscovery = (input) => ({
|
|
@@ -10119,6 +10283,9 @@ import { join as join6 } from "pathe";
|
|
|
10119
10283
|
|
|
10120
10284
|
// src/ai/tar.ts
|
|
10121
10285
|
import { createTar } from "nanotar";
|
|
10286
|
+
var BLOCK_SIZE = 512;
|
|
10287
|
+
var END_OF_ARCHIVE = 2 * BLOCK_SIZE;
|
|
10288
|
+
var RECORD_SIZE = 20 * BLOCK_SIZE;
|
|
10122
10289
|
var encoder = new TextEncoder;
|
|
10123
10290
|
|
|
10124
10291
|
// src/ai/skills.ts
|
|
@@ -10145,22 +10312,23 @@ var crossOriginDiscoveryPaths = (config) => {
|
|
|
10145
10312
|
};
|
|
10146
10313
|
|
|
10147
10314
|
// src/ai/link-headers.ts
|
|
10148
|
-
var buildHomeLinkHeader = (config, routePaths) => {
|
|
10315
|
+
var buildHomeLinkHeader = (config, routePaths, surface = "build") => {
|
|
10149
10316
|
const deployBase = normalizeBasePath(config.deployment.options.base);
|
|
10317
|
+
const artifacts = surface === "build";
|
|
10150
10318
|
const links = [];
|
|
10151
|
-
if (hasApiCatalog(config)) {
|
|
10319
|
+
if (artifacts && hasApiCatalog(config)) {
|
|
10152
10320
|
links.push(`<${deployBase}${API_CATALOG_PATH}>; rel="api-catalog"; type="${API_CATALOG_TYPE.replaceAll('"', String.raw`\"`)}"`);
|
|
10153
10321
|
}
|
|
10154
|
-
if (hasAiCatalog(config)) {
|
|
10322
|
+
if (artifacts && hasAiCatalog(config)) {
|
|
10155
10323
|
links.push(`<${deployBase}${AI_CATALOG_PATH}>; rel="ai-catalog"; type="${AI_CATALOG_TYPE}"`);
|
|
10156
10324
|
}
|
|
10157
10325
|
if (config.agents.api) {
|
|
10158
10326
|
links.push(`<${deployBase}${OPENAPI_PATH}>; rel="service-desc"; type="application/json"`);
|
|
10159
10327
|
}
|
|
10160
|
-
if (config.agents.agentReadability) {
|
|
10328
|
+
if (artifacts && config.agents.agentReadability) {
|
|
10161
10329
|
links.push(`<${deployBase}/agent-readability.json>; rel="describedby"; type="application/json"`);
|
|
10162
10330
|
}
|
|
10163
|
-
if (config.agents.llmsTxt.enabled) {
|
|
10331
|
+
if (artifacts && config.agents.llmsTxt.enabled) {
|
|
10164
10332
|
links.push(`<${deployBase}/llms.txt>; rel="describedby"; type="text/plain"`);
|
|
10165
10333
|
}
|
|
10166
10334
|
if (routePaths.includes("/")) {
|
|
@@ -10196,7 +10364,7 @@ var parseDate = (value) => {
|
|
|
10196
10364
|
};
|
|
10197
10365
|
var entryUrl = (project, route) => {
|
|
10198
10366
|
const { base, site } = project.config.deployment.options;
|
|
10199
|
-
const path =
|
|
10367
|
+
const path = mountBasePath(normalizeBasePath(base), route);
|
|
10200
10368
|
return encodeURI(site ? absoluteUrl2(site, path) : path);
|
|
10201
10369
|
};
|
|
10202
10370
|
var rowLine = (project, { date, page }) => {
|
|
@@ -10262,17 +10430,6 @@ var parseYouTubeId = (input) => {
|
|
|
10262
10430
|
return URL_ID.exec(value)?.groups?.id ?? null;
|
|
10263
10431
|
};
|
|
10264
10432
|
|
|
10265
|
-
// src/markdown/features.ts
|
|
10266
|
-
var MARKDOWN_FEATURES = {
|
|
10267
|
-
subscript: true,
|
|
10268
|
-
superscript: true
|
|
10269
|
-
};
|
|
10270
|
-
var MDX_FEATURES = {
|
|
10271
|
-
...MARKDOWN_FEATURES,
|
|
10272
|
-
directive: true,
|
|
10273
|
-
math: { singleDollarTextMath: false }
|
|
10274
|
-
};
|
|
10275
|
-
|
|
10276
10433
|
// src/ai/static-expression.ts
|
|
10277
10434
|
var notStatic = () => {
|
|
10278
10435
|
throw new Error("not a static expression");
|
|
@@ -11071,7 +11228,7 @@ var buildRssFeeds = (project) => {
|
|
|
11071
11228
|
const items = pages.map((page) => ({
|
|
11072
11229
|
date: pageDate(page),
|
|
11073
11230
|
description: page.description,
|
|
11074
|
-
link: encodeURI(`${base}${
|
|
11231
|
+
link: encodeURI(`${base}${mountBasePath(deployBase, page.route)}`),
|
|
11075
11232
|
title: page.title
|
|
11076
11233
|
})).toSorted((a, b) => (b.date?.getTime() ?? 0) - (a.date?.getTime() ?? 0)).slice(0, rss.limit);
|
|
11077
11234
|
feeds.push({
|
|
@@ -11128,7 +11285,6 @@ import { basename as basename4 } from "pathe";
|
|
|
11128
11285
|
var DEFINITION = /^(?<lead> {0,3}\[(?:[^\]\\]|\\.)+\]:[\t ]*)(?:<(?<angled>[^>]*)>|(?<bare>\S+))/u;
|
|
11129
11286
|
var MAYBE_RELATIVE = /\]\([\t ]*<?(?![a-z][\d+.a-z-]*:|\/|#)|^ {0,3}\[[^\]\n]+\]:[\t ]*<?(?![a-z][\d+.a-z-]*:|\/|#)|\shref=["'](?![a-z][\d+.a-z-]*:|\/|#)/imu;
|
|
11130
11287
|
var MAYBE_PAGE_LINK = /\]\([\t ]*<?(?![a-z][\d+.a-z-]*:|\/\/|#)|^ {0,3}\[[^\]\n]+\]:[\t ]*<?(?![a-z][\d+.a-z-]*:|\/\/|#)|\shref=["'](?![a-z][\d+.a-z-]*:|\/\/|#)/imu;
|
|
11131
|
-
var ASSET_PATH = /\.[\da-z]+$/iu;
|
|
11132
11288
|
var spliceLine = (line, splices) => {
|
|
11133
11289
|
let out = line;
|
|
11134
11290
|
for (const splice of splices.toSorted((a, b) => b.column - a.column)) {
|
|
@@ -11147,13 +11303,13 @@ var definitionSplice = (line, routed) => {
|
|
|
11147
11303
|
const angled = groups?.angled === undefined ? 0 : 1;
|
|
11148
11304
|
return { column: lead.length + angled, length: target.length, text: route };
|
|
11149
11305
|
};
|
|
11150
|
-
var collectSplices2 = (text, lines, routed) => {
|
|
11306
|
+
var collectSplices2 = (text, lines, routed, imaged) => {
|
|
11151
11307
|
const splices = new Map;
|
|
11152
11308
|
const add = (index, splice) => {
|
|
11153
11309
|
splices.set(index, [...splices.get(index) ?? [], splice]);
|
|
11154
11310
|
};
|
|
11155
11311
|
for (const link of extractLinks(text)) {
|
|
11156
|
-
const route = link.image ?
|
|
11312
|
+
const route = (link.image ? imaged : routed)(link.target);
|
|
11157
11313
|
if (route !== undefined) {
|
|
11158
11314
|
add(link.line - 1, {
|
|
11159
11315
|
column: link.column - 1,
|
|
@@ -11198,9 +11354,10 @@ var relativeLinkRewriter = (project) => {
|
|
|
11198
11354
|
const resolveFile = (path) => routeOfLinkedFile(fileRoutes, { navPath, sourcePath }, path);
|
|
11199
11355
|
return (target) => {
|
|
11200
11356
|
const route = resolveRelativeHref(target, from, resolveFile, (path) => routes.has(path));
|
|
11201
|
-
return route === undefined ? undefined :
|
|
11357
|
+
return route === undefined ? undefined : mountBasePath(deployBase, route);
|
|
11202
11358
|
};
|
|
11203
11359
|
};
|
|
11360
|
+
const servesPage = (route) => servesRoute(routes, route);
|
|
11204
11361
|
return (text, page) => {
|
|
11205
11362
|
const locale = localeByRoute.get(page.route);
|
|
11206
11363
|
const localize = i18n && locale !== undefined && localePrefix(locale, i18n) !== "" ? { basePath, deployBase, i18n, locale, routes } : undefined;
|
|
@@ -11210,17 +11367,18 @@ var relativeLinkRewriter = (project) => {
|
|
|
11210
11367
|
}
|
|
11211
11368
|
const relative = relativeRoute(page);
|
|
11212
11369
|
const rooted = (target) => {
|
|
11213
|
-
|
|
11214
|
-
return;
|
|
11215
|
-
}
|
|
11216
|
-
const based = withComposedBasePath(deployBase, basePath, target);
|
|
11370
|
+
const based = withAuthoredBasePath(deployBase, basePath, target, servesPage);
|
|
11217
11371
|
const href = localize ? localizeHref(based, localize) : based;
|
|
11218
11372
|
return href === target ? undefined : href;
|
|
11219
11373
|
};
|
|
11220
11374
|
const routed = (target) => isInternalPath(target) ? rooted(target) : relative?.(target);
|
|
11375
|
+
const imaged = (target) => {
|
|
11376
|
+
const based = withBasePath(deployBase, target);
|
|
11377
|
+
return based === target ? undefined : based;
|
|
11378
|
+
};
|
|
11221
11379
|
const lines = text.split(`
|
|
11222
11380
|
`);
|
|
11223
|
-
const splices = collectSplices2(text, lines, routed);
|
|
11381
|
+
const splices = collectSplices2(text, lines, routed, imaged);
|
|
11224
11382
|
return lines.map((line, index) => {
|
|
11225
11383
|
const lineSplices = splices.get(index);
|
|
11226
11384
|
return lineSplices ? spliceLine(line, lineSplices) : line;
|
|
@@ -11284,7 +11442,8 @@ var withServerDefaults = (template, variables) => template.replaceAll(SERVER_VAR
|
|
|
11284
11442
|
return isVariableDefault(value) ? String(value) : match;
|
|
11285
11443
|
});
|
|
11286
11444
|
var isOperation = (value) => typeof value === "object" && value !== null;
|
|
11287
|
-
var
|
|
11445
|
+
var isText2 = (value) => typeof value === "string" || typeof value === "number";
|
|
11446
|
+
var specText = (value) => isText2(value) ? String(value) : undefined;
|
|
11288
11447
|
var tagSlugger = () => {
|
|
11289
11448
|
const assigned = new Map;
|
|
11290
11449
|
const taken = new Set;
|
|
@@ -11344,7 +11503,10 @@ var operationCollector = (baseRoute, tagMeta) => {
|
|
|
11344
11503
|
};
|
|
11345
11504
|
var extractOperations = (document, baseRoute) => {
|
|
11346
11505
|
const warnings = [];
|
|
11347
|
-
const tagMeta = new Map((document.tags ?? []).
|
|
11506
|
+
const tagMeta = new Map((document.tags ?? []).flatMap((tag) => {
|
|
11507
|
+
const name = specText(tag.name);
|
|
11508
|
+
return name === undefined ? [] : [[name, tag.description ?? ""]];
|
|
11509
|
+
}));
|
|
11348
11510
|
const collector = operationCollector(baseRoute, tagMeta);
|
|
11349
11511
|
for (const [path, item] of Object.entries(document.paths ?? {})) {
|
|
11350
11512
|
if (!item) {
|
|
@@ -11359,15 +11521,16 @@ var extractOperations = (document, baseRoute) => {
|
|
|
11359
11521
|
if (!isOperation(operation)) {
|
|
11360
11522
|
continue;
|
|
11361
11523
|
}
|
|
11524
|
+
const operationId = specText(operation.operationId);
|
|
11362
11525
|
collector.add({
|
|
11363
11526
|
deprecated: operation.deprecated ?? false,
|
|
11364
|
-
description: operation.description ?? "",
|
|
11365
|
-
key: operationKey(method, path,
|
|
11527
|
+
description: specText(operation.description) ?? "",
|
|
11528
|
+
key: operationKey(method, path, operationId),
|
|
11366
11529
|
method,
|
|
11367
|
-
operationId
|
|
11530
|
+
operationId,
|
|
11368
11531
|
path,
|
|
11369
|
-
summary: operation.summary ?? "",
|
|
11370
|
-
tag: operation.tags?.[0] ?? UNTAGGED
|
|
11532
|
+
summary: specText(operation.summary) ?? "",
|
|
11533
|
+
tag: specText(operation.tags?.[0]) ?? UNTAGGED
|
|
11371
11534
|
});
|
|
11372
11535
|
}
|
|
11373
11536
|
}
|
|
@@ -12075,7 +12238,9 @@ var isSafeHref = (href) => {
|
|
|
12075
12238
|
};
|
|
12076
12239
|
|
|
12077
12240
|
// src/core/sources/lower.ts
|
|
12078
|
-
var MARKDOWN_SPECIALS = /[\\`*_{}[\]
|
|
12241
|
+
var MARKDOWN_SPECIALS = /[\\`*_{}[\]~<$^]/gu;
|
|
12242
|
+
var DIRECTIVE_COLON = /(?<!(?:[a-z][\w+.-]*:\/\/|www\.)\S*):(?=[a-z\d])/giu;
|
|
12243
|
+
var BARE_URL = /\b(?:https?:\/\/|www\.)[\w-][^\s<]*/giu;
|
|
12079
12244
|
var CHARACTER_REFERENCE = /&(?=#?[a-z0-9]+;)/giu;
|
|
12080
12245
|
var BLOCK_START = /^(?<indent>[ \t]*)(?:(?<marker>#+|[+-]|\d+[.)])(?=[ \t]|$)|(?<quote>>)|(?<rule>=+|-{2,})(?=[ \t]*$))/gmu;
|
|
12081
12246
|
var ESM_START = /(?<=^|\n[ \t]*\n)(?<keyword>import|export)(?![\w$])/gu;
|
|
@@ -12086,7 +12251,18 @@ var escapeBlockStart = (text) => text.replaceAll(BLOCK_START, (match, indent) =>
|
|
|
12086
12251
|
return index === -1 ? `${indent}\\${marker}` : `${indent}${marker.slice(0, index)}\\${marker.slice(index)}`;
|
|
12087
12252
|
});
|
|
12088
12253
|
var escapeEsmStart = (text) => text.replaceAll(ESM_START, (keyword) => `&#${keyword.codePointAt(0)};${keyword.slice(1)}`);
|
|
12089
|
-
var
|
|
12254
|
+
var escapeSpecials = (text) => text.replaceAll(MARKDOWN_SPECIALS, String.raw`\$&`);
|
|
12255
|
+
var escapeRest = (text) => escapeEsmStart(escapeBlockStart(text.replaceAll(DIRECTIVE_COLON, String.raw`\:`).replaceAll(CHARACTER_REFERENCE, String.raw`\&`)));
|
|
12256
|
+
var escapeMarkdownText = (text) => escapeRest(escapeSpecials(text));
|
|
12257
|
+
var escapeProse = (text) => {
|
|
12258
|
+
let out = "";
|
|
12259
|
+
let last = 0;
|
|
12260
|
+
for (const match of text.matchAll(BARE_URL)) {
|
|
12261
|
+
out += escapeSpecials(text.slice(last, match.index)) + match[0];
|
|
12262
|
+
last = match.index + match[0].length;
|
|
12263
|
+
}
|
|
12264
|
+
return escapeRest(out + escapeSpecials(text.slice(last)));
|
|
12265
|
+
};
|
|
12090
12266
|
var BACKTICK_RUN = /`+/gu;
|
|
12091
12267
|
var longestBacktickRun = (text) => {
|
|
12092
12268
|
let longest = 0;
|
|
@@ -12100,28 +12276,63 @@ var codeSpan = (code) => {
|
|
|
12100
12276
|
const pad = code.startsWith("`") || code.endsWith("`") ? " " : "";
|
|
12101
12277
|
return `${fence}${pad}${code}${pad}${fence}`;
|
|
12102
12278
|
};
|
|
12103
|
-
var
|
|
12279
|
+
var SEAM_STEPS = /\\[\s\S]|(?<ticks>`+)[\s\S]*?(?<!`)\k<ticks>(?!`)|\]\((?:<(?:\\.|[^\\<>\n])*>|(?:\\.|[^\\\s)])+)\)/u;
|
|
12280
|
+
var STRIKE_SEAM = new RegExp(`${SEAM_STEPS.source}|${BARE_URL.source}|~~~~`, "giu");
|
|
12281
|
+
var CLOSING_HASHES = /(?<=[ \t])#+(?=[ \t]*$)/u;
|
|
12282
|
+
var guardBlockStart = (text) => escapeEsmStart(text.replaceAll(BLOCK_INDENT, "").replaceAll(STRIKE_SEAM, (match) => match === "~~~~" ? "" : match).replace(CLOSING_HASHES, String.raw`\$&`));
|
|
12104
12283
|
var EDGE_SPACE = /^(?<lead>\s*)(?<body>[\s\S]*?)(?<trail>\s*)$/u;
|
|
12105
|
-
var
|
|
12284
|
+
var betweenEdges = (text, render) => {
|
|
12106
12285
|
const match = EDGE_SPACE.exec(text);
|
|
12107
|
-
const lead = match?.groups?.lead ?? "";
|
|
12108
12286
|
const body = match?.groups?.body ?? "";
|
|
12109
|
-
const trail = match?.groups?.trail ?? "";
|
|
12110
12287
|
if (body === "") {
|
|
12111
12288
|
return text;
|
|
12112
12289
|
}
|
|
12113
|
-
|
|
12114
|
-
|
|
12115
|
-
|
|
12116
|
-
|
|
12117
|
-
|
|
12118
|
-
|
|
12290
|
+
return `${match?.groups?.lead ?? ""}${render(body)}${match?.groups?.trail ?? ""}`;
|
|
12291
|
+
};
|
|
12292
|
+
var MARK_NAMES = ["bold", "code", "italic", "strike"];
|
|
12293
|
+
var sameMarks = (a, b, names = MARK_NAMES) => names.every((mark) => Boolean(a[mark]) === Boolean(b[mark]));
|
|
12294
|
+
var groupRuns = (runs, names = MARK_NAMES) => {
|
|
12295
|
+
const groups = [];
|
|
12296
|
+
for (const run of runs) {
|
|
12297
|
+
const group = groups.at(-1);
|
|
12298
|
+
if (group && sameMarks(group.marks, run.marks, names)) {
|
|
12299
|
+
group.runs.push(run);
|
|
12300
|
+
} else {
|
|
12301
|
+
groups.push({ marks: run.marks, runs: [run] });
|
|
12302
|
+
}
|
|
12119
12303
|
}
|
|
12120
|
-
|
|
12121
|
-
|
|
12304
|
+
return groups;
|
|
12305
|
+
};
|
|
12306
|
+
var renderRuns = (runs, escape) => groupRuns(runs, ["bold", "italic", "strike"]).map(({ marks, runs: shared }) => {
|
|
12307
|
+
const inner = groupRuns(shared).map((same) => betweenEdges(same.runs.map((run) => run.text).join(""), (body) => same.marks.code ? codeSpan(body) : escape(body))).join("");
|
|
12308
|
+
return betweenEdges(inner, (body) => {
|
|
12309
|
+
let out = body;
|
|
12310
|
+
if (marks.bold) {
|
|
12311
|
+
out = `**${out}**`;
|
|
12312
|
+
}
|
|
12313
|
+
if (marks.italic) {
|
|
12314
|
+
out = `*${out}*`;
|
|
12315
|
+
}
|
|
12316
|
+
if (marks.strike) {
|
|
12317
|
+
out = `~~${out}~~`;
|
|
12318
|
+
}
|
|
12319
|
+
return out;
|
|
12320
|
+
});
|
|
12321
|
+
}).join("");
|
|
12322
|
+
var renderParts = (parts, escape) => {
|
|
12323
|
+
let out = "";
|
|
12324
|
+
let runs = [];
|
|
12325
|
+
for (const part of parts) {
|
|
12326
|
+
if ("markdown" in part) {
|
|
12327
|
+
out += renderRuns(runs, escape) + part.markdown;
|
|
12328
|
+
runs = [];
|
|
12329
|
+
} else {
|
|
12330
|
+
runs.push(part);
|
|
12331
|
+
}
|
|
12122
12332
|
}
|
|
12123
|
-
return
|
|
12333
|
+
return out + renderRuns(runs, escape);
|
|
12124
12334
|
};
|
|
12335
|
+
var renderInline = (parts) => renderParts(parts, escapeProse);
|
|
12125
12336
|
var UNSAFE_DESTINATION = /[\s()\u0000-\u001F\u007F]/u;
|
|
12126
12337
|
var DESTINATION_SPECIALS = /[\\<>]|&(?=#?[a-z0-9]+;)/giu;
|
|
12127
12338
|
var DESTINATION_IGNORED = /[\t\n\r]/gu;
|
|
@@ -12129,7 +12340,11 @@ var destination = (url) => {
|
|
|
12129
12340
|
const escaped = url.replaceAll(DESTINATION_IGNORED, "").replaceAll(DESTINATION_SPECIALS, String.raw`\$&`);
|
|
12130
12341
|
return UNSAFE_DESTINATION.test(escaped) ? `<${escaped}>` : escaped;
|
|
12131
12342
|
};
|
|
12132
|
-
var
|
|
12343
|
+
var linkParts = (parts, href) => href && isSafeHref(href) ? [
|
|
12344
|
+
{
|
|
12345
|
+
markdown: `[${renderParts(parts, escapeMarkdownText)}](${destination(href)})`
|
|
12346
|
+
}
|
|
12347
|
+
] : parts;
|
|
12133
12348
|
var headingPrefix = (level) => `${"#".repeat(Math.min(Math.max(Math.trunc(level), 1), 6))} `;
|
|
12134
12349
|
var blockquote = (text) => text.split(`
|
|
12135
12350
|
`).map((line) => line === "" ? ">" : `> ${line}`).join(`
|
|
@@ -12250,7 +12465,7 @@ var ENTITIES = new Map([
|
|
|
12250
12465
|
["}", "}"]
|
|
12251
12466
|
]);
|
|
12252
12467
|
var MDX_ESM_KEYWORD = /^(?<keyword>import|export)\b/gmu;
|
|
12253
|
-
var
|
|
12468
|
+
var escapeProse2 = (text) => text.replace(MDX_UNSAFE, (char) => ENTITIES.get(char) ?? char).replace(MDX_ESM_KEYWORD, (keyword) => `&#${keyword.codePointAt(0)};${keyword.slice(1)}`);
|
|
12254
12469
|
var codeSpans = (text, tree) => {
|
|
12255
12470
|
const spans = [];
|
|
12256
12471
|
const collect = (node) => {
|
|
@@ -12285,12 +12500,30 @@ var mdxSafe = (text) => {
|
|
|
12285
12500
|
let out = "";
|
|
12286
12501
|
let cursor = 0;
|
|
12287
12502
|
for (const segment of segments) {
|
|
12288
|
-
out +=
|
|
12503
|
+
out += escapeProse2(text.slice(cursor, segment.start));
|
|
12289
12504
|
out += segment.text;
|
|
12290
12505
|
cursor = segment.end;
|
|
12291
12506
|
}
|
|
12292
|
-
return out +
|
|
12507
|
+
return out + escapeProse2(text.slice(cursor));
|
|
12293
12508
|
};
|
|
12509
|
+
var FENCE_OPEN = /^ {0,3}(?<fence>`{3,}|~{3,})/u;
|
|
12510
|
+
var closeOpenFence = (text) => {
|
|
12511
|
+
const last = fromMarkdown2(text.replaceAll("<", HTML_MASK)).children.at(-1);
|
|
12512
|
+
if (last?.type !== "code") {
|
|
12513
|
+
return text;
|
|
12514
|
+
}
|
|
12515
|
+
const block = text.slice(last.position?.start.offset ?? 0);
|
|
12516
|
+
const fence = FENCE_OPEN.exec(block)?.groups?.fence;
|
|
12517
|
+
if (!fence) {
|
|
12518
|
+
return text;
|
|
12519
|
+
}
|
|
12520
|
+
const lines = block.split(`
|
|
12521
|
+
`);
|
|
12522
|
+
const closer = new RegExp(`^ {0,3}${fence[0]}{${fence.length},}[ \\t\\r]*$`, "u");
|
|
12523
|
+
return lines.length > 1 && closer.test(lines.at(-1) ?? "") ? text : `${text}
|
|
12524
|
+
${fence}`;
|
|
12525
|
+
};
|
|
12526
|
+
var descriptionMdx = (text) => mdxSafe(closeOpenFence(text.trim()));
|
|
12294
12527
|
var META_DESCRIPTION_MAX = 160;
|
|
12295
12528
|
var WHITESPACE = /\s+/gu;
|
|
12296
12529
|
var TRAILING_WORD = /\s+\S*$/u;
|
|
@@ -12339,7 +12572,7 @@ var operationDescription = (spec, operation, options) => {
|
|
|
12339
12572
|
const prose = clip(plainProse(operation.description || operation.summary), META_DESCRIPTION_MAX - stringWidth2(suffix) - 2);
|
|
12340
12573
|
return clip([asSentence(prose), suffix].filter(Boolean).join(" "), META_DESCRIPTION_MAX);
|
|
12341
12574
|
};
|
|
12342
|
-
var withDescription = (description, component) => description.trim() ? `${
|
|
12575
|
+
var withDescription = (description, component) => description.trim() ? `${descriptionMdx(description)}
|
|
12343
12576
|
|
|
12344
12577
|
${component}` : component;
|
|
12345
12578
|
var operationMdx = (spec, operation, reference) => {
|
|
@@ -12412,7 +12645,7 @@ var overviewMdx = (spec, reference) => {
|
|
|
12412
12645
|
if (!operations.some((operation) => operation.tagSlug === tag.slug)) {
|
|
12413
12646
|
continue;
|
|
12414
12647
|
}
|
|
12415
|
-
const description = tag.description.trim() ? [
|
|
12648
|
+
const description = tag.description.trim() ? [descriptionMdx(tag.description)] : [];
|
|
12416
12649
|
tagSections.push([
|
|
12417
12650
|
`## ${mdxSafe(tag.name)}`,
|
|
12418
12651
|
...description,
|
|
@@ -12658,15 +12891,16 @@ var openApiSource = (references, ctx) => {
|
|
|
12658
12891
|
};
|
|
12659
12892
|
|
|
12660
12893
|
// src/ai/openapi-components.ts
|
|
12661
|
-
var
|
|
12662
|
-
var listItem3 = (signature, operation) => {
|
|
12894
|
+
var inlineText2 = (text) => text.trim().replaceAll(/\s+/gu, " ").replaceAll(/[\\`*_[\]<>~]/gu, String.raw`\$&`);
|
|
12895
|
+
var listItem3 = (signature, href, operation) => {
|
|
12663
12896
|
const tail = [
|
|
12664
|
-
|
|
12897
|
+
inlineText2(asSentence(operation.summary.trim())),
|
|
12665
12898
|
operation.deprecated ? "Deprecated." : ""
|
|
12666
12899
|
].filter(Boolean).join(" ");
|
|
12667
|
-
return `- [${inlineCode(signature)}](${linkDestination(
|
|
12900
|
+
return `- [${inlineCode(signature)}](${linkDestination(href)})${tail ? ` — ${tail}` : ""}`;
|
|
12668
12901
|
};
|
|
12669
|
-
var openapiComponentSerializers = (specs) => {
|
|
12902
|
+
var openapiComponentSerializers = (specs, deployBase) => {
|
|
12903
|
+
const base = normalizeBasePath(deployBase);
|
|
12670
12904
|
const spec = (source) => isString3(source) ? specOf(specs, source) : undefined;
|
|
12671
12905
|
return {
|
|
12672
12906
|
ApiOverview: ({ props }) => {
|
|
@@ -12676,7 +12910,7 @@ var openapiComponentSerializers = (specs) => {
|
|
|
12676
12910
|
}
|
|
12677
12911
|
const { addresses, label } = specAddresses(data);
|
|
12678
12912
|
const lines = [
|
|
12679
|
-
data.version ? `Version ${
|
|
12913
|
+
data.version ? `Version ${inlineText2(data.version)}` : "",
|
|
12680
12914
|
addresses.length > 0 ? `${label}: ${addresses.map(inlineCode).join(", ")}` : ""
|
|
12681
12915
|
].filter(Boolean);
|
|
12682
12916
|
return lines.length > 0 ? lines.join(`
|
|
@@ -12689,7 +12923,7 @@ var openapiComponentSerializers = (specs) => {
|
|
|
12689
12923
|
if (!(data && isString3(tag))) {
|
|
12690
12924
|
return null;
|
|
12691
12925
|
}
|
|
12692
|
-
const items = Object.values(data.operations).filter((operation) => operation.tagSlug === tag).map((operation) => listItem3(operationSignature(data, operation), operation));
|
|
12926
|
+
const items = Object.values(data.operations).filter((operation) => operation.tagSlug === tag).map((operation) => listItem3(operationSignature(data, operation), mountBasePath(base, operation.route), operation));
|
|
12693
12927
|
return items.length > 0 ? items.join(`
|
|
12694
12928
|
`) : null;
|
|
12695
12929
|
},
|
|
@@ -12714,7 +12948,7 @@ var openapiComponentSerializers = (specs) => {
|
|
|
12714
12948
|
// src/ai/serializers.ts
|
|
12715
12949
|
var projectComponentSerializers = (project) => ({
|
|
12716
12950
|
...exampleComponentSerializers(project.examples ?? {}),
|
|
12717
|
-
...openapiComponentSerializers(project.sources.find(isOpenApiSource)?.openApiData() ?? {}),
|
|
12951
|
+
...openapiComponentSerializers(project.sources.find(isOpenApiSource)?.openApiData() ?? {}, project.config.deployment.options.base),
|
|
12718
12952
|
...project.config.agents.markdownComponents
|
|
12719
12953
|
});
|
|
12720
12954
|
|
|
@@ -12776,9 +13010,10 @@ var applyAgentVisibility = (markdown) => applyAudienceVisibility(markdown, "agen
|
|
|
12776
13010
|
|
|
12777
13011
|
// src/ai/llms.ts
|
|
12778
13012
|
var pageUrl = (route, site, base = "") => {
|
|
12779
|
-
const path =
|
|
13013
|
+
const path = mountBasePath(base, route);
|
|
12780
13014
|
return encodeURI(site ? absoluteUrl2(site, path) : path);
|
|
12781
13015
|
};
|
|
13016
|
+
var linkText2 = (title) => title.replaceAll(/[\\[\]]/gu, String.raw`\$&`);
|
|
12782
13017
|
var oneLine = (text) => text.replaceAll(/\s+/gu, " ").trim();
|
|
12783
13018
|
var agentResourceLines = (project) => {
|
|
12784
13019
|
const { config } = project;
|
|
@@ -12844,7 +13079,7 @@ var buildLlmsIndex = (project, options = {}) => {
|
|
|
12844
13079
|
const line = (page) => {
|
|
12845
13080
|
seen.add(page.route);
|
|
12846
13081
|
const summary = page.description ? `: ${page.description}` : "";
|
|
12847
|
-
return `- [${page.title}](${pageUrl(page.route, site, base)})${summary}`;
|
|
13082
|
+
return `- [${linkText2(page.title)}](${pageUrl(page.route, site, base)})${summary}`;
|
|
12848
13083
|
};
|
|
12849
13084
|
const renderLevel = (nodes, depth) => {
|
|
12850
13085
|
const list = [];
|
|
@@ -12896,7 +13131,7 @@ var buildLlmsIndex = (project, options = {}) => {
|
|
|
12896
13131
|
}
|
|
12897
13132
|
const feeds = buildRssFeeds(project);
|
|
12898
13133
|
if (feeds.length > 0) {
|
|
12899
|
-
blocks.push("## RSS Feeds", feeds.map((feed) => `- [${feed.title}](${pageUrl(feed.path, site, base)})`).join(`
|
|
13134
|
+
blocks.push("## RSS Feeds", feeds.map((feed) => `- [${linkText2(feed.title)}](${pageUrl(feed.path, site, base)})`).join(`
|
|
12900
13135
|
`));
|
|
12901
13136
|
}
|
|
12902
13137
|
const skills = options.skills ?? [];
|
|
@@ -13056,6 +13291,8 @@ var buildNetlifyConfigHeaders = (config, homeLinkHeader) => {
|
|
|
13056
13291
|
}
|
|
13057
13292
|
return [...byPath].map(([path, values]) => ({ for: path, values }));
|
|
13058
13293
|
};
|
|
13294
|
+
var SOURCE_SYNTAX = /[\\(){}?+:]/gu;
|
|
13295
|
+
var escapeVercelSource = (path) => path.replaceAll(SOURCE_SYNTAX, String.raw`\$&`);
|
|
13059
13296
|
|
|
13060
13297
|
// src/deploy/cloudflare-negotiation.ts
|
|
13061
13298
|
var NEGOTIATION_WORKER_FILE = "blume-worker.mjs";
|
|
@@ -13074,13 +13311,12 @@ var STATIC_EXEMPTIONS = [
|
|
|
13074
13311
|
API_PAGES_PATH,
|
|
13075
13312
|
API_NAVIGATION_PATH
|
|
13076
13313
|
];
|
|
13077
|
-
var basePrefix = (base) => base && base !== "/" ? base.replace(/\/$/u, "") : "";
|
|
13078
13314
|
var isJsonObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
13079
13315
|
var isJsonString = (value) => typeof value === "string";
|
|
13080
13316
|
var isNegativeRule = (rule) => rule.startsWith("!");
|
|
13081
13317
|
var ruleBody = (rule) => isNegativeRule(rule) ? rule.slice(1) : rule;
|
|
13082
13318
|
var buildRunWorkerFirstRules = (base) => {
|
|
13083
|
-
const prefix = encodeURI(
|
|
13319
|
+
const prefix = encodeURI(normalizeBasePath(base));
|
|
13084
13320
|
const exemptions = STATIC_EXEMPTIONS.map((path) => `!${prefix}${path}`);
|
|
13085
13321
|
return prefix ? [prefix, `${prefix}/*`, ...exemptions] : [`/*`, ...exemptions];
|
|
13086
13322
|
};
|
|
@@ -13098,7 +13334,7 @@ var buildNegotiationWorker = (options) => {
|
|
|
13098
13334
|
const routes = JSON.stringify(options.routePaths);
|
|
13099
13335
|
const pageJson = JSON.stringify(options.pageJsonPaths ?? []);
|
|
13100
13336
|
const binding = JSON.stringify(options.assetsBinding);
|
|
13101
|
-
const prefix = JSON.stringify(encodeURI(
|
|
13337
|
+
const prefix = JSON.stringify(encodeURI(normalizeBasePath(options.base)));
|
|
13102
13338
|
const homeLinkHeader = JSON.stringify(options.homeLinkHeader ?? null);
|
|
13103
13339
|
const homeTokens = JSON.stringify(options.homeTokens === undefined ? null : String(options.homeTokens));
|
|
13104
13340
|
const notFound = JSON.stringify({
|
|
@@ -13435,7 +13671,7 @@ var injectWorkerNegotiation = (wranglerText, options) => {
|
|
|
13435
13671
|
redirects = [],
|
|
13436
13672
|
...workerOptions
|
|
13437
13673
|
} = options;
|
|
13438
|
-
const deployPrefix =
|
|
13674
|
+
const deployPrefix = normalizeBasePath(options.base);
|
|
13439
13675
|
const guardRoutes = new Set(contentRoutePaths.map((route) => normalizePath(deployPrefix && route !== "/" ? `${deployPrefix}${route}` : deployPrefix || route)));
|
|
13440
13676
|
const workerRedirects = redirects.filter((redirect) => redirect.from.startsWith("/") && !guardRoutes.has(normalizePath(redirect.from)));
|
|
13441
13677
|
const rules = mergeRunWorkerFirstRules(assets.run_worker_first, buildRunWorkerFirstRules(options.base));
|
|
@@ -13457,23 +13693,27 @@ var injectWorkerNegotiation = (wranglerText, options) => {
|
|
|
13457
13693
|
};
|
|
13458
13694
|
|
|
13459
13695
|
// src/deploy/redirects.ts
|
|
13460
|
-
var
|
|
13696
|
+
var baseRedirectTarget = (to, basePath, base, routes) => withAuthoredBasePath(base, basePath, to, (route) => servesRoute(routes, route));
|
|
13697
|
+
var applyBaseToAstroRedirects = (redirects, basePath, deployBase, routes) => {
|
|
13461
13698
|
const base = normalizeBasePath(deployBase);
|
|
13462
13699
|
return basePath || base ? redirects.map((redirect) => ({
|
|
13463
13700
|
...redirect,
|
|
13464
13701
|
from: withBasePath(basePath, redirect.from),
|
|
13465
|
-
to:
|
|
13702
|
+
to: baseRedirectTarget(redirect.to, basePath, base, routes)
|
|
13466
13703
|
})) : redirects;
|
|
13467
13704
|
};
|
|
13468
|
-
var applyBaseToPlatformRedirects = (redirects, basePath, deployBase) => {
|
|
13705
|
+
var applyBaseToPlatformRedirects = (redirects, basePath, deployBase, routes) => {
|
|
13469
13706
|
const base = normalizeBasePath(deployBase);
|
|
13470
13707
|
return basePath || base ? redirects.map((redirect) => ({
|
|
13471
13708
|
...redirect,
|
|
13472
13709
|
from: withComposedBasePath(base, basePath, redirect.from),
|
|
13473
|
-
to:
|
|
13710
|
+
to: baseRedirectTarget(redirect.to, basePath, base, routes)
|
|
13474
13711
|
})) : redirects;
|
|
13475
13712
|
};
|
|
13476
|
-
var platformRedirects = (
|
|
13713
|
+
var platformRedirects = (project) => {
|
|
13714
|
+
const { config } = project;
|
|
13715
|
+
return applyBaseToPlatformRedirects(config.redirects, config.basePath, config.deployment.options.base ?? "", routeSetFor(project.manifest.routes));
|
|
13716
|
+
};
|
|
13477
13717
|
var buildNetlifyRedirects = (redirects, force = false) => `${redirects.map((redirect) => `${redirect.from} ${redirect.to} ${redirect.status}${force ? "!" : ""}`).join(`
|
|
13478
13718
|
`)}
|
|
13479
13719
|
`;
|
|
@@ -13481,7 +13721,7 @@ var buildVercelConfig = (redirects, headers = []) => {
|
|
|
13481
13721
|
const config = {
|
|
13482
13722
|
redirects: redirects.map((redirect) => ({
|
|
13483
13723
|
destination: redirect.to,
|
|
13484
|
-
source: redirect.from,
|
|
13724
|
+
source: escapeVercelSource(redirect.from),
|
|
13485
13725
|
statusCode: redirect.status
|
|
13486
13726
|
}))
|
|
13487
13727
|
};
|
|
@@ -13562,6 +13802,7 @@ var netlifyPlatform = {
|
|
|
13562
13802
|
previewDeploy: "netlify deploy",
|
|
13563
13803
|
readsHeaderFiles: { server: false, static: true },
|
|
13564
13804
|
redirectFiles: [NETLIFY_REDIRECTS_FILE],
|
|
13805
|
+
serverClientUnderBase: false,
|
|
13565
13806
|
serverOutputDir: distDir,
|
|
13566
13807
|
serverStaticDir: distDir
|
|
13567
13808
|
};
|
|
@@ -13596,7 +13837,7 @@ var emitCloudflareNegotiation = async (project, log) => {
|
|
|
13596
13837
|
const routePaths = markdownRoutePaths(project);
|
|
13597
13838
|
const rawMarkdown = await buildRawMarkdown(project);
|
|
13598
13839
|
const home = rawMarkdown["/"];
|
|
13599
|
-
const staticDir = clientDir(context);
|
|
13840
|
+
const staticDir = join10(clientDir(context), normalizeBasePath(config.deployment.options.base));
|
|
13600
13841
|
const injected = injectWorkerNegotiation(await readFile9(wranglerPath, "utf-8"), {
|
|
13601
13842
|
base: config.deployment.options.base,
|
|
13602
13843
|
contentRoutePaths: project.manifest.routes.map((route) => route.path),
|
|
@@ -13607,7 +13848,7 @@ var emitCloudflareNegotiation = async (project, log) => {
|
|
|
13607
13848
|
markdown: existsSync5(join10(staticDir, "404.md"))
|
|
13608
13849
|
},
|
|
13609
13850
|
pageJsonPaths: config.agents.api ? project.manifest.routes.filter((route) => !route.hidden && rawMarkdown[route.path] !== undefined).map((route) => pageJsonPath(route.path)) : [],
|
|
13610
|
-
redirects: platformRedirects(
|
|
13851
|
+
redirects: platformRedirects(project),
|
|
13611
13852
|
routePaths
|
|
13612
13853
|
});
|
|
13613
13854
|
if (injected === null) {
|
|
@@ -13699,6 +13940,7 @@ var cloudflarePlatform = {
|
|
|
13699
13940
|
previewDeploy: null,
|
|
13700
13941
|
readsHeaderFiles: { server: true, static: true },
|
|
13701
13942
|
redirectFiles: [REDIRECTS_FILE],
|
|
13943
|
+
serverClientUnderBase: true,
|
|
13702
13944
|
serverOutputDir: distDir,
|
|
13703
13945
|
serverStaticDir: clientDir
|
|
13704
13946
|
};
|
|
@@ -13746,7 +13988,7 @@ var nodeRedirects = (project) => {
|
|
|
13746
13988
|
}
|
|
13747
13989
|
const base = normalizeBasePath(config.deployment.options.base);
|
|
13748
13990
|
const pages = new Set(project.manifest.routes.map((route) => normalizePath(`${base}${route.path}`)));
|
|
13749
|
-
return Object.fromEntries(platformRedirects(
|
|
13991
|
+
return Object.fromEntries(platformRedirects(project).filter((redirect) => !pages.has(normalizePath(redirect.from))).map((redirect) => [
|
|
13750
13992
|
normalizePath(redirect.from),
|
|
13751
13993
|
[encodeURI(redirect.to), redirect.status]
|
|
13752
13994
|
]));
|
|
@@ -13908,6 +14150,7 @@ var nodePlatform = {
|
|
|
13908
14150
|
previewDeploy: null,
|
|
13909
14151
|
readsHeaderFiles: { server: false, static: false },
|
|
13910
14152
|
redirectFiles: [],
|
|
14153
|
+
serverClientUnderBase: false,
|
|
13911
14154
|
serverOutputDir: distDir,
|
|
13912
14155
|
serverStaticDir: clientDir
|
|
13913
14156
|
};
|
|
@@ -13923,7 +14166,7 @@ import { readdir, readFile as readFile11 } from "node:fs/promises";
|
|
|
13923
14166
|
import { builtinModules } from "node:module";
|
|
13924
14167
|
import { init, parse as parse2 } from "es-module-lexer";
|
|
13925
14168
|
import { dirname as dirname7, join as join12, relative as relative7 } from "pathe";
|
|
13926
|
-
import { z as
|
|
14169
|
+
import { z as z56 } from "zod";
|
|
13927
14170
|
var BUILTINS = new Set(builtinModules);
|
|
13928
14171
|
var NON_PACKAGE_PREFIXES = ["node:", "astro:", "virtual:", "data:", "\x00"];
|
|
13929
14172
|
var packageName = (specifier) => {
|
|
@@ -13995,7 +14238,7 @@ var resolvable = (name, from, root) => {
|
|
|
13995
14238
|
}
|
|
13996
14239
|
};
|
|
13997
14240
|
var MODULE_FILE = /\.(?:m?js|cjs)$/u;
|
|
13998
|
-
var vcConfigSchema =
|
|
14241
|
+
var vcConfigSchema = z56.looseObject({ handler: z56.string().optional() });
|
|
13999
14242
|
var listModules = async (dir) => {
|
|
14000
14243
|
const files = [];
|
|
14001
14244
|
const entries = await readdir(dir, { withFileTypes: true });
|
|
@@ -14306,6 +14549,7 @@ var vercelPlatform = {
|
|
|
14306
14549
|
previewDeploy: "vercel deploy",
|
|
14307
14550
|
readsHeaderFiles: { server: false, static: false },
|
|
14308
14551
|
redirectFiles: [VERCEL_JSON_FILE],
|
|
14552
|
+
serverClientUnderBase: false,
|
|
14309
14553
|
serverOutputDir: buildOutputDir,
|
|
14310
14554
|
serverStaticDir: (context) => join13(buildOutputDir(context), "static")
|
|
14311
14555
|
};
|
|
@@ -14325,6 +14569,7 @@ var staticPlatform = {
|
|
|
14325
14569
|
previewDeploy: null,
|
|
14326
14570
|
readsHeaderFiles: { server: false, static: true },
|
|
14327
14571
|
redirectFiles: [REDIRECTS_FILE, VERCEL_JSON_FILE],
|
|
14572
|
+
serverClientUnderBase: false,
|
|
14328
14573
|
serverOutputDir: distDir,
|
|
14329
14574
|
serverStaticDir: distDir
|
|
14330
14575
|
};
|
|
@@ -14396,7 +14641,7 @@ var resolveProjectContext = (root, config, options) => {
|
|
|
14396
14641
|
// src/core/config.ts
|
|
14397
14642
|
import { existsSync as existsSync10, readFileSync as readFileSync4 } from "node:fs";
|
|
14398
14643
|
import { basename as basename6 } from "pathe";
|
|
14399
|
-
import { z as
|
|
14644
|
+
import { z as z57 } from "zod";
|
|
14400
14645
|
|
|
14401
14646
|
// src/core/deployment-env.ts
|
|
14402
14647
|
var applyDeploymentEnv = (config, env = process.env) => {
|
|
@@ -14447,8 +14692,8 @@ class ConfigValidationError extends BlumeError {
|
|
|
14447
14692
|
}
|
|
14448
14693
|
}
|
|
14449
14694
|
var importConfigModule = createDefaultExportLoader();
|
|
14450
|
-
var themeFontsProbeSchema =
|
|
14451
|
-
theme:
|
|
14695
|
+
var themeFontsProbeSchema = z57.looseObject({
|
|
14696
|
+
theme: z57.looseObject({ fonts: z57.unknown().optional() }).optional()
|
|
14452
14697
|
});
|
|
14453
14698
|
var isPathSegment = (segment) => typeof segment !== "symbol";
|
|
14454
14699
|
var locationPath = (issue) => [
|
|
@@ -14550,18 +14795,18 @@ var BLUME_IGNORE_DIRS = [
|
|
|
14550
14795
|
];
|
|
14551
14796
|
var baselineScanIgnore = () => BLUME_IGNORE_DIRS.map((dir) => `**/${dir}/**`);
|
|
14552
14797
|
var BLUME_WATCH_IGNORE_DIRS = BLUME_IGNORE_DIRS;
|
|
14553
|
-
var excludeDirSegments = (patterns) => patterns.map((pattern) => /^(?<dir>[^*/]+)\/\*\*$/u.exec(pattern)?.groups?.dir).filter((dir) => dir !== undefined);
|
|
14798
|
+
var excludeDirSegments = (patterns) => patterns.map((pattern) => /^(?<dir>[^*/]+)\/\*\*$/u.exec(pattern)?.groups?.dir).filter((dir) => dir !== undefined).map((dir) => `/${dir}`);
|
|
14554
14799
|
var ignoringWatchListener = (onChange, ignoreDirs = BLUME_WATCH_IGNORE_DIRS, ignoreSegment = () => false) => {
|
|
14555
14800
|
const ignore = new Set(ignoreDirs);
|
|
14556
14801
|
return (_event, filename) => {
|
|
14557
|
-
if (filename !== null && filename.split(/[/\\]/u).some((segment) => ignore.has(segment) || ignoreSegment(segment))) {
|
|
14802
|
+
if (filename !== null && filename.split(/[/\\]/u).some((segment, index) => ignore.has(segment) || index === 0 && ignore.has(`/${segment}`) || ignoreSegment(segment))) {
|
|
14558
14803
|
return;
|
|
14559
14804
|
}
|
|
14560
14805
|
onChange();
|
|
14561
14806
|
};
|
|
14562
14807
|
};
|
|
14563
14808
|
|
|
14564
|
-
export { OPENAPI_PATH, API_PAGES_PATH, API_PAGE_PATH, API_NAVIGATION_PATH, API_SEARCH_PATH, apiNamePhrase, resolveReferences, referenceRoutes, blumeReferences, hasScalarReferences, builtinProxyReferences, needsPlaygroundProxy, buildMcpDiscovery, buildMcpServerCard, YAML_SCHEMA, frontmatter_default, hasAiCatalog, buildHomeLinkHeader, DEFAULT_CONTENT_INCLUDE, DEFAULT_CONTENT_EXCLUDE, sourcesOfKind, resolveDocsCollection, CHANGELOG_INDEX_ROUTE, hasChangelogIndex, discoverPages, customStaticRoutes, routeIsTaken, hasGeneratedChangelog, customOgRoutes, nextFenceState, hashText, pollingWatch, snapshotCache, loadWithCache,
|
|
14809
|
+
export { i18nEnabled, localeCodes, resolveFallbackLocale, localizeRoute, localizeInternalPath, localeTargetPath, i18nDiagnostics, routeSetFor, OPENAPI_PATH, API_PAGES_PATH, API_PAGE_PATH, API_NAVIGATION_PATH, API_SEARCH_PATH, apiNamePhrase, resolveReferences, referenceRoutes, blumeReferences, hasScalarReferences, builtinProxyReferences, needsPlaygroundProxy, buildMcpDiscovery, buildMcpServerCard, YAML_SCHEMA, frontmatter_default, hasAiCatalog, buildHomeLinkHeader, DEFAULT_CONTENT_INCLUDE, DEFAULT_CONTENT_EXCLUDE, sourcesOfKind, resolveDocsCollection, CHANGELOG_INDEX_ROUTE, hasChangelogIndex, discoverPages, customStaticRoutes, routeIsTaken, hasGeneratedChangelog, customOgRoutes, nextFenceState, hashText, pollingWatch, snapshotCache, loadWithCache, MARKDOWN_BODY_FEATURES, MDX_BODY_FEATURES, TOC_HIDDEN_KEY, parseHeadingMarkers, normalizeRef, isPageRef, pagesByRef, buildNavigation, resolveAskBackend, deployPassthrough, GOOGLE_FONTS, isFontSlug, fontLocaleCodes, localeFontSubsets, buildFontEntries, buildFontsCss, configuredFonts, PUBLIC_API_URL, repoUrl, editBaseUrl, apiUrl, EN_UI, resolveUIStrings, pageMetaSchema, folderMetaSchema, VERSION_ID, VERSION_LIKE, versionizeRoute, versionsDiagnostics, slugify, slugifyPath, unloadablePathDiagnostic, HTML_COMMENT, scanBody, extractHeadings, strippedLineOffset, isStringValue, placeEntryRef, resolveEntryRoute, localizedRoute, normalizeEntry, hasIncludeStatements, expandIncludes, buildIncludeGraph, readExpandedEntryText, rewriteRelativeImages, collectContentAssets, parseYouTubeId, componentRegistry, downlevelComponentNode, downlevelComponents, buildRssFeeds, renderRssFeed, gradeExternal, probeAll, validateLinks, HTTP_METHODS, withServerDefaults, TEMPLATES, PACKAGE_MANAGERS, commandsFor, cdCommand, detectPackageManager, detectProjectPackageManager, validateContentDir, titleize, outsidePnpmWorkspace, workspaceNote, buildPlan, applyPlan, readExistingPackage, nextSteps, nodeRequire, escapeMarkdownText, guardBlockStart, renderInline, destination, linkParts, headingPrefix, blockquote, listItem, indent, codeFence, image, writesMdx, unsupported, joinBlocks, markdownDocument, absoluteUrl, neutralizeUnsafeLinks, columnsPrefix, isOpenApiSource, openApiSource, projectComponentSerializers, applyAudienceVisibility, agentMarkdown, buildRawMarkdown, markdownRoutePaths, SVG_ASSET_HEADERS, applyBaseToAstroRedirects, distDir, adapterRoot, deployPlatform, BLUME_IGNORE_DIRS, baselineScanIgnore, BLUME_WATCH_IGNORE_DIRS, excludeDirSegments, ignoringWatchListener, createModuleLoader, findConfigFile, findComponentsFile, resolveRuntimeDir, resolveProjectContext, ConfigValidationError, loadConfig };
|
|
14565
14810
|
|
|
14566
|
-
//# debugId=
|
|
14567
|
-
//# sourceMappingURL=chunk-
|
|
14811
|
+
//# debugId=5542DC16BF48A55E64756E2164756E21
|
|
14812
|
+
//# sourceMappingURL=chunk-pv29h0wf.js.map
|