boltdocs 3.3.6 → 3.4.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 (116) hide show
  1. package/dist/{adapters-BKzKe2mO.mjs → adapters-BXiBWAKs.mjs} +1 -1
  2. package/dist/{adapters-DwDTQoCG.cjs → adapters-Czl3WtQt.cjs} +1 -1
  3. package/dist/{build-CxT38vPv.cjs → build-CNkXRdk8.cjs} +1 -1
  4. package/dist/{build-BJnL-FHG.mjs → build-CqUBsXVC.mjs} +1 -1
  5. package/dist/client/index.cjs +223 -51
  6. package/dist/client/index.d.cts +3 -3
  7. package/dist/client/index.d.ts +3 -3
  8. package/dist/client/index.js +226 -56
  9. package/dist/client/mdx.cjs +1 -1
  10. package/dist/client/mdx.js +1 -1
  11. package/dist/client/primitives.cjs +5 -5
  12. package/dist/client/primitives.d.cts +53 -34
  13. package/dist/client/primitives.d.ts +62 -43
  14. package/dist/client/primitives.js +4 -4
  15. package/dist/client/router.cjs +1 -1
  16. package/dist/client/router.d.cts +1 -1
  17. package/dist/client/router.d.ts +1 -1
  18. package/dist/client/router.js +1 -1
  19. package/dist/client/theme/reset.css +41 -0
  20. package/dist/{config-BJp3lGzE.cjs → config-B3SEoVjG.cjs} +2 -2
  21. package/dist/{config-BC_qhXws.cjs → config-Bfakeadu.cjs} +1 -1
  22. package/dist/{config-B3_iVsbi.mjs → config-CTcfF-0c.mjs} +2 -2
  23. package/dist/dev-D1DmOSjn.mjs +6 -0
  24. package/dist/dev-DH6cSge8.cjs +6 -0
  25. package/dist/{docs-layout-D3Fmb0Wd.js → docs-layout-CmntYM6p.js} +33 -33
  26. package/dist/{docs-layout-SgphExoE.cjs → docs-layout-DIgxJ5c7.cjs} +9 -9
  27. package/dist/{doctor-BqxOFRt3.cjs → doctor-BLxm2alc.cjs} +1 -1
  28. package/dist/{doctor-TS3JGNEU.cjs → doctor-Dd-JMTRo.cjs} +1 -1
  29. package/dist/{doctor-Cv5lXnay.mjs → doctor-DogHujrP.mjs} +1 -1
  30. package/dist/{image-Bkx85rsq.cjs → image-Bke2ojW1.cjs} +3 -3
  31. package/dist/{image-BAiDReNd.js → image-CaY2w0ua.js} +2 -1
  32. package/dist/index--xbYbT8N.d.ts +343 -0
  33. package/dist/{index-B1Mx0dHl.d.ts → index-B_o5y34l.d.cts} +89 -10
  34. package/dist/{index-DLaHgD-i.d.cts → index-Bx0CUd7Q.d.ts} +89 -10
  35. package/dist/index-RK7W_Fxy.d.cts +343 -0
  36. package/dist/{link-q1qHNGK_.js → link-CSe_oD8Y.js} +86 -113
  37. package/dist/{link-hLWOsx0x.cjs → link-Xb69Oy2F.cjs} +87 -143
  38. package/dist/{mdx-Qi0DmaY8.cjs → mdx-BCOrMd-P.cjs} +68 -16
  39. package/dist/{mdx-CJGWzBGy.js → mdx-BijiEbkp.js} +62 -15
  40. package/dist/{native-nLA4Jr0T.cjs → native-BbtRkce5.cjs} +1 -1
  41. package/dist/node/cli-entry.cjs +1 -1
  42. package/dist/node/cli-entry.mjs +1 -1
  43. package/dist/node/highlight.d.cts +2 -2
  44. package/dist/node/highlight.d.mts +2 -2
  45. package/dist/node/index.cjs +1 -1
  46. package/dist/node/index.d.cts +18 -39
  47. package/dist/node/index.d.mts +19 -40
  48. package/dist/node/index.mjs +1 -1
  49. package/dist/node/mdx/shiki-adapter.d.cts +1 -1
  50. package/dist/node/mdx/shiki-adapter.d.mts +1 -1
  51. package/dist/node-BgiLCa0I.cjs +39 -0
  52. package/dist/node-Da3tYBHo.mjs +39 -0
  53. package/dist/{package-Bah2tHjK.cjs → package-D1gVs5gQ.cjs} +1 -1
  54. package/dist/{package-D6bf68FR.mjs → package-YgQJn3Yh.mjs} +1 -1
  55. package/dist/pages-external-B_r6gvqP.cjs +6 -0
  56. package/dist/pages-external-jmK7AHaO.mjs +6 -0
  57. package/dist/{parser-CD8Oo8qh.mjs → parser-CvNZc5s3.mjs} +1 -1
  58. package/dist/{parser-vPaKvzLp.cjs → parser-DJLWTiO-.cjs} +1 -1
  59. package/dist/plugin-DW9K2fW5.mjs +69 -0
  60. package/dist/plugin-NwGKyTJX.cjs +69 -0
  61. package/dist/{plugin-context-b5qVVQSU.mjs → plugin-context-COh-cbsW.mjs} +1 -1
  62. package/dist/{plugin-context-BZs5lvDu.cjs → plugin-context-FIHaWn6r.cjs} +1 -1
  63. package/dist/{plugin-lifecycle-s89gzTlh.cjs → plugin-lifecycle-D9fTRaWY.cjs} +1 -1
  64. package/dist/{registry-B8pt41zj.d.cts → registry-BFmzj1yg.d.mts} +1 -1
  65. package/dist/{registry-BrrH2X9c.d.mts → registry-BoswPzYV.d.cts} +1 -1
  66. package/dist/{resolve-C5rT6B21.mjs → resolve-5puUe7eS.mjs} +1 -1
  67. package/dist/{resolve-BelytNYR.cjs → resolve-CF4ZLfqx.cjs} +1 -1
  68. package/dist/route-paths-B6ocUfNY.cjs +6 -0
  69. package/dist/route-paths-DyDji4bX.mjs +6 -0
  70. package/dist/{router-CZBxMRAH.js → router-B5e8k4qK.js} +175 -10
  71. package/dist/{router-C3kygdRK.cjs → router-DKC0Lu0n.cjs} +204 -9
  72. package/dist/{routes-Dq_2EUIB.cjs → routes-D55M8UrH.cjs} +1 -1
  73. package/dist/{routes-CzhKOw67.cjs → routes-DdE6Lfcl.cjs} +1 -1
  74. package/dist/{routes-Dw6g0bfF.mjs → routes-_I_8PQYF.mjs} +1 -1
  75. package/dist/{search-dialog-CguKVtUu.cjs → search-dialog-BOQRHKTb.cjs} +53 -20
  76. package/dist/{search-dialog-mYnqU4v7.js → search-dialog-BXil4_7P.js} +57 -24
  77. package/dist/{search-dialog-BYZS9aeO.cjs → search-dialog-CwlBd-Mu.cjs} +5 -5
  78. package/dist/{search-dialog-DQwod5Xc.js → search-dialog-D3Obh3eA.js} +1 -1
  79. package/dist/{search-dialog-DzObE-Ar.js → search-dialog-DeplpVEB.js} +3 -3
  80. package/dist/{search-dialog-QgKRRbsI.cjs → search-dialog-cHXR5zhL.cjs} +1 -1
  81. package/dist/server/index.cjs +1 -1
  82. package/dist/server/index.d.mts +1 -1
  83. package/dist/server/index.mjs +1 -1
  84. package/dist/ssg-static-options-Br1_u9qp.mjs +6 -0
  85. package/dist/ssg-static-options-CVvGKM8i.cjs +6 -0
  86. package/dist/types-58Ac3UGI.d.cts +114 -0
  87. package/dist/types-BwnGf-1E.d.mts +114 -0
  88. package/dist/{virtual-modules-C3S3Nz8r.cjs → virtual-modules-C4-qxFlL.cjs} +1 -1
  89. package/dist/{virtual-modules-CaxqrFd6.mjs → virtual-modules-DiWUKJGP.mjs} +1 -1
  90. package/package.json +5 -3
  91. package/src/shared/types.ts +133 -987
  92. package/dist/dev-46NiL0MC.cjs +0 -6
  93. package/dist/dev-C4kjO5xs.mjs +0 -6
  94. package/dist/index-CgWkOCCn.d.cts +0 -1193
  95. package/dist/index-CuNSD3E2.d.ts +0 -1193
  96. package/dist/node-7Cfw6nMr.cjs +0 -23
  97. package/dist/node-CT2E84nY.mjs +0 -23
  98. package/dist/pages-external-BBw8ObVK.mjs +0 -6
  99. package/dist/pages-external-DPiPFxxP.cjs +0 -6
  100. package/dist/plugin-AgNI3ktz.cjs +0 -69
  101. package/dist/plugin-BAv_pYLt.mjs +0 -69
  102. package/dist/types-74i_xUe2.d.mts +0 -975
  103. package/dist/types-X_Pwk8Cg.d.cts +0 -975
  104. /package/dist/{audit-CMc_ydRr.mjs → audit-CYAkXXvP.mjs} +0 -0
  105. /package/dist/{audit-CHkGiV3c.cjs → audit-DxCZZTuX.cjs} +0 -0
  106. /package/dist/{csp-BiGAG8aF.cjs → csp-B-gc2Iha.cjs} +0 -0
  107. /package/dist/{csp-D0BOH8ae.mjs → csp-f8DOcI_7.mjs} +0 -0
  108. /package/dist/{generator-BCrZL53x.cjs → generator-CBAPKY6r.cjs} +0 -0
  109. /package/dist/{generator-CFukoGa0.mjs → generator-MRpn-yp6.mjs} +0 -0
  110. /package/dist/{handler-Lex5DbvG.mjs → handler-DBZqoWt2.mjs} +0 -0
  111. /package/dist/{handler-Ch-Q9NAB.cjs → handler-ryZR9Q41.cjs} +0 -0
  112. /package/dist/{index-HAwIo4nZ.d.mts → index-CPr34I2C.d.mts} +0 -0
  113. /package/dist/{native-BYKMke79.mjs → native-DZ6WMwjG.mjs} +0 -0
  114. /package/dist/{native-BOet8hpE.cjs → native-DeKxny_T.cjs} +0 -0
  115. /package/dist/{update-check-BXD1atVv.mjs → update-check-BXx8te9F.mjs} +0 -0
  116. /package/dist/{update-check-DFQZyoSU.cjs → update-check-CiIeC7CX.cjs} +0 -0
