@stacksjs/bunpress 0.1.4 → 0.1.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.
@@ -18,6 +18,644 @@ export declare function getVitePressCustomBlocks(): string;
18
18
  * Get VitePress code group styles only
19
19
  */
20
20
  export declare function getVitePressCodeGroups(): string;
21
+ // Layout / chrome styles — classes referenced by layout-doc.stx, layout-page.stx, layout-home.stx,
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
25
+ * -------------------------------------------------------------------------- */
26
+
27
+ .Layout {
28
+ min-height: 100vh;
29
+ }
30
+
31
+ /* VPNav — top bar */
32
+ .VPNav {
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
+ .VPNavBar {
45
+ max-width: var(--bp-layout-max-width, 1440px);
46
+ 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
+ .VPNavBarStart {
57
+ display: flex;
58
+ align-items: center;
59
+ gap: 24px;
60
+ flex: 1;
61
+ min-width: 0;
62
+ }
63
+
64
+ .VPNavBarEnd {
65
+ display: flex;
66
+ align-items: center;
67
+ gap: 24px;
68
+ flex-shrink: 0;
69
+ }
70
+
71
+ .VPNavBarTitle {
72
+ font-size: 16px;
73
+ font-weight: 600;
74
+ color: var(--bp-c-text-1);
75
+ white-space: nowrap;
76
+ text-decoration: none;
77
+ transition: color 0.25s;
78
+ }
79
+
80
+ .VPNavBarTitle:hover {
81
+ color: var(--bp-c-brand-1);
82
+ }
83
+
84
+ .VPNavBarMenu {
85
+ display: flex;
86
+ align-items: center;
87
+ gap: 24px;
88
+ }
89
+
90
+ .VPNavBarMenu a,
91
+ .VPNavBarMenu .VPNavBarMenu-link {
92
+ font-size: 14px;
93
+ font-weight: 500;
94
+ color: var(--bp-c-text-1);
95
+ text-decoration: none;
96
+ transition: color 0.25s;
97
+ cursor: pointer;
98
+ }
99
+
100
+ .VPNavBarMenu a:hover,
101
+ .VPNavBarMenu .VPNavBarMenu-link:hover,
102
+ .VPNavBarMenu a.is-active {
103
+ color: var(--bp-c-brand-1);
104
+ }
105
+
106
+ .VPNavBarMenu-group {
107
+ position: relative;
108
+ }
109
+
110
+ .VPNavBarMenu-group-button {
111
+ display: inline-flex;
112
+ align-items: center;
113
+ gap: 4px;
114
+ background: transparent;
115
+ border: none;
116
+ padding: 0;
117
+ font: inherit;
118
+ font-size: 14px;
119
+ font-weight: 500;
120
+ color: var(--bp-c-text-1);
121
+ cursor: pointer;
122
+ transition: color 0.25s;
123
+ }
124
+
125
+ .VPNavBarMenu-group-button:hover {
126
+ color: var(--bp-c-brand-1);
127
+ }
128
+
129
+ .VPNavBarMenu-group-button .chevron {
130
+ width: 12px;
131
+ height: 12px;
132
+ flex-shrink: 0;
133
+ transition: transform 0.25s;
134
+ }
135
+
136
+ .VPNavBarMenu-group:hover > .VPNavBarMenu-group-button .chevron {
137
+ transform: rotate(180deg);
138
+ }
139
+
140
+ .VPNavBarMenu-group-items {
141
+ display: none;
142
+ position: absolute;
143
+ right: 0;
144
+ top: 100%;
145
+ margin-top: 8px;
146
+ padding: 8px 0;
147
+ min-width: 192px;
148
+ background: var(--bp-c-bg);
149
+ border: 1px solid var(--bp-c-divider);
150
+ border-radius: 8px;
151
+ box-shadow: var(--bp-shadow-3, 0 12px 32px rgba(0, 0, 0, 0.1));
152
+ z-index: 10;
153
+ }
154
+
155
+ .VPNavBarMenu-group:hover > .VPNavBarMenu-group-items {
156
+ display: block;
157
+ }
158
+
159
+ .VPNavBarMenu-group-items a {
160
+ display: block;
161
+ padding: 6px 16px;
162
+ font-size: 13px;
163
+ color: var(--bp-c-text-1);
164
+ text-decoration: none;
165
+ transition: color 0.25s, background-color 0.25s;
166
+ }
167
+
168
+ .VPNavBarMenu-group-items a:hover {
169
+ color: var(--bp-c-brand-1);
170
+ background-color: var(--bp-c-bg-soft);
171
+ }
172
+
173
+ /* Search */
174
+ .VPNavBarSearch {
175
+ position: relative;
176
+ display: flex;
177
+ align-items: center;
178
+ max-width: 260px;
179
+ width: 100%;
180
+ }
181
+
182
+ .VPNavBarSearch-icon {
183
+ position: absolute;
184
+ left: 12px;
185
+ width: 16px;
186
+ height: 16px;
187
+ color: var(--bp-c-text-3);
188
+ pointer-events: none;
189
+ }
190
+
191
+ .VPNavBarSearch-input {
192
+ width: 100%;
193
+ height: 32px;
194
+ padding: 0 48px 0 36px;
195
+ font: inherit;
196
+ font-size: 13px;
197
+ background-color: var(--bp-c-bg-alt);
198
+ border: 1px solid var(--bp-c-divider);
199
+ border-radius: 4px;
200
+ color: var(--bp-c-text-1);
201
+ outline: none;
202
+ transition: border-color 0.25s, background-color 0.25s;
203
+ }
204
+
205
+ .VPNavBarSearch-input::placeholder {
206
+ color: var(--bp-c-text-3);
207
+ }
208
+
209
+ .VPNavBarSearch-input:hover,
210
+ .VPNavBarSearch-input:focus {
211
+ border-color: var(--bp-c-brand-1);
212
+ background-color: var(--bp-c-bg);
213
+ }
214
+
215
+ .VPNavBarSearch-kbd {
216
+ position: absolute;
217
+ right: 8px;
218
+ padding: 2px 6px;
219
+ font-size: 11px;
220
+ font-weight: 600;
221
+ font-family: inherit;
222
+ color: var(--bp-c-text-3);
223
+ background-color: var(--bp-c-bg);
224
+ border: 1px solid var(--bp-c-divider);
225
+ border-radius: 4px;
226
+ pointer-events: none;
227
+ }
228
+
229
+ /* Social/icon links cluster */
230
+ .VPSocialLinks {
231
+ display: flex;
232
+ align-items: center;
233
+ gap: 12px;
234
+ padding-left: 24px;
235
+ border-left: 1px solid var(--bp-c-divider);
236
+ }
237
+
238
+ .VPSocialLinks > a {
239
+ display: inline-flex;
240
+ align-items: center;
241
+ justify-content: center;
242
+ width: 32px;
243
+ height: 32px;
244
+ color: var(--bp-c-text-2);
245
+ border-radius: 4px;
246
+ transition: color 0.25s, background-color 0.25s;
247
+ }
248
+
249
+ .VPSocialLinks > a:hover {
250
+ color: var(--bp-c-text-1);
251
+ background-color: var(--bp-c-bg-soft);
252
+ }
253
+
254
+ .VPSocialLinks > a svg {
255
+ width: 20px;
256
+ height: 20px;
257
+ }
258
+
259
+ /* Content area */
260
+ .VPContent {
261
+ flex: 1;
262
+ }
263
+
264
+ .VPContent--doc {
265
+ position: fixed;
266
+ top: var(--bp-nav-height, 64px);
267
+ bottom: 0;
268
+ overflow-y: auto;
269
+ left: max(var(--bp-sidebar-width, 272px), calc((100vw - var(--bp-layout-max-width, 1440px)) / 2 + var(--bp-sidebar-width, 272px)));
270
+ right: max(0px, calc((100vw - var(--bp-layout-max-width, 1440px)) / 2));
271
+ }
272
+
273
+ .VPContent--page {
274
+ padding-top: var(--bp-nav-height, 64px);
275
+ }
276
+
277
+ .VPDoc {
278
+ padding: 32px 24px;
279
+ padding-right: 32px;
280
+ }
281
+
282
+ @media (min-width: 1280px) {
283
+ .VPDoc {
284
+ padding: 48px 32px 128px;
285
+ }
286
+ }
287
+
288
+ .VPDocContent {
289
+ max-width: 768px;
290
+ margin: 0;
291
+ }
292
+
293
+ .VPPage {
294
+ padding: 48px 24px;
295
+ max-width: 768px;
296
+ margin: 0 auto;
297
+ }
298
+
299
+ @media (min-width: 1280px) {
300
+ .VPPage {
301
+ padding: 64px 32px;
302
+ }
303
+ }
304
+
305
+ /* Mobile sidebar drawer behaviour */
306
+ @media (max-width: 959px) {
307
+ .VPNavBarSearch {
308
+ display: none;
309
+ }
310
+ .VPSocialLinks {
311
+ padding-left: 12px;
312
+ gap: 8px;
313
+ }
314
+ .VPNavBarMenu {
315
+ display: none;
316
+ }
317
+ }
318
+
319
+ /**
320
+ * Hero (home layout) — used by hero.stx + serve.ts generateHero
321
+ * -------------------------------------------------------------------------- */
322
+
323
+ .VPHero-name {
324
+ font-size: 20px;
325
+ font-weight: 700;
326
+ letter-spacing: -0.02em;
327
+ line-height: 1.2;
328
+ margin: 0 0 8px;
329
+ background: linear-gradient(135deg, var(--bp-c-brand-1, #5672cd) 0%, var(--bp-c-brand-2, #8b9cf7) 100%);
330
+ -webkit-background-clip: text;
331
+ -webkit-text-fill-color: transparent;
332
+ background-clip: text;
333
+ }
334
+
335
+ .VPHero-text {
336
+ font-size: 40px;
337
+ font-weight: 800;
338
+ letter-spacing: -0.02em;
339
+ line-height: 1.1;
340
+ color: var(--bp-c-text-1);
341
+ margin: 0 0 8px;
342
+ }
343
+
344
+ .VPHero-tagline {
345
+ font-size: 18px;
346
+ font-weight: 400;
347
+ line-height: 1.6;
348
+ color: var(--bp-c-text-2);
349
+ margin: 12px 0 0;
350
+ }
351
+
352
+ @media (min-width: 960px) {
353
+ .VPHero-name {
354
+ font-size: 24px;
355
+ }
356
+ .VPHero-text {
357
+ font-size: 56px;
358
+ }
359
+ .VPHero-tagline {
360
+ font-size: 20px;
361
+ }
362
+ }
363
+
364
+ .VPHero-actions {
365
+ display: flex;
366
+ flex-wrap: wrap;
367
+ gap: 12px;
368
+ margin-top: 28px;
369
+ }
370
+
371
+ .VPButton {
372
+ display: inline-flex;
373
+ align-items: center;
374
+ justify-content: center;
375
+ padding: 0 24px;
376
+ height: 40px;
377
+ font-size: 14px;
378
+ font-weight: 600;
379
+ border-radius: 20px;
380
+ text-decoration: none;
381
+ transition: background-color 0.25s, color 0.25s, border-color 0.25s;
382
+ border: 1px solid transparent;
383
+ white-space: nowrap;
384
+ cursor: pointer;
385
+ }
386
+
387
+ .VPButton-brand {
388
+ color: var(--bp-button-brand-text, #fff);
389
+ background-color: var(--bp-c-brand-1);
390
+ border-color: var(--bp-c-brand-1);
391
+ }
392
+
393
+ .VPButton-brand:hover {
394
+ background-color: var(--bp-c-brand-2);
395
+ border-color: var(--bp-c-brand-2);
396
+ }
397
+
398
+ .VPButton-alt {
399
+ color: var(--bp-c-text-1);
400
+ background-color: transparent;
401
+ border-color: var(--bp-c-divider);
402
+ }
403
+
404
+ .VPButton-alt:hover {
405
+ border-color: var(--bp-c-text-2);
406
+ color: var(--bp-c-brand-1);
407
+ }
408
+
409
+ /**
410
+ * Features grid — used by features.stx + serve.ts generateFeatures
411
+ * -------------------------------------------------------------------------- */
412
+
413
+ .VPHomeFeatures {
414
+ padding: 48px 24px;
415
+ border-top: 1px solid var(--bp-c-divider);
416
+ }
417
+
418
+ .VPHomeFeatures-inner {
419
+ max-width: 1152px;
420
+ margin: 0 auto;
421
+ }
422
+
423
+ .VPFeatures {
424
+ display: grid;
425
+ grid-template-columns: repeat(1, 1fr);
426
+ gap: 16px;
427
+ }
428
+
429
+ @media (min-width: 640px) {
430
+ .VPFeatures {
431
+ grid-template-columns: repeat(2, 1fr);
432
+ gap: 24px;
433
+ }
434
+ }
435
+
436
+ @media (min-width: 960px) {
437
+ .VPHomeFeatures {
438
+ padding: 64px 32px;
439
+ }
440
+ .VPFeatures {
441
+ grid-template-columns: repeat(3, 1fr);
442
+ }
443
+ }
444
+
445
+ .VPFeature {
446
+ display: block;
447
+ padding: 24px;
448
+ background-color: var(--bp-c-bg-soft, var(--bp-c-bg-alt));
449
+ border: 1px solid var(--bp-c-divider);
450
+ border-radius: 12px;
451
+ transition: border-color 0.25s, box-shadow 0.25s;
452
+ text-decoration: none;
453
+ color: inherit;
454
+ }
455
+
456
+ .VPFeature:hover {
457
+ border-color: var(--bp-c-brand-1);
458
+ box-shadow: 0 2px 12px rgba(86, 114, 205, 0.08);
459
+ }
460
+
461
+ .VPFeature-icon {
462
+ width: 40px;
463
+ height: 40px;
464
+ display: flex;
465
+ align-items: center;
466
+ justify-content: center;
467
+ border-radius: 8px;
468
+ background: var(--bp-c-brand-soft, rgba(86, 114, 205, 0.1));
469
+ color: var(--bp-c-brand-1);
470
+ margin-bottom: 12px;
471
+ }
472
+
473
+ .VPFeature-icon svg {
474
+ width: 24px;
475
+ height: 24px;
476
+ }
477
+
478
+ .VPFeature-icon-text {
479
+ font-size: 24px;
480
+ font-weight: 700;
481
+ }
482
+
483
+ .VPFeature-title {
484
+ margin: 0 0 8px;
485
+ font-size: 16px;
486
+ font-weight: 600;
487
+ line-height: 1.4;
488
+ color: var(--bp-c-text-1);
489
+ }
490
+
491
+ .VPFeature-details {
492
+ margin: 0;
493
+ font-size: 14px;
494
+ line-height: 1.6;
495
+ color: var(--bp-c-text-2);
496
+ }
497
+
498
+ /**
499
+ * Inline content — badges, external link icons
500
+ * -------------------------------------------------------------------------- */
501
+
502
+ .badge {
503
+ display: inline-block;
504
+ padding: 2px 8px;
505
+ font-size: 0.85em;
506
+ font-weight: 600;
507
+ border-radius: 4px;
508
+ margin: 0 4px;
509
+ vertical-align: middle;
510
+ border: 1px solid transparent;
511
+ line-height: 1.5;
512
+ }
513
+
514
+ .badge-tip {
515
+ background: var(--bp-c-tip-soft, rgba(16, 185, 129, 0.14));
516
+ color: var(--bp-c-tip-1, var(--bp-c-green-1));
517
+ border-color: var(--bp-c-tip-2, var(--bp-c-green-2));
518
+ }
519
+
520
+ .badge-info {
521
+ background: var(--bp-c-default-soft, var(--bp-c-gray-soft));
522
+ color: var(--bp-c-text-1);
523
+ border-color: var(--bp-c-divider);
524
+ }
525
+
526
+ .badge-warning {
527
+ background: var(--bp-c-warning-soft, rgba(234, 179, 8, 0.14));
528
+ color: var(--bp-c-warning-1, var(--bp-c-yellow-1));
529
+ border-color: var(--bp-c-warning-2, var(--bp-c-yellow-2));
530
+ }
531
+
532
+ .badge-danger {
533
+ background: var(--bp-c-danger-soft, rgba(244, 63, 94, 0.14));
534
+ color: var(--bp-c-danger-1, var(--bp-c-red-1));
535
+ border-color: var(--bp-c-danger-2, var(--bp-c-red-2));
536
+ }
537
+
538
+ .external-link-icon {
539
+ display: inline-block;
540
+ margin-left: 4px;
541
+ vertical-align: middle;
542
+ width: 12px;
543
+ height: 12px;
544
+ }
545
+
546
+ /**
547
+ * Polish: prose elements
548
+ * -------------------------------------------------------------------------- */
549
+
550
+ /* Subtle row hover on tables */
551
+ .bp-doc tr:hover {
552
+ background-color: var(--bp-c-bg-soft);
553
+ }
554
+
555
+ /* Mobile-safe table scroll */
556
+ .bp-doc table {
557
+ width: 100%;
558
+ max-width: 100%;
559
+ }
560
+
561
+ /* Slightly stronger blockquote with brand-tinted accent */
562
+ .bp-doc blockquote {
563
+ border-left-color: var(--bp-c-brand-1);
564
+ padding: 8px 0 8px 16px;
565
+ }
566
+
567
+ /* Code-block scrollbar */
568
+ .bp-doc [class*='language-'] pre::-webkit-scrollbar,
569
+ .bp-doc pre[data-lang]::-webkit-scrollbar {
570
+ height: 6px;
571
+ width: 6px;
572
+ }
573
+ .bp-doc [class*='language-'] pre::-webkit-scrollbar-thumb,
574
+ .bp-doc pre[data-lang]::-webkit-scrollbar-thumb {
575
+ background-color: var(--bp-c-divider);
576
+ border-radius: 3px;
577
+ }
578
+ .bp-doc [class*='language-'] pre::-webkit-scrollbar-thumb:hover,
579
+ .bp-doc pre[data-lang]::-webkit-scrollbar-thumb:hover {
580
+ background-color: var(--bp-c-text-3);
581
+ }
582
+
583
+ /* Heading anchor: keep it subtle */
584
+ .bp-doc .header-anchor {
585
+ color: var(--bp-c-text-3);
586
+ }
587
+ .bp-doc .header-anchor:hover,
588
+ .bp-doc .header-anchor:focus {
589
+ color: var(--bp-c-brand-1);
590
+ }
591
+
592
+ /**
593
+ * Mobile nav / sidebar drawer
594
+ * -------------------------------------------------------------------------- */
595
+
596
+ .VPNavBarHamburger {
597
+ display: none;
598
+ width: 32px;
599
+ height: 32px;
600
+ background: transparent;
601
+ border: none;
602
+ cursor: pointer;
603
+ align-items: center;
604
+ justify-content: center;
605
+ color: var(--bp-c-text-2);
606
+ border-radius: 4px;
607
+ padding: 0;
608
+ margin-left: -4px;
609
+ }
610
+
611
+ .VPNavBarHamburger:hover {
612
+ color: var(--bp-c-text-1);
613
+ background-color: var(--bp-c-bg-soft);
614
+ }
615
+
616
+ .VPNavBarHamburger svg {
617
+ width: 20px;
618
+ height: 20px;
619
+ }
620
+
621
+ @media (max-width: 959px) {
622
+ .VPNavBarHamburger {
623
+ display: inline-flex;
624
+ }
625
+
626
+ .VPSidebar {
627
+ transform: translateX(-100%);
628
+ transition: transform 0.25s ease, box-shadow 0.25s ease;
629
+ z-index: var(--bp-z-index-sidebar, 25);
630
+ background-color: var(--bp-c-bg-alt);
631
+ box-shadow: none;
632
+ }
633
+
634
+ .VPSidebar.is-open {
635
+ transform: translateX(0);
636
+ box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
637
+ }
638
+
639
+ .VPSidebar-backdrop {
640
+ position: fixed;
641
+ inset: 0;
642
+ background-color: rgba(0, 0, 0, 0.32);
643
+ opacity: 0;
644
+ pointer-events: none;
645
+ transition: opacity 0.2s ease;
646
+ z-index: calc(var(--bp-z-index-sidebar, 25) - 1);
647
+ }
648
+
649
+ .VPSidebar-backdrop.is-open {
650
+ opacity: 1;
651
+ pointer-events: auto;
652
+ }
653
+
654
+ .VPContent--doc {
655
+ left: 0;
656
+ }
657
+ }
658
+ `;
21
659
  export declare interface VitePressTheme {
22
660
  name: string
23
661
  getCSS: () => string