boltdocs 2.5.5 → 2.5.6

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 (96) hide show
  1. package/bin/boltdocs.js +1 -1
  2. package/dist/cache-Cr8W2zgZ.cjs +6 -0
  3. package/dist/cache-DFdakSmR.mjs +6 -0
  4. package/dist/client/index.d.mts +1276 -861
  5. package/dist/client/index.d.ts +1276 -861
  6. package/dist/client/index.js +6 -1
  7. package/dist/client/index.mjs +6 -1
  8. package/dist/client/ssr.cjs +6 -0
  9. package/dist/client/ssr.d.cts +80 -0
  10. package/dist/client/ssr.d.mts +63 -61
  11. package/dist/client/ssr.mjs +6 -1
  12. package/dist/client/theme/neutral.css +388 -0
  13. package/dist/node/cli-entry.cjs +8 -0
  14. package/dist/node/cli-entry.d.cts +2 -0
  15. package/dist/node/cli-entry.d.mts +2 -1
  16. package/dist/node/cli-entry.mjs +7 -5
  17. package/dist/node/index.cjs +6 -0
  18. package/dist/node/index.d.cts +574 -0
  19. package/dist/node/index.d.mts +385 -378
  20. package/dist/node/index.mjs +6 -1
  21. package/dist/node-CWXme96p.mjs +73 -0
  22. package/dist/node-VYfhzGrh.cjs +73 -0
  23. package/dist/package-BY8Jd2j4.cjs +6 -0
  24. package/dist/package-OFZf0s2j.mjs +6 -0
  25. package/dist/search-dialog-BeNyI_KQ.mjs +6 -0
  26. package/dist/search-dialog-dYsCAk5S.js +6 -0
  27. package/dist/use-search-D25n0PrV.mjs +6 -0
  28. package/dist/use-search-WuzdH1cJ.js +6 -0
  29. package/package.json +16 -12
  30. package/src/client/app/index.tsx +15 -12
  31. package/src/client/components/default-layout.tsx +21 -19
  32. package/src/client/hooks/use-i18n.ts +1 -1
  33. package/src/client/hooks/use-routes.ts +1 -1
  34. package/src/client/hooks/use-version.ts +1 -1
  35. package/src/client/store/boltdocs-context.tsx +119 -0
  36. package/CHANGELOG.md +0 -98
  37. package/dist/cache-3FOEPC2P.mjs +0 -1
  38. package/dist/chunk-5B5NKOW6.mjs +0 -77
  39. package/dist/chunk-J2PTDWZM.mjs +0 -1
  40. package/dist/chunk-TP5KMRD3.mjs +0 -1
  41. package/dist/chunk-Y4RE5KI7.mjs +0 -1
  42. package/dist/client/ssr.d.ts +0 -78
  43. package/dist/client/ssr.js +0 -1
  44. package/dist/node/cli-entry.d.ts +0 -1
  45. package/dist/node/cli-entry.js +0 -82
  46. package/dist/node/index.d.ts +0 -567
  47. package/dist/node/index.js +0 -77
  48. package/dist/package-QFIAETHR.mjs +0 -1
  49. package/dist/search-dialog-O6VLVSOA.mjs +0 -1
  50. package/src/client/store/use-boltdocs-store.ts +0 -44
  51. package/src/node/cache.ts +0 -408
  52. package/src/node/cli/build.ts +0 -53
  53. package/src/node/cli/dev.ts +0 -22
  54. package/src/node/cli/doctor.ts +0 -243
  55. package/src/node/cli/index.ts +0 -9
  56. package/src/node/cli/ui.ts +0 -54
  57. package/src/node/cli-entry.ts +0 -24
  58. package/src/node/config.ts +0 -382
  59. package/src/node/errors.ts +0 -44
  60. package/src/node/index.ts +0 -84
  61. package/src/node/mdx/cache.ts +0 -12
  62. package/src/node/mdx/highlighter.ts +0 -47
  63. package/src/node/mdx/index.ts +0 -122
  64. package/src/node/mdx/rehype-shiki.ts +0 -62
  65. package/src/node/mdx/remark-code-meta.ts +0 -35
  66. package/src/node/mdx/remark-shiki.ts +0 -61
  67. package/src/node/plugin/entry.ts +0 -87
  68. package/src/node/plugin/html.ts +0 -99
  69. package/src/node/plugin/index.ts +0 -478
  70. package/src/node/plugin/types.ts +0 -9
  71. package/src/node/plugins/index.ts +0 -17
  72. package/src/node/plugins/plugin-errors.ts +0 -62
  73. package/src/node/plugins/plugin-lifecycle.ts +0 -117
  74. package/src/node/plugins/plugin-sandbox.ts +0 -59
  75. package/src/node/plugins/plugin-store.ts +0 -54
  76. package/src/node/plugins/plugin-types.ts +0 -107
  77. package/src/node/plugins/plugin-validator.ts +0 -105
  78. package/src/node/routes/cache.ts +0 -28
  79. package/src/node/routes/index.ts +0 -293
  80. package/src/node/routes/parser.ts +0 -262
  81. package/src/node/routes/sorter.ts +0 -42
  82. package/src/node/routes/types.ts +0 -61
  83. package/src/node/schema/config.ts +0 -195
  84. package/src/node/schema/frontmatter.ts +0 -17
  85. package/src/node/search/index.ts +0 -55
  86. package/src/node/security/constants/index.ts +0 -10
  87. package/src/node/security/csp.ts +0 -31
  88. package/src/node/security/headers.ts +0 -27
  89. package/src/node/ssg/index.ts +0 -205
  90. package/src/node/ssg/meta.ts +0 -33
  91. package/src/node/ssg/options.ts +0 -15
  92. package/src/node/ssg/robots.ts +0 -53
  93. package/src/node/ssg/sitemap.ts +0 -55
  94. package/src/node/utils.ts +0 -349
  95. package/tsconfig.json +0 -26
  96. package/tsup.config.ts +0 -56
