@farming-labs/docs 0.0.33 → 0.0.34

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/dist/index.d.mts DELETED
@@ -1,1380 +0,0 @@
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 DocsConfig {
1009
- /** Entry folder for docs (e.g. "docs" → /docs) */
1010
- entry: string;
1011
- /** Path to the content directory. Defaults to `entry` value. */
1012
- contentDir?: string;
1013
- /**
1014
- * Internationalization (i18n) configuration.
1015
- * When set, docs content is expected under `${contentDir}/{locale}` and
1016
- * the active locale is selected by `?lang=<locale>` in the URL.
1017
- */
1018
- i18n?: DocsI18nConfig;
1019
- /**
1020
- * Set to `true` when building for full static export (e.g. Cloudflare Pages).
1021
- * When using `output: 'export'` in Next.js, the `/api/docs` route is not generated.
1022
- * Set `ai.enabled: false` and optionally rely on client-side search or leave search disabled.
1023
- */
1024
- staticExport?: boolean;
1025
- /** Theme configuration - single source of truth for UI */
1026
- theme?: DocsTheme;
1027
- /**
1028
- * GitHub repository URL or config. Enables "Edit on GitHub" links
1029
- * on each docs page footer, pointing to the source `.mdx` file.
1030
- *
1031
- * @example
1032
- * ```ts
1033
- * // Simple — branch defaults to "main"
1034
- * github: "https://github.com/Kinfe123/my-docs"
1035
- *
1036
- * // Monorepo — docs site lives in "website/" subdirectory
1037
- * github: {
1038
- * url: "https://github.com/farming-labs/docs",
1039
- * directory: "website",
1040
- * }
1041
- *
1042
- * // Custom branch
1043
- * github: {
1044
- * url: "https://github.com/Kinfe123/my-docs",
1045
- * branch: "develop",
1046
- * }
1047
- * ```
1048
- */
1049
- github?: string | GithubConfig;
1050
- /**
1051
- * Sidebar navigation header.
1052
- * Customise the title shown at the top of the sidebar.
1053
- */
1054
- nav?: DocsNav;
1055
- /**
1056
- * Theme toggle (light/dark mode switcher) in the sidebar.
1057
- *
1058
- * - `true` or `undefined` → toggle is shown (default)
1059
- * - `false` → toggle is hidden, defaults to system theme
1060
- * - `{ enabled: false, default: "dark" }` → toggle hidden, force dark
1061
- *
1062
- * @example
1063
- * ```ts
1064
- * // Hide toggle, force dark mode
1065
- * themeToggle: { enabled: false, default: "dark" }
1066
- *
1067
- * // Show toggle with system option
1068
- * themeToggle: { mode: "light-dark-system" }
1069
- * ```
1070
- */
1071
- themeToggle?: boolean | ThemeToggleConfig;
1072
- /**
1073
- * Breadcrumb navigation above page content.
1074
- *
1075
- * - `true` or `undefined` → breadcrumb is shown (default)
1076
- * - `false` → breadcrumb is hidden
1077
- * - `{ enabled: false }` → breadcrumb is hidden
1078
- * - `{ component: MyBreadcrumb }` → custom breadcrumb component
1079
- */
1080
- breadcrumb?: boolean | BreadcrumbConfig;
1081
- /**
1082
- * Sidebar customisation.
1083
- *
1084
- * - `true` or `undefined` → default sidebar
1085
- * - `false` → sidebar is hidden
1086
- * - `{ component: MySidebar }` → custom sidebar component
1087
- * - `{ footer: <MyFooter />, banner: <MyBanner /> }` → add footer/banner
1088
- */
1089
- sidebar?: boolean | SidebarConfig;
1090
- /**
1091
- * Custom MDX component overrides.
1092
- *
1093
- * Pass your own React components to replace defaults (e.g. Callout, CodeBlock).
1094
- * Components must match the expected props interface.
1095
- *
1096
- * @example
1097
- * ```ts
1098
- * import { MyCallout } from "./components/my-callout";
1099
- *
1100
- * export default defineDocs({
1101
- * entry: "docs",
1102
- * theme: fumadocs(),
1103
- * components: {
1104
- * Callout: MyCallout,
1105
- * },
1106
- * });
1107
- * ```
1108
- */
1109
- components?: Record<string, unknown>;
1110
- /**
1111
- * Callback fired when the user clicks the copy button on a code block.
1112
- * Called in addition to the default copy-to-clipboard behavior.
1113
- * Use it for analytics, logging, or custom behavior.
1114
- *
1115
- * @example
1116
- * ```ts
1117
- * export default defineDocs({
1118
- * entry: "docs",
1119
- * theme: fumadocs(),
1120
- * onCopyClick(data) {
1121
- * console.log("Code copied", data.title, data.language, data.url);
1122
- * analytics.track("code_block_copy", { title: data.title, url: data.url });
1123
- * },
1124
- * });
1125
- * ```
1126
- */
1127
- onCopyClick?: (data: CodeBlockCopyData) => void;
1128
- /**
1129
- * Icon registry for sidebar items.
1130
- *
1131
- * Map string labels to React elements. Reference them in page frontmatter
1132
- * with `icon: "label"` and the matching icon renders in the sidebar.
1133
- *
1134
- * @example
1135
- * ```tsx
1136
- * import { Book, Terminal, Rocket } from "lucide-react";
1137
- *
1138
- * export default defineDocs({
1139
- * entry: "docs",
1140
- * theme: fumadocs(),
1141
- * icons: {
1142
- * book: <Book />,
1143
- * terminal: <Terminal />,
1144
- * rocket: <Rocket />,
1145
- * },
1146
- * });
1147
- * ```
1148
- *
1149
- * Then in `page.mdx` frontmatter:
1150
- * ```yaml
1151
- * ---
1152
- * title: "CLI Reference"
1153
- * icon: "terminal"
1154
- * ---
1155
- * ```
1156
- */
1157
- icons?: Record<string, unknown>;
1158
- /**
1159
- * Page action buttons shown above the content area.
1160
- * Includes "Copy Markdown" and "Open in …" (LLM dropdown).
1161
- *
1162
- * @example
1163
- * ```ts
1164
- * pageActions: {
1165
- * copyMarkdown: { enabled: true },
1166
- * openDocs: {
1167
- * enabled: true,
1168
- * providers: [
1169
- * { name: "ChatGPT", urlTemplate: "https://chatgpt.com/?q={url}" },
1170
- * { name: "Claude", urlTemplate: "https://claude.ai/new?q={url}" },
1171
- * ],
1172
- * },
1173
- * }
1174
- * ```
1175
- */
1176
- pageActions?: PageActionsConfig;
1177
- /**
1178
- * Configuration for the "Last updated" date display.
1179
- *
1180
- * - `true` or `undefined` → shown in footer next to "Edit on GitHub" (default)
1181
- * - `false` → hidden
1182
- * - `{ position: "below-title" }` → shown below the page title
1183
- * - `{ position: "footer" }` → shown next to "Edit on GitHub" (default)
1184
- *
1185
- * @example
1186
- * ```ts
1187
- * // Show below title (Mintlify style)
1188
- * lastUpdated: { position: "below-title" }
1189
- *
1190
- * // Hide entirely
1191
- * lastUpdated: false
1192
- * ```
1193
- */
1194
- lastUpdated?: boolean | LastUpdatedConfig;
1195
- /**
1196
- * AI-powered "Ask AI" chat for documentation.
1197
- *
1198
- * When enabled, the unified API route handler (`/api/docs`) accepts
1199
- * POST requests for AI chat. The handler uses RAG (Retrieval-Augmented
1200
- * Generation) — it searches relevant docs, builds context, and streams
1201
- * a response from an LLM.
1202
- *
1203
- * The API key defaults to `process.env.OPENAI_API_KEY`. For other providers,
1204
- * pass the key via `apiKey: process.env.YOUR_KEY`.
1205
- *
1206
- * @example
1207
- * ```ts
1208
- * // Enable with defaults (gpt-4o-mini, OPENAI_API_KEY)
1209
- * ai: { enabled: true }
1210
- *
1211
- * // Custom model + system prompt
1212
- * ai: {
1213
- * enabled: true,
1214
- * model: "gpt-4o",
1215
- * systemPrompt: "You are an expert on our SDK. Be concise.",
1216
- * }
1217
- *
1218
- * // Use a different provider (e.g. Groq)
1219
- * ai: {
1220
- * enabled: true,
1221
- * baseUrl: "https://api.groq.com/openai/v1",
1222
- * apiKey: process.env.GROQ_API_KEY,
1223
- * model: "llama-3.1-70b-versatile",
1224
- * }
1225
- * ```
1226
- */
1227
- ai?: AIConfig;
1228
- /**
1229
- * Sidebar ordering strategy.
1230
- *
1231
- * - `"alphabetical"` — sort pages alphabetically by folder name (default)
1232
- * - `"numeric"` — sort by frontmatter `order` field (lower first, unset pages last)
1233
- * - `OrderingItem[]` — explicit slug-based ordering with nested children
1234
- *
1235
- * @default "alphabetical"
1236
- *
1237
- * @example
1238
- * ```ts
1239
- * // Alphabetical (default)
1240
- * ordering: "alphabetical",
1241
- *
1242
- * // Use frontmatter `order: 1`, `order: 2`, etc.
1243
- * ordering: "numeric",
1244
- *
1245
- * // Explicit slug-based ordering
1246
- * ordering: [
1247
- * { slug: "installation" },
1248
- * { slug: "cli" },
1249
- * { slug: "configuration" },
1250
- * { slug: "themes", children: [
1251
- * { slug: "default" },
1252
- * { slug: "darksharp" },
1253
- * { slug: "pixel-border" },
1254
- * { slug: "creating-themes" },
1255
- * ]},
1256
- * { slug: "customization" },
1257
- * { slug: "reference" },
1258
- * ]
1259
- * ```
1260
- */
1261
- ordering?: "alphabetical" | "numeric" | OrderingItem[];
1262
- /**
1263
- * Auto-generate `/llms.txt` and `/llms-full.txt` routes for LLM-friendly
1264
- * documentation. These files let AI tools quickly understand your docs.
1265
- *
1266
- * @example
1267
- * ```ts
1268
- * llmsTxt: {
1269
- * enabled: true,
1270
- * baseUrl: "https://docs.example.com",
1271
- * }
1272
- * ```
1273
- *
1274
- * @see https://llmstxt.org
1275
- */
1276
- llmsTxt?: boolean | LlmsTxtConfig;
1277
- /** SEO metadata - separate from theme */
1278
- metadata?: DocsMetadata;
1279
- /** Open Graph image handling */
1280
- og?: OGConfig;
1281
- }
1282
- //#endregion
1283
- //#region src/define-docs.d.ts
1284
- /**
1285
- * Define docs configuration. Validates and returns the config.
1286
- */
1287
- declare function defineDocs(config: DocsConfig): DocsConfig;
1288
- //#endregion
1289
- //#region src/utils.d.ts
1290
- /**
1291
- * Deep merge utility for theme overrides.
1292
- * Merges objects recursively; later values override earlier ones.
1293
- */
1294
- declare function deepMerge<T extends Record<string, unknown>>(target: T, ...sources: Partial<T>[]): T;
1295
- //#endregion
1296
- //#region src/create-theme.d.ts
1297
- /**
1298
- * Create a theme preset factory.
1299
- *
1300
- * Returns a function that accepts optional overrides and deep-merges them
1301
- * with the base theme defaults. This is the same pattern used by the
1302
- * built-in `fumadocs()`, `darksharp()`, and `pixelBorder()` presets.
1303
- *
1304
- * @param baseTheme - The default theme configuration
1305
- * @returns A factory function `(overrides?) => DocsTheme`
1306
- *
1307
- * @example
1308
- * ```ts
1309
- * import { createTheme } from "@farming-labs/docs";
1310
- *
1311
- * export const myTheme = createTheme({
1312
- * name: "my-theme",
1313
- * ui: {
1314
- * colors: { primary: "#6366f1" },
1315
- * layout: { contentWidth: 800 },
1316
- * },
1317
- * });
1318
- * ```
1319
- */
1320
- declare function createTheme(baseTheme: DocsTheme): (overrides?: Partial<DocsTheme>) => DocsTheme;
1321
- /**
1322
- * Extend an existing theme preset with additional defaults.
1323
- *
1324
- * Useful when you want to build on top of an existing theme (e.g. fumadocs)
1325
- * rather than starting from scratch.
1326
- *
1327
- * @example
1328
- * ```ts
1329
- * import { extendTheme } from "@farming-labs/docs";
1330
- * import { fumadocs } from "@farming-labs/theme/default";
1331
- *
1332
- * // Start with fumadocs defaults, override some values
1333
- * export const myTheme = extendTheme(fumadocs(), {
1334
- * name: "my-custom-fumadocs",
1335
- * ui: { colors: { primary: "#22c55e" } },
1336
- * });
1337
- * ```
1338
- */
1339
- declare function extendTheme(baseTheme: DocsTheme, extensions: Partial<DocsTheme>): DocsTheme;
1340
- //#endregion
1341
- //#region src/i18n.d.ts
1342
- interface ResolvedDocsI18n {
1343
- locales: string[];
1344
- defaultLocale: string;
1345
- }
1346
- interface DocsPathMatch {
1347
- /** Slug path relative to the docs root (no leading slash). */
1348
- slug: string;
1349
- /** Entry path used for URLs (no locale segment). */
1350
- entryPath: string;
1351
- }
1352
- declare function resolveDocsI18n(config?: DocsI18nConfig | null): ResolvedDocsI18n | null;
1353
- declare function resolveDocsLocale(searchParams: URLSearchParams, i18n?: ResolvedDocsI18n | null): string | undefined;
1354
- declare function resolveDocsPath(pathname: string, entry: string): DocsPathMatch;
1355
- //#endregion
1356
- //#region src/metadata.d.ts
1357
- /**
1358
- * Resolve page title using metadata titleTemplate.
1359
- * %s is replaced with page title.
1360
- */
1361
- declare function resolveTitle(pageTitle: string, metadata?: DocsMetadata): string;
1362
- /**
1363
- * Resolve OG image URL for a page.
1364
- * Prefers page.openGraph.images[0], then page.ogImage, then config endpoint/default.
1365
- */
1366
- declare function resolveOGImage(page: PageFrontmatter, ogConfig?: OGConfig, baseUrl?: string): string | undefined;
1367
- /**
1368
- * Build the Open Graph metadata object for a page.
1369
- * When the page has openGraph in frontmatter, uses it (with title/description filled from page if omitted).
1370
- * Otherwise uses ogImage or config (dynamic endpoint / defaultImage).
1371
- */
1372
- declare function buildPageOpenGraph(page: Pick<PageFrontmatter, "title" | "description" | "ogImage" | "openGraph">, ogConfig?: OGConfig, baseUrl?: string): PageOpenGraph | undefined;
1373
- /**
1374
- * Build the Twitter card metadata object for a page.
1375
- * When the page has twitter in frontmatter, uses it.
1376
- * Otherwise builds from ogImage or config (dynamic endpoint).
1377
- */
1378
- declare function buildPageTwitter(page: Pick<PageFrontmatter, "title" | "description" | "ogImage" | "openGraph" | "twitter">, ogConfig?: OGConfig, baseUrl?: string): PageTwitter | undefined;
1379
- //#endregion
1380
- export { type AIConfig, type BreadcrumbConfig, type CodeBlockCopyData, type CopyMarkdownConfig, type DocsConfig, type DocsI18nConfig, type DocsMetadata, type DocsNav, type DocsPathMatch, type DocsTheme, type FontStyle, type GithubConfig, type LastUpdatedConfig, type LlmsTxtConfig, type OGConfig, type OpenDocsConfig, type OpenDocsProvider, type OpenGraphImage, type OrderingItem, type PageActionsConfig, type PageFrontmatter, type PageOpenGraph, type PageTwitter, type ResolvedDocsI18n, type SidebarComponentProps, type SidebarConfig, type SidebarFolderNode, type SidebarNode, type SidebarPageNode, type SidebarTree, type ThemeToggleConfig, type TypographyConfig, type UIConfig, buildPageOpenGraph, buildPageTwitter, createTheme, deepMerge, defineDocs, extendTheme, resolveDocsI18n, resolveDocsLocale, resolveDocsPath, resolveOGImage, resolveTitle };