@farming-labs/docs 0.0.38 → 0.0.44

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.
@@ -0,0 +1,1330 @@
1
+ //#region src/types.d.ts
2
+ /**
3
+ * Theme / UI configuration types for the docs framework.
4
+ * Inspired by Fumadocs: https://github.com/fuma-nama/fumadocs
5
+ */
6
+ /**
7
+ * Fine-grained UI configuration for docs themes.
8
+ *
9
+ * Theme authors define defaults for these values in their `createTheme` call.
10
+ * End users can override any value when calling the theme factory.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const myTheme = createTheme({
15
+ * name: "my-theme",
16
+ * ui: {
17
+ * colors: { primary: "#6366f1", background: "#0a0a0a" },
18
+ * radius: "0px",
19
+ * codeBlock: { showLineNumbers: true, theme: "github-dark" },
20
+ * sidebar: { width: 280, style: "bordered" },
21
+ * },
22
+ * });
23
+ * ```
24
+ */
25
+ /**
26
+ * Font style configuration for a single text element (heading, body, etc.).
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * h1: { size: "2.25rem", weight: 700, lineHeight: "1.2", letterSpacing: "-0.02em" }
31
+ * ```
32
+ */
33
+ interface FontStyle {
34
+ /** CSS `font-size` value (e.g. "2.25rem", "36px", "clamp(1.8rem, 3vw, 2.5rem)") */
35
+ size?: string;
36
+ /** CSS `font-weight` value (e.g. 700, "bold", "600") */
37
+ weight?: string | number;
38
+ /** CSS `line-height` value (e.g. "1.2", "1.5", "28px") */
39
+ lineHeight?: string;
40
+ /** CSS `letter-spacing` value (e.g. "-0.02em", "0.05em") */
41
+ letterSpacing?: string;
42
+ }
43
+ /**
44
+ * Typography configuration for the docs.
45
+ *
46
+ * @example
47
+ * ```ts
48
+ * typography: {
49
+ * font: {
50
+ * style: { sans: "Inter, sans-serif", mono: "JetBrains Mono, monospace" },
51
+ * h1: { size: "2.25rem", weight: 700, letterSpacing: "-0.02em" },
52
+ * h2: { size: "1.75rem", weight: 600 },
53
+ * body: { size: "1rem", lineHeight: "1.75" },
54
+ * },
55
+ * }
56
+ * ```
57
+ */
58
+ interface TypographyConfig {
59
+ /**
60
+ * Font configuration.
61
+ */
62
+ font?: {
63
+ /**
64
+ * Font family definitions.
65
+ */
66
+ style?: {
67
+ /** Sans-serif font family — used for body text, headings, and UI elements. */sans?: string; /** Monospace font family — used for code blocks, inline code, and terminal output. */
68
+ mono?: string;
69
+ }; /** Heading 1 (`<h1>`) style overrides */
70
+ h1?: FontStyle; /** Heading 2 (`<h2>`) style overrides */
71
+ h2?: FontStyle; /** Heading 3 (`<h3>`) style overrides */
72
+ h3?: FontStyle; /** Heading 4 (`<h4>`) style overrides */
73
+ h4?: FontStyle; /** Body text style */
74
+ body?: FontStyle; /** Small text style (captions, meta text) */
75
+ small?: FontStyle;
76
+ };
77
+ }
78
+ interface UIConfig {
79
+ /**
80
+ * Theme color tokens.
81
+ *
82
+ * These are mapped to `--color-fd-*` CSS variables at runtime.
83
+ * Accepts any valid CSS color value (hex, rgb, oklch, hsl, etc.).
84
+ *
85
+ * @example
86
+ * ```ts
87
+ * colors: {
88
+ * primary: "oklch(0.72 0.19 149)", // green primary
89
+ * primaryForeground: "#ffffff", // white text on primary
90
+ * accent: "hsl(220 80% 60%)", // blue accent
91
+ * }
92
+ * ```
93
+ */
94
+ colors?: {
95
+ primary?: string;
96
+ primaryForeground?: string;
97
+ background?: string;
98
+ foreground?: string;
99
+ muted?: string;
100
+ mutedForeground?: string;
101
+ border?: string;
102
+ card?: string;
103
+ cardForeground?: string;
104
+ accent?: string;
105
+ accentForeground?: string;
106
+ secondary?: string;
107
+ secondaryForeground?: string;
108
+ popover?: string;
109
+ popoverForeground?: string;
110
+ ring?: string;
111
+ };
112
+ /**
113
+ * Typography settings — font families, heading sizes, weights, etc.
114
+ *
115
+ * @example
116
+ * ```ts
117
+ * typography: {
118
+ * font: {
119
+ * style: { sans: "Inter, sans-serif", mono: "JetBrains Mono, monospace" },
120
+ * h1: { size: "2.25rem", weight: 700, letterSpacing: "-0.02em" },
121
+ * body: { size: "1rem", lineHeight: "1.75" },
122
+ * },
123
+ * }
124
+ * ```
125
+ */
126
+ typography?: TypographyConfig;
127
+ /**
128
+ * Global border-radius. Maps to CSS `--radius`.
129
+ * Use "0px" for sharp corners, "0.5rem" for rounded, etc.
130
+ */
131
+ radius?: string;
132
+ /** Layout dimensions */
133
+ layout?: {
134
+ contentWidth?: number;
135
+ sidebarWidth?: number;
136
+ tocWidth?: number;
137
+ toc?: {
138
+ enabled?: boolean;
139
+ depth?: number;
140
+ /**
141
+ * Visual style of the TOC indicator.
142
+ * - `"default"` — highlight active link text color only
143
+ * - `"directional"` — animated thumb bar that tracks active headings (fumadocs style)
144
+ * @default "default"
145
+ */
146
+ style?: "default" | "directional";
147
+ };
148
+ header?: {
149
+ height?: number;
150
+ sticky?: boolean;
151
+ };
152
+ };
153
+ /** Code block rendering config */
154
+ codeBlock?: {
155
+ /** Show line numbers in code blocks @default false */showLineNumbers?: boolean; /** Show copy button @default true */
156
+ showCopyButton?: boolean; /** Shiki theme name for syntax highlighting */
157
+ theme?: string; /** Dark mode shiki theme (for dual-theme setups) */
158
+ darkTheme?: string;
159
+ };
160
+ /** Sidebar styling hints (consumed by theme CSS) */
161
+ sidebar?: {
162
+ /**
163
+ * Visual style of the sidebar.
164
+ * - "default" — standard fumadocs sidebar
165
+ * - "bordered" — visible bordered sections (like better-auth)
166
+ * - "floating" — floating card sidebar
167
+ */
168
+ style?: "default" | "bordered" | "floating"; /** Background color override */
169
+ background?: string; /** Border color override */
170
+ borderColor?: string;
171
+ };
172
+ /** Card styling */
173
+ card?: {
174
+ /** Whether cards have visible borders @default true */bordered?: boolean; /** Card background color override */
175
+ background?: string;
176
+ };
177
+ /** Default props/variants for MDX components (Callout, CodeBlock, Tabs, etc.) */
178
+ components?: {
179
+ [key: string]: Record<string, unknown> | ((defaults: unknown) => unknown);
180
+ };
181
+ }
182
+ /**
183
+ * A docs theme configuration.
184
+ *
185
+ * Theme authors create these with `createTheme()`. The `name` identifies the
186
+ * theme (useful for CSS scoping, debugging, analytics). The `ui` object holds
187
+ * all visual configuration.
188
+ *
189
+ * @example
190
+ * ```ts
191
+ * import { createTheme } from "@farming-labs/docs";
192
+ *
193
+ * export const myTheme = createTheme({
194
+ * name: "my-theme",
195
+ * ui: {
196
+ * colors: { primary: "#ff4d8d" },
197
+ * radius: "0px",
198
+ * },
199
+ * });
200
+ * ```
201
+ */
202
+ interface DocsTheme {
203
+ /** Unique name for this theme (used for CSS scoping and debugging) */
204
+ name?: string;
205
+ /** UI configuration — colors, typography, layout, components */
206
+ ui?: UIConfig;
207
+ /**
208
+ * @internal
209
+ * User-provided color overrides tracked by `createTheme`.
210
+ * Only these colors are emitted as inline CSS variables at runtime.
211
+ * Preset defaults stay in the theme's CSS file.
212
+ */
213
+ _userColorOverrides?: Record<string, string>;
214
+ }
215
+ interface DocsMetadata {
216
+ titleTemplate?: string;
217
+ description?: string;
218
+ twitterCard?: "summary" | "summary_large_image";
219
+ }
220
+ interface OGConfig {
221
+ enabled?: boolean;
222
+ type?: "static" | "dynamic";
223
+ endpoint?: string;
224
+ defaultImage?: string;
225
+ }
226
+ /** Single image entry for Open Graph (frontmatter or Next metadata). */
227
+ interface OpenGraphImage {
228
+ url: string;
229
+ width?: number;
230
+ height?: number;
231
+ }
232
+ /** Open Graph block in page frontmatter. When present, used as-is for metadata (replaces generated OG). */
233
+ interface PageOpenGraph {
234
+ images?: OpenGraphImage[];
235
+ title?: string;
236
+ description?: string;
237
+ }
238
+ /** Twitter card block in page frontmatter. When present, used as-is for metadata (replaces generated twitter). */
239
+ interface PageTwitter {
240
+ card?: "summary" | "summary_large_image";
241
+ images?: string[];
242
+ title?: string;
243
+ description?: string;
244
+ }
245
+ interface PageFrontmatter {
246
+ title: string;
247
+ description?: string;
248
+ tags?: string[];
249
+ icon?: string;
250
+ /** Path to custom OG image for this page (shorthand). Ignored if `openGraph` is set. */
251
+ ogImage?: string;
252
+ /** Full Open Graph object. When set, replaces any generated OG from config (e.g. dynamic endpoint). */
253
+ openGraph?: PageOpenGraph;
254
+ /** Full Twitter card object. When set, replaces any generated twitter from config. */
255
+ twitter?: PageTwitter;
256
+ /** Sort order in the sidebar. Lower numbers appear first. Pages without `order` are sorted alphabetically after ordered pages. */
257
+ order?: number;
258
+ }
259
+ interface DocsNav {
260
+ /**
261
+ * Sidebar title — a plain string or a React element (e.g. a div with an icon).
262
+ *
263
+ * @example
264
+ * ```tsx
265
+ * // Simple string
266
+ * nav: { title: "My Docs" }
267
+ *
268
+ * // React element with icon
269
+ * nav: {
270
+ * title: <div style={{ display: "flex", alignItems: "center", gap: 8 }}>
271
+ * <Rocket size={18} /> Example Docs
272
+ * </div>
273
+ * }
274
+ * ```
275
+ */
276
+ title?: unknown;
277
+ /** URL the title links to. Defaults to `/{entry}`. */
278
+ url?: string;
279
+ }
280
+ interface ThemeToggleConfig {
281
+ /**
282
+ * Whether to show the light/dark theme toggle in the sidebar.
283
+ * @default true
284
+ */
285
+ enabled?: boolean;
286
+ /**
287
+ * The default / forced theme when the toggle is hidden.
288
+ * Only applies when `enabled` is `false`.
289
+ * @default "system"
290
+ *
291
+ * @example
292
+ * ```ts
293
+ * // Hide toggle, force dark mode
294
+ * themeToggle: { enabled: false, default: "dark" }
295
+ * ```
296
+ */
297
+ default?: "light" | "dark" | "system";
298
+ /**
299
+ * Toggle mode — show only light/dark, or include a system option.
300
+ * @default "light-dark"
301
+ */
302
+ mode?: "light-dark" | "light-dark-system";
303
+ }
304
+ interface BreadcrumbConfig {
305
+ /**
306
+ * Whether to show the breadcrumb navigation above page content.
307
+ * @default true
308
+ */
309
+ enabled?: boolean;
310
+ /**
311
+ * Custom breadcrumb component. Receives the default breadcrumb as children
312
+ * so you can wrap/modify it.
313
+ *
314
+ * @example
315
+ * ```tsx
316
+ * breadcrumb: {
317
+ * component: ({ items }) => <MyBreadcrumb items={items} />,
318
+ * }
319
+ * ```
320
+ */
321
+ component?: unknown;
322
+ }
323
+ /**
324
+ * A leaf page in the sidebar tree.
325
+ */
326
+ interface SidebarPageNode {
327
+ type: "page";
328
+ name: string;
329
+ url: string;
330
+ icon?: unknown;
331
+ }
332
+ /**
333
+ * A folder (group) in the sidebar tree. May contain child pages
334
+ * and nested folders, forming a recursive hierarchy.
335
+ */
336
+ interface SidebarFolderNode {
337
+ type: "folder";
338
+ name: string;
339
+ icon?: unknown;
340
+ /** Index page for this folder (the folder's own landing page). */
341
+ index?: SidebarPageNode;
342
+ /** Child pages and sub-folders. */
343
+ children: SidebarNode[];
344
+ /** Whether this folder section is collapsible. */
345
+ collapsible?: boolean;
346
+ /** Whether this folder starts open. */
347
+ defaultOpen?: boolean;
348
+ }
349
+ /** A node in the sidebar tree — either a page or a folder. */
350
+ type SidebarNode = SidebarPageNode | SidebarFolderNode;
351
+ /** The full sidebar tree passed to custom sidebar components. */
352
+ interface SidebarTree {
353
+ name: string;
354
+ children: SidebarNode[];
355
+ }
356
+ /**
357
+ * Props passed to a custom sidebar component.
358
+ *
359
+ * Contains all the information needed to build a fully custom sidebar:
360
+ * the complete page tree with parent-child relationships, and the
361
+ * current sidebar configuration.
362
+ */
363
+ interface SidebarComponentProps {
364
+ /** Full page tree with all parent-child-folder relationships. */
365
+ tree: SidebarTree;
366
+ /** Whether folders are collapsible. */
367
+ collapsible: boolean;
368
+ /** Whether folders are rendered flat (Mintlify-style). */
369
+ flat: boolean;
370
+ }
371
+ interface SidebarConfig {
372
+ /**
373
+ * Whether to show the sidebar.
374
+ * @default true
375
+ */
376
+ enabled?: boolean;
377
+ /**
378
+ * Custom sidebar component to replace the default navigation.
379
+ *
380
+ * **Next.js** — Pass a render function that receives `SidebarComponentProps`:
381
+ * ```tsx
382
+ * sidebar: {
383
+ * component: ({ tree, collapsible, flat }) => (
384
+ * <MySidebar tree={tree} />
385
+ * ),
386
+ * }
387
+ * ```
388
+ *
389
+ * **Astro** — Use the `sidebar` named slot on `<DocsLayout>`:
390
+ * ```astro
391
+ * <DocsLayout tree={tree} config={config}>
392
+ * <MySidebar slot="sidebar" tree={tree} />
393
+ * <slot />
394
+ * </DocsLayout>
395
+ * ```
396
+ *
397
+ * **SvelteKit** — Use the `sidebar` snippet on `<DocsLayout>`:
398
+ * ```svelte
399
+ * <DocsLayout {tree} {config}>
400
+ * {#snippet sidebar({ tree, isActive })}
401
+ * <MySidebarNav {tree} {isActive} />
402
+ * {/snippet}
403
+ * {@render children()}
404
+ * </DocsLayout>
405
+ * ```
406
+ *
407
+ * **Nuxt / Vue** — Use the `#sidebar` scoped slot on `<DocsLayout>`:
408
+ * ```vue
409
+ * <DocsLayout :tree="tree" :config="config">
410
+ * <template #sidebar="{ tree, isActive }">
411
+ * <MySidebarNav :tree="tree" :is-active="isActive" />
412
+ * </template>
413
+ * <DocsContent />
414
+ * </DocsLayout>
415
+ * ```
416
+ */
417
+ component?: (props: SidebarComponentProps) => unknown;
418
+ /**
419
+ * Sidebar footer content (rendered below navigation items).
420
+ */
421
+ footer?: unknown;
422
+ /**
423
+ * Sidebar banner content (rendered above navigation items).
424
+ */
425
+ banner?: unknown;
426
+ /**
427
+ * Whether the sidebar is collapsible on desktop.
428
+ * @default true
429
+ */
430
+ collapsible?: boolean;
431
+ /**
432
+ * When true, all folder children are rendered flat in the sidebar
433
+ * (no collapsible sections). Folder index pages appear as category
434
+ * headings with all children listed directly below them.
435
+ *
436
+ * This creates a Mintlify-style sidebar where all navigation items
437
+ * are always visible.
438
+ *
439
+ * @default false
440
+ */
441
+ flat?: boolean;
442
+ }
443
+ /**
444
+ * A single "Open in …" provider shown in the Open dropdown.
445
+ *
446
+ * @example
447
+ * ```ts
448
+ * { name: "Claude", icon: <ClaudeIcon />, urlTemplate: "https://claude.ai?url={url}" }
449
+ * ```
450
+ */
451
+ interface OpenDocsProvider {
452
+ /** Display name (e.g. "ChatGPT", "Claude", "Cursor") */
453
+ name: string;
454
+ /** Icon element rendered next to the name */
455
+ icon?: unknown;
456
+ /**
457
+ * URL template. Placeholders:
458
+ * - `{url}` — current page URL (encoded).
459
+ * - `{mdxUrl}` — page URL with `.mdx` suffix (encoded).
460
+ * - `{githubUrl}` — GitHub edit URL for the current page (same as "Edit on GitHub"). Requires `github` in config.
461
+ *
462
+ * @example "https://claude.ai/new?q=Read+this+doc:+{url}"
463
+ * @example "{githubUrl}" — open current page file on GitHub (edit view)
464
+ */
465
+ urlTemplate: string;
466
+ }
467
+ /**
468
+ * Configuration for the "Open in …" dropdown that lets users
469
+ * send the current page to an LLM or external tool.
470
+ *
471
+ * @example
472
+ * ```ts
473
+ * openDocs: {
474
+ * enabled: true,
475
+ * providers: [
476
+ * { name: "ChatGPT", icon: <ChatGPTIcon />, urlTemplate: "https://chatgpt.com/?q={url}" },
477
+ * { name: "Claude", icon: <ClaudeIcon />, urlTemplate: "https://claude.ai/new?q={url}" },
478
+ * ],
479
+ * }
480
+ * ```
481
+ */
482
+ interface OpenDocsConfig {
483
+ /** Whether to show the "Open" dropdown. @default false */
484
+ enabled?: boolean;
485
+ /**
486
+ * List of LLM / tool providers to show in the dropdown.
487
+ * If not provided, a sensible default list is used.
488
+ */
489
+ providers?: OpenDocsProvider[];
490
+ }
491
+ /**
492
+ * Configuration for the "Copy Markdown" button that copies
493
+ * the current page's content as Markdown to the clipboard.
494
+ */
495
+ interface CopyMarkdownConfig {
496
+ /** Whether to show the "Copy Markdown" button. @default false */
497
+ enabled?: boolean;
498
+ }
499
+ /**
500
+ * Page-level action buttons shown above the page content
501
+ * (e.g. "Copy Markdown", "Open in …" dropdown).
502
+ *
503
+ * @example
504
+ * ```ts
505
+ * pageActions: {
506
+ * copyMarkdown: { enabled: true },
507
+ * openDocs: {
508
+ * enabled: true,
509
+ * providers: [
510
+ * { name: "Claude", urlTemplate: "https://claude.ai/new?q={url}" },
511
+ * ],
512
+ * },
513
+ * }
514
+ * ```
515
+ */
516
+ interface PageActionsConfig {
517
+ /** "Copy Markdown" button */
518
+ copyMarkdown?: boolean | CopyMarkdownConfig;
519
+ /** "Open in …" dropdown with LLM / tool providers */
520
+ openDocs?: boolean | OpenDocsConfig;
521
+ /**
522
+ * Where to render the page action buttons relative to the page title.
523
+ *
524
+ * - `"below-title"` — render below the first `<h1>` heading (default)
525
+ * - `"above-title"` — render above the page title / content
526
+ *
527
+ * @default "below-title"
528
+ */
529
+ position?: "above-title" | "below-title";
530
+ /**
531
+ * Horizontal alignment of page action buttons.
532
+ *
533
+ * - `"left"` — align to the left (default)
534
+ * - `"right"` — align to the right
535
+ *
536
+ * @default "left"
537
+ */
538
+ alignment?: "left" | "right";
539
+ }
540
+ /**
541
+ * Configuration for the "Last updated" date display.
542
+ *
543
+ * @example
544
+ * ```ts
545
+ * lastUpdated: { position: "below-title" }
546
+ * ```
547
+ */
548
+ /**
549
+ * Configuration for auto-generated `/llms.txt` and `/llms-full.txt` routes.
550
+ *
551
+ * @see https://llmstxt.org
552
+ */
553
+ interface LlmsTxtConfig {
554
+ /**
555
+ * Whether to enable llms.txt generation.
556
+ * @default true
557
+ */
558
+ enabled?: boolean;
559
+ /**
560
+ * Base URL for your docs site (used to build absolute links in llms.txt).
561
+ * @example "https://docs.example.com"
562
+ */
563
+ baseUrl?: string;
564
+ /**
565
+ * Site title shown at the top of llms.txt.
566
+ * Falls back to `nav.title` if not set.
567
+ */
568
+ siteTitle?: string;
569
+ /**
570
+ * Site description shown below the title.
571
+ */
572
+ siteDescription?: string;
573
+ }
574
+ interface LastUpdatedConfig {
575
+ /**
576
+ * Whether to show the "Last updated" date.
577
+ * @default true
578
+ */
579
+ enabled?: boolean;
580
+ /**
581
+ * Where to render the "Last updated" date.
582
+ *
583
+ * - `"footer"` — next to the "Edit on GitHub" link at the bottom (default)
584
+ * - `"below-title"` — below the page title/description, above the content
585
+ *
586
+ * @default "footer"
587
+ */
588
+ position?: "footer" | "below-title";
589
+ }
590
+ /**
591
+ * GitHub repository configuration for "Edit on GitHub" links
592
+ * and source file references.
593
+ *
594
+ * @example
595
+ * ```ts
596
+ * // Simple repo (not a monorepo)
597
+ * github: {
598
+ * url: "https://github.com/Kinfe123/my-docs",
599
+ * }
600
+ *
601
+ * // Monorepo — docs site lives in "website/" subdirectory
602
+ * github: {
603
+ * url: "https://github.com/farming-labs/docs",
604
+ * directory: "website",
605
+ * branch: "main",
606
+ * }
607
+ * ```
608
+ *
609
+ * Or as a simple string (branch defaults to "main", no directory prefix):
610
+ * ```ts
611
+ * github: "https://github.com/Kinfe123/my-docs"
612
+ * ```
613
+ */
614
+ interface GithubConfig {
615
+ /** Repository URL (e.g. "https://github.com/farming-labs/docs") */
616
+ url: string;
617
+ /** Branch name. @default "main" */
618
+ branch?: string;
619
+ /**
620
+ * Subdirectory inside the repo where the docs site lives.
621
+ * Use this for monorepos where the docs app is not at the repo root.
622
+ *
623
+ * @example "website" → links point to `website/app/docs/…/page.mdx`
624
+ */
625
+ directory?: string;
626
+ }
627
+ /**
628
+ * Configuration for "Ask AI" — a RAG-powered chat that lets users
629
+ * ask questions about the documentation content.
630
+ *
631
+ * The AI handler searches relevant doc pages, builds context, and
632
+ * streams a response from an LLM (OpenAI-compatible API).
633
+ *
634
+ * The API key is **never** stored in the config. It is read from the
635
+ * `OPENAI_API_KEY` environment variable at runtime on the server.
636
+ *
637
+ * @example
638
+ * ```ts
639
+ * ai: {
640
+ * enabled: true,
641
+ * model: "gpt-4o-mini",
642
+ * systemPrompt: "You are a helpful assistant for our developer docs.",
643
+ * }
644
+ * ```
645
+ */
646
+ interface AIConfig {
647
+ /**
648
+ * Whether to enable "Ask AI" functionality.
649
+ * When enabled, the unified `/api/docs` route handler will accept
650
+ * POST requests for AI chat.
651
+ * @default false
652
+ */
653
+ enabled?: boolean;
654
+ /**
655
+ * How the AI chat UI is presented.
656
+ *
657
+ * - `"search"` — AI tab integrated into the Cmd+K search dialog (default)
658
+ * - `"floating"` — A floating chat widget (bubble button + slide-out panel)
659
+ *
660
+ * @default "search"
661
+ *
662
+ * @example
663
+ * ```ts
664
+ * // Floating chat bubble in the bottom-right corner
665
+ * ai: {
666
+ * enabled: true,
667
+ * mode: "floating",
668
+ * position: "bottom-right",
669
+ * }
670
+ * ```
671
+ */
672
+ mode?: "search" | "floating" | "sidebar-icon";
673
+ /**
674
+ * Position of the floating chat button on screen.
675
+ * Only used when `mode` is `"floating"`.
676
+ *
677
+ * - `"bottom-right"` — bottom-right corner (default)
678
+ * - `"bottom-left"` — bottom-left corner
679
+ * - `"bottom-center"` — bottom center
680
+ *
681
+ * @default "bottom-right"
682
+ */
683
+ position?: "bottom-right" | "bottom-left" | "bottom-center";
684
+ /**
685
+ * Visual style of the floating chat when opened.
686
+ * Only used when `mode` is `"floating"`.
687
+ *
688
+ * - `"panel"` — A tall panel that slides up from the button position (default).
689
+ * Stays anchored near the floating button. No backdrop overlay.
690
+ *
691
+ * - `"modal"` — A centered modal dialog with a backdrop overlay,
692
+ * similar to the Cmd+K search dialog. Feels more focused and immersive.
693
+ *
694
+ * - `"popover"` — A compact popover near the button. Smaller than the
695
+ * panel, suitable for quick questions without taking much screen space.
696
+ *
697
+ * - `"full-modal"` — A full-screen immersive overlay (inspired by better-auth).
698
+ * Messages scroll in the center, input is pinned at the bottom.
699
+ * Suggested questions appear as horizontal pills. Best for
700
+ * documentation-heavy sites that want a premium AI experience.
701
+ *
702
+ * @default "panel"
703
+ *
704
+ * @example
705
+ * ```ts
706
+ * ai: {
707
+ * enabled: true,
708
+ * mode: "floating",
709
+ * position: "bottom-right",
710
+ * floatingStyle: "full-modal",
711
+ * }
712
+ * ```
713
+ */
714
+ floatingStyle?: "panel" | "modal" | "popover" | "full-modal";
715
+ /**
716
+ * Custom trigger component for the floating chat button (Next.js only).
717
+ * Only used when `mode` is `"floating"`.
718
+ *
719
+ * The click handler is attached automatically by the wrapper.
720
+ *
721
+ * - **Next.js**: Pass a JSX element via this config option.
722
+ * - **SvelteKit**: Use the `aiTrigger` snippet on `<DocsLayout>`.
723
+ * - **Nuxt / Vue**: Use the `ai-trigger` slot on `<DocsLayout>`.
724
+ * - **Astro**: Use `<MyTrigger slot="ai-trigger" />` on `<DocsLayout>`.
725
+ *
726
+ * @example
727
+ * ```tsx
728
+ * // Next.js — pass JSX directly in config
729
+ * triggerComponent: <button className="my-chat-btn">Ask AI</button>,
730
+ * ```
731
+ *
732
+ * ```svelte
733
+ * <!-- SvelteKit — use snippet in layout -->
734
+ * <DocsLayout {tree} {config}>
735
+ * {#snippet aiTrigger()}<AskAITrigger />{/snippet}
736
+ * {@render children()}
737
+ * </DocsLayout>
738
+ * ```
739
+ *
740
+ * ```vue
741
+ * <!-- Nuxt / Vue — use named slot in layout -->
742
+ * <DocsLayout :tree="tree" :config="config">
743
+ * <template #ai-trigger><AskAITrigger /></template>
744
+ * <DocsContent />
745
+ * </DocsLayout>
746
+ * ```
747
+ *
748
+ * ```astro
749
+ * <!-- Astro — use named slot in layout -->
750
+ * <DocsLayout tree={tree} config={config}>
751
+ * <AskAITrigger slot="ai-trigger" />
752
+ * <DocsContent />
753
+ * </DocsLayout>
754
+ * ```
755
+ */
756
+ triggerComponent?: unknown;
757
+ /**
758
+ * The LLM model configuration.
759
+ *
760
+ * **Simple** — pass a plain string for a single model:
761
+ * ```ts
762
+ * model: "gpt-4o-mini"
763
+ * ```
764
+ *
765
+ * **Advanced** — pass an object with multiple selectable models and an
766
+ * optional `provider` key that references a named provider in `providers`:
767
+ * ```ts
768
+ * model: {
769
+ * models: [
770
+ * { id: "gpt-4o-mini", label: "GPT-4o mini (fast)", provider: "openai" },
771
+ * { id: "llama-3.3-70b-versatile", label: "Llama 3.3 70B", provider: "groq" },
772
+ * ],
773
+ * defaultModel: "gpt-4o-mini",
774
+ * }
775
+ * ```
776
+ *
777
+ * When an object is provided, a model selector dropdown appears in the
778
+ * AI chat interface.
779
+ *
780
+ * @default "gpt-4o-mini"
781
+ */
782
+ model?: string | {
783
+ models: {
784
+ id: string;
785
+ label: string;
786
+ provider?: string;
787
+ }[];
788
+ defaultModel?: string;
789
+ };
790
+ /**
791
+ * Named provider configurations for multi-provider setups.
792
+ *
793
+ * Each key is a provider name referenced by `model.models[].provider`.
794
+ * Each value contains a `baseUrl` and optional `apiKey`.
795
+ *
796
+ * @example
797
+ * ```ts
798
+ * providers: {
799
+ * openai: {
800
+ * baseUrl: "https://api.openai.com/v1",
801
+ * apiKey: process.env.OPENAI_API_KEY,
802
+ * },
803
+ * groq: {
804
+ * baseUrl: "https://api.groq.com/openai/v1",
805
+ * apiKey: process.env.GROQ_API_KEY,
806
+ * },
807
+ * }
808
+ * ```
809
+ */
810
+ providers?: Record<string, {
811
+ baseUrl: string;
812
+ apiKey?: string;
813
+ }>;
814
+ /**
815
+ * Custom system prompt prepended to the AI conversation.
816
+ * The documentation context is automatically appended after this prompt.
817
+ *
818
+ * @default "You are a helpful documentation assistant. Answer questions
819
+ * based on the provided documentation context. Be concise and accurate.
820
+ * If the answer is not in the context, say so honestly."
821
+ */
822
+ systemPrompt?: string;
823
+ /**
824
+ * Default base URL for an OpenAI-compatible API endpoint.
825
+ * Used when no per-model `provider` is configured.
826
+ * @default "https://api.openai.com/v1"
827
+ */
828
+ baseUrl?: string;
829
+ /**
830
+ * Default API key for the LLM provider.
831
+ * Used when no per-model `provider` is configured.
832
+ * Falls back to `process.env.OPENAI_API_KEY` if not set.
833
+ *
834
+ * @default process.env.OPENAI_API_KEY
835
+ *
836
+ * @example
837
+ * ```ts
838
+ * // Default — reads OPENAI_API_KEY automatically
839
+ * ai: { enabled: true }
840
+ *
841
+ * // Custom provider key
842
+ * ai: {
843
+ * enabled: true,
844
+ * apiKey: process.env.GROQ_API_KEY,
845
+ * }
846
+ * ```
847
+ */
848
+ apiKey?: string;
849
+ /**
850
+ * Maximum number of search results to include as context for the AI.
851
+ * More results = more context but higher token usage.
852
+ * @default 5
853
+ */
854
+ maxResults?: number;
855
+ /**
856
+ * Pre-filled suggested questions shown in the AI chat when empty.
857
+ * When a user clicks one, it fills the input and submits automatically.
858
+ *
859
+ * @example
860
+ * ```ts
861
+ * ai: {
862
+ * enabled: true,
863
+ * suggestedQuestions: [
864
+ * "How do I install this?",
865
+ * "What themes are available?",
866
+ * "How do I create a custom component?",
867
+ * ],
868
+ * }
869
+ * ```
870
+ */
871
+ suggestedQuestions?: string[];
872
+ /**
873
+ * Display name for the AI assistant in the chat UI.
874
+ * Shown as the message label, header title, and passed to the loading component.
875
+ *
876
+ * @default "AI"
877
+ *
878
+ * @example
879
+ * ```ts
880
+ * ai: {
881
+ * enabled: true,
882
+ * aiLabel: "DocsBot",
883
+ * }
884
+ * ```
885
+ */
886
+ aiLabel?: string;
887
+ /**
888
+ * The npm package name used in import examples.
889
+ * The AI will use this in code snippets instead of generic placeholders.
890
+ *
891
+ * @example
892
+ * ```ts
893
+ * ai: {
894
+ * enabled: true,
895
+ * packageName: "@farming-labs/docs",
896
+ * }
897
+ * ```
898
+ */
899
+ packageName?: string;
900
+ /**
901
+ * The public URL of the documentation site.
902
+ * The AI will use this for links instead of relative paths.
903
+ *
904
+ * @example
905
+ * ```ts
906
+ * ai: {
907
+ * enabled: true,
908
+ * docsUrl: "https://docs.farming-labs.dev",
909
+ * }
910
+ * ```
911
+ */
912
+ docsUrl?: string;
913
+ /**
914
+ * Loading indicator variant shown while the AI generates a response.
915
+ *
916
+ * - `"shimmer-dots"` — shimmer text + typing dots (default)
917
+ * - `"circular"` — spinning ring
918
+ * - `"dots"` — bouncing dots
919
+ * - `"typing"` — typing dots
920
+ * - `"wave"` — wave bars
921
+ * - `"bars"` — thick wave bars
922
+ * - `"pulse"` — pulsing ring
923
+ * - `"pulse-dot"` — pulsing dot
924
+ * - `"terminal"` — blinking terminal cursor
925
+ * - `"text-blink"` — blinking text
926
+ * - `"text-shimmer"` — shimmer text only
927
+ * - `"loading-dots"` — "Thinking..." with animated dots
928
+ *
929
+ * @default "shimmer-dots"
930
+ *
931
+ * @example
932
+ * ```ts
933
+ * ai: {
934
+ * enabled: true,
935
+ * loader: "wave",
936
+ * }
937
+ * ```
938
+ */
939
+ loader?: "shimmer-dots" | "circular" | "dots" | "typing" | "wave" | "bars" | "pulse" | "pulse-dot" | "terminal" | "text-blink" | "text-shimmer" | "loading-dots";
940
+ /**
941
+ * Custom loading indicator that overrides the built-in `loader` variant.
942
+ * Receives `{ name }` (the `aiLabel` value) and returns a React element.
943
+ *
944
+ * Only works in Next.js. For other frameworks, use the `loader` option.
945
+ *
946
+ * @example
947
+ * ```tsx
948
+ * ai: {
949
+ * enabled: true,
950
+ * aiLabel: "Sage",
951
+ * loadingComponent: ({ name }) => (
952
+ * <div className="flex items-center gap-2 text-sm text-zinc-400">
953
+ * <span className="animate-pulse">🤔</span>
954
+ * <span>{name} is thinking...</span>
955
+ * </div>
956
+ * ),
957
+ * }
958
+ * ```
959
+ */
960
+ loadingComponent?: (props: {
961
+ name: string;
962
+ }) => unknown;
963
+ }
964
+ /**
965
+ * A single item in the slug-based sidebar ordering.
966
+ *
967
+ * @example
968
+ * ```ts
969
+ * ordering: [
970
+ * { slug: "installation" },
971
+ * { slug: "cli" },
972
+ * { slug: "themes", children: [
973
+ * { slug: "default" },
974
+ * { slug: "darksharp" },
975
+ * { slug: "pixel-border" },
976
+ * { slug: "creating-themes" },
977
+ * ]},
978
+ * { slug: "reference" },
979
+ * ]
980
+ * ```
981
+ */
982
+ interface OrderingItem {
983
+ /** Folder name (not the full path, just the directory name at this level) */
984
+ slug: string;
985
+ /** Ordering for child pages within this folder */
986
+ children?: OrderingItem[];
987
+ }
988
+ /**
989
+ * Data passed to the `onCopyClick` callback when the user clicks the copy button
990
+ * on a code block in the docs.
991
+ */
992
+ interface CodeBlockCopyData {
993
+ /** Title of the code block (e.g. from the fenced code block meta string), if present */
994
+ title?: string;
995
+ /** Raw code content (the text that was copied to the clipboard) */
996
+ content: string;
997
+ /** Current page URL at the time of copy */
998
+ url: string;
999
+ /** Language / syntax hint (e.g. "tsx", "bash"), if present */
1000
+ language?: string;
1001
+ }
1002
+ interface DocsI18nConfig {
1003
+ /** Supported locale identifiers (e.g. ["en", "fr"]). */
1004
+ locales: string[];
1005
+ /** Default locale when `?lang=` is missing or invalid. Defaults to first locale. */
1006
+ defaultLocale?: string;
1007
+ }
1008
+ interface ApiReferenceConfig {
1009
+ /**
1010
+ * Whether to enable generated API reference pages.
1011
+ * The initial implementation is wired for Next.js route handlers.
1012
+ * @default false
1013
+ */
1014
+ enabled?: boolean;
1015
+ /**
1016
+ * URL path where the generated API reference lives.
1017
+ * Example: `"api-reference"` → `/api-reference`
1018
+ * @default "api-reference"
1019
+ */
1020
+ path?: string;
1021
+ /**
1022
+ * Filesystem route root to scan for API handlers.
1023
+ *
1024
+ * For Next.js this defaults to the App Router convention:
1025
+ * `app/api` or `src/app/api`.
1026
+ *
1027
+ * You can override it with a project-relative path like `"app/v1"` or
1028
+ * `"src/app/internal-api"`. If you pass a bare segment like `"api"` or
1029
+ * `"v1"`, it will be resolved inside the detected app directory.
1030
+ */
1031
+ routeRoot?: string;
1032
+ /**
1033
+ * Route entries to exclude from the generated API reference.
1034
+ *
1035
+ * Accepts either URL-style paths like `"/api/hello"` or route-root-relative
1036
+ * entries like `"hello"` / `"hello/route.ts"`.
1037
+ */
1038
+ exclude?: string[];
1039
+ }
1040
+ interface DocsConfig {
1041
+ /** Entry folder for docs (e.g. "docs" → /docs) */
1042
+ entry: string;
1043
+ /** Path to the content directory. Defaults to `entry` value. */
1044
+ contentDir?: string;
1045
+ /**
1046
+ * Internationalization (i18n) configuration.
1047
+ * When set, docs content is expected under `${contentDir}/{locale}` and
1048
+ * the active locale is selected by `?lang=<locale>` in the URL.
1049
+ */
1050
+ i18n?: DocsI18nConfig;
1051
+ /**
1052
+ * Set to `true` when building for full static export (e.g. Cloudflare Pages).
1053
+ * When using `output: 'export'` in Next.js, the `/api/docs` route is not generated.
1054
+ * Set `ai.enabled: false` and optionally rely on client-side search or leave search disabled.
1055
+ */
1056
+ staticExport?: boolean;
1057
+ /** Theme configuration - single source of truth for UI */
1058
+ theme?: DocsTheme;
1059
+ /**
1060
+ * GitHub repository URL or config. Enables "Edit on GitHub" links
1061
+ * on each docs page footer, pointing to the source `.mdx` file.
1062
+ *
1063
+ * @example
1064
+ * ```ts
1065
+ * // Simple — branch defaults to "main"
1066
+ * github: "https://github.com/Kinfe123/my-docs"
1067
+ *
1068
+ * // Monorepo — docs site lives in "website/" subdirectory
1069
+ * github: {
1070
+ * url: "https://github.com/farming-labs/docs",
1071
+ * directory: "website",
1072
+ * }
1073
+ *
1074
+ * // Custom branch
1075
+ * github: {
1076
+ * url: "https://github.com/Kinfe123/my-docs",
1077
+ * branch: "develop",
1078
+ * }
1079
+ * ```
1080
+ */
1081
+ github?: string | GithubConfig;
1082
+ /**
1083
+ * Sidebar navigation header.
1084
+ * Customise the title shown at the top of the sidebar.
1085
+ */
1086
+ nav?: DocsNav;
1087
+ /**
1088
+ * Theme toggle (light/dark mode switcher) in the sidebar.
1089
+ *
1090
+ * - `true` or `undefined` → toggle is shown (default)
1091
+ * - `false` → toggle is hidden, defaults to system theme
1092
+ * - `{ enabled: false, default: "dark" }` → toggle hidden, force dark
1093
+ *
1094
+ * @example
1095
+ * ```ts
1096
+ * // Hide toggle, force dark mode
1097
+ * themeToggle: { enabled: false, default: "dark" }
1098
+ *
1099
+ * // Show toggle with system option
1100
+ * themeToggle: { mode: "light-dark-system" }
1101
+ * ```
1102
+ */
1103
+ themeToggle?: boolean | ThemeToggleConfig;
1104
+ /**
1105
+ * Breadcrumb navigation above page content.
1106
+ *
1107
+ * - `true` or `undefined` → breadcrumb is shown (default)
1108
+ * - `false` → breadcrumb is hidden
1109
+ * - `{ enabled: false }` → breadcrumb is hidden
1110
+ * - `{ component: MyBreadcrumb }` → custom breadcrumb component
1111
+ */
1112
+ breadcrumb?: boolean | BreadcrumbConfig;
1113
+ /**
1114
+ * Sidebar customisation.
1115
+ *
1116
+ * - `true` or `undefined` → default sidebar
1117
+ * - `false` → sidebar is hidden
1118
+ * - `{ component: MySidebar }` → custom sidebar component
1119
+ * - `{ footer: <MyFooter />, banner: <MyBanner /> }` → add footer/banner
1120
+ */
1121
+ sidebar?: boolean | SidebarConfig;
1122
+ /**
1123
+ * Custom MDX component overrides.
1124
+ *
1125
+ * Pass your own React components to replace defaults (e.g. Callout, CodeBlock).
1126
+ * Components must match the expected props interface.
1127
+ *
1128
+ * @example
1129
+ * ```ts
1130
+ * import { MyCallout } from "./components/my-callout";
1131
+ *
1132
+ * export default defineDocs({
1133
+ * entry: "docs",
1134
+ * theme: fumadocs(),
1135
+ * components: {
1136
+ * Callout: MyCallout,
1137
+ * },
1138
+ * });
1139
+ * ```
1140
+ */
1141
+ components?: Record<string, unknown>;
1142
+ /**
1143
+ * Callback fired when the user clicks the copy button on a code block.
1144
+ * Called in addition to the default copy-to-clipboard behavior.
1145
+ * Use it for analytics, logging, or custom behavior.
1146
+ *
1147
+ * @example
1148
+ * ```ts
1149
+ * export default defineDocs({
1150
+ * entry: "docs",
1151
+ * theme: fumadocs(),
1152
+ * onCopyClick(data) {
1153
+ * console.log("Code copied", data.title, data.language, data.url);
1154
+ * analytics.track("code_block_copy", { title: data.title, url: data.url });
1155
+ * },
1156
+ * });
1157
+ * ```
1158
+ */
1159
+ onCopyClick?: (data: CodeBlockCopyData) => void;
1160
+ /**
1161
+ * Icon registry for sidebar items.
1162
+ *
1163
+ * Map string labels to React elements. Reference them in page frontmatter
1164
+ * with `icon: "label"` and the matching icon renders in the sidebar.
1165
+ *
1166
+ * @example
1167
+ * ```tsx
1168
+ * import { Book, Terminal, Rocket } from "lucide-react";
1169
+ *
1170
+ * export default defineDocs({
1171
+ * entry: "docs",
1172
+ * theme: fumadocs(),
1173
+ * icons: {
1174
+ * book: <Book />,
1175
+ * terminal: <Terminal />,
1176
+ * rocket: <Rocket />,
1177
+ * },
1178
+ * });
1179
+ * ```
1180
+ *
1181
+ * Then in `page.mdx` frontmatter:
1182
+ * ```yaml
1183
+ * ---
1184
+ * title: "CLI Reference"
1185
+ * icon: "terminal"
1186
+ * ---
1187
+ * ```
1188
+ */
1189
+ icons?: Record<string, unknown>;
1190
+ /**
1191
+ * Page action buttons shown above the content area.
1192
+ * Includes "Copy Markdown" and "Open in …" (LLM dropdown).
1193
+ *
1194
+ * @example
1195
+ * ```ts
1196
+ * pageActions: {
1197
+ * copyMarkdown: { enabled: true },
1198
+ * openDocs: {
1199
+ * enabled: true,
1200
+ * providers: [
1201
+ * { name: "ChatGPT", urlTemplate: "https://chatgpt.com/?q={url}" },
1202
+ * { name: "Claude", urlTemplate: "https://claude.ai/new?q={url}" },
1203
+ * ],
1204
+ * },
1205
+ * }
1206
+ * ```
1207
+ */
1208
+ pageActions?: PageActionsConfig;
1209
+ /**
1210
+ * Configuration for the "Last updated" date display.
1211
+ *
1212
+ * - `true` or `undefined` → shown in footer next to "Edit on GitHub" (default)
1213
+ * - `false` → hidden
1214
+ * - `{ position: "below-title" }` → shown below the page title
1215
+ * - `{ position: "footer" }` → shown next to "Edit on GitHub" (default)
1216
+ *
1217
+ * @example
1218
+ * ```ts
1219
+ * // Show below title (Mintlify style)
1220
+ * lastUpdated: { position: "below-title" }
1221
+ *
1222
+ * // Hide entirely
1223
+ * lastUpdated: false
1224
+ * ```
1225
+ */
1226
+ lastUpdated?: boolean | LastUpdatedConfig;
1227
+ /**
1228
+ * AI-powered "Ask AI" chat for documentation.
1229
+ *
1230
+ * When enabled, the unified API route handler (`/api/docs`) accepts
1231
+ * POST requests for AI chat. The handler uses RAG (Retrieval-Augmented
1232
+ * Generation) — it searches relevant docs, builds context, and streams
1233
+ * a response from an LLM.
1234
+ *
1235
+ * The API key defaults to `process.env.OPENAI_API_KEY`. For other providers,
1236
+ * pass the key via `apiKey: process.env.YOUR_KEY`.
1237
+ *
1238
+ * @example
1239
+ * ```ts
1240
+ * // Enable with defaults (gpt-4o-mini, OPENAI_API_KEY)
1241
+ * ai: { enabled: true }
1242
+ *
1243
+ * // Custom model + system prompt
1244
+ * ai: {
1245
+ * enabled: true,
1246
+ * model: "gpt-4o",
1247
+ * systemPrompt: "You are an expert on our SDK. Be concise.",
1248
+ * }
1249
+ *
1250
+ * // Use a different provider (e.g. Groq)
1251
+ * ai: {
1252
+ * enabled: true,
1253
+ * baseUrl: "https://api.groq.com/openai/v1",
1254
+ * apiKey: process.env.GROQ_API_KEY,
1255
+ * model: "llama-3.1-70b-versatile",
1256
+ * }
1257
+ * ```
1258
+ */
1259
+ ai?: AIConfig;
1260
+ /**
1261
+ * Sidebar ordering strategy.
1262
+ *
1263
+ * - `"alphabetical"` — sort pages alphabetically by folder name (default)
1264
+ * - `"numeric"` — sort by frontmatter `order` field (lower first, unset pages last)
1265
+ * - `OrderingItem[]` — explicit slug-based ordering with nested children
1266
+ *
1267
+ * @default "alphabetical"
1268
+ *
1269
+ * @example
1270
+ * ```ts
1271
+ * // Alphabetical (default)
1272
+ * ordering: "alphabetical",
1273
+ *
1274
+ * // Use frontmatter `order: 1`, `order: 2`, etc.
1275
+ * ordering: "numeric",
1276
+ *
1277
+ * // Explicit slug-based ordering
1278
+ * ordering: [
1279
+ * { slug: "installation" },
1280
+ * { slug: "cli" },
1281
+ * { slug: "configuration" },
1282
+ * { slug: "themes", children: [
1283
+ * { slug: "default" },
1284
+ * { slug: "darksharp" },
1285
+ * { slug: "pixel-border" },
1286
+ * { slug: "creating-themes" },
1287
+ * ]},
1288
+ * { slug: "customization" },
1289
+ * { slug: "reference" },
1290
+ * ]
1291
+ * ```
1292
+ */
1293
+ ordering?: "alphabetical" | "numeric" | OrderingItem[];
1294
+ /**
1295
+ * Auto-generate `/llms.txt` and `/llms-full.txt` routes for LLM-friendly
1296
+ * documentation. These files let AI tools quickly understand your docs.
1297
+ *
1298
+ * @example
1299
+ * ```ts
1300
+ * llmsTxt: {
1301
+ * enabled: true,
1302
+ * baseUrl: "https://docs.example.com",
1303
+ * }
1304
+ * ```
1305
+ *
1306
+ * @see https://llmstxt.org
1307
+ */
1308
+ llmsTxt?: boolean | LlmsTxtConfig;
1309
+ /**
1310
+ * Generated API reference pages from framework route conventions.
1311
+ *
1312
+ * The first implementation targets Next.js route handlers under `app/api/<segments>/route.ts`.
1313
+ *
1314
+ * @example
1315
+ * ```ts
1316
+ * apiReference: {
1317
+ * enabled: true,
1318
+ * path: "api-reference",
1319
+ * routeRoot: "api",
1320
+ * }
1321
+ * ```
1322
+ */
1323
+ apiReference?: boolean | ApiReferenceConfig;
1324
+ /** SEO metadata - separate from theme */
1325
+ metadata?: DocsMetadata;
1326
+ /** Open Graph image handling */
1327
+ og?: OGConfig;
1328
+ }
1329
+ //#endregion
1330
+ export { ThemeToggleConfig as A, PageTwitter as C, SidebarNode as D, SidebarFolderNode as E, UIConfig as M, SidebarPageNode as O, PageOpenGraph as S, SidebarConfig as T, OpenDocsProvider as _, CopyMarkdownConfig as a, PageActionsConfig as b, DocsMetadata as c, FontStyle as d, GithubConfig as f, OpenDocsConfig as g, OGConfig as h, CodeBlockCopyData as i, TypographyConfig as j, SidebarTree as k, DocsNav as l, LlmsTxtConfig as m, ApiReferenceConfig as n, DocsConfig as o, LastUpdatedConfig as p, BreadcrumbConfig as r, DocsI18nConfig as s, AIConfig as t, DocsTheme as u, OpenGraphImage as v, SidebarComponentProps as w, PageFrontmatter as x, OrderingItem as y };