boltdocs 3.2.1 → 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.
Files changed (155) hide show
  1. package/bin/boltdocs.js +20 -1
  2. package/bin/preloader.mjs +28 -0
  3. package/dist/{adapters-ByYY44Zy.mjs → adapters-BmB4TKCc.mjs} +1 -1
  4. package/dist/{adapters-DvmtpdSF.cjs → adapters-Cp1Maurn.cjs} +1 -1
  5. package/dist/audit-CLXjMzwQ.mjs +11 -0
  6. package/dist/audit-COgjnQ5n.cjs +11 -0
  7. package/dist/build-BS2hefiL.cjs +6 -0
  8. package/dist/build-C5mNh9D-.mjs +6 -0
  9. package/dist/cache-CJE9nWLE.cjs +6 -0
  10. package/dist/cache-OY4HzIXl.mjs +6 -0
  11. package/dist/callout-oI_LCbxS.d.ts +71 -0
  12. package/dist/callout-plqx9Dw-.d.cts +71 -0
  13. package/dist/client/index.cjs +1265 -569
  14. package/dist/client/index.d.cts +3 -542
  15. package/dist/client/index.d.ts +3 -542
  16. package/dist/client/index.js +1167 -521
  17. package/dist/client/mdx.cjs +1 -1
  18. package/dist/client/mdx.d.cts +24 -2
  19. package/dist/client/mdx.d.ts +24 -2
  20. package/dist/client/mdx.js +1 -1
  21. package/dist/client/primitives.cjs +14 -4
  22. package/dist/client/primitives.d.cts +281 -38
  23. package/dist/client/primitives.d.ts +281 -38
  24. package/dist/client/primitives.js +5 -5
  25. package/dist/client/router.cjs +49 -0
  26. package/dist/client/router.d.cts +3 -0
  27. package/dist/client/router.d.ts +3 -0
  28. package/dist/client/router.js +8 -0
  29. package/dist/client/theme/reset.css +40 -4
  30. package/dist/{config-BpzaPsJj.d.cts → config-BoRlz0Ca.d.mts} +157 -14
  31. package/dist/{config-xtS0ZkMm.d.mts → config-CTsX_tGM.d.cts} +157 -14
  32. package/dist/config-Ceib-AOH.cjs +7 -0
  33. package/dist/config-DGLQsy7y.mjs +7 -0
  34. package/dist/{package-BcISI5-P.cjs → config-files-BYHDOrKn.mjs} +1 -1
  35. package/dist/config-files-D9cdBMl2.cjs +6 -0
  36. package/dist/config-jJh8WYJI.cjs +6 -0
  37. package/dist/csp-C4LmN1ko.cjs +6 -0
  38. package/dist/csp-D6JEOqKh.mjs +6 -0
  39. package/dist/dev-Ch3hEe5Y.cjs +6 -0
  40. package/dist/dev-QPNxysrd.mjs +6 -0
  41. package/dist/{docs-layout-BdtZ9z6s.js → docs-layout-CbZ7LDRe.js} +504 -249
  42. package/dist/{docs-layout-CFWI15Id.cjs → docs-layout-vzfXed1Q.cjs} +516 -254
  43. package/dist/{doctor-BBtmNJE0.cjs → doctor-B1_YL0Wt.cjs} +1 -1
  44. package/dist/doctor-C7whl4ED.cjs +6 -0
  45. package/dist/doctor-DmQnml2k.mjs +6 -0
  46. package/dist/{generator-COepVWGi.cjs → generator-BlW45ST7.cjs} +5 -3
  47. package/dist/{generator-CcOBN5vI.mjs → generator-BwknNejd.mjs} +5 -3
  48. package/dist/{handler-XX7cLTqe.cjs → handler-CDEoKARD.cjs} +2 -2
  49. package/dist/{handler-DzQae4eA.mjs → handler-D7UyZlPm.mjs} +2 -2
  50. package/dist/{image-Bz87fCla.js → image-B-NDSDuY.js} +129 -11
  51. package/dist/{image-C4TlpMHn.cjs → image-Hnaa2bJd.cjs} +175 -9
  52. package/dist/index-C56bL-A-.d.cts +1344 -0
  53. package/dist/{sidebar-COTaMHR-.d.ts → index-CPUUKzxD.d.cts} +344 -327
  54. package/dist/{sidebar-CrEdJuHX.d.cts → index-Ci4kfOHF.d.ts} +344 -327
  55. package/dist/index-Cu9H6CRa.d.ts +1344 -0
  56. package/dist/link-CgdI6O2o.js +872 -0
  57. package/dist/{link-D1Gjkb-2.cjs → link-vZjmD-es.cjs} +406 -223
  58. package/dist/{mdx-BuO6a1f7.js → mdx-BRT71V5Q.js} +211 -168
  59. package/dist/{mdx-CD-tSjRG.cjs → mdx-D0Absdq5.cjs} +225 -169
  60. package/dist/native-BNCY7PRF.cjs +6 -0
  61. package/dist/native-Di9Fnfrv.mjs +6 -0
  62. package/dist/native-Kre2T5eS.cjs +6 -0
  63. package/dist/node/cache.cjs +1 -1
  64. package/dist/node/cache.d.cts +19 -3
  65. package/dist/node/cache.d.mts +19 -3
  66. package/dist/node/cache.mjs +1 -1
  67. package/dist/node/cli-entry.cjs +1 -9
  68. package/dist/node/cli-entry.mjs +1 -9
  69. package/dist/node/index.cjs +1 -1
  70. package/dist/node/index.d.cts +245 -17
  71. package/dist/node/index.d.mts +246 -18
  72. package/dist/node/index.mjs +1 -1
  73. package/dist/node/mdx/shiki-adapter.cjs +1 -1
  74. package/dist/node/mdx/shiki-adapter.d.cts +24 -3
  75. package/dist/node/mdx/shiki-adapter.d.mts +24 -2
  76. package/dist/node/mdx/shiki-adapter.mjs +1 -1
  77. package/dist/node-Du5UL5wo.mjs +23 -0
  78. package/dist/node-DunuGqyp.cjs +23 -0
  79. package/dist/{package-CCYEAYeA.mjs → package-DA848keM.mjs} +1 -1
  80. package/dist/package-wplzySjz.cjs +6 -0
  81. package/dist/pages-external-BBw8ObVK.mjs +6 -0
  82. package/dist/pages-external-DPiPFxxP.cjs +6 -0
  83. package/dist/parser-BqTOsEUa.cjs +6 -0
  84. package/dist/parser-CGMY2lJ7.mjs +6 -0
  85. package/dist/plugin-BcTzvHAJ.mjs +69 -0
  86. package/dist/plugin-TulVMt1z.cjs +69 -0
  87. package/dist/plugin-context-C-l90hFt.cjs +15 -0
  88. package/dist/plugin-context-wqHNSZum.mjs +15 -0
  89. package/dist/plugin-lifecycle-B1BzSHdn.cjs +6 -0
  90. package/dist/resolve-B7vWOd8R.cjs +6 -0
  91. package/dist/resolve-C2kKnk_5.mjs +6 -0
  92. package/dist/resolve-It1Iug83.cjs +6 -0
  93. package/dist/resolve-YdTrt_FG.mjs +6 -0
  94. package/dist/router-C3kygdRK.cjs +1285 -0
  95. package/dist/router-CZBxMRAH.js +987 -0
  96. package/dist/routes-BL4y79tb.mjs +6 -0
  97. package/dist/routes-C2nPecwu.cjs +6 -0
  98. package/dist/routes-U9L8psZ9.cjs +6 -0
  99. package/dist/{search-dialog-DHqwjJuG.cjs → search-dialog-BCOHQGSt.cjs} +1 -1
  100. package/dist/search-dialog-Bp_P1MPP.js +481 -0
  101. package/dist/{search-dialog-DFnlx8LO.js → search-dialog-BqkzDTq2.js} +107 -57
  102. package/dist/{search-dialog-BRFno7HD.cjs → search-dialog-CIeIUhAn.cjs} +218 -43
  103. package/dist/{search-dialog-D6TvjcuV.js → search-dialog-DtmxmfEu.js} +1 -1
  104. package/dist/{search-dialog-B1NERUNx.cjs → search-dialog-x_qHU8ty.cjs} +107 -58
  105. package/dist/server/index.cjs +1 -1
  106. package/dist/server/index.d.mts +1 -1
  107. package/dist/server/index.mjs +1 -1
  108. package/dist/update-check-BKqmYfwT.cjs +11 -0
  109. package/dist/update-check-QnrVR3q1.mjs +11 -0
  110. package/dist/utils-8lzafE49.mjs +7 -0
  111. package/dist/utils-ej6_SjIZ.cjs +7 -0
  112. package/dist/virtual-modules-Ca5tHk1X.cjs +30 -0
  113. package/dist/virtual-modules-Dlgt1fP0.mjs +30 -0
  114. package/package.json +18 -16
  115. package/src/shared/mdx-path.ts +12 -0
  116. package/src/shared/structured-data.ts +145 -0
  117. package/src/shared/types.ts +220 -16
  118. package/dist/banner-BMop1KLF.d.ts +0 -100
  119. package/dist/banner-CVD0GugR.d.cts +0 -100
  120. package/dist/cache-CO4Dy2uQ.cjs +0 -6
  121. package/dist/cache-Dk53iOo6.mjs +0 -6
  122. package/dist/config-CCXp3aXO.mjs +0 -7
  123. package/dist/config-CMd4XoFq.cjs +0 -6
  124. package/dist/config-DlGoEM9D.cjs +0 -7
  125. package/dist/csp-CRp_3U7a.cjs +0 -6
  126. package/dist/csp-oTC2ygvF.mjs +0 -6
  127. package/dist/doctor-Bv16QSrI.cjs +0 -7
  128. package/dist/doctor-DOAbSaiL.mjs +0 -7
  129. package/dist/headers-Ddwek8K7.mjs +0 -6
  130. package/dist/headers-dg4SDrjY.cjs +0 -6
  131. package/dist/link-2PzgTnaP.js +0 -673
  132. package/dist/meta-loader-C4Hu9RN9.mjs +0 -6
  133. package/dist/meta-loader-Dq1zcFnh.cjs +0 -6
  134. package/dist/node-BXtqM1uH.mjs +0 -6
  135. package/dist/node-BlVk4EVg.cjs +0 -104
  136. package/dist/node-DOf4zhWc.mjs +0 -104
  137. package/dist/node-aD1eisrR.cjs +0 -6
  138. package/dist/pages-external-BYa4JSda.mjs +0 -6
  139. package/dist/pages-external-XkYIs-d5.cjs +0 -6
  140. package/dist/parser-DCiEWkSk.cjs +0 -8
  141. package/dist/parser-qk9FIHJ7.mjs +0 -8
  142. package/dist/plugin-C95kvu6h.mjs +0 -73
  143. package/dist/plugin-DM3u2bVj.cjs +0 -73
  144. package/dist/routes-BW6zsk7Z.mjs +0 -6
  145. package/dist/routes-BgoIB5wb.cjs +0 -6
  146. package/dist/routes-CORVxc02.cjs +0 -6
  147. package/dist/search-dialog-BmxHiKwt.js +0 -312
  148. package/dist/shiki-adapter-CoQ6jyJ4.cjs +0 -6
  149. package/dist/shiki-adapter-D-aKw7PP.mjs +0 -6
  150. package/dist/utils-Crm9oPcV.mjs +0 -7
  151. package/dist/utils-D6Xtj0FZ.cjs +0 -7
  152. /package/dist/{errors-0zGHRLue.mjs → errors-N-b6Sn2G.mjs} +0 -0
  153. /package/dist/{index-1KsTDq4o.d.mts → index-lFoyzCXy.d.mts} +0 -0
  154. /package/dist/{types-generator-BXhv7Ill.cjs → types-generator-DDSA93P3.cjs} +0 -0
  155. /package/dist/{types-generator-bDPvUztF.mjs → types-generator-DG1GX1EZ.mjs} +0 -0
