boltdocs 3.0.2 → 3.1.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 (113) hide show
  1. package/README.md +2 -18
  2. package/dist/{adapters-C5AWWGfb.cjs → adapters-uGz-UKQa.cjs} +1 -1
  3. package/dist/{banner-DNSkgUsO.d.cts → banner-DdSgCs4G.d.cts} +1 -1
  4. package/dist/{banner-CfdalYLL.d.ts → banner-DjujkctF.d.ts} +1 -1
  5. package/dist/cache-B0C2i0yP.mjs +6 -0
  6. package/dist/cache-CfRTUzWC.cjs +6 -0
  7. package/dist/chunk-hT5z_Zn9-DsJawvsz.mjs +6 -0
  8. package/dist/chunk-hT5z_Zn9-SKz6VFXu.cjs +6 -0
  9. package/dist/client/index.cjs +227 -113
  10. package/dist/client/index.d.cts +57 -12
  11. package/dist/client/index.d.ts +57 -12
  12. package/dist/client/index.js +227 -114
  13. package/dist/client/mdx.cjs +1 -1
  14. package/dist/client/mdx.js +1 -1
  15. package/dist/client/primitives.cjs +4 -4
  16. package/dist/client/primitives.d.cts +1 -1
  17. package/dist/client/primitives.d.ts +1 -1
  18. package/dist/client/primitives.js +4 -4
  19. package/dist/client/theme/neutral.css +1 -3
  20. package/dist/{config-JGkMJoJQ.cjs → config-BxsogK5A.cjs} +1 -1
  21. package/dist/config-DAgpZyh6.mjs +7 -0
  22. package/dist/config-DrRQYDCI.cjs +7 -0
  23. package/dist/{docs-layout-3TpAt6MB.cjs → docs-layout-D1buSdua.cjs} +1 -1
  24. package/dist/{docs-layout-6FQ8__ok.js → docs-layout-DyLDBwS6.js} +1 -1
  25. package/dist/{doctor-DQxLM202.cjs → doctor-BadGEhXv.cjs} +1 -1
  26. package/dist/{doctor-BR1B2Mkz.cjs → doctor-DPDcRKM1.cjs} +1 -1
  27. package/dist/{doctor-3MheVMwd.mjs → doctor-vDsUDgqp.mjs} +1 -1
  28. package/dist/escape-string-regexp-AG8q1e25-9Un9V90q.mjs +6 -0
  29. package/dist/escape-string-regexp-AG8q1e25-bJ9Ixe7c.cjs +6 -0
  30. package/dist/esm-shims-DSep1HcR.mjs +6 -0
  31. package/dist/{icons-dev-kJyGWNeg.js → icons-dev-CHZOwhQA.js} +8 -3
  32. package/dist/{icons-dev-BryEFkJu.cjs → icons-dev-YtDoLUsb.cjs} +8 -3
  33. package/dist/{image-C9md50h2.js → image-5WsgWYTh.js} +2 -2
  34. package/dist/{image-CR6UlaI5.cjs → image-Hb105Gu6.cjs} +2 -2
  35. package/dist/lib-BR0SoanK-CLswltLI.cjs +6 -0
  36. package/dist/lib-BR0SoanK-DcYeDrE6.mjs +6 -0
  37. package/dist/lib-DPoCz1YB-CLYXwKST.cjs +6 -0
  38. package/dist/lib-DPoCz1YB-CyGOqgSO.mjs +6 -0
  39. package/dist/{mdx-DhyMkc35.js → mdx-Bv-pS6-O.js} +6 -2
  40. package/dist/{mdx-DJBg5DuL.cjs → mdx-CDUcJmye.cjs} +6 -2
  41. package/dist/micromark-util-character-5KqJafVT-C6gnc770.cjs +6 -0
  42. package/dist/micromark-util-character-5KqJafVT-DkPKsbgn.mjs +6 -0
  43. package/dist/node/cache.cjs +6 -0
  44. package/dist/node/cache.d.cts +83 -0
  45. package/dist/node/cache.d.mts +83 -0
  46. package/dist/node/cache.mjs +6 -0
  47. package/dist/node/cli-entry.cjs +3 -3
  48. package/dist/node/cli-entry.mjs +3 -3
  49. package/dist/node/index.cjs +1 -1
  50. package/dist/node/index.d.cts +10 -467
  51. package/dist/node/index.d.mts +12 -468
  52. package/dist/node/index.mjs +1 -1
  53. package/dist/node/mdx/shiki-adapter.cjs +6 -0
  54. package/dist/node/mdx/shiki-adapter.d.cts +3 -0
  55. package/dist/node/mdx/shiki-adapter.d.mts +3 -0
  56. package/dist/node/mdx/shiki-adapter.mjs +6 -0
  57. package/dist/node-BDBv8CT6.mjs +104 -0
  58. package/dist/node-DFV_FV0y.mjs +6 -0
  59. package/dist/node-DqsP7kXz.cjs +6 -0
  60. package/dist/node-yFmAavND.cjs +104 -0
  61. package/dist/{package-_dCCKVvG.mjs → package-CoHWTf0N.mjs} +1 -1
  62. package/dist/{package-CEDhVAfO.cjs → package-_-Oa8-qN.cjs} +1 -1
  63. package/dist/{parser-D0QHIQsi.mjs → parser-BZJgAa9E.mjs} +1 -1
  64. package/dist/{parser-CNIPHx4s.cjs → parser-DlanzESE.cjs} +1 -1
  65. package/dist/plugin-BVuwx5D9.cjs +73 -0
  66. package/dist/plugin-BoxD91Yh.mjs +73 -0
  67. package/dist/rehype-slug--ZOxZ-_K-BNeYC4aT.cjs +6 -0
  68. package/dist/rehype-slug--ZOxZ-_K-CjIQEJCs.mjs +6 -0
  69. package/dist/remark-frontmatter-wFYRLcCt-CutW0gA3.mjs +8 -0
  70. package/dist/remark-frontmatter-wFYRLcCt-ENB5qG3y.cjs +8 -0
  71. package/dist/remark-gfm-B8TMkQbX-CjUJo8Rd.cjs +21 -0
  72. package/dist/remark-gfm-B8TMkQbX-Ctu0VV1_.mjs +21 -0
  73. package/dist/rollup-DMqoG11U-CKcJ37u_.mjs +59 -0
  74. package/dist/rollup-DMqoG11U-DKdxvZIj.cjs +59 -0
  75. package/dist/routes-BN2XbGcT.mjs +6 -0
  76. package/dist/routes-Cnq8xTCv.cjs +6 -0
  77. package/dist/{routes-BajCwrvX.cjs → routes-D_S9kjkS.cjs} +1 -1
  78. package/dist/{search-dialog-CW1f6dn6.cjs → search-dialog-BIuxGQsg.cjs} +1 -1
  79. package/dist/{search-dialog-Cx7aGW3U.cjs → search-dialog-BbtxA1uT.cjs} +2 -2
  80. package/dist/{search-dialog-D4rplZMv.cjs → search-dialog-BpNULmrl.cjs} +1 -1
  81. package/dist/{search-dialog-DDopgbKM.js → search-dialog-DC7oXU-5.js} +2 -2
  82. package/dist/{search-dialog-DaeSPvEo.js → search-dialog-PJrFRU5G.js} +1 -1
  83. package/dist/{search-dialog-BNdRV60O.js → search-dialog-gp9lrJXm.js} +1 -1
  84. package/dist/server/index.cjs +1 -1
  85. package/dist/server/index.d.mts +1 -1
  86. package/dist/shiki-adapter-CK3llqw2.mjs +6 -0
  87. package/dist/shiki-adapter-fS94vy-z.d.mts +534 -0
  88. package/dist/shiki-adapter-l2kEP5rn.d.cts +534 -0
  89. package/dist/{sidebar-BAKgJ-Er.d.ts → sidebar-DH2iPKXM.d.cts} +187 -10
  90. package/dist/{sidebar-7gIifpBX.d.cts → sidebar-DknLUI1R.d.ts} +187 -10
  91. package/package.json +16 -5
  92. package/src/shared/types.ts +177 -10
  93. package/dist/cache-DETwlACe.cjs +0 -6
  94. package/dist/cache-SF59enb3.mjs +0 -6
  95. package/dist/config-B5uVv5q4.cjs +0 -7
  96. package/dist/config-D3_zDkHh.mjs +0 -7
  97. package/dist/node-B9JSyEIU.mjs +0 -105
  98. package/dist/node-Cedquois.cjs +0 -105
  99. package/dist/plugin-WYNORxp1.cjs +0 -68
  100. package/dist/plugin-YWNVRpws.mjs +0 -68
  101. package/dist/routes-CyrnmVuG.mjs +0 -6
  102. package/dist/routes-D6Tuu7Fs.cjs +0 -6
  103. package/dist/shiki-adapter-CXEGRnjr.mjs +0 -6
  104. package/dist/shiki-adapter-Mr8_oT_9.cjs +0 -6
  105. /package/dist/{csp-CBysWlAf.cjs → csp-BX06rvdg.cjs} +0 -0
  106. /package/dist/{csp-gaZ51xzq.mjs → csp-z2D0FuRW.mjs} +0 -0
  107. /package/dist/{generator-DtUU3Cfk.cjs → generator-BN75lJOv.cjs} +0 -0
  108. /package/dist/{handler-Dzf4dSnV.cjs → handler-1LRMYeI4.cjs} +0 -0
  109. /package/dist/{headers-CXyf0auY.mjs → headers-CL0pMcwm.mjs} +0 -0
  110. /package/dist/{headers-BXKxiPUv.cjs → headers-YpD10rDb.cjs} +0 -0
  111. /package/dist/{index-CdJv4ocW.d.mts → index-DJYJzs-Z.d.mts} +0 -0
  112. /package/dist/{meta-loader-C4Hu9RN9.mjs → meta-loader-Bq-MjTXB.mjs} +0 -0
  113. /package/dist/{meta-loader-C9MKjAs0.cjs → meta-loader-CTB62-Mo.cjs} +0 -0
