blume 0.6.6 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/dist/cli/index.js +1180 -739
  2. package/dist/cli/index.js.map +52 -51
  3. package/dist/types/core/base-path.d.ts +38 -0
  4. package/dist/types/core/config-input.d.ts +74 -10
  5. package/dist/types/core/config.d.ts +3 -2
  6. package/dist/types/core/data.d.ts +2 -0
  7. package/dist/types/core/i18n-ui.d.ts +1 -3
  8. package/dist/types/core/schema.d.ts +95 -52
  9. package/dist/types/core/sources/types.d.ts +2 -0
  10. package/dist/types/core/types.d.ts +6 -1
  11. package/docs/02-deployment.mdx +16 -1
  12. package/docs/03-faq.mdx +8 -8
  13. package/docs/configuration/index.mdx +6 -0
  14. package/docs/content/components.mdx +29 -2
  15. package/docs/content/islands.mdx +8 -0
  16. package/docs/content/syntax.mdx +13 -0
  17. package/package.json +2 -1
  18. package/src/ai/agent-readability.ts +7 -2
  19. package/src/ai/ask.ts +12 -7
  20. package/src/ai/llms.ts +15 -4
  21. package/src/ai/mcp/data.ts +8 -4
  22. package/src/ai/mcp/server.ts +3 -0
  23. package/src/astro/component-slots.ts +5 -3
  24. package/src/astro/examples.ts +12 -7
  25. package/src/astro/generate.ts +317 -144
  26. package/src/astro/index.ts +5 -1
  27. package/src/astro/integration.ts +8 -4
  28. package/src/astro/islands.ts +11 -5
  29. package/src/astro/markdown-negotiation.ts +1 -1
  30. package/src/astro/pages.ts +8 -3
  31. package/src/astro/templates.ts +166 -19
  32. package/src/cli/commands/build.ts +32 -19
  33. package/src/cli/commands/dev.ts +48 -15
  34. package/src/cli/commands/doctor.ts +2 -2
  35. package/src/cli/commands/validate.ts +1 -0
  36. package/src/cli/dev-lock.ts +26 -15
  37. package/src/cli/required-secrets.ts +2 -1
  38. package/src/components/content/CodeBlock.astro +3 -0
  39. package/src/components/content/Component.astro +30 -16
  40. package/src/components/content/Diff.astro +3 -1
  41. package/src/components/content/Update.astro +1 -1
  42. package/src/components/content/auto-type-table.ts +18 -8
  43. package/src/components/content/diff.ts +12 -6
  44. package/src/components/content/mermaid-element.ts +3 -0
  45. package/src/components/index.ts +23 -1
  46. package/src/components/islands/ask-ai.tsx +12 -6
  47. package/src/components/islands/base-path.ts +28 -0
  48. package/src/components/islands/hooks.ts +16 -1
  49. package/src/components/layout/Banner.astro +2 -1
  50. package/src/components/layout/Breadcrumbs.astro +2 -1
  51. package/src/components/layout/Favicon.astro +3 -2
  52. package/src/components/layout/Header.astro +2 -1
  53. package/src/components/layout/LanguageSwitcher.astro +2 -1
  54. package/src/components/layout/Logo.astro +2 -1
  55. package/src/components/layout/NavSelector.astro +2 -1
  56. package/src/components/layout/NavTree.astro +5 -4
  57. package/src/components/layout/PageFeedback.astro +4 -1
  58. package/src/components/layout/PageLayout.astro +9 -4
  59. package/src/components/layout/Pagination.astro +3 -2
  60. package/src/components/layout/RootLayout.astro +7 -4
  61. package/src/components/layout/Search.astro +13 -5
  62. package/src/components/layout/nav-utils.ts +18 -10
  63. package/src/components/layout/search/pagefind.ts +3 -0
  64. package/src/components/layout/toc-element.ts +7 -1
  65. package/src/components/openapi/RequestPanel.astro +7 -1
  66. package/src/components/openapi/snippets.ts +25 -11
  67. package/src/core/base-path.ts +70 -0
  68. package/src/core/component-overrides.ts +103 -74
  69. package/src/core/config-input.ts +81 -15
  70. package/src/core/config.ts +5 -3
  71. package/src/core/content.ts +2 -0
  72. package/src/core/data.ts +2 -0
  73. package/src/core/diagnostics.ts +54 -34
  74. package/src/core/gitignore.ts +4 -1
  75. package/src/core/graph.ts +156 -88
  76. package/src/core/i18n-ui.ts +18 -3
  77. package/src/core/last-modified.ts +2 -0
  78. package/src/core/links.ts +38 -18
  79. package/src/core/manifest.ts +62 -45
  80. package/src/core/nav-diagnostics.ts +1 -1
  81. package/src/core/navigation.ts +116 -55
  82. package/src/core/project-graph.ts +10 -9
  83. package/src/core/schema.ts +572 -621
  84. package/src/core/sources/github-releases.ts +2 -1
  85. package/src/core/sources/mdx-remote.ts +58 -54
  86. package/src/core/sources/normalize.ts +116 -73
  87. package/src/core/sources/notion.ts +19 -10
  88. package/src/core/sources/types.ts +2 -0
  89. package/src/core/tsconfig-aliases.ts +59 -30
  90. package/src/core/types.ts +6 -1
  91. package/src/deploy/redirects.ts +18 -0
  92. package/src/deploy/robots.ts +6 -1
  93. package/src/deploy/rss.ts +10 -3
  94. package/src/deploy/sitemap.ts +14 -10
  95. package/src/markdown/base-links.ts +58 -0
  96. package/src/markdown/code-title.ts +11 -14
  97. package/src/markdown/index.ts +34 -9
  98. package/src/markdown/inline-code.ts +7 -2
  99. package/src/markdown/themes.ts +24 -0
  100. package/src/openapi/model.ts +3 -1
  101. package/src/openapi/references.ts +41 -17
  102. package/src/openapi/render-mdx.ts +11 -6
  103. package/src/openapi/scalar.ts +32 -16
  104. package/src/registry/eject.ts +64 -8
  105. package/src/search/build.ts +3 -0
  106. package/src/search/documents.ts +2 -2
  107. package/src/search/sync/typesense.ts +6 -4
  108. package/src/seo/jsonld.ts +16 -6
  109. package/src/theme/entry.ts +86 -21
