boltdocs 1.10.1 → 1.11.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 (226) hide show
  1. package/package.json +29 -7
  2. package/src/client/app/config-context.tsx +18 -0
  3. package/src/client/app/docs-layout.tsx +14 -0
  4. package/src/client/app/index.tsx +132 -260
  5. package/src/client/app/mdx-component.tsx +52 -0
  6. package/src/client/app/mdx-components-context.tsx +23 -0
  7. package/src/client/app/mdx-page.tsx +20 -0
  8. package/src/client/app/preload.tsx +38 -30
  9. package/src/client/app/router.tsx +30 -0
  10. package/src/client/app/scroll-handler.tsx +40 -0
  11. package/src/client/app/theme-context.tsx +75 -0
  12. package/src/client/components/default-layout.tsx +80 -0
  13. package/src/client/components/docs-layout.tsx +105 -0
  14. package/src/client/components/icons-dev.tsx +74 -0
  15. package/src/client/components/mdx/admonition.tsx +107 -0
  16. package/src/client/components/mdx/badge.tsx +41 -0
  17. package/src/client/components/mdx/button.tsx +35 -0
  18. package/src/client/components/mdx/card.tsx +124 -0
  19. package/src/client/components/mdx/code-block.tsx +119 -0
  20. package/src/client/components/mdx/component-preview.tsx +47 -0
  21. package/src/client/components/mdx/component-props.tsx +83 -0
  22. package/src/client/components/mdx/field.tsx +66 -0
  23. package/src/client/components/mdx/file-tree.tsx +287 -0
  24. package/src/client/components/mdx/hooks/use-code-block.ts +56 -0
  25. package/src/client/components/mdx/hooks/use-component-preview.ts +16 -0
  26. package/src/client/components/mdx/hooks/useTable.ts +74 -0
  27. package/src/client/components/mdx/hooks/useTabs.ts +68 -0
  28. package/src/client/components/mdx/image.tsx +23 -0
  29. package/src/client/components/mdx/index.ts +53 -0
  30. package/src/client/components/mdx/link.tsx +38 -0
  31. package/src/client/components/mdx/list.tsx +192 -0
  32. package/src/client/components/mdx/table.tsx +156 -0
  33. package/src/client/components/mdx/tabs.tsx +135 -0
  34. package/src/client/components/mdx/video.tsx +68 -0
  35. package/src/client/components/primitives/breadcrumbs.tsx +79 -0
  36. package/src/client/components/primitives/button-group.tsx +54 -0
  37. package/src/client/components/primitives/button.tsx +145 -0
  38. package/src/client/components/primitives/helpers/observer.ts +120 -0
  39. package/src/client/components/primitives/index.ts +17 -0
  40. package/src/client/components/primitives/link.tsx +122 -0
  41. package/src/client/components/primitives/menu.tsx +159 -0
  42. package/src/client/components/primitives/navbar.tsx +359 -0
  43. package/src/client/components/primitives/navigation-menu.tsx +116 -0
  44. package/src/client/components/primitives/on-this-page.tsx +461 -0
  45. package/src/client/components/primitives/page-nav.tsx +87 -0
  46. package/src/client/components/primitives/popover.tsx +47 -0
  47. package/src/client/components/primitives/search-dialog.tsx +183 -0
  48. package/src/client/components/primitives/sidebar.tsx +154 -0
  49. package/src/client/components/primitives/tabs.tsx +90 -0
  50. package/src/client/components/primitives/tooltip.tsx +83 -0
  51. package/src/client/components/primitives/types.ts +11 -0
  52. package/src/client/components/ui-base/breadcrumbs.tsx +42 -0
  53. package/src/client/components/ui-base/copy-markdown.tsx +112 -0
  54. package/src/client/components/ui-base/error-boundary.tsx +52 -0
  55. package/src/client/components/ui-base/github-stars.tsx +27 -0
  56. package/src/client/components/ui-base/head.tsx +69 -0
  57. package/src/client/components/ui-base/loading.tsx +87 -0
  58. package/src/client/components/ui-base/navbar.tsx +138 -0
  59. package/src/client/components/ui-base/not-found.tsx +24 -0
  60. package/src/client/components/ui-base/on-this-page.tsx +152 -0
  61. package/src/client/components/ui-base/page-nav.tsx +39 -0
  62. package/src/client/components/ui-base/powered-by.tsx +19 -0
  63. package/src/client/components/ui-base/progress-bar.tsx +67 -0
  64. package/src/client/components/ui-base/search-dialog.tsx +82 -0
  65. package/src/client/components/ui-base/sidebar.tsx +104 -0
  66. package/src/client/components/ui-base/tabs.tsx +65 -0
  67. package/src/client/components/ui-base/theme-toggle.tsx +32 -0
  68. package/src/client/hooks/index.ts +12 -0
  69. package/src/client/hooks/use-breadcrumbs.ts +22 -0
  70. package/src/client/hooks/use-i18n.ts +84 -0
  71. package/src/client/hooks/use-localized-to.ts +95 -0
  72. package/src/client/hooks/use-location.ts +5 -0
  73. package/src/client/hooks/use-navbar.ts +60 -0
  74. package/src/client/hooks/use-onthispage.ts +23 -0
  75. package/src/client/hooks/use-page-nav.ts +22 -0
  76. package/src/client/hooks/use-routes.ts +72 -0
  77. package/src/client/hooks/use-search.ts +71 -0
  78. package/src/client/hooks/use-sidebar.ts +49 -0
  79. package/src/client/hooks/use-tabs.ts +43 -0
  80. package/src/client/hooks/use-version.ts +78 -0
  81. package/src/client/index.ts +55 -18
  82. package/src/client/integrations/codesandbox.ts +179 -0
  83. package/src/client/ssr.tsx +27 -16
  84. package/src/client/theme/neutral.css +360 -0
  85. package/src/client/types.ts +131 -27
  86. package/src/client/utils/cn.ts +6 -0
  87. package/src/client/utils/copy-clipboard.ts +22 -0
  88. package/src/client/utils/get-base-file-path.ts +21 -0
  89. package/src/client/utils/github.ts +121 -0
  90. package/src/client/utils/use-on-change.ts +15 -0
  91. package/src/client/virtual.d.ts +24 -0
  92. package/src/node/cache.ts +156 -156
  93. package/src/node/config.ts +159 -103
  94. package/src/node/index.ts +13 -13
  95. package/src/node/mdx.ts +213 -61
  96. package/src/node/plugin/entry.ts +29 -18
  97. package/src/node/plugin/html.ts +11 -11
  98. package/src/node/plugin/index.ts +161 -83
  99. package/src/node/plugin/types.ts +2 -4
  100. package/src/node/routes/cache.ts +6 -6
  101. package/src/node/routes/index.ts +206 -113
  102. package/src/node/routes/parser.ts +106 -81
  103. package/src/node/routes/sorter.ts +15 -15
  104. package/src/node/routes/types.ts +24 -24
  105. package/src/node/ssg/index.ts +46 -46
  106. package/src/node/ssg/meta.ts +4 -4
  107. package/src/node/ssg/options.ts +5 -5
  108. package/src/node/ssg/sitemap.ts +14 -14
  109. package/src/node/utils.ts +31 -31
  110. package/tsconfig.json +25 -20
  111. package/tsup.config.ts +23 -14
  112. package/dist/PackageManagerTabs-NVT7G625.mjs +0 -99
  113. package/dist/SearchDialog-BEVZQ74P.css +0 -2679
  114. package/dist/SearchDialog-MEWGAONO.mjs +0 -194
  115. package/dist/Video-KNTY5BNO.mjs +0 -6
  116. package/dist/cache-KNL5B4EE.mjs +0 -12
  117. package/dist/chunk-7SFUJWTB.mjs +0 -211
  118. package/dist/chunk-FFBNU6IJ.mjs +0 -386
  119. package/dist/chunk-FMTOYQLO.mjs +0 -37
  120. package/dist/chunk-OZLYRXAD.mjs +0 -1914
  121. package/dist/chunk-Z7JHYNAS.mjs +0 -57
  122. package/dist/client/index.css +0 -2679
  123. package/dist/client/index.d.mts +0 -379
  124. package/dist/client/index.d.ts +0 -379
  125. package/dist/client/index.js +0 -3594
  126. package/dist/client/index.mjs +0 -658
  127. package/dist/client/ssr.css +0 -2679
  128. package/dist/client/ssr.d.mts +0 -27
  129. package/dist/client/ssr.d.ts +0 -27
  130. package/dist/client/ssr.js +0 -2930
  131. package/dist/client/ssr.mjs +0 -33
  132. package/dist/config-BsFQ-ErD.d.mts +0 -159
  133. package/dist/config-BsFQ-ErD.d.ts +0 -159
  134. package/dist/node/index.d.mts +0 -91
  135. package/dist/node/index.d.ts +0 -91
  136. package/dist/node/index.js +0 -1187
  137. package/dist/node/index.mjs +0 -762
  138. package/dist/types-Dj-bfnC3.d.mts +0 -74
  139. package/dist/types-Dj-bfnC3.d.ts +0 -74
  140. package/src/client/theme/components/CodeBlock/CodeBlock.tsx +0 -40
  141. package/src/client/theme/components/CodeBlock/index.ts +0 -1
  142. package/src/client/theme/components/PackageManagerTabs/PackageManagerTabs.tsx +0 -131
  143. package/src/client/theme/components/PackageManagerTabs/index.ts +0 -1
  144. package/src/client/theme/components/PackageManagerTabs/pkg-tabs.css +0 -64
  145. package/src/client/theme/components/Playground/Playground.tsx +0 -124
  146. package/src/client/theme/components/Playground/index.ts +0 -1
  147. package/src/client/theme/components/Playground/playground.css +0 -168
  148. package/src/client/theme/components/Video/Video.tsx +0 -84
  149. package/src/client/theme/components/Video/index.ts +0 -1
  150. package/src/client/theme/components/Video/video.css +0 -41
  151. package/src/client/theme/components/mdx/Admonition.tsx +0 -80
  152. package/src/client/theme/components/mdx/Badge.tsx +0 -31
  153. package/src/client/theme/components/mdx/Button.tsx +0 -50
  154. package/src/client/theme/components/mdx/Card.tsx +0 -80
  155. package/src/client/theme/components/mdx/Field.tsx +0 -60
  156. package/src/client/theme/components/mdx/FileTree.tsx +0 -229
  157. package/src/client/theme/components/mdx/List.tsx +0 -57
  158. package/src/client/theme/components/mdx/Table.tsx +0 -151
  159. package/src/client/theme/components/mdx/Tabs.tsx +0 -123
  160. package/src/client/theme/components/mdx/index.ts +0 -27
  161. package/src/client/theme/components/mdx/mdx-components.css +0 -764
  162. package/src/client/theme/icons/bun.tsx +0 -62
  163. package/src/client/theme/icons/deno.tsx +0 -20
  164. package/src/client/theme/icons/discord.tsx +0 -12
  165. package/src/client/theme/icons/github.tsx +0 -15
  166. package/src/client/theme/icons/npm.tsx +0 -13
  167. package/src/client/theme/icons/pnpm.tsx +0 -72
  168. package/src/client/theme/icons/twitter.tsx +0 -12
  169. package/src/client/theme/styles/markdown.css +0 -341
  170. package/src/client/theme/styles/variables.css +0 -187
  171. package/src/client/theme/styles.css +0 -38
  172. package/src/client/theme/ui/BackgroundGradient/BackgroundGradient.tsx +0 -10
  173. package/src/client/theme/ui/BackgroundGradient/index.ts +0 -1
  174. package/src/client/theme/ui/Breadcrumbs/Breadcrumbs.tsx +0 -68
  175. package/src/client/theme/ui/Breadcrumbs/index.ts +0 -1
  176. package/src/client/theme/ui/CopyMarkdown/CopyMarkdown.tsx +0 -82
  177. package/src/client/theme/ui/CopyMarkdown/copy-markdown.css +0 -114
  178. package/src/client/theme/ui/CopyMarkdown/index.ts +0 -1
  179. package/src/client/theme/ui/ErrorBoundary/ErrorBoundary.tsx +0 -46
  180. package/src/client/theme/ui/ErrorBoundary/index.ts +0 -1
  181. package/src/client/theme/ui/Footer/footer.css +0 -32
  182. package/src/client/theme/ui/Head/Head.tsx +0 -69
  183. package/src/client/theme/ui/Head/index.ts +0 -1
  184. package/src/client/theme/ui/LanguageSwitcher/LanguageSwitcher.tsx +0 -125
  185. package/src/client/theme/ui/LanguageSwitcher/index.ts +0 -1
  186. package/src/client/theme/ui/LanguageSwitcher/language-switcher.css +0 -98
  187. package/src/client/theme/ui/Layout/Layout.tsx +0 -208
  188. package/src/client/theme/ui/Layout/base.css +0 -105
  189. package/src/client/theme/ui/Layout/index.ts +0 -2
  190. package/src/client/theme/ui/Layout/pagination.css +0 -72
  191. package/src/client/theme/ui/Layout/responsive.css +0 -36
  192. package/src/client/theme/ui/Link/Link.tsx +0 -392
  193. package/src/client/theme/ui/Link/LinkPreview.tsx +0 -59
  194. package/src/client/theme/ui/Link/index.ts +0 -2
  195. package/src/client/theme/ui/Link/link-preview.css +0 -48
  196. package/src/client/theme/ui/Loading/Loading.tsx +0 -10
  197. package/src/client/theme/ui/Loading/index.ts +0 -1
  198. package/src/client/theme/ui/Loading/loading.css +0 -30
  199. package/src/client/theme/ui/Navbar/GithubStars.tsx +0 -27
  200. package/src/client/theme/ui/Navbar/Navbar.tsx +0 -193
  201. package/src/client/theme/ui/Navbar/Tabs.tsx +0 -99
  202. package/src/client/theme/ui/Navbar/index.ts +0 -2
  203. package/src/client/theme/ui/Navbar/navbar.css +0 -347
  204. package/src/client/theme/ui/NotFound/NotFound.tsx +0 -19
  205. package/src/client/theme/ui/NotFound/index.ts +0 -1
  206. package/src/client/theme/ui/NotFound/not-found.css +0 -64
  207. package/src/client/theme/ui/OnThisPage/OnThisPage.tsx +0 -244
  208. package/src/client/theme/ui/OnThisPage/index.ts +0 -1
  209. package/src/client/theme/ui/OnThisPage/toc.css +0 -152
  210. package/src/client/theme/ui/PoweredBy/PoweredBy.tsx +0 -18
  211. package/src/client/theme/ui/PoweredBy/index.ts +0 -1
  212. package/src/client/theme/ui/PoweredBy/powered-by.css +0 -76
  213. package/src/client/theme/ui/ProgressBar/ProgressBar.css +0 -17
  214. package/src/client/theme/ui/ProgressBar/ProgressBar.tsx +0 -51
  215. package/src/client/theme/ui/ProgressBar/index.ts +0 -1
  216. package/src/client/theme/ui/SearchDialog/SearchDialog.tsx +0 -209
  217. package/src/client/theme/ui/SearchDialog/index.ts +0 -1
  218. package/src/client/theme/ui/SearchDialog/search.css +0 -152
  219. package/src/client/theme/ui/Sidebar/Sidebar.tsx +0 -244
  220. package/src/client/theme/ui/Sidebar/index.ts +0 -1
  221. package/src/client/theme/ui/Sidebar/sidebar.css +0 -230
  222. package/src/client/theme/ui/ThemeToggle/ThemeToggle.tsx +0 -69
  223. package/src/client/theme/ui/ThemeToggle/index.ts +0 -1
  224. package/src/client/theme/ui/VersionSwitcher/VersionSwitcher.tsx +0 -136
  225. package/src/client/theme/ui/VersionSwitcher/index.ts +0 -1
  226. package/src/client/utils.ts +0 -49
