@stacksjs/bunpress 0.1.0 → 0.1.3

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 (54) hide show
  1. package/README.md +257 -26
  2. package/dist/bin/cli.js +2 -104
  3. package/dist/chunk-1ymh7yt2.js +9656 -0
  4. package/dist/chunk-8qj79f0y.js +2 -0
  5. package/dist/chunk-szme5v1e.js +8 -0
  6. package/dist/chunk-z0redasq.js +530 -0
  7. package/dist/config.d.ts +3 -5
  8. package/dist/highlighter.d.ts +2 -1
  9. package/dist/index.d.ts +2 -1
  10. package/dist/robots.d.ts +5 -0
  11. package/dist/rss.d.ts +16 -0
  12. package/dist/serve.d.ts +11 -1
  13. package/dist/sitemap.d.ts +5 -0
  14. package/dist/src/index.js +1 -1
  15. package/dist/template-loader.d.ts +5 -3
  16. package/dist/templates/blocks/alerts/caution.stx +9 -0
  17. package/dist/templates/blocks/alerts/important.stx +9 -0
  18. package/dist/templates/blocks/alerts/note.stx +9 -0
  19. package/dist/templates/blocks/alerts/tip.stx +9 -0
  20. package/dist/templates/blocks/alerts/warning.stx +9 -0
  21. package/dist/templates/blocks/containers/danger.stx +6 -0
  22. package/dist/templates/blocks/containers/details.stx +6 -0
  23. package/dist/templates/blocks/containers/info.stx +6 -0
  24. package/dist/templates/blocks/containers/raw.stx +3 -0
  25. package/dist/templates/blocks/containers/tip.stx +6 -0
  26. package/dist/templates/blocks/containers/warning.stx +6 -0
  27. package/dist/templates/blocks/inline/code.stx +1 -0
  28. package/dist/templates/blocks/inline/del.stx +1 -0
  29. package/dist/templates/blocks/inline/em.stx +1 -0
  30. package/dist/templates/blocks/inline/mark.stx +1 -0
  31. package/dist/templates/blocks/inline/strong.stx +1 -0
  32. package/dist/templates/blocks/inline/sub.stx +1 -0
  33. package/dist/templates/blocks/inline/sup.stx +1 -0
  34. package/dist/templates/features.stx +20 -0
  35. package/dist/templates/hero.stx +10 -0
  36. package/dist/templates/layout-doc.stx +157 -0
  37. package/dist/templates/layout-home.stx +23 -0
  38. package/dist/templates/layout-page.stx +40 -0
  39. package/dist/templates/page-toc.stx +267 -0
  40. package/dist/templates/sidebar-section.stx +42 -0
  41. package/dist/templates/sidebar.stx +54 -0
  42. package/dist/themes/bun/index.d.ts +34 -0
  43. package/dist/themes/index.d.ts +24 -0
  44. package/dist/themes/vitepress/base.css +549 -0
  45. package/dist/themes/vitepress/code-group.css +121 -0
  46. package/dist/themes/vitepress/custom-block.css +330 -0
  47. package/dist/themes/vitepress/index.d.ts +29 -0
  48. package/dist/themes/vitepress/index.ts +1963 -0
  49. package/dist/themes/vitepress/vars.css +436 -0
  50. package/dist/toc.d.ts +1 -1
  51. package/dist/types.d.ts +86 -5
  52. package/package.json +12 -39
  53. package/dist/chunk-he6c5f4e.js +0 -1354
  54. package/dist/plugin.d.ts +0 -0
