boltdocs 2.4.1 → 2.5.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/CHANGELOG.md +16 -0
- package/dist/cache-3FOEPC2P.mjs +1 -0
- package/dist/chunk-ITFGVXPE.mjs +1 -0
- package/dist/chunk-TP5KMRD3.mjs +1 -0
- package/dist/chunk-UD2LQG2M.mjs +75 -0
- package/dist/chunk-Y4RE5KI7.mjs +1 -0
- package/dist/client/index.d.mts +1225 -14
- package/dist/client/index.d.ts +1225 -14
- package/dist/client/index.js +1 -1
- package/dist/client/index.mjs +1 -1
- package/dist/client/ssr.js +1 -1
- package/dist/client/ssr.mjs +1 -1
- package/dist/node/cli-entry.js +37 -35
- package/dist/node/cli-entry.mjs +1 -1
- package/dist/node/index.d.mts +263 -1
- package/dist/node/index.d.ts +263 -1
- package/dist/node/index.js +34 -32
- package/dist/node/index.mjs +1 -1
- package/dist/package-TWC3BMZ7.mjs +1 -0
- package/dist/search-dialog-YBM4GYDR.mjs +1 -0
- package/package.json +46 -76
- package/src/client/components/primitives/breadcrumbs.tsx +10 -10
- package/src/client/components/primitives/index.ts +17 -16
- package/src/client/components/primitives/menu.tsx +11 -14
- package/src/client/components/primitives/navbar.tsx +29 -29
- package/src/client/components/primitives/navigation-menu.tsx +7 -9
- package/src/client/components/primitives/on-this-page.tsx +16 -18
- package/src/client/components/primitives/page-nav.tsx +10 -13
- package/src/client/components/primitives/search-dialog.tsx +17 -19
- package/src/client/components/primitives/sidebar.tsx +8 -10
- package/src/client/components/primitives/tabs.tsx +10 -12
- package/src/client/components/primitives/tooltip.tsx +3 -5
- package/src/client/components/ui-base/breadcrumbs.tsx +12 -15
- package/src/client/components/ui-base/copy-markdown.tsx +8 -10
- package/src/client/components/ui-base/navbar.tsx +10 -10
- package/src/client/components/ui-base/on-this-page.tsx +13 -12
- package/src/client/components/ui-base/page-nav.tsx +15 -15
- package/src/client/components/ui-base/search-dialog.tsx +13 -20
- package/src/client/components/ui-base/sidebar.tsx +9 -9
- package/src/client/components/ui-base/tabs.tsx +6 -7
- package/src/client/components/ui-base/theme-toggle.tsx +11 -11
- package/src/client/hooks/index.ts +12 -12
- package/src/client/index.ts +34 -11
- package/src/node/config.ts +48 -6
- package/src/node/errors.ts +44 -0
- package/src/node/index.ts +29 -2
- package/src/node/mdx/index.ts +9 -2
- package/src/node/plugin/index.ts +72 -4
- package/src/node/plugins/index.ts +17 -0
- package/src/node/plugins/plugin-errors.ts +62 -0
- package/src/node/plugins/plugin-lifecycle.ts +117 -0
- package/src/node/plugins/plugin-sandbox.ts +59 -0
- package/src/node/plugins/plugin-store.ts +54 -0
- package/src/node/plugins/plugin-types.ts +107 -0
- package/src/node/plugins/plugin-validator.ts +105 -0
- package/src/node/routes/parser.ts +35 -5
- package/src/node/schema/config.ts +208 -0
- package/src/node/schema/frontmatter.ts +17 -0
- package/src/node/security/constants/index.ts +10 -0
- package/src/node/security/csp.ts +31 -0
- package/src/node/security/headers.ts +27 -0
- package/src/node/utils.ts +153 -5
- package/tsup.config.ts +0 -6
- package/dist/base-ui/index.d.mts +0 -25
- package/dist/base-ui/index.d.ts +0 -25
- package/dist/base-ui/index.js +0 -1
- package/dist/base-ui/index.mjs +0 -1
- package/dist/cache-P6WK424C.mjs +0 -1
- package/dist/chunk-2DI3OGHV.mjs +0 -1
- package/dist/chunk-2Z5T6EAU.mjs +0 -1
- package/dist/chunk-64AJ5QLT.mjs +0 -1
- package/dist/chunk-DDX52BX4.mjs +0 -1
- package/dist/chunk-HRZDSFR5.mjs +0 -1
- package/dist/chunk-JD3RSDE4.mjs +0 -1
- package/dist/chunk-JZXLCA2E.mjs +0 -1
- package/dist/chunk-NBCYHLAA.mjs +0 -1
- package/dist/chunk-PPVDMDEL.mjs +0 -1
- package/dist/chunk-T3W44KWY.mjs +0 -1
- package/dist/chunk-UBE4CKOA.mjs +0 -1
- package/dist/chunk-UWT4AJTH.mjs +0 -73
- package/dist/chunk-WWJ7WKDI.mjs +0 -1
- package/dist/chunk-Y4RRHPXC.mjs +0 -1
- package/dist/client/types.d.mts +0 -3
- package/dist/client/types.d.ts +0 -3
- package/dist/client/types.js +0 -1
- package/dist/client/types.mjs +0 -0
- package/dist/copy-markdown--9yjpbyy.d.mts +0 -15
- package/dist/copy-markdown-l2MYkcG7.d.ts +0 -15
- package/dist/hooks/index.d.mts +0 -137
- package/dist/hooks/index.d.ts +0 -137
- package/dist/hooks/index.js +0 -1
- package/dist/hooks/index.mjs +0 -1
- package/dist/integrations/index.d.mts +0 -48
- package/dist/integrations/index.d.ts +0 -48
- package/dist/integrations/index.js +0 -1
- package/dist/integrations/index.mjs +0 -1
- package/dist/link-DfBwCeZc.d.mts +0 -68
- package/dist/link-DfBwCeZc.d.ts +0 -68
- package/dist/loading-BwUos0wZ.d.mts +0 -57
- package/dist/loading-nlnUD01v.d.ts +0 -57
- package/dist/mdx/index.d.mts +0 -178
- package/dist/mdx/index.d.ts +0 -178
- package/dist/mdx/index.js +0 -1
- package/dist/mdx/index.mjs +0 -1
- package/dist/primitives/index.d.mts +0 -292
- package/dist/primitives/index.d.ts +0 -292
- package/dist/primitives/index.js +0 -1
- package/dist/primitives/index.mjs +0 -1
- package/dist/search-dialog-OONKKC5H.mjs +0 -1
- package/dist/types-opDA2E9-.d.mts +0 -394
- package/dist/types-opDA2E9-.d.ts +0 -394
- package/dist/use-routes-DNwgTRpU.d.ts +0 -29
- package/dist/use-routes-DrT80Eom.d.mts +0 -29
package/dist/client/index.d.mts
CHANGED
|
@@ -1,17 +1,477 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import * as vite from 'vite';
|
|
2
|
+
import { Plugin } from 'vite';
|
|
3
|
+
import * as React$1 from 'react';
|
|
4
|
+
import React__default, { Component, ReactNode, ErrorInfo, ComponentPropsWithoutRef, ImgHTMLAttributes, RefObject } from 'react';
|
|
5
|
+
import * as react_router_dom from 'react-router-dom';
|
|
6
|
+
import { LinkProps as LinkProps$2 } from 'react-router-dom';
|
|
4
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
9
|
+
import * as RAC from 'react-aria-components';
|
|
10
|
+
import { LinkProps as LinkProps$3 } from 'react-aria-components';
|
|
11
|
+
import { VariantProps } from 'class-variance-authority';
|
|
12
|
+
import { ClassValue } from 'clsx';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Permissions that a plugin can request to access specific Boltdocs capabilities.
|
|
16
|
+
*/
|
|
17
|
+
type PluginPermission = 'fs:read' | 'fs:write' | 'vite:config' | 'mdx:remark' | 'mdx:rehype' | 'components' | 'hooks:build' | 'hooks:dev';
|
|
18
|
+
/**
|
|
19
|
+
* Shared context injected into every plugin lifecycle hook.
|
|
20
|
+
*/
|
|
21
|
+
interface PluginContext {
|
|
22
|
+
/** The full, resolved Boltdocs configuration (Readonly) */
|
|
23
|
+
readonly config: BoltdocsConfig;
|
|
24
|
+
/** A plugin-specific logger */
|
|
25
|
+
readonly logger: PluginLogger;
|
|
26
|
+
/** A shared store for dependency injection and state sharing between plugins */
|
|
27
|
+
readonly store: PluginStore;
|
|
28
|
+
/** Metadata about the current plugin */
|
|
29
|
+
readonly meta: PluginMeta;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Simple logger interface for plugins.
|
|
33
|
+
*/
|
|
34
|
+
interface PluginLogger {
|
|
35
|
+
info(message: string): void;
|
|
36
|
+
warn(message: string): void;
|
|
37
|
+
error(message: string | Error): void;
|
|
38
|
+
debug(message: string): void;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* A shared key-value store that allows plugins to share state and configuration.
|
|
42
|
+
*/
|
|
43
|
+
interface PluginStore {
|
|
44
|
+
/** Get a value from the store. Keys are namespaced by plugin internally. */
|
|
45
|
+
get<T = unknown>(pluginName: string, key: string): T | undefined;
|
|
46
|
+
/** Set a value in the store. */
|
|
47
|
+
set(pluginName: string, key: string, value: unknown): void;
|
|
48
|
+
/** Check if a key exists in the store. */
|
|
49
|
+
has(pluginName: string, key: string): boolean;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Metadata for a plugin, used for identification and compatibility checks.
|
|
53
|
+
*/
|
|
54
|
+
interface PluginMeta {
|
|
55
|
+
/** Unique identifier for the plugin */
|
|
56
|
+
name: string;
|
|
57
|
+
/** Version of the plugin itself (semver) */
|
|
58
|
+
version?: string;
|
|
59
|
+
/** Minimum required version of Boltdocs (semver range) */
|
|
60
|
+
boltdocsVersion?: string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Lifecycle hooks that a plugin can implement to hook into the build and dev processes.
|
|
64
|
+
*/
|
|
65
|
+
interface PluginLifecycleHooks {
|
|
66
|
+
/** Called before the build process starts */
|
|
67
|
+
beforeBuild?: (ctx: PluginContext) => Promise<void> | void;
|
|
68
|
+
/** Called after the build process finishes successfully */
|
|
69
|
+
afterBuild?: (ctx: PluginContext) => Promise<void> | void;
|
|
70
|
+
/** Called before the dev server starts */
|
|
71
|
+
beforeDev?: (ctx: PluginContext) => Promise<void> | void;
|
|
72
|
+
/** Called after the dev server is ready (configureServer) */
|
|
73
|
+
afterDev?: (ctx: PluginContext) => Promise<void> | void;
|
|
74
|
+
/** Called when the final Boltdocs config is resolved */
|
|
75
|
+
configResolved?: (ctx: PluginContext, config: BoltdocsConfig) => void;
|
|
76
|
+
/** Called when the build is closing */
|
|
77
|
+
buildEnd?: (ctx: PluginContext) => Promise<void> | void;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Represents a single social link in the configuration.
|
|
82
|
+
*/
|
|
83
|
+
interface BoltdocsSocialLink {
|
|
84
|
+
/** Identifier for the icon (e.g., 'github') */
|
|
85
|
+
icon: 'discord' | 'x' | 'github' | 'bluesky' | string;
|
|
86
|
+
/** The URL the social link points to */
|
|
87
|
+
link: string;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Configuration for the site footer.
|
|
91
|
+
*/
|
|
92
|
+
interface BoltdocsFooterConfig {
|
|
93
|
+
/** Text to display in the footer (HTML is supported) */
|
|
94
|
+
text?: string;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Theme-specific configuration options governing the appearance and navigation of the site.
|
|
98
|
+
*/
|
|
99
|
+
interface BoltdocsThemeConfig {
|
|
100
|
+
/** The global title of the documentation site (can be translated) */
|
|
101
|
+
title?: string | Record<string, string>;
|
|
102
|
+
/** The global description of the site (can be translated) */
|
|
103
|
+
description?: string | Record<string, string>;
|
|
104
|
+
/** URL path to the site logo or an object for light/dark versions */
|
|
105
|
+
logo?: string | {
|
|
106
|
+
dark: string;
|
|
107
|
+
light: string;
|
|
108
|
+
alt?: string;
|
|
109
|
+
width?: number;
|
|
110
|
+
height?: number;
|
|
111
|
+
};
|
|
112
|
+
/** Items to display in the top navigation bar */
|
|
113
|
+
navbar?: Array<{
|
|
114
|
+
/** Text to display (can be a string or a map of translations) */
|
|
115
|
+
label: string | Record<string, string>;
|
|
116
|
+
/** URL path or external link */
|
|
117
|
+
href: string;
|
|
118
|
+
}>;
|
|
119
|
+
/** Items to display in the sidebar, organized optionally by group URLs */
|
|
120
|
+
sidebar?: Record<string, Array<{
|
|
121
|
+
text: string;
|
|
122
|
+
link: string;
|
|
123
|
+
}>>;
|
|
124
|
+
/** Social links to display in the navigation bar */
|
|
125
|
+
socialLinks?: BoltdocsSocialLink[];
|
|
126
|
+
/** Site footer configuration */
|
|
127
|
+
footer?: BoltdocsFooterConfig;
|
|
128
|
+
/** Whether to show breadcrumbs navigation (default: true) */
|
|
129
|
+
breadcrumbs?: boolean;
|
|
130
|
+
/** URL template for 'Edit this page'. Use :path as a placeholder. */
|
|
131
|
+
editLink?: string;
|
|
132
|
+
/** URL for the 'Community help' link. */
|
|
133
|
+
communityHelp?: string;
|
|
134
|
+
/** The current version of the project (e.g., 'v2.8.9'). Displayed in the Navbar. */
|
|
135
|
+
version?: string;
|
|
136
|
+
/** The GitHub repository in the format 'owner/repo' to fetch and display star count. */
|
|
137
|
+
githubRepo?: string;
|
|
138
|
+
/**
|
|
139
|
+
* URL path to the site favicon.
|
|
140
|
+
* If not specified, the logo will be used if available.
|
|
141
|
+
*/
|
|
142
|
+
favicon?: string;
|
|
143
|
+
/**
|
|
144
|
+
* The Open Graph image URL to display when the site is shared on social media.
|
|
145
|
+
*/
|
|
146
|
+
ogImage?: string;
|
|
147
|
+
/** Whether to show the 'Powered by LiteDocs' badge in the sidebar (default: true) */
|
|
148
|
+
poweredBy?: boolean;
|
|
149
|
+
/**
|
|
150
|
+
* Top-level tabs for organizing documentation groups.
|
|
151
|
+
* Tab discovery uses the (tab-id) directory syntax.
|
|
152
|
+
*/
|
|
153
|
+
tabs?: Array<{
|
|
154
|
+
id: string;
|
|
155
|
+
/** Text to display (can be a string or a map of translations) */
|
|
156
|
+
text: string | Record<string, string>;
|
|
157
|
+
icon?: string;
|
|
158
|
+
}>;
|
|
159
|
+
/**
|
|
160
|
+
* The syntax highlighting theme for code blocks.
|
|
161
|
+
* Supports any Shiki theme name (e.g., 'github-dark', 'one-dark-pro', 'aurora-x').
|
|
162
|
+
* Can also be an object for multiple themes (e.g., { light: 'github-light', dark: 'github-dark' }).
|
|
163
|
+
* Default: { light: 'github-light', dark: 'one-dark-pro' }
|
|
164
|
+
*/
|
|
165
|
+
codeTheme?: string | {
|
|
166
|
+
light: string;
|
|
167
|
+
dark: string;
|
|
168
|
+
};
|
|
169
|
+
/**
|
|
170
|
+
* Configuration for the 'Copy Markdown' button.
|
|
171
|
+
* Can be a boolean or an object with text and icon.
|
|
172
|
+
* Default: true
|
|
173
|
+
*/
|
|
174
|
+
copyMarkdown?: boolean | {
|
|
175
|
+
text?: string;
|
|
176
|
+
icon?: string;
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Configuration for the robots.txt file.
|
|
181
|
+
*/
|
|
182
|
+
type BoltdocsRobotsConfig = string | {
|
|
183
|
+
/** User-agent rules */
|
|
184
|
+
rules?: Array<{
|
|
185
|
+
userAgent: string;
|
|
186
|
+
/** Paths allowed to be crawled */
|
|
187
|
+
allow?: string | string[];
|
|
188
|
+
/** Paths disallowed to be crawled */
|
|
189
|
+
disallow?: string | string[];
|
|
190
|
+
}>;
|
|
191
|
+
/** Sitemaps to include in the robots.txt */
|
|
192
|
+
sitemaps?: string[];
|
|
193
|
+
};
|
|
194
|
+
/**
|
|
195
|
+
* Configuration for a specific locale.
|
|
196
|
+
*/
|
|
197
|
+
interface BoltdocsLocaleConfig {
|
|
198
|
+
/** The display name of the locale */
|
|
199
|
+
label?: string;
|
|
200
|
+
/** The text direction (ltr or rtl) */
|
|
201
|
+
direction?: 'ltr' | 'rtl';
|
|
202
|
+
/** The HTML lang attribute value (e.g., 'en-US') */
|
|
203
|
+
htmlLang?: string;
|
|
204
|
+
/** The calendar system to use (e.g., 'gregory') */
|
|
205
|
+
calendar?: string;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Configuration for internationalization (i18n).
|
|
209
|
+
*/
|
|
210
|
+
interface BoltdocsI18nConfig {
|
|
211
|
+
/** The default locale (e.g., 'en') */
|
|
212
|
+
defaultLocale: string;
|
|
213
|
+
/** Available locales and their basic display names (e.g., { en: 'English', es: 'Español' }) */
|
|
214
|
+
locales: Record<string, string>;
|
|
215
|
+
/** Detailed configuration for each locale */
|
|
216
|
+
localeConfigs?: Record<string, BoltdocsLocaleConfig>;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Configuration for a specific documentation version.
|
|
220
|
+
*/
|
|
221
|
+
interface BoltdocsVersionConfig {
|
|
222
|
+
/** The display name of the version (e.g., 'v2.0') */
|
|
223
|
+
label: string;
|
|
224
|
+
/** The URL path prefix for the version (e.g., '2.0') */
|
|
225
|
+
path: string;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Configuration for documentation versioning.
|
|
229
|
+
*/
|
|
230
|
+
interface BoltdocsVersionsConfig {
|
|
231
|
+
/** The default version path (e.g., 'v2') */
|
|
232
|
+
defaultVersion: string;
|
|
233
|
+
/**
|
|
234
|
+
* Optional prefix for all version paths (e.g., 'v').
|
|
235
|
+
* If set to 'v', version '1.1' will be available at '/docs/v1.1'.
|
|
236
|
+
*/
|
|
237
|
+
prefix?: string;
|
|
238
|
+
/** Available versions configurations */
|
|
239
|
+
versions: BoltdocsVersionConfig[];
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Defines a Boltdocs plugin that can extend the build process and client-side functionality.
|
|
243
|
+
*/
|
|
244
|
+
interface BoltdocsPlugin {
|
|
245
|
+
/** A unique name for the plugin */
|
|
246
|
+
name: string;
|
|
247
|
+
/** Whether to run this plugin before or after default ones (optional) */
|
|
248
|
+
enforce?: 'pre' | 'post';
|
|
249
|
+
/** Version of the plugin (optional) */
|
|
250
|
+
version?: string;
|
|
251
|
+
/** Minimum compatible Boltdocs version (optional, semver range) */
|
|
252
|
+
boltdocsVersion?: string;
|
|
253
|
+
/** List of permissions this plugin requires to operate */
|
|
254
|
+
permissions?: PluginPermission[];
|
|
255
|
+
/** Optional remark plugins to add to the MDX pipeline */
|
|
256
|
+
remarkPlugins?: unknown[];
|
|
257
|
+
/** Optional rehype plugins to add to the MDX pipeline */
|
|
258
|
+
rehypePlugins?: unknown[];
|
|
259
|
+
/** Optional Vite plugins to inject into the build process */
|
|
260
|
+
vitePlugins?: Plugin[];
|
|
261
|
+
/** Optional custom React components to register in MDX. Map of Name -> Module Path. */
|
|
262
|
+
components?: Record<string, string>;
|
|
263
|
+
/** Implementation of lifecycle hooks */
|
|
264
|
+
hooks?: PluginLifecycleHooks;
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Configuration for external integrations (e.g., CodeSandbox).
|
|
268
|
+
*/
|
|
269
|
+
interface BoltdocsIntegrationsConfig {
|
|
270
|
+
/** CodeSandbox integration settings */
|
|
271
|
+
sandbox?: {
|
|
272
|
+
/** Whether to enable the "Open in Sandbox" button in CodeBlocks */
|
|
273
|
+
enable?: boolean;
|
|
274
|
+
/** Default options for the sandbox (files, dependencies, etc.) */
|
|
275
|
+
config?: Record<string, unknown>;
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Configuration for security-related settings.
|
|
280
|
+
*/
|
|
281
|
+
interface BoltdocsSecurityConfig {
|
|
282
|
+
/** Map of standard security headers to override or supplement defaults */
|
|
283
|
+
headers?: Record<string, string>;
|
|
284
|
+
/** Whether to enable Content Security Policy (CSP) generation (default: false) */
|
|
285
|
+
enableCSP?: boolean;
|
|
286
|
+
/** Additional custom headers to inject into responses */
|
|
287
|
+
customHeaders?: Record<string, string>;
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* The root configuration object for Boltdocs.
|
|
291
|
+
*/
|
|
292
|
+
interface BoltdocsConfig {
|
|
293
|
+
/** The base URL of the site, used for generating the sitemap */
|
|
294
|
+
siteUrl?: string;
|
|
295
|
+
/** The root directory containing markdown documentation files (default: 'docs') */
|
|
296
|
+
docsDir?: string;
|
|
297
|
+
/** Path to a custom HomePage component */
|
|
298
|
+
homePage?: string;
|
|
299
|
+
/** Configuration pertaining to the UI and appearance */
|
|
300
|
+
theme?: BoltdocsThemeConfig;
|
|
301
|
+
/** Configuration for internationalization */
|
|
302
|
+
i18n?: BoltdocsI18nConfig;
|
|
303
|
+
/** Configuration for documentation versioning */
|
|
304
|
+
versions?: BoltdocsVersionsConfig;
|
|
305
|
+
/** Custom plugins for extending functionality */
|
|
306
|
+
plugins?: BoltdocsPlugin[];
|
|
307
|
+
/** External integrations configuration */
|
|
308
|
+
integrations?: BoltdocsIntegrationsConfig;
|
|
309
|
+
/** Configuration for the robots.txt file */
|
|
310
|
+
robots?: BoltdocsRobotsConfig;
|
|
311
|
+
/** Security-related settings and headers */
|
|
312
|
+
security?: BoltdocsSecurityConfig;
|
|
313
|
+
/** Low-level Vite configuration overrides */
|
|
314
|
+
vite?: vite.InlineConfig;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Metadata provided by the server for a specific route.
|
|
319
|
+
* Maps closely to the `RouteMeta` type in the Node environment.
|
|
320
|
+
*/
|
|
321
|
+
interface ComponentRoute {
|
|
322
|
+
/** The final URL path */
|
|
323
|
+
path: string;
|
|
324
|
+
/** The absolute filesystem path of the source file */
|
|
325
|
+
componentPath: string;
|
|
326
|
+
/** The page title */
|
|
327
|
+
title: string;
|
|
328
|
+
/** Explicit order in the sidebar */
|
|
329
|
+
sidebarPosition?: number;
|
|
330
|
+
/** The relative path from the docs directory */
|
|
331
|
+
filePath: string;
|
|
332
|
+
/** The group directory name */
|
|
333
|
+
group?: string;
|
|
334
|
+
/** The display title of the group */
|
|
335
|
+
groupTitle?: string;
|
|
336
|
+
/** Explicit order of the group in the sidebar */
|
|
337
|
+
groupPosition?: number;
|
|
338
|
+
/** Extracted markdown headings for search indexing */
|
|
339
|
+
headings?: {
|
|
340
|
+
level: number;
|
|
341
|
+
text: string;
|
|
342
|
+
id: string;
|
|
343
|
+
}[];
|
|
344
|
+
/** The page summary or description */
|
|
345
|
+
description?: string;
|
|
346
|
+
/** The locale this route belongs to, if i18n is configured */
|
|
347
|
+
locale?: string;
|
|
348
|
+
/** The version this route belongs to, if versioning is configured */
|
|
349
|
+
version?: string;
|
|
350
|
+
/** Optional icon to display (Lucide icon name or raw SVG) */
|
|
351
|
+
icon?: string;
|
|
352
|
+
/** The tab this route belongs to, if tabs are configured */
|
|
353
|
+
tab?: string;
|
|
354
|
+
/** Optional badge to display next to the sidebar item */
|
|
355
|
+
badge?: string | {
|
|
356
|
+
text: 'updated' | 'new' | 'deprecated';
|
|
357
|
+
expires?: string;
|
|
358
|
+
};
|
|
359
|
+
/** Optional icon for the route's group */
|
|
360
|
+
groupIcon?: string;
|
|
361
|
+
/** The extracted plain-text content of the page for search indexing */
|
|
362
|
+
_content?: string;
|
|
363
|
+
/** The raw markdown content of the page */
|
|
364
|
+
_rawContent?: string;
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Site configuration provided by the server.
|
|
368
|
+
*/
|
|
369
|
+
type SiteConfig = BoltdocsConfig;
|
|
370
|
+
/**
|
|
371
|
+
* Configuration options for initializing the Boltdocs client app.
|
|
372
|
+
*/
|
|
373
|
+
interface CreateBoltdocsAppOptions {
|
|
374
|
+
/** CSS selector for the DOM element where the app should mount (e.g. '#root') */
|
|
375
|
+
target: string;
|
|
376
|
+
/** Initial routes generated by the Vite plugin (`virtual:boltdocs-routes`) */
|
|
377
|
+
routes: ComponentRoute[];
|
|
378
|
+
/** The name of the documentation directory (e.g. 'docs') */
|
|
379
|
+
docsDirName: string;
|
|
380
|
+
/** Site configuration (`virtual:boltdocs-config`) */
|
|
381
|
+
config: SiteConfig;
|
|
382
|
+
/** Dynamic import mapping from `import.meta.glob` for the documentation pages */
|
|
383
|
+
modules: Record<string, () => Promise<{
|
|
384
|
+
default: React__default.ComponentType<any>;
|
|
385
|
+
}>>;
|
|
386
|
+
/** The `import.meta.hot` instance necessary for fast refresh/HMR updates */
|
|
387
|
+
hot?: {
|
|
388
|
+
accept: (cb?: (mod: any) => void) => void;
|
|
389
|
+
dispose: (cb: (data: any) => void) => void;
|
|
390
|
+
on: (event: string, cb: (data: any) => void) => void;
|
|
391
|
+
data: any;
|
|
392
|
+
};
|
|
393
|
+
/** Optional custom React component to render when visiting the root path ('/') */
|
|
394
|
+
homePage?: React__default.ComponentType;
|
|
395
|
+
/** Custom external pages mapped by their route path */
|
|
396
|
+
externalPages?: Record<string, React__default.ComponentType>;
|
|
397
|
+
/** Optional custom layout for external pages */
|
|
398
|
+
externalLayout?: React__default.ComponentType<{
|
|
399
|
+
children: React__default.ReactNode;
|
|
400
|
+
}>;
|
|
401
|
+
/** Optional custom MDX components provided by plugins */
|
|
402
|
+
components?: Record<string, React__default.ComponentType>;
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* Types for CodeSandbox integration.
|
|
406
|
+
*/
|
|
407
|
+
interface SandboxFile {
|
|
408
|
+
content: string | object;
|
|
409
|
+
isBinary?: boolean;
|
|
410
|
+
}
|
|
411
|
+
type SandboxFiles = Record<string, SandboxFile>;
|
|
412
|
+
interface SandboxOptions {
|
|
413
|
+
files?: SandboxFiles;
|
|
414
|
+
dependencies?: Record<string, string>;
|
|
415
|
+
devDependencies?: Record<string, string>;
|
|
416
|
+
title?: string;
|
|
417
|
+
description?: string;
|
|
418
|
+
template?: string;
|
|
419
|
+
/** The file path to open by default in the editor (e.g. `"src/App.tsx"`). */
|
|
420
|
+
entry?: string;
|
|
421
|
+
/** Options for the embedded iframe view, used by `embedSandbox()`. */
|
|
422
|
+
embed?: SandboxEmbedOptions;
|
|
423
|
+
/** Custom scripts for the package.json (e.g. `{ "start": "vite" }`). */
|
|
424
|
+
scripts?: Record<string, string>;
|
|
425
|
+
/** Optional default theme configuration for the sandbox project. */
|
|
426
|
+
themeConfig?: Record<string, unknown>;
|
|
427
|
+
}
|
|
428
|
+
interface SandboxEmbedOptions {
|
|
429
|
+
/** Which panel to display: `"editor"`, `"preview"`, or `"split"`. */
|
|
430
|
+
view?: 'editor' | 'preview' | 'split';
|
|
431
|
+
/** Color theme: `"dark"` or `"light"`. */
|
|
432
|
+
theme?: 'dark' | 'light';
|
|
433
|
+
/** Whether to hide the navigation bar in the embed. */
|
|
434
|
+
hideNavigation?: boolean;
|
|
435
|
+
}
|
|
436
|
+
/**
|
|
437
|
+
* Tab configuration for the documentation site.
|
|
438
|
+
*/
|
|
439
|
+
interface BoltdocsTab {
|
|
440
|
+
id: string;
|
|
441
|
+
/** Text to display (can be a string or a map of translations) */
|
|
442
|
+
text: string | Record<string, string>;
|
|
443
|
+
icon?: string;
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* Props for the OnThisPage (TOC) component.
|
|
447
|
+
*/
|
|
448
|
+
interface OnThisPageProps {
|
|
449
|
+
headings?: {
|
|
450
|
+
level: number;
|
|
451
|
+
text: string;
|
|
452
|
+
id: string;
|
|
453
|
+
}[];
|
|
454
|
+
editLink?: string;
|
|
455
|
+
communityHelp?: string;
|
|
456
|
+
filePath?: string;
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* Props for user-defined layout components (layout.tsx).
|
|
460
|
+
*/
|
|
461
|
+
interface LayoutProps$1 {
|
|
462
|
+
children: React__default.ReactNode;
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* Unified type for navbar links.
|
|
466
|
+
*/
|
|
467
|
+
interface NavbarLink {
|
|
468
|
+
/** Label to display (can be a string or a map of translations) */
|
|
469
|
+
label: string | Record<string, string>;
|
|
470
|
+
href: string;
|
|
471
|
+
active: boolean;
|
|
472
|
+
/** Optional icon or string for external link indication */
|
|
473
|
+
to?: string;
|
|
474
|
+
}
|
|
15
475
|
|
|
16
476
|
/**
|
|
17
477
|
* Creates and mounts the Boltdocs documentation app.
|
|
@@ -49,9 +509,164 @@ interface ThemeContextType {
|
|
|
49
509
|
}
|
|
50
510
|
declare function useTheme(): ThemeContextType;
|
|
51
511
|
|
|
512
|
+
/**
|
|
513
|
+
* Hook to access the framework's routing state.
|
|
514
|
+
* Returns both the complete set of routes and a filtered list based on the current
|
|
515
|
+
* version and locale.
|
|
516
|
+
*/
|
|
517
|
+
declare function useRoutes(): {
|
|
518
|
+
routes: ComponentRoute[];
|
|
519
|
+
allRoutes: ComponentRoute[];
|
|
520
|
+
currentRoute: ComponentRoute | undefined;
|
|
521
|
+
currentLocale: string | undefined;
|
|
522
|
+
currentLocaleLabel: string | undefined;
|
|
523
|
+
availableLocales: {
|
|
524
|
+
key: string;
|
|
525
|
+
label: string;
|
|
526
|
+
isCurrent: boolean;
|
|
527
|
+
}[];
|
|
528
|
+
currentVersion: string | undefined;
|
|
529
|
+
currentVersionLabel: string | undefined;
|
|
530
|
+
availableVersions: {
|
|
531
|
+
key: string;
|
|
532
|
+
label: string;
|
|
533
|
+
isCurrent: boolean;
|
|
534
|
+
}[];
|
|
535
|
+
config: BoltdocsConfig;
|
|
536
|
+
};
|
|
537
|
+
|
|
52
538
|
type MdxComponentsType = Record<string, React.ComponentType<any>>;
|
|
53
539
|
declare function useMdxComponents(): MdxComponentsType;
|
|
54
540
|
|
|
541
|
+
declare function useNavbar(): {
|
|
542
|
+
links: NavbarLink[];
|
|
543
|
+
title: string;
|
|
544
|
+
logo: any;
|
|
545
|
+
logoProps: {
|
|
546
|
+
alt: any;
|
|
547
|
+
width: any;
|
|
548
|
+
height: any;
|
|
549
|
+
};
|
|
550
|
+
github: string | null;
|
|
551
|
+
social: BoltdocsSocialLink[];
|
|
552
|
+
config: BoltdocsConfig;
|
|
553
|
+
theme: "dark" | "light" | "system";
|
|
554
|
+
};
|
|
555
|
+
|
|
556
|
+
declare function useSidebar(routes: ComponentRoute[]): {
|
|
557
|
+
groups: {
|
|
558
|
+
slug: string;
|
|
559
|
+
title: string;
|
|
560
|
+
routes: ComponentRoute[];
|
|
561
|
+
icon?: string;
|
|
562
|
+
}[];
|
|
563
|
+
ungrouped: ComponentRoute[];
|
|
564
|
+
activeRoute: ComponentRoute | undefined;
|
|
565
|
+
activePath: string;
|
|
566
|
+
config: BoltdocsConfig;
|
|
567
|
+
};
|
|
568
|
+
|
|
569
|
+
declare function useSearch(routes: ComponentRoute[]): {
|
|
570
|
+
isOpen: boolean;
|
|
571
|
+
setIsOpen: React$1.Dispatch<React$1.SetStateAction<boolean>>;
|
|
572
|
+
query: string;
|
|
573
|
+
setQuery: React$1.Dispatch<React$1.SetStateAction<string>>;
|
|
574
|
+
list: any[];
|
|
575
|
+
input: {
|
|
576
|
+
value: string;
|
|
577
|
+
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
578
|
+
};
|
|
579
|
+
};
|
|
580
|
+
|
|
581
|
+
interface Heading {
|
|
582
|
+
id: string;
|
|
583
|
+
text: string;
|
|
584
|
+
level: number;
|
|
585
|
+
}
|
|
586
|
+
/**
|
|
587
|
+
* Hook to manage and provide current page headings for the OnThisPage component.
|
|
588
|
+
*/
|
|
589
|
+
declare function useOnThisPage(headings?: Heading[]): {
|
|
590
|
+
headings: Heading[];
|
|
591
|
+
activeId: string | null;
|
|
592
|
+
setActiveId: React$1.Dispatch<React$1.SetStateAction<string | null>>;
|
|
593
|
+
};
|
|
594
|
+
|
|
595
|
+
declare function useTabs(tabs?: BoltdocsTab[], routes?: ComponentRoute[]): {
|
|
596
|
+
tabs: BoltdocsTab[];
|
|
597
|
+
activeIndex: number;
|
|
598
|
+
indicatorStyle: React$1.CSSProperties;
|
|
599
|
+
tabRefs: React$1.RefObject<(HTMLAnchorElement | null)[]>;
|
|
600
|
+
activeTabId: string | undefined;
|
|
601
|
+
};
|
|
602
|
+
|
|
603
|
+
interface VersionOption {
|
|
604
|
+
key: string;
|
|
605
|
+
label: string;
|
|
606
|
+
value: string;
|
|
607
|
+
isCurrent: boolean;
|
|
608
|
+
}
|
|
609
|
+
interface UseVersionReturn {
|
|
610
|
+
currentVersion: string | undefined;
|
|
611
|
+
currentVersionLabel: string | undefined;
|
|
612
|
+
availableVersions: VersionOption[];
|
|
613
|
+
handleVersionChange: (version: string) => void;
|
|
614
|
+
}
|
|
615
|
+
/**
|
|
616
|
+
* Hook to manage and switch between different versions of the documentation.
|
|
617
|
+
*/
|
|
618
|
+
declare function useVersion(): UseVersionReturn;
|
|
619
|
+
|
|
620
|
+
interface LocaleOption {
|
|
621
|
+
key: string;
|
|
622
|
+
label: string;
|
|
623
|
+
value: string;
|
|
624
|
+
isCurrent: boolean;
|
|
625
|
+
}
|
|
626
|
+
interface UseI18nReturn {
|
|
627
|
+
currentLocale: string | undefined;
|
|
628
|
+
currentLocaleLabel: string | undefined;
|
|
629
|
+
availableLocales: LocaleOption[];
|
|
630
|
+
handleLocaleChange: (locale: string) => void;
|
|
631
|
+
}
|
|
632
|
+
/**
|
|
633
|
+
* Hook to manage and switch between different locales (languages) of the documentation.
|
|
634
|
+
*/
|
|
635
|
+
declare function useI18n(): UseI18nReturn;
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* Hook to manage the previous and next button functionality for documentation pages.
|
|
639
|
+
* Intelligent: respects current locale, version, and tab to keep navigation logical.
|
|
640
|
+
*/
|
|
641
|
+
declare function usePageNav(): {
|
|
642
|
+
prevPage: null;
|
|
643
|
+
nextPage: null;
|
|
644
|
+
currentRoute: null;
|
|
645
|
+
} | {
|
|
646
|
+
prevPage: ComponentRoute | null;
|
|
647
|
+
nextPage: ComponentRoute | null;
|
|
648
|
+
currentRoute: ComponentRoute;
|
|
649
|
+
};
|
|
650
|
+
|
|
651
|
+
/**
|
|
652
|
+
* Hook to generate breadcrumbs based on the current active route.
|
|
653
|
+
*/
|
|
654
|
+
declare function useBreadcrumbs(): {
|
|
655
|
+
crumbs: {
|
|
656
|
+
label: string;
|
|
657
|
+
href?: string;
|
|
658
|
+
}[];
|
|
659
|
+
activeRoute: ComponentRoute | undefined;
|
|
660
|
+
};
|
|
661
|
+
|
|
662
|
+
/**
|
|
663
|
+
* Hook to automatically localize a path based on the current version and locale context.
|
|
664
|
+
* It ensures that navigation preserves the active version and language across the entire site.
|
|
665
|
+
*/
|
|
666
|
+
declare function useLocalizedTo(to: LinkProps$2['to']): react_router_dom.To;
|
|
667
|
+
|
|
668
|
+
declare const useLocation: () => react_router_dom.Location<any>;
|
|
669
|
+
|
|
55
670
|
/**
|
|
56
671
|
* Props shared by all layout slot components.
|
|
57
672
|
*/
|
|
@@ -99,4 +714,600 @@ interface LayoutProps {
|
|
|
99
714
|
*/
|
|
100
715
|
declare function DefaultLayout({ children }: LayoutProps): react_jsx_runtime.JSX.Element;
|
|
101
716
|
|
|
102
|
-
|
|
717
|
+
declare function Navbar$1(): react_jsx_runtime.JSX.Element;
|
|
718
|
+
|
|
719
|
+
declare function Sidebar$1({ routes, config, }: {
|
|
720
|
+
routes: ComponentRoute[];
|
|
721
|
+
config: BoltdocsConfig;
|
|
722
|
+
}): react_jsx_runtime.JSX.Element;
|
|
723
|
+
|
|
724
|
+
declare function OnThisPage$1({ headings: rawHeadings, editLink, communityHelp, filePath, }: OnThisPageProps): react_jsx_runtime.JSX.Element | null;
|
|
725
|
+
|
|
726
|
+
interface HeadProps {
|
|
727
|
+
siteTitle: string;
|
|
728
|
+
siteDescription?: string;
|
|
729
|
+
routes: Array<{
|
|
730
|
+
path: string;
|
|
731
|
+
title: string;
|
|
732
|
+
description?: string;
|
|
733
|
+
}>;
|
|
734
|
+
}
|
|
735
|
+
declare function Head({ siteTitle, siteDescription, routes }: HeadProps): null;
|
|
736
|
+
|
|
737
|
+
declare function Breadcrumbs$1(): react_jsx_runtime.JSX.Element | null;
|
|
738
|
+
|
|
739
|
+
/**
|
|
740
|
+
* Component to display the previous and next page navigation buttons.
|
|
741
|
+
* Enhanced with subtle entrance animations and a modern card layout.
|
|
742
|
+
*/
|
|
743
|
+
declare function PageNav$1(): react_jsx_runtime.JSX.Element | null;
|
|
744
|
+
|
|
745
|
+
interface Props {
|
|
746
|
+
children?: ReactNode;
|
|
747
|
+
fallback?: ReactNode;
|
|
748
|
+
}
|
|
749
|
+
interface State {
|
|
750
|
+
hasError: boolean;
|
|
751
|
+
error?: Error;
|
|
752
|
+
}
|
|
753
|
+
declare class ErrorBoundary extends Component<Props, State> {
|
|
754
|
+
state: State;
|
|
755
|
+
static getDerivedStateFromError(error: Error): State;
|
|
756
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
757
|
+
render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
interface CopyMarkdownProps {
|
|
761
|
+
content?: string;
|
|
762
|
+
mdxRaw?: string;
|
|
763
|
+
route?: ComponentRoute;
|
|
764
|
+
config?: boolean | {
|
|
765
|
+
text?: string;
|
|
766
|
+
icon?: string;
|
|
767
|
+
};
|
|
768
|
+
}
|
|
769
|
+
declare function CopyMarkdown({ content, mdxRaw, config }: CopyMarkdownProps): react_jsx_runtime.JSX.Element | null;
|
|
770
|
+
|
|
771
|
+
declare function NotFound(): react_jsx_runtime.JSX.Element;
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* A premium loading component that only skeletons the markdown content area.
|
|
775
|
+
* Designed to be used as a Suspense fallback within a persistent layout.
|
|
776
|
+
*/
|
|
777
|
+
declare function Loading(): react_jsx_runtime.JSX.Element;
|
|
778
|
+
|
|
779
|
+
interface CodeBlockProps {
|
|
780
|
+
children?: React.ReactNode;
|
|
781
|
+
className?: string;
|
|
782
|
+
sandbox?: boolean | any;
|
|
783
|
+
hideCopy?: boolean;
|
|
784
|
+
hideSandbox?: boolean;
|
|
785
|
+
title?: string;
|
|
786
|
+
lang?: string;
|
|
787
|
+
highlightedHtml?: string;
|
|
788
|
+
'data-lang'?: string;
|
|
789
|
+
plain?: boolean;
|
|
790
|
+
[key: string]: any;
|
|
791
|
+
}
|
|
792
|
+
declare function CodeBlock(props: CodeBlockProps): react_jsx_runtime.JSX.Element;
|
|
793
|
+
|
|
794
|
+
interface VideoProps {
|
|
795
|
+
src?: string;
|
|
796
|
+
poster?: string;
|
|
797
|
+
alt?: string;
|
|
798
|
+
controls?: boolean;
|
|
799
|
+
preload?: string;
|
|
800
|
+
children?: React.ReactNode;
|
|
801
|
+
[key: string]: any;
|
|
802
|
+
}
|
|
803
|
+
declare function Video({ src, poster, alt, children, controls, preload, ...rest }: VideoProps): react_jsx_runtime.JSX.Element;
|
|
804
|
+
|
|
805
|
+
declare const buttonVariants: (props?: ({
|
|
806
|
+
variant?: "link" | "success" | "primary" | "secondary" | "outline" | "ghost" | "danger" | "warning" | "info" | "subtle" | null | undefined;
|
|
807
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
808
|
+
rounded?: "none" | "sm" | "md" | "lg" | "full" | null | undefined;
|
|
809
|
+
iconSize?: "sm" | "md" | "lg" | null | undefined;
|
|
810
|
+
disabled?: boolean | null | undefined;
|
|
811
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
812
|
+
type ButtonVariantType = VariantProps<typeof buttonVariants>;
|
|
813
|
+
interface ButtonProps extends Omit<RAC.ButtonProps, 'children' | 'className'>, ButtonVariantType {
|
|
814
|
+
icon?: React.ReactNode;
|
|
815
|
+
iconPosition?: 'left' | 'right';
|
|
816
|
+
href?: string;
|
|
817
|
+
children?: React.ReactNode;
|
|
818
|
+
className?: string;
|
|
819
|
+
isIconOnly?: boolean;
|
|
820
|
+
}
|
|
821
|
+
declare const Button$1: ({ href, icon, iconPosition, isIconOnly, children, className, variant, size, rounded, iconSize, disabled, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
|
|
822
|
+
|
|
823
|
+
declare const Button: ({ className, variant, size, rounded, iconSize, disabled, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
|
|
824
|
+
|
|
825
|
+
interface TabProps {
|
|
826
|
+
label: string;
|
|
827
|
+
icon?: React.ReactNode;
|
|
828
|
+
disabled?: boolean;
|
|
829
|
+
children: React.ReactNode;
|
|
830
|
+
}
|
|
831
|
+
declare function Tab({ children }: TabProps): react_jsx_runtime.JSX.Element;
|
|
832
|
+
interface TabsProps {
|
|
833
|
+
defaultIndex?: number;
|
|
834
|
+
children: React.ReactNode;
|
|
835
|
+
}
|
|
836
|
+
declare function Tabs$1({ defaultIndex, children }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
837
|
+
|
|
838
|
+
declare const badgeVariants: (props?: ({
|
|
839
|
+
variant?: "success" | "default" | "primary" | "danger" | "warning" | "info" | null | undefined;
|
|
840
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
841
|
+
interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
|
|
842
|
+
children: React.ReactNode;
|
|
843
|
+
}
|
|
844
|
+
declare function Badge({ variant, children, className, ...rest }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
845
|
+
|
|
846
|
+
declare const cardsVariants: (props?: ({
|
|
847
|
+
cols?: 1 | 2 | 4 | 3 | null | undefined;
|
|
848
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
849
|
+
type CardsVariants = VariantProps<typeof cardsVariants>;
|
|
850
|
+
interface CardsProps extends React.HTMLAttributes<HTMLDivElement>, CardsVariants {
|
|
851
|
+
}
|
|
852
|
+
declare function Cards({ cols, children, className, ...rest }: CardsProps): react_jsx_runtime.JSX.Element;
|
|
853
|
+
interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
854
|
+
title?: string;
|
|
855
|
+
icon?: React.ReactNode;
|
|
856
|
+
href?: string;
|
|
857
|
+
children?: React.ReactNode;
|
|
858
|
+
}
|
|
859
|
+
declare function Card({ title, icon, href, children, className, ...rest }: CardProps): react_jsx_runtime.JSX.Element;
|
|
860
|
+
|
|
861
|
+
declare const admonitionVariants: (props?: ({
|
|
862
|
+
type?: "danger" | "warning" | "info" | "note" | "tip" | "important" | "caution" | null | undefined;
|
|
863
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
864
|
+
type AdmonitionVariants = VariantProps<typeof admonitionVariants>;
|
|
865
|
+
interface AdmonitionProps extends React.HTMLAttributes<HTMLDivElement>, AdmonitionVariants {
|
|
866
|
+
title?: string;
|
|
867
|
+
children: React.ReactNode;
|
|
868
|
+
}
|
|
869
|
+
declare function Admonition({ type, title, children, className, ...rest }: AdmonitionProps): react_jsx_runtime.JSX.Element;
|
|
870
|
+
declare const Note: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
|
|
871
|
+
declare const Tip: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
|
|
872
|
+
declare const Warning: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
|
|
873
|
+
declare const Danger: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
|
|
874
|
+
declare const InfoBox: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
|
|
875
|
+
declare const Important: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
|
|
876
|
+
declare const Caution: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
|
|
877
|
+
|
|
878
|
+
declare const listVariants: (props?: ({
|
|
879
|
+
variant?: "number" | "default" | "checked" | "arrow" | "bubble" | null | undefined;
|
|
880
|
+
cols?: 1 | 2 | 4 | 3 | null | undefined;
|
|
881
|
+
isGrid?: boolean | null | undefined;
|
|
882
|
+
dense?: boolean | null | undefined;
|
|
883
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
884
|
+
type ListVariantProps = VariantProps<typeof listVariants>;
|
|
885
|
+
interface ListProps extends ComponentPropsWithoutRef<'ul'>, Omit<ListVariantProps, 'variant'> {
|
|
886
|
+
variant?: 'checked' | 'arrow' | 'default' | 'bubble' | 'number';
|
|
887
|
+
children: ReactNode;
|
|
888
|
+
}
|
|
889
|
+
declare function List({ variant, cols, dense, children, className, ...props }: ListProps): react_jsx_runtime.JSX.Element;
|
|
890
|
+
|
|
891
|
+
interface FileTreeProps {
|
|
892
|
+
children: React.ReactNode;
|
|
893
|
+
}
|
|
894
|
+
declare function FileTree({ children }: FileTreeProps): react_jsx_runtime.JSX.Element;
|
|
895
|
+
|
|
896
|
+
interface TableProps {
|
|
897
|
+
headers?: string[];
|
|
898
|
+
data?: (string | React.ReactNode)[][];
|
|
899
|
+
children?: React.ReactNode;
|
|
900
|
+
className?: string;
|
|
901
|
+
sortable?: boolean;
|
|
902
|
+
paginated?: boolean;
|
|
903
|
+
pageSize?: number;
|
|
904
|
+
}
|
|
905
|
+
declare function Table({ headers, data, children, className, sortable, paginated, pageSize, }: TableProps): react_jsx_runtime.JSX.Element;
|
|
906
|
+
|
|
907
|
+
interface FieldProps {
|
|
908
|
+
name: string;
|
|
909
|
+
type?: string;
|
|
910
|
+
defaultValue?: string;
|
|
911
|
+
required?: boolean;
|
|
912
|
+
children: React.ReactNode;
|
|
913
|
+
id?: string;
|
|
914
|
+
className?: string;
|
|
915
|
+
}
|
|
916
|
+
declare function Field({ name, type, defaultValue, required, children, id, className, }: FieldProps): react_jsx_runtime.JSX.Element;
|
|
917
|
+
|
|
918
|
+
interface LinkProps$1 extends LinkProps$3 {
|
|
919
|
+
/** Should prefetch the page on hover? Default 'hover' */
|
|
920
|
+
prefetch?: 'hover' | 'none';
|
|
921
|
+
}
|
|
922
|
+
/**
|
|
923
|
+
* A primitive Link component that wraps React Aria Components' Link
|
|
924
|
+
* and adds framework-specific logic for path localization and preloading.
|
|
925
|
+
*
|
|
926
|
+
* It uses the global navigation configuration from BoltdocsRouterProvider
|
|
927
|
+
* to handle seamless client-side transitions.
|
|
928
|
+
*/
|
|
929
|
+
declare const Link$1: React__default.ForwardRefExoticComponent<LinkProps$1 & React__default.RefAttributes<HTMLAnchorElement>>;
|
|
930
|
+
/**
|
|
931
|
+
* Props for the NavLink component, extending standard Link props.
|
|
932
|
+
*/
|
|
933
|
+
interface NavLinkProps extends Omit<LinkProps$1, 'className' | 'children'> {
|
|
934
|
+
/**
|
|
935
|
+
* When true, the active state will only be applied if the paths match exactly.
|
|
936
|
+
* Default is false.
|
|
937
|
+
*/
|
|
938
|
+
end?: boolean;
|
|
939
|
+
/**
|
|
940
|
+
* Provides access to the active state for conditional children rendering.
|
|
941
|
+
*/
|
|
942
|
+
children?: React__default.ReactNode | ((props: {
|
|
943
|
+
isActive: boolean;
|
|
944
|
+
}) => React__default.ReactNode);
|
|
945
|
+
/**
|
|
946
|
+
* Provides access to the active state for conditional styling.
|
|
947
|
+
*/
|
|
948
|
+
className?: string | ((props: {
|
|
949
|
+
isActive: boolean;
|
|
950
|
+
}) => string);
|
|
951
|
+
}
|
|
952
|
+
/**
|
|
953
|
+
* A primitive NavLink component that provides active state detection.
|
|
954
|
+
*
|
|
955
|
+
* It combines the Link primitive with path matching logic to determine
|
|
956
|
+
* if the link is currently active based on the browser's location.
|
|
957
|
+
*/
|
|
958
|
+
declare const NavLink: React__default.ForwardRefExoticComponent<NavLinkProps & React__default.RefAttributes<HTMLAnchorElement>>;
|
|
959
|
+
|
|
960
|
+
type LinkProps = LinkProps$1 & {
|
|
961
|
+
to: string;
|
|
962
|
+
children?: React.ReactNode;
|
|
963
|
+
};
|
|
964
|
+
/**
|
|
965
|
+
* A premium Link component for Boltdocs that handles internal and external routing.
|
|
966
|
+
*/
|
|
967
|
+
declare function Link({ to, children, className, ...props }: LinkProps): react_jsx_runtime.JSX.Element;
|
|
968
|
+
|
|
969
|
+
interface ImageProps extends ImgHTMLAttributes<HTMLImageElement> {
|
|
970
|
+
src: string;
|
|
971
|
+
darkSrc?: string;
|
|
972
|
+
theme?: 'light' | 'dark';
|
|
973
|
+
}
|
|
974
|
+
/**
|
|
975
|
+
* A themed Image component for Boltdocs.
|
|
976
|
+
* It supports rendering based on the current active theme.
|
|
977
|
+
*/
|
|
978
|
+
declare function Image({ src, alt, theme: imageTheme, ...props }: ImageProps): react_jsx_runtime.JSX.Element | null;
|
|
979
|
+
|
|
980
|
+
interface PropItem {
|
|
981
|
+
name: string;
|
|
982
|
+
type: string;
|
|
983
|
+
defaultValue?: string;
|
|
984
|
+
required?: boolean;
|
|
985
|
+
description: React.ReactNode;
|
|
986
|
+
}
|
|
987
|
+
interface ComponentPropsProps {
|
|
988
|
+
title?: string;
|
|
989
|
+
props: PropItem[];
|
|
990
|
+
className?: string;
|
|
991
|
+
}
|
|
992
|
+
declare function ComponentProps({ title, props, className, }: ComponentPropsProps): react_jsx_runtime.JSX.Element;
|
|
993
|
+
|
|
994
|
+
interface ComponentPreviewProps {
|
|
995
|
+
code?: string;
|
|
996
|
+
highlightedHtml?: string;
|
|
997
|
+
children?: string;
|
|
998
|
+
preview?: React.ReactNode;
|
|
999
|
+
hideCode?: boolean;
|
|
1000
|
+
hideSandbox?: boolean;
|
|
1001
|
+
hideCopy?: boolean;
|
|
1002
|
+
sandboxOptions?: SandboxOptions;
|
|
1003
|
+
}
|
|
1004
|
+
declare function ComponentPreview(props: ComponentPreviewProps): react_jsx_runtime.JSX.Element;
|
|
1005
|
+
|
|
1006
|
+
type ComponentBase = {
|
|
1007
|
+
className?: string;
|
|
1008
|
+
children?: ReactNode;
|
|
1009
|
+
};
|
|
1010
|
+
|
|
1011
|
+
interface NavbarLinkProps extends Omit<ComponentBase, 'children'> {
|
|
1012
|
+
label: ReactNode;
|
|
1013
|
+
href: string;
|
|
1014
|
+
active?: boolean;
|
|
1015
|
+
to?: 'internal' | 'external';
|
|
1016
|
+
}
|
|
1017
|
+
interface NavbarLogoProps extends Omit<ComponentBase, 'children'> {
|
|
1018
|
+
src: string;
|
|
1019
|
+
alt: string;
|
|
1020
|
+
width?: number;
|
|
1021
|
+
height?: number;
|
|
1022
|
+
}
|
|
1023
|
+
interface NavbarSearchTriggerProps extends ComponentBase {
|
|
1024
|
+
onPress: () => void;
|
|
1025
|
+
}
|
|
1026
|
+
interface NavbarThemeProps {
|
|
1027
|
+
className?: string;
|
|
1028
|
+
theme: 'dark' | 'light';
|
|
1029
|
+
onThemeChange: (isSelected: boolean) => void;
|
|
1030
|
+
}
|
|
1031
|
+
interface NavbarSocialsProps extends ComponentBase {
|
|
1032
|
+
icon: string;
|
|
1033
|
+
link: string;
|
|
1034
|
+
}
|
|
1035
|
+
declare const Navbar: {
|
|
1036
|
+
({ children, className, ...props }: ComponentBase): react_jsx_runtime.JSX.Element;
|
|
1037
|
+
Root: /*elided*/ any;
|
|
1038
|
+
Left: ({ children, className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
1039
|
+
Right: ({ children, className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
1040
|
+
Center: ({ children, className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
1041
|
+
Logo: ({ src, alt, width, height, className, }: NavbarLogoProps) => react_jsx_runtime.JSX.Element;
|
|
1042
|
+
Title: ({ children, className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
1043
|
+
Links: ({ children, className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
1044
|
+
Link: ({ label, href, active, to, className, }: NavbarLinkProps) => react_jsx_runtime.JSX.Element;
|
|
1045
|
+
SearchTrigger: ({ className, onPress, }: NavbarSearchTriggerProps) => react_jsx_runtime.JSX.Element;
|
|
1046
|
+
Theme: ({ className, theme, onThemeChange, }: NavbarThemeProps) => react_jsx_runtime.JSX.Element;
|
|
1047
|
+
Socials: ({ icon, link, className, }: NavbarSocialsProps) => react_jsx_runtime.JSX.Element;
|
|
1048
|
+
Split: ({ className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
1049
|
+
Content: ({ children, className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
1050
|
+
};
|
|
1051
|
+
|
|
1052
|
+
interface NavigationMenuItemProps extends ComponentBase {
|
|
1053
|
+
label: string;
|
|
1054
|
+
}
|
|
1055
|
+
interface NavigationMenuLinkProps extends Omit<ComponentBase, 'children'> {
|
|
1056
|
+
href: string;
|
|
1057
|
+
label: string;
|
|
1058
|
+
description?: string;
|
|
1059
|
+
children?: React.ReactNode | ((opts: RAC.MenuItemRenderProps) => React.ReactNode);
|
|
1060
|
+
}
|
|
1061
|
+
declare const NavigationMenu: {
|
|
1062
|
+
({ children, className, ...props }: ComponentBase): react_jsx_runtime.JSX.Element;
|
|
1063
|
+
Root: /*elided*/ any;
|
|
1064
|
+
List: ({ children, className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
1065
|
+
Item: ({ children, label, className, }: NavigationMenuItemProps) => react_jsx_runtime.JSX.Element;
|
|
1066
|
+
Link: ({ label, href, description, className, children, ...props }: NavigationMenuLinkProps) => react_jsx_runtime.JSX.Element;
|
|
1067
|
+
};
|
|
1068
|
+
|
|
1069
|
+
interface SearchDialogProps extends ComponentBase {
|
|
1070
|
+
isOpen?: boolean;
|
|
1071
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
1072
|
+
}
|
|
1073
|
+
interface SearchDialogItemProps extends Omit<RAC.ListBoxItemProps, 'children'> {
|
|
1074
|
+
className?: string;
|
|
1075
|
+
children: React.ReactNode;
|
|
1076
|
+
}
|
|
1077
|
+
interface SearchDialogItemIconProps {
|
|
1078
|
+
isHeading?: boolean;
|
|
1079
|
+
className?: string;
|
|
1080
|
+
}
|
|
1081
|
+
declare const SearchDialog: {
|
|
1082
|
+
({ children, isOpen, onOpenChange, className, }: SearchDialogProps): react_jsx_runtime.JSX.Element;
|
|
1083
|
+
Root: /*elided*/ any;
|
|
1084
|
+
Autocomplete: <T extends object>({ children, className, onSelectionChange, ...props }: RAC.AutocompleteProps<T> & {
|
|
1085
|
+
className?: string;
|
|
1086
|
+
onSelectionChange?: (key: RAC.Key) => void;
|
|
1087
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
1088
|
+
Input: ({ className, ...props }: RAC.InputProps & {
|
|
1089
|
+
className?: string;
|
|
1090
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
1091
|
+
List: <T extends object>({ children, className, ...props }: RAC.ListBoxProps<T> & {
|
|
1092
|
+
className?: string;
|
|
1093
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
1094
|
+
Item: (({ children, className, ...props }: SearchDialogItemProps) => react_jsx_runtime.JSX.Element) & {
|
|
1095
|
+
Icon: ({ isHeading, className, }: SearchDialogItemIconProps) => react_jsx_runtime.JSX.Element;
|
|
1096
|
+
Title: ({ children, className, }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
1097
|
+
Bio: ({ children, className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
1098
|
+
};
|
|
1099
|
+
};
|
|
1100
|
+
|
|
1101
|
+
interface TOCItemType {
|
|
1102
|
+
title: ReactNode;
|
|
1103
|
+
url: string;
|
|
1104
|
+
depth: number;
|
|
1105
|
+
_step?: number;
|
|
1106
|
+
}
|
|
1107
|
+
interface TOCItemInfo {
|
|
1108
|
+
id: string;
|
|
1109
|
+
active: boolean;
|
|
1110
|
+
/** last time the item is updated */
|
|
1111
|
+
t: number;
|
|
1112
|
+
/** currently active but not intersecting in viewport */
|
|
1113
|
+
fallback: boolean;
|
|
1114
|
+
original?: TOCItemType;
|
|
1115
|
+
}
|
|
1116
|
+
interface AnchorProviderProps {
|
|
1117
|
+
toc: TOCItemType[];
|
|
1118
|
+
/**
|
|
1119
|
+
* Only accept one active item at most
|
|
1120
|
+
* @defaultValue false
|
|
1121
|
+
*/
|
|
1122
|
+
single?: boolean;
|
|
1123
|
+
children?: ReactNode;
|
|
1124
|
+
}
|
|
1125
|
+
interface ScrollProviderProps {
|
|
1126
|
+
/**
|
|
1127
|
+
* Scroll into the view of container when active
|
|
1128
|
+
*/
|
|
1129
|
+
containerRef: RefObject<HTMLElement | null>;
|
|
1130
|
+
children?: ReactNode;
|
|
1131
|
+
}
|
|
1132
|
+
interface OnThisPageContentProps extends ComponentBase {
|
|
1133
|
+
ref?: React__default.Ref<HTMLDivElement>;
|
|
1134
|
+
scrollRef?: RefObject<HTMLElement | null>;
|
|
1135
|
+
}
|
|
1136
|
+
interface OnThisPageItemProps extends ComponentBase {
|
|
1137
|
+
level?: number;
|
|
1138
|
+
}
|
|
1139
|
+
interface OnThisPageLinkProps extends ComponentBase {
|
|
1140
|
+
href?: string;
|
|
1141
|
+
active?: boolean;
|
|
1142
|
+
onClick?: (event: React__default.MouseEvent<HTMLAnchorElement>) => void;
|
|
1143
|
+
}
|
|
1144
|
+
interface OnThisPageIndicatorProps extends ComponentBase {
|
|
1145
|
+
style?: React__default.CSSProperties;
|
|
1146
|
+
}
|
|
1147
|
+
declare function useItems(): TOCItemInfo[];
|
|
1148
|
+
declare function useActiveAnchor(): string | undefined;
|
|
1149
|
+
declare function useActiveAnchors(): string[];
|
|
1150
|
+
/** Optional: add auto-scroll to TOC items. */
|
|
1151
|
+
declare function ScrollProvider({ containerRef, children, }: ScrollProviderProps): react_jsx_runtime.JSX.Element;
|
|
1152
|
+
declare function AnchorProvider({ toc, single, children, }: AnchorProviderProps): react_jsx_runtime.JSX.Element;
|
|
1153
|
+
declare const OnThisPage: {
|
|
1154
|
+
({ children, className }: ComponentBase): react_jsx_runtime.JSX.Element;
|
|
1155
|
+
Root: /*elided*/ any;
|
|
1156
|
+
Header: ({ children, className, ...props }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
1157
|
+
Content: {
|
|
1158
|
+
({ children, className, ref, ...props }: OnThisPageContentProps): react_jsx_runtime.JSX.Element;
|
|
1159
|
+
displayName: string;
|
|
1160
|
+
};
|
|
1161
|
+
List: ({ children, className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
1162
|
+
Item: ({ level, children, className, }: OnThisPageItemProps) => react_jsx_runtime.JSX.Element;
|
|
1163
|
+
Link: ({ children, href, active, onClick, className, }: OnThisPageLinkProps) => react_jsx_runtime.JSX.Element;
|
|
1164
|
+
Indicator: ({ style, className, }: OnThisPageIndicatorProps) => react_jsx_runtime.JSX.Element;
|
|
1165
|
+
};
|
|
1166
|
+
|
|
1167
|
+
interface PageNavProps extends ComponentBase {
|
|
1168
|
+
to: string;
|
|
1169
|
+
direction: 'prev' | 'next';
|
|
1170
|
+
}
|
|
1171
|
+
declare const PageNav: {
|
|
1172
|
+
({ children, className }: ComponentBase): react_jsx_runtime.JSX.Element;
|
|
1173
|
+
Root: /*elided*/ any;
|
|
1174
|
+
Link: ({ children, to, direction, className, }: PageNavProps) => react_jsx_runtime.JSX.Element;
|
|
1175
|
+
Title: ({ children, className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
1176
|
+
Description: ({ children, className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
1177
|
+
Icon: ({ children }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
1178
|
+
};
|
|
1179
|
+
|
|
1180
|
+
interface TabsItemProps extends ComponentBase {
|
|
1181
|
+
id: string;
|
|
1182
|
+
selected?: boolean;
|
|
1183
|
+
onClick?: () => void;
|
|
1184
|
+
onKeyDown?: (event: React.KeyboardEvent) => void;
|
|
1185
|
+
disabled?: boolean;
|
|
1186
|
+
}
|
|
1187
|
+
interface TabsIndicatorProps extends ComponentBase {
|
|
1188
|
+
style?: React.CSSProperties;
|
|
1189
|
+
}
|
|
1190
|
+
declare const Tabs: {
|
|
1191
|
+
({ children, className, ...props }: ComponentBase): react_jsx_runtime.JSX.Element;
|
|
1192
|
+
Root: /*elided*/ any;
|
|
1193
|
+
List: ({ children, className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
1194
|
+
Item: ({ children, id, selected, className, ...props }: TabsItemProps) => react_jsx_runtime.JSX.Element;
|
|
1195
|
+
Content: ({ children, className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
1196
|
+
Indicator: ({ className, style, }: TabsIndicatorProps) => react_jsx_runtime.JSX.Element;
|
|
1197
|
+
};
|
|
1198
|
+
|
|
1199
|
+
interface SidebarGroupProps extends ComponentBase {
|
|
1200
|
+
title?: string;
|
|
1201
|
+
icon?: React.ElementType;
|
|
1202
|
+
isOpen?: boolean;
|
|
1203
|
+
onToggle?: () => void;
|
|
1204
|
+
}
|
|
1205
|
+
interface SidebarLinkProps extends ComponentBase {
|
|
1206
|
+
label: string;
|
|
1207
|
+
href: string;
|
|
1208
|
+
active?: boolean;
|
|
1209
|
+
icon?: React.ElementType;
|
|
1210
|
+
badge?: ComponentRoute['badge'];
|
|
1211
|
+
}
|
|
1212
|
+
declare const Sidebar: {
|
|
1213
|
+
({ children, className }: ComponentBase): react_jsx_runtime.JSX.Element;
|
|
1214
|
+
Root: /*elided*/ any;
|
|
1215
|
+
Group: ({ children, title, icon: Icon, isOpen, onToggle, className, }: SidebarGroupProps) => react_jsx_runtime.JSX.Element;
|
|
1216
|
+
GroupItem: ({ children, className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
1217
|
+
Link: ({ label, href, active, icon: Icon, badge, className, }: SidebarLinkProps) => react_jsx_runtime.JSX.Element;
|
|
1218
|
+
};
|
|
1219
|
+
|
|
1220
|
+
declare const Breadcrumbs: {
|
|
1221
|
+
({ children, className, ...props }: ComponentBase): react_jsx_runtime.JSX.Element;
|
|
1222
|
+
Root: /*elided*/ any;
|
|
1223
|
+
Item: ({ children, className, ...props }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
1224
|
+
Link: ({ children, href, className, ...props }: LinkProps$3 & {
|
|
1225
|
+
className?: string;
|
|
1226
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
1227
|
+
Separator: ({ className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
1228
|
+
};
|
|
1229
|
+
|
|
1230
|
+
interface ButtonGroupProps extends ComponentBase {
|
|
1231
|
+
vertical?: boolean;
|
|
1232
|
+
}
|
|
1233
|
+
declare const ButtonGroup: ({ children, className, vertical, }: ButtonGroupProps) => react_jsx_runtime.JSX.Element;
|
|
1234
|
+
|
|
1235
|
+
interface PopoverProps extends Omit<RAC.PopoverProps, 'children'> {
|
|
1236
|
+
children: React.ReactNode;
|
|
1237
|
+
className?: string;
|
|
1238
|
+
showArrow?: boolean;
|
|
1239
|
+
}
|
|
1240
|
+
/**
|
|
1241
|
+
* A reusable Popover primitive with premium glassmorphism styling and smooth animations.
|
|
1242
|
+
*/
|
|
1243
|
+
declare const Popover: ({ children, className, showArrow, ...props }: PopoverProps) => react_jsx_runtime.JSX.Element;
|
|
1244
|
+
|
|
1245
|
+
/**
|
|
1246
|
+
* MenuTrigger wraps a trigger (usually a Button) and a Menu.
|
|
1247
|
+
*/
|
|
1248
|
+
interface MenuTriggerProps extends RAC.MenuTriggerProps {
|
|
1249
|
+
placement?: PopoverProps['placement'];
|
|
1250
|
+
}
|
|
1251
|
+
declare function MenuTrigger(props: MenuTriggerProps): react_jsx_runtime.JSX.Element;
|
|
1252
|
+
/**
|
|
1253
|
+
* SubmenuTrigger for nested menus.
|
|
1254
|
+
*/
|
|
1255
|
+
declare function SubmenuTrigger(props: RAC.SubmenuTriggerProps): react_jsx_runtime.JSX.Element;
|
|
1256
|
+
/**
|
|
1257
|
+
* The Menu container.
|
|
1258
|
+
*/
|
|
1259
|
+
declare function Menu<T extends object>(props: RAC.MenuProps<T>): react_jsx_runtime.JSX.Element;
|
|
1260
|
+
declare namespace Menu {
|
|
1261
|
+
var Root: typeof Menu;
|
|
1262
|
+
var Item: typeof MenuItem;
|
|
1263
|
+
var Trigger: typeof MenuTrigger;
|
|
1264
|
+
var SubTrigger: typeof SubmenuTrigger;
|
|
1265
|
+
var Section: typeof MenuSection;
|
|
1266
|
+
var Separator: typeof MenuSeparator;
|
|
1267
|
+
}
|
|
1268
|
+
/**
|
|
1269
|
+
* MenuItem with support for selection states and submenus.
|
|
1270
|
+
*/
|
|
1271
|
+
declare function MenuItem(props: RAC.MenuItemProps): react_jsx_runtime.JSX.Element;
|
|
1272
|
+
/**
|
|
1273
|
+
* MenuSection for grouping items with an optional header.
|
|
1274
|
+
*/
|
|
1275
|
+
interface MenuSectionProps<T> extends RAC.MenuSectionProps<T> {
|
|
1276
|
+
title?: string;
|
|
1277
|
+
}
|
|
1278
|
+
declare function MenuSection<T extends object>({ title, ...props }: MenuSectionProps<T>): react_jsx_runtime.JSX.Element;
|
|
1279
|
+
/**
|
|
1280
|
+
* MenuSeparator for visual division.
|
|
1281
|
+
*/
|
|
1282
|
+
declare function MenuSeparator(props: RAC.SeparatorProps): react_jsx_runtime.JSX.Element;
|
|
1283
|
+
|
|
1284
|
+
interface TooltipProps extends Omit<RAC.TooltipProps, 'children'> {
|
|
1285
|
+
/** The content to show inside the tooltip */
|
|
1286
|
+
content: ReactNode;
|
|
1287
|
+
/** The trigger element (usually a button or link) */
|
|
1288
|
+
children: React.ReactElement;
|
|
1289
|
+
/** Delay in milliseconds before showing the tooltip */
|
|
1290
|
+
delay?: number;
|
|
1291
|
+
/** Delay in milliseconds before hiding the tooltip */
|
|
1292
|
+
closeDelay?: number;
|
|
1293
|
+
}
|
|
1294
|
+
interface TooltipContentProps extends RAC.TooltipProps {
|
|
1295
|
+
}
|
|
1296
|
+
declare const Tooltip: {
|
|
1297
|
+
({ content, children, delay, closeDelay, ...props }: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
1298
|
+
Root: /*elided*/ any;
|
|
1299
|
+
Content: ({ className, children, ...props }: TooltipContentProps) => react_jsx_runtime.JSX.Element;
|
|
1300
|
+
};
|
|
1301
|
+
|
|
1302
|
+
interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
1303
|
+
variant?: 'rect' | 'circle';
|
|
1304
|
+
}
|
|
1305
|
+
/**
|
|
1306
|
+
* A flexible skeleton component that mimics the shape of content
|
|
1307
|
+
* while it is loading. Features a smooth pulse animation.
|
|
1308
|
+
*/
|
|
1309
|
+
declare function Skeleton({ className, variant, ...props }: SkeletonProps): react_jsx_runtime.JSX.Element;
|
|
1310
|
+
|
|
1311
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
1312
|
+
|
|
1313
|
+
export { Admonition, type AdmonitionProps, AnchorProvider, Badge, type BadgeProps, type BoltdocsConfig, type BoltdocsThemeConfig, Breadcrumbs$1 as Breadcrumbs, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Cards, type CardsProps, Caution, CodeBlock, ComponentPreview, type ComponentPreviewProps, ComponentProps, type ComponentPropsProps, type ComponentRoute, CopyMarkdown, type CreateBoltdocsAppOptions, Danger, DefaultLayout, DocsLayout, ErrorBoundary, Field, type FieldProps, FileTree, type FileTreeProps, Head, Image, type ImageProps, Important, InfoBox, type LayoutProps$1 as LayoutProps, Link, type LinkProps, List, type ListProps, Loading, Navbar$1 as Navbar, NotFound, Note, OnThisPage$1 as OnThisPage, PageNav$1 as PageNav, Breadcrumbs as PrimitiveBreadcrumbs, Button$1 as PrimitiveButton, Link$1 as PrimitiveLink, Menu as PrimitiveMenu, NavLink as PrimitiveNavLink, Navbar as PrimitiveNavbar, NavigationMenu as PrimitiveNavigationMenu, OnThisPage as PrimitiveOnThisPage, PageNav as PrimitivePageNav, Popover as PrimitivePopover, Sidebar as PrimitiveSidebar, Skeleton as PrimitiveSkeleton, Tabs as PrimitiveTabs, Tooltip as PrimitiveTooltip, ScrollProvider, SearchDialog as SearchDialogPrimitive, Sidebar$1 as Sidebar, Tab, type TabProps, Table, type TableProps, Tabs$1 as Tabs, type TabsProps, Tip, Video, Warning, cn, createBoltdocsApp, useActiveAnchor, useActiveAnchors, useBreadcrumbs, useConfig, useI18n, useItems, useLocalizedTo, useLocation, useMdxComponents, useNavbar, useOnThisPage, usePageNav, useRoutes, useSearch, useSidebar, useTabs, useTheme, useVersion };
|