boltdocs 2.5.5 → 2.6.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 (166) hide show
  1. package/bin/boltdocs.js +2 -2
  2. package/dist/client/index.cjs +6 -0
  3. package/dist/client/index.d.cts +1560 -0
  4. package/dist/client/index.d.ts +1219 -922
  5. package/dist/client/index.js +6 -1
  6. package/dist/client/theme/neutral.css +428 -0
  7. package/dist/node/cli-entry.cjs +8 -0
  8. package/dist/node/cli-entry.d.cts +2 -0
  9. package/dist/node/cli-entry.d.mts +2 -1
  10. package/dist/node/cli-entry.mjs +7 -5
  11. package/dist/node/index.cjs +6 -0
  12. package/dist/node/index.d.cts +519 -0
  13. package/dist/node/index.d.mts +374 -422
  14. package/dist/node/index.mjs +6 -1
  15. package/dist/node-BgvNl2Ay.mjs +89 -0
  16. package/dist/node-vkbb0MK7.cjs +89 -0
  17. package/dist/package-CR0HF9x3.mjs +6 -0
  18. package/dist/package-Dgmsc_l5.cjs +6 -0
  19. package/dist/search-dialog-3lvKsbVG.js +6 -0
  20. package/dist/search-dialog-DMK5OpgH.cjs +6 -0
  21. package/dist/use-search-C9bxCqfF.js +6 -0
  22. package/dist/use-search-DcfZSunO.cjs +6 -0
  23. package/package.json +26 -25
  24. package/src/client/app/config-context.tsx +38 -5
  25. package/src/client/app/doc-page.tsx +34 -0
  26. package/src/client/app/mdx-component.tsx +2 -3
  27. package/src/client/app/mdx-components-context.tsx +27 -2
  28. package/src/client/app/routes-context.tsx +34 -0
  29. package/src/client/app/scroll-handler.tsx +7 -4
  30. package/src/client/app/theme-context.tsx +71 -67
  31. package/src/client/components/default-layout.tsx +34 -33
  32. package/src/client/components/docs-layout.tsx +1 -2
  33. package/src/client/components/icons-dev.tsx +36 -5
  34. package/src/client/components/mdx/admonition.tsx +11 -27
  35. package/src/client/components/mdx/badge.tsx +1 -1
  36. package/src/client/components/mdx/button.tsx +3 -3
  37. package/src/client/components/mdx/card.tsx +1 -1
  38. package/src/client/components/mdx/code-block.tsx +90 -80
  39. package/src/client/components/mdx/component-preview.tsx +1 -5
  40. package/src/client/components/mdx/component-props.tsx +1 -1
  41. package/src/client/components/mdx/field.tsx +4 -5
  42. package/src/client/components/mdx/file-tree.tsx +6 -3
  43. package/src/client/components/mdx/hooks/use-code-block.ts +2 -2
  44. package/src/client/components/mdx/image.tsx +1 -1
  45. package/src/client/components/mdx/link.tsx +2 -2
  46. package/src/client/components/mdx/list.tsx +1 -1
  47. package/src/client/components/mdx/table.tsx +1 -1
  48. package/src/client/components/mdx/tabs.tsx +1 -1
  49. package/src/client/components/primitives/breadcrumbs.tsx +1 -7
  50. package/src/client/components/primitives/button-group.tsx +1 -1
  51. package/src/client/components/primitives/button.tsx +1 -1
  52. package/src/client/components/primitives/code-block.tsx +113 -0
  53. package/src/client/components/primitives/link.tsx +23 -41
  54. package/src/client/components/primitives/menu.tsx +5 -6
  55. package/src/client/components/primitives/navbar.tsx +6 -18
  56. package/src/client/components/primitives/navigation-menu.tsx +4 -4
  57. package/src/client/components/primitives/on-this-page.tsx +6 -10
  58. package/src/client/components/primitives/page-nav.tsx +4 -9
  59. package/src/client/components/primitives/popover.tsx +1 -1
  60. package/src/client/components/primitives/search-dialog.tsx +3 -6
  61. package/src/client/components/primitives/sidebar.tsx +80 -22
  62. package/src/client/components/primitives/skeleton.tsx +1 -1
  63. package/src/client/components/primitives/tabs.tsx +4 -11
  64. package/src/client/components/primitives/tooltip.tsx +3 -3
  65. package/src/client/components/ui-base/breadcrumbs.tsx +4 -6
  66. package/src/client/components/ui-base/copy-markdown.tsx +2 -7
  67. package/src/client/components/ui-base/github-stars.tsx +2 -2
  68. package/src/client/components/ui-base/head.tsx +58 -51
  69. package/src/client/components/ui-base/loading.tsx +2 -2
  70. package/src/client/components/ui-base/navbar.tsx +12 -14
  71. package/src/client/components/ui-base/not-found.tsx +1 -1
  72. package/src/client/components/ui-base/on-this-page.tsx +6 -6
  73. package/src/client/components/ui-base/page-nav.tsx +4 -8
  74. package/src/client/components/ui-base/search-dialog.tsx +10 -8
  75. package/src/client/components/ui-base/sidebar.tsx +76 -23
  76. package/src/client/components/ui-base/tabs.tsx +9 -8
  77. package/src/client/components/ui-base/theme-toggle.tsx +2 -2
  78. package/src/client/hooks/use-i18n.ts +3 -3
  79. package/src/client/hooks/use-localized-to.ts +1 -1
  80. package/src/client/hooks/use-navbar.ts +8 -6
  81. package/src/client/hooks/use-routes.ts +19 -11
  82. package/src/client/hooks/use-search.ts +1 -1
  83. package/src/client/hooks/use-sidebar.ts +48 -2
  84. package/src/client/hooks/use-tabs.ts +6 -2
  85. package/src/client/hooks/use-version.ts +3 -3
  86. package/src/client/index.ts +22 -22
  87. package/src/client/ssg/boltdocs-shell.tsx +127 -0
  88. package/src/client/ssg/create-routes.tsx +179 -0
  89. package/src/client/ssg/index.ts +3 -0
  90. package/src/client/ssg/mdx-page.tsx +37 -0
  91. package/src/client/store/boltdocs-context.tsx +66 -0
  92. package/src/client/theme/neutral.css +90 -50
  93. package/src/client/types.ts +5 -33
  94. package/src/client/utils/react-to-text.ts +34 -0
  95. package/CHANGELOG.md +0 -98
  96. package/dist/cache-3FOEPC2P.mjs +0 -1
  97. package/dist/chunk-5B5NKOW6.mjs +0 -77
  98. package/dist/chunk-J2PTDWZM.mjs +0 -1
  99. package/dist/chunk-TP5KMRD3.mjs +0 -1
  100. package/dist/chunk-Y4RE5KI7.mjs +0 -1
  101. package/dist/client/index.d.mts +0 -1263
  102. package/dist/client/index.mjs +0 -1
  103. package/dist/client/ssr.d.mts +0 -78
  104. package/dist/client/ssr.d.ts +0 -78
  105. package/dist/client/ssr.js +0 -1
  106. package/dist/client/ssr.mjs +0 -1
  107. package/dist/node/cli-entry.d.ts +0 -1
  108. package/dist/node/cli-entry.js +0 -82
  109. package/dist/node/index.d.ts +0 -567
  110. package/dist/node/index.js +0 -77
  111. package/dist/package-QFIAETHR.mjs +0 -1
  112. package/dist/search-dialog-O6VLVSOA.mjs +0 -1
  113. package/src/client/app/index.tsx +0 -345
  114. package/src/client/app/mdx-page.tsx +0 -15
  115. package/src/client/app/preload.tsx +0 -66
  116. package/src/client/app/router.tsx +0 -30
  117. package/src/client/integrations/codesandbox.ts +0 -179
  118. package/src/client/integrations/index.ts +0 -1
  119. package/src/client/ssr.tsx +0 -65
  120. package/src/client/store/use-boltdocs-store.ts +0 -44
  121. package/src/node/cache.ts +0 -408
  122. package/src/node/cli/build.ts +0 -53
  123. package/src/node/cli/dev.ts +0 -22
  124. package/src/node/cli/doctor.ts +0 -243
  125. package/src/node/cli/index.ts +0 -9
  126. package/src/node/cli/ui.ts +0 -54
  127. package/src/node/cli-entry.ts +0 -24
  128. package/src/node/config.ts +0 -382
  129. package/src/node/errors.ts +0 -44
  130. package/src/node/index.ts +0 -84
  131. package/src/node/mdx/cache.ts +0 -12
  132. package/src/node/mdx/highlighter.ts +0 -47
  133. package/src/node/mdx/index.ts +0 -122
  134. package/src/node/mdx/rehype-shiki.ts +0 -62
  135. package/src/node/mdx/remark-code-meta.ts +0 -35
  136. package/src/node/mdx/remark-shiki.ts +0 -61
  137. package/src/node/plugin/entry.ts +0 -87
  138. package/src/node/plugin/html.ts +0 -99
  139. package/src/node/plugin/index.ts +0 -478
  140. package/src/node/plugin/types.ts +0 -9
  141. package/src/node/plugins/index.ts +0 -17
  142. package/src/node/plugins/plugin-errors.ts +0 -62
  143. package/src/node/plugins/plugin-lifecycle.ts +0 -117
  144. package/src/node/plugins/plugin-sandbox.ts +0 -59
  145. package/src/node/plugins/plugin-store.ts +0 -54
  146. package/src/node/plugins/plugin-types.ts +0 -107
  147. package/src/node/plugins/plugin-validator.ts +0 -105
  148. package/src/node/routes/cache.ts +0 -28
  149. package/src/node/routes/index.ts +0 -293
  150. package/src/node/routes/parser.ts +0 -262
  151. package/src/node/routes/sorter.ts +0 -42
  152. package/src/node/routes/types.ts +0 -61
  153. package/src/node/schema/config.ts +0 -195
  154. package/src/node/schema/frontmatter.ts +0 -17
  155. package/src/node/search/index.ts +0 -55
  156. package/src/node/security/constants/index.ts +0 -10
  157. package/src/node/security/csp.ts +0 -31
  158. package/src/node/security/headers.ts +0 -27
  159. package/src/node/ssg/index.ts +0 -205
  160. package/src/node/ssg/meta.ts +0 -33
  161. package/src/node/ssg/options.ts +0 -15
  162. package/src/node/ssg/robots.ts +0 -53
  163. package/src/node/ssg/sitemap.ts +0 -55
  164. package/src/node/utils.ts +0 -349
  165. package/tsconfig.json +0 -26
  166. package/tsup.config.ts +0 -56