@@ -0,0 +1,549 @@
1
+ /**
2
+ * VitePress Theme for BunPress - Base Styles
3
+ * -------------------------------------------------------------------------- */
4
+
5
+ @media (prefers-reduced-motion: reduce) {
6
+ *,
7
+ ::before,
8
+ ::after {
9
+ animation-delay: -1ms !important;
10
+ animation-duration: 1ms !important;
11
+ animation-iteration-count: 1 !important;
12
+ background-attachment: initial !important;
13
+ scroll-behavior: auto !important;
14
+ transition-duration: 0s !important;
15
+ transition-delay: 0s !important;
16
+ }
17
+ }
18
+
19
+ *,
20
+ ::before,
21
+ ::after {
22
+ box-sizing: border-box;
23
+ }
24
+
25
+ html {
26
+ line-height: 1.4;
27
+ font-size: 16px;
28
+ -webkit-text-size-adjust: 100%;
29
+ }
30
+
31
+ html.dark {
32
+ color-scheme: dark;
33
+ }
34
+
35
+ body {
36
+ margin: 0;
37
+ width: 100%;
38
+ min-width: 320px;
39
+ min-height: 100vh;
40
+ line-height: 24px;
41
+ font-family: var(--vp-font-family-base);
42
+ font-size: 16px;
43
+ font-weight: 400;
44
+ color: var(--vp-c-text-1);
45
+ background-color: var(--vp-c-bg);
46
+ font-synthesis: style;
47
+ text-rendering: optimizeLegibility;
48
+ -webkit-font-smoothing: antialiased;
49
+ -moz-osx-font-smoothing: grayscale;
50
+ }
51
+
52
+ main {
53
+ display: block;
54
+ }
55
+
56
+ h1,
57
+ h2,
58
+ h3,
59
+ h4,
60
+ h5,
61
+ h6 {
62
+ margin: 0;
63
+ line-height: 24px;
64
+ font-size: 16px;
65
+ font-weight: 400;
66
+ }
67
+
68
+ p {
69
+ margin: 0;
70
+ }
71
+
72
+ strong,
73
+ b {
74
+ font-weight: 600;
75
+ }
76
+
77
+ a,
78
+ area,
79
+ button,
80
+ [role='button'],
81
+ input,
82
+ label,
83
+ select,
84
+ summary,
85
+ textarea {
86
+ touch-action: manipulation;
87
+ }
88
+
89
+ a {
90
+ color: inherit;
91
+ text-decoration: inherit;
92
+ }
93
+
94
+ ol,
95
+ ul {
96
+ list-style: none;
97
+ margin: 0;
98
+ padding: 0;
99
+ }
100
+
101
+ blockquote {
102
+ margin: 0;
103
+ }
104
+
105
+ pre,
106
+ code,
107
+ kbd,
108
+ samp {
109
+ font-family: var(--vp-font-family-mono);
110
+ }
111
+
112
+ img,
113
+ svg,
114
+ video,
115
+ canvas,
116
+ audio,
117
+ iframe,
118
+ embed,
119
+ object {
120
+ display: block;
121
+ }
122
+
123
+ figure {
124
+ margin: 0;
125
+ }
126
+
127
+ img,
128
+ video {
129
+ max-width: 100%;
130
+ height: auto;
131
+ }
132
+
133
+ button,
134
+ input,
135
+ optgroup,
136
+ select,
137
+ textarea {
138
+ border: 0;
139
+ padding: 0;
140
+ line-height: inherit;
141
+ color: inherit;
142
+ }
143
+
144
+ /**
145
+ * VPDoc Styles - Documentation Content
146
+ * -------------------------------------------------------------------------- */
147
+
148
+ .vp-doc h1,
149
+ .vp-doc h2,
150
+ .vp-doc h3,
151
+ .vp-doc h4,
152
+ .vp-doc h5,
153
+ .vp-doc h6 {
154
+ position: relative;
155
+ font-weight: 600;
156
+ outline: none;
157
+ }
158
+
159
+ .vp-doc h1 {
160
+ letter-spacing: -0.02em;
161
+ line-height: 40px;
162
+ font-size: 28px;
163
+ }
164
+
165
+ .vp-doc h2 {
166
+ margin: 48px 0 16px;
167
+ border-top: 1px solid var(--vp-c-divider);
168
+ padding-top: 24px;
169
+ letter-spacing: -0.02em;
170
+ line-height: 32px;
171
+ font-size: 24px;
172
+ }
173
+
174
+ .vp-doc h3 {
175
+ margin: 32px 0 0;
176
+ letter-spacing: -0.01em;
177
+ line-height: 28px;
178
+ font-size: 20px;
179
+ }
180
+
181
+ .vp-doc h4 {
182
+ margin: 24px 0 0;
183
+ letter-spacing: -0.01em;
184
+ line-height: 24px;
185
+ font-size: 18px;
186
+ }
187
+
188
+ .vp-doc .header-anchor {
189
+ position: absolute;
190
+ top: 0;
191
+ left: 0;
192
+ margin-left: -0.87em;
193
+ font-weight: 500;
194
+ user-select: none;
195
+ opacity: 0;
196
+ text-decoration: none;
197
+ transition: color 0.25s, opacity 0.25s;
198
+ }
199
+
200
+ .vp-doc .header-anchor:before {
201
+ content: var(--vp-header-anchor-symbol);
202
+ }
203
+
204
+ .vp-doc h1:hover .header-anchor,
205
+ .vp-doc h1 .header-anchor:focus,
206
+ .vp-doc h2:hover .header-anchor,
207
+ .vp-doc h2 .header-anchor:focus,
208
+ .vp-doc h3:hover .header-anchor,
209
+ .vp-doc h3 .header-anchor:focus,
210
+ .vp-doc h4:hover .header-anchor,
211
+ .vp-doc h4 .header-anchor:focus,
212
+ .vp-doc h5:hover .header-anchor,
213
+ .vp-doc h5 .header-anchor:focus,
214
+ .vp-doc h6:hover .header-anchor,
215
+ .vp-doc h6 .header-anchor:focus {
216
+ opacity: 1;
217
+ }
218
+
219
+ @media (min-width: 768px) {
220
+ .vp-doc h1 {
221
+ letter-spacing: -0.02em;
222
+ line-height: 40px;
223
+ font-size: 32px;
224
+ }
225
+ }
226
+
227
+ .vp-doc h2 .header-anchor {
228
+ top: 24px;
229
+ }
230
+
231
+ .vp-doc p,
232
+ .vp-doc summary {
233
+ margin: 16px 0;
234
+ }
235
+
236
+ .vp-doc p {
237
+ line-height: 28px;
238
+ }
239
+
240
+ .vp-doc blockquote {
241
+ margin: 16px 0;
242
+ border-left: 2px solid var(--vp-c-divider);
243
+ padding-left: 16px;
244
+ transition: border-color 0.5s;
245
+ color: var(--vp-c-text-2);
246
+ }
247
+
248
+ .vp-doc blockquote > p {
249
+ margin: 0;
250
+ font-size: 16px;
251
+ transition: color 0.5s;
252
+ }
253
+
254
+ .vp-doc a {
255
+ font-weight: 500;
256
+ color: var(--vp-c-brand-1);
257
+ text-decoration: underline;
258
+ text-underline-offset: 2px;
259
+ transition: color 0.25s, opacity 0.25s;
260
+ }
261
+
262
+ .vp-doc a:hover {
263
+ color: var(--vp-c-brand-2);
264
+ }
265
+
266
+ .vp-doc strong {
267
+ font-weight: 600;
268
+ }
269
+
270
+ .vp-doc ul,
271
+ .vp-doc ol {
272
+ padding-left: 1.25rem;
273
+ margin: 16px 0;
274
+ }
275
+
276
+ .vp-doc ul {
277
+ list-style: disc;
278
+ }
279
+
280
+ .vp-doc ol {
281
+ list-style: decimal;
282
+ }
283
+
284
+ .vp-doc li + li {
285
+ margin-top: 8px;
286
+ }
287
+
288
+ .vp-doc li > ol,
289
+ .vp-doc li > ul {
290
+ margin: 8px 0 0;
291
+ }
292
+
293
+ .vp-doc table {
294
+ display: block;
295
+ border-collapse: collapse;
296
+ margin: 20px 0;
297
+ overflow-x: auto;
298
+ }
299
+
300
+ .vp-doc tr {
301
+ background-color: var(--vp-c-bg);
302
+ border-top: 1px solid var(--vp-c-divider);
303
+ transition: background-color 0.5s;
304
+ }
305
+
306
+ .vp-doc tr:nth-child(2n) {
307
+ background-color: var(--vp-c-bg-soft);
308
+ }
309
+
310
+ .vp-doc th,
311
+ .vp-doc td {
312
+ border: 1px solid var(--vp-c-divider);
313
+ padding: 8px 16px;
314
+ }
315
+
316
+ .vp-doc th {
317
+ text-align: left;
318
+ font-size: 14px;
319
+ font-weight: 600;
320
+ color: var(--vp-c-text-2);
321
+ background-color: var(--vp-c-bg-soft);
322
+ }
323
+
324
+ .vp-doc td {
325
+ font-size: 14px;
326
+ }
327
+
328
+ .vp-doc hr {
329
+ margin: 16px 0;
330
+ border: none;
331
+ border-top: 1px solid var(--vp-c-divider);
332
+ }
333
+
334
+ /* Inline code */
335
+ .vp-doc :not(pre, h1, h2, h3, h4, h5, h6) > code {
336
+ font-size: var(--vp-code-font-size);
337
+ color: var(--vp-code-color);
338
+ }
339
+
340
+ .vp-doc :not(pre) > code {
341
+ border-radius: 4px;
342
+ padding: 3px 6px;
343
+ background-color: var(--vp-code-bg);
344
+ transition: color 0.25s, background-color 0.5s;
345
+ }
346
+
347
+ .vp-doc a > code {
348
+ color: var(--vp-code-link-color);
349
+ }
350
+
351
+ .vp-doc a:hover > code {
352
+ color: var(--vp-code-link-hover-color);
353
+ }
354
+
355
+ .vp-doc h1 > code,
356
+ .vp-doc h2 > code,
357
+ .vp-doc h3 > code,
358
+ .vp-doc h4 > code {
359
+ font-size: 0.9em;
360
+ }
361
+
362
+ /* Code blocks */
363
+ .vp-doc div[class*='language-'],
364
+ .vp-block {
365
+ position: relative;
366
+ margin: 16px -24px;
367
+ background-color: var(--vp-code-block-bg);
368
+ overflow-x: auto;
369
+ transition: background-color 0.5s;
370
+ }
371
+
372
+ @media (min-width: 640px) {
373
+ .vp-doc div[class*='language-'],
374
+ .vp-block {
375
+ border-radius: 8px;
376
+ margin: 16px 0;
377
+ }
378
+ }
379
+
380
+ .vp-doc [class*='language-'] pre,
381
+ .vp-doc [class*='language-'] code {
382
+ tab-size: 4;
383
+ }
384
+
385
+ .vp-doc [class*='language-'] pre {
386
+ position: relative;
387
+ z-index: 1;
388
+ margin: 0;
389
+ padding: 20px 0;
390
+ background: transparent;
391
+ overflow-x: auto;
392
+ text-align: left;
393
+ }
394
+
395
+ .vp-doc [class*='language-'] code {
396
+ display: block;
397
+ padding: 0 24px;
398
+ width: fit-content;
399
+ min-width: 100%;
400
+ line-height: var(--vp-code-line-height);
401
+ font-size: var(--vp-code-font-size);
402
+ color: var(--vp-code-block-color);
403
+ transition: color 0.5s;
404
+ }
405
+
406
+ .vp-doc [class*='language-'] code .highlighted {
407
+ background-color: var(--vp-code-line-highlight-color);
408
+ transition: background-color 0.5s;
409
+ margin: 0 -24px;
410
+ padding: 0 24px;
411
+ width: calc(100% + 2 * 24px);
412
+ display: inline-block;
413
+ }
414
+
415
+ .vp-doc [class*='language-'] code .highlighted.error {
416
+ background-color: var(--vp-code-line-error-color);
417
+ }
418
+
419
+ .vp-doc [class*='language-'] code .highlighted.warning {
420
+ background-color: var(--vp-code-line-warning-color);
421
+ }
422
+
423
+ .vp-doc [class*='language-'] code .diff {
424
+ transition: background-color 0.5s;
425
+ margin: 0 -24px;
426
+ padding: 0 24px;
427
+ width: calc(100% + 2 * 24px);
428
+ display: inline-block;
429
+ }
430
+
431
+ .vp-doc [class*='language-'] code .diff::before {
432
+ position: absolute;
433
+ left: 10px;
434
+ }
435
+
436
+ .vp-doc [class*='language-'] code .diff.remove {
437
+ background-color: var(--vp-code-line-diff-remove-color);
438
+ opacity: 0.7;
439
+ }
440
+
441
+ .vp-doc [class*='language-'] code .diff.remove::before {
442
+ content: '-';
443
+ color: var(--vp-code-line-diff-remove-symbol-color);
444
+ }
445
+
446
+ .vp-doc [class*='language-'] code .diff.add {
447
+ background-color: var(--vp-code-line-diff-add-color);
448
+ }
449
+
450
+ .vp-doc [class*='language-'] code .diff.add::before {
451
+ content: '+';
452
+ color: var(--vp-code-line-diff-add-symbol-color);
453
+ }
454
+
455
+ /* Line numbers */
456
+ .vp-doc div[class*='language-'].line-numbers-mode {
457
+ padding-left: 32px;
458
+ }
459
+
460
+ .vp-doc .line-numbers-wrapper {
461
+ position: absolute;
462
+ top: 0;
463
+ bottom: 0;
464
+ left: 0;
465
+ z-index: 3;
466
+ border-right: 1px solid var(--vp-code-block-divider-color);
467
+ padding-top: 20px;
468
+ width: 32px;
469
+ text-align: center;
470
+ font-family: var(--vp-font-family-mono);
471
+ line-height: var(--vp-code-line-height);
472
+ font-size: var(--vp-code-font-size);
473
+ color: var(--vp-code-line-number-color);
474
+ transition: border-color 0.5s, color 0.5s;
475
+ }
476
+
477
+ /* Copy button */
478
+ .vp-doc [class*='language-'] > button.copy {
479
+ direction: ltr;
480
+ position: absolute;
481
+ top: 12px;
482
+ right: 12px;
483
+ z-index: 3;
484
+ border: 1px solid var(--vp-code-copy-code-border-color);
485
+ border-radius: 4px;
486
+ width: 40px;
487
+ height: 40px;
488
+ background-color: var(--vp-code-copy-code-bg);
489
+ opacity: 0;
490
+ cursor: pointer;
491
+ background-image: var(--vp-icon-copy);
492
+ background-position: 50%;
493
+ background-size: 20px;
494
+ background-repeat: no-repeat;
495
+ transition: border-color 0.25s, background-color 0.25s, opacity 0.25s;
496
+ }
497
+
498
+ .vp-doc [class*='language-']:hover > button.copy,
499
+ .vp-doc [class*='language-'] > button.copy:focus {
500
+ opacity: 1;
501
+ }
502
+
503
+ .vp-doc [class*='language-'] > button.copy:hover,
504
+ .vp-doc [class*='language-'] > button.copy.copied {
505
+ border-color: var(--vp-code-copy-code-hover-border-color);
506
+ background-color: var(--vp-code-copy-code-hover-bg);
507
+ }
508
+
509
+ /* Language label */
510
+ .vp-doc [class*='language-'] > span.lang {
511
+ position: absolute;
512
+ top: 2px;
513
+ right: 8px;
514
+ z-index: 2;
515
+ font-size: 12px;
516
+ font-weight: 500;
517
+ user-select: none;
518
+ color: var(--vp-code-lang-color);
519
+ transition: color 0.4s, opacity 0.4s;
520
+ }
521
+
522
+ .vp-doc [class*='language-']:hover > button.copy + span.lang,
523
+ .vp-doc [class*='language-'] > button.copy:focus + span.lang {
524
+ opacity: 0;
525
+ }
526
+
527
+ /* External links */
528
+ :is(.vp-external-link-icon, .vp-doc a[href*='://'], .vp-doc a[target='_blank']):not(:is(.no-icon, svg a, :has(img, svg)))::after {
529
+ display: inline-block;
530
+ margin-top: -1px;
531
+ margin-left: 4px;
532
+ width: 11px;
533
+ height: 11px;
534
+ background: currentColor;
535
+ color: var(--vp-c-text-3);
536
+ flex-shrink: 0;
537
+ --icon: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' %3E%3Cpath d='M0 0h24v24H0V0z' fill='none' /%3E%3Cpath d='M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5H9z' /%3E%3C/svg%3E");
538
+ -webkit-mask-image: var(--icon);
539
+ mask-image: var(--icon);
540
+ }
541
+
542
+ .vp-external-link-icon::after {
543
+ content: '';
544
+ }
545
+
546
+ .external-link-icon-enabled :is(.vp-doc a[href*='://'], .vp-doc a[target='_blank']):not(:is(.no-icon, svg a, :has(img, svg)))::after {
547
+ content: '';
548
+ color: currentColor;
549
+ }
@@ -0,0 +1,121 @@
1
+ /**
2
+ * VitePress Theme for BunPress - Code Groups
3
+ * -------------------------------------------------------------------------- */
4
+
5
+ .vp-code-group {
6
+ margin-top: 16px;
7
+ }
8
+
9
+ .vp-code-group .tabs,
10
+ .code-group-tabs {
11
+ position: relative;
12
+ display: flex;
13
+ margin-right: -24px;
14
+ margin-left: -24px;
15
+ padding: 0 12px;
16
+ background-color: var(--vp-code-tab-bg);
17
+ overflow-x: auto;
18
+ overflow-y: hidden;
19
+ box-shadow: inset 0 -1px var(--vp-code-tab-divider);
20
+ }
21
+
22
+ @media (min-width: 640px) {
23
+ .vp-code-group .tabs,
24
+ .code-group-tabs {
25
+ margin-right: 0;
26
+ margin-left: 0;
27
+ border-radius: 8px 8px 0 0;
28
+ }
29
+ }
30
+
31
+ .vp-code-group .tabs input,
32
+ .code-group-tabs input {
33
+ position: fixed;
34
+ opacity: 0;
35
+ pointer-events: none;
36
+ }
37
+
38
+ .vp-code-group .tabs label,
39
+ .code-group-tab {
40
+ position: relative;
41
+ display: inline-block;
42
+ border-bottom: 1px solid transparent;
43
+ padding: 0 12px;
44
+ line-height: 48px;
45
+ font-size: 14px;
46
+ font-weight: 500;
47
+ color: var(--vp-code-tab-text-color);
48
+ white-space: nowrap;
49
+ cursor: pointer;
50
+ transition: color 0.25s;
51
+ background: transparent;
52
+ border: none;
53
+ font-family: inherit;
54
+ }
55
+
56
+ .vp-code-group .tabs label::after,
57
+ .code-group-tab::after {
58
+ position: absolute;
59
+ right: 8px;
60
+ bottom: -1px;
61
+ left: 8px;
62
+ z-index: 1;
63
+ height: 2px;
64
+ border-radius: 2px;
65
+ content: '';
66
+ background-color: transparent;
67
+ transition: background-color 0.25s;
68
+ }
69
+
70
+ .vp-code-group label:hover,
71
+ .code-group-tab:hover {
72
+ color: var(--vp-code-tab-hover-text-color);
73
+ }
74
+
75
+ .vp-code-group input:checked + label,
76
+ .code-group-tab.active {
77
+ color: var(--vp-code-tab-active-text-color);
78
+ }
79
+
80
+ .vp-code-group input:checked + label::after,
81
+ .code-group-tab.active::after {
82
+ background-color: var(--vp-code-tab-active-bar-color);
83
+ }
84
+
85
+ .vp-code-group div[class*='language-'],
86
+ .code-group-panel,
87
+ .vp-block {
88
+ display: none;
89
+ margin-top: 0 !important;
90
+ border-top-left-radius: 0 !important;
91
+ border-top-right-radius: 0 !important;
92
+ }
93
+
94
+ .vp-code-group div[class*='language-'].active,
95
+ .code-group-panel.active,
96
+ .vp-block.active {
97
+ display: block;
98
+ }
99
+
100
+ .vp-block,
101
+ .code-group-panel {
102
+ padding: 20px 24px;
103
+ }
104
+
105
+ /* Code group container */
106
+ .code-group {
107
+ margin: 16px 0;
108
+ border: 1px solid var(--vp-c-divider);
109
+ border-radius: 8px;
110
+ overflow: hidden;
111
+ }
112
+
113
+ .code-group-panels {
114
+ position: relative;
115
+ }
116
+
117
+ .code-group-panel pre {
118
+ margin: 0;
119
+ border-radius: 0;
120
+ border: none;
121
+ }