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.
- package/bin/boltdocs.js +2 -2
- package/dist/client/index.cjs +6 -0
- package/dist/client/index.d.cts +1560 -0
- package/dist/client/index.d.ts +1219 -922
- package/dist/client/index.js +6 -1
- package/dist/client/theme/neutral.css +428 -0
- package/dist/node/cli-entry.cjs +8 -0
- package/dist/node/cli-entry.d.cts +2 -0
- package/dist/node/cli-entry.d.mts +2 -1
- package/dist/node/cli-entry.mjs +7 -5
- package/dist/node/index.cjs +6 -0
- package/dist/node/index.d.cts +519 -0
- package/dist/node/index.d.mts +374 -422
- package/dist/node/index.mjs +6 -1
- package/dist/node-BgvNl2Ay.mjs +89 -0
- package/dist/node-vkbb0MK7.cjs +89 -0
- package/dist/package-CR0HF9x3.mjs +6 -0
- package/dist/package-Dgmsc_l5.cjs +6 -0
- package/dist/search-dialog-3lvKsbVG.js +6 -0
- package/dist/search-dialog-DMK5OpgH.cjs +6 -0
- package/dist/use-search-C9bxCqfF.js +6 -0
- package/dist/use-search-DcfZSunO.cjs +6 -0
- package/package.json +26 -25
- package/src/client/app/config-context.tsx +38 -5
- package/src/client/app/doc-page.tsx +34 -0
- package/src/client/app/mdx-component.tsx +2 -3
- package/src/client/app/mdx-components-context.tsx +27 -2
- package/src/client/app/routes-context.tsx +34 -0
- package/src/client/app/scroll-handler.tsx +7 -4
- package/src/client/app/theme-context.tsx +71 -67
- package/src/client/components/default-layout.tsx +34 -33
- package/src/client/components/docs-layout.tsx +1 -2
- package/src/client/components/icons-dev.tsx +36 -5
- package/src/client/components/mdx/admonition.tsx +11 -27
- package/src/client/components/mdx/badge.tsx +1 -1
- package/src/client/components/mdx/button.tsx +3 -3
- package/src/client/components/mdx/card.tsx +1 -1
- package/src/client/components/mdx/code-block.tsx +90 -80
- package/src/client/components/mdx/component-preview.tsx +1 -5
- package/src/client/components/mdx/component-props.tsx +1 -1
- package/src/client/components/mdx/field.tsx +4 -5
- package/src/client/components/mdx/file-tree.tsx +6 -3
- package/src/client/components/mdx/hooks/use-code-block.ts +2 -2
- package/src/client/components/mdx/image.tsx +1 -1
- package/src/client/components/mdx/link.tsx +2 -2
- package/src/client/components/mdx/list.tsx +1 -1
- package/src/client/components/mdx/table.tsx +1 -1
- package/src/client/components/mdx/tabs.tsx +1 -1
- package/src/client/components/primitives/breadcrumbs.tsx +1 -7
- package/src/client/components/primitives/button-group.tsx +1 -1
- package/src/client/components/primitives/button.tsx +1 -1
- package/src/client/components/primitives/code-block.tsx +113 -0
- package/src/client/components/primitives/link.tsx +23 -41
- package/src/client/components/primitives/menu.tsx +5 -6
- package/src/client/components/primitives/navbar.tsx +6 -18
- package/src/client/components/primitives/navigation-menu.tsx +4 -4
- package/src/client/components/primitives/on-this-page.tsx +6 -10
- package/src/client/components/primitives/page-nav.tsx +4 -9
- package/src/client/components/primitives/popover.tsx +1 -1
- package/src/client/components/primitives/search-dialog.tsx +3 -6
- package/src/client/components/primitives/sidebar.tsx +80 -22
- package/src/client/components/primitives/skeleton.tsx +1 -1
- package/src/client/components/primitives/tabs.tsx +4 -11
- package/src/client/components/primitives/tooltip.tsx +3 -3
- package/src/client/components/ui-base/breadcrumbs.tsx +4 -6
- package/src/client/components/ui-base/copy-markdown.tsx +2 -7
- package/src/client/components/ui-base/github-stars.tsx +2 -2
- package/src/client/components/ui-base/head.tsx +58 -51
- package/src/client/components/ui-base/loading.tsx +2 -2
- package/src/client/components/ui-base/navbar.tsx +12 -14
- package/src/client/components/ui-base/not-found.tsx +1 -1
- package/src/client/components/ui-base/on-this-page.tsx +6 -6
- package/src/client/components/ui-base/page-nav.tsx +4 -8
- package/src/client/components/ui-base/search-dialog.tsx +10 -8
- package/src/client/components/ui-base/sidebar.tsx +76 -23
- package/src/client/components/ui-base/tabs.tsx +9 -8
- package/src/client/components/ui-base/theme-toggle.tsx +2 -2
- package/src/client/hooks/use-i18n.ts +3 -3
- package/src/client/hooks/use-localized-to.ts +1 -1
- package/src/client/hooks/use-navbar.ts +8 -6
- package/src/client/hooks/use-routes.ts +19 -11
- package/src/client/hooks/use-search.ts +1 -1
- package/src/client/hooks/use-sidebar.ts +48 -2
- package/src/client/hooks/use-tabs.ts +6 -2
- package/src/client/hooks/use-version.ts +3 -3
- package/src/client/index.ts +22 -22
- package/src/client/ssg/boltdocs-shell.tsx +127 -0
- package/src/client/ssg/create-routes.tsx +179 -0
- package/src/client/ssg/index.ts +3 -0
- package/src/client/ssg/mdx-page.tsx +37 -0
- package/src/client/store/boltdocs-context.tsx +66 -0
- package/src/client/theme/neutral.css +90 -50
- package/src/client/types.ts +5 -33
- package/src/client/utils/react-to-text.ts +34 -0
- package/CHANGELOG.md +0 -98
- package/dist/cache-3FOEPC2P.mjs +0 -1
- package/dist/chunk-5B5NKOW6.mjs +0 -77
- package/dist/chunk-J2PTDWZM.mjs +0 -1
- package/dist/chunk-TP5KMRD3.mjs +0 -1
- package/dist/chunk-Y4RE5KI7.mjs +0 -1
- package/dist/client/index.d.mts +0 -1263
- package/dist/client/index.mjs +0 -1
- package/dist/client/ssr.d.mts +0 -78
- package/dist/client/ssr.d.ts +0 -78
- package/dist/client/ssr.js +0 -1
- package/dist/client/ssr.mjs +0 -1
- package/dist/node/cli-entry.d.ts +0 -1
- package/dist/node/cli-entry.js +0 -82
- package/dist/node/index.d.ts +0 -567
- package/dist/node/index.js +0 -77
- package/dist/package-QFIAETHR.mjs +0 -1
- package/dist/search-dialog-O6VLVSOA.mjs +0 -1
- package/src/client/app/index.tsx +0 -345
- package/src/client/app/mdx-page.tsx +0 -15
- package/src/client/app/preload.tsx +0 -66
- package/src/client/app/router.tsx +0 -30
- package/src/client/integrations/codesandbox.ts +0 -179
- package/src/client/integrations/index.ts +0 -1
- package/src/client/ssr.tsx +0 -65
- package/src/client/store/use-boltdocs-store.ts +0 -44
- package/src/node/cache.ts +0 -408
- package/src/node/cli/build.ts +0 -53
- package/src/node/cli/dev.ts +0 -22
- package/src/node/cli/doctor.ts +0 -243
- package/src/node/cli/index.ts +0 -9
- package/src/node/cli/ui.ts +0 -54
- package/src/node/cli-entry.ts +0 -24
- package/src/node/config.ts +0 -382
- package/src/node/errors.ts +0 -44
- package/src/node/index.ts +0 -84
- package/src/node/mdx/cache.ts +0 -12
- package/src/node/mdx/highlighter.ts +0 -47
- package/src/node/mdx/index.ts +0 -122
- package/src/node/mdx/rehype-shiki.ts +0 -62
- package/src/node/mdx/remark-code-meta.ts +0 -35
- package/src/node/mdx/remark-shiki.ts +0 -61
- package/src/node/plugin/entry.ts +0 -87
- package/src/node/plugin/html.ts +0 -99
- package/src/node/plugin/index.ts +0 -478
- package/src/node/plugin/types.ts +0 -9
- package/src/node/plugins/index.ts +0 -17
- package/src/node/plugins/plugin-errors.ts +0 -62
- package/src/node/plugins/plugin-lifecycle.ts +0 -117
- package/src/node/plugins/plugin-sandbox.ts +0 -59
- package/src/node/plugins/plugin-store.ts +0 -54
- package/src/node/plugins/plugin-types.ts +0 -107
- package/src/node/plugins/plugin-validator.ts +0 -105
- package/src/node/routes/cache.ts +0 -28
- package/src/node/routes/index.ts +0 -293
- package/src/node/routes/parser.ts +0 -262
- package/src/node/routes/sorter.ts +0 -42
- package/src/node/routes/types.ts +0 -61
- package/src/node/schema/config.ts +0 -195
- package/src/node/schema/frontmatter.ts +0 -17
- package/src/node/search/index.ts +0 -55
- package/src/node/security/constants/index.ts +0 -10
- package/src/node/security/csp.ts +0 -31
- package/src/node/security/headers.ts +0 -27
- package/src/node/ssg/index.ts +0 -205
- package/src/node/ssg/meta.ts +0 -33
- package/src/node/ssg/options.ts +0 -15
- package/src/node/ssg/robots.ts +0 -53
- package/src/node/ssg/sitemap.ts +0 -55
- package/src/node/utils.ts +0 -349
- package/tsconfig.json +0 -26
- 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();
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
export { };
|
package/dist/node/cli-entry.mjs
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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;
|