@@ -0,0 +1,388 @@
1
+ @theme {
2
+ --font-display: "Inter", "ui-sans-serif", "system-ui", sans-serif;
3
+ --font-sans: "Inter", "ui-sans-serif", "system-ui", sans-serif;
4
+ --font-mono:
5
+ "JetBrains Mono", "ui-monospace", "SFMono-Regular", Menlo, Monaco, Consolas,
6
+ "liberation mono", "courier new", monospace;
7
+
8
+ --breakpoint-3xl: 120rem;
9
+
10
+ --color-primary-50: oklch(0.985 0.012 265.8);
11
+ --color-primary-100: oklch(0.92 0.045 265.8);
12
+ --color-primary-200: oklch(0.84 0.085 265.8);
13
+ --color-primary-300: oklch(0.74 0.125 265.8);
14
+ --color-primary-400: oklch(0.64 0.165 265.8);
15
+ --color-primary-500: oklch(0.54 0.195 265.8);
16
+ --color-primary-600: oklch(0.45 0.165 265.8);
17
+ --color-primary-700: oklch(0.36 0.135 265.8);
18
+ --color-primary-800: oklch(0.27 0.095 265.8);
19
+ --color-primary-900: oklch(0.15 0.045 265.8);
20
+
21
+ /* Neutral Gray Palette */
22
+ --color-neutral-50: oklch(0.98 0 0);
23
+ --color-neutral-100: oklch(0.96 0 0);
24
+ --color-neutral-200: oklch(0.92 0 0);
25
+ --color-neutral-300: oklch(0.84 0 0);
26
+ --color-neutral-400: oklch(0.7 0 0);
27
+ --color-neutral-500: oklch(0.55 0 0);
28
+ --color-neutral-600: oklch(0.4 0 0);
29
+ --color-neutral-700: oklch(0.25 0 0);
30
+ --color-neutral-800: oklch(0.15 0 0);
31
+ --color-neutral-900: oklch(0.1 0 0);
32
+ --color-neutral-950: oklch(0.05 0 0);
33
+
34
+ /* Semantic Status Colors */
35
+ --color-danger-500: oklch(0.63 0.24 27);
36
+ --color-success-500: oklch(0.72 0.19 150);
37
+ --color-warning-500: oklch(0.78 0.17 75);
38
+ --color-info-500: oklch(0.62 0.19 260);
39
+
40
+ /* Shared Properties */
41
+ --radius-sm: 0.375rem;
42
+ --radius-md: 0.5rem;
43
+ --radius-lg: 0.75rem;
44
+ --radius-xl: 1rem;
45
+ --radius-2xl: 1.5rem;
46
+ --radius-full: 99999rem;
47
+
48
+ --ease-fluid: cubic-bezier(0.3, 0, 0, 1);
49
+ --ease-snappy: cubic-bezier(0.2, 0, 0, 1);
50
+
51
+ /* Semantic Colors - Default (Light) */
52
+ --color-bg-main: var(--color-neutral-50);
53
+ --color-bg-surface: var(--color-neutral-100);
54
+ --color-bg-muted: var(--color-neutral-200);
55
+ --color-text-main: var(--color-neutral-900);
56
+ --color-text-muted: var(--color-neutral-500);
57
+ --color-text-dim: var(--color-neutral-400);
58
+ --color-border-subtle: var(--color-neutral-200);
59
+ --color-border-strong: var(--color-neutral-300);
60
+ --color-code-bg: var(--color-neutral-100);
61
+ --color-code-text: var(--color-neutral-800);
62
+
63
+ /* Semantic Colors - Dark Override (handled via standard CSS overrides below the @theme block) */
64
+
65
+ /* Spacing and Dimensions */
66
+ --spacing-navbar: 3.5rem;
67
+ --spacing-sidebar: 16rem;
68
+ --spacing-toc: 14rem;
69
+ --spacing-content-max: 54rem;
70
+
71
+ @keyframes pulse {
72
+ 0%,
73
+ 100% {
74
+ opacity: 1;
75
+ }
76
+ 50% {
77
+ opacity: 0.5;
78
+ }
79
+ }
80
+
81
+ @keyframes fade-in {
82
+ from {
83
+ opacity: 0;
84
+ transform: translateY(10px);
85
+ }
86
+ to {
87
+ opacity: 1;
88
+ transform: translateY(0);
89
+ }
90
+ }
91
+ }
92
+
93
+ .animate-pulse {
94
+ animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
95
+ }
96
+
97
+ .animate-fade-in {
98
+ animation: fade-in 0.5s ease-out forwards;
99
+ }
100
+
101
+ :root[data-theme="dark"],
102
+ :root:not(.theme-light) {
103
+ --color-bg-main: var(--color-neutral-950);
104
+ --color-bg-surface: var(--color-neutral-900);
105
+ --color-bg-muted: var(--color-neutral-800);
106
+ --color-text-main: var(--color-neutral-50);
107
+ --color-text-muted: var(--color-neutral-400);
108
+ --color-text-dim: var(--color-neutral-500);
109
+ --color-border-subtle: var(--color-neutral-800);
110
+ --color-border-strong: var(--color-neutral-700);
111
+ --color-code-bg: var(--color-neutral-900);
112
+ --color-code-text: var(--color-neutral-200);
113
+ }
114
+
115
+ @layer base {
116
+ *,
117
+ *::before,
118
+ *::after {
119
+ box-sizing: border-box;
120
+ }
121
+
122
+ html,
123
+ body {
124
+ margin: 0;
125
+ padding: 0;
126
+ min-height: 100%;
127
+ overflow-x: hidden;
128
+ }
129
+
130
+ body {
131
+ @apply bg-bg-main text-text-main antialiased;
132
+ font-family: var(--font-sans);
133
+ line-height: 1.7;
134
+ }
135
+
136
+ a {
137
+ text-decoration: none;
138
+ }
139
+
140
+ /* Scroll-margin-top for anchor scrolling */
141
+ h1,
142
+ h2,
143
+ h3,
144
+ h4,
145
+ h5,
146
+ h6 {
147
+ scroll-margin-top: 6rem;
148
+ }
149
+
150
+ /* Scrollbar */
151
+ ::-webkit-scrollbar {
152
+ width: 6px;
153
+ height: 6px;
154
+ }
155
+ ::-webkit-scrollbar-track {
156
+ background: transparent;
157
+ }
158
+ ::-webkit-scrollbar-thumb {
159
+ @apply bg-neutral-300 dark:bg-neutral-700 rounded-full;
160
+ }
161
+ ::-webkit-scrollbar-thumb:hover {
162
+ @apply bg-neutral-400 dark:bg-neutral-600;
163
+ }
164
+
165
+ /* ═══ Content Area ═══ */
166
+ .boltdocs-content {
167
+ scrollbar-width: none;
168
+ scroll-behavior: smooth;
169
+ }
170
+ .boltdocs-content::-webkit-scrollbar {
171
+ display: none;
172
+ }
173
+
174
+ /* ═══ Markdown Typography ═══ */
175
+ .boltdocs-page {
176
+ position: relative;
177
+ padding-top: 1rem;
178
+ padding-bottom: 8rem;
179
+ }
180
+
181
+ .boltdocs-page h1 {
182
+ font-size: 2.5rem;
183
+ margin: 0 0 1rem;
184
+ font-weight: 800;
185
+ letter-spacing: -0.04em;
186
+ color: var(--color-text-main);
187
+ line-height: 1.2;
188
+ }
189
+ .boltdocs-page h1 + p {
190
+ color: var(--color-text-muted);
191
+ font-size: 1.125rem;
192
+ margin-bottom: 2.5rem;
193
+ line-height: 1.6;
194
+ }
195
+ .boltdocs-page h2 {
196
+ font-size: 1.75rem;
197
+ margin-top: 3.5rem;
198
+ margin-bottom: 1.25rem;
199
+ font-weight: 700;
200
+ color: var(--color-text-main);
201
+ padding-bottom: 0.5rem;
202
+ border-bottom: 1px solid var(--color-border-subtle);
203
+ scroll-margin-top: 6rem;
204
+ letter-spacing: -0.02em;
205
+ }
206
+ .boltdocs-page h3 {
207
+ font-size: 1.25rem;
208
+ margin-top: 2.5rem;
209
+ margin-bottom: 1rem;
210
+ font-weight: 600;
211
+ color: var(--color-text-main);
212
+ scroll-margin-top: 6rem;
213
+ letter-spacing: -0.01em;
214
+ }
215
+ .boltdocs-page p {
216
+ margin-top: 0;
217
+ margin-bottom: 1.25rem;
218
+ color: var(--color-text-muted);
219
+ line-height: 1.8;
220
+ }
221
+ .boltdocs-page a {
222
+ color: var(--color-primary-500);
223
+ text-decoration: none;
224
+ transition: color 0.2s;
225
+ font-weight: 500;
226
+ }
227
+ .boltdocs-page a:hover {
228
+ color: var(--color-primary-400);
229
+ text-decoration: underline;
230
+ }
231
+ .boltdocs-page ul,
232
+ .boltdocs-page ol {
233
+ margin-top: 0;
234
+ margin-bottom: 1.5rem;
235
+ padding-left: 1.5rem;
236
+ color: var(--color-text-muted);
237
+ }
238
+ .boltdocs-page li {
239
+ margin-bottom: 0.5rem;
240
+ line-height: 1.8;
241
+ }
242
+ .boltdocs-page strong {
243
+ color: var(--color-text-main);
244
+ font-weight: 700;
245
+ }
246
+ .boltdocs-page blockquote {
247
+ margin: 2rem 0;
248
+ padding: 1rem 1.5rem;
249
+ border-left: 4px solid var(--color-primary-500);
250
+ background-color: var(--color-primary-500);
251
+ background-color: color-mix(
252
+ in oklch,
253
+ var(--color-primary-500),
254
+ transparent 93%
255
+ );
256
+ border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
257
+ color: var(--color-text-muted);
258
+ font-style: italic;
259
+ }
260
+ .boltdocs-page blockquote p {
261
+ margin: 0;
262
+ }
263
+ .boltdocs-page hr {
264
+ border: none;
265
+ border-top: 1px solid var(--color-border-subtle);
266
+ margin: 3rem 0;
267
+ }
268
+ .boltdocs-page img {
269
+ max-width: 100%;
270
+ height: auto;
271
+ border-radius: var(--radius-lg);
272
+ margin: 2rem 0;
273
+ display: block;
274
+ box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
275
+ }
276
+ .boltdocs-page table {
277
+ width: 100%;
278
+ border-collapse: collapse;
279
+ margin: 2rem 0;
280
+ font-size: 0.875rem;
281
+ }
282
+ .boltdocs-page th {
283
+ text-align: left;
284
+ padding: 0.75rem 1rem;
285
+ border-bottom: 2px solid var(--color-border-subtle);
286
+ color: var(--color-text-main);
287
+ font-weight: 700;
288
+ }
289
+ .boltdocs-page td {
290
+ padding: 0.75rem 1rem;
291
+ border-bottom: 1px solid var(--color-border-subtle);
292
+ color: var(--color-text-muted);
293
+ }
294
+ .boltdocs-page tr:hover td {
295
+ background-color: var(--color-bg-surface);
296
+ }
297
+ .boltdocs-page :not(pre) > code {
298
+ background-color: var(--color-bg-surface);
299
+ padding: 0.15rem 0.45rem;
300
+ border-radius: 5px;
301
+ font-family: var(--font-mono);
302
+ font-size: 0.85em;
303
+ color: var(--color-primary-400);
304
+ border: 1px solid var(--color-border-subtle);
305
+ }
306
+ .boltdocs-page pre {
307
+ margin: 1.5rem 0;
308
+ border-radius: var(--radius-md);
309
+ overflow-x: auto;
310
+ font-family: var(--font-mono);
311
+ font-size: 0.8125rem;
312
+ line-height: 1.7;
313
+ background-color: var(--color-code-bg);
314
+ color: var(--color-code-text);
315
+ border: 1px solid var(--color-border-subtle);
316
+ }
317
+ .boltdocs-page pre > code {
318
+ display: grid;
319
+ padding: 1rem;
320
+ background-color: transparent;
321
+ border: none;
322
+ color: inherit;
323
+ font-size: inherit;
324
+ }
325
+ .boltdocs-page pre > code .line {
326
+ padding: 0 1.25rem;
327
+ }
328
+ .boltdocs-page pre > code .line.highlighted {
329
+ background-color: oklch(0.6 0.22 280 / 10%);
330
+ border-left: 2px solid var(--color-primary-500);
331
+ }
332
+
333
+ @media (max-width: 768px) {
334
+ .boltdocs-page h1 {
335
+ font-size: 1.75rem;
336
+ }
337
+ }
338
+
339
+ /* ═══ Header Anchors ═══ */
340
+ .header-anchor {
341
+ margin-left: 0.5rem;
342
+ color: var(--color-text-dim);
343
+ opacity: 0;
344
+ transition: opacity 0.2s;
345
+ text-decoration: none;
346
+ font-weight: 400;
347
+ }
348
+ .boltdocs-page h2:hover .header-anchor,
349
+ .boltdocs-page h3:hover .header-anchor {
350
+ opacity: 1;
351
+ }
352
+ .header-anchor:hover {
353
+ color: var(--color-primary-500);
354
+ }
355
+ .boltdocs-heading {
356
+ display: flex;
357
+ align-items: center;
358
+ }
359
+ .boltdocs-heading .header-anchor {
360
+ display: inline-flex;
361
+ align-items: center;
362
+ margin-left: 0.5rem;
363
+ color: var(--color-text-dim);
364
+ opacity: 0;
365
+ transition: opacity 0.2s;
366
+ text-decoration: none;
367
+ }
368
+ .boltdocs-heading:hover .header-anchor {
369
+ opacity: 1;
370
+ }
371
+
372
+ /* ═══ Shiki Dual Theme ═══ */
373
+ .shiki-wrapper .shiki.shiki-themes {
374
+ background-color: transparent !important;
375
+ color: var(--shiki-light) !important;
376
+ }
377
+ .shiki-wrapper .shiki.shiki-themes span {
378
+ color: var(--shiki-light);
379
+ }
380
+ :root[data-theme="dark"] .shiki-wrapper .shiki.shiki-themes,
381
+ :root:not(.theme-light) .shiki-wrapper .shiki.shiki-themes {
382
+ color: var(--shiki-dark) !important;
383
+ }
384
+ :root[data-theme="dark"] .shiki-wrapper .shiki.shiki-themes span,
385
+ :root:not(.theme-light) .shiki-wrapper .shiki.shiki-themes span {
386
+ color: var(--shiki-dark) !important;
387
+ }
388
+ }
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Boltdocs - https://boltdocs.vercel.app
4
+ * Copyright (c) 2026 Jesus Alcala
5
+ * Licensed under the MIT License.
6
+ */
7
+ const e=require(`../cache-Cr8W2zgZ.cjs`),t=require(`../node-VYfhzGrh.cjs`);let n=require(`vite`),r=require(`fast-glob`);r=e.S(r);let i=require(`fs`);i=e.S(i);let a=require(`path`);a=e.S(a);let o=require(`cac`);o=e.S(o);var s=e.x({colors:()=>c,error:()=>d,formatLog:()=>l,info:()=>u,success:()=>f});const c={reset:`\x1B[0m`,bold:`\x1B[1m`,red:`\x1B[31m`,green:`\x1B[32m`,yellow:`\x1B[33m`,blue:`\x1B[34m`,cyan:`\x1B[36m`,gray:`\x1B[90m`};function l(e,t=``){return`${t}${c.bold}[boltdocs]${c.reset} ${e}${c.reset}`}function u(e){console.log(l(e))}function d(e,t){console.error(l(e,c.red)),t&&console.error(t)}function f(e){console.log(l(e,c.green))}async function p(e=process.cwd()){try{let r=await(0,n.createServer)(await t.n(e,`development`));await r.listen(),r.printUrls(),r.bindCLIShortcuts({print:!0})}catch(e){d(`Failed to start dev server:`,e),process.exit(1)}}async function m(e=process.cwd()){let r=!1,o=a.default.resolve(e,`index.html`);try{if(!i.default.existsSync(o)){let n=await t.v(`docs`,e);i.default.writeFileSync(o,t.h(n),`utf-8`),r=!0}await(0,n.build)(await t.n(e,`production`)),f(`Build completed successfully.`)}catch(e){d(`Build failed:`,e),process.exit(1)}finally{r&&i.default.existsSync(o)&&i.default.unlinkSync(o)}}async function h(e=process.cwd()){try{(await(0,n.preview)(await t.n(e,`production`))).printUrls()}catch(e){d(`Failed to start preview server:`,e),process.exit(1)}}async function g(n=process.cwd()){let{colors:o}=s;u(`${o.bold}Running documentation health check...${o.reset}\n`);let c=performance.now();try{let s=await t.v(`docs`,n),l=a.default.resolve(n,`docs`);i.default.existsSync(l)||(d(`Documentation directory not found at ${l}`),process.exit(1));let p=await(0,r.default)([`**/*.md`,`**/*.mdx`],{cwd:l,absolute:!0,suppressErrors:!0}),m=0,h=0,g=0,_=new Map,v=(e,t)=>{let n=a.default.relative(l,e),r=_.get(n);r||(r=[],_.set(n,r)),r.push(t),t.level===`high`?m++:t.level===`warning`?h++:t.level===`low`&&g++},y=`/docs`;for(let t of p){let{data:n,content:r}=e.p(t);n.title||v(t,{level:`warning`,message:`Missing "title" in frontmatter.`,suggestion:"Add `title: Your Title` to the YAML frontmatter at the top of the file."}),n.description||v(t,{level:`low`,message:`Missing "description" in frontmatter.`,suggestion:`Adding a description helps with SEO and search previews.`});let o=/\[.*?\]\((.*?)\)/g,s=/<a\s+[^>]*href=["']([^"']+)["'][^>]*>/g,c=[...r.matchAll(o),...r.matchAll(s)];for(let e of c){let n=e[1];if(!n||n.startsWith(`http`)||n.startsWith(`https`)||n.startsWith(`#`)||n.startsWith(`mailto:`)||n.startsWith(`tel:`)||(n=n.split(`#`)[0],!n))continue;let r;if(n.startsWith(`/`)){let e=n;(n.startsWith(y+`/`)||n===y)&&(e=n.substring(5)),r=a.default.join(l,e)}else r=a.default.resolve(a.default.dirname(t),n);let o=[``,`.md`,`.mdx`,`/index.md`,`/index.mdx`],s=!1;for(let e of o){let t=r+e;if(i.default.existsSync(t)&&i.default.statSync(t).isFile()){s=!0;break}}s||v(t,{level:`high`,message:`Broken internal link: "${n}"`,suggestion:`Ensure the file exists at "${r}". If it's a directory, ensure it has an "index.md" or "index.mdx".`})}}if(s.i18n){let{defaultLocale:t,locales:n}=s.i18n,r=Object.keys(n).filter(e=>e!==t);for(let n of p){let o=e.f(a.default.relative(l,n)).split(`/`);if(o[0]===t){let e=o.slice(1).join(`/`);for(let t of r){let r=[t,...o.slice(1)],s=a.default.join(l,...r);i.default.existsSync(s)||v(n,{level:`warning`,message:`Missing translation for locale "${t}"`,suggestion:`Create a translated version of this file at "${t}/${e}".`})}}}}if(_.size===0)f(`All documentation files are healthy!
8
+ `);else{for(let[e,t]of _.entries()){console.log(`📄 ${o.bold}${e}${o.reset}`);let n=t.sort((e,t)=>{let n={high:1,warning:2,low:3};return n[e.level]-n[t.level]});for(let e of n){let t=``,n=``;e.level===`high`?(t=`❌`,n=o.red):e.level===`warning`?(t=`⚠️`,n=o.yellow):(t=`ℹ️`,n=o.cyan),console.log(` ${n}${t} ${e.level.toUpperCase()}:${o.reset} ${e.message}`),e.suggestion&&console.log(` ${o.gray}💡 Suggestion: ${e.suggestion}${o.reset}`)}console.log(``)}console.log(`${o.bold}Summary:${o.reset}`),console.log(` ${o.red}${m} high-level errors${o.reset}`),console.log(` ${o.yellow}${h} warnings${o.reset}`),console.log(` ${o.cyan}${g} minor improvements${o.reset}\n`),m>0&&d(`HIGH ERROR: Fix these to ensure your documentation builds correctly.`),(h>0||g>0)&&u(`TIP: Address warnings and suggestions for premium quality docs.`),console.log(``)}u(`Finished in ${(performance.now()-c).toFixed(2)}ms\n`),m>0&&process.exit(1)}catch(e){d(`Failed to run doctor check:`,e),process.exit(1)}}const _=(0,o.default)(`boltdocs`);_.command(`[root]`,`Start development server`).alias(`dev`).action(p),_.command(`build [root]`,`Build for production`).action(m),_.command(`preview [root]`,`Preview production build`).action(h),_.command(`doctor [root]`,`Check documentation health`).action(g),_.help(),_.version(`2.0.0`),_.parse();
@@ -0,0 +1,2 @@
1
+
2
+ export { };
@@ -1 +1,2 @@
1
- #!/usr/bin/env node
1
+
2
+ export { };
@@ -1,6 +1,8 @@
1
1
  #!/usr/bin/env node