@@ -0,0 +1,114 @@
1
+
2
+ import { IncomingMessage, ServerResponse } from "node:http";
3
+ import { AliasOptions, Plugin, UserConfig } from "vite";
4
+ import { BoltdocsConfigContract, BoltdocsExperimentalConfig, BoltdocsViewTransitionsConfig, CodeHighlightConfig, CodeHighlightConfig as CodeHighlightConfig$1, CodeHighlighterAdapter, CodeHighlighterEngine, CodeHighlighterRuntime, CodeTheme, CodeTheme as CodeTheme$1, DiagnosticRecord, ExternalFileRoute, IPluginLifecycleManager, JsonLdObject, JsonLdValue, ParsedMetaLike, PluginClientConfig, PluginContext, PluginCssDefinition, PluginDefinition, PluginHmrEvent, PluginLifecycleHooks, PluginLogger, PluginMeta, PluginServerMiddleware, PluginStore, PluginTransformMiddleware, RegisteredVirtualModule, RouteMeta, StructuredData } from "@bdocs/contracts";
5
+
6
+ //#region src/shared/types.d.ts
7
+ type PluginServerMiddleware$1 = PluginServerMiddleware<IncomingMessage, ServerResponse>;
8
+ interface PluginContext$1 extends PluginContext<BoltdocsConfig, IncomingMessage, ServerResponse> {}
9
+ interface PluginLifecycleHooks$1 extends PluginLifecycleHooks<BoltdocsConfig, IncomingMessage, ServerResponse> {}
10
+ interface PluginTransformMiddleware$1 extends PluginTransformMiddleware<BoltdocsConfig, IncomingMessage, ServerResponse> {}
11
+ interface IPluginLifecycleManager$1 extends IPluginLifecycleManager<BoltdocsConfig, IncomingMessage, ServerResponse> {}
12
+ /**
13
+ * Represents a single social link in the configuration.
14
+ */
15
+ interface BoltdocsSocialLink {
16
+ icon: 'discord' | 'x' | 'github' | 'bluesky' | string;
17
+ link: string;
18
+ }
19
+ /**
20
+ * Theme-specific configuration options.
21
+ */
22
+ interface BoltdocsThemeConfig {
23
+ title?: string | Record<string, string>;
24
+ description?: string | Record<string, string>;
25
+ logo?: string | {
26
+ dark: string;
27
+ light: string;
28
+ alt?: string;
29
+ width?: number;
30
+ height?: number;
31
+ };
32
+ navbar?: Array<{
33
+ label: string | Record<string, string>;
34
+ href: BoltdocsRoutePathWithFallback;
35
+ items?: Array<{
36
+ label: string | Record<string, string>;
37
+ href: BoltdocsRoutePathWithFallback;
38
+ }>;
39
+ }>;
40
+ sidebar?: Record<string, Array<{
41
+ text: string;
42
+ link: BoltdocsRoutePathWithFallback;
43
+ }>>;
44
+ sidebarGroups?: Record<string, {
45
+ title?: string | Record<string, string>;
46
+ icon?: string;
47
+ }>;
48
+ socialLinks?: BoltdocsSocialLink[];
49
+ editLink?: string;
50
+ communityHelp?: string;
51
+ version?: string;
52
+ githubRepo?: string;
53
+ favicon?: string;
54
+ tabs?: Array<{
55
+ id: string;
56
+ text: string | Record<string, string>;
57
+ icon?: string;
58
+ }>;
59
+ /**
60
+ * Legacy alias for `codeHighlighting.theme`. Kept for backwards
61
+ * compatibility — prefer `codeHighlighting`.
62
+ * @deprecated Use `codeHighlighting` instead.
63
+ */
64
+ codeTheme?: CodeTheme;
65
+ /**
66
+ * Configures the markdown code highlighting engine. The engine is
67
+ * engine-agnostic: `engine` accepts a registry id (`'shiki'` by default),
68
+ * an adapter instance, or an adapter factory — so any highlighter can be
69
+ * plugged in without changes to the core.
70
+ *
71
+ * Shorthand: a plain string is a registry id, i.e. `'shiki'` is
72
+ * equivalent to `{ engine: 'shiki' }` (resolved by
73
+ * `normalizeCodeHighlightConfig()` at every read site).
74
+ */
75
+ codeHighlighting?: CodeHighlightConfig | string;
76
+ }
77
+ /**
78
+ * Defines a Boltdocs plugin.
79
+ *
80
+ * Use the `definePlugin()` or `createPlugin()` helper from the node API for full
81
+ * type safety and access to lifecycle hooks.
82
+ */
83
+ interface PluginCssConfig extends PluginCssDefinition {}
84
+ interface BoltdocsPlugin extends PluginDefinition<BoltdocsConfig, IncomingMessage, ServerResponse> {
85
+ vitePlugins?: Plugin[];
86
+ }
87
+ /**
88
+ * The root configuration object for Boltdocs.
89
+ */
90
+ interface BoltdocsConfig extends BoltdocsConfigContract<BoltdocsPlugin> {
91
+ theme?: BoltdocsThemeConfig;
92
+ aliases?: AliasOptions;
93
+ vite?: UserConfig;
94
+ }
95
+ /**
96
+ * Global namespace for Boltdocs types that can be augmented by generated code.
97
+ * This allows for strictly typed locales and versions based on the project configuration.
98
+ */
99
+ declare global {
100
+ namespace Boltdocs {
101
+ interface Types {}
102
+ /**
103
+ * Marker interface augmented by generated code to provide strict route path typing.
104
+ * When no types have been generated (e.g., before first dev server start),
105
+ * keyof is never, and BoltdocsRoutePath falls back to string.
106
+ */
107
+ interface RoutePaths {}
108
+ }
109
+ }
110
+ type BoltdocsRoutePath = keyof Boltdocs.RoutePaths;
111
+ type ExternalRouteReference = `/${string}` | `#${string}` | `?${string}` | `site:/${string}` | `site:${string}` | `http://${string}` | `https://${string}` | `//${string}`;
112
+ type BoltdocsRoutePathWithFallback = BoltdocsRoutePath | ExternalRouteReference | string;
113
+ //#endregion
114
+ export { PluginMeta as C, RegisteredVirtualModule as D, PluginTransformMiddleware$1 as E, RouteMeta as O, PluginLogger as S, PluginStore as T, PluginClientConfig as _, BoltdocsViewTransitionsConfig as a, PluginHmrEvent as b, CodeHighlighterEngine as c, DiagnosticRecord as d, ExternalFileRoute as f, ParsedMetaLike as g, JsonLdValue as h, BoltdocsThemeConfig as i, StructuredData as k, CodeHighlighterRuntime as l, JsonLdObject as m, BoltdocsExperimentalConfig as n, CodeHighlightConfig$1 as o, IPluginLifecycleManager$1 as p, BoltdocsPlugin as r, CodeHighlighterAdapter as s, BoltdocsConfig as t, CodeTheme$1 as u, PluginContext$1 as v, PluginServerMiddleware$1 as w, PluginLifecycleHooks$1 as x, PluginCssConfig as y };
@@ -0,0 +1,114 @@
1
+
2
+ import { AliasOptions, Plugin, UserConfig } from "vite";
3
+ import { IncomingMessage, ServerResponse } from "node:http";
4
+ import { BoltdocsConfigContract, BoltdocsExperimentalConfig, BoltdocsViewTransitionsConfig, CodeHighlightConfig, CodeHighlightConfig as CodeHighlightConfig$1, CodeHighlighterAdapter, CodeHighlighterEngine, CodeHighlighterRuntime, CodeTheme, CodeTheme as CodeTheme$1, DiagnosticRecord, ExternalFileRoute, IPluginLifecycleManager, JsonLdObject, JsonLdValue, ParsedMetaLike, PluginClientConfig, PluginContext, PluginCssDefinition, PluginDefinition, PluginHmrEvent, PluginLifecycleHooks, PluginLogger, PluginMeta, PluginServerMiddleware, PluginStore, PluginTransformMiddleware, RegisteredVirtualModule, RouteMeta, StructuredData } from "@bdocs/contracts";
5
+
6
+ //#region src/shared/types.d.ts
7
+ type PluginServerMiddleware$1 = PluginServerMiddleware<IncomingMessage, ServerResponse>;
8
+ interface PluginContext$1 extends PluginContext<BoltdocsConfig, IncomingMessage, ServerResponse> {}
9
+ interface PluginLifecycleHooks$1 extends PluginLifecycleHooks<BoltdocsConfig, IncomingMessage, ServerResponse> {}
10
+ interface PluginTransformMiddleware$1 extends PluginTransformMiddleware<BoltdocsConfig, IncomingMessage, ServerResponse> {}
11
+ interface IPluginLifecycleManager$1 extends IPluginLifecycleManager<BoltdocsConfig, IncomingMessage, ServerResponse> {}
12
+ /**
13
+ * Represents a single social link in the configuration.
14
+ */
15
+ interface BoltdocsSocialLink {
16
+ icon: 'discord' | 'x' | 'github' | 'bluesky' | string;
17
+ link: string;
18
+ }
19
+ /**
20
+ * Theme-specific configuration options.
21
+ */
22
+ interface BoltdocsThemeConfig {
23
+ title?: string | Record<string, string>;
24
+ description?: string | Record<string, string>;
25
+ logo?: string | {
26
+ dark: string;
27
+ light: string;
28
+ alt?: string;
29
+ width?: number;
30
+ height?: number;
31
+ };
32
+ navbar?: Array<{
33
+ label: string | Record<string, string>;
34
+ href: BoltdocsRoutePathWithFallback;
35
+ items?: Array<{
36
+ label: string | Record<string, string>;
37
+ href: BoltdocsRoutePathWithFallback;
38
+ }>;
39
+ }>;
40
+ sidebar?: Record<string, Array<{
41
+ text: string;
42
+ link: BoltdocsRoutePathWithFallback;
43
+ }>>;
44
+ sidebarGroups?: Record<string, {
45
+ title?: string | Record<string, string>;
46
+ icon?: string;
47
+ }>;
48
+ socialLinks?: BoltdocsSocialLink[];
49
+ editLink?: string;
50
+ communityHelp?: string;
51
+ version?: string;
52
+ githubRepo?: string;
53
+ favicon?: string;
54
+ tabs?: Array<{
55
+ id: string;
56
+ text: string | Record<string, string>;
57
+ icon?: string;
58
+ }>;
59
+ /**
60
+ * Legacy alias for `codeHighlighting.theme`. Kept for backwards
61
+ * compatibility — prefer `codeHighlighting`.
62
+ * @deprecated Use `codeHighlighting` instead.
63
+ */
64
+ codeTheme?: CodeTheme;
65
+ /**
66
+ * Configures the markdown code highlighting engine. The engine is
67
+ * engine-agnostic: `engine` accepts a registry id (`'shiki'` by default),
68
+ * an adapter instance, or an adapter factory — so any highlighter can be
69
+ * plugged in without changes to the core.
70
+ *
71
+ * Shorthand: a plain string is a registry id, i.e. `'shiki'` is
72
+ * equivalent to `{ engine: 'shiki' }` (resolved by
73
+ * `normalizeCodeHighlightConfig()` at every read site).
74
+ */
75
+ codeHighlighting?: CodeHighlightConfig | string;
76
+ }
77
+ /**
78
+ * Defines a Boltdocs plugin.
79
+ *
80
+ * Use the `definePlugin()` or `createPlugin()` helper from the node API for full
81
+ * type safety and access to lifecycle hooks.
82
+ */
83
+ interface PluginCssConfig extends PluginCssDefinition {}
84
+ interface BoltdocsPlugin extends PluginDefinition<BoltdocsConfig, IncomingMessage, ServerResponse> {
85
+ vitePlugins?: Plugin[];
86
+ }
87
+ /**
88
+ * The root configuration object for Boltdocs.
89
+ */
90
+ interface BoltdocsConfig extends BoltdocsConfigContract<BoltdocsPlugin> {
91
+ theme?: BoltdocsThemeConfig;
92
+ aliases?: AliasOptions;
93
+ vite?: UserConfig;
94
+ }
95
+ /**
96
+ * Global namespace for Boltdocs types that can be augmented by generated code.
97
+ * This allows for strictly typed locales and versions based on the project configuration.
98
+ */
99
+ declare global {
100
+ namespace Boltdocs {
101
+ interface Types {}
102
+ /**
103
+ * Marker interface augmented by generated code to provide strict route path typing.
104
+ * When no types have been generated (e.g., before first dev server start),
105
+ * keyof is never, and BoltdocsRoutePath falls back to string.
106
+ */
107
+ interface RoutePaths {}
108
+ }
109
+ }
110
+ type BoltdocsRoutePath = keyof Boltdocs.RoutePaths;
111
+ type ExternalRouteReference = `/${string}` | `#${string}` | `?${string}` | `site:/${string}` | `site:${string}` | `http://${string}` | `https://${string}` | `//${string}`;
112
+ type BoltdocsRoutePathWithFallback = BoltdocsRoutePath | ExternalRouteReference | string;
113
+ //#endregion
114
+ export { PluginMeta as C, RegisteredVirtualModule as D, PluginTransformMiddleware$1 as E, RouteMeta as O, PluginLogger as S, PluginStore as T, PluginClientConfig as _, BoltdocsViewTransitionsConfig as a, PluginHmrEvent as b, CodeHighlighterEngine as c, DiagnosticRecord as d, ExternalFileRoute as f, ParsedMetaLike as g, JsonLdValue as h, BoltdocsThemeConfig as i, StructuredData as k, CodeHighlighterRuntime as l, JsonLdObject as m, BoltdocsExperimentalConfig as n, CodeHighlightConfig$1 as o, IPluginLifecycleManager$1 as p, BoltdocsPlugin as r, CodeHighlighterAdapter as s, BoltdocsConfig as t, CodeTheme$1 as u, PluginContext$1 as v, PluginServerMiddleware$1 as w, PluginLifecycleHooks$1 as x, PluginCssConfig as y };
@@ -3,7 +3,7 @@
3
3
  * Copyright (c) 2026 Jesus Alcala