@@ -0,0 +1,428 @@
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
+ @variant dark
94
+ (
95
+ &:where(.dark, .dark *));
96
+
97
+ .animate-pulse {
98
+ animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
99
+ }
100
+
101
+ .animate-fade-in {
102
+ animation: fade-in 0.5s ease-out forwards;
103
+ }
104
+
105
+ :root[data-theme="dark"],
106
+ :root.dark {
107
+ --color-bg-main: var(--color-neutral-900);
108
+ --color-bg-surface: var(--color-neutral-800);
109
+ --color-bg-muted: var(--color-neutral-800);
110
+ --color-text-main: var(--color-neutral-50);
111
+ --color-text-muted: var(--color-neutral-400);
112
+ --color-text-dim: var(--color-neutral-500);
113
+ --color-border-subtle: var(--color-neutral-800);
114
+ --color-border-strong: var(--color-neutral-700);
115
+ --color-code-bg: var(--color-neutral-900);
116
+ --color-code-text: var(--color-neutral-200);
117
+ }
118
+
119
+
120
+ @layer base {
121
+ *,
122
+ *::before,
123
+ *::after {
124
+ box-sizing: border-box;
125
+ }
126
+
127
+ html,
128
+ body {
129
+ margin: 0;
130
+ padding: 0;
131
+ min-height: 100%;
132
+ overflow-x: hidden;
133
+ }
134
+
135
+ body {
136
+ @apply bg-bg-main text-text-main antialiased;
137
+ font-family: var(--font-sans);
138
+ line-height: 1.7;
139
+ }
140
+
141
+ a {
142
+ text-decoration: none;
143
+ }
144
+
145
+ /* Scroll-margin-top for anchor scrolling */
146
+ h1,
147
+ h2,
148
+ h3,
149
+ h4,
150
+ h5,
151
+ h6 {
152
+ scroll-margin-top: 6rem;
153
+ }
154
+
155
+ /* Scrollbar */
156
+ ::-webkit-scrollbar {
157
+ width: 6px;
158
+ height: 6px;
159
+ }
160
+ ::-webkit-scrollbar-track {
161
+ background: transparent;
162
+ }
163
+ ::-webkit-scrollbar-thumb {
164
+ @apply bg-neutral-300 dark:bg-neutral-700 rounded-full;
165
+ }
166
+ ::-webkit-scrollbar-thumb:hover {
167
+ @apply bg-neutral-400 dark:bg-neutral-600;
168
+ }
169
+
170
+ /* ═══ Content Area ═══ */
171
+ .boltdocs-content {
172
+ scrollbar-width: none;
173
+ scroll-behavior: smooth;
174
+ }
175
+ .boltdocs-content::-webkit-scrollbar {
176
+ display: none;
177
+ }
178
+
179
+ /* ═══ Markdown Typography ═══ */
180
+ .boltdocs-page {
181
+ position: relative;
182
+ padding-top: 1rem;
183
+ padding-bottom: 8rem;
184
+ }
185
+
186
+ .boltdocs-page h1 {
187
+ font-size: 2.5rem;
188
+ margin: 0 0 1rem;
189
+ font-weight: 800;
190
+ letter-spacing: -0.04em;
191
+ color: var(--color-text-main);
192
+ line-height: 1.2;
193
+ }
194
+ .boltdocs-page h1 + p {
195
+ color: var(--color-text-muted);
196
+ font-size: 1.125rem;
197
+ margin-bottom: 2.5rem;
198
+ line-height: 1.6;
199
+ }
200
+ .boltdocs-page h2 {
201
+ font-size: 1.75rem;
202
+ margin-top: 3.5rem;
203
+ margin-bottom: 1.25rem;
204
+ font-weight: 700;
205
+ color: var(--color-text-main);
206
+ padding-bottom: 0.5rem;
207
+ border-bottom: 1px solid var(--color-border-subtle);
208
+ scroll-margin-top: 6rem;
209
+ letter-spacing: -0.02em;
210
+ }
211
+ .boltdocs-page h3 {
212
+ font-size: 1.25rem;
213
+ margin-top: 2.5rem;
214
+ margin-bottom: 1rem;
215
+ font-weight: 600;
216
+ color: var(--color-text-main);
217
+ scroll-margin-top: 6rem;
218
+ letter-spacing: -0.01em;
219
+ }
220
+ .boltdocs-page p {
221
+ margin-top: 0;
222
+ margin-bottom: 1.25rem;
223
+ color: var(--color-text-muted);
224
+ line-height: 1.8;
225
+ }
226
+ .boltdocs-page a {
227
+ color: var(--color-primary-500);
228
+ text-decoration: none;
229
+ transition: color 0.2s;
230
+ font-weight: 500;
231
+ }
232
+ .boltdocs-page a:hover {
233
+ color: var(--color-primary-400);
234
+ text-decoration: underline;
235
+ }
236
+ .boltdocs-page ul,
237
+ .boltdocs-page ol {
238
+ margin-top: 0;
239
+ margin-bottom: 1.5rem;
240
+ padding-left: 1.5rem;
241
+ color: var(--color-text-muted);
242
+ }
243
+ .boltdocs-page li {
244
+ margin-bottom: 0.5rem;
245
+ line-height: 1.8;
246
+ }
247
+ .boltdocs-page strong {
248
+ color: var(--color-text-main);
249
+ font-weight: 700;
250
+ }
251
+ .boltdocs-page blockquote {
252
+ margin: 2rem 0;
253
+ padding: 1rem 1.5rem;
254
+ border-left: 4px solid var(--color-primary-500);
255
+ background-color: var(--color-primary-500);
256
+ background-color: color-mix(
257
+ in oklch,
258
+ var(--color-primary-500),
259
+ transparent 93%
260
+ );
261
+ border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
262
+ color: var(--color-text-muted);
263
+ font-style: italic;
264
+ }
265
+ .boltdocs-page blockquote p {
266
+ margin: 0;
267
+ }
268
+ .boltdocs-page hr {
269
+ border: none;
270
+ border-top: 1px solid var(--color-border-subtle);
271
+ margin: 3rem 0;
272
+ }
273
+ .boltdocs-page img {
274
+ max-width: 100%;
275
+ height: auto;
276
+ border-radius: var(--radius-lg);
277
+ margin: 2rem 0;
278
+ display: block;
279
+ }
280
+ .boltdocs-page table {
281
+ width: 100%;
282
+ border-collapse: collapse;
283
+ margin: 2rem 0;
284
+ font-size: 0.875rem;
285
+ }
286
+ .boltdocs-page th {
287
+ text-align: left;
288
+ padding: 0.75rem 1rem;
289
+ border-bottom: 2px solid var(--color-border-subtle);
290
+ color: var(--color-text-main);
291
+ font-weight: 700;
292
+ }
293
+ .boltdocs-page td {
294
+ padding: 0.75rem 1rem;
295
+ border-bottom: 1px solid var(--color-border-subtle);
296
+ color: var(--color-text-muted);
297
+ }
298
+ .boltdocs-page tr:hover td {
299
+ background-color: var(--color-bg-surface);
300
+ }
301
+
302
+ @media (max-width: 768px) {
303
+ .boltdocs-page h1 {
304
+ font-size: 1.75rem;
305
+ }
306
+ }
307
+
308
+ /* ═══ Header Anchors ═══ */
309
+ .header-anchor {
310
+ margin-left: 0.5rem;
311
+ color: var(--color-text-dim);
312
+ opacity: 0;
313
+ transition: opacity 0.2s;
314
+ text-decoration: none;
315
+ font-weight: 400;
316
+ }
317
+ .boltdocs-page h2:hover .header-anchor,
318
+ .boltdocs-page h3:hover .header-anchor {
319
+ opacity: 1;
320
+ }
321
+ .header-anchor:hover {
322
+ color: var(--color-primary-500);
323
+ }
324
+ .boltdocs-heading {
325
+ display: flex;
326
+ align-items: center;
327
+ }
328
+ .boltdocs-heading .header-anchor {
329
+ display: inline-flex;
330
+ align-items: center;
331
+ margin-left: 0.5rem;
332
+ color: var(--color-text-dim);
333
+ opacity: 0;
334
+ transition: opacity 0.2s;
335
+ text-decoration: none;
336
+ }
337
+ .boltdocs-heading:hover .header-anchor {
338
+ opacity: 1;
339
+ }
340
+
341
+ /* ═══ Shiki Styles ═══ */
342
+
343
+ /* Shiki Light/Dark Mode */
344
+ :root .shiki,
345
+ :root .shiki span {
346
+ font-family: var(--font-mono);
347
+ font-size: 12px !important;
348
+ background-color: transparent !important;
349
+ }
350
+
351
+ :root.dark .shiki,
352
+ :root.dark .shiki span {
353
+ color: var(--shiki-dark) !important;
354
+ }
355
+
356
+ /* Base Shiki Pre & Span Styles */
357
+ pre.shiki {
358
+ @apply py-2 text-[12px] leading-[1.6];
359
+ }
360
+
361
+ pre.shiki span.line {
362
+ @apply relative block px-4 py-0;
363
+ min-height: 1.6em;
364
+ }
365
+
366
+ /* Shiki Word Wrap */
367
+ pre.shiki-word-wrap {
368
+ @apply whitespace-pre-wrap break-words;
369
+ }
370
+
371
+ pre.shiki-word-wrap span.line {
372
+ @apply block w-full;
373
+ }
374
+
375
+ /* Shiki Line Numbers */
376
+ pre.shiki-line-numbers code {
377
+ counter-reset: step;
378
+ counter-increment: step 0;
379
+ }
380
+
381
+ pre.shiki-line-numbers .line {
382
+ @apply pl-12!;
383
+ }
384
+
385
+ /* Hide the last line if it is completely empty to avoid extra numbers */
386
+ pre.shiki-line-numbers .line:last-child:empty,
387
+ pre.shiki-line-numbers .line:last-child:has(> :empty) {
388
+ display: none;
389
+ }
390
+
391
+ pre.shiki-line-numbers .line::before {
392
+ counter-increment: step;
393
+ content: counter(step);
394
+ @apply absolute left-0 top-0 inline-flex w-10 justify-end pr-3;
395
+ @apply text-[11px] text-text-muted opacity-30 select-none;
396
+ line-height: inherit; /* Sync with line text */
397
+ }
398
+
399
+ /* Shiki Highlight */
400
+ pre span.shiki-line-highlight {
401
+ @apply relative z-0 inline-block w-full;
402
+ &::after {
403
+ content: "";
404
+ @apply absolute top-0 left-0 -z-10 h-full w-full border-l-2 border-primary-500 bg-primary-500/10! opacity-100;
405
+ }
406
+ }
407
+
408
+ /* Shiki Notation Diff */
409
+ pre.has-diff span.line.diff {
410
+ @apply relative inline-block w-full;
411
+ }
412
+
413
+ pre.has-diff span.line.diff.add {
414
+ @apply bg-emerald-500/10! dark:bg-emerald-500/10!;
415
+ &::before {
416
+ content: "+";
417
+ @apply absolute left-2 text-emerald-500 font-bold;
418
+ }
419
+ }
420
+
421
+ pre.has-diff span.line.diff.remove {
422
+ @apply bg-danger-500/10! opacity-70;
423
+ &::before {
424
+ content: "-";
425
+ @apply absolute left-2 text-danger-500 font-bold;
426
+ }
427
+ }
428
+ }
@@ -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(`../node-vkbb0MK7.cjs`);let t=require(`vite`),n=require(`fast-glob`);n=e.x(n);let r=require(`fs`);r=e.x(r);let i=require(`path`);i=e.x(i);let a=require(`cac`);a=e.x(a);let o=require(`@bdocs/ssg/node`);var s=e.b({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(t=process.cwd()){try{let n=await(0,o.createServer)(await e.n(t,`development`));await n.listen(),n.printUrls(),n.bindCLIShortcuts({print:!0})}catch(e){d(`Failed to start dev server:`,e),process.exit(1)}}async function m(t=process.cwd()){try{await(0,o.build)({entry:`boltdocs/entry`},await e.n(t,`production`)),f(`SSG build completed successfully!`)}catch(e){d(`Build failed:`,e),process.exit(1)}}async function h(n=process.cwd()){try{(await(0,t.preview)(await e.n(n,`production`))).printUrls()}catch(e){d(`Failed to start preview server:`,e),process.exit(1)}}async function g(t=process.cwd()){let{colors:a}=s;u(`${a.bold}Running documentation health check...${a.reset}\n`);let o=performance.now();try{let s=await e.g(`docs`,t),c=i.default.resolve(t,`docs`);r.default.existsSync(c)||(d(`Documentation directory not found at ${c}`),process.exit(1));let l=await(0,n.default)([`**/*.md`,`**/*.mdx`],{cwd:c,absolute:!0,suppressErrors:!0}),p=0,m=0,h=0,g=new Map,_=(e,t)=>{let n=i.default.relative(c,e),r=g.get(n);r||(r=[],g.set(n,r)),r.push(t),t.level===`high`?p++:t.level===`warning`?m++:t.level===`low`&&h++},v=`/docs`;for(let t of l){let{data:n,content:a}=e.y(t);n.title||_(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||_(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,l=[...a.matchAll(o),...a.matchAll(s)];for(let e of l){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 a;if(n.startsWith(`/`)){let e=n;(n.startsWith(v+`/`)||n===v)&&(e=n.substring(5)),a=i.default.join(c,e)}else a=i.default.resolve(i.default.dirname(t),n);let o=[``,`.md`,`.mdx`,`/index.md`,`/index.mdx`],s=!1;for(let e of o){let t=a+e;if(r.default.existsSync(t)&&r.default.statSync(t).isFile()){s=!0;break}}s||_(t,{level:`high`,message:`Broken internal link: "${n}"`,suggestion:`Ensure the file exists at "${a}". If it's a directory, ensure it has an "index.md" or "index.mdx".`})}}if(s.i18n){let{defaultLocale:t,locales:n}=s.i18n,a=Object.keys(n).filter(e=>e!==t);for(let n of l){let o=e.v(i.default.relative(c,n)).split(`/`);if(o[0]===t){let e=o.slice(1).join(`/`);for(let t of a){let a=[t,...o.slice(1)],s=i.default.join(c,...a);r.default.existsSync(s)||_(n,{level:`warning`,message:`Missing translation for locale "${t}"`,suggestion:`Create a translated version of this file at "${t}/${e}".`})}}}}if(g.size===0)f(`All documentation files are healthy!
8
+ `);else{for(let[e,t]of g.entries()){console.log(`📄 ${a.bold}${e}${a.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=a.red):e.level===`warning`?(t=`âš ī¸`,n=a.yellow):(t=`â„šī¸`,n=a.cyan),console.log(` ${n}${t} ${e.level.toUpperCase()}:${a.reset} ${e.message}`),e.suggestion&&console.log(` ${a.gray}💡 Suggestion: ${e.suggestion}${a.reset}`)}console.log(``)}console.log(`${a.bold}Summary:${a.reset}`),console.log(` ${a.red}${p} high-level errors${a.reset}`),console.log(` ${a.yellow}${m} warnings${a.reset}`),console.log(` ${a.cyan}${h} minor improvements${a.reset}\n`),p>0&&d(`HIGH ERROR: Fix these to ensure your documentation builds correctly.`),(m>0||h>0)&&u(`TIP: Address warnings and suggestions for premium quality docs.`),console.log(``)}u(`Finished in ${(performance.now()-o).toFixed(2)}ms\n`),p>0&&process.exit(1)}catch(e){d(`Failed to run doctor check:`,e),process.exit(1)}}const _=(0,a.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{g as e,n as t,v as n,y as r}from"../node-BgvNl2Ay.mjs";import{preview as i}from"vite";import a from"fast-glob";import o from"fs";import s from"path";import c from"cac";import{build as l,createServer as u}from"@bdocs/ssg/node";var d=Object.defineProperty,f=((e,t)=>{let n={};for(var r in e)d(n,r,{get:e[r],enumerable:!0});return t||d(n,Symbol.toStringTag,{value:`Module`}),n})({colors:()=>p,error:()=>g,formatLog:()=>m,info:()=>h,success:()=>_});const p={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 m(e,t=``){return`${t}${p.bold}[boltdocs]${p.reset} ${e}${p.reset}`}function h(e){console.log(m(e))}function g(e,t){console.error(m(e,p.red)),t&&console.error(t)}function _(e){console.log(m(e,p.green))}async function v(e=process.cwd()){try{let n=await u(await t(e,`development`));await n.listen(),n.printUrls(),n.bindCLIShortcuts({print:!0})}catch(e){g(`Failed to start dev server:`,e),process.exit(1)}}async function y(e=process.cwd()){try{await l({entry:`boltdocs/entry`},await t(e,`production`)),_(`SSG build completed successfully!`)}catch(e){g(`Build failed:`,e),process.exit(1)}}async function b(e=process.cwd()){try{(await i(await t(e,`production`))).printUrls()}catch(e){g(`Failed to start preview server:`,e),process.exit(1)}}async function x(t=process.cwd()){let{colors:i}=f;h(`${i.bold}Running documentation health check...${i.reset}\n`);let c=performance.now();try{let l=await e(`docs`,t),u=s.resolve(t,`docs`);o.existsSync(u)||(g(`Documentation directory not found at ${u}`),process.exit(1));let d=await a([`**/*.md`,`**/*.mdx`],{cwd:u,absolute:!0,suppressErrors:!0}),f=0,p=0,m=0,v=new Map,y=(e,t)=>{let n=s.relative(u,e),r=v.get(n);r||(r=[],v.set(n,r)),r.push(t),t.level===`high`?f++:t.level===`warning`?p++:t.level===`low`&&m++},b=`/docs`;for(let e of d){let{data:t,content:n}=r(e);t.title||y(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||y(e,{level:`low`,message:`Missing "description" in frontmatter.`,suggestion:`Adding a description helps with SEO and search previews.`});let i=/\[.*?\]\((.*?)\)/g,a=/<a\s+[^>]*href=["']([^"']+)["'][^>]*>/g,c=[...n.matchAll(i),...n.matchAll(a)];for(let t of c){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(b+`/`)||n===b)&&(e=n.substring(5)),r=s.join(u,e)}else r=s.resolve(s.dirname(e),n);let i=[``,`.md`,`.mdx`,`/index.md`,`/index.mdx`],a=!1;for(let e of i){let t=r+e;if(o.existsSync(t)&&o.statSync(t).isFile()){a=!0;break}}a||y(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(l.i18n){let{defaultLocale:e,locales:t}=l.i18n,r=Object.keys(t).filter(t=>t!==e);for(let t of d){let i=n(s.relative(u,t)).split(`/`);if(i[0]===e){let e=i.slice(1).join(`/`);for(let n of r){let r=[n,...i.slice(1)],a=s.join(u,...r);o.existsSync(a)||y(t,{level:`warning`,message:`Missing translation for locale "${n}"`,suggestion:`Create a translated version of this file at "${n}/${e}".`})}}}}if(v.size===0)_(`All documentation files are healthy!
8
+ `);else{for(let[e,t]of v.entries()){console.log(`📄 ${i.bold}${e}${i.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=i.red):e.level===`warning`?(t=`âš ī¸`,n=i.yellow):(t=`â„šī¸`,n=i.cyan),console.log(` ${n}${t} ${e.level.toUpperCase()}:${i.reset} ${e.message}`),e.suggestion&&console.log(` ${i.gray}💡 Suggestion: ${e.suggestion}${i.reset}`)}console.log(``)}console.log(`${i.bold}Summary:${i.reset}`),console.log(` ${i.red}${f} high-level errors${i.reset}`),console.log(` ${i.yellow}${p} warnings${i.reset}`),console.log(` ${i.cyan}${m} minor improvements${i.reset}\n`),f>0&&g(`HIGH ERROR: Fix these to ensure your documentation builds correctly.`),(p>0||m>0)&&h(`TIP: Address warnings and suggestions for premium quality docs.`),console.log(``)}h(`Finished in ${(performance.now()-c).toFixed(2)}ms\n`),f>0&&process.exit(1)}catch(e){g(`Failed to run doctor check:`,e),process.exit(1)}}const S=c(`boltdocs`);S.command(`[root]`,`Start development server`).alias(`dev`).action(v),S.command(`build [root]`,`Build for production`).action(y),S.command(`preview [root]`,`Preview production build`).action(b),S.command(`doctor [root]`,`Check documentation health`).action(x),S.help(),S.version(`2.0.0`),S.parse();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-vkbb0MK7.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.generateEntryCode=e.h,exports.hasPermission=e.s,exports.resolveConfig=e.g,exports.validatePlugins=e.c;