2
- import{b as L,c as ie,e as V,f as re,t as w,u as Y}from"../chunk-5B5NKOW6.mjs";import{a as n,h as D,l as G,u as se}from"../chunk-TP5KMRD3.mjs";import{a as v,b as te,c as oe}from"../chunk-Y4RE5KI7.mjs";var S={};oe(S,{colors:()=>x,error:()=>a,formatLog:()=>W,info:()=>b,success:()=>A});function W(s,e=""){return`${e}${x.bold}[boltdocs]${x.reset} ${s}${x.reset}`}function b(s){console.log(W(s))}function a(s,e){console.error(W(s,x.red)),e&&console.error(e)}function A(s){console.log(W(s,x.green))}var x,C=v(()=>{"use strict";n();x={reset:"\x1B[0m",bold:"\x1B[1m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",cyan:"\x1B[36m",gray:"\x1B[90m"}});import{createServer as ne}from"vite";async function q(s=process.cwd()){try{let e=await w(s,"development"),l=await ne(e);await l.listen(),l.printUrls(),l.bindCLIShortcuts({print:!0})}catch(e){a("Failed to start dev server:",e),process.exit(1)}}var J=v(()=>{"use strict";n();Y();C()});import{build as le,preview as ce}from"vite";import ae from"path";import M from"fs";async function K(s=process.cwd()){let e=!1,l=ae.resolve(s,"index.html");try{if(!M.existsSync(l)){let f=await L("docs",s);M.writeFileSync(l,V(f),"utf-8"),e=!0}let g=await w(s,"production");await le(g),A("Build completed successfully.")}catch(g){a("Build failed:",g),process.exit(1)}finally{e&&M.existsSync(l)&&M.unlinkSync(l)}}async function N(s=process.cwd()){try{let e=await w(s,"production");(await ce(e)).printUrls()}catch(e){a("Failed to start preview server:",e),process.exit(1)}}var Q=v(()=>{"use strict";n();Y();re();C()});import u from"path";import R from"fs";import fe from"fast-glob";async function X(s=process.cwd()){let{colors:e}=S;b(`${e.bold}Running documentation health check...${e.reset}
3
- `);let l=performance.now();try{let g=await L("docs",s),f=u.resolve(s,"docs");R.existsSync(f)||(a(`Documentation directory not found at ${f}`),process.exit(1));let T=await fe(["**/*.md","**/*.mdx"],{cwd:f,absolute:!0,suppressErrors:!0}),k=0,B=0,j=0,P=new Map,F=(r,c)=>{let m=u.relative(f,r),t=P.get(m);t||(t=[],P.set(m,t)),t.push(c),c.level==="high"?k++:c.level==="warning"?B++:c.level==="low"&&j++},E="/docs";for(let r of T){let{data:c,content:m}=G(r);c.title||F(r,{level:"warning",message:'Missing "title" in frontmatter.',suggestion:"Add `title: Your Title` to the YAML frontmatter at the top of the file."}),c.description||F(r,{level:"low",message:'Missing "description" in frontmatter.',suggestion:"Adding a description helps with SEO and search previews."});let t=/\[.*?\]\((.*?)\)/g,d=/<a\s+[^>]*href=["']([^"']+)["'][^>]*>/g,i=[...m.matchAll(t),...m.matchAll(d)];for(let H of i){let o=H[1];if(!o||o.startsWith("http")||o.startsWith("https")||o.startsWith("#")||o.startsWith("mailto:")||o.startsWith("tel:")||(o=o.split("#")[0],!o))continue;let h;if(o.startsWith("/")){let I=o;(o.startsWith(E+"/")||o===E)&&(I=o.substring(E.length)),h=u.join(f,I)}else h=u.resolve(u.dirname(r),o);let O=["",".md",".mdx","/index.md","/index.mdx"],U=!1;for(let I of O){let z=h+I;if(R.existsSync(z)&&R.statSync(z).isFile()){U=!0;break}}U||F(r,{level:"high",message:`Broken internal link: "${o}"`,suggestion:`Ensure the file exists at "${h}". If it's a directory, ensure it has an "index.md" or "index.mdx".`})}}if(g.i18n){let{defaultLocale:r,locales:c}=g.i18n,m=Object.keys(c).filter(t=>t!==r);for(let t of T){let i=D(u.relative(f,t)).split("/");if(i[0]===r){let H=i.slice(1).join("/");for(let o of m){let h=[o,...i.slice(1)],O=u.join(f,...h);R.existsSync(O)||F(t,{level:"warning",message:`Missing translation for locale "${o}"`,suggestion:`Create a translated version of this file at "${o}/${H}".`})}}}}if(P.size===0)A(`All documentation files are healthy!
4
- `);else{for(let[r,c]of P.entries()){console.log(`\u{1F4C4} ${e.bold}${r}${e.reset}`);let m=c.sort((t,d)=>{let i={high:1,warning:2,low:3};return i[t.level]-i[d.level]});for(let t of m){let d="",i="";t.level==="high"?(d="\u274C",i=e.red):t.level==="warning"?(d="\u26A0\uFE0F",i=e.yellow):(d="\u2139\uFE0F",i=e.cyan),console.log(` ${i}${d} ${t.level.toUpperCase()}:${e.reset} ${t.message}`),t.suggestion&&console.log(` ${e.gray}\u{1F4A1} Suggestion: ${t.suggestion}${e.reset}`)}console.log("")}console.log(`${e.bold}Summary:${e.reset}`),console.log(` ${e.red}${k} high-level errors${e.reset}`),console.log(` ${e.yellow}${B} warnings${e.reset}`),console.log(` ${e.cyan}${j} minor improvements${e.reset}
5
- `),k>0&&a("HIGH ERROR: Fix these to ensure your documentation builds correctly."),(B>0||j>0)&&b("TIP: Address warnings and suggestions for premium quality docs."),console.log("")}let ee=performance.now()-l;b(`Finished in ${ee.toFixed(2)}ms
6
- `),k>0&&process.exit(1)}catch(g){a("Failed to run doctor check:",g),process.exit(1)}}var Z=v(()=>{"use strict";n();ie();se();C()});var _=v(()=>{"use strict";n();J();Q();Z();C()});import me from"cac";var de=te(()=>{n();_();var p=me("boltdocs");p.command("[root]","Start development server").alias("dev").action(q);p.command("build [root]","Build for production").action(K);p.command("preview [root]","Preview production build").action(N);p.command("doctor [root]","Check documentation health").action(X);p.help();p.version("2.0.0");p.parse()});export default de();
2
+ /**
3
+ * Boltdocs - https://boltdocs.vercel.app
4
+ * Copyright (c) 2026 Jesus Alcala
5
+ * Licensed under the MIT License.
6
+ */
7
+ import{D as e,E as t,T as n,d as r,h as i,m as a}from"../cache-DFdakSmR.mjs";import{_ as o,b as s,g as c,n as l,r as u,x as d}from"../node-CWXme96p.mjs";import{build as f,createServer as p,preview as m}from"vite";import h from"fast-glob";import g from"fs";import _ from"path";import v from"cac";var y=e({colors:()=>w,error:()=>S,formatLog:()=>b,info:()=>x,success:()=>C});function b(e,t=``){return`${t}${w.bold}[boltdocs]${w.reset} ${e}${w.reset}`}function x(e){console.log(b(e))}function S(e,t){console.error(b(e,w.red)),t&&console.error(t)}function C(e){console.log(b(e,w.green))}var w,T=t((()=>{w={reset:`\x1B[0m`,bold:`\x1B[1m`,red:`\x1B[31m`,green:`\x1B[32m`,yellow:`\x1B[33m`,blue:`\x1B[34m`,cyan:`\x1B[36m`,gray:`\x1B[90m`}}));async function E(e=process.cwd()){try{let t=await p(await l(e,`development`));await t.listen(),t.printUrls(),t.bindCLIShortcuts({print:!0})}catch(e){S(`Failed to start dev server:`,e),process.exit(1)}}var D=t((()=>{u(),T()}));async function O(e=process.cwd()){let t=!1,n=_.resolve(e,`index.html`);try{if(!g.existsSync(n)){let r=await d(`docs`,e);g.writeFileSync(n,c(r),`utf-8`),t=!0}await f(await l(e,`production`)),C(`Build completed successfully.`)}catch(e){S(`Build failed:`,e),process.exit(1)}finally{t&&g.existsSync(n)&&g.unlinkSync(n)}}async function k(e=process.cwd()){try{(await m(await l(e,`production`))).printUrls()}catch(e){S(`Failed to start preview server:`,e),process.exit(1)}}var A=t((()=>{u(),o(),T()}));async function j(e=process.cwd()){let{colors:t}=y;x(`${t.bold}Running documentation health check...${t.reset}\n`);let n=performance.now();try{let r=await d(`docs`,e),o=_.resolve(e,`docs`);g.existsSync(o)||(S(`Documentation directory not found at ${o}`),process.exit(1));let s=await h([`**/*.md`,`**/*.mdx`],{cwd:o,absolute:!0,suppressErrors:!0}),c=0,l=0,u=0,f=new Map,p=(e,t)=>{let n=_.relative(o,e),r=f.get(n);r||(r=[],f.set(n,r)),r.push(t),t.level===`high`?c++:t.level===`warning`?l++:t.level===`low`&&u++},m=`/docs`;for(let e of s){let{data:t,content:n}=i(e);t.title||p(e,{level:`warning`,message:`Missing "title" in frontmatter.`,suggestion:"Add `title: Your Title` to the YAML frontmatter at the top of the file."}),t.description||p(e,{level:`low`,message:`Missing "description" in frontmatter.`,suggestion:`Adding a description helps with SEO and search previews.`});let r=/\[.*?\]\((.*?)\)/g,a=/<a\s+[^>]*href=["']([^"']+)["'][^>]*>/g,s=[...n.matchAll(r),...n.matchAll(a)];for(let t of s){let n=t[1];if(!n||n.startsWith(`http`)||n.startsWith(`https`)||n.startsWith(`#`)||n.startsWith(`mailto:`)||n.startsWith(`tel:`)||(n=n.split(`#`)[0],!n))continue;let r;if(n.startsWith(`/`)){let e=n;(n.startsWith(m+`/`)||n===m)&&(e=n.substring(5)),r=_.join(o,e)}else r=_.resolve(_.dirname(e),n);let i=[``,`.md`,`.mdx`,`/index.md`,`/index.mdx`],a=!1;for(let e of i){let t=r+e;if(g.existsSync(t)&&g.statSync(t).isFile()){a=!0;break}}a||p(e,{level:`high`,message:`Broken internal link: "${n}"`,suggestion:`Ensure the file exists at "${r}". If it's a directory, ensure it has an "index.md" or "index.mdx".`})}}if(r.i18n){let{defaultLocale:e,locales:t}=r.i18n,n=Object.keys(t).filter(t=>t!==e);for(let t of s){let r=a(_.relative(o,t)).split(`/`);if(r[0]===e){let e=r.slice(1).join(`/`);for(let i of n){let n=[i,...r.slice(1)],a=_.join(o,...n);g.existsSync(a)||p(t,{level:`warning`,message:`Missing translation for locale "${i}"`,suggestion:`Create a translated version of this file at "${i}/${e}".`})}}}}if(f.size===0)C(`All documentation files are healthy!
8
+ `);else{for(let[e,n]of f.entries()){console.log(`📄 ${t.bold}${e}${t.reset}`);let r=n.sort((e,t)=>{let n={high:1,warning:2,low:3};return n[e.level]-n[t.level]});for(let e of r){let n=``,r=``;e.level===`high`?(n=`❌`,r=t.red):e.level===`warning`?(n=`⚠️`,r=t.yellow):(n=`ℹ️`,r=t.cyan),console.log(` ${r}${n} ${e.level.toUpperCase()}:${t.reset} ${e.message}`),e.suggestion&&console.log(` ${t.gray}💡 Suggestion: ${e.suggestion}${t.reset}`)}console.log(``)}console.log(`${t.bold}Summary:${t.reset}`),console.log(` ${t.red}${c} high-level errors${t.reset}`),console.log(` ${t.yellow}${l} warnings${t.reset}`),console.log(` ${t.cyan}${u} minor improvements${t.reset}\n`),c>0&&S(`HIGH ERROR: Fix these to ensure your documentation builds correctly.`),(l>0||u>0)&&x(`TIP: Address warnings and suggestions for premium quality docs.`),console.log(``)}x(`Finished in ${(performance.now()-n).toFixed(2)}ms\n`),c>0&&process.exit(1)}catch(e){S(`Failed to run doctor check:`,e),process.exit(1)}}var M=t((()=>{s(),r(),T()})),N=t((()=>{D(),A(),M(),T()})),P=n((()=>{N();let e=v(`boltdocs`);e.command(`[root]`,`Start development server`).alias(`dev`).action(E),e.command(`build [root]`,`Build for production`).action(O),e.command(`preview [root]`,`Preview production build`).action(k),e.command(`doctor [root]`,`Check documentation health`).action(j),e.help(),e.version(`2.0.0`),e.parse()}));export default P();export{};
@@ -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.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../node-VYfhzGrh.cjs`);exports.BoltdocsPluginStore=e.l,exports.PluginCompatibilityError=e.u,exports.PluginError=e.d,exports.PluginHookError=e.f,exports.PluginLifecycleManager=e.i,exports.PluginPermissionError=e.p,exports.PluginSandbox=e.a,exports.PluginValidationError=e.m,exports.SecurePluginSchema=e.o,exports.createPlugin=e.r,exports.createViteConfig=e.n,exports.default=e.t,exports.defineConfig=e._,exports.generateStaticPages=e.g,exports.hasPermission=e.s,exports.resolveConfig=e.v,exports.validatePlugins=e.c;