4
4
  * Licensed under the MIT License.
5
5
  */
6
- const e=require(`./chunk-D1Md3oWO.cjs`),t=require(`./utils-ej6_SjIZ.cjs`),n=require(`./plugin-context-BZs5lvDu.cjs`),r=require(`./routes-CzhKOw67.cjs`);let i=require(`node:path`);i=e.r(i);let a=require(`node:fs`);a=e.r(a);const o=1200;function s(e){return typeof e==`string`?[e]:Array.isArray(e)?e.flatMap(s):e&&typeof e==`object`?Object.values(e).flatMap(s):[]}const c=new Set([`title`,`description`,`permalink`,`sidebarPosition`,`sidebarLabel`,`sidebarHidden`,`hidden`,`category`,`order`,`badge`,`icon`,`date`,`lastUpdated`,`groupTitle`,`groupPosition`,`seo`]);function l(e,t){let n=e.replace(/\s+/g,` `).trim();return n.length>t?n.slice(0,t).trim():n}function u(e,t){let n=[],r=e.toLocaleLowerCase(),i=0;for(let e of t.slice(0,100)){let t=e.text.trim();if(!t)continue;let a=r.indexOf(t.toLocaleLowerCase(),i);if(a<0){n.push({heading:e,body:``});continue}let o=a+t.length;n.push({heading:e,start:o,body:``}),i=o}return n.map((t,r)=>{if(t.start===void 0)return t;let i=n[r+1]?.start??e.length;return{heading:t.heading,body:l(e.slice(t.start,i),Math.max(0,o-t.heading.text.length-4))}})}function d(e){let t=[];for(let n of e){let e=``;n.frontmatter&&(e=s(Object.entries(n.frontmatter).filter(([e])=>!c.has(e)).map(([e,t])=>t)).join(` `));let r=n._content||``,i=l(e?`${r} ${e}`:r,2e3),a=n.headings?u(r,n.headings):[];if(t.push({id:n.path,title:n.title,content:i,url:n.path,display:n.groupTitle?`${n.groupTitle} > ${n.title}`:n.title,locale:n.locale,version:n.version}),n.headings){let e=6e3;for(let r of a){let{heading:i}=r,a=`${i.text} in ${n.title}`,s=l(r.body?`${a} ${r.body}`:a,Math.min(o,e));if(s&&(t.push({id:`${n.path}#${i.id}`,title:i.text,content:s,url:`${n.path}#${i.id}`,display:`${n.title} > ${i.text}`,locale:n.locale,version:n.version}),e=Math.max(0,e-s.length)),e===0)break}}}return t}function f(e){return{path:e.path,filePath:e.filePath,title:e.title,description:e.description||``,sidebarPosition:e.sidebarPosition,badge:e.badge,icon:e.icon,headings:e.headings||[],frontmatter:e.frontmatter,locale:e.locale,version:e.version,tab:e.tab,collection:e.collection,tags:e.tags,author:e.author,draft:e.draft,excerpt:e.excerpt,coverImage:e.coverImage,group:e.group,groupTitle:e.groupTitle,groupPosition:e.groupPosition,groupIcon:e.groupIcon,subRouteGroup:e.subRouteGroup,seo:e.seo,date:e.date,lastUpdated:e.lastUpdated,category:e.category,order:e.order,sidebarLabel:e.sidebarLabel,sidebarHidden:e.sidebarHidden,slugParts:e.slugParts}}const p=new Set([`apikey`,`authorization`,`credential`,`credentials`,`password`,`privatekey`,`secret`,`secretkey`,`token`]);function m(e){return p.has(e.toLowerCase().replace(/[^a-z0-9]/g,``))}function h(e,t=0){return t>10||typeof e!=`object`||!e?e:Array.isArray(e)?e.map(e=>h(e,t+1)):Object.fromEntries(Object.entries(e).filter(([e])=>!m(e)).map(([e,n])=>[e,h(n,t+1)]))}function g(e){return{name:e.name,...e.metadata?{metadata:h(e.metadata)}:{}}}function _(e){let t=e.lastIndexOf(`#`);return t===-1?{modulePath:e,exportName:`default`}:{modulePath:e.slice(0,t),exportName:e.slice(t+1)||`default`}}function v(e){let t={};for(let n of e)for(let[e,r]of Object.entries(n.client?.slots??{}))t[e]??=[],t[e].push(r);return`const slots = {\n${Object.entries(t).map(([e,t])=>{let n=t.map((t,n)=>{let{modulePath:r,exportName:i}=_(t);return`{ id: ${JSON.stringify(`${e}:${n}`)}, load: () => import(${JSON.stringify(r)}).then(module => ({ default: module[${JSON.stringify(i)}] || module.default })) }`});return` ${JSON.stringify(e)}: [${n.join(`, `)}]`}).join(`,
6
+ const e=require(`./chunk-D1Md3oWO.cjs`),t=require(`./utils-ej6_SjIZ.cjs`),n=require(`./plugin-context-FIHaWn6r.cjs`),r=require(`./routes-DdE6Lfcl.cjs`);let i=require(`node:path`);i=e.r(i);let a=require(`node:fs`);a=e.r(a);const o=1200;function s(e){return typeof e==`string`?[e]:Array.isArray(e)?e.flatMap(s):e&&typeof e==`object`?Object.values(e).flatMap(s):[]}const c=new Set([`title`,`description`,`permalink`,`sidebarPosition`,`sidebarLabel`,`sidebarHidden`,`hidden`,`category`,`order`,`badge`,`icon`,`date`,`lastUpdated`,`groupTitle`,`groupPosition`,`seo`]);function l(e,t){let n=e.replace(/\s+/g,` `).trim();return n.length>t?n.slice(0,t).trim():n}function u(e,t){let n=[],r=e.toLocaleLowerCase(),i=0;for(let e of t.slice(0,100)){let t=e.text.trim();if(!t)continue;let a=r.indexOf(t.toLocaleLowerCase(),i);if(a<0){n.push({heading:e,body:``});continue}let o=a+t.length;n.push({heading:e,start:o,body:``}),i=o}return n.map((t,r)=>{if(t.start===void 0)return t;let i=n[r+1]?.start??e.length;return{heading:t.heading,body:l(e.slice(t.start,i),Math.max(0,o-t.heading.text.length-4))}})}function d(e){let t=[];for(let n of e){let e=``;n.frontmatter&&(e=s(Object.entries(n.frontmatter).filter(([e])=>!c.has(e)).map(([e,t])=>t)).join(` `));let r=n._content||``,i=l(e?`${r} ${e}`:r,2e3),a=n.headings?u(r,n.headings):[];if(t.push({id:n.path,title:n.title,content:i,url:n.path,display:n.groupTitle?`${n.groupTitle} > ${n.title}`:n.title,locale:n.locale,version:n.version}),n.headings){let e=6e3;for(let r of a){let{heading:i}=r,a=`${i.text} in ${n.title}`,s=l(r.body?`${a} ${r.body}`:a,Math.min(o,e));if(s&&(t.push({id:`${n.path}#${i.id}`,title:i.text,content:s,url:`${n.path}#${i.id}`,display:`${n.title} > ${i.text}`,locale:n.locale,version:n.version}),e=Math.max(0,e-s.length)),e===0)break}}}return t}function f(e){return{path:e.path,filePath:e.filePath,title:e.title,description:e.description||``,sidebarPosition:e.sidebarPosition,badge:e.badge,icon:e.icon,headings:e.headings||[],frontmatter:e.frontmatter,locale:e.locale,version:e.version,tab:e.tab,collection:e.collection,tags:e.tags,author:e.author,draft:e.draft,excerpt:e.excerpt,coverImage:e.coverImage,group:e.group,groupTitle:e.groupTitle,groupPosition:e.groupPosition,groupIcon:e.groupIcon,subRouteGroup:e.subRouteGroup,seo:e.seo,date:e.date,lastUpdated:e.lastUpdated,category:e.category,order:e.order,sidebarLabel:e.sidebarLabel,sidebarHidden:e.sidebarHidden,slugParts:e.slugParts}}const p=new Set([`apikey`,`authorization`,`credential`,`credentials`,`password`,`privatekey`,`secret`,`secretkey`,`token`]);function m(e){return p.has(e.toLowerCase().replace(/[^a-z0-9]/g,``))}function h(e,t=0){return t>10||typeof e!=`object`||!e?e:Array.isArray(e)?e.map(e=>h(e,t+1)):Object.fromEntries(Object.entries(e).filter(([e])=>!m(e)).map(([e,n])=>[e,h(n,t+1)]))}function g(e){return{name:e.name,...e.metadata?{metadata:h(e.metadata)}:{}}}function _(e){let t=e.lastIndexOf(`#`);return t===-1?{modulePath:e,exportName:`default`}:{modulePath:e.slice(0,t),exportName:e.slice(t+1)||`default`}}function v(e){let t={};for(let n of e)for(let[e,r]of Object.entries(n.client?.slots??{}))t[e]??=[],t[e].push(r);return`const slots = {\n${Object.entries(t).map(([e,t])=>{let n=t.map((t,n)=>{let{modulePath:r,exportName:i}=_(t);return`{ id: ${JSON.stringify(`${e}:${n}`)}, load: () => import(${JSON.stringify(r)}).then(module => ({ default: module[${JSON.stringify(i)}] || module.default })) }`});return` ${JSON.stringify(e)}: [${n.join(`, `)}]`}).join(`,
7
7
  `)}\n};\nexport default slots;\n`}function y(e){return{routeCacheContext:e,routeGenerationFingerprint:void 0,directoryMetaCache:null,routesDataMap:new Map,collectionsDataMap:new Map,searchDataMap:new Map,serializedSearchData:null,serializedPageSourceData:null}}const b=y();function x(e){return e??b}function S(e){let t=x(e);t.directoryMetaCache=null,t.routeGenerationFingerprint=void 0,t.routeCacheVariant=void 0,t.routesDataMap.clear(),t.collectionsDataMap.clear(),t.searchDataMap.clear(),t.serializedSearchData=null,t.serializedPageSourceData=null}function C(e,t){return(!t.routeCacheContext||t.routeCacheContext.disposed)&&(t.routeCacheContext=r.d(e),t.routeCacheVariant=void 0,t.routeGenerationFingerprint=void 0,t.routesDataMap.clear(),t.collectionsDataMap.clear(),t.searchDataMap.clear(),t.serializedSearchData=null,t.serializedPageSourceData=null),t.routeCacheContext}async function w(e,t,n,i){let a=x(n),o=C(e,a),s=r.p(t),c=(i?.fingerprint===s&&o.variants.get(s)===i?i:void 0)??r.f(o,s);a.routeCacheVariant=c,a.routeGenerationFingerprint=s;let l=await r.t(e,t,void 0,!1,o,c);a.routesDataMap.clear();for(let e of l)a.routesDataMap.set(e.path,e);T(a)}function T(e){let t=x(e),n=Array.from(t.routesDataMap.values()),r=d(n);t.searchDataMap.clear(),t.serializedSearchData=null,t.serializedPageSourceData=null;for(let e of r)t.searchDataMap.set(e.id,e);t.collectionsDataMap.clear();for(let e of n)if(e.collection){let n={path:e.path,title:e.title,date:e.date,excerpt:e.excerpt,tags:e.tags,author:e.author,coverImage:e.coverImage,filePath:e.filePath,locale:e.locale,version:e.version,frontmatter:e.frontmatter,draft:e.frontmatter?.draft===!0,collection:e.collection};t.collectionsDataMap.set(e.filePath,n)}t.serializedSearchData=JSON.stringify(k(t)),t.serializedPageSourceData=JSON.stringify(A(t))}async function E(e,t,n){let i=x(n);C(e,i);let a=r.p(t);(i.routesDataMap.size===0||i.routeGenerationFingerprint!==a)&&(i.routesDataMap.clear(),i.collectionsDataMap.clear(),i.searchDataMap.clear(),i.serializedSearchData=null,i.serializedPageSourceData=null,await w(e,t,i))}function D(e){let t=x(e),n={},r=Array.from(t.collectionsDataMap.values()).sort((e,t)=>{let n=e=>{if(!e)return-1/0;let t=new Date(e).getTime();return Number.isFinite(t)?t:-1/0},r=n(e.date),i=n(t.date)-r;return i===0?e.path.localeCompare(t.path):i});for(let e of r){let t=e.collection;t&&(n[t]||(n[t]=[]),n[t].push(e))}return n}function O(e,t=e=>e){let n=Array.from(e.values(),t).sort((e,t)=>{let n=e=>{if(typeof e!=`object`||!e)return String(e);let t=e;return`${String(t.path||``)}\u0000${String(t.id||``)}\u0000${String(t.filePath||``)}`};return n(e).localeCompare(n(t))});return`export default ${JSON.stringify(n)};`}function k(e){return Array.from(x(e).searchDataMap.values()).sort((e,t)=>e.id.localeCompare(t.id))}function A(e){let t=x(e),n={};for(let e of t.routesDataMap.values()){let t=e;t.path&&t._rawContent&&(n[t.path]=t._rawContent)}return Object.fromEntries(Object.entries(n).sort(([e],[t])=>e.localeCompare(t)))}function j(e){let t=x(e);return t.serializedSearchData===null&&(t.serializedSearchData=JSON.stringify(k(t))),t.serializedSearchData}function M(e){let t=x(e);return t.serializedPageSourceData===null&&(t.serializedPageSourceData=JSON.stringify(A(t))),t.serializedPageSourceData}function N(e){return`export default ${JSON.stringify(e)};`}async function P(e,t,n,i,a){let o=x(n);i&&(o.routeCacheContext=i),a&&(o.routeCacheVariant=a);let s=r.p(t);o.routeGenerationFingerprint!==s&&(o.routesDataMap.clear(),o.collectionsDataMap.clear(),o.searchDataMap.clear(),o.serializedSearchData=null,o.serializedPageSourceData=null);let c=new Map(o.routesDataMap),l=new Map(o.collectionsDataMap),u=new Map(o.searchDataMap);await w(e,t,o);let d={routes:{updated:[],deleted:[]},collections:{updated:[],deleted:[]},search:{updated:[],deleted:[]}};for(let[e,t]of o.routesDataMap){let n=c.get(e);(!n||JSON.stringify(n)!==JSON.stringify(t))&&d.routes.updated.push(f(t))}for(let e of c.keys())o.routesDataMap.has(e)||d.routes.deleted.push(e);for(let[e,t]of o.collectionsDataMap){let n=l.get(e);(!n||JSON.stringify(n)!==JSON.stringify(t))&&d.collections.updated.push(t)}for(let e of l.keys())o.collectionsDataMap.has(e)||d.collections.deleted.push(e);for(let[e,t]of o.searchDataMap){let n=u.get(e);(!n||JSON.stringify(n)!==JSON.stringify(t))&&d.search.updated.push(t)}for(let e of u.keys())o.searchDataMap.has(e)||d.search.deleted.push(e);return d}function F(e,r,o,s,c,l){let u=c?.virtualModuleRegistry??n.h,d=x(l);return{name:`vite-plugin-boltdocs-virtual-modules`,resolveId(e){if(e.includes(`boltdocs-entry`)||e===`virtual:boltdocs-entry`||e===`boltdocs/entry`||e===`boltdocs-entry`||e===`\0virtual:boltdocs-entry`||e===`\0virtual:boltdocs-entry.tsx`)return`\0virtual:boltdocs-entry.tsx`;if(e===`virtual:boltdocs-client-registry`||e===`\0virtual:boltdocs-client-registry`)return`\0virtual:boltdocs-client-registry`;if(e.includes(`boltdocs-client`)||e===`virtual:boltdocs-client`||e===`boltdocs/client`||e===`boltdocs-client`||e===`\0virtual:boltdocs-client.mjs`)return`\0virtual:boltdocs-client.mjs`;if(e.startsWith(`\0`)){let t=e.slice(1);if(!t.startsWith(`virtual:boltdocs-`)&&u?.has(t))return e}else if(!e.startsWith(`virtual:boltdocs-`)&&u?.has(e))return`\0${e}`;return e.startsWith(`virtual:boltdocs-`)?`\0${e}`:e.startsWith(`\0virtual:boltdocs-`)?e:null},async load(c,l){let p=r(),m=c.startsWith(`\0`)?c.slice(1):c;if(!m.includes(`boltdocs-entry.tsx`)&&!m.includes(`boltdocs-client.mjs`)&&!m.startsWith(`virtual:boltdocs-`)&&u?.has(m)){let e=u?.get(m);if(!e)return null;try{let t=await e.loader();if(typeof t!=`string`)throw Error(`[boltdocs] Plugin virtual module '${m}' loader must return a string source code, got ${typeof t}.`);return t}catch(e){throw Error(`[boltdocs] Plugin virtual module '${m}' failed to load: ${e instanceof Error?e.message:String(e)}`)}}if(c.includes(`boltdocs-entry.tsx`)||c===`\0virtual:boltdocs-entry`){let t=this.environment?.config?.consumer,r=o(),i=t===void 0?!!r?.build?.ssr:t!==`client`;return n.g({...e,ssr:i,useCompiledPages:r?.command===`build`},p)}if(c.includes(`boltdocs-client.mjs`)||c===`\0virtual:boltdocs-client.ts`||c===`virtual:boltdocs-client`){let e=__dirname,n=e;for(;e!==i.default.parse(e).root;){if(a.default.existsSync(i.default.join(e,`package.json`))&&JSON.parse(a.default.readFileSync(i.default.join(e,`package.json`),`utf-8`)).name===`boltdocs`){n=e;break}e=i.default.dirname(e)}let r=i.default.join(n,`src/client/index.ts`),o=i.default.join(n,`dist/client/index.js`);return`export * from '${t.u(a.default.existsSync(r)?r:o)}';`}if(!c.startsWith(`\0virtual:boltdocs-`))return;let h=c.replace(`\0virtual:boltdocs-`,``).replace(/\.tsx?$/,``);if(h===`routes`)return await E(s,p,d),O(d.routesDataMap,f);if(h===`client-registry`)return v(p?.plugins??[]);if(h===`collections`)return await E(s,p,d),N(D(d));if(h===`config`){await E(s,p,d);let e=d.routeCacheVariant?.directoryMeta||{};d.directoryMetaCache=e;let t=[...new Set(Array.from(d.routesDataMap.values()).map(e=>e.collection).filter(e=>!!e))].sort((e,t)=>e.localeCompare(t)),n=p?.collections,r=n?{...n,labels:{...n.labels||{},...Object.fromEntries(t.map(e=>[e,n.labels?.[e]??e]))}}:t.length>0?t:void 0,i={base:p?.base,theme:p?.theme,i18n:p?.i18n,versions:p?.versions,siteUrl:p?.siteUrl,integrations:p?.integrations,collections:r,seo:p?.seo,experimental:p?.experimental,plugins:p?.plugins?.map(g),directoryMeta:e};return`export default ${JSON.stringify(i)};`}if(h===`entry`){let t=this,r=o(),i=t.environment?.config?.consumer,a=i===void 0?!!(l?.ssr??r?.build?.ssr):i!==`client`;return n.g({...e,ssr:a,useCompiledPages:r?.command===`build`},p)}if(h===`mdx-components`){let e=[`tsx`,`ts`,`jsx`,`js`],n=null;for(let t of e){let e=i.default.resolve(s,`mdx-components.${t}`);if(a.default.existsSync(e)){n=e;break}}let r={};if(p?.plugins)for(let e of p.plugins)e.components&&Object.assign(r,e.components);let o=Object.entries(r),c=o.map(([e,t],n)=>`import * as _pluginCompMod_${n} from '${t}';`).join(`
8
8
  `),l=o.map(([e],t)=>`${JSON.stringify(e)}: _pluginCompMod_${t}[${JSON.stringify(e)}] || Reflect.get(_pluginCompMod_${t}, "default") || _pluginCompMod_${t}`).join(`,
9
9
  `);if(n){let e=t.u(n);return`${c}
@@ -3,7 +3,7 @@
3
3
  * Copyright (c) 2026 Jesus Alcala
4
4
  * Licensed under the MIT License.
5
5
  */
6
- import{_ as e,g as t,h as n}from"./plugin-context-b5qVVQSU.mjs";import{u as r}from"./utils-8lzafE49.mjs";import{d as i,f as a,p as o,t as s}from"./routes-Dw6g0bfF.mjs";import c from"node:path";import l from"node:fs";const u=1200;function d(e){return typeof e==`string`?[e]:Array.isArray(e)?e.flatMap(d):e&&typeof e==`object`?Object.values(e).flatMap(d):[]}const f=new Set([`title`,`description`,`permalink`,`sidebarPosition`,`sidebarLabel`,`sidebarHidden`,`hidden`,`category`,`order`,`badge`,`icon`,`date`,`lastUpdated`,`groupTitle`,`groupPosition`,`seo`]);function p(e,t){let n=e.replace(/\s+/g,` `).trim();return n.length>t?n.slice(0,t).trim():n}function m(e,t){let n=[],r=e.toLocaleLowerCase(),i=0;for(let e of t.slice(0,100)){let t=e.text.trim();if(!t)continue;let a=r.indexOf(t.toLocaleLowerCase(),i);if(a<0){n.push({heading:e,body:``});continue}let o=a+t.length;n.push({heading:e,start:o,body:``}),i=o}return n.map((t,r)=>{if(t.start===void 0)return t;let i=n[r+1]?.start??e.length;return{heading:t.heading,body:p(e.slice(t.start,i),Math.max(0,u-t.heading.text.length-4))}})}function h(e){let t=[];for(let n of e){let e=``;n.frontmatter&&(e=d(Object.entries(n.frontmatter).filter(([e])=>!f.has(e)).map(([e,t])=>t)).join(` `));let r=n._content||``,i=p(e?`${r} ${e}`:r,2e3),a=n.headings?m(r,n.headings):[];if(t.push({id:n.path,title:n.title,content:i,url:n.path,display:n.groupTitle?`${n.groupTitle} > ${n.title}`:n.title,locale:n.locale,version:n.version}),n.headings){let e=6e3;for(let r of a){let{heading:i}=r,a=`${i.text} in ${n.title}`,o=p(r.body?`${a} ${r.body}`:a,Math.min(u,e));if(o&&(t.push({id:`${n.path}#${i.id}`,title:i.text,content:o,url:`${n.path}#${i.id}`,display:`${n.title} > ${i.text}`,locale:n.locale,version:n.version}),e=Math.max(0,e-o.length)),e===0)break}}}return t}function g(e){return{path:e.path,filePath:e.filePath,title:e.title,description:e.description||``,sidebarPosition:e.sidebarPosition,badge:e.badge,icon:e.icon,headings:e.headings||[],frontmatter:e.frontmatter,locale:e.locale,version:e.version,tab:e.tab,collection:e.collection,tags:e.tags,author:e.author,draft:e.draft,excerpt:e.excerpt,coverImage:e.coverImage,group:e.group,groupTitle:e.groupTitle,groupPosition:e.groupPosition,groupIcon:e.groupIcon,subRouteGroup:e.subRouteGroup,seo:e.seo,date:e.date,lastUpdated:e.lastUpdated,category:e.category,order:e.order,sidebarLabel:e.sidebarLabel,sidebarHidden:e.sidebarHidden,slugParts:e.slugParts}}const _=new Set([`apikey`,`authorization`,`credential`,`credentials`,`password`,`privatekey`,`secret`,`secretkey`,`token`]);function v(e){return _.has(e.toLowerCase().replace(/[^a-z0-9]/g,``))}function y(e,t=0){return t>10||typeof e!=`object`||!e?e:Array.isArray(e)?e.map(e=>y(e,t+1)):Object.fromEntries(Object.entries(e).filter(([e])=>!v(e)).map(([e,n])=>[e,y(n,t+1)]))}function b(e){return{name:e.name,...e.metadata?{metadata:y(e.metadata)}:{}}}function x(e){let t=e.lastIndexOf(`#`);return t===-1?{modulePath:e,exportName:`default`}:{modulePath:e.slice(0,t),exportName:e.slice(t+1)||`default`}}function S(e){let t={};for(let n of e)for(let[e,r]of Object.entries(n.client?.slots??{}))t[e]??=[],t[e].push(r);return`const slots = {\n${Object.entries(t).map(([e,t])=>{let n=t.map((t,n)=>{let{modulePath:r,exportName:i}=x(t);return`{ id: ${JSON.stringify(`${e}:${n}`)}, load: () => import(${JSON.stringify(r)}).then(module => ({ default: module[${JSON.stringify(i)}] || module.default })) }`});return` ${JSON.stringify(e)}: [${n.join(`, `)}]`}).join(`,
6
+ import{_ as e,g as t,h as n}from"./plugin-context-COh-cbsW.mjs";import{u as r}from"./utils-8lzafE49.mjs";import{d as i,f as a,p as o,t as s}from"./routes-_I_8PQYF.mjs";import c from"node:path";import l from"node:fs";const u=1200;function d(e){return typeof e==`string`?[e]:Array.isArray(e)?e.flatMap(d):e&&typeof e==`object`?Object.values(e).flatMap(d):[]}const f=new Set([`title`,`description`,`permalink`,`sidebarPosition`,`sidebarLabel`,`sidebarHidden`,`hidden`,`category`,`order`,`badge`,`icon`,`date`,`lastUpdated`,`groupTitle`,`groupPosition`,`seo`]);function p(e,t){let n=e.replace(/\s+/g,` `).trim();return n.length>t?n.slice(0,t).trim():n}function m(e,t){let n=[],r=e.toLocaleLowerCase(),i=0;for(let e of t.slice(0,100)){let t=e.text.trim();if(!t)continue;let a=r.indexOf(t.toLocaleLowerCase(),i);if(a<0){n.push({heading:e,body:``});continue}let o=a+t.length;n.push({heading:e,start:o,body:``}),i=o}return n.map((t,r)=>{if(t.start===void 0)return t;let i=n[r+1]?.start??e.length;return{heading:t.heading,body:p(e.slice(t.start,i),Math.max(0,u-t.heading.text.length-4))}})}function h(e){let t=[];for(let n of e){let e=``;n.frontmatter&&(e=d(Object.entries(n.frontmatter).filter(([e])=>!f.has(e)).map(([e,t])=>t)).join(` `));let r=n._content||``,i=p(e?`${r} ${e}`:r,2e3),a=n.headings?m(r,n.headings):[];if(t.push({id:n.path,title:n.title,content:i,url:n.path,display:n.groupTitle?`${n.groupTitle} > ${n.title}`:n.title,locale:n.locale,version:n.version}),n.headings){let e=6e3;for(let r of a){let{heading:i}=r,a=`${i.text} in ${n.title}`,o=p(r.body?`${a} ${r.body}`:a,Math.min(u,e));if(o&&(t.push({id:`${n.path}#${i.id}`,title:i.text,content:o,url:`${n.path}#${i.id}`,display:`${n.title} > ${i.text}`,locale:n.locale,version:n.version}),e=Math.max(0,e-o.length)),e===0)break}}}return t}function g(e){return{path:e.path,filePath:e.filePath,title:e.title,description:e.description||``,sidebarPosition:e.sidebarPosition,badge:e.badge,icon:e.icon,headings:e.headings||[],frontmatter:e.frontmatter,locale:e.locale,version:e.version,tab:e.tab,collection:e.collection,tags:e.tags,author:e.author,draft:e.draft,excerpt:e.excerpt,coverImage:e.coverImage,group:e.group,groupTitle:e.groupTitle,groupPosition:e.groupPosition,groupIcon:e.groupIcon,subRouteGroup:e.subRouteGroup,seo:e.seo,date:e.date,lastUpdated:e.lastUpdated,category:e.category,order:e.order,sidebarLabel:e.sidebarLabel,sidebarHidden:e.sidebarHidden,slugParts:e.slugParts}}const _=new Set([`apikey`,`authorization`,`credential`,`credentials`,`password`,`privatekey`,`secret`,`secretkey`,`token`]);function v(e){return _.has(e.toLowerCase().replace(/[^a-z0-9]/g,``))}function y(e,t=0){return t>10||typeof e!=`object`||!e?e:Array.isArray(e)?e.map(e=>y(e,t+1)):Object.fromEntries(Object.entries(e).filter(([e])=>!v(e)).map(([e,n])=>[e,y(n,t+1)]))}function b(e){return{name:e.name,...e.metadata?{metadata:y(e.metadata)}:{}}}function x(e){let t=e.lastIndexOf(`#`);return t===-1?{modulePath:e,exportName:`default`}:{modulePath:e.slice(0,t),exportName:e.slice(t+1)||`default`}}function S(e){let t={};for(let n of e)for(let[e,r]of Object.entries(n.client?.slots??{}))t[e]??=[],t[e].push(r);return`const slots = {\n${Object.entries(t).map(([e,t])=>{let n=t.map((t,n)=>{let{modulePath:r,exportName:i}=x(t);return`{ id: ${JSON.stringify(`${e}:${n}`)}, load: () => import(${JSON.stringify(r)}).then(module => ({ default: module[${JSON.stringify(i)}] || module.default })) }`});return` ${JSON.stringify(e)}: [${n.join(`, `)}]`}).join(`,
7
7
  `)}\n};\nexport default slots;\n`}function C(e){return{routeCacheContext:e,routeGenerationFingerprint:void 0,directoryMetaCache:null,routesDataMap:new Map,collectionsDataMap:new Map,searchDataMap:new Map,serializedSearchData:null,serializedPageSourceData:null}}const w=C();function T(e){return e??w}function E(e){let t=T(e);t.directoryMetaCache=null,t.routeGenerationFingerprint=void 0,t.routeCacheVariant=void 0,t.routesDataMap.clear(),t.collectionsDataMap.clear(),t.searchDataMap.clear(),t.serializedSearchData=null,t.serializedPageSourceData=null}function D(e,t){return(!t.routeCacheContext||t.routeCacheContext.disposed)&&(t.routeCacheContext=i(e),t.routeCacheVariant=void 0,t.routeGenerationFingerprint=void 0,t.routesDataMap.clear(),t.collectionsDataMap.clear(),t.searchDataMap.clear(),t.serializedSearchData=null,t.serializedPageSourceData=null),t.routeCacheContext}async function O(e,t,n,r){let i=T(n),c=D(e,i),l=o(t),u=(r?.fingerprint===l&&c.variants.get(l)===r?r:void 0)??a(c,l);i.routeCacheVariant=u,i.routeGenerationFingerprint=l;let d=await s(e,t,void 0,!1,c,u);i.routesDataMap.clear();for(let e of d)i.routesDataMap.set(e.path,e);k(i)}function k(e){let t=T(e),n=Array.from(t.routesDataMap.values()),r=h(n);t.searchDataMap.clear(),t.serializedSearchData=null,t.serializedPageSourceData=null;for(let e of r)t.searchDataMap.set(e.id,e);t.collectionsDataMap.clear();for(let e of n)if(e.collection){let n={path:e.path,title:e.title,date:e.date,excerpt:e.excerpt,tags:e.tags,author:e.author,coverImage:e.coverImage,filePath:e.filePath,locale:e.locale,version:e.version,frontmatter:e.frontmatter,draft:e.frontmatter?.draft===!0,collection:e.collection};t.collectionsDataMap.set(e.filePath,n)}t.serializedSearchData=JSON.stringify(N(t)),t.serializedPageSourceData=JSON.stringify(P(t))}async function A(e,t,n){let r=T(n);D(e,r);let i=o(t);(r.routesDataMap.size===0||r.routeGenerationFingerprint!==i)&&(r.routesDataMap.clear(),r.collectionsDataMap.clear(),r.searchDataMap.clear(),r.serializedSearchData=null,r.serializedPageSourceData=null,await O(e,t,r))}function j(e){let t=T(e),n={},r=Array.from(t.collectionsDataMap.values()).sort((e,t)=>{let n=e=>{if(!e)return-1/0;let t=new Date(e).getTime();return Number.isFinite(t)?t:-1/0},r=n(e.date),i=n(t.date)-r;return i===0?e.path.localeCompare(t.path):i});for(let e of r){let t=e.collection;t&&(n[t]||(n[t]=[]),n[t].push(e))}return n}function M(e,t=e=>e){let n=Array.from(e.values(),t).sort((e,t)=>{let n=e=>{if(typeof e!=`object`||!e)return String(e);let t=e;return`${String(t.path||``)}\u0000${String(t.id||``)}\u0000${String(t.filePath||``)}`};return n(e).localeCompare(n(t))});return`export default ${JSON.stringify(n)};`}function N(e){return Array.from(T(e).searchDataMap.values()).sort((e,t)=>e.id.localeCompare(t.id))}function P(e){let t=T(e),n={};for(let e of t.routesDataMap.values()){let t=e;t.path&&t._rawContent&&(n[t.path]=t._rawContent)}return Object.fromEntries(Object.entries(n).sort(([e],[t])=>e.localeCompare(t)))}function F(e){let t=T(e);return t.serializedSearchData===null&&(t.serializedSearchData=JSON.stringify(N(t))),t.serializedSearchData}function I(e){let t=T(e);return t.serializedPageSourceData===null&&(t.serializedPageSourceData=JSON.stringify(P(t))),t.serializedPageSourceData}function L(e){return`export default ${JSON.stringify(e)};`}async function R(e,t,n,r,i){let a=T(n);r&&(a.routeCacheContext=r),i&&(a.routeCacheVariant=i);let s=o(t);a.routeGenerationFingerprint!==s&&(a.routesDataMap.clear(),a.collectionsDataMap.clear(),a.searchDataMap.clear(),a.serializedSearchData=null,a.serializedPageSourceData=null);let c=new Map(a.routesDataMap),l=new Map(a.collectionsDataMap),u=new Map(a.searchDataMap);await O(e,t,a);let d={routes:{updated:[],deleted:[]},collections:{updated:[],deleted:[]},search:{updated:[],deleted:[]}};for(let[e,t]of a.routesDataMap){let n=c.get(e);(!n||JSON.stringify(n)!==JSON.stringify(t))&&d.routes.updated.push(g(t))}for(let e of c.keys())a.routesDataMap.has(e)||d.routes.deleted.push(e);for(let[e,t]of a.collectionsDataMap){let n=l.get(e);(!n||JSON.stringify(n)!==JSON.stringify(t))&&d.collections.updated.push(t)}for(let e of l.keys())a.collectionsDataMap.has(e)||d.collections.deleted.push(e);for(let[e,t]of a.searchDataMap){let n=u.get(e);(!n||JSON.stringify(n)!==JSON.stringify(t))&&d.search.updated.push(t)}for(let e of u.keys())a.searchDataMap.has(e)||d.search.deleted.push(e);return d}function z(i,a,o,s,u,d){let f=u?.virtualModuleRegistry??n,p=T(d);return{name:`vite-plugin-boltdocs-virtual-modules`,resolveId(e){if(e.includes(`boltdocs-entry`)||e===`virtual:boltdocs-entry`||e===`boltdocs/entry`||e===`boltdocs-entry`||e===`\0virtual:boltdocs-entry`||e===`\0virtual:boltdocs-entry.tsx`)return`\0virtual:boltdocs-entry.tsx`;if(e===`virtual:boltdocs-client-registry`||e===`\0virtual:boltdocs-client-registry`)return`\0virtual:boltdocs-client-registry`;if(e.includes(`boltdocs-client`)||e===`virtual:boltdocs-client`||e===`boltdocs/client`||e===`boltdocs-client`||e===`\0virtual:boltdocs-client.mjs`)return`\0virtual:boltdocs-client.mjs`;if(e.startsWith(`\0`)){let t=e.slice(1);if(!t.startsWith(`virtual:boltdocs-`)&&f?.has(t))return e}else if(!e.startsWith(`virtual:boltdocs-`)&&f?.has(e))return`\0${e}`;return e.startsWith(`virtual:boltdocs-`)?`\0${e}`:e.startsWith(`\0virtual:boltdocs-`)?e:null},async load(n,u){let d=a(),m=n.startsWith(`\0`)?n.slice(1):n;if(!m.includes(`boltdocs-entry.tsx`)&&!m.includes(`boltdocs-client.mjs`)&&!m.startsWith(`virtual:boltdocs-`)&&f?.has(m)){let e=f?.get(m);if(!e)return null;try{let t=await e.loader();if(typeof t!=`string`)throw Error(`[boltdocs] Plugin virtual module '${m}' loader must return a string source code, got ${typeof t}.`);return t}catch(e){throw Error(`[boltdocs] Plugin virtual module '${m}' failed to load: ${e instanceof Error?e.message:String(e)}`)}}if(n.includes(`boltdocs-entry.tsx`)||n===`\0virtual:boltdocs-entry`){let e=this.environment?.config?.consumer,n=o(),r=e===void 0?!!n?.build?.ssr:e!==`client`;return t({...i,ssr:r,useCompiledPages:n?.command===`build`},d)}if(n.includes(`boltdocs-client.mjs`)||n===`\0virtual:boltdocs-client.ts`||n===`virtual:boltdocs-client`){let t=e,n=t;for(;t!==c.parse(t).root;){if(l.existsSync(c.join(t,`package.json`))&&JSON.parse(l.readFileSync(c.join(t,`package.json`),`utf-8`)).name===`boltdocs`){n=t;break}t=c.dirname(t)}let i=c.join(n,`src/client/index.ts`),a=c.join(n,`dist/client/index.js`);return`export * from '${r(l.existsSync(i)?i:a)}';`}if(!n.startsWith(`\0virtual:boltdocs-`))return;let h=n.replace(`\0virtual:boltdocs-`,``).replace(/\.tsx?$/,``);if(h===`routes`)return await A(s,d,p),M(p.routesDataMap,g);if(h===`client-registry`)return S(d?.plugins??[]);if(h===`collections`)return await A(s,d,p),L(j(p));if(h===`config`){await A(s,d,p);let e=p.routeCacheVariant?.directoryMeta||{};p.directoryMetaCache=e;let t=[...new Set(Array.from(p.routesDataMap.values()).map(e=>e.collection).filter(e=>!!e))].sort((e,t)=>e.localeCompare(t)),n=d?.collections,r=n?{...n,labels:{...n.labels||{},...Object.fromEntries(t.map(e=>[e,n.labels?.[e]??e]))}}:t.length>0?t:void 0,i={base:d?.base,theme:d?.theme,i18n:d?.i18n,versions:d?.versions,siteUrl:d?.siteUrl,integrations:d?.integrations,collections:r,seo:d?.seo,experimental:d?.experimental,plugins:d?.plugins?.map(b),directoryMeta:e};return`export default ${JSON.stringify(i)};`}if(h===`entry`){let e=this,n=o(),r=e.environment?.config?.consumer,a=r===void 0?!!(u?.ssr??n?.build?.ssr):r!==`client`;return t({...i,ssr:a,useCompiledPages:n?.command===`build`},d)}if(h===`mdx-components`){let e=[`tsx`,`ts`,`jsx`,`js`],t=null;for(let n of e){let e=c.resolve(s,`mdx-components.${n}`);if(l.existsSync(e)){t=e;break}}let n={};if(d?.plugins)for(let e of d.plugins)e.components&&Object.assign(n,e.components);let i=Object.entries(n),a=i.map(([e,t],n)=>`import * as _pluginCompMod_${n} from '${t}';`).join(`
8
8
  `),o=i.map(([e],t)=>`${JSON.stringify(e)}: _pluginCompMod_${t}[${JSON.stringify(e)}] || Reflect.get(_pluginCompMod_${t}, "default") || _pluginCompMod_${t}`).join(`,
9
9
  `);if(t){let e=r(t);return`${a}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "boltdocs",
3
- "version": "3.3.6",
3
+ "version": "3.4.0",
4
4
  "description": "A lightweight documentation generator for React projects.",
5
5
  "main": "dist/node/index.mjs",
6
6
  "module": "dist/node/index.mjs",
@@ -85,6 +85,7 @@
85
85
  "license": "MIT",
86
86
  "dependencies": {
87
87
  "@bdocs/dui": "^0.6.0",
88
+ "@shikijs/core": "3.23.0",
88
89
  "@shikijs/engine-oniguruma": "3.23.0",
89
90
  "@shikijs/langs": "3.23.0",
90
91
  "@shikijs/themes": "3.23.0",
@@ -108,10 +109,11 @@
108
109
  "tailwind-merge": "3.5.0",
109
110
  "vite": "8.1.5",
110
111
  "zod": "4.3.6",
112
+ "@bdocs/contracts": "0.1.0",
111
113
  "@bdocs/parser": "1.2.0",
112
114
  "@bdocs/plugin-image-optimizer": "0.2.2",
113
- "@bdocs/processor-satteri": "0.3.4",
114
- "@bdocs/ssg": "0.4.4",
115
+ "@bdocs/processor-satteri": "0.4.0",
116
+ "@bdocs/ssg": "0.5.0",
115
117
  "@bdocs/unist-utils": "0.2.1"
116
118
  },
117
119
  "peerDependencies": {