@@ -1,316 +1,11 @@
1
1
 
2
- import { i as handleVercelFeedback, n as handleWebFeedback, r as handleNetlifyFeedback, t as handleAwsFeedback } from "../index-CdJv4ocW.mjs";
2
+ import { flushCache } from "./cache.mjs";
3
+ import { i as handleVercelFeedback, n as handleWebFeedback, r as handleNetlifyFeedback, t as handleAwsFeedback } from "../index-DJYJzs-Z.mjs";
4
+ import { a as resolveConfig, c as BoltdocsPlugin, d as PluginLifecycleHooks, f as PluginLogger, h as RouteMeta, i as parseMetaString, l as BoltdocsThemeConfig, m as PluginStore, o as defineConfig, p as PluginMeta, s as BoltdocsConfig, u as PluginContext } from "../shiki-adapter-fS94vy-z.mjs";
3
5
  import { z } from "zod";
4
6
  import { EXIT, SKIP } from "unist-util-visit";
5
7
  import { InlineConfig, Plugin } from "vite";
6
- //#region src/shared/types.d.ts
7
- /**
8
- * Represents a single social link in the configuration.
9
- */
10
- interface BoltdocsSocialLink {
11
- icon: 'discord' | 'x' | 'github' | 'bluesky' | string;
12
- link: string;
13
- }
14
- /**
15
- * Configuration for the site footer.
16
- */
17
- interface BoltdocsFooterConfig {
18
- text?: string;
19
- }
20
- /**
21
- * Theme-specific configuration options.
22
- */
23
- interface BoltdocsThemeConfig {
24
- title?: string | Record<string, string>;
25
- description?: string | Record<string, string>;
26
- logo?: string | {
27
- dark: string;
28
- light: string;
29
- alt?: string;
30
- width?: number;
31
- height?: number;
32
- };
33
- navbar?: Array<{
34
- label: string | Record<string, string>;
35
- href: BoltdocsRoutePathWithFallback;
36
- items?: Array<{
37
- label: string | Record<string, string>;
38
- href: BoltdocsRoutePathWithFallback;
39
- }>;
40
- }>;
41
- sidebar?: Record<string, Array<{
42
- text: string;
43
- link: BoltdocsRoutePathWithFallback;
44
- }>>;
45
- sidebarGroups?: Record<string, {
46
- title?: string | Record<string, string>;
47
- icon?: string;
48
- }>;
49
- socialLinks?: BoltdocsSocialLink[];
50
- footer?: BoltdocsFooterConfig;
51
- editLink?: string;
52
- communityHelp?: string;
53
- version?: string;
54
- githubRepo?: string;
55
- favicon?: string;
56
- tabs?: Array<{
57
- id: string;
58
- text: string | Record<string, string>;
59
- icon?: string;
60
- }>;
61
- codeTheme?: ShikiTheme | {
62
- light: ShikiTheme;
63
- dark: ShikiTheme;
64
- };
65
- }
66
- /**
67
- * List of supported syntax highlighting themes.
68
- */
69
- type ShikiTheme = 'github-dark' | 'github-light' | 'tokyo-night' | 'dracula' | 'nord' | 'one-dark-pro' | 'one-light';
70
- /**
71
- * Configuration for the robots.txt file.
72
- */
73
- type BoltdocsRobotsConfig = string | {
74
- rules?: Array<{
75
- userAgent: string;
76
- allow?: string | string[];
77
- disallow?: string | string[];
78
- }>;
79
- sitemaps?: string[];
80
- };
81
- /**
82
- * Configuration for a specific locale.
83
- */
84
- interface BoltdocsLocaleConfig {
85
- label?: string;
86
- direction?: 'ltr' | 'rtl';
87
- htmlLang?: string;
88
- calendar?: string;
89
- }
90
- /**
91
- * Configuration for internationalization (i18n).
92
- */
93
- interface BoltdocsI18nConfig {
94
- defaultLocale: string;
95
- locales: string[] | Record<string, string>;
96
- localeConfigs?: Record<string, BoltdocsLocaleConfig>;
97
- }
98
- /**
99
- * Configuration for a specific documentation version.
100
- */
101
- interface BoltdocsVersionConfig {
102
- label: string;
103
- path: string;
104
- }
105
- /**
106
- * Configuration for documentation versioning.
107
- */
108
- interface BoltdocsVersionsConfig {
109
- defaultVersion: string;
110
- prefix?: string;
111
- versions: BoltdocsVersionConfig[];
112
- }
113
- /**
114
- * Shared badge value type used in frontmatter, RouteMeta, and ComponentRoute.
115
- */
116
- type BadgeValue = string | {
117
- text: string;
118
- expires?: string;
119
- };
120
- /**
121
- * Defines a Boltdocs plugin.
122
- *
123
- * Use the `createPlugin()` helper from the node API for full type safety and
124
- * access to lifecycle hooks.
125
- */
126
- interface BoltdocsPlugin {
127
- name: string;
128
- enforce?: 'pre' | 'post';
129
- version?: string;
130
- boltdocsVersion?: string;
131
- remarkPlugins?: unknown[];
132
- rehypePlugins?: unknown[];
133
- vitePlugins?: Plugin[];
134
- components?: Record<string, string>;
135
- /** Lifecycle hooks — use the `PluginLifecycleHooks` type from the node API. */
136
- hooks?: Record<string, (ctx: unknown) => Promise<void> | void>;
137
- }
138
- /**
139
- * Configuration for the collections (blog) feature.
140
- */
141
- interface BoltdocsCollectionsConfig {
142
- /** Number of posts per page in collection listing pages. Defaults to 10. */
143
- postsPerPage?: number;
144
- /** The name of the default collection used by BlogList when none is specified. */
145
- defaultCollection?: string;
146
- /** Date format string for rendering post dates (e.g., 'MMMM dd, yyyy'). */
147
- dateFormat?: string;
148
- /** Field to sort posts by. Defaults to 'date'. */
149
- sortBy?: 'date' | 'title' | 'sidebarPosition';
150
- }
151
- interface BoltdocsSecurityConfig {
152
- headers?: Record<string, string>;
153
- enableCSP?: boolean;
154
- customHeaders?: Record<string, string>;
155
- }
156
- interface BoltdocsVerificationConfig {
157
- google?: string;
158
- bing?: string;
159
- yandex?: string;
160
- pinterest?: string;
161
- facebook?: string;
162
- }
163
- /**
164
- * Configuration for SEO.
165
- */
166
- interface BoltdocsSeoConfig {
167
- metatags?: Record<string, string>;
168
- indexing?: 'all' | 'public';
169
- thumbnails?: {
170
- background?: string;
171
- };
172
- verification?: BoltdocsVerificationConfig;
173
- }
174
- /**
175
- * Configuration for Google Analytics 4 (GA4).
176
- */
177
- interface BoltdocsGA4Config {
178
- measurementId: string;
179
- debug?: boolean;
180
- anonymizeIp?: boolean;
181
- sendPageView?: boolean;
182
- cookieFlags?: string;
183
- autoTrack?: {
184
- pageViews?: boolean;
185
- downloads?: boolean;
186
- externalLinks?: boolean;
187
- search?: boolean;
188
- };
189
- }
190
- /**
191
- * Configuration for Google Tag Manager (GTM).
192
- */
193
- interface BoltdocsGTMConfig {
194
- tagId: string;
195
- dataLayerName?: string;
196
- preview?: string;
197
- }
198
- /**
199
- * Configuration for Algolia DocSearch.
200
- */
201
- interface BoltdocsAlgoliaConfig {
202
- appId: string;
203
- apiKey: string;
204
- indexName: string;
205
- }
206
- /**
207
- * Configuration for Giscus comments.
208
- */
209
- interface BoltdocsGiscusConfig {
210
- repo: string;
211
- repoId: string;
212
- category?: string;
213
- categoryId?: string;
214
- mapping?: 'pathname' | 'url' | 'title' | 'og:title' | 'specific' | 'number';
215
- strict?: '0' | '1' | boolean;
216
- reactionsEnabled?: '0' | '1' | boolean;
217
- emitMetadata?: '0' | '1' | boolean;
218
- inputPosition?: 'top' | 'bottom';
219
- theme?: string;
220
- darkTheme?: string;
221
- lang?: string;
222
- loading?: 'lazy' | 'eager';
223
- }
224
- /**
225
- * Configuration for custom feedback system using GitHub Discussions API.
226
- */
227
- interface BoltdocsCustomFeedbackConfig {
228
- enabled: boolean;
229
- owner: string;
230
- repo: string;
231
- categorySlug?: string;
232
- endpoint?: string;
233
- }
234
- interface BoltdocsVercelConfig {
235
- analytics?: boolean;
236
- speedInsights?: boolean;
237
- }
238
- interface BoltdocsIntegrationsConfig {
239
- analytics?: {
240
- ga4?: BoltdocsGA4Config;
241
- vercel?: BoltdocsVercelConfig;
242
- gtm?: BoltdocsGTMConfig;
243
- };
244
- search?: {
245
- algolia?: BoltdocsAlgoliaConfig;
246
- };
247
- feedback?: {
248
- giscus?: BoltdocsGiscusConfig;
249
- custom?: BoltdocsCustomFeedbackConfig;
250
- };
251
- }
252
- /**
253
- * The root configuration object for Boltdocs.
254
- */
255
- interface BoltdocsConfig {
256
- siteUrl?: string;
257
- docsDir?: string;
258
- base?: string;
259
- theme?: BoltdocsThemeConfig;
260
- i18n?: BoltdocsI18nConfig;
261
- versions?: BoltdocsVersionsConfig;
262
- plugins?: BoltdocsPlugin[];
263
- collections?: BoltdocsCollectionsConfig;
264
- robots?: BoltdocsRobotsConfig;
265
- security?: BoltdocsSecurityConfig;
266
- seo?: BoltdocsSeoConfig;
267
- integrations?: BoltdocsIntegrationsConfig;
268
- directoryMeta?: Record<string, unknown>;
269
- vite?: unknown;
270
- }
271
- /**
272
- * Global namespace for Boltdocs types that can be augmented by generated code.
273
- * This allows for strictly typed locales and versions based on the project configuration.
274
- */
275
- declare global {
276
- namespace Boltdocs {
277
- interface Types {}
278
- /**
279
- * Marker interface augmented by generated code to provide strict route path typing.
280
- * When no types have been generated (e.g., before first dev server start),
281
- * keyof is never, and BoltdocsRoutePath falls back to string.
282
- */
283
- interface RoutePaths {}
284
- }
285
- }
286
- type BoltdocsRoutePath = keyof Boltdocs.RoutePaths;
287
- type BoltdocsRoutePathWithFallback = BoltdocsRoutePath extends never ? string : BoltdocsRoutePath;
288
- //#endregion
289
- //#region src/shared/config-utils.d.ts
290
- /**
291
- * Type-safe helper for defining Boltdocs configuration.
292
- * This is an identity function that provides IntelliSense in both
293
- * Node.js (config files) and client-side code (MDX examples).
294
- *
295
- * @remarks
296
- * Intended for use in `boltdocs.config.ts` (Node.js context). This function
297
- * is **not** available as a client-side import from `boltdocs/client`.
298
- *
299
- * @param config - The Boltdocs configuration object
300
- */
301
- declare function defineConfig(config: BoltdocsConfig): BoltdocsConfig;
302
- //#endregion
303
- //#region src/node/config.d.ts
304
- /**
305
- * Loads user's configuration file (e.g., `boltdocs.config.js` or `boltdocs.config.ts`) if it exists,
306
- * merges it with the default configuration, and returns the final `BoltdocsConfig`.
307
- *
308
- * @param docsDir - The directory containing the documentation files
309
- * @param root - The project root directory (defaults to process.cwd())
310
- * @returns The merged configuration object
311
- */
312
- declare function resolveConfig(docsDir: string, root?: string): Promise<BoltdocsConfig>;
313
- //#endregion
8
+
314
9
  //#region src/node/plugin/types.d.ts
