boltdocs 2.6.2 → 2.7.1
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/bin/boltdocs.js +0 -1
- package/dist/cache-CQKlT4fI.mjs +6 -0
- package/dist/cache-DorPMFgW.cjs +6 -0
- package/dist/cards-BLoSiRuL.d.ts +30 -0
- package/dist/cards-CQn9mXZS.d.cts +30 -0
- package/dist/chunk-Ds5LZdWN.cjs +6 -0
- package/dist/client/index.cjs +1 -1
- package/dist/client/index.d.cts +168 -1339
- package/dist/client/index.d.ts +167 -1338
- package/dist/client/index.js +1 -1
- package/dist/{package-CFP44vfn.cjs → client/mdx.cjs} +1 -1
- package/dist/client/mdx.d.cts +128 -0
- package/dist/client/mdx.d.ts +129 -0
- package/dist/client/mdx.js +6 -0
- package/dist/client/primitives.cjs +6 -0
- package/dist/client/primitives.d.cts +818 -0
- package/dist/client/primitives.d.ts +818 -0
- package/dist/client/primitives.js +6 -0
- package/dist/client/theme/neutral.css +74 -361
- package/dist/client/theme/reset.css +189 -0
- package/dist/docs-layout-BlDhcQRv.cjs +6 -0
- package/dist/docs-layout-BvAOWEJw.js +6 -0
- package/dist/doctor-BQiQhCTl.cjs +6 -0
- package/dist/doctor-COpf35L2.cjs +20 -0
- package/dist/doctor-Dh1XP7Pz.mjs +20 -0
- package/dist/generator-DGW6pkCC.cjs +22 -0
- package/dist/generator-Dv3wEmhZ.mjs +22 -0
- package/dist/icons-dev-CrQLjoQp.js +6 -0
- package/dist/icons-dev-rzdz6Lf3.cjs +6 -0
- package/dist/image-BkIfa9oo.js +6 -0
- package/dist/image-DIGjCPe6.cjs +6 -0
- package/dist/mdx-K0WYBAJ3.js +7 -0
- package/dist/mdx-hpErbRUe.cjs +7 -0
- package/dist/meta-loader-0gJ4PtBC.cjs +6 -0
- package/dist/meta-loader-9IpAHWDS.mjs +6 -0
- package/dist/node/cli-entry.cjs +1 -2
- package/dist/node/cli-entry.mjs +1 -2
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.d.cts +55 -11
- package/dist/node/index.d.mts +55 -12
- package/dist/node/index.mjs +1 -1
- package/dist/node/routes/worker.cjs +6 -0
- package/dist/node/routes/worker.d.cts +2 -0
- package/dist/node/routes/worker.d.mts +2 -0
- package/dist/node/routes/worker.mjs +6 -0
- package/dist/node-BzKYJJuY.cjs +111 -0
- package/dist/node-m6fKXXVs.mjs +111 -0
- package/dist/{package-Bqbn1AYK.mjs → package-2TVh81ZC.mjs} +1 -1
- package/dist/package-D1O_gJub.cjs +6 -0
- package/dist/parser-Bh11BsdA.cjs +6 -0
- package/dist/parser-D8eQvE7N.mjs +6 -0
- package/dist/parser-DYRzXWmA.cjs +6 -0
- package/dist/routes-CHf76Ye4.cjs +6 -0
- package/dist/routes-CMUZGI6T.mjs +6 -0
- package/dist/routes-Co1mRM58.cjs +6 -0
- package/dist/search-dialog-BACuzoVX.cjs +6 -0
- package/dist/search-dialog-BKagVT17.js +6 -0
- package/dist/search-dialog-C8w12eUx.js +6 -0
- package/dist/search-dialog-CGyrozZE.cjs +6 -0
- package/dist/search-dialog-D26rUnJ_.cjs +6 -0
- package/dist/sidebar-DKvg6KOc.d.cts +491 -0
- package/dist/sidebar-Dr1TiRIy.d.ts +491 -0
- package/dist/utils-BxNAXhZZ.mjs +7 -0
- package/dist/utils-Clzu7jvb.cjs +7 -0
- package/dist/worker-pool-Bd8Y9KDv.mjs +6 -0
- package/dist/worker-pool-BwU8ckrg.cjs +6 -0
- package/package.json +27 -8
- package/src/client/app/doc-page.tsx +9 -5
- package/src/client/app/docs-layout.tsx +17 -3
- package/src/client/app/head.tsx +122 -0
- package/src/client/app/helmet-compat.tsx +36 -0
- package/src/client/app/mdx-component.tsx +5 -52
- package/src/client/app/mdx-components-context.tsx +32 -8
- package/src/client/app/routes-context.tsx +2 -2
- package/src/client/app/scroll-handler.tsx +1 -1
- package/src/client/app/theme-context.tsx +5 -5
- package/src/client/app/ui-context.tsx +42 -0
- package/src/client/components/docs-layout-default.tsx +85 -0
- package/src/client/components/icons-dev.tsx +38 -15
- package/src/client/components/mdx/callout.tsx +97 -0
- package/src/client/components/mdx/card.tsx +73 -98
- package/src/client/components/mdx/cards.tsx +27 -0
- package/src/client/components/mdx/code-block.tsx +37 -17
- package/src/client/components/mdx/field.tsx +24 -56
- package/src/client/components/mdx/image.tsx +36 -15
- package/src/client/components/mdx/index.ts +19 -53
- package/src/client/components/mdx/table.tsx +46 -148
- package/src/client/components/mdx/typographics.tsx +120 -0
- package/src/client/components/mdx/{hooks/use-code-block.ts → use-code-block.ts} +5 -7
- package/src/client/components/primitives/breadcrumbs.tsx +5 -24
- package/src/client/components/primitives/button.tsx +3 -142
- package/src/client/components/primitives/code-block.tsx +104 -97
- package/src/client/components/{docs-layout.tsx → primitives/docs-layout.tsx} +15 -24
- package/src/client/components/primitives/error-boundary.tsx +107 -0
- package/src/client/components/primitives/heading.tsx +128 -0
- package/src/client/components/primitives/helpers/observer.ts +62 -32
- package/src/client/components/primitives/image.tsx +26 -0
- package/src/client/components/primitives/link.tsx +50 -52
- package/src/client/components/primitives/menu.tsx +25 -49
- package/src/client/components/primitives/navbar.tsx +234 -59
- package/src/client/components/primitives/on-this-page.tsx +169 -40
- package/src/client/components/primitives/page-nav.tsx +11 -39
- package/src/client/components/primitives/popover.tsx +12 -30
- package/src/client/components/primitives/search-dialog.tsx +77 -71
- package/src/client/components/primitives/sidebar.tsx +312 -119
- package/src/client/components/primitives/skeleton.tsx +1 -1
- package/src/client/components/primitives/tabs.tsx +5 -16
- package/src/client/components/primitives/tooltip.tsx +1 -1
- package/src/client/components/ui-base/banner.tsx +66 -0
- package/src/client/components/ui-base/breadcrumbs.tsx +26 -20
- package/src/client/components/ui-base/copy-markdown.tsx +43 -35
- package/src/client/components/ui-base/error-boundary.tsx +9 -46
- package/src/client/components/ui-base/github-stars.tsx +5 -3
- package/src/client/components/ui-base/index.ts +3 -3
- package/src/client/components/ui-base/last-updated.tsx +27 -0
- package/src/client/components/ui-base/navbar.tsx +183 -89
- package/src/client/components/ui-base/not-found.tsx +11 -9
- package/src/client/components/ui-base/on-this-page.tsx +8 -104
- package/src/client/components/ui-base/page-nav.tsx +23 -9
- package/src/client/components/ui-base/search-dialog.tsx +111 -36
- package/src/client/components/ui-base/search-highlight.tsx +10 -0
- package/src/client/components/ui-base/sidebar.tsx +77 -154
- package/src/client/components/ui-base/tabs.tsx +20 -7
- package/src/client/components/ui-base/theme-toggle.tsx +88 -10
- package/src/client/components/ui-base/version-i18n.tsx +80 -0
- package/src/client/hooks/index.ts +2 -1
- package/src/client/hooks/use-analytics.ts +272 -0
- package/src/client/hooks/use-i18n.ts +116 -50
- package/src/client/hooks/use-localized-to.ts +70 -27
- package/src/client/hooks/use-navbar.ts +69 -39
- package/src/client/hooks/use-page-nav.ts +28 -25
- package/src/client/hooks/use-routes.ts +63 -80
- package/src/client/hooks/use-search-highlight.ts +185 -0
- package/src/client/hooks/use-search.ts +12 -3
- package/src/client/hooks/use-sidebar.ts +183 -80
- package/src/client/hooks/use-tabs.ts +3 -4
- package/src/client/hooks/use-version.ts +44 -29
- package/src/client/index.ts +13 -87
- package/src/client/mdx.ts +2 -0
- package/src/client/primitives.ts +19 -0
- package/src/client/ssg/boltdocs-shell.tsx +68 -79
- package/src/client/ssg/create-routes.tsx +268 -72
- package/src/client/ssg/index.ts +1 -0
- package/src/client/ssg/mdx-page.tsx +2 -1
- package/src/client/store/boltdocs-context.tsx +72 -20
- package/src/client/theme/neutral.css +74 -361
- package/src/client/theme/reset.css +189 -0
- package/src/client/types.ts +10 -2
- package/src/client/utils/path.ts +9 -0
- package/src/client/utils/react-to-text.ts +24 -24
- package/src/client/virtual.d.ts +1 -1
- package/src/shared/types.ts +82 -22
- package/dist/node-Bogvkxao.mjs +0 -101
- package/dist/node-CXaog6St.cjs +0 -101
- package/dist/search-dialog-CV3eJzMm.cjs +0 -6
- package/dist/search-dialog-DNTomKgu.js +0 -6
- package/dist/use-search-CS3gH19M.js +0 -6
- package/dist/use-search-DBpJZQuw.cjs +0 -6
- package/src/client/components/mdx/admonition.tsx +0 -91
- package/src/client/components/mdx/badge.tsx +0 -41
- package/src/client/components/mdx/button.tsx +0 -35
- package/src/client/components/mdx/component-preview.tsx +0 -37
- package/src/client/components/mdx/component-props.tsx +0 -83
- package/src/client/components/mdx/file-tree.tsx +0 -325
- package/src/client/components/mdx/hooks/use-component-preview.ts +0 -16
- package/src/client/components/mdx/hooks/useTable.ts +0 -74
- package/src/client/components/mdx/hooks/useTabs.ts +0 -68
- package/src/client/components/mdx/link.tsx +0 -38
- package/src/client/components/mdx/list.tsx +0 -192
- package/src/client/components/mdx/tabs.tsx +0 -135
- package/src/client/components/mdx/video.tsx +0 -68
- package/src/client/components/primitives/index.ts +0 -19
- package/src/client/components/primitives/navigation-menu.tsx +0 -114
- package/src/client/components/ui-base/head.tsx +0 -83
- package/src/client/components/ui-base/loading.tsx +0 -57
- package/src/client/components/ui-base/powered-by.tsx +0 -25
- package/src/client/hooks/use-onthispage.ts +0 -23
- package/src/client/utils/use-on-change.ts +0 -15
|
@@ -0,0 +1,491 @@
|
|
|
1
|
+
|
|
2
|
+
import * as React$2 from "react";
|
|
3
|
+
import { ComponentType, ReactNode } from "react";
|
|
4
|
+
import { Plugin } from "vite";
|
|
5
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/shared/types.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* Represents a single social link in the configuration.
|
|
10
|
+
*/
|
|
11
|
+
interface BoltdocsSocialLink {
|
|
12
|
+
icon: 'discord' | 'x' | 'github' | 'bluesky' | string;
|
|
13
|
+
link: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Configuration for the site footer.
|
|
17
|
+
*/
|
|
18
|
+
interface BoltdocsFooterConfig {
|
|
19
|
+
text?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Theme-specific configuration options.
|
|
23
|
+
*/
|
|
24
|
+
interface BoltdocsThemeConfig {
|
|
25
|
+
title?: string | Record<string, string>;
|
|
26
|
+
description?: string | Record<string, string>;
|
|
27
|
+
logo?: string | {
|
|
28
|
+
dark: string;
|
|
29
|
+
light: string;
|
|
30
|
+
alt?: string;
|
|
31
|
+
width?: number;
|
|
32
|
+
height?: number;
|
|
33
|
+
};
|
|
34
|
+
navbar?: Array<{
|
|
35
|
+
label: string | Record<string, string>;
|
|
36
|
+
href: string;
|
|
37
|
+
items?: Array<{
|
|
38
|
+
label: string | Record<string, string>;
|
|
39
|
+
href: string;
|
|
40
|
+
}>;
|
|
41
|
+
}>;
|
|
42
|
+
sidebar?: Record<string, Array<{
|
|
43
|
+
text: string;
|
|
44
|
+
link: string;
|
|
45
|
+
}>>;
|
|
46
|
+
sidebarGroups?: Record<string, {
|
|
47
|
+
title?: string | Record<string, string>;
|
|
48
|
+
icon?: string;
|
|
49
|
+
}>;
|
|
50
|
+
socialLinks?: BoltdocsSocialLink[];
|
|
51
|
+
footer?: BoltdocsFooterConfig;
|
|
52
|
+
editLink?: string;
|
|
53
|
+
communityHelp?: string;
|
|
54
|
+
version?: string;
|
|
55
|
+
githubRepo?: string;
|
|
56
|
+
favicon?: string;
|
|
57
|
+
tabs?: Array<{
|
|
58
|
+
id: string;
|
|
59
|
+
text: string | Record<string, string>;
|
|
60
|
+
icon?: string;
|
|
61
|
+
}>;
|
|
62
|
+
codeTheme?: ShikiTheme | {
|
|
63
|
+
light: ShikiTheme;
|
|
64
|
+
dark: ShikiTheme;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* List of supported syntax highlighting themes.
|
|
69
|
+
*/
|
|
70
|
+
type ShikiTheme = 'github-dark' | 'github-light' | 'tokyo-night' | 'dracula' | 'nord' | 'one-dark-pro' | 'one-light';
|
|
71
|
+
/**
|
|
72
|
+
* Configuration for the robots.txt file.
|
|
73
|
+
*/
|
|
74
|
+
type BoltdocsRobotsConfig = string | {
|
|
75
|
+
rules?: Array<{
|
|
76
|
+
userAgent: string;
|
|
77
|
+
allow?: string | string[];
|
|
78
|
+
disallow?: string | string[];
|
|
79
|
+
}>;
|
|
80
|
+
sitemaps?: string[];
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Configuration for a specific locale.
|
|
84
|
+
*/
|
|
85
|
+
interface BoltdocsLocaleConfig {
|
|
86
|
+
label?: string;
|
|
87
|
+
direction?: 'ltr' | 'rtl';
|
|
88
|
+
htmlLang?: string;
|
|
89
|
+
calendar?: string;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Configuration for internationalization (i18n).
|
|
93
|
+
*/
|
|
94
|
+
interface BoltdocsI18nConfig {
|
|
95
|
+
defaultLocale: string;
|
|
96
|
+
locales: string[] | Record<string, string>;
|
|
97
|
+
localeConfigs?: Record<string, BoltdocsLocaleConfig>;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Configuration for a specific documentation version.
|
|
101
|
+
*/
|
|
102
|
+
interface BoltdocsVersionConfig {
|
|
103
|
+
label: string;
|
|
104
|
+
path: string;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Configuration for documentation versioning.
|
|
108
|
+
*/
|
|
109
|
+
interface BoltdocsVersionsConfig {
|
|
110
|
+
defaultVersion: string;
|
|
111
|
+
prefix?: string;
|
|
112
|
+
versions: BoltdocsVersionConfig[];
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Defines a Boltdocs plugin.
|
|
116
|
+
*/
|
|
117
|
+
interface BoltdocsPlugin {
|
|
118
|
+
name: string;
|
|
119
|
+
enforce?: 'pre' | 'post';
|
|
120
|
+
version?: string;
|
|
121
|
+
boltdocsVersion?: string;
|
|
122
|
+
permissions?: string[];
|
|
123
|
+
remarkPlugins?: unknown[];
|
|
124
|
+
rehypePlugins?: unknown[];
|
|
125
|
+
vitePlugins?: Plugin[];
|
|
126
|
+
components?: Record<string, string>;
|
|
127
|
+
hooks?: Record<string, any>;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Configuration for security-related settings.
|
|
131
|
+
*/
|
|
132
|
+
interface BoltdocsSecurityConfig {
|
|
133
|
+
headers?: Record<string, string>;
|
|
134
|
+
enableCSP?: boolean;
|
|
135
|
+
customHeaders?: Record<string, string>;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Configuration for SEO.
|
|
139
|
+
*/
|
|
140
|
+
interface BoltdocsSeoConfig {
|
|
141
|
+
metatags?: Record<string, string>;
|
|
142
|
+
indexing?: 'all' | 'public';
|
|
143
|
+
thumbnails?: {
|
|
144
|
+
background?: string;
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Configuration for Google Analytics 4 (GA4).
|
|
149
|
+
*/
|
|
150
|
+
interface BoltdocsGA4Config {
|
|
151
|
+
measurementId: string;
|
|
152
|
+
debug?: boolean;
|
|
153
|
+
anonymizeIp?: boolean;
|
|
154
|
+
sendPageView?: boolean;
|
|
155
|
+
cookieFlags?: string;
|
|
156
|
+
autoTrack?: {
|
|
157
|
+
pageViews?: boolean;
|
|
158
|
+
downloads?: boolean;
|
|
159
|
+
externalLinks?: boolean;
|
|
160
|
+
search?: boolean;
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Configuration for Google Tag Manager (GTM).
|
|
165
|
+
*/
|
|
166
|
+
interface BoltdocsGTMConfig {
|
|
167
|
+
tagId: string;
|
|
168
|
+
dataLayerName?: string;
|
|
169
|
+
preview?: string;
|
|
170
|
+
}
|
|
171
|
+
interface BoltdocsIntegrationsConfig {
|
|
172
|
+
ga4?: BoltdocsGA4Config;
|
|
173
|
+
gtm?: BoltdocsGTMConfig;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* The root configuration object for Boltdocs.
|
|
177
|
+
*/
|
|
178
|
+
interface BoltdocsConfig$1 {
|
|
179
|
+
siteUrl?: string;
|
|
180
|
+
docsDir?: string;
|
|
181
|
+
base?: string;
|
|
182
|
+
theme?: BoltdocsThemeConfig;
|
|
183
|
+
i18n?: BoltdocsI18nConfig;
|
|
184
|
+
versions?: BoltdocsVersionsConfig;
|
|
185
|
+
plugins?: BoltdocsPlugin[];
|
|
186
|
+
robots?: BoltdocsRobotsConfig;
|
|
187
|
+
security?: BoltdocsSecurityConfig;
|
|
188
|
+
seo?: BoltdocsSeoConfig;
|
|
189
|
+
integrations?: BoltdocsIntegrationsConfig;
|
|
190
|
+
/** Aggregated metadata from local meta.json files */
|
|
191
|
+
directoryMeta?: Record<string, any>;
|
|
192
|
+
vite?: any;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Global namespace for Boltdocs types that can be augmented by generated code.
|
|
196
|
+
* This allows for strictly typed locales and versions based on the project configuration.
|
|
197
|
+
*/
|
|
198
|
+
declare global {
|
|
199
|
+
namespace Boltdocs {
|
|
200
|
+
interface Types {}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
type BoltdocsTypes = Boltdocs.Types;
|
|
204
|
+
type BoltdocsLocale = Boltdocs.Types extends {
|
|
205
|
+
Locale: infer L;
|
|
206
|
+
} ? L : string;
|
|
207
|
+
type BoltdocsVersion = Boltdocs.Types extends {
|
|
208
|
+
Version: infer V;
|
|
209
|
+
} ? V : string;
|
|
210
|
+
type UnpackMdxComponents<T> = T extends {
|
|
211
|
+
default: infer D;
|
|
212
|
+
} ? D : T;
|
|
213
|
+
type TransformMdxComponents<T> = { [K in keyof T as K extends `Frontmatter_${string}` ? never : K]: T[K] } & {
|
|
214
|
+
Frontmatter: { [K in keyof T as K extends `Frontmatter_${infer Name}` ? Name : never]: T[K] };
|
|
215
|
+
};
|
|
216
|
+
type BoltdocsMdxComponents = Boltdocs.Types extends {
|
|
217
|
+
MdxComponents: infer M;
|
|
218
|
+
} ? TransformMdxComponents<UnpackMdxComponents<M>> : {
|
|
219
|
+
[key: string]: ComponentType<any>;
|
|
220
|
+
Frontmatter: Record<string, ComponentType<any>>;
|
|
221
|
+
};
|
|
222
|
+
//#endregion
|
|
223
|
+
//#region src/client/types.d.ts
|
|
224
|
+
/**
|
|
225
|
+
* Metadata provided by the server for a specific route.
|
|
226
|
+
* Maps closely to the `RouteMeta` type in the Node environment.
|
|
227
|
+
*/
|
|
228
|
+
interface ComponentRoute {
|
|
229
|
+
/** The final URL path */
|
|
230
|
+
path: string;
|
|
231
|
+
/** The absolute filesystem path of the source file */
|
|
232
|
+
componentPath: string;
|
|
233
|
+
/** The page title */
|
|
234
|
+
title: string;
|
|
235
|
+
/** Explicit order in the sidebar */
|
|
236
|
+
sidebarPosition?: number;
|
|
237
|
+
/** The relative path from the docs directory */
|
|
238
|
+
filePath: string;
|
|
239
|
+
/** The group directory name */
|
|
240
|
+
group?: string;
|
|
241
|
+
/** The display title of the group */
|
|
242
|
+
groupTitle?: string;
|
|
243
|
+
/** Explicit order of the group in the sidebar */
|
|
244
|
+
groupPosition?: number;
|
|
245
|
+
/** Extracted markdown headings for search indexing */
|
|
246
|
+
headings?: {
|
|
247
|
+
level: number;
|
|
248
|
+
text: string;
|
|
249
|
+
id: string;
|
|
250
|
+
}[];
|
|
251
|
+
/** The page summary or description */
|
|
252
|
+
description?: string;
|
|
253
|
+
/** The locale this route belongs to, if i18n is configured */
|
|
254
|
+
locale?: string;
|
|
255
|
+
/** The version this route belongs to, if versioning is configured */
|
|
256
|
+
version?: string;
|
|
257
|
+
/** Optional icon to display (Lucide icon name or raw SVG) */
|
|
258
|
+
icon?: string;
|
|
259
|
+
/** The tab this route belongs to, if tabs are configured */
|
|
260
|
+
tab?: string;
|
|
261
|
+
/** Optional badge to display next to the sidebar item */
|
|
262
|
+
badge?: string | {
|
|
263
|
+
text: 'updated' | 'new' | 'deprecated';
|
|
264
|
+
expires?: string;
|
|
265
|
+
};
|
|
266
|
+
/** Optional icon for the route's group */
|
|
267
|
+
groupIcon?: string;
|
|
268
|
+
/** The sub-route group this route belongs to (from folders starting with _) */
|
|
269
|
+
subRouteGroup?: string;
|
|
270
|
+
/** The nested sub-routes if this route acts as the parent of a subRouteGroup */
|
|
271
|
+
subRoutes?: ComponentRoute[];
|
|
272
|
+
/** The extracted plain-text content of the page for search indexing */
|
|
273
|
+
_content?: string;
|
|
274
|
+
/** The raw markdown content of the page */
|
|
275
|
+
_rawContent?: string;
|
|
276
|
+
/** The publication date */
|
|
277
|
+
date?: string | Date;
|
|
278
|
+
/** The last updated timestamp or date */
|
|
279
|
+
lastUpdated?: string | number | Date;
|
|
280
|
+
/** Raw extensible frontmatter data for custom components and formatters */
|
|
281
|
+
frontmatter?: Record<string, any>;
|
|
282
|
+
/** Clean URL segments stripped of locale/version prefixes */
|
|
283
|
+
slugParts?: string[];
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Site configuration provided by the server.
|
|
287
|
+
*/
|
|
288
|
+
type SiteConfig = BoltdocsConfig;
|
|
289
|
+
/**
|
|
290
|
+
* Tab configuration for the documentation site.
|
|
291
|
+
*/
|
|
292
|
+
interface BoltdocsTab {
|
|
293
|
+
id: string;
|
|
294
|
+
/** Text to display (can be a string or a map of translations) */
|
|
295
|
+
text: string | Record<string, string>;
|
|
296
|
+
icon?: string;
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Props for the Sidebar component.
|
|
300
|
+
*/
|
|
301
|
+
interface SidebarProps {
|
|
302
|
+
routes: ComponentRoute[];
|
|
303
|
+
config: BoltdocsConfig;
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Props for the OnThisPage (TOC) component.
|
|
307
|
+
*/
|
|
308
|
+
interface OnThisPageProps {
|
|
309
|
+
headings?: {
|
|
310
|
+
level: number;
|
|
311
|
+
text: string;
|
|
312
|
+
id: string;
|
|
313
|
+
}[];
|
|
314
|
+
editLink?: string;
|
|
315
|
+
communityHelp?: string;
|
|
316
|
+
filePath?: string;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Props for the Tabs component.
|
|
320
|
+
*/
|
|
321
|
+
interface TabsProps {
|
|
322
|
+
tabs: BoltdocsTab[];
|
|
323
|
+
routes: ComponentRoute[];
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Props for user-defined layout components (layout.tsx).
|
|
327
|
+
*/
|
|
328
|
+
interface LayoutProps {
|
|
329
|
+
children: React$2.ReactNode;
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Unified type for navbar links.
|
|
333
|
+
*/
|
|
334
|
+
interface NavbarLink {
|
|
335
|
+
label: string | Record<string, string>;
|
|
336
|
+
href: string;
|
|
337
|
+
active: boolean;
|
|
338
|
+
to?: string;
|
|
339
|
+
items?: NavbarLink[];
|
|
340
|
+
}
|
|
341
|
+
//#endregion
|
|
342
|
+
//#region src/client/components/primitives/types.d.ts
|
|
343
|
+
type ComponentBase = {
|
|
344
|
+
className?: string;
|
|
345
|
+
children?: ReactNode;
|
|
346
|
+
};
|
|
347
|
+
//#endregion
|
|
348
|
+
//#region src/client/components/primitives/sidebar.d.ts
|
|
349
|
+
/**
|
|
350
|
+
* Desktop Sidebar Container
|
|
351
|
+
*/
|
|
352
|
+
declare function SidebarRoot({
|
|
353
|
+
children,
|
|
354
|
+
className
|
|
355
|
+
}: ComponentBase): _$react_jsx_runtime0.JSX.Element;
|
|
356
|
+
/**
|
|
357
|
+
* Mobile Sidebar Modal
|
|
358
|
+
*/
|
|
359
|
+
declare function SidebarMobile({
|
|
360
|
+
children,
|
|
361
|
+
className
|
|
362
|
+
}: ComponentBase): _$react_jsx_runtime0.JSX.Element;
|
|
363
|
+
/**
|
|
364
|
+
* Shared Header for Sidebar
|
|
365
|
+
*/
|
|
366
|
+
declare function SidebarHeader({
|
|
367
|
+
children,
|
|
368
|
+
className
|
|
369
|
+
}: ComponentBase): _$react_jsx_runtime0.JSX.Element;
|
|
370
|
+
/**
|
|
371
|
+
* Scrollable Content Wrapper
|
|
372
|
+
*/
|
|
373
|
+
declare function SidebarContent({
|
|
374
|
+
children,
|
|
375
|
+
className
|
|
376
|
+
}: ComponentBase): _$react_jsx_runtime0.JSX.Element;
|
|
377
|
+
/**
|
|
378
|
+
* Navigation Group
|
|
379
|
+
*/
|
|
380
|
+
declare const SidebarGroup: ({
|
|
381
|
+
title,
|
|
382
|
+
icon: Icon,
|
|
383
|
+
children,
|
|
384
|
+
className
|
|
385
|
+
}: {
|
|
386
|
+
title?: string;
|
|
387
|
+
icon?: React.ElementType;
|
|
388
|
+
} & ComponentBase) => _$react_jsx_runtime0.JSX.Element;
|
|
389
|
+
/**
|
|
390
|
+
* Sidebar Link
|
|
391
|
+
*/
|
|
392
|
+
interface SidebarLinkProps extends ComponentBase {
|
|
393
|
+
label: string;
|
|
394
|
+
href: string;
|
|
395
|
+
active?: boolean;
|
|
396
|
+
icon?: React.ElementType;
|
|
397
|
+
badge?: ComponentRoute['badge'];
|
|
398
|
+
}
|
|
399
|
+
declare const SidebarLink: ({
|
|
400
|
+
label,
|
|
401
|
+
href,
|
|
402
|
+
active,
|
|
403
|
+
icon: Icon,
|
|
404
|
+
badge,
|
|
405
|
+
className
|
|
406
|
+
}: SidebarLinkProps) => _$react_jsx_runtime0.JSX.Element;
|
|
407
|
+
/**
|
|
408
|
+
* Nested SubGroup
|
|
409
|
+
*/
|
|
410
|
+
declare const SidebarSubGroup: ({
|
|
411
|
+
label,
|
|
412
|
+
href,
|
|
413
|
+
active,
|
|
414
|
+
icon: Icon,
|
|
415
|
+
badge,
|
|
416
|
+
isOpen,
|
|
417
|
+
onToggle,
|
|
418
|
+
children,
|
|
419
|
+
className
|
|
420
|
+
}: SidebarLinkProps & {
|
|
421
|
+
isOpen: boolean;
|
|
422
|
+
onToggle: () => void;
|
|
423
|
+
children: ReactNode;
|
|
424
|
+
}) => _$react_jsx_runtime0.JSX.Element;
|
|
425
|
+
/**
|
|
426
|
+
* Automated single-route rendering primitive
|
|
427
|
+
*/
|
|
428
|
+
interface SidebarItemProps extends ComponentBase {
|
|
429
|
+
route: ComponentRoute;
|
|
430
|
+
activePath: string;
|
|
431
|
+
}
|
|
432
|
+
declare function SidebarItem({
|
|
433
|
+
route,
|
|
434
|
+
activePath,
|
|
435
|
+
className
|
|
436
|
+
}: SidebarItemProps): _$react_jsx_runtime0.JSX.Element;
|
|
437
|
+
/**
|
|
438
|
+
* High-level automated routes data rendering primitive
|
|
439
|
+
*/
|
|
440
|
+
interface SidebarItemsProps extends ComponentBase {
|
|
441
|
+
routes: ComponentRoute[];
|
|
442
|
+
}
|
|
443
|
+
declare function SidebarItems({
|
|
444
|
+
routes,
|
|
445
|
+
className
|
|
446
|
+
}: SidebarItemsProps): _$react_jsx_runtime0.JSX.Element;
|
|
447
|
+
/**
|
|
448
|
+
* Main Sidebar Export
|
|
449
|
+
*/
|
|
450
|
+
declare const Sidebar: typeof SidebarRoot & {
|
|
451
|
+
Root: typeof SidebarRoot;
|
|
452
|
+
Mobile: typeof SidebarMobile;
|
|
453
|
+
Header: typeof SidebarHeader;
|
|
454
|
+
Content: typeof SidebarContent;
|
|
455
|
+
Group: ({
|
|
456
|
+
title,
|
|
457
|
+
icon: Icon,
|
|
458
|
+
children,
|
|
459
|
+
className
|
|
460
|
+
}: {
|
|
461
|
+
title?: string;
|
|
462
|
+
icon?: React.ElementType;
|
|
463
|
+
} & ComponentBase) => _$react_jsx_runtime0.JSX.Element;
|
|
464
|
+
Link: ({
|
|
465
|
+
label,
|
|
466
|
+
href,
|
|
467
|
+
active,
|
|
468
|
+
icon: Icon,
|
|
469
|
+
badge,
|
|
470
|
+
className
|
|
471
|
+
}: SidebarLinkProps) => _$react_jsx_runtime0.JSX.Element;
|
|
472
|
+
SubGroup: ({
|
|
473
|
+
label,
|
|
474
|
+
href,
|
|
475
|
+
active,
|
|
476
|
+
icon: Icon,
|
|
477
|
+
badge,
|
|
478
|
+
isOpen,
|
|
479
|
+
onToggle,
|
|
480
|
+
children,
|
|
481
|
+
className
|
|
482
|
+
}: SidebarLinkProps & {
|
|
483
|
+
isOpen: boolean;
|
|
484
|
+
onToggle: () => void;
|
|
485
|
+
children: ReactNode;
|
|
486
|
+
}) => _$react_jsx_runtime0.JSX.Element;
|
|
487
|
+
Item: typeof SidebarItem;
|
|
488
|
+
Items: typeof SidebarItems;
|
|
489
|
+
};
|
|
490
|
+
//#endregion
|
|
491
|
+
export { BoltdocsConfig$1 as C, BoltdocsSocialLink as D, BoltdocsMdxComponents as E, BoltdocsTypes as O, TabsProps as S, BoltdocsLocale as T, LayoutProps as _, SidebarItem as a, SidebarProps as b, SidebarItemsProps as c, SidebarMobile as d, SidebarRoot as f, ComponentRoute as g, BoltdocsTab as h, SidebarHeader as i, BoltdocsVersion as k, SidebarLink as l, ComponentBase as m, SidebarContent as n, SidebarItemProps as o, SidebarSubGroup as p, SidebarGroup as r, SidebarItems as s, Sidebar as t, SidebarLinkProps as u, NavbarLink as v, BoltdocsIntegrationsConfig as w, SiteConfig as x, OnThisPageProps as y };
|