@@ -0,0 +1,38 @@
1
+ /**
2
+ * The site-wide `basePath` — a mount point that prepends a segment to every
3
+ * generated route (`/docs/getting-started`) while staying invisible to the
4
+ * navigation tree (see `core/navigation.ts`, which builds groups from a page's
5
+ * base-less `navPath` and takes URLs from its based `route`). This is distinct
6
+ * from a per-source `prefix` (a namespace that *does* create a sidebar group)
7
+ * and from `deployment.base` (Astro's host-subdirectory base); the two compose,
8
+ * stacking as `{deployment.base}/{basePath}/page`.
9
+ *
10
+ * These helpers run server-side (config, route construction, the link checker,
11
+ * redirects, the markdown link plugin). The client-side counterpart lives in
12
+ * `components/islands/base-path.ts` and serves `deployment.base` via `BASE_URL`.
13
+ */
14
+ /**
15
+ * Canonicalize a configured base path to either `""` (none) or `/seg[/seg…]`
16
+ * (leading slash, no trailing slash, collapsed inner slashes). A blank value or
17
+ * bare `/` normalizes to `""`, so an unset/`"/"` base is a clean no-op.
18
+ */
19
+ export declare const normalizeBasePath: (input?: string) => string;
20
+ /**
21
+ * Whether a link target is a root-relative internal path (`/x`) — the only
22
+ * shape a base path applies to. Protocol-relative (`//host`), absolute URLs,
23
+ * other schemes (`mailto:`), fragments (`#x`), and relative paths are excluded.
24
+ */
25
+ export declare const isInternalPath: (target: string) => boolean;
26
+ /**
27
+ * Idempotently prepend `basePath` to a root-relative route. A route already
28
+ * equal to or nested under the base is returned unchanged, so authors who write
29
+ * the base by hand (`/docs/x`) aren't double-prefixed to `/docs/docs/x`.
30
+ */
31
+ export declare const withBasePath: (basePath: string, route: string) => string;
32
+ /**
33
+ * Remove `basePath` from the front of a route (`/docs/guide` -> `/guide`,
34
+ * `/docs` -> `/`). A route not under the base is returned unchanged. Inverse of
35
+ * {@link withBasePath}; used to resolve public assets, which live at the site
36
+ * root regardless of the base.
37
+ */
38
+ export declare const stripBasePath: (basePath: string, route: string) => string;
@@ -264,11 +264,15 @@ export interface NavSelectorItem {
264
264
  * A header dropdown for switching context — versions, languages, products, or a
265
265
  * generic dropdown. `kind` drives the icon and a11y labeling.
266
266
  */
267
+ /** Context-partition selector kinds (a versioned/localized/multi-product site). */
268
+ type NavSelectorContextKind = "product" | "version";
269
+ /** What a header selector switches between. */
270
+ type NavSelectorKind = "dropdown" | "language" | NavSelectorContextKind;
267
271
  export interface NavSelector {
268
272
  /** The options shown in the dropdown. */
269
273
  items?: NavSelectorItem[];
270
274
  /** What the selector switches between. */
271
- kind: "dropdown" | "language" | "product" | "version";
275
+ kind: NavSelectorKind;
272
276
  /** Selector label / current value. */
273
277
  label: string;
274
278
  }
@@ -323,6 +327,10 @@ export interface FontsConfig {
323
327
  mono?: LiteralUnion<FontSlug>;
324
328
  }
325
329
  /** Colors, fonts, radius, and color-mode behavior. */
330
+ /** Corner radius scale (`none`/`sm` tighter, `md`/`lg` rounder). */
331
+ type RadiusScaleTight = "none" | "sm";
332
+ type RadiusScaleRound = "md" | "lg";
333
+ type RadiusScale = RadiusScaleTight | RadiusScaleRound;
326
334
  export interface ThemeConfig {
327
335
  /**
328
336
  * Accent color. A palette name (`blue`, `violet`, `green`, …) or any CSS
@@ -346,7 +354,7 @@ export interface ThemeConfig {
346
354
  /** Initial color mode. Defaults to `system`. */
347
355
  mode?: "system" | "light" | "dark";
348
356
  /** Corner radius scale. Defaults to `md`. */
349
- radius?: "none" | "sm" | "md" | "lg";
357
+ radius?: RadiusScale;
350
358
  }
351
359
  /** Public credentials for the Algolia backend (the sync key stays an env var). */
352
360
  export interface AlgoliaSearch {
@@ -403,6 +411,9 @@ export interface AskSuggestion {
403
411
  label: string;
404
412
  }
405
413
  /** The Ask AI chat assistant. */
414
+ /** Backends that can route an Ask AI request. */
415
+ type AskProviderGateway = "gateway" | "openrouter" | "llmgateway";
416
+ type AskProvider = AskProviderGateway | "inkeep" | "openai-compatible";
406
417
  export interface AskConfig {
407
418
  /**
408
419
  * Name of the env var holding the provider API key. Each provider has a
@@ -419,7 +430,7 @@ export interface AskConfig {
419
430
  /** Model id to use. Defaults to `openai/gpt-5.5`. */
420
431
  model?: string;
421
432
  /** Which backend routes the request. Defaults to `gateway`. */
422
- provider?: "gateway" | "openrouter" | "llmgateway" | "inkeep" | "openai-compatible";
433
+ provider?: AskProvider;
423
434
  /** Starter prompts shown before the first question. */
424
435
  suggestions?: AskSuggestion[];
425
436
  }
@@ -501,9 +512,12 @@ export interface I18nConfig {
501
512
  * Where and how the site deploys. `site` (and `adapter`) are auto-detected from
502
513
  * the platform env on Vercel, Netlify, and Cloudflare.
503
514
  */
515
+ /** Astro server-output adapters, by hosting platform. */
516
+ type CloudDeploymentAdapter = "netlify" | "cloudflare";
517
+ type DeploymentAdapter = "vercel" | "node" | CloudDeploymentAdapter;
504
518
  export interface DeploymentConfig {
505
519
  /** Astro adapter for server output. `null` (default) keeps a static build. */
506
- adapter?: "vercel" | "node" | "netlify" | "cloudflare" | null;
520
+ adapter?: DeploymentAdapter | null;
507
521
  /** Base path when the site is served from a subdirectory. */
508
522
  base?: string;
509
523
  /** Build output mode. Defaults to `static`. */
@@ -514,12 +528,16 @@ export interface DeploymentConfig {
514
528
  */
515
529
  site?: string;
516
530
  }
531
+ /** HTTP redirect status codes: permanent (301/308) and temporary (302/307). */
532
+ type RedirectStatusPermanent = 301 | 308;
533
+ type RedirectStatusTemporary = 302 | 307;
534
+ type RedirectStatus = RedirectStatusPermanent | RedirectStatusTemporary;
517
535
  /** A URL redirect rule. */
518
536
  export interface RedirectConfig {
519
537
  /** Path to redirect from. */
520
538
  from: string;
521
539
  /** HTTP status. Defaults to `301`. */
522
- status?: 301 | 302 | 307 | 308;
540
+ status?: RedirectStatus;
523
541
  /** Path or URL to redirect to. */
524
542
  to: string;
525
543
  }
@@ -594,7 +612,10 @@ export interface CodeConfig {
594
612
  export interface MarkdownConfig {
595
613
  /** Code-block rendering: language icons, line wrap. */
596
614
  code?: CodeConfig;
597
- /** Syntax-highlighting themes for fenced code blocks. */
615
+ /**
616
+ * Syntax-highlighting themes for every code surface — fenced blocks, inline
617
+ * `` `code`{:lang} ``, `<CodeBlock>`, and `<Diff>`.
618
+ */
598
619
  codeBlocks?: {
599
620
  /** Shiki theme names per color mode. */
600
621
  theme?: {
@@ -612,6 +633,15 @@ export interface MarkdownConfig {
612
633
  /** Make content images click-to-zoom (lightbox). Defaults to `true`. */
613
634
  imageZoom?: boolean;
614
635
  }
636
+ /** React island behavior. */
637
+ export interface ReactConfig {
638
+ /**
639
+ * Auto-memoize React components/hooks with the React Compiler
640
+ * (`babel-plugin-react-compiler`). On by default whenever React is enabled;
641
+ * set to `false` to skip the compiler's babel pass. Defaults to `true`.
642
+ */
643
+ compiler?: boolean;
644
+ }
615
645
  /**
616
646
  * OpenAPI reference. By default (`renderer: "blume"`) Blume renders its own UI:
617
647
  * one real page per operation, grouped by tag in the sidebar and included in
@@ -653,6 +683,24 @@ export interface AsyncApiConfig {
653
683
  /** Scalar theme name. */
654
684
  theme?: string;
655
685
  }
686
+ /** `<Component />` example previews (the object form of `examples`). */
687
+ export interface ExamplesConfig {
688
+ /**
689
+ * A stylesheet, relative to the project root, injected into every preview
690
+ * frame after Blume's default tokens. Previews render inside an isolated
691
+ * iframe the docs styles never reach, so design tokens for the previewed
692
+ * components — shadcn variables, `@theme` mappings, custom fonts — live
693
+ * here. Tailwind is already provided in the frame; the file should hold
694
+ * tokens and styles, not another `@import "tailwindcss"`.
695
+ */
696
+ css?: string;
697
+ /**
698
+ * Where example files live, relative to the project root. Defaults to
699
+ * `examples`; may be a glob to target a registry that colocates component
700
+ * sources with their examples (e.g. `registry/<pkg>/**\/examples/*`).
701
+ */
702
+ source?: string;
703
+ }
656
704
  /**
657
705
  * Reader-facing "Export" page actions. A boolean toggles both formats; the
658
706
  * object form enables each individually. Defaults to `false`.
@@ -696,6 +744,16 @@ export interface BlumeConfig {
696
744
  asyncapi?: AsyncApiConfig;
697
745
  /** Site-wide announcement banner shown above the header. */
698
746
  banner?: BannerConfig;
747
+ /**
748
+ * Site-wide mount point prepended to every generated route (e.g. `/docs`) —
749
+ * pages, links, redirects, sitemap, OG images, `llms.txt`, and the search
750
+ * index — while staying invisible to the sidebar/nav tree (no wrapper group).
751
+ * Distinct from a per-source `prefix` (which namespaces one source *and*
752
+ * creates a group) and from `deployment.base` (Astro's host-subdirectory
753
+ * base, for serving the whole site — root included — from a subpath). The two
754
+ * compose: with both set, a page lands at `{deployment.base}/{basePath}/page`.
755
+ */
756
+ basePath?: string;
699
757
  /** Where content lives and how it's discovered. */
700
758
  content?: ContentConfig;
701
759
  /** Where and how the site deploys (site URL, adapter, output mode). */
@@ -703,11 +761,15 @@ export interface BlumeConfig {
703
761
  /** Default meta description, used where a page sets none. */
704
762
  description?: string;
705
763
  /**
706
- * Where `<Component path>` resolves live previews and their source from,
707
- * relative to the project root. Defaults to `examples`. May be a glob to
708
- * target a registry that colocates component sources with their examples.
764
+ * `<Component path>` example previews. A string is shorthand for
765
+ * `{ source }`: where examples live, relative to the project root (defaults
766
+ * to `examples`; may be a glob to target a registry that colocates
767
+ * component sources with their examples). The object form adds `css` — a
768
+ * stylesheet injected into every preview frame (previews render in an
769
+ * iframe the docs theme never reaches), for the previewed components'
770
+ * design tokens, e.g. shadcn variables.
709
771
  */
710
- examples?: string;
772
+ examples?: string | ExamplesConfig;
711
773
  /** Reader-facing PDF/EPUB export actions. Defaults to `false`. */
712
774
  export?: ExportConfig;
713
775
  /** Show the per-page "Was this helpful?" widget. Defaults to `true`. */
@@ -728,6 +790,8 @@ export interface BlumeConfig {
728
790
  navigation?: NavigationConfig;
729
791
  /** Native OpenAPI reference. */
730
792
  openapi?: OpenApiConfig;
793
+ /** React island behavior (compiler auto-memoization). */
794
+ react?: ReactConfig;
731
795
  /** URL redirect rules. */
732
796
  redirects?: RedirectConfig[];
733
797
  /** Search backend and credentials. */
@@ -83,8 +83,9 @@ import type { Diagnostic } from "./types.ts";
83
83
  * - `i18n` — opt-in multi-locale: `locales`, `defaultLocale`, `parser`
84
84
  * (`dir` vs filename `dot` suffix), and per-locale UI overrides.
85
85
  *
86
- * - `examples` — where `<Component path>` previews resolve their source from
87
- * (defaults to `examples/`; supports a glob for colocated registries).
86
+ * - `examples` — `<Component path>` previews: `source` (default `examples/`;
87
+ * supports a glob for colocated registries) and `css`, a stylesheet injected
88
+ * into the isolated preview frames (e.g. shadcn variables).
88
89
  *
89
90
  * @example Zero-config — just render the Markdown under `docs/`.
90
91
  * ```ts
@@ -87,6 +87,8 @@ export interface BlumeDataConfig {
87
87
  suggestions: NonNullable<ResolvedConfig["ai"]["ask"]>["suggestions"];
88
88
  } | null;
89
89
  banner: BlumeBanner | null;
90
+ /** `markdown.codeBlocks.theme`: light/dark Shiki themes for code surfaces. */
91
+ codeThemes: ResolvedConfig["markdown"]["codeBlocks"]["theme"];
90
92
  /** `markdown.code.wrap`: wrap long code lines instead of scrolling. */
91
93
  codeWrap: boolean;
92
94
  description: string | undefined;
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
- import { UI_PACKS } from "./ui-packs/index.ts";
3
2
  /**
4
3
  * Translatable UI chrome strings.
5
4
  *
@@ -566,7 +565,6 @@ export declare const uiStringsSchema: z.ZodDefault<z.ZodObject<{
566
565
  }>>;
567
566
  /** A fully-resolved dictionary; every key present. */
568
567
  export type UIStrings = z.infer<typeof uiStringsObject>;
569
- /** The English baseline, derived from the schema defaults. */
570
568
  export declare const EN_UI: UIStrings;
571
569
  /**
572
570
  * A partial override: `{ group: { key: "translation" } }`. Validated loosely
@@ -583,7 +581,7 @@ export declare const uiLocaleOverridesSchema: z.ZodRecord<z.ZodString, z.ZodReco
583
581
  * pack so adopters get translated chrome out of the box. Re-exported here so the
584
582
  * resolver and existing imports keep a single entry point.
585
583
  */
586
- export { UI_PACKS };
584
+ export { UI_PACKS } from "./ui-packs/index.ts";
587
585
  /**
588
586
  * Resolve the active dictionary for a locale. Layers, in order:
589
587
  * English baseline ← default-locale pack ← default-locale override ←
@@ -10,32 +10,32 @@ declare const pageMetaBaseSchema: z.ZodObject<{
10
10
  image: z.ZodOptional<z.ZodString>;
11
11
  name: z.ZodString;
12
12
  url: z.ZodOptional<z.ZodString>;
13
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
13
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
14
14
  avatar: z.ZodOptional<z.ZodString>;
15
15
  image: z.ZodOptional<z.ZodString>;
16
16
  name: z.ZodString;
17
17
  url: z.ZodOptional<z.ZodString>;
18
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
18
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
19
19
  avatar: z.ZodOptional<z.ZodString>;
20
20
  image: z.ZodOptional<z.ZodString>;
21
21
  name: z.ZodString;
22
22
  url: z.ZodOptional<z.ZodString>;
23
- }, z.ZodTypeAny, "passthrough">>]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
23
+ }, z.ZodUnknown, "strip">>]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
24
24
  avatar: z.ZodOptional<z.ZodString>;
25
25
  image: z.ZodOptional<z.ZodString>;
26
26
  name: z.ZodString;
27
27
  url: z.ZodOptional<z.ZodString>;
28
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
28
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
29
29
  avatar: z.ZodOptional<z.ZodString>;
30
30
  image: z.ZodOptional<z.ZodString>;
31
31
  name: z.ZodString;
32
32
  url: z.ZodOptional<z.ZodString>;
33
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
33
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
34
34
  avatar: z.ZodOptional<z.ZodString>;
35
35
  image: z.ZodOptional<z.ZodString>;
36
36
  name: z.ZodString;
37
37
  url: z.ZodOptional<z.ZodString>;
38
- }, z.ZodTypeAny, "passthrough">>]>, "many">]>>;
38
+ }, z.ZodUnknown, "strip">>]>, "many">]>>;
39
39
  changelog: z.ZodOptional<z.ZodObject<{
40
40
  category: z.ZodOptional<z.ZodString>;
41
41
  date: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodDate]>, string, string | Date>>;
@@ -146,12 +146,12 @@ declare const pageMetaBaseSchema: z.ZodObject<{
146
146
  image: z.ZodOptional<z.ZodString>;
147
147
  name: z.ZodString;
148
148
  url: z.ZodOptional<z.ZodString>;
149
- }, z.ZodTypeAny, "passthrough"> | (string | z.objectOutputType<{
149
+ }, z.ZodUnknown, "strip"> | (string | z.objectOutputType<{
150
150
  avatar: z.ZodOptional<z.ZodString>;
151
151
  image: z.ZodOptional<z.ZodString>;
152
152
  name: z.ZodString;
153
153
  url: z.ZodOptional<z.ZodString>;
154
- }, z.ZodTypeAny, "passthrough">)[] | undefined;
154
+ }, z.ZodUnknown, "strip">)[] | undefined;
155
155
  changelog?: {
156
156
  date?: string | undefined;
157
157
  category?: string | undefined;
@@ -175,12 +175,12 @@ declare const pageMetaBaseSchema: z.ZodObject<{
175
175
  image: z.ZodOptional<z.ZodString>;
176
176
  name: z.ZodString;
177
177
  url: z.ZodOptional<z.ZodString>;
178
- }, z.ZodTypeAny, "passthrough"> | (string | z.objectInputType<{
178
+ }, z.ZodUnknown, "strip"> | (string | z.objectInputType<{
179
179
  avatar: z.ZodOptional<z.ZodString>;
180
180
  image: z.ZodOptional<z.ZodString>;
181
181
  name: z.ZodString;
182
182
  url: z.ZodOptional<z.ZodString>;
183
- }, z.ZodTypeAny, "passthrough">)[] | undefined;
183
+ }, z.ZodUnknown, "strip">)[] | undefined;
184
184
  changelog?: {
185
185
  date?: string | Date | undefined;
186
186
  category?: string | undefined;
@@ -215,32 +215,32 @@ export declare const pageMetaSchema: z.ZodObject<{
215
215
  image: z.ZodOptional<z.ZodString>;
216
216
  name: z.ZodString;
217
217
  url: z.ZodOptional<z.ZodString>;
218
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
218
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
219
219
  avatar: z.ZodOptional<z.ZodString>;
220
220
  image: z.ZodOptional<z.ZodString>;
221
221
  name: z.ZodString;
222
222
  url: z.ZodOptional<z.ZodString>;
223
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
223
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
224
224
  avatar: z.ZodOptional<z.ZodString>;
225
225
  image: z.ZodOptional<z.ZodString>;
226
226
  name: z.ZodString;
227
227
  url: z.ZodOptional<z.ZodString>;
228
- }, z.ZodTypeAny, "passthrough">>]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
228
+ }, z.ZodUnknown, "strip">>]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
229
229
  avatar: z.ZodOptional<z.ZodString>;
230
230
  image: z.ZodOptional<z.ZodString>;
231
231
  name: z.ZodString;
232
232
  url: z.ZodOptional<z.ZodString>;
233
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
233
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
234
234
  avatar: z.ZodOptional<z.ZodString>;
235
235
  image: z.ZodOptional<z.ZodString>;
236
236
  name: z.ZodString;
237
237
  url: z.ZodOptional<z.ZodString>;
238
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
238
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
239
239
  avatar: z.ZodOptional<z.ZodString>;
240
240
  image: z.ZodOptional<z.ZodString>;
241
241
  name: z.ZodString;
242
242
  url: z.ZodOptional<z.ZodString>;
243
- }, z.ZodTypeAny, "passthrough">>]>, "many">]>>;
243
+ }, z.ZodUnknown, "strip">>]>, "many">]>>;
244
244
  changelog: z.ZodOptional<z.ZodObject<{
245
245
  category: z.ZodOptional<z.ZodString>;
246
246
  date: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodDate]>, string, string | Date>>;
@@ -351,12 +351,12 @@ export declare const pageMetaSchema: z.ZodObject<{
351
351
  image: z.ZodOptional<z.ZodString>;
352
352
  name: z.ZodString;
353
353
  url: z.ZodOptional<z.ZodString>;
354
- }, z.ZodTypeAny, "passthrough"> | (string | z.objectOutputType<{
354
+ }, z.ZodUnknown, "strip"> | (string | z.objectOutputType<{
355
355
  avatar: z.ZodOptional<z.ZodString>;
356
356
  image: z.ZodOptional<z.ZodString>;
357
357
  name: z.ZodString;
358
358
  url: z.ZodOptional<z.ZodString>;
359
- }, z.ZodTypeAny, "passthrough">)[] | undefined;
359
+ }, z.ZodUnknown, "strip">)[] | undefined;
360
360
  changelog?: {
361
361
  date?: string | undefined;
362
362
  category?: string | undefined;
@@ -380,12 +380,12 @@ export declare const pageMetaSchema: z.ZodObject<{
380
380
  image: z.ZodOptional<z.ZodString>;
381
381
  name: z.ZodString;
382
382
  url: z.ZodOptional<z.ZodString>;
383
- }, z.ZodTypeAny, "passthrough"> | (string | z.objectInputType<{
383
+ }, z.ZodUnknown, "strip"> | (string | z.objectInputType<{
384
384
  avatar: z.ZodOptional<z.ZodString>;
385
385
  image: z.ZodOptional<z.ZodString>;
386
386
  name: z.ZodString;
387
387
  url: z.ZodOptional<z.ZodString>;
388
- }, z.ZodTypeAny, "passthrough">)[] | undefined;
388
+ }, z.ZodUnknown, "strip">)[] | undefined;
389
389
  changelog?: {
390
390
  date?: string | Date | undefined;
391
391
  category?: string | undefined;
@@ -1149,6 +1149,13 @@ export declare const blumeConfigSchema: z.ZodObject<{
1149
1149
  text: string;
1150
1150
  } | undefined;
1151
1151
  }>]>>;
1152
+ /**
1153
+ * Site-wide mount point prepended to every generated route (e.g. `/docs`),
1154
+ * while staying invisible to the sidebar/nav tree. Distinct from a per-source
1155
+ * `prefix` (which creates a group) and from `deployment.base` (Astro's
1156
+ * host-subdirectory base); the two compose. Normalized to `""` or `/seg`.
1157
+ */
1158
+ basePath: z.ZodEffects<z.ZodOptional<z.ZodString>, string, string | undefined>;
1152
1159
  content: z.ZodDefault<z.ZodObject<{
1153
1160
  defaultType: z.ZodDefault<z.ZodString>;
1154
1161
  exclude: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
@@ -1544,19 +1551,28 @@ export declare const blumeConfigSchema: z.ZodObject<{
1544
1551
  }>>;
1545
1552
  description: z.ZodOptional<z.ZodString>;
1546
1553
  /**
1547
- * Where `<Component path>` resolves live previews and their source from,
1548
- * relative to the project root. Defaults to the `examples` directory; point
1549
- * it elsewhere when examples live outside a top-level `examples/`.
1550
- *
1551
- * May be a glob (anything with `*`/`?`/`[]`/`{}`/`!`), in which case only
1552
- * matching files are discovered and a `<Component path>` key is relative to
1553
- * the glob's static prefix. Use this for a registry layout that colocates
1554
- * component sources with their examples — `registry/<pkg>/**\/examples/*`
1555
- * targets just the examples, leaving the sources (which have no default
1556
- * export to wrap) out, so the registry needn't be forked into its own
1557
- * examples directory.
1554
+ * Where `<Component path>` resolves live previews and their source from.
1555
+ * A string is shorthand for `{ source }` — the directory (or glob, for
1556
+ * colocated registry layouts) under the project root that holds example
1557
+ * files. The object form adds `css`: a stylesheet injected into every
1558
+ * preview frame (design tokens, shadcn variables, `@theme` mappings).
1558
1559
  */
1559
- examples: z.ZodDefault<z.ZodString>;
1560
+ examples: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodObject<{
1561
+ css: z.ZodOptional<z.ZodString>;
1562
+ source: z.ZodDefault<z.ZodString>;
1563
+ }, "strict", z.ZodTypeAny, {
1564
+ source: string;
1565
+ css?: string | undefined;
1566
+ }, {
1567
+ source?: string | undefined;
1568
+ css?: string | undefined;
1569
+ }>]>, {
1570
+ css?: string;
1571
+ source: string;
1572
+ }, string | {
1573
+ source?: string | undefined;
1574
+ css?: string | undefined;
1575
+ }>>;
1560
1576
  export: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
1561
1577
  epub: z.ZodDefault<z.ZodBoolean>;
1562
1578
  pdf: z.ZodDefault<z.ZodBoolean>;
@@ -1846,10 +1862,10 @@ export declare const blumeConfigSchema: z.ZodObject<{
1846
1862
  icon?: string | undefined;
1847
1863
  tag?: string | undefined;
1848
1864
  }[];
1849
- kind: "version" | "dropdown" | "language" | "product";
1865
+ kind: "version" | "product" | "dropdown" | "language";
1850
1866
  }, {
1851
1867
  label: string;
1852
- kind: "version" | "dropdown" | "language" | "product";
1868
+ kind: "version" | "product" | "dropdown" | "language";
1853
1869
  items?: {
1854
1870
  path: string;
1855
1871
  label: string;
@@ -1946,7 +1962,7 @@ export declare const blumeConfigSchema: z.ZodObject<{
1946
1962
  icon?: string | undefined;
1947
1963
  tag?: string | undefined;
1948
1964
  }[];
1949
- kind: "version" | "dropdown" | "language" | "product";
1965
+ kind: "version" | "product" | "dropdown" | "language";
1950
1966
  }[];
1951
1967
  tabs?: {
1952
1968
  path: string;
@@ -1973,7 +1989,7 @@ export declare const blumeConfigSchema: z.ZodObject<{
1973
1989
  }[] | undefined;
1974
1990
  selectors?: {
1975
1991
  label: string;
1976
- kind: "version" | "dropdown" | "language" | "product";
1992
+ kind: "version" | "product" | "dropdown" | "language";
1977
1993
  items?: {
1978
1994
  path: string;
1979
1995
  label: string;
@@ -2053,6 +2069,19 @@ export declare const blumeConfigSchema: z.ZodObject<{
2053
2069
  expandSchemas?: boolean | undefined;
2054
2070
  renderer?: "blume" | "scalar" | undefined;
2055
2071
  }>>;
2072
+ react: z.ZodDefault<z.ZodObject<{
2073
+ /**
2074
+ * Auto-memoize React components/hooks with the React Compiler
2075
+ * (`babel-plugin-react-compiler`). On by default whenever React is enabled
2076
+ * (a project `.tsx`/`.jsx`, a React island/example/override, or Ask AI); set
2077
+ * to `false` to skip the compiler's babel pass.
2078
+ */
2079
+ compiler: z.ZodDefault<z.ZodBoolean>;
2080
+ }, "strict", z.ZodTypeAny, {
2081
+ compiler: boolean;
2082
+ }, {
2083
+ compiler?: boolean | undefined;
2084
+ }>>;
2056
2085
  redirects: z.ZodDefault<z.ZodArray<z.ZodObject<{
2057
2086
  from: z.ZodString;
2058
2087
  status: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<301>, z.ZodLiteral<302>, z.ZodLiteral<307>, z.ZodLiteral<308>]>>;
@@ -2380,13 +2409,13 @@ export declare const blumeConfigSchema: z.ZodObject<{
2380
2409
  light?: string | undefined;
2381
2410
  } | undefined>;
2382
2411
  fonts: z.ZodDefault<z.ZodObject<{
2383
- body: z.ZodDefault<z.ZodEffects<z.ZodString, "dm-sans" | "figtree" | "fira-code" | "geist" | "geist-mono" | "ibm-plex-mono" | "ibm-plex-sans" | "ibm-plex-serif" | "inter" | "inter-tight" | "jetbrains-mono" | "lora" | "manrope" | "merriweather" | "open-sans" | "playfair-display" | "plus-jakarta-sans" | "roboto" | "roboto-mono" | "source-code-pro" | "source-sans-3" | "source-serif-4" | "space-grotesk" | "space-mono" | "work-sans", string>>;
2384
- display: z.ZodDefault<z.ZodEffects<z.ZodString, "dm-sans" | "figtree" | "fira-code" | "geist" | "geist-mono" | "ibm-plex-mono" | "ibm-plex-sans" | "ibm-plex-serif" | "inter" | "inter-tight" | "jetbrains-mono" | "lora" | "manrope" | "merriweather" | "open-sans" | "playfair-display" | "plus-jakarta-sans" | "roboto" | "roboto-mono" | "source-code-pro" | "source-sans-3" | "source-serif-4" | "space-grotesk" | "space-mono" | "work-sans", string>>;
2385
- mono: z.ZodDefault<z.ZodEffects<z.ZodString, "dm-sans" | "figtree" | "fira-code" | "geist" | "geist-mono" | "ibm-plex-mono" | "ibm-plex-sans" | "ibm-plex-serif" | "inter" | "inter-tight" | "jetbrains-mono" | "lora" | "manrope" | "merriweather" | "open-sans" | "playfair-display" | "plus-jakarta-sans" | "roboto" | "roboto-mono" | "source-code-pro" | "source-sans-3" | "source-serif-4" | "space-grotesk" | "space-mono" | "work-sans", string>>;
2412
+ body: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
2413
+ display: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
2414
+ mono: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
2386
2415
  }, "strict", z.ZodTypeAny, {
2387
- mono: "dm-sans" | "figtree" | "fira-code" | "geist" | "geist-mono" | "ibm-plex-mono" | "ibm-plex-sans" | "ibm-plex-serif" | "inter" | "inter-tight" | "jetbrains-mono" | "lora" | "manrope" | "merriweather" | "open-sans" | "playfair-display" | "plus-jakarta-sans" | "roboto" | "roboto-mono" | "source-code-pro" | "source-sans-3" | "source-serif-4" | "space-grotesk" | "space-mono" | "work-sans";
2388
- display: "dm-sans" | "figtree" | "fira-code" | "geist" | "geist-mono" | "ibm-plex-mono" | "ibm-plex-sans" | "ibm-plex-serif" | "inter" | "inter-tight" | "jetbrains-mono" | "lora" | "manrope" | "merriweather" | "open-sans" | "playfair-display" | "plus-jakarta-sans" | "roboto" | "roboto-mono" | "source-code-pro" | "source-sans-3" | "source-serif-4" | "space-grotesk" | "space-mono" | "work-sans";
2389
- body: "dm-sans" | "figtree" | "fira-code" | "geist" | "geist-mono" | "ibm-plex-mono" | "ibm-plex-sans" | "ibm-plex-serif" | "inter" | "inter-tight" | "jetbrains-mono" | "lora" | "manrope" | "merriweather" | "open-sans" | "playfair-display" | "plus-jakarta-sans" | "roboto" | "roboto-mono" | "source-code-pro" | "source-sans-3" | "source-serif-4" | "space-grotesk" | "space-mono" | "work-sans";
2416
+ mono: string;
2417
+ display: string;
2418
+ body: string;
2390
2419
  }, {
2391
2420
  mono?: string | undefined;
2392
2421
  display?: string | undefined;
@@ -2401,9 +2430,9 @@ export declare const blumeConfigSchema: z.ZodObject<{
2401
2430
  light: string;
2402
2431
  };
2403
2432
  fonts: {
2404
- mono: "dm-sans" | "figtree" | "fira-code" | "geist" | "geist-mono" | "ibm-plex-mono" | "ibm-plex-sans" | "ibm-plex-serif" | "inter" | "inter-tight" | "jetbrains-mono" | "lora" | "manrope" | "merriweather" | "open-sans" | "playfair-display" | "plus-jakarta-sans" | "roboto" | "roboto-mono" | "source-code-pro" | "source-sans-3" | "source-serif-4" | "space-grotesk" | "space-mono" | "work-sans";
2405
- display: "dm-sans" | "figtree" | "fira-code" | "geist" | "geist-mono" | "ibm-plex-mono" | "ibm-plex-sans" | "ibm-plex-serif" | "inter" | "inter-tight" | "jetbrains-mono" | "lora" | "manrope" | "merriweather" | "open-sans" | "playfair-display" | "plus-jakarta-sans" | "roboto" | "roboto-mono" | "source-code-pro" | "source-sans-3" | "source-serif-4" | "space-grotesk" | "space-mono" | "work-sans";
2406
- body: "dm-sans" | "figtree" | "fira-code" | "geist" | "geist-mono" | "ibm-plex-mono" | "ibm-plex-sans" | "ibm-plex-serif" | "inter" | "inter-tight" | "jetbrains-mono" | "lora" | "manrope" | "merriweather" | "open-sans" | "playfair-display" | "plus-jakarta-sans" | "roboto" | "roboto-mono" | "source-code-pro" | "source-sans-3" | "source-serif-4" | "space-grotesk" | "space-mono" | "work-sans";
2433
+ mono: string;
2434
+ display: string;
2435
+ body: string;
2407
2436
  };
2408
2437
  layout: "sidebar";
2409
2438
  mode: "dark" | "light" | "system";
@@ -2601,9 +2630,9 @@ export declare const blumeConfigSchema: z.ZodObject<{
2601
2630
  light: string;
2602
2631
  };
2603
2632
  fonts: {
2604
- mono: "dm-sans" | "figtree" | "fira-code" | "geist" | "geist-mono" | "ibm-plex-mono" | "ibm-plex-sans" | "ibm-plex-serif" | "inter" | "inter-tight" | "jetbrains-mono" | "lora" | "manrope" | "merriweather" | "open-sans" | "playfair-display" | "plus-jakarta-sans" | "roboto" | "roboto-mono" | "source-code-pro" | "source-sans-3" | "source-serif-4" | "space-grotesk" | "space-mono" | "work-sans";
2605
- display: "dm-sans" | "figtree" | "fira-code" | "geist" | "geist-mono" | "ibm-plex-mono" | "ibm-plex-sans" | "ibm-plex-serif" | "inter" | "inter-tight" | "jetbrains-mono" | "lora" | "manrope" | "merriweather" | "open-sans" | "playfair-display" | "plus-jakarta-sans" | "roboto" | "roboto-mono" | "source-code-pro" | "source-sans-3" | "source-serif-4" | "space-grotesk" | "space-mono" | "work-sans";
2606
- body: "dm-sans" | "figtree" | "fira-code" | "geist" | "geist-mono" | "ibm-plex-mono" | "ibm-plex-sans" | "ibm-plex-serif" | "inter" | "inter-tight" | "jetbrains-mono" | "lora" | "manrope" | "merriweather" | "open-sans" | "playfair-display" | "plus-jakarta-sans" | "roboto" | "roboto-mono" | "source-code-pro" | "source-sans-3" | "source-serif-4" | "space-grotesk" | "space-mono" | "work-sans";
2633
+ mono: string;
2634
+ display: string;
2635
+ body: string;
2607
2636
  };
2608
2637
  layout: "sidebar";
2609
2638
  mode: "dark" | "light" | "system";
@@ -2629,13 +2658,17 @@ export declare const blumeConfigSchema: z.ZodObject<{
2629
2658
  spec?: string | undefined;
2630
2659
  theme?: string | undefined;
2631
2660
  };
2661
+ basePath: string;
2632
2662
  deployment: {
2633
2663
  adapter: "vercel" | "node" | "netlify" | "cloudflare" | null;
2634
2664
  output: "static" | "server";
2635
2665
  base?: string | undefined;
2636
2666
  site?: string | undefined;
2637
2667
  };
2638
- examples: string;
2668
+ examples: {
2669
+ css?: string;
2670
+ source: string;
2671
+ };
2639
2672
  export: {
2640
2673
  epub: boolean;
2641
2674
  pdf: boolean;
@@ -2680,7 +2713,7 @@ export declare const blumeConfigSchema: z.ZodObject<{
2680
2713
  icon?: string | undefined;
2681
2714
  tag?: string | undefined;
2682
2715
  }[];
2683
- kind: "version" | "dropdown" | "language" | "product";
2716
+ kind: "version" | "product" | "dropdown" | "language";
2684
2717
  }[];
2685
2718
  tabs?: {
2686
2719
  path: string;
@@ -2709,6 +2742,9 @@ export declare const blumeConfigSchema: z.ZodObject<{
2709
2742
  spec?: string | undefined;
2710
2743
  theme?: string | undefined;
2711
2744
  };
2745
+ react: {
2746
+ compiler: boolean;
2747
+ };
2712
2748
  redirects: {
2713
2749
  status: 301 | 302 | 307 | 308;
2714
2750
  from: string;
@@ -2957,6 +2993,7 @@ export declare const blumeConfigSchema: z.ZodObject<{
2957
2993
  text: string;
2958
2994
  } | undefined;
2959
2995
  } | undefined;
2996
+ basePath?: string | undefined;
2960
2997
  github?: {
2961
2998
  owner: string;
2962
2999
  repo: string;
@@ -2969,7 +3006,10 @@ export declare const blumeConfigSchema: z.ZodObject<{
2969
3006
  output?: "static" | "server" | undefined;
2970
3007
  site?: string | undefined;
2971
3008
  } | undefined;
2972
- examples?: string | undefined;
3009
+ examples?: string | {
3010
+ source?: string | undefined;
3011
+ css?: string | undefined;
3012
+ } | undefined;
2973
3013
  export?: boolean | {
2974
3014
  epub?: boolean | undefined;
2975
3015
  pdf?: boolean | undefined;
@@ -3028,7 +3068,7 @@ export declare const blumeConfigSchema: z.ZodObject<{
3028
3068
  }[] | undefined;
3029
3069
  selectors?: {
3030
3070
  label: string;
3031
- kind: "version" | "dropdown" | "language" | "product";
3071
+ kind: "version" | "product" | "dropdown" | "language";
3032
3072
  items?: {
3033
3073
  path: string;
3034
3074
  label: string;
@@ -3064,6 +3104,9 @@ export declare const blumeConfigSchema: z.ZodObject<{
3064
3104
  expandSchemas?: boolean | undefined;
3065
3105
  renderer?: "blume" | "scalar" | undefined;
3066
3106
  } | undefined;
3107
+ react?: {
3108
+ compiler?: boolean | undefined;
3109
+ } | undefined;
3067
3110
  redirects?: {
3068
3111
  from: string;
3069
3112
  to: string;
@@ -108,6 +108,8 @@ export interface NormalizeContext {
108
108
  prefix?: string;
109
109
  staged: boolean;
110
110
  };
111
+ /** Site-wide route mount point (`""` or `/seg`), prepended to every route. */
112
+ basePath?: string;
111
113
  defaultType: string;
112
114
  i18n?: ResolvedI18nConfig;
113
115
  }