@@ -1,379 +0,0 @@
1
- import { B as BoltdocsConfig } from '../config-BsFQ-ErD.mjs';
2
- export { a as BoltdocsThemeConfig } from '../config-BsFQ-ErD.mjs';
3
- import { C as CreateBoltdocsAppOptions, a as ComponentRoute } from '../types-Dj-bfnC3.mjs';
4
- import * as react_jsx_runtime from 'react/jsx-runtime';
5
- import React from 'react';
6
- import 'vite';
7
-
8
- declare global {
9
- interface ImportMeta {
10
- env: Record<string, any>;
11
- }
12
- }
13
- /**
14
- * Creates and mounts the Boltdocs documentation app.
15
- *
16
- * Usage:
17
- * ```tsx
18
- * import { createBoltdocsApp } from 'boltdocs/client'
19
- * import routes from 'virtual:boltdocs-routes'
20
- * import config from 'virtual:boltdocs-config'
21
- * import 'boltdocs/style.css'
22
- * import HomePage from './HomePage'
23
- *
24
- * createBoltdocsApp({
25
- * target: '#root',
26
- * routes,
27
- * config,
28
- * modules: import.meta.glob('/docs/**\/*.{md,mdx}'),
29
- * hot: import.meta.hot,
30
- * homePage: HomePage,
31
- * })
32
- * ```
33
- */
34
- declare function createBoltdocsApp(options: CreateBoltdocsAppOptions): void;
35
-
36
- /**
37
- * The top navigation bar of the documentation site.
38
- */
39
- declare function Navbar({ config, routes, allRoutes, currentLocale, currentVersion, }: {
40
- config: BoltdocsConfig;
41
- routes?: ComponentRoute[];
42
- allRoutes?: ComponentRoute[];
43
- currentLocale?: string;
44
- currentVersion?: string;
45
- }): react_jsx_runtime.JSX.Element;
46
-
47
- interface RouteItem {
48
- path: string;
49
- title: string;
50
- group?: string;
51
- groupTitle?: string;
52
- sidebarPosition?: number;
53
- badge?: string | {
54
- text: string;
55
- expires?: string;
56
- };
57
- icon?: string;
58
- tab?: string;
59
- groupIcon?: string;
60
- }
61
- /**
62
- * The sidebar navigation component.
63
- * Groups documentation routes logically based on the `group` property.
64
- * Highlights the active link based on the current URL path.
65
- *
66
- * @param routes - Array of all generated routes to be displayed
67
- * @param config - Global configuration (which can contain sidebar overrides)
68
- */
69
- declare function Sidebar({ routes, config, }: {
70
- routes: RouteItem[];
71
- config: BoltdocsConfig;
72
- }): react_jsx_runtime.JSX.Element;
73
-
74
- interface TocHeading {
75
- id: string;
76
- text: string;
77
- level: number;
78
- }
79
- declare function OnThisPage({ headings, editLink, communityHelp, filePath, }: {
80
- headings?: TocHeading[];
81
- editLink?: string;
82
- communityHelp?: string;
83
- filePath?: string;
84
- }): react_jsx_runtime.JSX.Element | null;
85
-
86
- interface HeadProps {
87
- siteTitle: string;
88
- siteDescription?: string;
89
- routes: Array<{
90
- path: string;
91
- title: string;
92
- description?: string;
93
- }>;
94
- }
95
- declare function Head({ siteTitle, siteDescription, routes }: HeadProps): null;
96
-
97
- interface BreadcrumbsProps {
98
- routes: ComponentRoute[];
99
- config: BoltdocsConfig;
100
- }
101
- declare function Breadcrumbs({ routes, config }: BreadcrumbsProps): react_jsx_runtime.JSX.Element | null;
102
-
103
- declare function BackgroundGradient(): react_jsx_runtime.JSX.Element;
104
-
105
- interface ThemeLayoutProps {
106
- config: BoltdocsConfig;
107
- routes: ComponentRoute[];
108
- children: React.ReactNode;
109
- /** Custom navbar component (slots) */
110
- navbar?: React.ReactNode;
111
- /** Custom sidebar component (slots) */
112
- sidebar?: React.ReactNode;
113
- /** Custom table of contents (OnThisPage) component (slots) */
114
- toc?: React.ReactNode;
115
- /** Custom background component (slots) */
116
- background?: React.ReactNode;
117
- /** Custom head/metadata component (slots) */
118
- head?: React.ReactNode;
119
- /** Custom breadcrumbs component (slots) */
120
- breadcrumbs?: React.ReactNode;
121
- /** Custom class name for the root layout element */
122
- className?: string;
123
- /** Custom styles for the root layout element */
124
- style?: React.CSSProperties;
125
- }
126
- /**
127
- * The main structural layout for documentation pages.
128
- * Integrates the Navbar, Sidebar, and OnThisPage components into a cohesive shell.
129
- * It also manages mobile interaction states like the sidebar overlay toggle.
130
- *
131
- * @param config - The global Boltdocs configuration object
132
- * @param routes - The array of available doc routes (used to render the sidebar)
133
- */
134
- declare function ThemeLayout({ config, routes, children, navbar, sidebar, toc, background, head, breadcrumbs, className, style, }: ThemeLayoutProps): react_jsx_runtime.JSX.Element;
135
-
136
- interface PlaygroundProps {
137
- code?: string;
138
- children?: string | React.ReactNode;
139
- scope?: Record<string, any>;
140
- readonly?: boolean;
141
- noInline?: boolean;
142
- }
143
- /**
144
- * A live React playground component.
145
- * Features a split layout with a live editor and a preview section.
146
- *
147
- * Supports `export default function App()` style code out of the box.
148
- */
149
- declare function Playground({ code, children, scope, readonly, noInline: forceNoInline, }: PlaygroundProps): react_jsx_runtime.JSX.Element;
150
-
151
- declare function NotFound(): react_jsx_runtime.JSX.Element;
152
-
153
- declare function Loading(): react_jsx_runtime.JSX.Element;
154
-
155
- interface CodeBlockProps {
156
- children?: React.ReactNode;
157
- className?: string;
158
- [key: string]: any;
159
- }
160
- /**
161
- * A specialized wrapper for code snippets compiled from MDX blocks.
162
- * Provides syntax highlighting styling scaffolding and a "Copy to Clipboard" button.
163
- */
164
- declare function CodeBlock({ children, ...props }: CodeBlockProps): react_jsx_runtime.JSX.Element;
165
-
166
- interface VideoProps {
167
- /** Video source URL */
168
- src?: string;
169
- /** Poster/thumbnail image URL */
170
- poster?: string;
171
- /** Alt text for accessibility */
172
- alt?: string;
173
- /** Show native video controls (default: true) */
174
- controls?: boolean;
175
- /** Preload strategy (default: 'none') */
176
- preload?: string;
177
- /** Children (e.g. <source> elements) */
178
- children?: React.ReactNode;
179
- /** Allow any additional HTML video attributes */
180
- [key: string]: any;
181
- }
182
- /**
183
- * Optimized video component with lazy loading via IntersectionObserver.
184
- * The `<video>` element is only rendered once it enters the viewport,
185
- * preventing unnecessary network downloads on initial page load.
186
- *
187
- * Usage in MDX:
188
- * ```mdx
189
- * <video src="/demo.mp4" poster="/demo-thumb.jpg" />
190
- * ```
191
- */
192
- declare function Video({ src, poster, alt, children, controls, preload, ...rest }: VideoProps): react_jsx_runtime.JSX.Element;
193
-
194
- type ButtonProps = React.AnchorHTMLAttributes<HTMLAnchorElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & {
195
- /** Visual variant */
196
- variant?: "primary" | "secondary" | "outline" | "ghost";
197
- /** Size */
198
- size?: "sm" | "md" | "lg";
199
- /** If provided, renders as a link */
200
- href?: string;
201
- children: React.ReactNode;
202
- };
203
- /**
204
- * A versatile button/link component for use in MDX pages and the home page.
205
- *
206
- * ```mdx
207
- * <Button variant="primary" href="/docs/getting-started">Get Started →</Button>
208
- * <Button variant="secondary" href="https://github.com">GitHub</Button>
209
- * ```
210
- */
211
- declare function Button({ variant, size, href, children, className, ...rest }: ButtonProps): react_jsx_runtime.JSX.Element;
212
-
213
- interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
214
- /** Color variant */
215
- variant?: "default" | "primary" | "success" | "warning" | "danger" | "info";
216
- children: React.ReactNode;
217
- }
218
- /**
219
- * Inline badge / pill for labels, statuses, or tags.
220
- *
221
- * ```mdx
222
- * <Badge variant="success">Stable</Badge>
223
- * <Badge variant="warning">Beta</Badge>
224
- * ```
225
- */
226
- declare function Badge({ variant, children, className, ...rest }: BadgeProps): react_jsx_runtime.JSX.Element;
227
-
228
- interface CardsProps extends React.HTMLAttributes<HTMLDivElement> {
229
- /** Number of columns (defaults to 3) */
230
- cols?: 1 | 2 | 3 | 4;
231
- children: React.ReactNode;
232
- }
233
- /**
234
- * Grid wrapper for `<Card>` components.
235
- *
236
- * ```mdx
237
- * <Cards cols={3}>
238
- * <Card title="Fast" icon="⚡">Instant HMR.</Card>
239
- * <Card title="Simple" icon="📁">File-system routing.</Card>
240
- * </Cards>
241
- * ```
242
- */
243
- declare function Cards({ cols, children, className, ...rest }: CardsProps): react_jsx_runtime.JSX.Element;
244
- interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
245
- /** Card heading */
246
- title?: string;
247
- /** Emoji or icon string displayed above the title */
248
- icon?: React.ReactNode;
249
- /** If provided, the entire card becomes a link */
250
- href?: string;
251
- children?: React.ReactNode;
252
- }
253
- /**
254
- * Individual feature/info card.
255
- */
256
- declare function Card({ title, icon, href, children, className, ...rest }: CardProps): react_jsx_runtime.JSX.Element;
257
-
258
- interface TabProps {
259
- /** The label shown in the tab bar */
260
- label: string;
261
- children: React.ReactNode;
262
- }
263
- /**
264
- * A single tab panel. Must be used inside `<Tabs>`.
265
- *
266
- * ```mdx
267
- * <Tab label="npm">npm install boltdocs</Tab>
268
- * ```
269
- */
270
- declare function Tab({ children }: TabProps): react_jsx_runtime.JSX.Element;
271
- interface TabsProps {
272
- /** Which tab index is initially active (0-based, default 0) */
273
- defaultIndex?: number;
274
- children: React.ReactNode;
275
- }
276
- /**
277
- * Tab container that manages active state.
278
- *
279
- * ```mdx
280
- * <Tabs>
281
- * <Tab label="npm">npm install boltdocs</Tab>
282
- * <Tab label="pnpm">pnpm add boltdocs</Tab>
283
- * </Tabs>
284
- * ```
285
- */
286
- declare function Tabs({ defaultIndex, children }: TabsProps): react_jsx_runtime.JSX.Element;
287
-
288
- interface AdmonitionProps extends React.HTMLAttributes<HTMLDivElement> {
289
- /** Admonition type — controls color and icon */
290
- type?: "note" | "tip" | "info" | "warning" | "danger";
291
- /** Override the default title */
292
- title?: string;
293
- children: React.ReactNode;
294
- }
295
- /**
296
- * Callout / admonition box for notes, warnings, etc.
297
- *
298
- * ```mdx
299
- * <Admonition type="warning" title="Breaking Change">
300
- * This API has changed in v2.
301
- * </Admonition>
302
- * ```
303
- */
304
- declare function Admonition({ type, title, children, className, ...rest }: AdmonitionProps): react_jsx_runtime.JSX.Element;
305
- declare const Note: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
306
- declare const Tip: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
307
- declare const Warning: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
308
- declare const Danger: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
309
- declare const InfoBox: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
310
-
311
- interface ListProps extends React.HTMLAttributes<HTMLUListElement> {
312
- /** Visual variant */
313
- variant?: "checked" | "arrow" | "default";
314
- children: React.ReactNode;
315
- }
316
- /**
317
- * Enhanced list component with icon variants.
318
- *
319
- * ```mdx
320
- * <List variant="checked">
321
- * <li>File-system routing</li>
322
- * <li>MDX support</li>
323
- * <li>Syntax highlighting</li>
324
- * </List>
325
- * ```
326
- */
327
- declare function List({ variant, children, className, ...rest }: ListProps): react_jsx_runtime.JSX.Element;
328
-
329
- interface FileTreeProps {
330
- children: React.ReactNode;
331
- }
332
- /**
333
- * FileTree component displays a customized, styled tree structure for markdown lists.
334
- *
335
- * ```mdx
336
- * <FileTree>
337
- * - src/
338
- * - index.ts
339
- * - components/
340
- * - Button.tsx
341
- * - package.json
342
- * </FileTree>
343
- * ```
344
- */
345
- declare function FileTree({ children }: FileTreeProps): react_jsx_runtime.JSX.Element;
346
-
347
- interface TableProps {
348
- headers?: string[];
349
- data?: (string | React.ReactNode)[][];
350
- children?: React.ReactNode;
351
- className?: string;
352
- sortable?: boolean;
353
- paginated?: boolean;
354
- pageSize?: number;
355
- }
356
- declare function Table({ headers, data, children, className, sortable, paginated, pageSize, }: TableProps): react_jsx_runtime.JSX.Element;
357
-
358
- interface FieldProps {
359
- /** The name of the property or field */
360
- name: string;
361
- /** The data type of the field (e.g., "string", "number", "boolean") */
362
- type?: string;
363
- /** The default value if not provided */
364
- defaultValue?: string;
365
- /** Whether the field is required */
366
- required?: boolean;
367
- /** Description or additional content */
368
- children: React.ReactNode;
369
- /** Optional anchor ID for linking */
370
- id?: string;
371
- /** Optional extra class name */
372
- className?: string;
373
- }
374
- /**
375
- * A highly aesthetic and readable component for documenting API fields/properties.
376
- */
377
- declare function Field({ name, type, defaultValue, required, children, id, className, }: FieldProps): react_jsx_runtime.JSX.Element;
378
-
379
- export { Admonition, type AdmonitionProps, BackgroundGradient, Badge, type BadgeProps, BoltdocsConfig, Breadcrumbs, Button, type ButtonProps, Card, type CardProps, Cards, type CardsProps, CodeBlock, ComponentRoute, CreateBoltdocsAppOptions, Danger, Field, type FieldProps, FileTree, type FileTreeProps, Head, InfoBox, List, type ListProps, Loading, Navbar, NotFound, Note, OnThisPage, Playground, Sidebar, Tab, type TabProps, Table, type TableProps, Tabs, type TabsProps, ThemeLayout, Tip, Video, Warning, createBoltdocsApp };