@stacksjs/bunpress 0.1.10 → 0.1.12

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 (41) hide show
  1. package/dist/bin/cli.d.ts +26 -0
  2. package/dist/bin/cli.js +1 -1
  3. package/dist/bin/commands/clean.d.ts +9 -0
  4. package/dist/bin/commands/config.d.ts +15 -0
  5. package/dist/bin/commands/doctor.d.ts +7 -0
  6. package/dist/bin/commands/init.d.ts +9 -0
  7. package/dist/bin/commands/new.d.ts +9 -0
  8. package/dist/bin/commands/preview.d.ts +11 -0
  9. package/dist/bin/commands/seo.d.ts +7 -0
  10. package/dist/bin/commands/stats.d.ts +8 -0
  11. package/dist/bin/utils.d.ts +83 -0
  12. package/dist/{chunk-tq2kjbdt.js → chunk-b99gqcxe.js} +1 -1
  13. package/dist/{chunk-m2sfy11z.js → chunk-e5q66hsy.js} +23 -3
  14. package/dist/{chunk-grmd2vh0.js → chunk-jxdbykx2.js} +14 -14
  15. package/dist/chunk-mch0qmg4.js +688 -0
  16. package/dist/{chunk-m80bkzqg.js → chunk-w17epehd.js} +108 -68
  17. package/dist/{chunk-hk0kwwga.js → chunk-z0v4c8zz.js} +1 -1
  18. package/dist/src/index.js +1 -1
  19. package/dist/{themes → src/themes}/bun/index.d.ts +1 -0
  20. package/dist/{themes → src/themes}/index.d.ts +3 -6
  21. package/dist/src/themes/vitepress/index.d.ts +33 -0
  22. package/dist/{types.d.ts → src/types.d.ts} +11 -0
  23. package/dist/templates/layout-doc.stx +1 -1
  24. package/dist/templates/layout-home.stx +1 -1
  25. package/dist/templates/layout-page.stx +1 -1
  26. package/dist/templates/sidebar-section.stx +1 -1
  27. package/dist/themes/vitepress/index.ts +20 -0
  28. package/package.json +4 -4
  29. package/dist/chunk-rfaz4x5j.js +0 -658
  30. package/dist/themes/vitepress/index.d.ts +0 -670
  31. /package/dist/{config.d.ts → src/config.d.ts} +0 -0
  32. /package/dist/{data-loader.d.ts → src/data-loader.d.ts} +0 -0
  33. /package/dist/{highlighter.d.ts → src/highlighter.d.ts} +0 -0
  34. /package/dist/{index.d.ts → src/index.d.ts} +0 -0
  35. /package/dist/{robots.d.ts → src/robots.d.ts} +0 -0
  36. /package/dist/{rss.d.ts → src/rss.d.ts} +0 -0
  37. /package/dist/{serve.d.ts → src/serve.d.ts} +0 -0
  38. /package/dist/{sitemap.d.ts → src/sitemap.d.ts} +0 -0
  39. /package/dist/{stx-components.d.ts → src/stx-components.d.ts} +0 -0
  40. /package/dist/{template-loader.d.ts → src/template-loader.d.ts} +0 -0
  41. /package/dist/{toc.d.ts → src/toc.d.ts} +0 -0