315
10
  /**
316
11
  * Configuration options specifically for the Boltdocs Vite plugin.
@@ -318,6 +13,8 @@ declare function resolveConfig(docsDir: string, root?: string): Promise<Boltdocs
318
13
  interface BoltdocsPluginOptions {
319
14
  /** The root directory containing markdown files (default: 'docs') */
320
15
  docsDir?: string;
16
+ /** Enable turbo mode (Sätteri MDX compiler) */
17
+ turbo?: boolean;
321
18
  }
322
19
  //#endregion
323
20
  //#region src/node/plugin/entry.d.ts
@@ -331,88 +28,6 @@ interface BoltdocsPluginOptions {
331
28
  */
332
29
  declare function generateEntryCode(options: BoltdocsPluginOptions, config?: BoltdocsConfig): string;
333
30
  //#endregion
334
- //#region src/node/routes/types.d.ts
335
- /**
336
- * Metadata representing a single documentation route.
337
- * This information is used to build the client-side router and the sidebar navigation.
338
- */
339
- interface RouteMeta {
340
- /** The final URL path for the route (e.g., '/docs/guide/start') */
341
- path: string;
342
- /** The absolute filesystem path to the source markdown/mdx file */
343
- componentPath: string;
344
- /** The title of the page, usually extracted from frontmatter or the filename */
345
- title: string;
346
- /** The relative path from the docs directory, used for edit links */
347
- filePath: string;
348
- /** Optional description of the page (for SEO/meta tags) */
349
- description?: string;
350
- /** Optional explicit position for ordering in the sidebar */
351
- sidebarPosition?: number;
352
- /** The group (directory) this route belongs to */
353
- group?: string;
354
- /** The display title for the route's group */
355
- groupTitle?: string;
356
- /** Optional explicit position for ordering the group itself */
357
- groupPosition?: number;
358
- /** Optional icon for the route's group */
359
- groupIcon?: string;
360
- /** The sub-route group this route belongs to (from folders starting with _) */
361
- subRouteGroup?: string;
362
- /** Extracted markdown headings for search indexing */
363
- headings?: {
364
- level: number;
365
- text: string;
366
- id: string;
367
- }[];
368
- /** The locale this route belongs to, if i18n is configured */
369
- locale?: string;
370
- /** The version this route belongs to, if versioning is configured */
371
- version?: string;
372
- /** Optional badge to display next to the sidebar item (e.g., 'New', 'Experimental') */
373
- badge?: BadgeValue;
374
- /** Optional icon to display (Lucide icon name or raw SVG) */
375
- icon?: string;
376
- /** The tab this route belongs to, if tabs are configured */
377
- tab?: string;
378
- /** The collection this route belongs to (from [name] directories like [blog]) */
379
- collection?: string;
380
- /** Tags for blog posts or other taxonomy */
381
- tags?: string[];
382
- /** Author identifier for blog posts */
383
- author?: string;
384
- /** Draft flag — excluded from production builds */
385
- draft?: boolean;
386
- /** Short excerpt/summary for list displays */
387
- excerpt?: string;
388
- /** Cover image for blog posts */
389
- coverImage?: string;
390
- /** The extracted plain-text content of the page for search indexing */
391
- _content?: string;
392
- /** The raw markdown content of the page */
393
- _rawContent?: string;
394
- /** Extracted SEO and Open Graph metadata from frontmatter */
395
- seo?: Record<string, any>;
396
- /** The publication date */
397
- date?: string | Date;
398
- /** The last updated timestamp or date */
399
- lastUpdated?: string | number | Date;
400
- /** Optional category for the page */
401
- category?: string;
402
- /** Optional explicit order (alternative to sidebarPosition) */
403
- order?: number;
404
- /** Optional explicit label for the sidebar */
405
- sidebarLabel?: string;
406
- /** Whether the page is hidden from the sidebar */
407
- sidebarHidden?: boolean;
408
- /** Raw extensible frontmatter data for custom components and formatters */
409
- frontmatter?: Record<string, any>;
410
- /** Optional recursive child routes for deep sidebar hierarchies */
411
- subRoutes?: RouteMeta[];
412
- /** Clean URL segments stripped of locale/version prefixes */
413
- slugParts?: string[];
414
- }
415
- //#endregion
416
31
  //#region src/node/routes/index.d.ts
417
32
  /**
418
33
  * Invalidates the global route metadata and clears local state.
@@ -429,64 +44,9 @@ declare function invalidateRouteCache(): void;
429
44
  * @param basePath - The base URL path for the routes (default: '/docs')
430
45
  * @returns A promise resolving to an array of RouteMeta objects
431
46
  */
432
- declare function generateRoutes(docsDir: string, config?: BoltdocsConfig, basePath?: string, forceScan?: boolean): Promise<RouteMeta[]>;
47
+ declare function generateRoutes(docsDir: string, config?: BoltdocsConfig, basePath?: string, forceScan?: boolean, turbo?: boolean): Promise<RouteMeta[]>;
433
48
  //#endregion
434
49
  //#region src/node/plugins/plugin-types.d.ts
435
- interface PluginContext {
436
- readonly config: BoltdocsConfig;
437
- readonly logger: PluginLogger;
438
- readonly store: PluginStore;
439
- readonly meta: PluginMeta;
440
- readonly docsDir: string;
441
- readonly rootDir: string;
442
- }
443
- interface PluginLogger {
444
- info(message: string): void;
445
- warn(message: string): void;
446
- error(message: string | Error): void;
447
- debug(message: string): void;
448
- }
449
- interface PluginStore {
450
- get<T = unknown>(pluginName: string, key: string): T | undefined;
451
- set(pluginName: string, key: string, value: unknown): void;
452
- has(pluginName: string, key: string): boolean;
453
- }
454
- interface PluginMeta {
455
- name: string;
456
- version?: string;
457
- boltdocsVersion?: string;
458
- }
459
- interface PluginLifecycleHooks {
460
- beforeBuild?: (ctx: PluginContext) => Promise<void> | void;
461
- afterBuild?: (ctx: PluginContext) => Promise<void> | void;
462
- beforeDev?: (ctx: PluginContext) => Promise<void> | void;
463
- afterDev?: (ctx: PluginContext) => Promise<void> | void;
464
- buildEnd?: (ctx: PluginContext) => Promise<void> | void;
465
- transformSource?: (ctx: PluginContext, params: {
466
- code: string;
467
- filePath: string;
468
- }) => Promise<{
469
- code: string;
470
- }> | {
471
- code: string;
472
- };
473
- transformMdx?: (ctx: PluginContext, params: {
474
- code: string;
475
- filePath: string;
476
- }) => Promise<{
477
- code: string;
478
- }> | {
479
- code: string;
480
- };
481
- transformHtml?: (ctx: PluginContext, params: {
482
- html: string;
483
- path: string;
484
- }) => Promise<{
485
- html: string;
486
- }> | {
487
- html: string;
488
- };
489
- }
490
50
  interface SecureBoltdocsPlugin {
491
51
  name: string;
492
52
  enforce?: 'pre' | 'post';
@@ -551,7 +111,9 @@ declare class PluginLifecycleManager {
551
111
  private store;
552
112
  private docsDir;
553
113
  private rootDir;
554
- constructor(plugins: SecureBoltdocsPlugin[], config: BoltdocsConfig, docsDir?: string, rootDir?: string);
114
+ private routes;
115
+ private outDir;
116
+ constructor(plugins: SecureBoltdocsPlugin[], config: BoltdocsConfig, docsDir?: string, rootDir?: string, routes?: RouteMeta[], outDir?: string);
555
117
  runHook(hookName: keyof PluginLifecycleHooks, ...args: unknown[]): Promise<void>;
556
118
  runChain<TParams>(hookName: keyof PluginLifecycleHooks, initialParams: TParams): Promise<TParams>;
557
119
  private getSortedPlugins;
@@ -682,18 +244,6 @@ interface ElementNode {
682
244
  children?: any[];
683
245
  }
684
246
  //#endregion
685
- //#region src/node/mdx/shiki-adapter.d.ts
686
- interface ParsedMeta {
687
- title?: string;
688
- lineNumbers?: boolean;
689
- wordWrap?: boolean;
690
- [key: string]: any;
691
- }
692
- /**
693
- * Parses a meta string into a structured ParsedMeta object.
694
- */
695
- declare function parseMetaString(metaStr: string): ParsedMeta;
696
- //#endregion
697
247
  //#region src/node/plugins/plugin-utils.d.ts
698
248
  interface NodeWithHProperties extends Node {
699
249
  data?: {
@@ -775,18 +325,12 @@ declare function normalizePath(p: string): string;
775
325
  */
776
326
  declare function sanitizeFilename(name: string): string;
777
327
  //#endregion
778
- //#region src/node/cache.d.ts
779
- /**
780
- * Flushes all pending background cache operations.
781
- */
782
- declare function flushCache(): Promise<void>;
783
- //#endregion
784
328
  //#region src/node/index.d.ts
785
329
  declare function boltdocs(options?: BoltdocsPluginOptions): Promise<Plugin[]>;
786
330
  /**
787
331
  * Generates the complete Vite configuration for a Boltdocs project.
788
332
  * This is used by the Boltdocs CLI to run Vite without a user-defined vite.config.ts.
789
333
  */
790
- declare function createViteConfig(root: string, mode?: 'development' | 'production', preResolvedConfig?: BoltdocsConfig): Promise<InlineConfig>;
334
+ declare function createViteConfig(root: string, mode?: 'development' | 'production', preResolvedConfig?: BoltdocsConfig, turbo?: boolean): Promise<InlineConfig>;
791
335
  //#endregion
792
- export { type BoltdocsConfig, type BoltdocsPlugin, type BoltdocsPluginOptions, BoltdocsPluginStore, type BoltdocsThemeConfig, EXIT, MDX_NODES, NodeWithHProperties, PluginCompatibilityError, PluginContext, PluginError, PluginHookError, PluginLifecycleHooks, PluginLifecycleManager, PluginLogger, PluginMeta, PluginStore, PluginValidationError, type RouteMeta, SKIP, SecureBoltdocsPlugin, addNodeClass, createMdxAttribute, createMdxElement, createPlugin, createRehypeElement, createViteConfig, boltdocs as default, defineConfig, flushCache, generateEntryCode, generateRoutes, getNodeProperty, handleAwsFeedback, handleFeedback, handleNetlifyFeedback, handleVercelFeedback, handleWebFeedback, hasNodeClass, invalidateRouteCache, normalizePath, parseMetaString, removeNodeClass, resolveConfig, sanitizeFilename, setNodeProperty, validatePlugins, visitMdxElements, visitNodes, visitRehypeElements, visitRemarkHeadings, visitRemarkLinks };
336
+ export { type BoltdocsConfig, type BoltdocsPlugin, type BoltdocsPluginOptions, BoltdocsPluginStore, type BoltdocsThemeConfig, EXIT, MDX_NODES, NodeWithHProperties, PluginCompatibilityError, type PluginContext, PluginError, PluginHookError, type PluginLifecycleHooks, PluginLifecycleManager, type PluginLogger, type PluginMeta, type PluginStore, PluginValidationError, type RouteMeta, SKIP, SecureBoltdocsPlugin, addNodeClass, createMdxAttribute, createMdxElement, createPlugin, createRehypeElement, createViteConfig, boltdocs as default, defineConfig, flushCache, generateEntryCode, generateRoutes, getNodeProperty, handleAwsFeedback, handleFeedback, handleNetlifyFeedback, handleVercelFeedback, handleWebFeedback, hasNodeClass, invalidateRouteCache, normalizePath, parseMetaString, removeNodeClass, resolveConfig, sanitizeFilename, setNodeProperty, validatePlugins, visitMdxElements, visitNodes, visitRehypeElements, visitRemarkHeadings, visitRemarkLinks };
@@ -3,4 +3,4 @@
3
3
  * Copyright (c) 2026 Jesus Alcala
4
4
  * Licensed under the MIT License.
5
5
  */
6
- import{f as e,u as t}from"../utils-B3xYMrpK.mjs";import{C as n,D as r,E as i,O as a,T as o,_ as s,a as c,c as l,d as u,f as d,g as f,h as p,i as m,k as h,l as g,m as _,n as v,o as y,p as b,r as x,s as S,t as C,u as w,v as T,w as E,y as D}from"../node-B9JSyEIU.mjs";import{i as O}from"../cache-SF59enb3.mjs";import{r as k,t as A}from"../routes-CyrnmVuG.mjs";import{a as j,r as M}from"../config-D3_zDkHh.mjs";import{n as N,o as P}from"../shiki-adapter-CXEGRnjr.mjs";import{t as F}from"../handler-Btd4t_67.mjs";import{i as I,n as L,r as R,t as z}from"../adapters-DEXNIv3x.mjs";export{E as BoltdocsPluginStore,m as EXIT,P as MDX_NODES,o as PluginCompatibilityError,i as PluginError,r as PluginHookError,D as PluginLifecycleManager,a as PluginValidationError,c as SKIP,y as addNodeClass,S as createMdxAttribute,l as createMdxElement,x as createPlugin,g as createRehypeElement,v as createViteConfig,C as default,j as defineConfig,O as flushCache,h as generateEntryCode,A as generateRoutes,w as getNodeProperty,z as handleAwsFeedback,F as handleFeedback,R as handleNetlifyFeedback,I as handleVercelFeedback,L as handleWebFeedback,u as hasNodeClass,k as invalidateRouteCache,t as normalizePath,N as parseMetaString,d as removeNodeClass,M as resolveConfig,e as sanitizeFilename,b as setNodeProperty,n as validatePlugins,_ as visitMdxElements,p as visitNodes,f as visitRehypeElements,s as visitRemarkHeadings,T as visitRemarkLinks};
6
+ import{f as e,u as t}from"../utils-B3xYMrpK.mjs";import{C as n,D as r,E as i,O as a,T as o,_ as s,a as c,c as l,d as u,f as d,g as f,h as p,i as m,k as h,l as g,m as _,n as v,o as y,p as b,r as x,s as S,t as C,u as w,v as T,w as E,y as D}from"../node-BDBv8CT6.mjs";import{flushCache as O}from"./cache.mjs";import{r as k,t as A}from"../routes-BN2XbGcT.mjs";import{a as j,r as M}from"../config-DAgpZyh6.mjs";import{o as N,r as P}from"../shiki-adapter-CK3llqw2.mjs";import{t as F}from"../handler-Btd4t_67.mjs";import{i as I,n as L,r as R,t as z}from"../adapters-DEXNIv3x.mjs";export{E as BoltdocsPluginStore,m as EXIT,N as MDX_NODES,o as PluginCompatibilityError,i as PluginError,r as PluginHookError,D as PluginLifecycleManager,a as PluginValidationError,c as SKIP,y as addNodeClass,S as createMdxAttribute,l as createMdxElement,x as createPlugin,g as createRehypeElement,v as createViteConfig,C as default,j as defineConfig,O as flushCache,h as generateEntryCode,A as generateRoutes,w as getNodeProperty,z as handleAwsFeedback,F as handleFeedback,R as handleNetlifyFeedback,I as handleVercelFeedback,L as handleWebFeedback,u as hasNodeClass,k as invalidateRouteCache,t as normalizePath,P as parseMetaString,d as removeNodeClass,M as resolveConfig,e as sanitizeFilename,b as setNodeProperty,n as validatePlugins,_ as visitMdxElements,p as visitNodes,f as visitRehypeElements,s as visitRemarkHeadings,T as visitRemarkLinks};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Boltdocs - https://boltdocs.vercel.app
3
+ * Copyright (c) 2026 Jesus Alcala
4
+ * Licensed under the MIT License.
5
+ */
6
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../shiki-adapter-CGTmrR6S.cjs`);exports.ShikiAdapter=e.t,exports.getShikiAdapter=e.n,exports.parseMetaString=e.r;
@@ -0,0 +1,3 @@
1
+
2
+ import { i as parseMetaString, n as ShikiAdapter, r as getShikiAdapter, t as ParsedMeta } from "../../shiki-adapter-l2kEP5rn.cjs";
3
+ export { ParsedMeta, ShikiAdapter, getShikiAdapter, parseMetaString };
@@ -0,0 +1,3 @@
1
+
2
+ import { i as parseMetaString, n as ShikiAdapter, r as getShikiAdapter, t as ParsedMeta } from "../../shiki-adapter-fS94vy-z.mjs";
3
+ export { ParsedMeta, ShikiAdapter, getShikiAdapter, parseMetaString };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Boltdocs - https://boltdocs.vercel.app
3
+ * Copyright (c) 2026 Jesus Alcala
4
+ * Licensed under the MIT License.
5
+ */
6
+ import{n as e,r as t,t as n}from"../../shiki-adapter-CK3llqw2.mjs";export{n as ShikiAdapter,e as getShikiAdapter,t as parseMetaString};