@@ -1,543 +1,4 @@
1
1
 
2
- import { A as BoltdocsRoutePathWithFallback, C as SiteConfig, D as BoltdocsLocale, E as BoltdocsIntegrationsConfig, M as BoltdocsTypes, N as BoltdocsVersion, O as BoltdocsMdxComponents, S as SidebarProps, T as BoltdocsConfig, _ as CollectionPostLoaderData, b as NavbarLink, g as CollectionListLoaderData, h as BoltdocsTab, j as BoltdocsSocialLink, k as BoltdocsRoutePath, v as ComponentRoute, w as TabsProps, x as OnThisPageProps, y as LayoutProps } from "../sidebar-CrEdJuHX.cjs";
3
- import { a as ErrorBoundary, c as OnThisPage, i as CopyMarkdown, l as Sidebar, n as NotFound, o as PageNav, r as SearchDialog, s as Breadcrumbs, t as Banner, u as Navbar } from "../banner-CVD0GugR.cjs";
4
- import * as _$react from "react";
5
- import React$1, { ComponentType, JSXElementConstructor, ReactNode } from "react";
6
- import { RouteRecord, ViteReactSSG } from "@bdocs/ssg";
7
- import * as _$react_jsx_runtime0 from "react/jsx-runtime";
8
- import * as _$react_router_dom0 from "react-router-dom";
9
- import { LinkProps } from "react-router-dom";
10
- import { ClassValue } from "clsx";
11
-
12
- //#region src/client/collections/collections-context.d.ts
13
- interface CollectionPost$1 {
14
- path: string;
15
- title: string;
16
- date?: string | Date;
17
- excerpt?: string;
18
- tags?: string[];
19
- author?: string;
20
- coverImage?: string;
21
- filePath: string;
22
- locale?: string;
23
- version?: string;
24
- frontmatter?: Record<string, any>;
25
- lastUpdated?: string | number | Date;
26
- headings?: {
27
- level: number;
28
- text: string;
29
- id: string;
30
- }[];
31
- draft?: boolean;
32
- }
33
- type CollectionsData = Record<string, CollectionPost$1[]>;
34
- declare const CollectionsContext: _$react.Context<CollectionsData>;
35
- interface CurrentPostContextValue {
36
- route: ComponentRoute;
37
- headings: {
38
- level: number;
39
- text: string;
40
- id: string;
41
- }[];
42
- collection: string;
43
- }
44
- declare function CurrentPostProvider({
45
- value,
46
- children
47
- }: {
48
- value: CurrentPostContextValue;
49
- children: React.ReactNode;
50
- }): _$react_jsx_runtime0.JSX.Element;
51
- //#endregion
52
- //#region src/client/ssg/create-routes.d.ts
53
- interface CreateRoutesOptions {
54
- routesData: ComponentRoute[];
55
- collectionsData?: CollectionsData;
56
- collectionLayouts?: Record<string, React$1.ComponentType<{
57
- children: React$1.ReactNode;
58
- }>>;
59
- collectionLists?: Record<string, React$1.ComponentType>;
60
- collectionPosts?: Record<string, React$1.ComponentType<any>>;
61
- config: BoltdocsConfig;
62
- mdxModules: Record<string, any>;
63
- externalPages?: Record<string, React$1.ComponentType>;
64
- externalLayout?: React$1.ComponentType<{
65
- children: React$1.ReactNode;
66
- }>;
67
- components?: Record<string, React$1.ComponentType>;
68
- }
69
- declare function createRoutes(options: CreateRoutesOptions): RouteRecord[];
70
- //#endregion
71
- //#region src/client/ssg/mdx-page.d.ts
72
- type MdxPageProps = {
73
- MDXComponent: React.ComponentType<React.PropsWithChildren<unknown>>;
74
- mdxComponents: Record<string, React.ComponentType<HTMLElement>>;
75
- collectionPostComponent?: React.ComponentType<any>;
76
- };
77
- /**
78
- * Renders an MDX page by consuming pre-loaded route data.
79
- *
80
- * - If the route belongs to a collection (`data.collection` is set), wraps
81
- * the content with `CurrentPostProvider` so that `usePost()` (called without
82
- * a slug) can read the current post's data from context.
83
- * - Otherwise, renders the standard `DocPage` layout.
84
- */
85
- declare function MdxPage({
86
- MDXComponent,
87
- mdxComponents: propComponents,
88
- collectionPostComponent: CollectionPost
89
- }: MdxPageProps): _$react_jsx_runtime0.JSX.Element | null;
90
- //#endregion
91
- //#region src/client/ssg/boltdocs-shell.d.ts
92
- declare function BoltdocsShell({
93
- config,
94
- routes,
95
- components,
96
- collectionsData
97
- }: {
98
- config: BoltdocsConfig;
99
- routes: ComponentRoute[];
100
- components?: Record<string, React.ComponentType>;
101
- collectionsData?: CollectionsData;
102
- }): _$react_jsx_runtime0.JSX.Element;
103
- //#endregion
104
- //#region src/client/app/config-context.d.ts
105
- /**
106
- * Hook to access the Boltdocs configuration.
107
- */
108
- declare function useConfig(): BoltdocsConfig;
109
- //#endregion
110
- //#region src/client/app/theme-context.d.ts
111
- type Theme = 'light' | 'dark' | 'system';
112
- type ResolvedTheme = 'light' | 'dark';
113
- interface ThemeContextType {
114
- theme: Theme;
115
- resolvedTheme: ResolvedTheme;
116
- setTheme: (theme: Theme) => void;
117
- }
118
- declare function useTheme(): ThemeContextType;
119
- //#endregion
120
- //#region src/client/app/mdx-components-context.d.ts
121
- type MdxComponentsType = {
122
- [key: string]: ComponentType<any>;
123
- } & {
124
- Frontmatter?: Record<string, ComponentType<{
125
- value: unknown;
126
- }>>;
127
- };
128
- declare function useMdxComponents(): BoltdocsMdxComponents;
129
- //#endregion
130
- //#region src/client/app/ui-context.d.ts
131
- declare function useUI(): {
132
- isSidebarOpen: boolean;
133
- toggleSidebar: () => void;
134
- closeSidebar: () => void;
135
- };
136
- //#endregion
137
- //#region src/client/hooks/use-navbar.d.ts
138
- declare function useNavbar(): {
139
- links: NavbarLink[];
140
- title: string;
141
- logo: any;
142
- logoProps: {
143
- alt: any;
144
- width: any;
145
- height: any;
146
- };
147
- github: string | null;
148
- social: BoltdocsSocialLink[];
149
- config: BoltdocsConfig;
150
- theme: Theme;
151
- };
152
- //#endregion
153
- //#region src/client/hooks/use-sidebar.d.ts
154
- declare function useSidebar(routes: ComponentRoute[]): {
155
- groups: any[];
156
- ungrouped: ComponentRoute[];
157
- activeRoute: ComponentRoute | undefined;
158
- activePath: string;
159
- config: BoltdocsConfig;
160
- };
161
- //#endregion
162
- //#region src/client/hooks/use-search.d.ts
163
- declare function useSearch(routes: ComponentRoute[]): {
164
- isOpen: boolean;
165
- setIsOpen: _$react.Dispatch<_$react.SetStateAction<boolean>>;
166
- query: string;
167
- setQuery: _$react.Dispatch<_$react.SetStateAction<string>>;
168
- list: any[];
169
- handleSelect: (key: React.Key) => void;
170
- input: {
171
- value: string;
172
- onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
173
- };
174
- };
175
- //#endregion
176
- //#region src/client/hooks/use-tabs.d.ts
177
- declare function useTabs(tabs?: BoltdocsTab[], routes?: ComponentRoute[]): {
178
- tabs: BoltdocsTab[];
179
- activeIndex: number;
180
- indicatorStyle: _$react.CSSProperties;
181
- tabRefs: _$react.RefObject<(HTMLAnchorElement | null)[]>;
182
- activeTabId: string | undefined;
183
- };
184
- //#endregion
185
- //#region src/client/hooks/use-version.d.ts
186
- interface VersionOption {
187
- key: BoltdocsVersion;
188
- label: string;
189
- value: string;
190
- isCurrent: boolean;
191
- }
192
- interface UseVersionReturn {
193
- currentVersion: BoltdocsVersion | undefined;
194
- currentVersionLabel: string | undefined;
195
- availableVersions: VersionOption[];
196
- handleVersionChange: (version: BoltdocsVersion) => void;
197
- }
198
- /**
199
- * Hook to manage and switch between different versions of the documentation.
200
- */
201
- declare function useVersion(): UseVersionReturn;
202
- //#endregion
203
- //#region src/client/hooks/use-i18n.d.ts
204
- interface LocaleOption {
205
- key: BoltdocsLocale;
206
- label: string;
207
- value: string;
208
- isCurrent: boolean;
209
- }
210
- interface UseI18nReturn {
211
- currentLocale: BoltdocsLocale | undefined;
212
- currentLocaleLabel: string | undefined;
213
- availableLocales: LocaleOption[];
214
- handleLocaleChange: (locale: BoltdocsLocale) => void;
215
- }
216
- /**
217
- * Hook to manage and switch between different locales (languages) of the documentation.
218
- */
219
- declare function useI18n(): UseI18nReturn;
220
- //#endregion
221
- //#region src/client/hooks/use-page-nav.d.ts
222
- declare function usePageNav(): {
223
- prevPage: null;
224
- nextPage: null;
225
- currentRoute: null;
226
- } | {
227
- prevPage: ComponentRoute | null;
228
- nextPage: ComponentRoute | null;
229
- currentRoute: ComponentRoute;
230
- };
231
- //#endregion
232
- //#region src/client/hooks/use-breadcrumbs.d.ts
233
- /**
234
- * Hook to generate breadcrumbs based on the current active route.
235
- */
236
- declare function useBreadcrumbs(): {
237
- crumbs: {
238
- label: string;
239
- href?: string;
240
- }[];
241
- activeRoute: ComponentRoute | undefined;
242
- };
243
- //#endregion
244
- //#region src/client/hooks/use-routes.d.ts
245
- /**
246
- * Hook to access the framework's routing state.
247
- * Returns both the complete set of routes and a filtered list based on the current
248
- * version and locale.
249
- */
250
- declare function useRoutes(): {
251
- routes: ComponentRoute[];
252
- allRoutes: ComponentRoute[];
253
- currentRoute: ComponentRoute | undefined;
254
- isCollectionPage: boolean;
255
- currentLocale: BoltdocsLocale;
256
- currentVersion: BoltdocsVersion;
257
- };
258
- //#endregion
259
- //#region src/client/hooks/use-localized-to.d.ts
260
- /**
261
- * Hook to automatically localize a path based on the current version and locale context.
262
- * It ensures that navigation preserves the active version and language across the entire site.
263
- */
264
- declare function useLocalizedTo(to: BoltdocsRoutePathWithFallback): string;
265
- declare function useLocalizedTo(to: LinkProps['to']): LinkProps['to'];
266
- //#endregion
267
- //#region src/client/hooks/use-location.d.ts
268
- declare const useLocation: () => _$react_router_dom0.Location<any>;
269
- //#endregion
270
- //#region src/client/hooks/use-search-highlight.d.ts
271
- /**
272
- * Hook to highlight search terms based on the 'hl' query parameter.
273
- */
274
- declare function useSearchHighlight(containerSelector?: string): void;
275
- //#endregion
276
- //#region src/client/hooks/use-analytics.d.ts
277
- declare global {
278
- interface Window {
279
- gtag?: (...args: unknown[]) => void;
280
- dataLayer?: unknown[];
281
- gtag_report_conversion?: (url?: string) => boolean;
282
- posthog?: {
283
- capture: (event: string, properties?: Record<string, unknown>) => void;
284
- identify: (distinctId: string) => void;
285
- reset: () => void;
286
- opt_out_capturing: () => void;
287
- opt_in_capturing: () => void;
288
- };
289
- }
290
- }
291
- interface AnalyticsEvent {
292
- action: string;
293
- category?: string;
294
- label?: string;
295
- value?: number;
296
- params?: Record<string, unknown>;
297
- }
298
- interface AnalyticsInstance {
299
- trackPageView: (path: string, title?: string) => void;
300
- trackEvent: (event: AnalyticsEvent) => void;
301
- trackSearch: (query: string, resultsCount?: number) => void;
302
- trackDownload: (file: string, type?: string) => void;
303
- trackExternalLink: (url: string) => void;
304
- isEnabled: boolean;
305
- }
306
- interface UseAnalyticsOptions {
307
- config?: BoltdocsIntegrationsConfig;
308
- autoTrackPageViews?: boolean;
309
- autoTrackDownloads?: boolean;
310
- autoTrackExternalLinks?: boolean;
311
- excludePatterns?: RegExp[];
312
- }
313
- declare function useAnalytics(options?: UseAnalyticsOptions): AnalyticsInstance;
314
- declare function useTrackPageView(): (path: string, title?: string) => void;
315
- declare function useTrackEvent(): (event: AnalyticsEvent) => void;
316
- //#endregion
317
- //#region src/client/hooks/use-headings.d.ts
318
- /**
319
- * Returns the headings of the current page, extracted from the route loader data.
320
- * Useful for building custom Tables of Contents or jumping to sections.
321
- *
322
- * @returns An array of heading objects with level, text, and id.
323
- */
324
- declare function useHeadings(): {
325
- level: number;
326
- text: string;
327
- id: string;
328
- }[];
329
- //#endregion
330
- //#region src/client/hooks/use-merged-components.d.ts
331
- declare function useMergedComponents(propComponents?: Record<string, ComponentType<any>>): MdxComponentsType;
332
- //#endregion
333
- //#region src/client/hooks/use-feedback.d.ts
334
- interface FeedbackData {
335
- rating: 'good' | 'neutral' | 'bad';
336
- comment?: string;
337
- path: string;
338
- title: string;
339
- blockId?: string;
340
- }
341
- interface UseFeedbackOptions {
342
- endpoint?: string;
343
- onSubmit?: (data: FeedbackData) => void | Promise<void>;
344
- }
345
- /**
346
- * Hook for managing the feedback rating form state and submission.
347
- * Resets automatically when navigating to a new page.
348
- */
349
- declare function useFeedback(options?: UseFeedbackOptions): {
350
- rating: "good" | "neutral" | "bad" | null;
351
- setRating: _$react.Dispatch<_$react.SetStateAction<"good" | "neutral" | "bad" | null>>;
352
- comment: string;
353
- setComment: _$react.Dispatch<_$react.SetStateAction<string>>;
354
- loading: boolean;
355
- submitted: boolean;
356
- error: string | null;
357
- submit: (commentOverride?: string, blockId?: string) => Promise<void>;
358
- };
359
- //#endregion
360
- //#region src/client/components/docs-layout-default.d.ts
361
- interface DocsLayoutThemeProps {
362
- children?: ReactNode;
363
- }
364
- /**
365
- * Default docs layout — composes the visual primitives and delegates
366
- * sub-area routing to them. Slot rendering (plugin injections at
367
- * `navbar:end`, `sidebar:bottom`, `docs-content:top`, etc.) is handled
368
- * internally by each primitive so the layout itself does no slot "magic".
369
- *
370
- * A custom layout can reuse any primitive and the slot wiring just works.
371
- */
372
- declare function DocsLayoutComponent({
373
- children
374
- }: DocsLayoutThemeProps): _$react_jsx_runtime0.JSX.Element;
375
- //#endregion
376
- //#region src/client/collections/hooks.d.ts
377
- interface UsePostsOptions {
378
- includeDrafts?: boolean;
379
- }
380
- /**
381
- * Returns the posts of a collection, filtered by the current locale and version.
382
- * Defaults to "blog" if no collection is specified.
383
- * @param collection - The name of the collection. Defaults to "blog".
384
- * @param options - Options to customize the query.
385
- * @param options.includeDrafts - If true, includes draft posts in the results.
386
- * @returns The filtered posts of the collection.
387
- */
388
- declare function usePosts(collection?: string, options?: UsePostsOptions): CollectionPost$1[];
389
- /**
390
- * Returns a single post from a collection.
391
- *
392
- * @param collection - The name of the collection (optional inside post routes).
393
- * @param slug - The post slug (optional inside post routes).
394
- * @returns The matching post, or undefined if not found.
395
- */
396
- declare function usePost(): CollectionPost$1 | undefined;
397
- declare function usePost(collection: string, slug: string): CollectionPost$1 | undefined;
398
- /**
399
- * Returns the recent posts of a collection. Defaults to "blog".
400
- * @param collection - The name of the collection. Defaults to "blog".
401
- * @param count - The number of recent posts to return.
402
- * @returns The recent posts of the collection.
403
- */
404
- declare function useRecentPosts(collection?: string, count?: number): CollectionPost$1[];
405
- //#endregion
406
- //#region src/client/components/mdx/timeline.d.ts
407
- /**
408
- * Variants for both dots and badges.
409
- *
410
- * - Semantic: `primary`, `success`, `info`, `warning`, `danger` map directly
411
- * to the dot accent color and the badge pill background.
412
- * - Lifecycle (alias for semantic but convenient for changelogs):
413
- * `major` → primary, `minor` → success, `patch` → info,
414
- * `new` → primary, `deprecated` → warning, `breaking` → danger.
415
- */
416
- type TimelineVariant = 'primary' | 'success' | 'info' | 'warning' | 'danger' | 'major' | 'minor' | 'patch' | 'new' | 'deprecated' | 'breaking';
417
- interface TimelineBadgeConfig {
418
- text: ReactNode;
419
- variant?: TimelineVariant;
420
- }
421
- interface TimelineProps extends Omit<React.HTMLAttributes<HTMLOListElement>, 'children'> {
422
- children?: ReactNode;
423
- /** Reduce vertical padding between items. */
424
- compact?: boolean;
425
- }
426
- interface TimelineItemProps extends Omit<React.HTMLAttributes<HTMLLIElement>, 'title' | 'children'> {
427
- /** Date the entry happened. Accepts ISO string, epoch ms, or `Date` instance. */
428
- date?: string | number | Date;
429
- /** Headline shown beside the date. */
430
- title: ReactNode;
431
- /** Inline badge to the right of the title (e.g. "Major", "Breaking"). */
432
- badge?: string | TimelineBadgeConfig;
433
- /** Icon to render inside the dot. Falls back to a coloured filled circle. */
434
- icon?: ReactNode;
435
- /** Dot / badge accent colour. Defaults to `primary`. */
436
- variant?: TimelineVariant;
437
- /**
438
- * BCP-47 locale tag used by `toLocaleDateString` for the rendered
439
- * date. Defaults to `'en-US'` so server and client produce identical
440
- * markup on hydration. Pass `'es'`, `'fr'`, etc. to localize.
441
- */
442
- locale?: string;
443
- /** Body content for the entry. Accepts Markdown/markup from MDX. */
444
- children?: ReactNode;
445
- }
446
- declare function TimelineRoot({
447
- children,
448
- className,
449
- compact,
450
- ...props
451
- }: TimelineProps): _$react_jsx_runtime0.JSX.Element;
452
- declare function TimelineItem({
453
- date,
454
- title,
455
- badge,
456
- icon,
457
- variant,
458
- locale,
459
- className,
460
- children,
461
- ...props
462
- }: TimelineItemProps): _$react_jsx_runtime0.JSX.Element;
463
- declare const Timeline: typeof TimelineRoot & {
464
- Item: typeof TimelineItem;
465
- };
466
- //#endregion
467
- //#region src/client/utils/cn.d.ts
468
- declare function cn(...inputs: ClassValue[]): string;
469
- //#endregion
470
- //#region src/client/utils/i18n.d.ts
471
- /**
472
- * Retrieves the correct translation from a value that can be either
473
- * a simple string or a map of locale-specific strings.
474
- *
475
- * @param value - The text to translate
476
- * @param locale - The current active locale (e.g., 'en', 'es')
477
- * @returns The translated string
478
- */
479
- declare function getTranslated(value: string | Record<string, string> | undefined, locale?: string): string;
480
- //#endregion
481
- //#region src/client/utils/react-to-text.d.ts
482
- type ResolverMap = Map<string | JSXElementConstructor<object>, (props: object) => string>;
483
- declare const reactToText: (node: ReactNode, resolvers?: ResolverMap) => string;
484
- //#endregion
485
- //#region src/client/utils/copy-clipboard.d.ts
486
- /**
487
- * Copy text to clipboard.
488
- * @param text - The text to copy.
489
- * @returns True if the text was copied successfully.
490
- */
491
- declare const copyToClipboard: (text: string) => Promise<boolean>;
492
- //#endregion
493
- //#region src/client/utils/github.d.ts
494
- /**
495
- * Get the number of stars for a GitHub repository.
496
- * @param repo - owner/repo
497
- * @param token - The GitHub token.
498
- * @param baseUrl - The GitHub API base URL.
499
- * @returns The number of stars for the repository.
500
- * @example
501
- * getStarsRepo('owner/repo') // 100k
502
- */
503
- declare function getStarsRepo(repo: string, token?: string, baseUrl?: string): Promise<string>;
504
- //#endregion
505
- //#region src/client/components/mdx/code-block.d.ts
506
- interface CodeBlockProps {
507
- children?: React.ReactNode;
508
- className?: string;
509
- hideCopy?: boolean;
510
- title?: string;
511
- lang?: string;
512
- highlightedHtml?: string;
513
- 'data-lang'?: string;
514
- 'data-title'?: string;
515
- 'data-highlighted'?: string;
516
- 'data-highlighted-html'?: string;
517
- plain?: boolean;
518
- lineNumbers?: boolean | string;
519
- showLineNumbers?: boolean | string;
520
- wordWrap?: boolean | string;
521
- 'word-wrap'?: boolean | string;
522
- metastring?: string;
523
- }
524
- //#endregion
525
- //#region src/client/components/mdx/use-code-block.d.ts
526
- declare function useCodeBlock(props: CodeBlockProps): {
527
- copied: boolean;
528
- isExpanded: boolean;
529
- setIsExpanded: _$react.Dispatch<_$react.SetStateAction<boolean>>;
530
- isExpandable: boolean;
531
- preRef: _$react.RefObject<HTMLPreElement | HTMLDivElement | null>;
532
- handleCopy: () => Promise<void>;
533
- shouldTruncate: boolean;
534
- isHighlighted: boolean;
535
- effectiveHighlightedHtml: string | undefined;
536
- effectiveTitle: string | undefined;
537
- lang: string;
538
- showCodeBlockFeedback: boolean;
539
- rated: "up" | "down" | null;
540
- handleRate: (type: "up" | "down") => Promise<void>;
541
- };
542
- //#endregion
543
- export { Banner, BoltdocsConfig, type BoltdocsLocale, BoltdocsRoutePath, BoltdocsRoutePathWithFallback, BoltdocsShell, BoltdocsTab, type BoltdocsTypes, type BoltdocsVersion, Breadcrumbs, type CollectionListLoaderData, type CollectionPost$1 as CollectionPost, type CollectionPostLoaderData, CollectionsContext, type CollectionsData, type ComponentRoute, CopyMarkdown, CurrentPostProvider, DocsLayoutComponent as DocsLayout, ErrorBoundary, LayoutProps, MdxPage, Navbar, NavbarLink, NotFound, OnThisPage, OnThisPageProps, PageNav, SearchDialog, Sidebar, SidebarProps, SiteConfig, TabsProps, Timeline, type TimelineBadgeConfig, type TimelineItemProps, type TimelineProps, type TimelineVariant, ViteReactSSG, cn, copyToClipboard, createRoutes, getStarsRepo, getTranslated, reactToText, useAnalytics, useBreadcrumbs, useCodeBlock, useConfig, useFeedback, useHeadings, useI18n, useLocalizedTo, useLocation, useMdxComponents, useMergedComponents, useNavbar, usePageNav, usePost, usePosts, useRecentPosts, useRoutes, useSearch, useSearchHighlight, useSidebar, useTabs, useTheme, useTrackEvent, useTrackPageView, useUI, useVersion };
2
+ import { $ as LazyRouteResult, A as matchRouteBranch, B as useRouteData, C as stripSiteProtocol, D as normalizeBasename, E as hasBasename, F as useLoaderData, G as MatchesContext, H as LocationProvider, I as useLocation, J as PrefetchContext, K as NavigateContext, L as useMatches, M as resolveRouteBranch, N as Outlet, O as stripBasename, P as OutletContext, Q as CreateRoutesResult, R as useNavigate, S as splitUrlReference, T as addBasename, U as LocationProviderProps, V as LocationContext, W as LocationState, X as RouteDataContext, Y as PrefetchFunction, Z as defaultNavigate, _ as isConfiguredVersion, a as UrlRouteHint, at as RouterOptions, b as parseUrlReference, c as buildUrl, d as getConfiguredVersions, dt as BoltdocsRoutePath, et as LoaderFunction, f as getVersionPrefixSegments, ft as BoltdocsRoutePathWithFallback, g as isConfiguredLocale, h as hasUrlBase, ht as BoltdocsVersion, i as UrlContractConfig, it as RouteRendererProps, j as matchRouteBranchWithParams, k as RouteRenderer, l as classifyUrlPath, lt as BoltdocsLocale, m as hasUriScheme, mt as BoltdocsTypes, n as ParsedUrl, nt as RouteMatch, o as UrlRouteKind, p as getVersionSegments, q as NavigateFunction, r as ResolveUrlOptions, rt as RouteRecord, s as addUrlBase, st as BoltdocsConfig, t as BuildUrlOptions, tt as LoaderFunctionArgs, u as getConfiguredLocales, v as normalizeUrlBase, w as stripUrlBase, x as resolveUrlReference, y as normalizeUrlPath, z as usePrefetch } from "../index-CPUUKzxD.cjs";
3
+ import { A as cn, At as useUI, B as NotFound, Bt as CollectionsData, C as createArticleStructuredData, Ct as usePageNav, D as defineStructuredData, Dt as useSearch, E as createWebSiteStructuredData, Et as useTabs, F as TimelineVariant, Ft as BoltdocsShell, G as Breadcrumbs, Gt as ComponentRoute, H as CopyMarkdown, Ht as BoltdocsTab, I as usePost, It as MdxPage, Jt as OnThisPageProps, K as OnThisPage, Kt as LayoutProps, L as usePosts, Lt as createRoutes, M as TimelineBadgeConfig, Mt as useTheme, N as TimelineItemProps, Nt as useConfig, O as getTranslated, Ot as useSidebar, P as TimelineProps, Pt as ViteReactSSG, R as useRecentPosts, Rt as CollectionPost, S as WebSiteStructuredDataOptions, St as useBreadcrumbs, T as createStructuredData, Tt as useVersion, U as ErrorBoundary, Ut as CollectionListLoaderData, V as SearchDialog, Vt as CurrentPostProvider, W as PageNav, Wt as CollectionPostLoaderData, Xt as SiteConfig, Yt as SidebarProps, Zt as TabsProps, _ as StructuredData, _t as useTrackEvent, a as useExpandable, b as BreadcrumbStructuredDataItem, bt as useLocalizedTo, c as getStarsRepo, d as ViewTransitionHandle, dt as Navbar, f as ViewTransitionOptions, ft as DocsLayoutComponent, g as useViewTransition, gt as useAnalytics, h as startViewTransition, ht as useHeadings, i as UseExpandableOptions, j as Timeline, jt as useMdxComponents, k as resolvePublicAssetUrl, kt as useNavbar, l as copyToClipboard, m as ViewTransitionUpdate, mt as useMergedComponents, n as UseCodeBlockFeedbackOptions, o as useCopyButton, p as ViewTransitionRunner, pt as useFeedback, q as Sidebar, qt as NavbarLink, r as useCodeBlockFeedback, s as useCodeBlock, t as CodeBlockFeedbackPayload, u as reactToText, v as StructuredDataProps, vt as useTrackPageView, w as createBreadcrumbStructuredData, wt as useI18n, x as StructuredDataFactoryOptions, xt as useRoutes, y as ArticleStructuredDataOptions, yt as useSearchHighlight, z as Banner, zt as CollectionsContext } from "../index-C56bL-A-.cjs";
4
+ export { ArticleStructuredDataOptions, Banner, BoltdocsConfig, BoltdocsLocale, BoltdocsRoutePath, BoltdocsRoutePathWithFallback, BoltdocsShell, BoltdocsTab, BoltdocsTypes, BoltdocsVersion, BreadcrumbStructuredDataItem, Breadcrumbs, BuildUrlOptions, CodeBlockFeedbackPayload, CollectionListLoaderData, CollectionPost, CollectionPostLoaderData, CollectionsContext, CollectionsData, ComponentRoute, CopyMarkdown, CreateRoutesResult, CurrentPostProvider, DocsLayoutComponent as DocsLayout, ErrorBoundary, LayoutProps, LazyRouteResult, LoaderFunction, LoaderFunctionArgs, LocationContext, LocationProvider, LocationProviderProps, LocationState, MatchesContext, MdxPage, Navbar, NavbarLink, NavigateContext, NavigateFunction, NotFound, OnThisPage, OnThisPageProps, Outlet, OutletContext, PageNav, ParsedUrl, PrefetchContext, PrefetchFunction, ResolveUrlOptions, RouteDataContext, RouteMatch, RouteRecord, RouteRenderer, RouteRendererProps, RouterOptions, SearchDialog, Sidebar, SidebarProps, SiteConfig, StructuredData, StructuredDataFactoryOptions, StructuredDataProps, TabsProps, Timeline, TimelineBadgeConfig, TimelineItemProps, TimelineProps, TimelineVariant, UrlContractConfig, UrlRouteHint, UrlRouteKind, UseCodeBlockFeedbackOptions, UseExpandableOptions, ViewTransitionHandle, ViewTransitionOptions, ViewTransitionRunner, ViewTransitionUpdate, ViteReactSSG, WebSiteStructuredDataOptions, addBasename, addUrlBase, buildUrl, classifyUrlPath, cn, copyToClipboard, createArticleStructuredData, createBreadcrumbStructuredData, createRoutes, createStructuredData, createWebSiteStructuredData, defaultNavigate, defineStructuredData, getConfiguredLocales, getConfiguredVersions, getStarsRepo, getTranslated, getVersionPrefixSegments, getVersionSegments, hasBasename, hasUriScheme, hasUrlBase, isConfiguredLocale, isConfiguredVersion, matchRouteBranch, matchRouteBranchWithParams, normalizeBasename, normalizeUrlBase, normalizeUrlPath, parseUrlReference, reactToText, resolvePublicAssetUrl, resolveRouteBranch, resolveUrlReference, splitUrlReference, startViewTransition, stripBasename, stripSiteProtocol, stripUrlBase, useAnalytics, useBreadcrumbs, useCodeBlock, useCodeBlockFeedback, useConfig, useCopyButton, useExpandable, useFeedback, useHeadings, useI18n, useLoaderData, useLocalizedTo, useLocation, useMatches, useMdxComponents, useMergedComponents, useNavbar, useNavigate, usePageNav, usePost, usePosts, usePrefetch, useRecentPosts, useRouteData, useRoutes, useSearch, useSearchHighlight, useSidebar, useTabs, useTheme, useTrackEvent, useTrackPageView, useUI, useVersion, useViewTransition };