boltdocs 3.2.2 → 3.3.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/bin/boltdocs.js +20 -1
- package/bin/preloader.mjs +28 -0
- package/dist/{adapters-ByYY44Zy.mjs → adapters-BmB4TKCc.mjs} +1 -1
- package/dist/{adapters-DvmtpdSF.cjs → adapters-Cp1Maurn.cjs} +1 -1
- package/dist/audit-CLXjMzwQ.mjs +11 -0
- package/dist/audit-COgjnQ5n.cjs +11 -0
- package/dist/build-BS2hefiL.cjs +6 -0
- package/dist/build-C5mNh9D-.mjs +6 -0
- package/dist/cache-CJE9nWLE.cjs +6 -0
- package/dist/cache-OY4HzIXl.mjs +6 -0
- package/dist/callout-oI_LCbxS.d.ts +71 -0
- package/dist/callout-plqx9Dw-.d.cts +71 -0
- package/dist/client/index.cjs +1265 -569
- package/dist/client/index.d.cts +3 -542
- package/dist/client/index.d.ts +3 -542
- package/dist/client/index.js +1167 -521
- package/dist/client/mdx.cjs +1 -1
- package/dist/client/mdx.d.cts +24 -2
- package/dist/client/mdx.d.ts +24 -2
- package/dist/client/mdx.js +1 -1
- package/dist/client/primitives.cjs +14 -4
- package/dist/client/primitives.d.cts +281 -38
- package/dist/client/primitives.d.ts +281 -38
- package/dist/client/primitives.js +5 -5
- package/dist/client/router.cjs +49 -0
- package/dist/client/router.d.cts +3 -0
- package/dist/client/router.d.ts +3 -0
- package/dist/client/router.js +8 -0
- package/dist/client/theme/reset.css +40 -4
- package/dist/{config-BpzaPsJj.d.cts → config-BoRlz0Ca.d.mts} +157 -14
- package/dist/{config-xtS0ZkMm.d.mts → config-CTsX_tGM.d.cts} +157 -14
- package/dist/config-Ceib-AOH.cjs +7 -0
- package/dist/config-DGLQsy7y.mjs +7 -0
- package/dist/{package-CH2ChQqw.cjs → config-files-BYHDOrKn.mjs} +1 -1
- package/dist/config-files-D9cdBMl2.cjs +6 -0
- package/dist/config-jJh8WYJI.cjs +6 -0
- package/dist/csp-C4LmN1ko.cjs +6 -0
- package/dist/csp-D6JEOqKh.mjs +6 -0
- package/dist/dev-Ch3hEe5Y.cjs +6 -0
- package/dist/dev-QPNxysrd.mjs +6 -0
- package/dist/{docs-layout-BdtZ9z6s.js → docs-layout-CbZ7LDRe.js} +504 -249
- package/dist/{docs-layout-CFWI15Id.cjs → docs-layout-vzfXed1Q.cjs} +516 -254
- package/dist/{doctor-BBtmNJE0.cjs → doctor-B1_YL0Wt.cjs} +1 -1
- package/dist/doctor-C7whl4ED.cjs +6 -0
- package/dist/doctor-DmQnml2k.mjs +6 -0
- package/dist/{generator-COepVWGi.cjs → generator-BlW45ST7.cjs} +5 -3
- package/dist/{generator-CcOBN5vI.mjs → generator-BwknNejd.mjs} +5 -3
- package/dist/{handler-XX7cLTqe.cjs → handler-CDEoKARD.cjs} +2 -2
- package/dist/{handler-DzQae4eA.mjs → handler-D7UyZlPm.mjs} +2 -2
- package/dist/{image-Bz87fCla.js → image-B-NDSDuY.js} +129 -11
- package/dist/{image-C4TlpMHn.cjs → image-Hnaa2bJd.cjs} +175 -9
- package/dist/index-C56bL-A-.d.cts +1344 -0
- package/dist/{sidebar-COTaMHR-.d.ts → index-CPUUKzxD.d.cts} +344 -327
- package/dist/{sidebar-CrEdJuHX.d.cts → index-Ci4kfOHF.d.ts} +344 -327
- package/dist/index-Cu9H6CRa.d.ts +1344 -0
- package/dist/link-CgdI6O2o.js +872 -0
- package/dist/{link-D1Gjkb-2.cjs → link-vZjmD-es.cjs} +406 -223
- package/dist/{mdx-BuO6a1f7.js → mdx-BRT71V5Q.js} +211 -168
- package/dist/{mdx-CD-tSjRG.cjs → mdx-D0Absdq5.cjs} +225 -169
- package/dist/native-BNCY7PRF.cjs +6 -0
- package/dist/native-Di9Fnfrv.mjs +6 -0
- package/dist/native-Kre2T5eS.cjs +6 -0
- package/dist/node/cache.cjs +1 -1
- package/dist/node/cache.d.cts +19 -3
- package/dist/node/cache.d.mts +19 -3
- package/dist/node/cache.mjs +1 -1
- package/dist/node/cli-entry.cjs +1 -9
- package/dist/node/cli-entry.mjs +1 -9
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.d.cts +245 -17
- package/dist/node/index.d.mts +246 -18
- package/dist/node/index.mjs +1 -1
- package/dist/node/mdx/shiki-adapter.cjs +1 -1
- package/dist/node/mdx/shiki-adapter.d.cts +24 -3
- package/dist/node/mdx/shiki-adapter.d.mts +24 -2
- package/dist/node/mdx/shiki-adapter.mjs +1 -1
- package/dist/node-Du5UL5wo.mjs +23 -0
- package/dist/node-DunuGqyp.cjs +23 -0
- package/dist/{package-DSSB8B5L.mjs → package-DA848keM.mjs} +1 -1
- package/dist/package-wplzySjz.cjs +6 -0
- package/dist/pages-external-BBw8ObVK.mjs +6 -0
- package/dist/pages-external-DPiPFxxP.cjs +6 -0
- package/dist/parser-BqTOsEUa.cjs +6 -0
- package/dist/parser-CGMY2lJ7.mjs +6 -0
- package/dist/plugin-BcTzvHAJ.mjs +69 -0
- package/dist/plugin-TulVMt1z.cjs +69 -0
- package/dist/plugin-context-C-l90hFt.cjs +15 -0
- package/dist/plugin-context-wqHNSZum.mjs +15 -0
- package/dist/plugin-lifecycle-B1BzSHdn.cjs +6 -0
- package/dist/resolve-B7vWOd8R.cjs +6 -0
- package/dist/resolve-C2kKnk_5.mjs +6 -0
- package/dist/resolve-It1Iug83.cjs +6 -0
- package/dist/resolve-YdTrt_FG.mjs +6 -0
- package/dist/router-C3kygdRK.cjs +1285 -0
- package/dist/router-CZBxMRAH.js +987 -0
- package/dist/routes-BL4y79tb.mjs +6 -0
- package/dist/routes-C2nPecwu.cjs +6 -0
- package/dist/routes-U9L8psZ9.cjs +6 -0
- package/dist/{search-dialog-DHqwjJuG.cjs → search-dialog-BCOHQGSt.cjs} +1 -1
- package/dist/search-dialog-Bp_P1MPP.js +481 -0
- package/dist/{search-dialog-DFnlx8LO.js → search-dialog-BqkzDTq2.js} +107 -57
- package/dist/{search-dialog-BRFno7HD.cjs → search-dialog-CIeIUhAn.cjs} +218 -43
- package/dist/{search-dialog-D6TvjcuV.js → search-dialog-DtmxmfEu.js} +1 -1
- package/dist/{search-dialog-B1NERUNx.cjs → search-dialog-x_qHU8ty.cjs} +107 -58
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.d.mts +1 -1
- package/dist/server/index.mjs +1 -1
- package/dist/update-check-BKqmYfwT.cjs +11 -0
- package/dist/update-check-QnrVR3q1.mjs +11 -0
- package/dist/utils-8lzafE49.mjs +7 -0
- package/dist/utils-ej6_SjIZ.cjs +7 -0
- package/dist/virtual-modules-Ca5tHk1X.cjs +30 -0
- package/dist/virtual-modules-Dlgt1fP0.mjs +30 -0
- package/package.json +18 -16
- package/src/shared/mdx-path.ts +12 -0
- package/src/shared/structured-data.ts +145 -0
- package/src/shared/types.ts +220 -16
- package/dist/banner-BMop1KLF.d.ts +0 -100
- package/dist/banner-CVD0GugR.d.cts +0 -100
- package/dist/cache-CO4Dy2uQ.cjs +0 -6
- package/dist/cache-Dk53iOo6.mjs +0 -6
- package/dist/config-CCXp3aXO.mjs +0 -7
- package/dist/config-CMd4XoFq.cjs +0 -6
- package/dist/config-DlGoEM9D.cjs +0 -7
- package/dist/csp-CRp_3U7a.cjs +0 -6
- package/dist/csp-oTC2ygvF.mjs +0 -6
- package/dist/doctor-Bv16QSrI.cjs +0 -7
- package/dist/doctor-DOAbSaiL.mjs +0 -7
- package/dist/headers-Ddwek8K7.mjs +0 -6
- package/dist/headers-dg4SDrjY.cjs +0 -6
- package/dist/link-2PzgTnaP.js +0 -673
- package/dist/meta-loader-C4Hu9RN9.mjs +0 -6
- package/dist/meta-loader-Dq1zcFnh.cjs +0 -6
- package/dist/node-B5hu_6qj.cjs +0 -104
- package/dist/node-BXtqM1uH.mjs +0 -6
- package/dist/node-C8725aw7.mjs +0 -104
- package/dist/node-aD1eisrR.cjs +0 -6
- package/dist/pages-external-BYa4JSda.mjs +0 -6
- package/dist/pages-external-XkYIs-d5.cjs +0 -6
- package/dist/parser-DCiEWkSk.cjs +0 -8
- package/dist/parser-qk9FIHJ7.mjs +0 -8
- package/dist/plugin-CX1OZ6jB.cjs +0 -73
- package/dist/plugin-CgfiWaFZ.mjs +0 -73
- package/dist/routes-BW6zsk7Z.mjs +0 -6
- package/dist/routes-BgoIB5wb.cjs +0 -6
- package/dist/routes-CORVxc02.cjs +0 -6
- package/dist/search-dialog-BmxHiKwt.js +0 -312
- package/dist/shiki-adapter-CoQ6jyJ4.cjs +0 -6
- package/dist/shiki-adapter-D-aKw7PP.mjs +0 -6
- package/dist/utils-Crm9oPcV.mjs +0 -7
- package/dist/utils-D6Xtj0FZ.cjs +0 -7
- /package/dist/{errors-0zGHRLue.mjs → errors-N-b6Sn2G.mjs} +0 -0
- /package/dist/{index-1KsTDq4o.d.mts → index-lFoyzCXy.d.mts} +0 -0
- /package/dist/{types-generator-BXhv7Ill.cjs → types-generator-DDSA93P3.cjs} +0 -0
- /package/dist/{types-generator-bDPvUztF.mjs → types-generator-DG1GX1EZ.mjs} +0 -0
|
@@ -0,0 +1,1344 @@
|
|
|
1
|
+
|
|
2
|
+
import { Q as CreateRoutesResult, _t as StructuredData$1, ct as BoltdocsIntegrationsConfig, ft as BoltdocsRoutePathWithFallback, gt as JsonLdObject, ht as BoltdocsVersion, lt as BoltdocsLocale, ot as BadgeValue, pt as BoltdocsSocialLink, st as BoltdocsConfig, ut as BoltdocsMdxComponents } from "./index-Ci4kfOHF.js";
|
|
3
|
+
import { ViteReactSSG } from "@bdocs/ssg";
|
|
4
|
+
import * as React$2 from "react";
|
|
5
|
+
import React$1, { ComponentType, JSXElementConstructor, ReactNode, SVGProps } from "react";
|
|
6
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
7
|
+
import { ClassValue } from "clsx";
|
|
8
|
+
|
|
9
|
+
//#region src/client/types.d.ts
|
|
10
|
+
/**
|
|
11
|
+
* Metadata provided by the server for a specific route.
|
|
12
|
+
* Maps closely to the `RouteMeta` type in the Node environment.
|
|
13
|
+
*/
|
|
14
|
+
interface ComponentRoute {
|
|
15
|
+
/** The final URL path */
|
|
16
|
+
path: string;
|
|
17
|
+
/** The absolute filesystem path of the source file */
|
|
18
|
+
componentPath: string;
|
|
19
|
+
/** The page title */
|
|
20
|
+
title: string;
|
|
21
|
+
/** Explicit order in the sidebar */
|
|
22
|
+
sidebarPosition?: number;
|
|
23
|
+
/** The relative path from the docs directory */
|
|
24
|
+
filePath: string;
|
|
25
|
+
/** The group directory name */
|
|
26
|
+
group?: string;
|
|
27
|
+
/** The display title of the group */
|
|
28
|
+
groupTitle?: string;
|
|
29
|
+
/** Explicit order of the group in the sidebar */
|
|
30
|
+
groupPosition?: number;
|
|
31
|
+
/** Extracted markdown headings for search indexing */
|
|
32
|
+
headings?: {
|
|
33
|
+
level: number;
|
|
34
|
+
text: string;
|
|
35
|
+
id: string;
|
|
36
|
+
}[];
|
|
37
|
+
/** The page summary or description */
|
|
38
|
+
description?: string;
|
|
39
|
+
/** The locale this route belongs to, if i18n is configured */
|
|
40
|
+
locale?: string;
|
|
41
|
+
/** The version this route belongs to, if versioning is configured */
|
|
42
|
+
version?: string;
|
|
43
|
+
/** Optional icon to display (Lucide icon name or raw SVG) */
|
|
44
|
+
icon?: string;
|
|
45
|
+
/** The tab this route belongs to, if tabs are configured */
|
|
46
|
+
tab?: string;
|
|
47
|
+
/** Optional badge to display next to the sidebar item */
|
|
48
|
+
badge?: BadgeValue;
|
|
49
|
+
/** Optional icon for the route's group */
|
|
50
|
+
groupIcon?: string;
|
|
51
|
+
/** The sub-route group this route belongs to (from folders starting with _) */
|
|
52
|
+
subRouteGroup?: string;
|
|
53
|
+
/** The nested sub-routes if this route acts as the parent of a subRouteGroup */
|
|
54
|
+
subRoutes?: ComponentRoute[];
|
|
55
|
+
/** Internal helper map for nesting routes during sidebar construction */
|
|
56
|
+
_subMap?: Map<string, ComponentRoute>;
|
|
57
|
+
/** The extracted plain-text content of the page for search indexing */
|
|
58
|
+
_content?: string;
|
|
59
|
+
/** The raw markdown content of the page */
|
|
60
|
+
_rawContent?: string;
|
|
61
|
+
/** The publication date */
|
|
62
|
+
date?: string | Date;
|
|
63
|
+
/** The last updated timestamp or date */
|
|
64
|
+
lastUpdated?: string | number | Date;
|
|
65
|
+
/** The collection this route belongs to (from [name] directories) */
|
|
66
|
+
collection?: string;
|
|
67
|
+
/** Tags for blog posts */
|
|
68
|
+
tags?: string[];
|
|
69
|
+
/** Author identifier for blog posts */
|
|
70
|
+
author?: string | {
|
|
71
|
+
name: string;
|
|
72
|
+
avatar?: string;
|
|
73
|
+
url?: string;
|
|
74
|
+
image?: string;
|
|
75
|
+
};
|
|
76
|
+
/** Draft flag */
|
|
77
|
+
draft?: boolean;
|
|
78
|
+
/** Feature flags required for this page to be visible */
|
|
79
|
+
featureFlags?: string[];
|
|
80
|
+
/** Short excerpt for list displays */
|
|
81
|
+
excerpt?: string;
|
|
82
|
+
/** Cover image for blog posts */
|
|
83
|
+
coverImage?: string;
|
|
84
|
+
/** Optional explicit order (alternative to sidebarPosition) */
|
|
85
|
+
order?: number;
|
|
86
|
+
/** Optional explicit label for the sidebar */
|
|
87
|
+
sidebarLabel?: string;
|
|
88
|
+
/** Optional category for the page */
|
|
89
|
+
category?: string;
|
|
90
|
+
/** Whether the page is hidden from the sidebar */
|
|
91
|
+
sidebarHidden?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Optional nested child routes for sidebar hierarchies that mirror the
|
|
94
|
+
* server-side `RouteMeta.subRoutes` shape. `sidebar.tsx` walks this
|
|
95
|
+
* field to render the group → subRoutes → items tree.
|
|
96
|
+
*/
|
|
97
|
+
routes?: ComponentRoute[];
|
|
98
|
+
/** Raw extensible frontmatter data for custom components and formatters */
|
|
99
|
+
frontmatter?: Record<string, unknown>;
|
|
100
|
+
/** Clean URL segments stripped of locale/version prefixes */
|
|
101
|
+
slugParts?: string[];
|
|
102
|
+
/** SEO metadata for page headers */
|
|
103
|
+
seo?: Record<string, unknown>;
|
|
104
|
+
/** Flag to indicate if this is a fallback redirect route */
|
|
105
|
+
fallback?: boolean;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Site configuration provided by the server.
|
|
109
|
+
*/
|
|
110
|
+
type SiteConfig = BoltdocsConfig;
|
|
111
|
+
/**
|
|
112
|
+
* Tab configuration for the documentation site.
|
|
113
|
+
*/
|
|
114
|
+
interface BoltdocsTab {
|
|
115
|
+
id: string;
|
|
116
|
+
/** Text to display (can be a string or a map of translations) */
|
|
117
|
+
text: string | Record<string, string>;
|
|
118
|
+
icon?: string;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Props for the Sidebar component.
|
|
122
|
+
*/
|
|
123
|
+
interface SidebarProps$1 {
|
|
124
|
+
routes: ComponentRoute[];
|
|
125
|
+
config: BoltdocsConfig;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Props for the OnThisPage (TOC) component.
|
|
129
|
+
*/
|
|
130
|
+
interface OnThisPageProps {
|
|
131
|
+
headings?: {
|
|
132
|
+
level: number;
|
|
133
|
+
text: string;
|
|
134
|
+
id: string;
|
|
135
|
+
}[];
|
|
136
|
+
editLink?: string;
|
|
137
|
+
communityHelp?: string;
|
|
138
|
+
filePath?: string;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Props for the Tabs component.
|
|
142
|
+
*/
|
|
143
|
+
interface TabsProps {
|
|
144
|
+
tabs: BoltdocsTab[];
|
|
145
|
+
routes: ComponentRoute[];
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Props for user-defined layout components (layout.tsx).
|
|
149
|
+
*/
|
|
150
|
+
interface LayoutProps {
|
|
151
|
+
children: React$2.ReactNode;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Unified type for navbar links.
|
|
155
|
+
*/
|
|
156
|
+
interface NavbarLink {
|
|
157
|
+
label: string | Record<string, string>;
|
|
158
|
+
href: BoltdocsRoutePathWithFallback;
|
|
159
|
+
active: boolean;
|
|
160
|
+
to?: string;
|
|
161
|
+
items?: NavbarLink[];
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Shape of the data returned by a collection post route loader.
|
|
165
|
+
* Consumed by `BlogPost` via `useLoaderData<CollectionPostLoaderData>()`.
|
|
166
|
+
*/
|
|
167
|
+
interface CollectionPostLoaderData {
|
|
168
|
+
/** Full route metadata for this post (title, date, author, tags, etc.) */
|
|
169
|
+
route: ComponentRoute;
|
|
170
|
+
/** The name of the collection this post belongs to (e.g. 'blog') */
|
|
171
|
+
collection: string;
|
|
172
|
+
/** Extracted page headings for the Table of Contents */
|
|
173
|
+
headings: {
|
|
174
|
+
level: number;
|
|
175
|
+
text: string;
|
|
176
|
+
id: string;
|
|
177
|
+
}[];
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Shape of the data returned by a collection listing route loader.
|
|
181
|
+
* Consumed by `BlogList` via `useLoaderData<CollectionListLoaderData>()`.
|
|
182
|
+
*/
|
|
183
|
+
interface CollectionListLoaderData {
|
|
184
|
+
/** Paginated subset of posts to display on this page */
|
|
185
|
+
posts: Array<{
|
|
186
|
+
path: string;
|
|
187
|
+
title: string;
|
|
188
|
+
date?: string | Date;
|
|
189
|
+
excerpt?: string;
|
|
190
|
+
tags?: string[];
|
|
191
|
+
author?: string;
|
|
192
|
+
coverImage?: string;
|
|
193
|
+
filePath: string;
|
|
194
|
+
}>;
|
|
195
|
+
/** Total number of pages available */
|
|
196
|
+
totalPages: number;
|
|
197
|
+
/** Current page index (1-based) */
|
|
198
|
+
currentPage: number;
|
|
199
|
+
/** Collection name used to build pagination URLs (e.g. 'blog' → '/blog/page/2') */
|
|
200
|
+
collection: string;
|
|
201
|
+
}
|
|
202
|
+
//#endregion
|
|
203
|
+
//#region src/client/collections/collections-context.d.ts
|
|
204
|
+
interface CollectionPost$1 {
|
|
205
|
+
path: string;
|
|
206
|
+
title: string;
|
|
207
|
+
date?: string | Date;
|
|
208
|
+
excerpt?: string;
|
|
209
|
+
tags?: string[];
|
|
210
|
+
author?: string;
|
|
211
|
+
coverImage?: string;
|
|
212
|
+
filePath: string;
|
|
213
|
+
locale?: string;
|
|
214
|
+
version?: string;
|
|
215
|
+
frontmatter?: Record<string, any>;
|
|
216
|
+
lastUpdated?: string | number | Date;
|
|
217
|
+
headings?: {
|
|
218
|
+
level: number;
|
|
219
|
+
text: string;
|
|
220
|
+
id: string;
|
|
221
|
+
}[];
|
|
222
|
+
draft?: boolean;
|
|
223
|
+
/** Collection id this post belongs to (added by the server for HMR). */
|
|
224
|
+
collection?: string;
|
|
225
|
+
}
|
|
226
|
+
type CollectionsData = Record<string, CollectionPost$1[]>;
|
|
227
|
+
declare const CollectionsContext: React$2.Context<CollectionsData>;
|
|
228
|
+
interface CurrentPostContextValue {
|
|
229
|
+
route: ComponentRoute;
|
|
230
|
+
headings: {
|
|
231
|
+
level: number;
|
|
232
|
+
text: string;
|
|
233
|
+
id: string;
|
|
234
|
+
}[];
|
|
235
|
+
collection: string;
|
|
236
|
+
}
|
|
237
|
+
declare function CurrentPostProvider({
|
|
238
|
+
value,
|
|
239
|
+
children
|
|
240
|
+
}: {
|
|
241
|
+
value: CurrentPostContextValue;
|
|
242
|
+
children: React.ReactNode;
|
|
243
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
244
|
+
//#endregion
|
|
245
|
+
//#region src/client/ssg/create-routes.d.ts
|
|
246
|
+
interface CreateRoutesOptions {
|
|
247
|
+
routesData: ComponentRoute[];
|
|
248
|
+
collectionsData?: CollectionsData;
|
|
249
|
+
collectionLayouts?: Record<string, React$1.ComponentType<{
|
|
250
|
+
children: React$1.ReactNode;
|
|
251
|
+
}>>;
|
|
252
|
+
collectionLists?: Record<string, React$1.ComponentType>;
|
|
253
|
+
collectionPosts?: Record<string, React$1.ComponentType<any>>;
|
|
254
|
+
config: BoltdocsConfig;
|
|
255
|
+
mdxModules: Record<string, any>;
|
|
256
|
+
externalPages?: Record<string, React$1.ComponentType>;
|
|
257
|
+
externalLayout?: React$1.ComponentType<{
|
|
258
|
+
children: React$1.ReactNode;
|
|
259
|
+
}>;
|
|
260
|
+
externalFilePages?: Record<string, React$1.ComponentType>;
|
|
261
|
+
externalFileMdx?: Record<string, unknown>;
|
|
262
|
+
components?: Record<string, React$1.ComponentType>;
|
|
263
|
+
}
|
|
264
|
+
declare function createRoutes(options: CreateRoutesOptions): CreateRoutesResult;
|
|
265
|
+
//#endregion
|
|
266
|
+
//#region src/client/ssg/mdx-page.d.ts
|
|
267
|
+
type MdxPageProps = {
|
|
268
|
+
MDXComponent: React.ComponentType<React.PropsWithChildren<unknown>>;
|
|
269
|
+
mdxComponents: Record<string, React.ComponentType<HTMLElement>>;
|
|
270
|
+
collectionPostComponent?: React.ComponentType<any>;
|
|
271
|
+
};
|
|
272
|
+
/**
|
|
273
|
+
* Renders an MDX page by consuming pre-loaded route data.
|
|
274
|
+
*
|
|
275
|
+
* - If the route belongs to a collection (`data.collection` is set), wraps
|
|
276
|
+
* the content with `CurrentPostProvider` so that `usePost()` (called without
|
|
277
|
+
* a slug) can read the current post's data from context.
|
|
278
|
+
* - Otherwise, renders the standard `DocPage` layout.
|
|
279
|
+
*/
|
|
280
|
+
declare function MdxPage({
|
|
281
|
+
MDXComponent,
|
|
282
|
+
mdxComponents: propComponents,
|
|
283
|
+
collectionPostComponent: CollectionPost
|
|
284
|
+
}: MdxPageProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
285
|
+
//#endregion
|
|
286
|
+
//#region src/client/ssg/boltdocs-shell.d.ts
|
|
287
|
+
declare function BoltdocsShell({
|
|
288
|
+
config,
|
|
289
|
+
routes,
|
|
290
|
+
components,
|
|
291
|
+
collectionsData,
|
|
292
|
+
contentClassName
|
|
293
|
+
}: {
|
|
294
|
+
config: BoltdocsConfig;
|
|
295
|
+
routes: ComponentRoute[];
|
|
296
|
+
components?: Record<string, React.ComponentType>;
|
|
297
|
+
collectionsData?: CollectionsData; /** Class name for the shell content frame (defaults to fixed viewport). */
|
|
298
|
+
contentClassName?: string;
|
|
299
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
300
|
+
//#endregion
|
|
301
|
+
//#region src/client/app/config-context.d.ts
|
|
302
|
+
/**
|
|
303
|
+
* Hook to access the Boltdocs configuration.
|
|
304
|
+
*/
|
|
305
|
+
declare function useConfig(): BoltdocsConfig;
|
|
306
|
+
//#endregion
|
|
307
|
+
//#region src/client/app/theme-context.d.ts
|
|
308
|
+
type Theme = 'light' | 'dark' | 'system';
|
|
309
|
+
type ResolvedTheme = 'light' | 'dark';
|
|
310
|
+
interface ThemeContextType {
|
|
311
|
+
theme: Theme;
|
|
312
|
+
resolvedTheme: ResolvedTheme;
|
|
313
|
+
setTheme: (theme: Theme) => void;
|
|
314
|
+
}
|
|
315
|
+
declare function useTheme(): ThemeContextType;
|
|
316
|
+
//#endregion
|
|
317
|
+
//#region src/client/app/mdx-components-context.d.ts
|
|
318
|
+
type MdxComponentsType = {
|
|
319
|
+
[key: string]: ComponentType<any>;
|
|
320
|
+
} & {
|
|
321
|
+
Frontmatter?: Record<string, ComponentType<{
|
|
322
|
+
value: unknown;
|
|
323
|
+
}>>;
|
|
324
|
+
};
|
|
325
|
+
declare function useMdxComponents(): BoltdocsMdxComponents;
|
|
326
|
+
//#endregion
|
|
327
|
+
//#region src/client/app/ui-context.d.ts
|
|
328
|
+
declare function useUI(): {
|
|
329
|
+
isSidebarOpen: boolean;
|
|
330
|
+
toggleSidebar: () => void;
|
|
331
|
+
closeSidebar: () => void;
|
|
332
|
+
};
|
|
333
|
+
//#endregion
|
|
334
|
+
//#region src/client/hooks/use-navbar.d.ts
|
|
335
|
+
declare function useNavbar(): {
|
|
336
|
+
links: NavbarLink[];
|
|
337
|
+
title: string;
|
|
338
|
+
logo: string | null;
|
|
339
|
+
logoProps: {
|
|
340
|
+
alt: string;
|
|
341
|
+
width: number | undefined;
|
|
342
|
+
height: number | undefined;
|
|
343
|
+
};
|
|
344
|
+
github: string | null;
|
|
345
|
+
social: BoltdocsSocialLink[];
|
|
346
|
+
config: BoltdocsConfig;
|
|
347
|
+
theme: Theme;
|
|
348
|
+
};
|
|
349
|
+
//#endregion
|
|
350
|
+
//#region src/client/hooks/use-sidebar.d.ts
|
|
351
|
+
interface SidebarGroupData {
|
|
352
|
+
slug: string;
|
|
353
|
+
title: string;
|
|
354
|
+
icon?: string;
|
|
355
|
+
path: string;
|
|
356
|
+
filePath: string;
|
|
357
|
+
routes: ComponentRoute[];
|
|
358
|
+
sidebarPosition?: number;
|
|
359
|
+
collapsible?: boolean;
|
|
360
|
+
collapsed?: boolean;
|
|
361
|
+
}
|
|
362
|
+
type MergedSidebarItem = {
|
|
363
|
+
type: 'link';
|
|
364
|
+
position: number;
|
|
365
|
+
title: string;
|
|
366
|
+
route: ComponentRoute;
|
|
367
|
+
} | {
|
|
368
|
+
type: 'group';
|
|
369
|
+
position: number;
|
|
370
|
+
title: string;
|
|
371
|
+
group: SidebarGroupData;
|
|
372
|
+
};
|
|
373
|
+
interface SidebarNode {
|
|
374
|
+
route: ComponentRoute;
|
|
375
|
+
depth: number;
|
|
376
|
+
isGroup: boolean;
|
|
377
|
+
isActive: boolean;
|
|
378
|
+
hasChildren: boolean;
|
|
379
|
+
children: SidebarNode[];
|
|
380
|
+
}
|
|
381
|
+
declare function useSidebar(routes: ComponentRoute[]): {
|
|
382
|
+
tree: SidebarNode[];
|
|
383
|
+
isActive: (route: ComponentRoute) => boolean;
|
|
384
|
+
isGroupActive: (group: SidebarGroupData) => boolean;
|
|
385
|
+
activeRoute: ComponentRoute | undefined;
|
|
386
|
+
activePath: string;
|
|
387
|
+
config: BoltdocsConfig;
|
|
388
|
+
groups: SidebarGroupData[];
|
|
389
|
+
ungrouped: ComponentRoute[];
|
|
390
|
+
merged: MergedSidebarItem[];
|
|
391
|
+
};
|
|
392
|
+
//#endregion
|
|
393
|
+
//#region src/client/hooks/use-search.d.ts
|
|
394
|
+
declare function useSearch(routes: ComponentRoute[]): {
|
|
395
|
+
isOpen: boolean;
|
|
396
|
+
setIsOpen: React$2.Dispatch<React$2.SetStateAction<boolean>>;
|
|
397
|
+
query: string;
|
|
398
|
+
setQuery: React$2.Dispatch<React$2.SetStateAction<string>>;
|
|
399
|
+
list: {
|
|
400
|
+
id: string;
|
|
401
|
+
title: string;
|
|
402
|
+
path: string;
|
|
403
|
+
bio: string;
|
|
404
|
+
groupTitle: string | undefined;
|
|
405
|
+
}[];
|
|
406
|
+
searchDataLoading: boolean;
|
|
407
|
+
searchDataError: Error | null;
|
|
408
|
+
handleSelect: (key: React.Key) => void;
|
|
409
|
+
input: {
|
|
410
|
+
value: string;
|
|
411
|
+
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
412
|
+
};
|
|
413
|
+
};
|
|
414
|
+
//#endregion
|
|
415
|
+
//#region src/client/hooks/use-tabs.d.ts
|
|
416
|
+
declare function useTabs(tabs?: BoltdocsTab[], routes?: ComponentRoute[]): {
|
|
417
|
+
tabs: BoltdocsTab[];
|
|
418
|
+
activeIndex: number;
|
|
419
|
+
indicatorStyle: React$2.CSSProperties;
|
|
420
|
+
tabRefs: React$2.RefObject<(HTMLAnchorElement | null)[]>;
|
|
421
|
+
activeTabId: string | undefined;
|
|
422
|
+
};
|
|
423
|
+
//#endregion
|
|
424
|
+
//#region src/client/hooks/use-version.d.ts
|
|
425
|
+
interface VersionOption {
|
|
426
|
+
key: BoltdocsVersion;
|
|
427
|
+
label: string;
|
|
428
|
+
value: string;
|
|
429
|
+
isCurrent: boolean;
|
|
430
|
+
}
|
|
431
|
+
interface UseVersionReturn {
|
|
432
|
+
currentVersion: BoltdocsVersion | undefined;
|
|
433
|
+
currentVersionLabel: string | undefined;
|
|
434
|
+
availableVersions: VersionOption[];
|
|
435
|
+
handleVersionChange: (version: BoltdocsVersion) => void;
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* Hook to manage and switch between different versions of the documentation.
|
|
439
|
+
*/
|
|
440
|
+
declare function useVersion(): UseVersionReturn;
|
|
441
|
+
//#endregion
|
|
442
|
+
//#region src/client/hooks/use-i18n.d.ts
|
|
443
|
+
interface LocaleOption {
|
|
444
|
+
key: BoltdocsLocale;
|
|
445
|
+
label: string;
|
|
446
|
+
value: string;
|
|
447
|
+
isCurrent: boolean;
|
|
448
|
+
}
|
|
449
|
+
interface UseI18nReturn {
|
|
450
|
+
currentLocale: BoltdocsLocale | undefined;
|
|
451
|
+
currentLocaleLabel: string | undefined;
|
|
452
|
+
availableLocales: LocaleOption[];
|
|
453
|
+
handleLocaleChange: (locale: BoltdocsLocale) => void;
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* Hook to manage and switch between different locales (languages) of the documentation.
|
|
457
|
+
*/
|
|
458
|
+
declare function useI18n(): UseI18nReturn;
|
|
459
|
+
//#endregion
|
|
460
|
+
//#region src/client/hooks/use-page-nav.d.ts
|
|
461
|
+
declare function usePageNav(): {
|
|
462
|
+
prevPage: null;
|
|
463
|
+
nextPage: null;
|
|
464
|
+
currentRoute: null;
|
|
465
|
+
} | {
|
|
466
|
+
prevPage: ComponentRoute | null;
|
|
467
|
+
nextPage: ComponentRoute | null;
|
|
468
|
+
currentRoute: ComponentRoute;
|
|
469
|
+
};
|
|
470
|
+
//#endregion
|
|
471
|
+
//#region src/client/hooks/use-breadcrumbs.d.ts
|
|
472
|
+
/**
|
|
473
|
+
* Hook to generate breadcrumbs based on the current active route.
|
|
474
|
+
*/
|
|
475
|
+
declare function useBreadcrumbs(): {
|
|
476
|
+
crumbs: {
|
|
477
|
+
label: string;
|
|
478
|
+
href?: string;
|
|
479
|
+
}[];
|
|
480
|
+
activeRoute: ComponentRoute | undefined;
|
|
481
|
+
};
|
|
482
|
+
//#endregion
|
|
483
|
+
//#region src/client/hooks/use-routes.d.ts
|
|
484
|
+
/**
|
|
485
|
+
* Hook to access the framework's routing state.
|
|
486
|
+
* Returns both the complete set of routes and a filtered list based on the current
|
|
487
|
+
* version and locale.
|
|
488
|
+
*/
|
|
489
|
+
declare function useRoutes(): {
|
|
490
|
+
routes: ComponentRoute[];
|
|
491
|
+
allRoutes: ComponentRoute[];
|
|
492
|
+
currentRoute: ComponentRoute | undefined;
|
|
493
|
+
isCollectionPage: boolean;
|
|
494
|
+
currentLocale: BoltdocsLocale;
|
|
495
|
+
currentVersion: BoltdocsVersion;
|
|
496
|
+
};
|
|
497
|
+
//#endregion
|
|
498
|
+
//#region src/client/hooks/use-localized-to.d.ts
|
|
499
|
+
/**
|
|
500
|
+
* Hook to automatically localize a path based on the current version and locale context.
|
|
501
|
+
* It ensures that navigation preserves the active version and language across the entire site.
|
|
502
|
+
*/
|
|
503
|
+
declare function useLocalizedTo(to: BoltdocsRoutePathWithFallback): string;
|
|
504
|
+
declare function useLocalizedTo(to: string): string;
|
|
505
|
+
//#endregion
|
|
506
|
+
//#region src/client/hooks/use-search-highlight.d.ts
|
|
507
|
+
/**
|
|
508
|
+
* Hook to highlight search terms based on the 'hl' query parameter.
|
|
509
|
+
*/
|
|
510
|
+
declare function useSearchHighlight(containerSelector?: string): void;
|
|
511
|
+
//#endregion
|
|
512
|
+
//#region src/client/hooks/use-analytics.d.ts
|
|
513
|
+
declare global {
|
|
514
|
+
interface Window {
|
|
515
|
+
gtag?: (...args: unknown[]) => void;
|
|
516
|
+
dataLayer?: unknown[];
|
|
517
|
+
gtag_report_conversion?: (url?: string) => boolean;
|
|
518
|
+
posthog?: {
|
|
519
|
+
capture: (event: string, properties?: Record<string, unknown>) => void;
|
|
520
|
+
identify: (distinctId: string) => void;
|
|
521
|
+
reset: () => void;
|
|
522
|
+
opt_out_capturing: () => void;
|
|
523
|
+
opt_in_capturing: () => void;
|
|
524
|
+
};
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
interface AnalyticsEvent {
|
|
528
|
+
action: string;
|
|
529
|
+
category?: string;
|
|
530
|
+
label?: string;
|
|
531
|
+
value?: number;
|
|
532
|
+
params?: Record<string, unknown>;
|
|
533
|
+
}
|
|
534
|
+
interface AnalyticsInstance {
|
|
535
|
+
trackPageView: (path: string, title?: string) => void;
|
|
536
|
+
trackEvent: (event: AnalyticsEvent) => void;
|
|
537
|
+
trackSearch: (query: string, resultsCount?: number) => void;
|
|
538
|
+
trackDownload: (file: string, type?: string) => void;
|
|
539
|
+
trackExternalLink: (url: string) => void;
|
|
540
|
+
isEnabled: boolean;
|
|
541
|
+
}
|
|
542
|
+
interface UseAnalyticsOptions {
|
|
543
|
+
config?: BoltdocsIntegrationsConfig;
|
|
544
|
+
autoTrackPageViews?: boolean;
|
|
545
|
+
autoTrackDownloads?: boolean;
|
|
546
|
+
autoTrackExternalLinks?: boolean;
|
|
547
|
+
excludePatterns?: RegExp[];
|
|
548
|
+
}
|
|
549
|
+
declare function useAnalytics(options?: UseAnalyticsOptions): AnalyticsInstance;
|
|
550
|
+
declare function useTrackPageView(): (path: string, title?: string) => void;
|
|
551
|
+
declare function useTrackEvent(): (event: AnalyticsEvent) => void;
|
|
552
|
+
//#endregion
|
|
553
|
+
//#region src/client/hooks/use-headings.d.ts
|
|
554
|
+
/**
|
|
555
|
+
* Returns the headings of the current page, extracted from the route loader data.
|
|
556
|
+
* Useful for building custom Tables of Contents or jumping to sections.
|
|
557
|
+
*
|
|
558
|
+
* @returns An array of heading objects with level, text, and id.
|
|
559
|
+
*/
|
|
560
|
+
declare function useHeadings(): {
|
|
561
|
+
level: number;
|
|
562
|
+
text: string;
|
|
563
|
+
id: string;
|
|
564
|
+
}[];
|
|
565
|
+
//#endregion
|
|
566
|
+
//#region src/client/hooks/use-merged-components.d.ts
|
|
567
|
+
declare function useMergedComponents(propComponents?: Record<string, ComponentType<any>>): MdxComponentsType;
|
|
568
|
+
//#endregion
|
|
569
|
+
//#region src/client/hooks/use-feedback.d.ts
|
|
570
|
+
interface FeedbackData {
|
|
571
|
+
rating: 'good' | 'neutral' | 'bad';
|
|
572
|
+
comment?: string;
|
|
573
|
+
path: string;
|
|
574
|
+
title: string;
|
|
575
|
+
blockId?: string;
|
|
576
|
+
}
|
|
577
|
+
interface UseFeedbackOptions {
|
|
578
|
+
endpoint?: string;
|
|
579
|
+
onSubmit?: (data: FeedbackData) => void | Promise<void>;
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
* Hook for managing the feedback rating form state and submission.
|
|
583
|
+
* Resets automatically when navigating to a new page.
|
|
584
|
+
*/
|
|
585
|
+
declare function useFeedback(options?: UseFeedbackOptions): {
|
|
586
|
+
rating: "good" | "neutral" | "bad" | null;
|
|
587
|
+
setRating: React$2.Dispatch<React$2.SetStateAction<"good" | "neutral" | "bad" | null>>;
|
|
588
|
+
comment: string;
|
|
589
|
+
setComment: React$2.Dispatch<React$2.SetStateAction<string>>;
|
|
590
|
+
loading: boolean;
|
|
591
|
+
submitted: boolean;
|
|
592
|
+
error: string | null;
|
|
593
|
+
submit: (commentOverride?: string, blockId?: string) => Promise<void>;
|
|
594
|
+
};
|
|
595
|
+
//#endregion
|
|
596
|
+
//#region src/client/components/docs-layout-default.d.ts
|
|
597
|
+
interface DocsLayoutThemeProps {
|
|
598
|
+
children?: ReactNode;
|
|
599
|
+
}
|
|
600
|
+
/**
|
|
601
|
+
* Default docs layout — composes the visual primitives and delegates
|
|
602
|
+
* sub-area routing to them. Slot rendering (plugin injections at
|
|
603
|
+
* `navbar:end`, `sidebar:bottom`, `docs-content:top`, etc.) is handled
|
|
604
|
+
* internally by each primitive so the layout itself does no slot "magic".
|
|
605
|
+
*
|
|
606
|
+
* A custom layout can reuse any primitive and the slot wiring just works.
|
|
607
|
+
*/
|
|
608
|
+
declare function DocsLayoutComponent({
|
|
609
|
+
children
|
|
610
|
+
}: DocsLayoutThemeProps): _$react_jsx_runtime0.JSX.Element;
|
|
611
|
+
//#endregion
|
|
612
|
+
//#region src/client/components/ui-base/navbar.d.ts
|
|
613
|
+
declare function Navbar({
|
|
614
|
+
className
|
|
615
|
+
}: {
|
|
616
|
+
className?: string;
|
|
617
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
618
|
+
//#endregion
|
|
619
|
+
//#region src/client/components/primitives/types.d.ts
|
|
620
|
+
type ComponentBase = {
|
|
621
|
+
className?: string;
|
|
622
|
+
children?: ReactNode;
|
|
623
|
+
};
|
|
624
|
+
//#endregion
|
|
625
|
+
//#region src/client/components/ui-base/icon-renderer.d.ts
|
|
626
|
+
type IconProps = SVGProps<SVGSVGElement> & {
|
|
627
|
+
size?: number | string;
|
|
628
|
+
};
|
|
629
|
+
type IconValue = string | ComponentType<IconProps>;
|
|
630
|
+
//#endregion
|
|
631
|
+
//#region src/client/components/primitives/sidebar.d.ts
|
|
632
|
+
/**
|
|
633
|
+
* Desktop Sidebar Container
|
|
634
|
+
*/
|
|
635
|
+
declare function SidebarRoot({
|
|
636
|
+
children,
|
|
637
|
+
className
|
|
638
|
+
}: ComponentBase): _$react_jsx_runtime0.JSX.Element;
|
|
639
|
+
/**
|
|
640
|
+
* Mobile Sidebar Modal
|
|
641
|
+
*/
|
|
642
|
+
declare function SidebarMobile({
|
|
643
|
+
children,
|
|
644
|
+
className,
|
|
645
|
+
overlayClassName,
|
|
646
|
+
dialogClassName
|
|
647
|
+
}: ComponentBase & {
|
|
648
|
+
overlayClassName?: string;
|
|
649
|
+
dialogClassName?: string;
|
|
650
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
651
|
+
/**
|
|
652
|
+
* Shared Header for Sidebar
|
|
653
|
+
*/
|
|
654
|
+
declare function SidebarHeader({
|
|
655
|
+
children,
|
|
656
|
+
className
|
|
657
|
+
}: ComponentBase): _$react_jsx_runtime0.JSX.Element;
|
|
658
|
+
/**
|
|
659
|
+
* Scrollable Content Wrapper
|
|
660
|
+
*
|
|
661
|
+
* The scroll container doubles as the semantic `<nav>` landmark. State and
|
|
662
|
+
* scroll-position handling live here; all visuals belong to the theme.
|
|
663
|
+
*/
|
|
664
|
+
declare function SidebarContent({
|
|
665
|
+
children,
|
|
666
|
+
className
|
|
667
|
+
}: ComponentBase): _$react_jsx_runtime0.JSX.Element;
|
|
668
|
+
/**
|
|
669
|
+
* Navigation Group
|
|
670
|
+
*/
|
|
671
|
+
declare function SidebarGroup({
|
|
672
|
+
title,
|
|
673
|
+
icon: Icon,
|
|
674
|
+
children,
|
|
675
|
+
className,
|
|
676
|
+
collapsible,
|
|
677
|
+
collapsed,
|
|
678
|
+
active,
|
|
679
|
+
headerClassName,
|
|
680
|
+
iconClassName,
|
|
681
|
+
titleClassName,
|
|
682
|
+
contentClassName,
|
|
683
|
+
trailing,
|
|
684
|
+
trailingClassName,
|
|
685
|
+
renderTitle
|
|
686
|
+
}: {
|
|
687
|
+
title?: string;
|
|
688
|
+
icon?: IconValue;
|
|
689
|
+
collapsible?: boolean;
|
|
690
|
+
collapsed?: boolean;
|
|
691
|
+
active?: boolean;
|
|
692
|
+
headerClassName?: string;
|
|
693
|
+
iconClassName?: string;
|
|
694
|
+
titleClassName?: string;
|
|
695
|
+
contentClassName?: string;
|
|
696
|
+
trailing?: ReactNode; /** Class name for the trailing element wrapper (non-collapsible header). */
|
|
697
|
+
trailingClassName?: string;
|
|
698
|
+
renderTitle?: (props: {
|
|
699
|
+
title?: string;
|
|
700
|
+
isOpen: boolean;
|
|
701
|
+
}) => ReactNode;
|
|
702
|
+
} & ComponentBase): _$react_jsx_runtime0.JSX.Element;
|
|
703
|
+
/**
|
|
704
|
+
* Sidebar Link
|
|
705
|
+
*/
|
|
706
|
+
interface SidebarLinkProps extends ComponentBase {
|
|
707
|
+
label: string;
|
|
708
|
+
href: BoltdocsRoutePathWithFallback;
|
|
709
|
+
active?: boolean;
|
|
710
|
+
icon?: IconValue;
|
|
711
|
+
badge?: ComponentRoute['badge'];
|
|
712
|
+
iconClassName?: string;
|
|
713
|
+
labelClassName?: string;
|
|
714
|
+
badgeClassName?: string;
|
|
715
|
+
trailing?: ReactNode;
|
|
716
|
+
depth?: number;
|
|
717
|
+
}
|
|
718
|
+
declare function SidebarLink({
|
|
719
|
+
label,
|
|
720
|
+
href,
|
|
721
|
+
active,
|
|
722
|
+
icon: Icon,
|
|
723
|
+
badge,
|
|
724
|
+
className,
|
|
725
|
+
iconClassName,
|
|
726
|
+
labelClassName,
|
|
727
|
+
badgeClassName,
|
|
728
|
+
children,
|
|
729
|
+
trailing,
|
|
730
|
+
depth
|
|
731
|
+
}: SidebarLinkProps): _$react_jsx_runtime0.JSX.Element;
|
|
732
|
+
/**
|
|
733
|
+
* Nested SubGroup
|
|
734
|
+
*/
|
|
735
|
+
declare function SidebarSubGroup({
|
|
736
|
+
label,
|
|
737
|
+
href,
|
|
738
|
+
active,
|
|
739
|
+
icon: Icon,
|
|
740
|
+
badge,
|
|
741
|
+
isOpen,
|
|
742
|
+
onToggle,
|
|
743
|
+
children,
|
|
744
|
+
className,
|
|
745
|
+
rootClassName,
|
|
746
|
+
linkClassName,
|
|
747
|
+
contentClassName,
|
|
748
|
+
toggleClassName,
|
|
749
|
+
wrapperClassName,
|
|
750
|
+
renderToggle,
|
|
751
|
+
depth
|
|
752
|
+
}: SidebarLinkProps & {
|
|
753
|
+
isOpen: boolean;
|
|
754
|
+
onToggle: () => void;
|
|
755
|
+
children: ReactNode;
|
|
756
|
+
rootClassName?: string;
|
|
757
|
+
linkClassName?: string;
|
|
758
|
+
contentClassName?: string;
|
|
759
|
+
toggleClassName?: string; /** Class name for the relative row that wraps the link and toggle. */
|
|
760
|
+
wrapperClassName?: string;
|
|
761
|
+
renderToggle?: (props: {
|
|
762
|
+
isOpen: boolean;
|
|
763
|
+
}) => ReactNode;
|
|
764
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
765
|
+
/**
|
|
766
|
+
* Automated single-route rendering primitive
|
|
767
|
+
*/
|
|
768
|
+
interface SidebarItemProps extends ComponentBase {
|
|
769
|
+
route: ComponentRoute;
|
|
770
|
+
activePath: string;
|
|
771
|
+
activeRoute?: ComponentRoute;
|
|
772
|
+
depth?: number;
|
|
773
|
+
renderItem?: (route: ComponentRoute, depth: number) => ReactNode;
|
|
774
|
+
classNames?: SidebarSlots;
|
|
775
|
+
}
|
|
776
|
+
declare function SidebarItem({
|
|
777
|
+
route,
|
|
778
|
+
activePath,
|
|
779
|
+
activeRoute,
|
|
780
|
+
className,
|
|
781
|
+
depth,
|
|
782
|
+
renderItem,
|
|
783
|
+
classNames
|
|
784
|
+
}: SidebarItemProps): _$react_jsx_runtime0.JSX.Element;
|
|
785
|
+
/**
|
|
786
|
+
* High-level automated routes data rendering primitive
|
|
787
|
+
*/
|
|
788
|
+
interface SidebarSlots {
|
|
789
|
+
/** Link root (leaf route) */
|
|
790
|
+
item?: string;
|
|
791
|
+
/** Link leading icon */
|
|
792
|
+
itemIcon?: string;
|
|
793
|
+
/** Link label */
|
|
794
|
+
itemLabel?: string;
|
|
795
|
+
/** Link badge */
|
|
796
|
+
itemBadge?: string;
|
|
797
|
+
/** Group root container */
|
|
798
|
+
group?: string;
|
|
799
|
+
/** Group header (button or heading) */
|
|
800
|
+
groupHeader?: string;
|
|
801
|
+
/** Group leading icon */
|
|
802
|
+
groupIcon?: string;
|
|
803
|
+
/** Group title text */
|
|
804
|
+
groupTitle?: string;
|
|
805
|
+
/** Group children wrapper */
|
|
806
|
+
groupContent?: string;
|
|
807
|
+
/** Subgroup root container */
|
|
808
|
+
subgroup?: string;
|
|
809
|
+
/** Subgroup link */
|
|
810
|
+
subgroupLink?: string;
|
|
811
|
+
/** Subgroup children wrapper */
|
|
812
|
+
subgroupContent?: string;
|
|
813
|
+
/** Subgroup link + toggle row */
|
|
814
|
+
subgroupWrapper?: string;
|
|
815
|
+
/** Subgroup expand/collapse toggle */
|
|
816
|
+
toggle?: string;
|
|
817
|
+
}
|
|
818
|
+
interface SidebarItemRenderProps {
|
|
819
|
+
route: ComponentRoute;
|
|
820
|
+
activePath: string;
|
|
821
|
+
activeRoute?: ComponentRoute;
|
|
822
|
+
isActive: boolean;
|
|
823
|
+
depth: number;
|
|
824
|
+
}
|
|
825
|
+
interface SidebarGroupRenderProps {
|
|
826
|
+
group: SidebarGroupData;
|
|
827
|
+
isGroupActive: boolean;
|
|
828
|
+
children: ReactNode;
|
|
829
|
+
}
|
|
830
|
+
interface SidebarItemsProps extends ComponentBase {
|
|
831
|
+
routes: ComponentRoute[];
|
|
832
|
+
/**
|
|
833
|
+
* Per-piece class overrides merged over the default styles.
|
|
834
|
+
*/
|
|
835
|
+
classNames?: SidebarSlots;
|
|
836
|
+
/**
|
|
837
|
+
* Full render replacement for a single route node (leaf or subgroup).
|
|
838
|
+
* Runs recursively for nested routes.
|
|
839
|
+
*/
|
|
840
|
+
componentItem?: (props: SidebarItemRenderProps) => ReactNode;
|
|
841
|
+
/**
|
|
842
|
+
* Full render replacement for a top-level group wrapper.
|
|
843
|
+
*/
|
|
844
|
+
componentGroup?: (props: SidebarGroupRenderProps) => ReactNode;
|
|
845
|
+
}
|
|
846
|
+
declare function SidebarItems$1({
|
|
847
|
+
routes,
|
|
848
|
+
className,
|
|
849
|
+
classNames,
|
|
850
|
+
componentItem,
|
|
851
|
+
componentGroup
|
|
852
|
+
}: SidebarItemsProps): _$react_jsx_runtime0.JSX.Element;
|
|
853
|
+
/**
|
|
854
|
+
* Main Sidebar Export
|
|
855
|
+
*/
|
|
856
|
+
declare const Sidebar$1: typeof SidebarRoot & {
|
|
857
|
+
Root: typeof SidebarRoot;
|
|
858
|
+
Mobile: typeof SidebarMobile;
|
|
859
|
+
Header: typeof SidebarHeader;
|
|
860
|
+
Content: typeof SidebarContent;
|
|
861
|
+
Group: typeof SidebarGroup;
|
|
862
|
+
Link: typeof SidebarLink;
|
|
863
|
+
SubGroup: typeof SidebarSubGroup;
|
|
864
|
+
Item: typeof SidebarItem;
|
|
865
|
+
Items: typeof SidebarItems$1;
|
|
866
|
+
};
|
|
867
|
+
//#endregion
|
|
868
|
+
//#region src/client/components/ui-base/sidebar.d.ts
|
|
869
|
+
interface SidebarProps {
|
|
870
|
+
routes: ComponentRoute[];
|
|
871
|
+
config: BoltdocsConfig;
|
|
872
|
+
className?: string;
|
|
873
|
+
}
|
|
874
|
+
declare function SidebarMain({
|
|
875
|
+
routes,
|
|
876
|
+
config,
|
|
877
|
+
className
|
|
878
|
+
}: SidebarProps): _$react_jsx_runtime0.JSX.Element;
|
|
879
|
+
declare function SidebarItems(props: SidebarItemsProps): _$react_jsx_runtime0.JSX.Element;
|
|
880
|
+
declare const Sidebar: typeof SidebarMain & {
|
|
881
|
+
Root: typeof SidebarRoot;
|
|
882
|
+
Mobile: typeof SidebarMobile;
|
|
883
|
+
Header: typeof SidebarHeader;
|
|
884
|
+
Content: typeof SidebarContent;
|
|
885
|
+
Group: typeof SidebarGroup;
|
|
886
|
+
Link: typeof SidebarLink;
|
|
887
|
+
SubGroup: typeof SidebarSubGroup;
|
|
888
|
+
Item: typeof SidebarItem;
|
|
889
|
+
Items: typeof SidebarItems;
|
|
890
|
+
};
|
|
891
|
+
//#endregion
|
|
892
|
+
//#region src/client/components/ui-base/on-this-page.d.ts
|
|
893
|
+
interface OnThisPageUIProps extends OnThisPageProps {
|
|
894
|
+
className?: string;
|
|
895
|
+
}
|
|
896
|
+
declare function OnThisPage({
|
|
897
|
+
headings,
|
|
898
|
+
editLink,
|
|
899
|
+
communityHelp,
|
|
900
|
+
filePath,
|
|
901
|
+
className
|
|
902
|
+
}: OnThisPageUIProps): _$react_jsx_runtime0.JSX.Element;
|
|
903
|
+
//#endregion
|
|
904
|
+
//#region src/client/components/ui-base/breadcrumbs.d.ts
|
|
905
|
+
declare function Breadcrumbs({
|
|
906
|
+
className
|
|
907
|
+
}: {
|
|
908
|
+
className?: string;
|
|
909
|
+
}): _$react_jsx_runtime0.JSX.Element | null;
|
|
910
|
+
//#endregion
|
|
911
|
+
//#region src/client/components/ui-base/page-nav.d.ts
|
|
912
|
+
/**
|
|
913
|
+
* Component to display the previous and next page navigation buttons.
|
|
914
|
+
* Enhanced with subtle entrance animations, modern card layout, and hover highlights.
|
|
915
|
+
*/
|
|
916
|
+
declare function PageNav({
|
|
917
|
+
className
|
|
918
|
+
}: {
|
|
919
|
+
className?: string;
|
|
920
|
+
}): _$react_jsx_runtime0.JSX.Element | null;
|
|
921
|
+
//#endregion
|
|
922
|
+
//#region src/client/components/ui-base/error-boundary.d.ts
|
|
923
|
+
interface ErrorBoundaryProps {
|
|
924
|
+
children?: ReactNode;
|
|
925
|
+
fallback?: ReactNode;
|
|
926
|
+
}
|
|
927
|
+
declare function ErrorBoundary({
|
|
928
|
+
children,
|
|
929
|
+
fallback
|
|
930
|
+
}: ErrorBoundaryProps): _$react_jsx_runtime0.JSX.Element;
|
|
931
|
+
//#endregion
|
|
932
|
+
//#region src/client/components/ui-base/copy-markdown.d.ts
|
|
933
|
+
interface CopyMarkdownProps {
|
|
934
|
+
content?: string;
|
|
935
|
+
mdxRaw?: string;
|
|
936
|
+
route?: ComponentRoute;
|
|
937
|
+
className?: string;
|
|
938
|
+
}
|
|
939
|
+
declare function CopyMarkdown({
|
|
940
|
+
content,
|
|
941
|
+
mdxRaw,
|
|
942
|
+
className
|
|
943
|
+
}: CopyMarkdownProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
944
|
+
//#endregion
|
|
945
|
+
//#region src/client/components/ui-base/search-dialog.d.ts
|
|
946
|
+
declare function SearchDialog({
|
|
947
|
+
routes,
|
|
948
|
+
className,
|
|
949
|
+
markClassName
|
|
950
|
+
}: {
|
|
951
|
+
routes: ComponentRoute[];
|
|
952
|
+
className?: string;
|
|
953
|
+
markClassName?: string;
|
|
954
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
955
|
+
//#endregion
|
|
956
|
+
//#region src/client/components/ui-base/not-found.d.ts
|
|
957
|
+
declare function NotFound({
|
|
958
|
+
className
|
|
959
|
+
}: {
|
|
960
|
+
className?: string;
|
|
961
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
962
|
+
//#endregion
|
|
963
|
+
//#region src/client/components/ui-base/banner.d.ts
|
|
964
|
+
interface BannerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
965
|
+
/**
|
|
966
|
+
* If true, shows a close button to dismiss the banner.
|
|
967
|
+
*/
|
|
968
|
+
dismissible?: boolean;
|
|
969
|
+
/**
|
|
970
|
+
* Unique identifier for the banner. If provided and dismissible is true,
|
|
971
|
+
* the dismissed state will be saved in localStorage so it doesn't reappear
|
|
972
|
+
* on subsequent visits.
|
|
973
|
+
*/
|
|
974
|
+
id?: string;
|
|
975
|
+
}
|
|
976
|
+
declare function Banner({
|
|
977
|
+
children,
|
|
978
|
+
className,
|
|
979
|
+
dismissible,
|
|
980
|
+
id,
|
|
981
|
+
...props
|
|
982
|
+
}: BannerProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
983
|
+
//#endregion
|
|
984
|
+
//#region src/client/collections/hooks.d.ts
|
|
985
|
+
interface UsePostsOptions {
|
|
986
|
+
includeDrafts?: boolean;
|
|
987
|
+
}
|
|
988
|
+
/**
|
|
989
|
+
* Returns the posts of a collection, filtered by the current locale and version.
|
|
990
|
+
* Defaults to "blog" if no collection is specified.
|
|
991
|
+
* @param collection - The name of the collection. Defaults to "blog".
|
|
992
|
+
* @param options - Options to customize the query.
|
|
993
|
+
* @param options.includeDrafts - If true, includes draft posts in the results.
|
|
994
|
+
* @returns The filtered posts of the collection.
|
|
995
|
+
*/
|
|
996
|
+
declare function usePosts(collection?: string, options?: UsePostsOptions): CollectionPost$1[];
|
|
997
|
+
/**
|
|
998
|
+
* Returns a single post from a collection.
|
|
999
|
+
*
|
|
1000
|
+
* @param collection - The name of the collection (optional inside post routes).
|
|
1001
|
+
* @param slug - The post slug (optional inside post routes).
|
|
1002
|
+
* @returns The matching post, or undefined if not found.
|
|
1003
|
+
*/
|
|
1004
|
+
declare function usePost(): CollectionPost$1 | undefined;
|
|
1005
|
+
declare function usePost(collection: string, slug: string): CollectionPost$1 | undefined;
|
|
1006
|
+
/**
|
|
1007
|
+
* Returns the recent posts of a collection. Defaults to "blog".
|
|
1008
|
+
* @param collection - The name of the collection. Defaults to "blog".
|
|
1009
|
+
* @param count - The number of recent posts to return.
|
|
1010
|
+
* @returns The recent posts of the collection.
|
|
1011
|
+
*/
|
|
1012
|
+
declare function useRecentPosts(collection?: string, count?: number): CollectionPost$1[];
|
|
1013
|
+
//#endregion
|
|
1014
|
+
//#region src/client/components/mdx/timeline.d.ts
|
|
1015
|
+
/**
|
|
1016
|
+
* Variants for both dots and badges.
|
|
1017
|
+
*
|
|
1018
|
+
* - Semantic: `primary`, `success`, `info`, `warning`, `danger` map directly
|
|
1019
|
+
* to the dot accent color and the badge pill background.
|
|
1020
|
+
* - Lifecycle (alias for semantic but convenient for changelogs):
|
|
1021
|
+
* `major` → primary, `minor` → success, `patch` → info,
|
|
1022
|
+
* `new` → primary, `deprecated` → warning, `breaking` → danger.
|
|
1023
|
+
*/
|
|
1024
|
+
type TimelineVariant = 'primary' | 'success' | 'info' | 'warning' | 'danger' | 'major' | 'minor' | 'patch' | 'new' | 'deprecated' | 'breaking';
|
|
1025
|
+
interface TimelineBadgeConfig {
|
|
1026
|
+
text: ReactNode;
|
|
1027
|
+
variant?: TimelineVariant;
|
|
1028
|
+
}
|
|
1029
|
+
interface TimelineProps extends Omit<React.HTMLAttributes<HTMLOListElement>, 'children'> {
|
|
1030
|
+
children?: ReactNode;
|
|
1031
|
+
/** Reduce vertical padding between items. */
|
|
1032
|
+
compact?: boolean;
|
|
1033
|
+
connectorClassName?: string;
|
|
1034
|
+
}
|
|
1035
|
+
interface TimelineItemProps extends Omit<React.HTMLAttributes<HTMLLIElement>, 'title' | 'children'> {
|
|
1036
|
+
/** Date the entry happened. Accepts ISO string, epoch ms, or `Date` instance. */
|
|
1037
|
+
date?: string | number | Date;
|
|
1038
|
+
/** Headline shown beside the date. */
|
|
1039
|
+
title: ReactNode;
|
|
1040
|
+
/** Inline badge to the right of the title (e.g. "Major", "Breaking"). */
|
|
1041
|
+
badge?: string | TimelineBadgeConfig;
|
|
1042
|
+
/** Icon to render inside the dot. Falls back to a coloured filled circle. */
|
|
1043
|
+
icon?: ReactNode;
|
|
1044
|
+
/** Dot / badge accent colour. Defaults to `primary`. */
|
|
1045
|
+
variant?: TimelineVariant;
|
|
1046
|
+
/**
|
|
1047
|
+
* BCP-47 locale tag used by `toLocaleDateString` for the rendered
|
|
1048
|
+
* date. Defaults to `'en-US'` so server and client produce identical
|
|
1049
|
+
* markup on hydration. Pass `'es'`, `'fr'`, etc. to localize.
|
|
1050
|
+
*/
|
|
1051
|
+
locale?: string;
|
|
1052
|
+
/** Body content for the entry. Accepts Markdown/markup from MDX. */
|
|
1053
|
+
children?: ReactNode;
|
|
1054
|
+
dotClassName?: string;
|
|
1055
|
+
headerClassName?: string;
|
|
1056
|
+
timeClassName?: string;
|
|
1057
|
+
badgeClassName?: string;
|
|
1058
|
+
titleClassName?: string;
|
|
1059
|
+
bodyClassName?: string;
|
|
1060
|
+
}
|
|
1061
|
+
declare function TimelineRoot({
|
|
1062
|
+
children,
|
|
1063
|
+
className,
|
|
1064
|
+
compact,
|
|
1065
|
+
connectorClassName,
|
|
1066
|
+
...props
|
|
1067
|
+
}: TimelineProps): _$react_jsx_runtime0.JSX.Element;
|
|
1068
|
+
declare function TimelineItem({
|
|
1069
|
+
date,
|
|
1070
|
+
title,
|
|
1071
|
+
badge,
|
|
1072
|
+
icon,
|
|
1073
|
+
variant,
|
|
1074
|
+
locale,
|
|
1075
|
+
className,
|
|
1076
|
+
children,
|
|
1077
|
+
dotClassName,
|
|
1078
|
+
headerClassName,
|
|
1079
|
+
timeClassName,
|
|
1080
|
+
badgeClassName,
|
|
1081
|
+
titleClassName,
|
|
1082
|
+
bodyClassName,
|
|
1083
|
+
...props
|
|
1084
|
+
}: TimelineItemProps): _$react_jsx_runtime0.JSX.Element;
|
|
1085
|
+
declare const Timeline: typeof TimelineRoot & {
|
|
1086
|
+
Item: typeof TimelineItem;
|
|
1087
|
+
};
|
|
1088
|
+
//#endregion
|
|
1089
|
+
//#region src/client/utils/cn.d.ts
|
|
1090
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
1091
|
+
//#endregion
|
|
1092
|
+
//#region src/client/utils/path.d.ts
|
|
1093
|
+
/**
|
|
1094
|
+
* Resolves a public asset URL under the configured Vite/base path.
|
|
1095
|
+
* Root-relative URLs are otherwise interpreted against the origin root, which
|
|
1096
|
+
* breaks sites deployed under a documentation base such as `/docs`.
|
|
1097
|
+
*/
|
|
1098
|
+
declare function resolvePublicAssetUrl(value: string, base?: string): string;
|
|
1099
|
+
//#endregion
|
|
1100
|
+
//#region src/client/utils/i18n.d.ts
|
|
1101
|
+
/**
|
|
1102
|
+
* Retrieves the correct translation from a value that can be either
|
|
1103
|
+
* a simple string or a map of locale-specific strings.
|
|
1104
|
+
*
|
|
1105
|
+
* @param value - The text to translate
|
|
1106
|
+
* @param locale - The current active locale (e.g., 'en', 'es')
|
|
1107
|
+
* @returns The translated string
|
|
1108
|
+
*/
|
|
1109
|
+
declare function getTranslated(value: string | Record<string, string> | undefined, locale?: string): string;
|
|
1110
|
+
//#endregion
|
|
1111
|
+
//#region src/shared/structured-data.d.ts
|
|
1112
|
+
interface WebSiteStructuredDataOptions {
|
|
1113
|
+
name: string;
|
|
1114
|
+
url: string;
|
|
1115
|
+
description?: string;
|
|
1116
|
+
searchUrl?: string;
|
|
1117
|
+
}
|
|
1118
|
+
interface ArticleStructuredDataOptions {
|
|
1119
|
+
headline: string;
|
|
1120
|
+
url: string;
|
|
1121
|
+
description?: string;
|
|
1122
|
+
datePublished?: string | Date;
|
|
1123
|
+
dateModified?: string | Date;
|
|
1124
|
+
image?: string;
|
|
1125
|
+
author?: string | {
|
|
1126
|
+
name: string;
|
|
1127
|
+
url?: string;
|
|
1128
|
+
};
|
|
1129
|
+
}
|
|
1130
|
+
interface BreadcrumbStructuredDataItem {
|
|
1131
|
+
name: string;
|
|
1132
|
+
url: string;
|
|
1133
|
+
}
|
|
1134
|
+
interface StructuredDataFactoryOptions {
|
|
1135
|
+
/** A WebSite graph for the global site identity. */
|
|
1136
|
+
website?: WebSiteStructuredDataOptions;
|
|
1137
|
+
/** An Article graph for the current page or release post. */
|
|
1138
|
+
article?: ArticleStructuredDataOptions;
|
|
1139
|
+
/** A BreadcrumbList graph for the current page hierarchy. */
|
|
1140
|
+
breadcrumbs?: BreadcrumbStructuredDataItem[];
|
|
1141
|
+
/** Additional graph nodes for schema types not covered by the presets. */
|
|
1142
|
+
additional?: JsonLdObject | JsonLdObject[];
|
|
1143
|
+
}
|
|
1144
|
+
/** Preserve literal JSON-LD types in config files and frontmatter helpers. */
|
|
1145
|
+
declare function defineStructuredData<T extends StructuredData$1>(data: T): T;
|
|
1146
|
+
/**
|
|
1147
|
+
* Creates one JSON-LD value from the common website/article/breadcrumb presets.
|
|
1148
|
+
* Single-node input returns an object; multiple nodes return a graph array.
|
|
1149
|
+
*/
|
|
1150
|
+
declare function createStructuredData(options: StructuredDataFactoryOptions): StructuredData$1;
|
|
1151
|
+
declare function createWebSiteStructuredData(options: WebSiteStructuredDataOptions): JsonLdObject;
|
|
1152
|
+
declare function createArticleStructuredData(options: ArticleStructuredDataOptions): JsonLdObject;
|
|
1153
|
+
declare function createBreadcrumbStructuredData(items: BreadcrumbStructuredDataItem[]): JsonLdObject;
|
|
1154
|
+
//#endregion
|
|
1155
|
+
//#region src/client/components/structured-data.d.ts
|
|
1156
|
+
interface StructuredDataProps {
|
|
1157
|
+
data: StructuredData$1;
|
|
1158
|
+
id?: string;
|
|
1159
|
+
}
|
|
1160
|
+
/**
|
|
1161
|
+
* Renders safe, valid JSON-LD. Escaping `<` prevents a JSON value from closing
|
|
1162
|
+
* the surrounding script tag when the document is rendered server-side.
|
|
1163
|
+
*/
|
|
1164
|
+
declare function StructuredData({
|
|
1165
|
+
data,
|
|
1166
|
+
id
|
|
1167
|
+
}: StructuredDataProps): _$react_jsx_runtime0.JSX.Element;
|
|
1168
|
+
//#endregion
|
|
1169
|
+
//#region src/client/view-transitions.d.ts
|
|
1170
|
+
interface ViewTransitionOptions {
|
|
1171
|
+
/** Enable or disable this individual transition. */
|
|
1172
|
+
enabled?: boolean;
|
|
1173
|
+
/** Transition types forwarded to the native API. */
|
|
1174
|
+
types?: string[];
|
|
1175
|
+
}
|
|
1176
|
+
interface ViewTransitionHandle {
|
|
1177
|
+
finished?: Promise<unknown>;
|
|
1178
|
+
ready?: Promise<unknown>;
|
|
1179
|
+
updateCallbackDone?: Promise<unknown>;
|
|
1180
|
+
skipTransition?: () => void;
|
|
1181
|
+
}
|
|
1182
|
+
type ViewTransitionUpdate = () => void | Promise<void>;
|
|
1183
|
+
interface ViewTransitionRunner {
|
|
1184
|
+
(update: ViewTransitionUpdate, options?: ViewTransitionOptions): ViewTransitionHandle | null;
|
|
1185
|
+
/** Alias for the callable form, useful for event handlers and callbacks. */
|
|
1186
|
+
run: (update: ViewTransitionUpdate, options?: ViewTransitionOptions) => ViewTransitionHandle | null;
|
|
1187
|
+
/** Explicit alias for code that reads like an imperative action. */
|
|
1188
|
+
start: (update: ViewTransitionUpdate, options?: ViewTransitionOptions) => ViewTransitionHandle | null;
|
|
1189
|
+
/** Whether the project has enabled the experimental integration. */
|
|
1190
|
+
enabled: boolean;
|
|
1191
|
+
/** Whether the current browser exposes the native API. */
|
|
1192
|
+
supported: boolean;
|
|
1193
|
+
}
|
|
1194
|
+
/**
|
|
1195
|
+
* Starts a native document transition when the browser supports it. On older
|
|
1196
|
+
* browsers, the update still runs normally and the function returns null.
|
|
1197
|
+
*/
|
|
1198
|
+
declare function startViewTransition(update: ViewTransitionUpdate, options?: ViewTransitionOptions): ViewTransitionHandle | null;
|
|
1199
|
+
/**
|
|
1200
|
+
* Returns a transition-aware runner that follows the project's experimental
|
|
1201
|
+
* configuration. It is safe to use in custom layouts and external pages.
|
|
1202
|
+
*
|
|
1203
|
+
* The returned value is callable for backwards compatibility:
|
|
1204
|
+
* `transition(() => setState(...))`. It also exposes `run` and `start` aliases
|
|
1205
|
+
* for discoverability in editor autocomplete.
|
|
1206
|
+
*/
|
|
1207
|
+
declare function useViewTransition(): ViewTransitionRunner;
|
|
1208
|
+
//#endregion
|
|
1209
|
+
//#region src/client/utils/react-to-text.d.ts
|
|
1210
|
+
type ResolverMap = Map<string | JSXElementConstructor<object>, (props: object) => string>;
|
|
1211
|
+
declare const reactToText: (node: ReactNode, resolvers?: ResolverMap) => string;
|
|
1212
|
+
//#endregion
|
|
1213
|
+
//#region src/client/utils/copy-clipboard.d.ts
|
|
1214
|
+
/**
|
|
1215
|
+
* Copy text to clipboard.
|
|
1216
|
+
* @param text - The text to copy.
|
|
1217
|
+
* @returns True if the text was copied successfully.
|
|
1218
|
+
*/
|
|
1219
|
+
declare const copyToClipboard: (text: string) => Promise<boolean>;
|
|
1220
|
+
//#endregion
|
|
1221
|
+
//#region src/client/utils/github.d.ts
|
|
1222
|
+
/**
|
|
1223
|
+
* Get the number of stars for a GitHub repository.
|
|
1224
|
+
* @param repo - owner/repo
|
|
1225
|
+
* @param token - The GitHub token.
|
|
1226
|
+
* @param baseUrl - The GitHub API base URL.
|
|
1227
|
+
* @returns The number of stars for the repository.
|
|
1228
|
+
* @example
|
|
1229
|
+
* getStarsRepo('owner/repo') // 100k
|
|
1230
|
+
*/
|
|
1231
|
+
declare function getStarsRepo(repo: string, token?: string, baseUrl?: string): Promise<string>;
|
|
1232
|
+
//#endregion
|
|
1233
|
+
//#region src/client/components/mdx/code-block.d.ts
|
|
1234
|
+
interface CodeBlockProps {
|
|
1235
|
+
children?: React.ReactNode;
|
|
1236
|
+
className?: string;
|
|
1237
|
+
hideCopy?: boolean;
|
|
1238
|
+
title?: string;
|
|
1239
|
+
lang?: string;
|
|
1240
|
+
highlightedHtml?: string;
|
|
1241
|
+
'data-lang'?: string;
|
|
1242
|
+
'data-title'?: string;
|
|
1243
|
+
'data-highlighted'?: string;
|
|
1244
|
+
'data-highlighted-html'?: string;
|
|
1245
|
+
plain?: boolean;
|
|
1246
|
+
lineNumbers?: boolean | string;
|
|
1247
|
+
showLineNumbers?: boolean | string;
|
|
1248
|
+
wordWrap?: boolean | string;
|
|
1249
|
+
'word-wrap'?: boolean | string;
|
|
1250
|
+
metastring?: string;
|
|
1251
|
+
feedbackClassName?: string;
|
|
1252
|
+
copyButtonClassName?: string;
|
|
1253
|
+
}
|
|
1254
|
+
//#endregion
|
|
1255
|
+
//#region src/client/components/mdx/use-code-block.d.ts
|
|
1256
|
+
/**
|
|
1257
|
+
* @deprecated Use the feature-scoped hooks instead: `useCopyButton`,
|
|
1258
|
+
* `useExpandable` and `useCodeBlockFeedback`. This composition keeps the
|
|
1259
|
+
* historical single-hook API and will be removed in a future major version.
|
|
1260
|
+
*/
|
|
1261
|
+
declare function useCodeBlock(props: CodeBlockProps): {
|
|
1262
|
+
copied: boolean;
|
|
1263
|
+
isExpanded: boolean;
|
|
1264
|
+
setIsExpanded: React$2.Dispatch<React$2.SetStateAction<boolean>>;
|
|
1265
|
+
isExpandable: boolean;
|
|
1266
|
+
preRef: React$2.RefObject<HTMLElement | null>;
|
|
1267
|
+
handleCopy: () => void;
|
|
1268
|
+
shouldTruncate: boolean;
|
|
1269
|
+
isHighlighted: boolean;
|
|
1270
|
+
effectiveHighlightedHtml: string | undefined;
|
|
1271
|
+
effectiveTitle: string | undefined;
|
|
1272
|
+
lang: string;
|
|
1273
|
+
showCodeBlockFeedback: boolean;
|
|
1274
|
+
rated: "up" | "down" | null;
|
|
1275
|
+
handleRate: (type: "up" | "down") => Promise<void>;
|
|
1276
|
+
};
|
|
1277
|
+
//#endregion
|
|
1278
|
+
//#region src/client/components/mdx/use-copy-button.d.ts
|
|
1279
|
+
/**
|
|
1280
|
+
* Copy-to-clipboard state for a code block (or any copyable surface).
|
|
1281
|
+
* `handleCopy(code)` copies the given text and shows a transient "copied"
|
|
1282
|
+
* confirmation for 2 seconds.
|
|
1283
|
+
*/
|
|
1284
|
+
declare function useCopyButton(): {
|
|
1285
|
+
copied: boolean;
|
|
1286
|
+
handleCopy: (code: string) => void;
|
|
1287
|
+
};
|
|
1288
|
+
//#endregion
|
|
1289
|
+
//#region src/client/components/mdx/use-expandable.d.ts
|
|
1290
|
+
interface UseExpandableOptions {
|
|
1291
|
+
/** The raw children rendered inside the code area (for line counting). */
|
|
1292
|
+
children?: React.ReactNode;
|
|
1293
|
+
/** Pre-rendered Shiki HTML when available (for line counting). */
|
|
1294
|
+
highlightedHtml?: string;
|
|
1295
|
+
/** Number of lines above which the block becomes expandable. @default 6 */
|
|
1296
|
+
maxLines?: number;
|
|
1297
|
+
}
|
|
1298
|
+
/**
|
|
1299
|
+
* Expand / collapse behavior for long code blocks. Measures the rendered code
|
|
1300
|
+
* through `preRef` and exposes whether the block is expandable, whether it
|
|
1301
|
+
* should be visually truncated, and a toggle handler.
|
|
1302
|
+
*/
|
|
1303
|
+
declare function useExpandable(options?: UseExpandableOptions): {
|
|
1304
|
+
isExpanded: boolean;
|
|
1305
|
+
setIsExpanded: React$2.Dispatch<React$2.SetStateAction<boolean>>;
|
|
1306
|
+
isExpandable: boolean;
|
|
1307
|
+
shouldTruncate: boolean;
|
|
1308
|
+
toggle: () => void;
|
|
1309
|
+
preRef: React$2.RefObject<HTMLElement | null>;
|
|
1310
|
+
};
|
|
1311
|
+
//#endregion
|
|
1312
|
+
//#region src/client/components/mdx/use-code-block-feedback.d.ts
|
|
1313
|
+
interface CodeBlockFeedbackPayload {
|
|
1314
|
+
rating: 'good' | 'bad';
|
|
1315
|
+
comment: string;
|
|
1316
|
+
blockId: string;
|
|
1317
|
+
path: string;
|
|
1318
|
+
title: string;
|
|
1319
|
+
lang: string;
|
|
1320
|
+
snippet: string;
|
|
1321
|
+
}
|
|
1322
|
+
interface UseCodeBlockFeedbackOptions {
|
|
1323
|
+
/** Plain blocks never show feedback. @default false */
|
|
1324
|
+
plain?: boolean;
|
|
1325
|
+
/** Language label used to build the block id. */
|
|
1326
|
+
lang?: string;
|
|
1327
|
+
/**
|
|
1328
|
+
* Custom submit handler. When provided it replaces the default POST to the
|
|
1329
|
+
* configured feedback endpoint (useful for plugins or custom backends).
|
|
1330
|
+
*/
|
|
1331
|
+
submitFeedback?: (payload: CodeBlockFeedbackPayload) => Promise<void> | void;
|
|
1332
|
+
}
|
|
1333
|
+
/**
|
|
1334
|
+
* Thumbs-up / thumbs-down feedback for code blocks. Only enabled when the
|
|
1335
|
+
* `feedback.custom` integration is configured in the site config. The submit
|
|
1336
|
+
* behavior can be overridden via `submitFeedback`.
|
|
1337
|
+
*/
|
|
1338
|
+
declare function useCodeBlockFeedback(options?: UseCodeBlockFeedbackOptions): {
|
|
1339
|
+
rated: "up" | "down" | null;
|
|
1340
|
+
handleRate: (type: "up" | "down", code?: string) => Promise<void>;
|
|
1341
|
+
enabled: boolean;
|
|
1342
|
+
};
|
|
1343
|
+
//#endregion
|
|
1344
|
+
export { SidebarItem as $, cn as A, useUI as At, NotFound as B, CollectionsData as Bt, createArticleStructuredData as C, usePageNav as Ct, defineStructuredData as D, useSearch as Dt, createWebSiteStructuredData as E, useTabs as Et, TimelineVariant as F, BoltdocsShell as Ft, Breadcrumbs as G, ComponentRoute as Gt, CopyMarkdown as H, BoltdocsTab as Ht, usePost as I, MdxPage as It, Sidebar$1 as J, OnThisPageProps as Jt, OnThisPage as K, LayoutProps as Kt, usePosts as L, createRoutes as Lt, TimelineBadgeConfig as M, useTheme as Mt, TimelineItemProps as N, useConfig as Nt, getTranslated as O, useSidebar as Ot, TimelineProps as P, ViteReactSSG as Pt, SidebarHeader as Q, useRecentPosts as R, CollectionPost$1 as Rt, WebSiteStructuredDataOptions as S, useBreadcrumbs as St, createStructuredData as T, useVersion as Tt, ErrorBoundary as U, CollectionListLoaderData as Ut, SearchDialog as V, CurrentPostProvider as Vt, PageNav as W, CollectionPostLoaderData as Wt, SidebarGroup as X, SiteConfig as Xt, SidebarContent as Y, SidebarProps$1 as Yt, SidebarGroupRenderProps as Z, TabsProps as Zt, StructuredData as _, useTrackEvent as _t, useExpandable as a, SidebarLinkProps as at, BreadcrumbStructuredDataItem as b, useLocalizedTo as bt, getStarsRepo as c, SidebarSlots as ct, ViewTransitionHandle as d, Navbar as dt, SidebarItemProps as et, ViewTransitionOptions as f, DocsLayoutComponent as ft, useViewTransition as g, useAnalytics as gt, startViewTransition as h, useHeadings as ht, UseExpandableOptions as i, SidebarLink as it, Timeline as j, useMdxComponents as jt, resolvePublicAssetUrl as k, useNavbar as kt, copyToClipboard as l, SidebarSubGroup as lt, ViewTransitionUpdate as m, useMergedComponents as mt, UseCodeBlockFeedbackOptions as n, SidebarItems$1 as nt, useCopyButton as o, SidebarMobile as ot, ViewTransitionRunner as p, useFeedback as pt, Sidebar as q, NavbarLink as qt, useCodeBlockFeedback as r, SidebarItemsProps as rt, useCodeBlock as s, SidebarRoot as st, CodeBlockFeedbackPayload as t, SidebarItemRenderProps as tt, reactToText as u, ComponentBase as ut, StructuredDataProps as v, useTrackPageView as vt, createBreadcrumbStructuredData as w, useI18n as wt, StructuredDataFactoryOptions as x, useRoutes as xt, ArticleStructuredDataOptions as y, useSearchHighlight as yt, Banner as z, CollectionsContext as zt };
|