boltdocs 1.0.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.
- package/dist/CodeBlock-37XMKCYY.mjs +7 -0
- package/dist/PackageManagerTabs-4NWXLXQO.mjs +314 -0
- package/dist/Playground-OE2OE6B6.mjs +7 -0
- package/dist/SearchDialog-FTOQZ763.mjs +187 -0
- package/dist/SearchDialog-ZAZXYIFX.css +2147 -0
- package/dist/Video-I6QY4X7J.mjs +7 -0
- package/dist/chunk-2YRDWM6O.mjs +56 -0
- package/dist/chunk-PN4GCTYG.mjs +67 -0
- package/dist/chunk-X2TDGMTR.mjs +64 -0
- package/dist/chunk-X6BYQHVC.mjs +12 -0
- package/dist/chunk-Z7JHYNAS.mjs +57 -0
- package/dist/chunk-ZFCOLEXN.mjs +1644 -0
- package/dist/client/index.css +2147 -0
- package/dist/client/index.d.mts +298 -0
- package/dist/client/index.d.ts +298 -0
- package/dist/client/index.js +2793 -0
- package/dist/client/index.mjs +63 -0
- package/dist/client/ssr.css +2147 -0
- package/dist/client/ssr.d.mts +25 -0
- package/dist/client/ssr.d.ts +25 -0
- package/dist/client/ssr.js +2727 -0
- package/dist/client/ssr.mjs +32 -0
- package/dist/config-D2XmHJYe.d.mts +122 -0
- package/dist/config-D2XmHJYe.d.ts +122 -0
- package/dist/index-CRQKWAeo.d.mts +82 -0
- package/dist/index-CRQKWAeo.d.ts +82 -0
- package/dist/node/cli/index.d.mts +1 -0
- package/dist/node/cli/index.d.ts +1 -0
- package/dist/node/cli/index.js +199 -0
- package/dist/node/cli/index.mjs +154 -0
- package/dist/node/index.d.mts +79 -0
- package/dist/node/index.d.ts +79 -0
- package/dist/node/index.js +797 -0
- package/dist/node/index.mjs +719 -0
- package/package.json +79 -0
- package/src/client/app/index.tsx +422 -0
- package/src/client/app/preload.tsx +56 -0
- package/src/client/index.ts +40 -0
- package/src/client/ssr.tsx +50 -0
- package/src/client/theme/components/CodeBlock/CodeBlock.tsx +76 -0
- package/src/client/theme/components/CodeBlock/index.ts +1 -0
- package/src/client/theme/components/PackageManagerTabs/PackageManagerTabs.tsx +154 -0
- package/src/client/theme/components/PackageManagerTabs/index.ts +1 -0
- package/src/client/theme/components/PackageManagerTabs/pkg-tabs.css +64 -0
- package/src/client/theme/components/Playground/Playground.tsx +86 -0
- package/src/client/theme/components/Playground/index.ts +1 -0
- package/src/client/theme/components/Playground/playground.css +168 -0
- package/src/client/theme/components/Video/Video.tsx +84 -0
- package/src/client/theme/components/Video/index.ts +1 -0
- package/src/client/theme/components/Video/video.css +41 -0
- package/src/client/theme/components/mdx/Admonition.tsx +80 -0
- package/src/client/theme/components/mdx/Badge.tsx +31 -0
- package/src/client/theme/components/mdx/Button.tsx +50 -0
- package/src/client/theme/components/mdx/Card.tsx +80 -0
- package/src/client/theme/components/mdx/List.tsx +57 -0
- package/src/client/theme/components/mdx/Tabs.tsx +94 -0
- package/src/client/theme/components/mdx/index.ts +18 -0
- package/src/client/theme/components/mdx/mdx-components.css +405 -0
- package/src/client/theme/icons/bun.tsx +62 -0
- package/src/client/theme/icons/deno.tsx +20 -0
- package/src/client/theme/icons/discord.tsx +12 -0
- package/src/client/theme/icons/github.tsx +15 -0
- package/src/client/theme/icons/npm.tsx +13 -0
- package/src/client/theme/icons/pnpm.tsx +72 -0
- package/src/client/theme/icons/twitter.tsx +12 -0
- package/src/client/theme/styles/home.css +60 -0
- package/src/client/theme/styles/markdown.css +343 -0
- package/src/client/theme/styles/variables.css +162 -0
- package/src/client/theme/styles.css +38 -0
- package/src/client/theme/ui/BackgroundGradient/BackgroundGradient.tsx +10 -0
- package/src/client/theme/ui/BackgroundGradient/index.ts +1 -0
- package/src/client/theme/ui/Breadcrumbs/Breadcrumbs.tsx +68 -0
- package/src/client/theme/ui/Breadcrumbs/index.ts +1 -0
- package/src/client/theme/ui/Footer/footer.css +32 -0
- package/src/client/theme/ui/Head/Head.tsx +69 -0
- package/src/client/theme/ui/Head/index.ts +1 -0
- package/src/client/theme/ui/LanguageSwitcher/LanguageSwitcher.tsx +125 -0
- package/src/client/theme/ui/LanguageSwitcher/index.ts +1 -0
- package/src/client/theme/ui/LanguageSwitcher/language-switcher.css +98 -0
- package/src/client/theme/ui/Layout/Layout.tsx +213 -0
- package/src/client/theme/ui/Layout/base.css +76 -0
- package/src/client/theme/ui/Layout/index.ts +2 -0
- package/src/client/theme/ui/Layout/pagination.css +72 -0
- package/src/client/theme/ui/Layout/responsive.css +40 -0
- package/src/client/theme/ui/Link/Link.tsx +202 -0
- package/src/client/theme/ui/Link/index.ts +2 -0
- package/src/client/theme/ui/Loading/Loading.tsx +10 -0
- package/src/client/theme/ui/Loading/index.ts +1 -0
- package/src/client/theme/ui/Loading/loading.css +30 -0
- package/src/client/theme/ui/Navbar/GithubStars.tsx +27 -0
- package/src/client/theme/ui/Navbar/Navbar.tsx +145 -0
- package/src/client/theme/ui/Navbar/index.ts +2 -0
- package/src/client/theme/ui/Navbar/navbar.css +233 -0
- package/src/client/theme/ui/NotFound/NotFound.tsx +20 -0
- package/src/client/theme/ui/NotFound/index.ts +1 -0
- package/src/client/theme/ui/NotFound/not-found.css +64 -0
- package/src/client/theme/ui/OnThisPage/OnThisPage.tsx +192 -0
- package/src/client/theme/ui/OnThisPage/index.ts +1 -0
- package/src/client/theme/ui/OnThisPage/toc.css +132 -0
- package/src/client/theme/ui/PoweredBy/PoweredBy.tsx +18 -0
- package/src/client/theme/ui/PoweredBy/index.ts +1 -0
- package/src/client/theme/ui/PoweredBy/powered-by.css +76 -0
- package/src/client/theme/ui/SearchDialog/SearchDialog.tsx +199 -0
- package/src/client/theme/ui/SearchDialog/index.ts +1 -0
- package/src/client/theme/ui/SearchDialog/search.css +152 -0
- package/src/client/theme/ui/Sidebar/Sidebar.tsx +200 -0
- package/src/client/theme/ui/Sidebar/index.ts +1 -0
- package/src/client/theme/ui/Sidebar/sidebar.css +269 -0
- package/src/client/theme/ui/ThemeToggle/ThemeToggle.tsx +69 -0
- package/src/client/theme/ui/ThemeToggle/index.ts +1 -0
- package/src/client/theme/ui/VersionSwitcher/VersionSwitcher.tsx +136 -0
- package/src/client/theme/ui/VersionSwitcher/index.ts +1 -0
- package/src/client/utils.ts +26 -0
- package/src/node/cache.ts +94 -0
- package/src/node/cli/commands/config.ts +15 -0
- package/src/node/cli/commands/generate-css.ts +24 -0
- package/src/node/cli/constants.ts +70 -0
- package/src/node/cli/index.ts +22 -0
- package/src/node/config.ts +185 -0
- package/src/node/index.ts +21 -0
- package/src/node/mdx.ts +41 -0
- package/src/node/plugin/entry.ts +58 -0
- package/src/node/plugin/html.ts +55 -0
- package/src/node/plugin/index.ts +190 -0
- package/src/node/plugin/types.ts +11 -0
- package/src/node/routes/cache.ts +24 -0
- package/src/node/routes/index.ts +152 -0
- package/src/node/routes/parser.ts +127 -0
- package/src/node/routes/sorter.ts +42 -0
- package/src/node/routes/types.ts +49 -0
- package/src/node/ssg/index.ts +110 -0
- package/src/node/ssg/meta.ts +34 -0
- package/src/node/ssg/options.ts +13 -0
- package/src/node/ssg/sitemap.ts +54 -0
- package/src/node/utils.ts +134 -0
- package/tsconfig.json +20 -0
- package/tsup.config.ts +22 -0
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
import { B as BoltdocsConfig } from '../config-D2XmHJYe.mjs';
|
|
2
|
+
export { a as BoltdocsThemeConfig } from '../config-D2XmHJYe.mjs';
|
|
3
|
+
import { C as ComponentRoute } from '../index-CRQKWAeo.mjs';
|
|
4
|
+
export { a as CreateBoltdocsAppOptions, c as createBoltdocsApp } from '../index-CRQKWAeo.mjs';
|
|
5
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import 'vite';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The top navigation bar of the documentation site.
|
|
11
|
+
*/
|
|
12
|
+
declare function Navbar({ config, routes, allRoutes, currentLocale, currentVersion, }: {
|
|
13
|
+
config: BoltdocsConfig;
|
|
14
|
+
routes?: ComponentRoute[];
|
|
15
|
+
allRoutes?: ComponentRoute[];
|
|
16
|
+
currentLocale?: string;
|
|
17
|
+
currentVersion?: string;
|
|
18
|
+
}): react_jsx_runtime.JSX.Element;
|
|
19
|
+
|
|
20
|
+
interface RouteItem {
|
|
21
|
+
path: string;
|
|
22
|
+
title: string;
|
|
23
|
+
group?: string;
|
|
24
|
+
groupTitle?: string;
|
|
25
|
+
sidebarPosition?: number;
|
|
26
|
+
badge?: string | {
|
|
27
|
+
text: string;
|
|
28
|
+
expires?: string;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The sidebar navigation component.
|
|
33
|
+
* Groups documentation routes logically based on the `group` property.
|
|
34
|
+
* Highlights the active link based on the current URL path.
|
|
35
|
+
*
|
|
36
|
+
* @param routes - Array of all generated routes to be displayed
|
|
37
|
+
* @param config - Global configuration (which can contain sidebar overrides)
|
|
38
|
+
*/
|
|
39
|
+
declare function Sidebar({ routes, config, onCollapse, }: {
|
|
40
|
+
routes: RouteItem[];
|
|
41
|
+
config: BoltdocsConfig;
|
|
42
|
+
onCollapse?: () => void;
|
|
43
|
+
}): react_jsx_runtime.JSX.Element;
|
|
44
|
+
|
|
45
|
+
interface TocHeading {
|
|
46
|
+
id: string;
|
|
47
|
+
text: string;
|
|
48
|
+
level: number;
|
|
49
|
+
}
|
|
50
|
+
declare function OnThisPage({ headings, editLink, communityHelp, filePath, }: {
|
|
51
|
+
headings?: TocHeading[];
|
|
52
|
+
editLink?: string;
|
|
53
|
+
communityHelp?: string;
|
|
54
|
+
filePath?: string;
|
|
55
|
+
}): react_jsx_runtime.JSX.Element | null;
|
|
56
|
+
|
|
57
|
+
interface HeadProps {
|
|
58
|
+
siteTitle: string;
|
|
59
|
+
siteDescription?: string;
|
|
60
|
+
routes: Array<{
|
|
61
|
+
path: string;
|
|
62
|
+
title: string;
|
|
63
|
+
description?: string;
|
|
64
|
+
}>;
|
|
65
|
+
}
|
|
66
|
+
declare function Head({ siteTitle, siteDescription, routes }: HeadProps): null;
|
|
67
|
+
|
|
68
|
+
interface BreadcrumbsProps {
|
|
69
|
+
routes: ComponentRoute[];
|
|
70
|
+
config: BoltdocsConfig;
|
|
71
|
+
}
|
|
72
|
+
declare function Breadcrumbs({ routes, config }: BreadcrumbsProps): react_jsx_runtime.JSX.Element | null;
|
|
73
|
+
|
|
74
|
+
declare function BackgroundGradient(): react_jsx_runtime.JSX.Element;
|
|
75
|
+
|
|
76
|
+
interface ThemeLayoutProps {
|
|
77
|
+
config: BoltdocsConfig;
|
|
78
|
+
routes: ComponentRoute[];
|
|
79
|
+
children: React.ReactNode;
|
|
80
|
+
/** Custom navbar component (slots) */
|
|
81
|
+
navbar?: React.ReactNode;
|
|
82
|
+
/** Custom sidebar component (slots) */
|
|
83
|
+
sidebar?: React.ReactNode;
|
|
84
|
+
/** Custom table of contents (OnThisPage) component (slots) */
|
|
85
|
+
toc?: React.ReactNode;
|
|
86
|
+
/** Custom background component (slots) */
|
|
87
|
+
background?: React.ReactNode;
|
|
88
|
+
/** Custom head/metadata component (slots) */
|
|
89
|
+
head?: React.ReactNode;
|
|
90
|
+
/** Custom breadcrumbs component (slots) */
|
|
91
|
+
breadcrumbs?: React.ReactNode;
|
|
92
|
+
/** Custom class name for the root layout element */
|
|
93
|
+
className?: string;
|
|
94
|
+
/** Custom styles for the root layout element */
|
|
95
|
+
style?: React.CSSProperties;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* The main structural layout for documentation pages.
|
|
99
|
+
* Integrates the Navbar, Sidebar, and OnThisPage components into a cohesive shell.
|
|
100
|
+
* It also manages mobile interaction states like the sidebar overlay toggle.
|
|
101
|
+
*
|
|
102
|
+
* @param config - The global Boltdocs configuration object
|
|
103
|
+
* @param routes - The array of available doc routes (used to render the sidebar)
|
|
104
|
+
*/
|
|
105
|
+
declare function ThemeLayout({ config, routes, children, navbar, sidebar, toc, background, head, breadcrumbs, className, style, }: ThemeLayoutProps): react_jsx_runtime.JSX.Element;
|
|
106
|
+
|
|
107
|
+
interface PlaygroundProps {
|
|
108
|
+
code?: string;
|
|
109
|
+
children?: string | React.ReactNode;
|
|
110
|
+
scope?: Record<string, any>;
|
|
111
|
+
readonly?: boolean;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* A live React playground component.
|
|
115
|
+
* Features a split layout with a live editor and a preview section.
|
|
116
|
+
*/
|
|
117
|
+
declare function Playground({ code, children, scope, readonly, }: PlaygroundProps): react_jsx_runtime.JSX.Element;
|
|
118
|
+
|
|
119
|
+
declare function NotFound(): react_jsx_runtime.JSX.Element;
|
|
120
|
+
|
|
121
|
+
declare function Loading(): react_jsx_runtime.JSX.Element;
|
|
122
|
+
|
|
123
|
+
interface CodeBlockProps {
|
|
124
|
+
children?: React.ReactNode;
|
|
125
|
+
className?: string;
|
|
126
|
+
[key: string]: any;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* A specialized wrapper for code snippets compiled from MDX blocks.
|
|
130
|
+
* Provides syntax highlighting styling scaffolding and a "Copy to Clipboard" button.
|
|
131
|
+
*/
|
|
132
|
+
declare function CodeBlock({ children, ...props }: CodeBlockProps): react_jsx_runtime.JSX.Element;
|
|
133
|
+
|
|
134
|
+
interface VideoProps {
|
|
135
|
+
/** Video source URL */
|
|
136
|
+
src?: string;
|
|
137
|
+
/** Poster/thumbnail image URL */
|
|
138
|
+
poster?: string;
|
|
139
|
+
/** Alt text for accessibility */
|
|
140
|
+
alt?: string;
|
|
141
|
+
/** Show native video controls (default: true) */
|
|
142
|
+
controls?: boolean;
|
|
143
|
+
/** Preload strategy (default: 'none') */
|
|
144
|
+
preload?: string;
|
|
145
|
+
/** Children (e.g. <source> elements) */
|
|
146
|
+
children?: React.ReactNode;
|
|
147
|
+
/** Allow any additional HTML video attributes */
|
|
148
|
+
[key: string]: any;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Optimized video component with lazy loading via IntersectionObserver.
|
|
152
|
+
* The `<video>` element is only rendered once it enters the viewport,
|
|
153
|
+
* preventing unnecessary network downloads on initial page load.
|
|
154
|
+
*
|
|
155
|
+
* Usage in MDX:
|
|
156
|
+
* ```mdx
|
|
157
|
+
* <video src="/demo.mp4" poster="/demo-thumb.jpg" />
|
|
158
|
+
* ```
|
|
159
|
+
*/
|
|
160
|
+
declare function Video({ src, poster, alt, children, controls, preload, ...rest }: VideoProps): react_jsx_runtime.JSX.Element;
|
|
161
|
+
|
|
162
|
+
type ButtonProps = React.AnchorHTMLAttributes<HTMLAnchorElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
163
|
+
/** Visual variant */
|
|
164
|
+
variant?: "primary" | "secondary" | "outline" | "ghost";
|
|
165
|
+
/** Size */
|
|
166
|
+
size?: "sm" | "md" | "lg";
|
|
167
|
+
/** If provided, renders as a link */
|
|
168
|
+
href?: string;
|
|
169
|
+
children: React.ReactNode;
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* A versatile button/link component for use in MDX pages and the home page.
|
|
173
|
+
*
|
|
174
|
+
* ```mdx
|
|
175
|
+
* <Button variant="primary" href="/docs/getting-started">Get Started →</Button>
|
|
176
|
+
* <Button variant="secondary" href="https://github.com">GitHub</Button>
|
|
177
|
+
* ```
|
|
178
|
+
*/
|
|
179
|
+
declare function Button({ variant, size, href, children, className, ...rest }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
180
|
+
|
|
181
|
+
interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
182
|
+
/** Color variant */
|
|
183
|
+
variant?: "default" | "primary" | "success" | "warning" | "danger" | "info";
|
|
184
|
+
children: React.ReactNode;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Inline badge / pill for labels, statuses, or tags.
|
|
188
|
+
*
|
|
189
|
+
* ```mdx
|
|
190
|
+
* <Badge variant="success">Stable</Badge>
|
|
191
|
+
* <Badge variant="warning">Beta</Badge>
|
|
192
|
+
* ```
|
|
193
|
+
*/
|
|
194
|
+
declare function Badge({ variant, children, className, ...rest }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
195
|
+
|
|
196
|
+
interface CardsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
197
|
+
/** Number of columns (defaults to 3) */
|
|
198
|
+
cols?: 1 | 2 | 3 | 4;
|
|
199
|
+
children: React.ReactNode;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Grid wrapper for `<Card>` components.
|
|
203
|
+
*
|
|
204
|
+
* ```mdx
|
|
205
|
+
* <Cards cols={3}>
|
|
206
|
+
* <Card title="Fast" icon="⚡">Instant HMR.</Card>
|
|
207
|
+
* <Card title="Simple" icon="📁">File-system routing.</Card>
|
|
208
|
+
* </Cards>
|
|
209
|
+
* ```
|
|
210
|
+
*/
|
|
211
|
+
declare function Cards({ cols, children, className, ...rest }: CardsProps): react_jsx_runtime.JSX.Element;
|
|
212
|
+
interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
213
|
+
/** Card heading */
|
|
214
|
+
title?: string;
|
|
215
|
+
/** Emoji or icon string displayed above the title */
|
|
216
|
+
icon?: React.ReactNode;
|
|
217
|
+
/** If provided, the entire card becomes a link */
|
|
218
|
+
href?: string;
|
|
219
|
+
children?: React.ReactNode;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Individual feature/info card.
|
|
223
|
+
*/
|
|
224
|
+
declare function Card({ title, icon, href, children, className, ...rest }: CardProps): react_jsx_runtime.JSX.Element;
|
|
225
|
+
|
|
226
|
+
interface TabProps {
|
|
227
|
+
/** The label shown in the tab bar */
|
|
228
|
+
label: string;
|
|
229
|
+
children: React.ReactNode;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* A single tab panel. Must be used inside `<Tabs>`.
|
|
233
|
+
*
|
|
234
|
+
* ```mdx
|
|
235
|
+
* <Tab label="npm">npm install boltdocs</Tab>
|
|
236
|
+
* ```
|
|
237
|
+
*/
|
|
238
|
+
declare function Tab({ children }: TabProps): react_jsx_runtime.JSX.Element;
|
|
239
|
+
interface TabsProps {
|
|
240
|
+
/** Which tab index is initially active (0-based, default 0) */
|
|
241
|
+
defaultIndex?: number;
|
|
242
|
+
children: React.ReactNode;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Tab container that manages active state.
|
|
246
|
+
*
|
|
247
|
+
* ```mdx
|
|
248
|
+
* <Tabs>
|
|
249
|
+
* <Tab label="npm">npm install boltdocs</Tab>
|
|
250
|
+
* <Tab label="pnpm">pnpm add boltdocs</Tab>
|
|
251
|
+
* <Tab label="yarn">yarn add boltdocs</Tab>
|
|
252
|
+
* </Tabs>
|
|
253
|
+
* ```
|
|
254
|
+
*/
|
|
255
|
+
declare function Tabs({ defaultIndex, children }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
256
|
+
|
|
257
|
+
interface AdmonitionProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
258
|
+
/** Admonition type — controls color and icon */
|
|
259
|
+
type?: "note" | "tip" | "info" | "warning" | "danger";
|
|
260
|
+
/** Override the default title */
|
|
261
|
+
title?: string;
|
|
262
|
+
children: React.ReactNode;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Callout / admonition box for notes, warnings, etc.
|
|
266
|
+
*
|
|
267
|
+
* ```mdx
|
|
268
|
+
* <Admonition type="warning" title="Breaking Change">
|
|
269
|
+
* This API has changed in v2.
|
|
270
|
+
* </Admonition>
|
|
271
|
+
* ```
|
|
272
|
+
*/
|
|
273
|
+
declare function Admonition({ type, title, children, className, ...rest }: AdmonitionProps): react_jsx_runtime.JSX.Element;
|
|
274
|
+
declare const Note: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
|
|
275
|
+
declare const Tip: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
|
|
276
|
+
declare const Warning: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
|
|
277
|
+
declare const Danger: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
|
|
278
|
+
declare const InfoBox: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
|
|
279
|
+
|
|
280
|
+
interface ListProps extends React.HTMLAttributes<HTMLUListElement> {
|
|
281
|
+
/** Visual variant */
|
|
282
|
+
variant?: "checked" | "arrow" | "default";
|
|
283
|
+
children: React.ReactNode;
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Enhanced list component with icon variants.
|
|
287
|
+
*
|
|
288
|
+
* ```mdx
|
|
289
|
+
* <List variant="checked">
|
|
290
|
+
* <li>File-system routing</li>
|
|
291
|
+
* <li>MDX support</li>
|
|
292
|
+
* <li>Syntax highlighting</li>
|
|
293
|
+
* </List>
|
|
294
|
+
* ```
|
|
295
|
+
*/
|
|
296
|
+
declare function List({ variant, children, className, ...rest }: ListProps): react_jsx_runtime.JSX.Element;
|
|
297
|
+
|
|
298
|
+
export { Admonition, type AdmonitionProps, BackgroundGradient, Badge, type BadgeProps, BoltdocsConfig, Breadcrumbs, Button, type ButtonProps, Card, type CardProps, Cards, type CardsProps, CodeBlock, ComponentRoute, Danger, Head, InfoBox, List, type ListProps, Loading, Navbar, NotFound, Note, OnThisPage, Playground, Sidebar, Tab, type TabProps, Tabs, type TabsProps, ThemeLayout, Tip, Video, Warning };
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
import { B as BoltdocsConfig } from '../config-D2XmHJYe.js';
|
|
2
|
+
export { a as BoltdocsThemeConfig } from '../config-D2XmHJYe.js';
|
|
3
|
+
import { C as ComponentRoute } from '../index-CRQKWAeo.js';
|
|
4
|
+
export { a as CreateBoltdocsAppOptions, c as createBoltdocsApp } from '../index-CRQKWAeo.js';
|
|
5
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import 'vite';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The top navigation bar of the documentation site.
|
|
11
|
+
*/
|
|
12
|
+
declare function Navbar({ config, routes, allRoutes, currentLocale, currentVersion, }: {
|
|
13
|
+
config: BoltdocsConfig;
|
|
14
|
+
routes?: ComponentRoute[];
|
|
15
|
+
allRoutes?: ComponentRoute[];
|
|
16
|
+
currentLocale?: string;
|
|
17
|
+
currentVersion?: string;
|
|
18
|
+
}): react_jsx_runtime.JSX.Element;
|
|
19
|
+
|
|
20
|
+
interface RouteItem {
|
|
21
|
+
path: string;
|
|
22
|
+
title: string;
|
|
23
|
+
group?: string;
|
|
24
|
+
groupTitle?: string;
|
|
25
|
+
sidebarPosition?: number;
|
|
26
|
+
badge?: string | {
|
|
27
|
+
text: string;
|
|
28
|
+
expires?: string;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The sidebar navigation component.
|
|
33
|
+
* Groups documentation routes logically based on the `group` property.
|
|
34
|
+
* Highlights the active link based on the current URL path.
|
|
35
|
+
*
|
|
36
|
+
* @param routes - Array of all generated routes to be displayed
|
|
37
|
+
* @param config - Global configuration (which can contain sidebar overrides)
|
|
38
|
+
*/
|
|
39
|
+
declare function Sidebar({ routes, config, onCollapse, }: {
|
|
40
|
+
routes: RouteItem[];
|
|
41
|
+
config: BoltdocsConfig;
|
|
42
|
+
onCollapse?: () => void;
|
|
43
|
+
}): react_jsx_runtime.JSX.Element;
|
|
44
|
+
|
|
45
|
+
interface TocHeading {
|
|
46
|
+
id: string;
|
|
47
|
+
text: string;
|
|
48
|
+
level: number;
|
|
49
|
+
}
|
|
50
|
+
declare function OnThisPage({ headings, editLink, communityHelp, filePath, }: {
|
|
51
|
+
headings?: TocHeading[];
|
|
52
|
+
editLink?: string;
|
|
53
|
+
communityHelp?: string;
|
|
54
|
+
filePath?: string;
|
|
55
|
+
}): react_jsx_runtime.JSX.Element | null;
|
|
56
|
+
|
|
57
|
+
interface HeadProps {
|
|
58
|
+
siteTitle: string;
|
|
59
|
+
siteDescription?: string;
|
|
60
|
+
routes: Array<{
|
|
61
|
+
path: string;
|
|
62
|
+
title: string;
|
|
63
|
+
description?: string;
|
|
64
|
+
}>;
|
|
65
|
+
}
|
|
66
|
+
declare function Head({ siteTitle, siteDescription, routes }: HeadProps): null;
|
|
67
|
+
|
|
68
|
+
interface BreadcrumbsProps {
|
|
69
|
+
routes: ComponentRoute[];
|
|
70
|
+
config: BoltdocsConfig;
|
|
71
|
+
}
|
|
72
|
+
declare function Breadcrumbs({ routes, config }: BreadcrumbsProps): react_jsx_runtime.JSX.Element | null;
|
|
73
|
+
|
|
74
|
+
declare function BackgroundGradient(): react_jsx_runtime.JSX.Element;
|
|
75
|
+
|
|
76
|
+
interface ThemeLayoutProps {
|
|
77
|
+
config: BoltdocsConfig;
|
|
78
|
+
routes: ComponentRoute[];
|
|
79
|
+
children: React.ReactNode;
|
|
80
|
+
/** Custom navbar component (slots) */
|
|
81
|
+
navbar?: React.ReactNode;
|
|
82
|
+
/** Custom sidebar component (slots) */
|
|
83
|
+
sidebar?: React.ReactNode;
|
|
84
|
+
/** Custom table of contents (OnThisPage) component (slots) */
|
|
85
|
+
toc?: React.ReactNode;
|
|
86
|
+
/** Custom background component (slots) */
|
|
87
|
+
background?: React.ReactNode;
|
|
88
|
+
/** Custom head/metadata component (slots) */
|
|
89
|
+
head?: React.ReactNode;
|
|
90
|
+
/** Custom breadcrumbs component (slots) */
|
|
91
|
+
breadcrumbs?: React.ReactNode;
|
|
92
|
+
/** Custom class name for the root layout element */
|
|
93
|
+
className?: string;
|
|
94
|
+
/** Custom styles for the root layout element */
|
|
95
|
+
style?: React.CSSProperties;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* The main structural layout for documentation pages.
|
|
99
|
+
* Integrates the Navbar, Sidebar, and OnThisPage components into a cohesive shell.
|
|
100
|
+
* It also manages mobile interaction states like the sidebar overlay toggle.
|
|
101
|
+
*
|
|
102
|
+
* @param config - The global Boltdocs configuration object
|
|
103
|
+
* @param routes - The array of available doc routes (used to render the sidebar)
|
|
104
|
+
*/
|
|
105
|
+
declare function ThemeLayout({ config, routes, children, navbar, sidebar, toc, background, head, breadcrumbs, className, style, }: ThemeLayoutProps): react_jsx_runtime.JSX.Element;
|
|
106
|
+
|
|
107
|
+
interface PlaygroundProps {
|
|
108
|
+
code?: string;
|
|
109
|
+
children?: string | React.ReactNode;
|
|
110
|
+
scope?: Record<string, any>;
|
|
111
|
+
readonly?: boolean;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* A live React playground component.
|
|
115
|
+
* Features a split layout with a live editor and a preview section.
|
|
116
|
+
*/
|
|
117
|
+
declare function Playground({ code, children, scope, readonly, }: PlaygroundProps): react_jsx_runtime.JSX.Element;
|
|
118
|
+
|
|
119
|
+
declare function NotFound(): react_jsx_runtime.JSX.Element;
|
|
120
|
+
|
|
121
|
+
declare function Loading(): react_jsx_runtime.JSX.Element;
|
|
122
|
+
|
|
123
|
+
interface CodeBlockProps {
|
|
124
|
+
children?: React.ReactNode;
|
|
125
|
+
className?: string;
|
|
126
|
+
[key: string]: any;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* A specialized wrapper for code snippets compiled from MDX blocks.
|
|
130
|
+
* Provides syntax highlighting styling scaffolding and a "Copy to Clipboard" button.
|
|
131
|
+
*/
|
|
132
|
+
declare function CodeBlock({ children, ...props }: CodeBlockProps): react_jsx_runtime.JSX.Element;
|
|
133
|
+
|
|
134
|
+
interface VideoProps {
|
|
135
|
+
/** Video source URL */
|
|
136
|
+
src?: string;
|
|
137
|
+
/** Poster/thumbnail image URL */
|
|
138
|
+
poster?: string;
|
|
139
|
+
/** Alt text for accessibility */
|
|
140
|
+
alt?: string;
|
|
141
|
+
/** Show native video controls (default: true) */
|
|
142
|
+
controls?: boolean;
|
|
143
|
+
/** Preload strategy (default: 'none') */
|
|
144
|
+
preload?: string;
|
|
145
|
+
/** Children (e.g. <source> elements) */
|
|
146
|
+
children?: React.ReactNode;
|
|
147
|
+
/** Allow any additional HTML video attributes */
|
|
148
|
+
[key: string]: any;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Optimized video component with lazy loading via IntersectionObserver.
|
|
152
|
+
* The `<video>` element is only rendered once it enters the viewport,
|
|
153
|
+
* preventing unnecessary network downloads on initial page load.
|
|
154
|
+
*
|
|
155
|
+
* Usage in MDX:
|
|
156
|
+
* ```mdx
|
|
157
|
+
* <video src="/demo.mp4" poster="/demo-thumb.jpg" />
|
|
158
|
+
* ```
|
|
159
|
+
*/
|
|
160
|
+
declare function Video({ src, poster, alt, children, controls, preload, ...rest }: VideoProps): react_jsx_runtime.JSX.Element;
|
|
161
|
+
|
|
162
|
+
type ButtonProps = React.AnchorHTMLAttributes<HTMLAnchorElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
163
|
+
/** Visual variant */
|
|
164
|
+
variant?: "primary" | "secondary" | "outline" | "ghost";
|
|
165
|
+
/** Size */
|
|
166
|
+
size?: "sm" | "md" | "lg";
|
|
167
|
+
/** If provided, renders as a link */
|
|
168
|
+
href?: string;
|
|
169
|
+
children: React.ReactNode;
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* A versatile button/link component for use in MDX pages and the home page.
|
|
173
|
+
*
|
|
174
|
+
* ```mdx
|
|
175
|
+
* <Button variant="primary" href="/docs/getting-started">Get Started →</Button>
|
|
176
|
+
* <Button variant="secondary" href="https://github.com">GitHub</Button>
|
|
177
|
+
* ```
|
|
178
|
+
*/
|
|
179
|
+
declare function Button({ variant, size, href, children, className, ...rest }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
180
|
+
|
|
181
|
+
interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
182
|
+
/** Color variant */
|
|
183
|
+
variant?: "default" | "primary" | "success" | "warning" | "danger" | "info";
|
|
184
|
+
children: React.ReactNode;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Inline badge / pill for labels, statuses, or tags.
|
|
188
|
+
*
|
|
189
|
+
* ```mdx
|
|
190
|
+
* <Badge variant="success">Stable</Badge>
|
|
191
|
+
* <Badge variant="warning">Beta</Badge>
|
|
192
|
+
* ```
|
|
193
|
+
*/
|
|
194
|
+
declare function Badge({ variant, children, className, ...rest }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
195
|
+
|
|
196
|
+
interface CardsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
197
|
+
/** Number of columns (defaults to 3) */
|
|
198
|
+
cols?: 1 | 2 | 3 | 4;
|
|
199
|
+
children: React.ReactNode;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Grid wrapper for `<Card>` components.
|
|
203
|
+
*
|
|
204
|
+
* ```mdx
|
|
205
|
+
* <Cards cols={3}>
|
|
206
|
+
* <Card title="Fast" icon="⚡">Instant HMR.</Card>
|
|
207
|
+
* <Card title="Simple" icon="📁">File-system routing.</Card>
|
|
208
|
+
* </Cards>
|
|
209
|
+
* ```
|
|
210
|
+
*/
|
|
211
|
+
declare function Cards({ cols, children, className, ...rest }: CardsProps): react_jsx_runtime.JSX.Element;
|
|
212
|
+
interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
213
|
+
/** Card heading */
|
|
214
|
+
title?: string;
|
|
215
|
+
/** Emoji or icon string displayed above the title */
|
|
216
|
+
icon?: React.ReactNode;
|
|
217
|
+
/** If provided, the entire card becomes a link */
|
|
218
|
+
href?: string;
|
|
219
|
+
children?: React.ReactNode;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Individual feature/info card.
|
|
223
|
+
*/
|
|
224
|
+
declare function Card({ title, icon, href, children, className, ...rest }: CardProps): react_jsx_runtime.JSX.Element;
|
|
225
|
+
|
|
226
|
+
interface TabProps {
|
|
227
|
+
/** The label shown in the tab bar */
|
|
228
|
+
label: string;
|
|
229
|
+
children: React.ReactNode;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* A single tab panel. Must be used inside `<Tabs>`.
|
|
233
|
+
*
|
|
234
|
+
* ```mdx
|
|
235
|
+
* <Tab label="npm">npm install boltdocs</Tab>
|
|
236
|
+
* ```
|
|
237
|
+
*/
|
|
238
|
+
declare function Tab({ children }: TabProps): react_jsx_runtime.JSX.Element;
|
|
239
|
+
interface TabsProps {
|
|
240
|
+
/** Which tab index is initially active (0-based, default 0) */
|
|
241
|
+
defaultIndex?: number;
|
|
242
|
+
children: React.ReactNode;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Tab container that manages active state.
|
|
246
|
+
*
|
|
247
|
+
* ```mdx
|
|
248
|
+
* <Tabs>
|
|
249
|
+
* <Tab label="npm">npm install boltdocs</Tab>
|
|
250
|
+
* <Tab label="pnpm">pnpm add boltdocs</Tab>
|
|
251
|
+
* <Tab label="yarn">yarn add boltdocs</Tab>
|
|
252
|
+
* </Tabs>
|
|
253
|
+
* ```
|
|
254
|
+
*/
|
|
255
|
+
declare function Tabs({ defaultIndex, children }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
256
|
+
|
|
257
|
+
interface AdmonitionProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
258
|
+
/** Admonition type — controls color and icon */
|
|
259
|
+
type?: "note" | "tip" | "info" | "warning" | "danger";
|
|
260
|
+
/** Override the default title */
|
|
261
|
+
title?: string;
|
|
262
|
+
children: React.ReactNode;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Callout / admonition box for notes, warnings, etc.
|
|
266
|
+
*
|
|
267
|
+
* ```mdx
|
|
268
|
+
* <Admonition type="warning" title="Breaking Change">
|
|
269
|
+
* This API has changed in v2.
|
|
270
|
+
* </Admonition>
|
|
271
|
+
* ```
|
|
272
|
+
*/
|
|
273
|
+
declare function Admonition({ type, title, children, className, ...rest }: AdmonitionProps): react_jsx_runtime.JSX.Element;
|
|
274
|
+
declare const Note: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
|
|
275
|
+
declare const Tip: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
|
|
276
|
+
declare const Warning: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
|
|
277
|
+
declare const Danger: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
|
|
278
|
+
declare const InfoBox: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
|
|
279
|
+
|
|
280
|
+
interface ListProps extends React.HTMLAttributes<HTMLUListElement> {
|
|
281
|
+
/** Visual variant */
|
|
282
|
+
variant?: "checked" | "arrow" | "default";
|
|
283
|
+
children: React.ReactNode;
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Enhanced list component with icon variants.
|
|
287
|
+
*
|
|
288
|
+
* ```mdx
|
|
289
|
+
* <List variant="checked">
|
|
290
|
+
* <li>File-system routing</li>
|
|
291
|
+
* <li>MDX support</li>
|
|
292
|
+
* <li>Syntax highlighting</li>
|
|
293
|
+
* </List>
|
|
294
|
+
* ```
|
|
295
|
+
*/
|
|
296
|
+
declare function List({ variant, children, className, ...rest }: ListProps): react_jsx_runtime.JSX.Element;
|
|
297
|
+
|
|
298
|
+
export { Admonition, type AdmonitionProps, BackgroundGradient, Badge, type BadgeProps, BoltdocsConfig, Breadcrumbs, Button, type ButtonProps, Card, type CardProps, Cards, type CardsProps, CodeBlock, ComponentRoute, Danger, Head, InfoBox, List, type ListProps, Loading, Navbar, NotFound, Note, OnThisPage, Playground, Sidebar, Tab, type TabProps, Tabs, type TabsProps, ThemeLayout, Tip, Video, Warning };
|