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/types-opDA2E9-.d.ts
DELETED
|
@@ -1,394 +0,0 @@
|
|
|
1
|
-
import React__default from 'react';
|
|
2
|
-
import * as vite from 'vite';
|
|
3
|
-
import { Plugin } from 'vite';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Represents a single social link in the configuration.
|
|
7
|
-
*/
|
|
8
|
-
interface BoltdocsSocialLink {
|
|
9
|
-
/** Identifier for the icon (e.g., 'github') */
|
|
10
|
-
icon: 'discord' | 'x' | 'github' | 'bluesky' | string;
|
|
11
|
-
/** The URL the social link points to */
|
|
12
|
-
link: string;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Configuration for the site footer.
|
|
16
|
-
*/
|
|
17
|
-
interface BoltdocsFooterConfig {
|
|
18
|
-
/** Text to display in the footer (HTML is supported) */
|
|
19
|
-
text?: string;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Theme-specific configuration options governing the appearance and navigation of the site.
|
|
23
|
-
*/
|
|
24
|
-
interface BoltdocsThemeConfig {
|
|
25
|
-
/** The global title of the documentation site (can be translated) */
|
|
26
|
-
title?: string | Record<string, string>;
|
|
27
|
-
/** The global description of the site (can be translated) */
|
|
28
|
-
description?: string | Record<string, string>;
|
|
29
|
-
/** URL path to the site logo or an object for light/dark versions */
|
|
30
|
-
logo?: string | {
|
|
31
|
-
dark: string;
|
|
32
|
-
light: string;
|
|
33
|
-
alt?: string;
|
|
34
|
-
width?: number;
|
|
35
|
-
height?: number;
|
|
36
|
-
};
|
|
37
|
-
/** Items to display in the top navigation bar */
|
|
38
|
-
navbar?: Array<{
|
|
39
|
-
/** Text to display (can be a string or a map of translations) */
|
|
40
|
-
label: string | Record<string, string>;
|
|
41
|
-
/** URL path or external link */
|
|
42
|
-
href: string;
|
|
43
|
-
}>;
|
|
44
|
-
/** Items to display in the sidebar, organized optionally by group URLs */
|
|
45
|
-
sidebar?: Record<string, Array<{
|
|
46
|
-
text: string;
|
|
47
|
-
link: string;
|
|
48
|
-
}>>;
|
|
49
|
-
/** Social links to display in the navigation bar */
|
|
50
|
-
socialLinks?: BoltdocsSocialLink[];
|
|
51
|
-
/** Site footer configuration */
|
|
52
|
-
footer?: BoltdocsFooterConfig;
|
|
53
|
-
/** Whether to show breadcrumbs navigation (default: true) */
|
|
54
|
-
breadcrumbs?: boolean;
|
|
55
|
-
/** URL template for 'Edit this page'. Use :path as a placeholder. */
|
|
56
|
-
editLink?: string;
|
|
57
|
-
/** URL for the 'Community help' link. */
|
|
58
|
-
communityHelp?: string;
|
|
59
|
-
/** The current version of the project (e.g., 'v2.8.9'). Displayed in the Navbar. */
|
|
60
|
-
version?: string;
|
|
61
|
-
/** The GitHub repository in the format 'owner/repo' to fetch and display star count. */
|
|
62
|
-
githubRepo?: string;
|
|
63
|
-
/**
|
|
64
|
-
* URL path to the site favicon.
|
|
65
|
-
* If not specified, the logo will be used if available.
|
|
66
|
-
*/
|
|
67
|
-
favicon?: string;
|
|
68
|
-
/**
|
|
69
|
-
* The Open Graph image URL to display when the site is shared on social media.
|
|
70
|
-
*/
|
|
71
|
-
ogImage?: string;
|
|
72
|
-
/** Whether to show the 'Powered by LiteDocs' badge in the sidebar (default: true) */
|
|
73
|
-
poweredBy?: boolean;
|
|
74
|
-
/**
|
|
75
|
-
* Top-level tabs for organizing documentation groups.
|
|
76
|
-
* Tab discovery uses the (tab-id) directory syntax.
|
|
77
|
-
*/
|
|
78
|
-
tabs?: Array<{
|
|
79
|
-
id: string;
|
|
80
|
-
/** Text to display (can be a string or a map of translations) */
|
|
81
|
-
text: string | Record<string, string>;
|
|
82
|
-
icon?: string;
|
|
83
|
-
}>;
|
|
84
|
-
/**
|
|
85
|
-
* The syntax highlighting theme for code blocks.
|
|
86
|
-
* Supports any Shiki theme name (e.g., 'github-dark', 'one-dark-pro', 'aurora-x').
|
|
87
|
-
* Can also be an object for multiple themes (e.g., { light: 'github-light', dark: 'github-dark' }).
|
|
88
|
-
* Default: { light: 'github-light', dark: 'one-dark-pro' }
|
|
89
|
-
*/
|
|
90
|
-
codeTheme?: string | {
|
|
91
|
-
light: string;
|
|
92
|
-
dark: string;
|
|
93
|
-
};
|
|
94
|
-
/**
|
|
95
|
-
* Configuration for the 'Copy Markdown' button.
|
|
96
|
-
* Can be a boolean or an object with text and icon.
|
|
97
|
-
* Default: true
|
|
98
|
-
*/
|
|
99
|
-
copyMarkdown?: boolean | {
|
|
100
|
-
text?: string;
|
|
101
|
-
icon?: string;
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Configuration for the robots.txt file.
|
|
106
|
-
*/
|
|
107
|
-
type BoltdocsRobotsConfig = string | {
|
|
108
|
-
/** User-agent rules */
|
|
109
|
-
rules?: Array<{
|
|
110
|
-
userAgent: string;
|
|
111
|
-
/** Paths allowed to be crawled */
|
|
112
|
-
allow?: string | string[];
|
|
113
|
-
/** Paths disallowed to be crawled */
|
|
114
|
-
disallow?: string | string[];
|
|
115
|
-
}>;
|
|
116
|
-
/** Sitemaps to include in the robots.txt */
|
|
117
|
-
sitemaps?: string[];
|
|
118
|
-
};
|
|
119
|
-
/**
|
|
120
|
-
* Configuration for a specific locale.
|
|
121
|
-
*/
|
|
122
|
-
interface BoltdocsLocaleConfig {
|
|
123
|
-
/** The display name of the locale */
|
|
124
|
-
label?: string;
|
|
125
|
-
/** The text direction (ltr or rtl) */
|
|
126
|
-
direction?: 'ltr' | 'rtl';
|
|
127
|
-
/** The HTML lang attribute value (e.g., 'en-US') */
|
|
128
|
-
htmlLang?: string;
|
|
129
|
-
/** The calendar system to use (e.g., 'gregory') */
|
|
130
|
-
calendar?: string;
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Configuration for internationalization (i18n).
|
|
134
|
-
*/
|
|
135
|
-
interface BoltdocsI18nConfig {
|
|
136
|
-
/** The default locale (e.g., 'en') */
|
|
137
|
-
defaultLocale: string;
|
|
138
|
-
/** Available locales and their basic display names (e.g., { en: 'English', es: 'Español' }) */
|
|
139
|
-
locales: Record<string, string>;
|
|
140
|
-
/** Detailed configuration for each locale */
|
|
141
|
-
localeConfigs?: Record<string, BoltdocsLocaleConfig>;
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* Configuration for a specific documentation version.
|
|
145
|
-
*/
|
|
146
|
-
interface BoltdocsVersionConfig {
|
|
147
|
-
/** The display name of the version (e.g., 'v2.0') */
|
|
148
|
-
label: string;
|
|
149
|
-
/** The URL path prefix for the version (e.g., '2.0') */
|
|
150
|
-
path: string;
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* Configuration for documentation versioning.
|
|
154
|
-
*/
|
|
155
|
-
interface BoltdocsVersionsConfig {
|
|
156
|
-
/** The default version path (e.g., 'v2') */
|
|
157
|
-
defaultVersion: string;
|
|
158
|
-
/**
|
|
159
|
-
* Optional prefix for all version paths (e.g., 'v').
|
|
160
|
-
* If set to 'v', version '1.1' will be available at '/docs/v1.1'.
|
|
161
|
-
*/
|
|
162
|
-
prefix?: string;
|
|
163
|
-
/** Available versions configurations */
|
|
164
|
-
versions: BoltdocsVersionConfig[];
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* Defines a Boltdocs plugin that can extend the build process and client-side functionality.
|
|
168
|
-
*/
|
|
169
|
-
interface BoltdocsPlugin {
|
|
170
|
-
/** A unique name for the plugin */
|
|
171
|
-
name: string;
|
|
172
|
-
/** Whether to run this plugin before or after default ones (optional) */
|
|
173
|
-
enforce?: 'pre' | 'post';
|
|
174
|
-
/** Optional remark plugins to add to the MDX pipeline */
|
|
175
|
-
remarkPlugins?: unknown[];
|
|
176
|
-
/** Optional rehype plugins to add to the MDX pipeline */
|
|
177
|
-
rehypePlugins?: unknown[];
|
|
178
|
-
/** Optional Vite plugins to inject into the build process */
|
|
179
|
-
vitePlugins?: Plugin[];
|
|
180
|
-
/** Optional custom React components to register in MDX. Map of Name -> Module Path. */
|
|
181
|
-
components?: Record<string, string>;
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* Configuration for external integrations (e.g., CodeSandbox).
|
|
185
|
-
*/
|
|
186
|
-
interface BoltdocsIntegrationsConfig {
|
|
187
|
-
/** CodeSandbox integration settings */
|
|
188
|
-
sandbox?: {
|
|
189
|
-
/** Whether to enable the "Open in Sandbox" button in CodeBlocks */
|
|
190
|
-
enable?: boolean;
|
|
191
|
-
/** Default options for the sandbox (files, dependencies, etc.) */
|
|
192
|
-
config?: Record<string, unknown>;
|
|
193
|
-
};
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* The root configuration object for Boltdocs.
|
|
197
|
-
*/
|
|
198
|
-
interface BoltdocsConfig {
|
|
199
|
-
/** The base URL of the site, used for generating the sitemap */
|
|
200
|
-
siteUrl?: string;
|
|
201
|
-
/** The root directory containing markdown documentation files (default: 'docs') */
|
|
202
|
-
docsDir?: string;
|
|
203
|
-
/** Path to a custom HomePage component */
|
|
204
|
-
homePage?: string;
|
|
205
|
-
/** Configuration pertaining to the UI and appearance */
|
|
206
|
-
theme?: BoltdocsThemeConfig;
|
|
207
|
-
/** Configuration for internationalization */
|
|
208
|
-
i18n?: BoltdocsI18nConfig;
|
|
209
|
-
/** Configuration for documentation versioning */
|
|
210
|
-
versions?: BoltdocsVersionsConfig;
|
|
211
|
-
/** Custom plugins for extending functionality */
|
|
212
|
-
plugins?: BoltdocsPlugin[];
|
|
213
|
-
/** External integrations configuration */
|
|
214
|
-
integrations?: BoltdocsIntegrationsConfig;
|
|
215
|
-
/** Configuration for the robots.txt file */
|
|
216
|
-
robots?: BoltdocsRobotsConfig;
|
|
217
|
-
/** Low-level Vite configuration overrides */
|
|
218
|
-
vite?: vite.InlineConfig;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* Metadata provided by the server for a specific route.
|
|
223
|
-
* Maps closely to the `RouteMeta` type in the Node environment.
|
|
224
|
-
*/
|
|
225
|
-
interface ComponentRoute {
|
|
226
|
-
/** The final URL path */
|
|
227
|
-
path: string;
|
|
228
|
-
/** The absolute filesystem path of the source file */
|
|
229
|
-
componentPath: string;
|
|
230
|
-
/** The page title */
|
|
231
|
-
title: string;
|
|
232
|
-
/** Explicit order in the sidebar */
|
|
233
|
-
sidebarPosition?: number;
|
|
234
|
-
/** The relative path from the docs directory */
|
|
235
|
-
filePath: string;
|
|
236
|
-
/** The group directory name */
|
|
237
|
-
group?: string;
|
|
238
|
-
/** The display title of the group */
|
|
239
|
-
groupTitle?: string;
|
|
240
|
-
/** Explicit order of the group in the sidebar */
|
|
241
|
-
groupPosition?: number;
|
|
242
|
-
/** Extracted markdown headings for search indexing */
|
|
243
|
-
headings?: {
|
|
244
|
-
level: number;
|
|
245
|
-
text: string;
|
|
246
|
-
id: string;
|
|
247
|
-
}[];
|
|
248
|
-
/** The page summary or description */
|
|
249
|
-
description?: string;
|
|
250
|
-
/** The locale this route belongs to, if i18n is configured */
|
|
251
|
-
locale?: string;
|
|
252
|
-
/** The version this route belongs to, if versioning is configured */
|
|
253
|
-
version?: string;
|
|
254
|
-
/** Optional icon to display (Lucide icon name or raw SVG) */
|
|
255
|
-
icon?: string;
|
|
256
|
-
/** The tab this route belongs to, if tabs are configured */
|
|
257
|
-
tab?: string;
|
|
258
|
-
/** Optional badge to display next to the sidebar item */
|
|
259
|
-
badge?: string | {
|
|
260
|
-
text: 'updated' | 'new' | 'deprecated';
|
|
261
|
-
expires?: string;
|
|
262
|
-
};
|
|
263
|
-
/** Optional icon for the route's group */
|
|
264
|
-
groupIcon?: string;
|
|
265
|
-
/** The extracted plain-text content of the page for search indexing */
|
|
266
|
-
_content?: string;
|
|
267
|
-
/** The raw markdown content of the page */
|
|
268
|
-
_rawContent?: string;
|
|
269
|
-
}
|
|
270
|
-
/**
|
|
271
|
-
* Site configuration provided by the server.
|
|
272
|
-
*/
|
|
273
|
-
type SiteConfig = BoltdocsConfig;
|
|
274
|
-
/**
|
|
275
|
-
* Configuration options for initializing the Boltdocs client app.
|
|
276
|
-
*/
|
|
277
|
-
interface CreateBoltdocsAppOptions {
|
|
278
|
-
/** CSS selector for the DOM element where the app should mount (e.g. '#root') */
|
|
279
|
-
target: string;
|
|
280
|
-
/** Initial routes generated by the Vite plugin (`virtual:boltdocs-routes`) */
|
|
281
|
-
routes: ComponentRoute[];
|
|
282
|
-
/** The name of the documentation directory (e.g. 'docs') */
|
|
283
|
-
docsDirName: string;
|
|
284
|
-
/** Site configuration (`virtual:boltdocs-config`) */
|
|
285
|
-
config: SiteConfig;
|
|
286
|
-
/** Dynamic import mapping from `import.meta.glob` for the documentation pages */
|
|
287
|
-
modules: Record<string, () => Promise<{
|
|
288
|
-
default: React__default.ComponentType<any>;
|
|
289
|
-
}>>;
|
|
290
|
-
/** The `import.meta.hot` instance necessary for fast refresh/HMR updates */
|
|
291
|
-
hot?: {
|
|
292
|
-
accept: (cb?: (mod: any) => void) => void;
|
|
293
|
-
dispose: (cb: (data: any) => void) => void;
|
|
294
|
-
on: (event: string, cb: (data: any) => void) => void;
|
|
295
|
-
data: any;
|
|
296
|
-
};
|
|
297
|
-
/** Optional custom React component to render when visiting the root path ('/') */
|
|
298
|
-
homePage?: React__default.ComponentType;
|
|
299
|
-
/** Custom external pages mapped by their route path */
|
|
300
|
-
externalPages?: Record<string, React__default.ComponentType>;
|
|
301
|
-
/** Optional custom layout for external pages */
|
|
302
|
-
externalLayout?: React__default.ComponentType<{
|
|
303
|
-
children: React__default.ReactNode;
|
|
304
|
-
}>;
|
|
305
|
-
/** Optional custom MDX components provided by plugins */
|
|
306
|
-
components?: Record<string, React__default.ComponentType>;
|
|
307
|
-
}
|
|
308
|
-
/**
|
|
309
|
-
* Types for CodeSandbox integration.
|
|
310
|
-
*/
|
|
311
|
-
interface SandboxFile {
|
|
312
|
-
content: string | object;
|
|
313
|
-
isBinary?: boolean;
|
|
314
|
-
}
|
|
315
|
-
type SandboxFiles = Record<string, SandboxFile>;
|
|
316
|
-
interface SandboxOptions {
|
|
317
|
-
files?: SandboxFiles;
|
|
318
|
-
dependencies?: Record<string, string>;
|
|
319
|
-
devDependencies?: Record<string, string>;
|
|
320
|
-
title?: string;
|
|
321
|
-
description?: string;
|
|
322
|
-
template?: string;
|
|
323
|
-
/** The file path to open by default in the editor (e.g. `"src/App.tsx"`). */
|
|
324
|
-
entry?: string;
|
|
325
|
-
/** Options for the embedded iframe view, used by `embedSandbox()`. */
|
|
326
|
-
embed?: SandboxEmbedOptions;
|
|
327
|
-
/** Custom scripts for the package.json (e.g. `{ "start": "vite" }`). */
|
|
328
|
-
scripts?: Record<string, string>;
|
|
329
|
-
/** Optional default theme configuration for the sandbox project. */
|
|
330
|
-
themeConfig?: Record<string, unknown>;
|
|
331
|
-
}
|
|
332
|
-
interface SandboxEmbedOptions {
|
|
333
|
-
/** Which panel to display: `"editor"`, `"preview"`, or `"split"`. */
|
|
334
|
-
view?: 'editor' | 'preview' | 'split';
|
|
335
|
-
/** Color theme: `"dark"` or `"light"`. */
|
|
336
|
-
theme?: 'dark' | 'light';
|
|
337
|
-
/** Whether to hide the navigation bar in the embed. */
|
|
338
|
-
hideNavigation?: boolean;
|
|
339
|
-
}
|
|
340
|
-
/**
|
|
341
|
-
* Tab configuration for the documentation site.
|
|
342
|
-
*/
|
|
343
|
-
interface BoltdocsTab {
|
|
344
|
-
id: string;
|
|
345
|
-
/** Text to display (can be a string or a map of translations) */
|
|
346
|
-
text: string | Record<string, string>;
|
|
347
|
-
icon?: string;
|
|
348
|
-
}
|
|
349
|
-
/**
|
|
350
|
-
* Props for the Sidebar component.
|
|
351
|
-
*/
|
|
352
|
-
interface SidebarProps {
|
|
353
|
-
routes: ComponentRoute[];
|
|
354
|
-
config: BoltdocsConfig;
|
|
355
|
-
}
|
|
356
|
-
/**
|
|
357
|
-
* Props for the OnThisPage (TOC) component.
|
|
358
|
-
*/
|
|
359
|
-
interface OnThisPageProps {
|
|
360
|
-
headings?: {
|
|
361
|
-
level: number;
|
|
362
|
-
text: string;
|
|
363
|
-
id: string;
|
|
364
|
-
}[];
|
|
365
|
-
editLink?: string;
|
|
366
|
-
communityHelp?: string;
|
|
367
|
-
filePath?: string;
|
|
368
|
-
}
|
|
369
|
-
/**
|
|
370
|
-
* Props for the Tabs component.
|
|
371
|
-
*/
|
|
372
|
-
interface TabsProps {
|
|
373
|
-
tabs: BoltdocsTab[];
|
|
374
|
-
routes: ComponentRoute[];
|
|
375
|
-
}
|
|
376
|
-
/**
|
|
377
|
-
* Props for user-defined layout components (layout.tsx).
|
|
378
|
-
*/
|
|
379
|
-
interface LayoutProps {
|
|
380
|
-
children: React__default.ReactNode;
|
|
381
|
-
}
|
|
382
|
-
/**
|
|
383
|
-
* Unified type for navbar links.
|
|
384
|
-
*/
|
|
385
|
-
interface NavbarLink {
|
|
386
|
-
/** Label to display (can be a string or a map of translations) */
|
|
387
|
-
label: string | Record<string, string>;
|
|
388
|
-
href: string;
|
|
389
|
-
active: boolean;
|
|
390
|
-
/** Optional icon or string for external link indication */
|
|
391
|
-
to?: string;
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
export type { BoltdocsConfig as B, ComponentRoute as C, LayoutProps as L, NavbarLink as N, OnThisPageProps as O, SandboxEmbedOptions as S, TabsProps as T, BoltdocsTab as a, CreateBoltdocsAppOptions as b, BoltdocsThemeConfig as c, SandboxFile as d, SandboxFiles as e, SandboxOptions as f, BoltdocsSocialLink as g, SidebarProps as h, SiteConfig as i };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { C as ComponentRoute, B as BoltdocsConfig } from './types-opDA2E9-.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Hook to access the framework's routing state.
|
|
5
|
-
* Returns both the complete set of routes and a filtered list based on the current
|
|
6
|
-
* version and locale.
|
|
7
|
-
*/
|
|
8
|
-
declare function useRoutes(): {
|
|
9
|
-
routes: ComponentRoute[];
|
|
10
|
-
allRoutes: ComponentRoute[];
|
|
11
|
-
currentRoute: ComponentRoute | undefined;
|
|
12
|
-
currentLocale: string | undefined;
|
|
13
|
-
currentLocaleLabel: string | undefined;
|
|
14
|
-
availableLocales: {
|
|
15
|
-
key: string;
|
|
16
|
-
label: string;
|
|
17
|
-
isCurrent: boolean;
|
|
18
|
-
}[];
|
|
19
|
-
currentVersion: string | undefined;
|
|
20
|
-
currentVersionLabel: string | undefined;
|
|
21
|
-
availableVersions: {
|
|
22
|
-
key: string;
|
|
23
|
-
label: string;
|
|
24
|
-
isCurrent: boolean;
|
|
25
|
-
}[];
|
|
26
|
-
config: BoltdocsConfig;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export { useRoutes as u };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { C as ComponentRoute, B as BoltdocsConfig } from './types-opDA2E9-.mjs';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Hook to access the framework's routing state.
|
|
5
|
-
* Returns both the complete set of routes and a filtered list based on the current
|
|
6
|
-
* version and locale.
|
|
7
|
-
*/
|
|
8
|
-
declare function useRoutes(): {
|
|
9
|
-
routes: ComponentRoute[];
|
|
10
|
-
allRoutes: ComponentRoute[];
|
|
11
|
-
currentRoute: ComponentRoute | undefined;
|
|
12
|
-
currentLocale: string | undefined;
|
|
13
|
-
currentLocaleLabel: string | undefined;
|
|
14
|
-
availableLocales: {
|
|
15
|
-
key: string;
|
|
16
|
-
label: string;
|
|
17
|
-
isCurrent: boolean;
|
|
18
|
-
}[];
|
|
19
|
-
currentVersion: string | undefined;
|
|
20
|
-
currentVersionLabel: string | undefined;
|
|
21
|
-
availableVersions: {
|
|
22
|
-
key: string;
|
|
23
|
-
label: string;
|
|
24
|
-
isCurrent: boolean;
|
|
25
|
-
}[];
|
|
26
|
-
config: BoltdocsConfig;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export { useRoutes as u };
|