@@ -1,670 +0,0 @@
1
- /**
2
- * Get all VitePress theme CSS combined
3
- */
4
- export declare function getVitePressThemeCSS(): string;
5
- /**
6
- * Get VitePress theme CSS variables only
7
- */
8
- export declare function getVitePressVars(): string;
9
- /**
10
- * Get VitePress base styles only
11
- */
12
- export declare function getVitePressBase(): string;
13
- /**
14
- * Get VitePress custom block styles only
15
- */
16
- export declare function getVitePressCustomBlocks(): string;
17
- /**
18
- * Get VitePress code group styles only
19
- */
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
- /* 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);
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
- .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
- 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
- }
438
-
439
- @media (min-width: 960px) {
440
- .BPHomeFeatures {
441
- padding: 64px 32px;
442
- }
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
- }
500
-
501
- /**
502
- * Inline content — badges, external link icons
503
- * -------------------------------------------------------------------------- */
504
-
505
- .badge {
506
- display: inline-block;
507
- padding: 2px 8px;
508
- font-size: 0.85em;
509
- font-weight: 600;
510
- border-radius: 4px;
511
- margin: 0 4px;
512
- vertical-align: middle;
513
- border: 1px solid transparent;
514
- line-height: 1.5;
515
- }
516
-
517
- .badge-tip {
518
- background: var(--bp-c-tip-soft, rgba(16, 185, 129, 0.14));
519
- color: var(--bp-c-tip-1, var(--bp-c-green-1));
520
- border-color: var(--bp-c-tip-2, var(--bp-c-green-2));
521
- }
522
-
523
- .badge-info {
524
- background: var(--bp-c-default-soft, var(--bp-c-gray-soft));
525
- color: var(--bp-c-text-1);
526
- border-color: var(--bp-c-divider);
527
- }
528
-
529
- .badge-warning {
530
- background: var(--bp-c-warning-soft, rgba(234, 179, 8, 0.14));
531
- color: var(--bp-c-warning-1, var(--bp-c-yellow-1));
532
- border-color: var(--bp-c-warning-2, var(--bp-c-yellow-2));
533
- }
534
-
535
- .badge-danger {
536
- background: var(--bp-c-danger-soft, rgba(244, 63, 94, 0.14));
537
- color: var(--bp-c-danger-1, var(--bp-c-red-1));
538
- border-color: var(--bp-c-danger-2, var(--bp-c-red-2));
539
- }
540
-
541
- .external-link-icon {
542
- display: inline-block;
543
- margin-left: 4px;
544
- vertical-align: middle;
545
- width: 12px;
546
- height: 12px;
547
- }
548
-
549
- /**
550
- * Polish: prose elements
551
- * -------------------------------------------------------------------------- */
552
-
553
- /* Subtle row hover on tables */
554
- .bp-doc tr:hover {
555
- background-color: var(--bp-c-bg-soft);
556
- }
557
-
558
- /* Mobile-safe table scroll */
559
- .bp-doc table {
560
- width: 100%;
561
- max-width: 100%;
562
- }
563
-
564
- /* Slightly stronger blockquote with brand-tinted accent */
565
- .bp-doc blockquote {
566
- border-left-color: var(--bp-c-brand-1);
567
- padding: 8px 0 8px 16px;
568
- }
569
-
570
- /* Code-block scrollbar */
571
- .bp-doc [class*='language-'] pre::-webkit-scrollbar,
572
- .bp-doc pre[data-lang]::-webkit-scrollbar {
573
- height: 6px;
574
- width: 6px;
575
- }
576
- .bp-doc [class*='language-'] pre::-webkit-scrollbar-thumb,
577
- .bp-doc pre[data-lang]::-webkit-scrollbar-thumb {
578
- background-color: var(--bp-c-divider);
579
- border-radius: 3px;
580
- }
581
- .bp-doc [class*='language-'] pre::-webkit-scrollbar-thumb:hover,
582
- .bp-doc pre[data-lang]::-webkit-scrollbar-thumb:hover {
583
- background-color: var(--bp-c-text-3);
584
- }
585
-
586
- /* Heading anchor: keep it subtle */
587
- .bp-doc .header-anchor {
588
- color: var(--bp-c-text-3);
589
- }
590
- .bp-doc .header-anchor:hover,
591
- .bp-doc .header-anchor:focus {
592
- color: var(--bp-c-brand-1);
593
- }
594
-
595
- /**
596
- * Mobile nav / sidebar drawer
597
- * -------------------------------------------------------------------------- */
598
-
599
- .BPNavBarHamburger {
600
- display: none;
601
- width: 32px;
602
- height: 32px;
603
- background: transparent;
604
- border: none;
605
- cursor: pointer;
606
- align-items: center;
607
- justify-content: center;
608
- color: var(--bp-c-text-2);
609
- border-radius: 4px;
610
- padding: 0;
611
- margin-left: -4px;
612
- }
613
-
614
- .BPNavBarHamburger:hover {
615
- color: var(--bp-c-text-1);
616
- background-color: var(--bp-c-bg-soft);
617
- }
618
-
619
- .BPNavBarHamburger svg {
620
- width: 20px;
621
- height: 20px;
622
- }
623
-
624
- @media (max-width: 959px) {
625
- .BPNavBarHamburger {
626
- display: inline-flex;
627
- }
628
-
629
- .BPSidebar {
630
- transform: translateX(-100%);
631
- transition: transform 0.25s ease, box-shadow 0.25s ease;
632
- z-index: var(--bp-z-index-sidebar, 25);
633
- background-color: var(--bp-c-bg-alt);
634
- box-shadow: none;
635
- }
636
-
637
- .BPSidebar.is-open {
638
- transform: translateX(0);
639
- box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
640
- }
641
-
642
- .BPSidebar-backdrop {
643
- position: fixed;
644
- inset: 0;
645
- background-color: rgba(0, 0, 0, 0.32);
646
- opacity: 0;
647
- pointer-events: none;
648
- transition: opacity 0.2s ease;
649
- z-index: calc(var(--bp-z-index-sidebar, 25) - 1);
650
- }
651
-
652
- .BPSidebar-backdrop.is-open {
653
- opacity: 1;
654
- pointer-events: auto;
655
- }
656
-
657
- .BPContent--doc {
658
- left: 0;
659
- }
660
- }
661
- `;
662
- export declare interface VitePressTheme {
663
- name: string
664
- getCSS: () => string
665
- getVars: () => string
666
- getBase: () => string
667
- getCustomBlocks: () => string
668
- getCodeGroups: () => string
669
- }
670
- export default vitePressTheme;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes