@stacksjs/bunpress 0.1.10 → 0.1.11

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.
@@ -20,482 +20,22 @@ export declare function getVitePressCustomBlocks(): string;
20
20
  export declare function getVitePressCodeGroups(): string;
21
21
  // Layout / chrome styles — classes referenced by layout-doc.stx, layout-page.stx, layout-home.stx,
22
22
  // and the nav/sidebar generators in serve.ts. Keeps templates declarative and dark-mode aware.
23
- export declare const layoutCSS: `/**
24
- * VitePress Theme for BunPress - Layout & Chrome
23
+ export declare const layoutCSS: .BPHome-content > .bp-doc.vp-doc.container by markdownToHtml.
25
24
  * -------------------------------------------------------------------------- */
26
25
 
27
- .Layout {
28
- min-height: 100vh;
26
+ .BPHome-content {
27
+ padding: 48px 24px 96px;
29
28
  }
30
29
 
31
- /* BPNav — top bar */
32
- .BPNav {
33
- position: fixed;
34
- top: 0;
35
- left: 0;
36
- right: 0;
37
- height: var(--bp-nav-height, 64px);
38
- background-color: var(--bp-nav-bg-color, var(--bp-c-bg));
39
- border-bottom: 1px solid var(--bp-c-divider);
40
- z-index: var(--bp-z-index-nav, 30);
41
- backdrop-filter: saturate(50%) blur(8px);
42
- }
43
-
44
- .BPNavBar {
45
- max-width: var(--bp-layout-max-width, 1440px);
30
+ .BPHome-content .container {
46
31
  margin: 0 auto;
47
- width: 100%;
48
- height: 100%;
49
- display: flex;
50
- align-items: center;
51
- justify-content: space-between;
52
- padding: 0 24px;
53
- gap: 24px;
54
- }
55
-
56
- .BPNavBarStart {
57
- display: flex;
58
- align-items: center;
59
- gap: 24px;
60
- flex: 1;
61
- min-width: 0;
62
- }
63
-
64
- .BPNavBarEnd {
65
- display: flex;
66
- align-items: center;
67
- gap: 24px;
68
- flex-shrink: 0;
69
- }
70
-
71
- .BPNavBarTitle {
72
- display: inline-flex;
73
- align-items: center;
74
- font-size: 16px;
75
- font-weight: 750;
76
- color: var(--bp-c-text-1);
77
- white-space: nowrap;
78
- text-decoration: none;
79
- transition: color 0.25s;
80
- }
81
-
82
- .BPNavBarTitle:hover {
83
- color: var(--bp-c-brand-1);
84
- }
85
-
86
- .BPNavBarMenu {
87
- display: flex;
88
- align-items: center;
89
- gap: 24px;
90
- }
91
-
92
- .BPNavBarMenu a,
93
- .BPNavBarMenu .BPNavBarMenu-link {
94
- font-size: 14px;
95
- font-weight: 600;
96
- color: var(--bp-c-text-2);
97
- text-decoration: none;
98
- transition: color 0.25s;
99
- cursor: pointer;
100
- }
101
-
102
- .BPNavBarMenu a:hover,
103
- .BPNavBarMenu .BPNavBarMenu-link:hover,
104
- .BPNavBarMenu a.is-active {
105
- color: var(--bp-c-brand-1);
106
- }
107
-
108
- .BPNavBarMenu-group {
109
- position: relative;
110
- }
111
-
112
- .BPNavBarMenu-group-button {
113
- display: inline-flex;
114
- align-items: center;
115
- gap: 4px;
116
- background: transparent;
117
- border: none;
118
- padding: 0;
119
- font: inherit;
120
- font-size: 14px;
121
- font-weight: 500;
122
- color: var(--bp-c-text-1);
123
- cursor: pointer;
124
- transition: color 0.25s;
125
- }
126
-
127
- .BPNavBarMenu-group-button:hover {
128
- color: var(--bp-c-brand-1);
129
- }
130
-
131
- .BPNavBarMenu-group-button .chevron {
132
- width: 12px;
133
- height: 12px;
134
- flex-shrink: 0;
135
- transition: transform 0.25s;
136
- }
137
-
138
- .BPNavBarMenu-group:hover > .BPNavBarMenu-group-button .chevron {
139
- transform: rotate(180deg);
140
- }
141
-
142
- .BPNavBarMenu-group-items {
143
- display: none;
144
- position: absolute;
145
- right: 0;
146
- top: 100%;
147
- margin-top: 8px;
148
- padding: 8px 0;
149
- min-width: 192px;
150
- background: var(--bp-c-bg);
151
- border: 1px solid var(--bp-c-divider);
152
- border-radius: 8px;
153
- box-shadow: var(--bp-shadow-3, 0 12px 32px rgba(0, 0, 0, 0.1));
154
- z-index: 10;
155
- }
156
-
157
- .BPNavBarMenu-group:hover > .BPNavBarMenu-group-items {
158
- display: block;
159
- }
160
-
161
- .BPNavBarMenu-group-items a {
162
- display: block;
163
- padding: 6px 16px;
164
- font-size: 13px;
165
- color: var(--bp-c-text-1);
166
- text-decoration: none;
167
- transition: color 0.25s, background-color 0.25s;
168
- }
169
-
170
- .BPNavBarMenu-group-items a:hover {
171
- color: var(--bp-c-brand-1);
172
- background-color: var(--bp-c-bg-soft);
173
- }
174
-
175
- /* Search */
176
- .BPNavBarSearch {
177
- position: relative;
178
- display: flex;
179
- align-items: center;
180
- max-width: 260px;
181
- width: 100%;
182
- }
183
-
184
- .BPNavBarSearch-icon {
185
- position: absolute;
186
- left: 12px;
187
- width: 16px;
188
- height: 16px;
189
- color: var(--bp-c-text-3);
190
- pointer-events: none;
191
- }
192
-
193
- .BPNavBarSearch-input {
194
- width: 100%;
195
- height: 32px;
196
- padding: 0 48px 0 36px;
197
- font: inherit;
198
- font-size: 13px;
199
- background-color: var(--bp-c-bg-alt);
200
- border: 1px solid var(--bp-c-divider);
201
- border-radius: 4px;
202
- color: var(--bp-c-text-1);
203
- outline: none;
204
- transition: border-color 0.25s, background-color 0.25s;
205
- }
206
-
207
- .BPNavBarSearch-input::placeholder {
208
- color: var(--bp-c-text-3);
209
- }
210
-
211
- .BPNavBarSearch-input:hover,
212
- .BPNavBarSearch-input:focus {
213
- border-color: var(--bp-c-brand-1);
214
- background-color: var(--bp-c-bg);
215
- }
216
-
217
- .BPNavBarSearch-kbd {
218
- position: absolute;
219
- right: 8px;
220
- padding: 2px 6px;
221
- font-size: 11px;
222
- font-weight: 600;
223
- font-family: inherit;
224
- color: var(--bp-c-text-3);
225
- background-color: var(--bp-c-bg);
226
- border: 1px solid var(--bp-c-divider);
227
- border-radius: 4px;
228
- pointer-events: none;
229
- }
230
-
231
- /* Social/icon links cluster */
232
- .BPSocialLinks {
233
- display: flex;
234
- align-items: center;
235
- gap: 12px;
236
- padding-left: 24px;
237
- border-left: 1px solid var(--bp-c-divider);
238
- }
239
-
240
- .BPSocialLinks > a {
241
- display: inline-flex;
242
- align-items: center;
243
- justify-content: center;
244
- width: 32px;
245
- height: 32px;
246
- color: var(--bp-c-text-2);
247
- border-radius: 4px;
248
- transition: color 0.25s, background-color 0.25s;
249
- }
250
-
251
- .BPSocialLinks > a:hover {
252
- color: var(--bp-c-text-1);
253
- background-color: var(--bp-c-bg-soft);
254
- }
255
-
256
- .BPSocialLinks > a svg {
257
- width: 20px;
258
- height: 20px;
259
- }
260
-
261
- /* Content area */
262
- .BPContent {
263
- flex: 1;
264
- }
265
-
266
- .BPContent--doc {
267
- position: fixed;
268
- top: var(--bp-nav-height, 64px);
269
- bottom: 0;
270
- overflow-y: auto;
271
- left: max(var(--bp-sidebar-width, 272px), calc((100vw - var(--bp-layout-max-width, 1440px)) / 2 + var(--bp-sidebar-width, 272px)));
272
- right: max(0px, calc((100vw - var(--bp-layout-max-width, 1440px)) / 2));
273
- }
274
-
275
- .BPContent--page {
276
- padding-top: var(--bp-nav-height, 64px);
277
- }
278
-
279
- .BPDoc {
280
- padding: 32px 24px;
281
- padding-right: 32px;
282
- }
283
-
284
- @media (min-width: 1280px) {
285
- .BPDoc {
286
- padding: 48px 32px 128px;
287
- }
288
- }
289
-
290
- .BPDocContent {
291
- max-width: 768px;
292
- margin: 0;
293
- }
294
-
295
- .BPPage {
296
- padding: 48px 24px;
297
- max-width: 768px;
298
- margin: 0 auto;
299
- }
300
-
301
- @media (min-width: 1280px) {
302
- .BPPage {
303
- padding: 64px 32px;
304
- }
305
- }
306
-
307
- /* Mobile sidebar drawer behaviour */
308
- @media (max-width: 959px) {
309
- .BPNavBarSearch {
310
- display: none;
311
- }
312
- .BPSocialLinks {
313
- padding-left: 12px;
314
- gap: 8px;
315
- }
316
- .BPNavBarMenu {
317
- display: none;
318
- }
319
- }
320
-
321
- /**
322
- * Hero (home layout) — used by hero.stx + serve.ts generateHero
323
- * -------------------------------------------------------------------------- */
324
-
325
- .BPHero-name {
326
- font-size: 22px;
327
- font-weight: 700;
328
- letter-spacing: -0.02em;
329
- line-height: 1.2;
330
- margin: 0 0 8px;
331
- background: linear-gradient(135deg, var(--bp-c-brand-1, #5672cd) 0%, var(--bp-c-brand-2, #8b9cf7) 100%);
332
- -webkit-background-clip: text;
333
- -webkit-text-fill-color: transparent;
334
- background-clip: text;
335
- }
336
-
337
- .BPHero-text {
338
- font-size: 48px;
339
- font-weight: 800;
340
- letter-spacing: -0.02em;
341
- line-height: 1.1;
342
- color: var(--bp-c-text-1);
343
- margin: 0 0 8px;
344
- }
345
-
346
- .BPHero-tagline {
347
- max-width: 720px;
348
- font-size: 18px;
349
- font-weight: 400;
350
- line-height: 1.6;
351
- color: var(--bp-c-text-2);
352
- margin: 12px 0 0;
353
- }
354
-
355
- @media (min-width: 960px) {
356
- .BPHero-name {
357
- font-size: 24px;
358
- }
359
- .BPHero-text {
360
- font-size: 56px;
361
- }
362
- .BPHero-tagline {
363
- font-size: 20px;
364
- }
365
- }
366
-
367
- .BPHero-actions {
368
- display: flex;
369
- flex-wrap: wrap;
370
- gap: 12px;
371
- margin-top: 28px;
372
- }
373
-
374
- .BPButton {
375
- display: inline-flex;
376
- align-items: center;
377
- justify-content: center;
378
- padding: 0 24px;
379
- height: 40px;
380
- font-size: 14px;
381
- font-weight: 600;
382
- border-radius: 20px;
383
- text-decoration: none;
384
- transition: background-color 0.25s, color 0.25s, border-color 0.25s;
385
- border: 1px solid transparent;
386
- white-space: nowrap;
387
- cursor: pointer;
388
- }
389
-
390
- .BPButton-brand {
391
- color: var(--bp-button-brand-text, #03110b);
392
- background-color: var(--bp-c-brand-1);
393
- border-color: var(--bp-c-brand-1);
394
- }
395
-
396
- .BPButton-brand:hover {
397
- background-color: var(--bp-c-brand-2);
398
- border-color: var(--bp-c-brand-2);
399
- }
400
-
401
- .BPButton-alt {
402
- color: var(--bp-c-text-1);
403
- background-color: transparent;
404
- border-color: var(--bp-c-divider);
405
- }
406
-
407
- .BPButton-alt:hover {
408
- border-color: var(--bp-c-text-2);
409
- color: var(--bp-c-brand-1);
410
- }
411
-
412
- /**
413
- * Features grid — used by features.stx + serve.ts generateFeatures
414
- * -------------------------------------------------------------------------- */
415
-
416
- .BPHomeFeatures {
417
- padding: 48px 24px;
418
- border-top: 1px solid var(--bp-c-divider);
419
- }
420
-
421
- .BPHomeFeatures-inner {
422
32
  max-width: 1152px;
423
- margin: 0 auto;
424
- }
425
-
426
- .BPFeatures {
427
- display: grid;
428
- grid-template-columns: repeat(1, 1fr);
429
- gap: 16px;
430
- }
431
-
432
- @media (min-width: 640px) {
433
- .BPFeatures {
434
- grid-template-columns: repeat(2, 1fr);
435
- gap: 24px;
436
- }
437
33
  }
438
34
 
439
35
  @media (min-width: 960px) {
440
- .BPHomeFeatures {
441
- padding: 64px 32px;
36
+ .BPHome-content {
37
+ padding: 64px 32px 128px;
442
38
  }
443
- .BPFeatures {
444
- grid-template-columns: repeat(3, 1fr);
445
- }
446
- }
447
-
448
- .BPFeature {
449
- display: block;
450
- padding: 26px;
451
- background-color: var(--bp-c-bg-soft, var(--bp-c-bg-alt));
452
- border: 1px solid var(--bp-c-divider);
453
- border-radius: 12px;
454
- transition: border-color 0.25s, box-shadow 0.25s;
455
- text-decoration: none;
456
- color: inherit;
457
- }
458
-
459
- .BPFeature:hover {
460
- border-color: var(--bp-c-brand-1);
461
- box-shadow: 0 2px 12px rgba(86, 114, 205, 0.08);
462
- }
463
-
464
- .BPFeature-icon {
465
- width: 40px;
466
- height: 40px;
467
- display: flex;
468
- align-items: center;
469
- justify-content: center;
470
- border-radius: 8px;
471
- background: var(--bp-c-brand-soft, rgba(86, 114, 205, 0.1));
472
- color: var(--bp-c-brand-1);
473
- margin-bottom: 12px;
474
- }
475
-
476
- .BPFeature-icon svg {
477
- width: 24px;
478
- height: 24px;
479
- }
480
-
481
- .BPFeature-icon-text {
482
- font-size: 24px;
483
- font-weight: 700;
484
- }
485
-
486
- .BPFeature-title {
487
- margin: 0 0 8px;
488
- font-size: 16px;
489
- font-weight: 600;
490
- line-height: 1.4;
491
- color: var(--bp-c-text-1);
492
- }
493
-
494
- .BPFeature-details {
495
- margin: 0;
496
- font-size: 14px;
497
- line-height: 1.6;
498
- color: var(--bp-c-text-2);
499
39
  }
500
40
 
501
41
  /**
@@ -2381,6 +2381,26 @@ export const layoutCSS = `/**
2381
2381
  color: var(--bp-c-text-2);
2382
2382
  }
2383
2383
 
2384
+ /**
2385
+ * Home page markdown body — rendered below the hero + features grid.
2386
+ * Wrapped as .BPHome-content > .bp-doc.vp-doc.container by markdownToHtml.
2387
+ * -------------------------------------------------------------------------- */
2388
+
2389
+ .BPHome-content {
2390
+ padding: 48px 24px 96px;
2391
+ }
2392
+
2393
+ .BPHome-content .container {
2394
+ margin: 0 auto;
2395
+ max-width: 1152px;
2396
+ }
2397
+
2398
+ @media (min-width: 960px) {
2399
+ .BPHome-content {
2400
+ padding: 64px 32px 128px;
2401
+ }
2402
+ }
2403
+
2384
2404
  /**
2385
2405
  * Inline content — badges, external link icons
2386
2406
  * -------------------------------------------------------------------------- */
package/dist/types.d.ts CHANGED
@@ -2,6 +2,7 @@ export declare interface BunPressConfig {
2
2
  verbose: boolean
3
3
  title?: string
4
4
  description?: string
5
+ darkMode?: boolean | 'auto' | 'dark' | 'light'
5
6
  themeConfig?: ThemeConfig & {
6
7
  sidebar?: SidebarItem[] | Record<string, SidebarItem[]>
7
8
  nav?: NavItem[]
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/bunpress",
3
3
  "type": "module",
4
- "version": "0.1.10",
4
+ "version": "0.1.11",
5
5
  "description": "Modern documentation engine. Powered by Bun.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",