@stacksjs/bunpress 0.1.0 → 0.1.1

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 (50) hide show
  1. package/CHANGELOG.md +296 -0
  2. package/README.md +113 -26
  3. package/dist/bin/cli.js +2 -104
  4. package/dist/chunk-16hpnayn.js +505 -0
  5. package/dist/chunk-njjmvdjd.js +8 -0
  6. package/dist/chunk-nt1zw6bf.js +9632 -0
  7. package/dist/chunk-zabbw4a8.js +2 -0
  8. package/dist/config.d.ts +3 -5
  9. package/dist/robots.d.ts +5 -0
  10. package/dist/rss.d.ts +16 -0
  11. package/dist/serve.d.ts +8 -0
  12. package/dist/sitemap.d.ts +5 -0
  13. package/dist/src/index.js +1 -1
  14. package/dist/templates/blocks/alerts/caution.stx +9 -0
  15. package/dist/templates/blocks/alerts/important.stx +9 -0
  16. package/dist/templates/blocks/alerts/note.stx +9 -0
  17. package/dist/templates/blocks/alerts/tip.stx +9 -0
  18. package/dist/templates/blocks/alerts/warning.stx +9 -0
  19. package/dist/templates/blocks/containers/danger.stx +6 -0
  20. package/dist/templates/blocks/containers/details.stx +6 -0
  21. package/dist/templates/blocks/containers/info.stx +6 -0
  22. package/dist/templates/blocks/containers/raw.stx +3 -0
  23. package/dist/templates/blocks/containers/tip.stx +6 -0
  24. package/dist/templates/blocks/containers/warning.stx +6 -0
  25. package/dist/templates/blocks/inline/code.stx +1 -0
  26. package/dist/templates/blocks/inline/del.stx +1 -0
  27. package/dist/templates/blocks/inline/em.stx +1 -0
  28. package/dist/templates/blocks/inline/mark.stx +1 -0
  29. package/dist/templates/blocks/inline/strong.stx +1 -0
  30. package/dist/templates/blocks/inline/sub.stx +1 -0
  31. package/dist/templates/blocks/inline/sup.stx +1 -0
  32. package/dist/templates/features.stx +20 -0
  33. package/dist/templates/hero.stx +10 -0
  34. package/dist/templates/layout-doc.stx +157 -0
  35. package/dist/templates/layout-home.stx +23 -0
  36. package/dist/templates/page-toc.stx +267 -0
  37. package/dist/templates/sidebar-section.stx +42 -0
  38. package/dist/templates/sidebar.stx +54 -0
  39. package/dist/themes/bun/index.d.ts +34 -0
  40. package/dist/themes/index.d.ts +24 -0
  41. package/dist/themes/vitepress/base.css +549 -0
  42. package/dist/themes/vitepress/code-group.css +121 -0
  43. package/dist/themes/vitepress/custom-block.css +330 -0
  44. package/dist/themes/vitepress/index.d.ts +29 -0
  45. package/dist/themes/vitepress/index.ts +1963 -0
  46. package/dist/themes/vitepress/vars.css +436 -0
  47. package/dist/types.d.ts +85 -2
  48. package/package.json +30 -18
  49. package/dist/chunk-he6c5f4e.js +0 -1354
  50. package/dist/plugin.d.ts +0 -0
@@ -0,0 +1,1963 @@
1
+ /**
2
+ * VitePress Theme for BunPress
3
+ *
4
+ * This theme provides VitePress-compatible styling for BunPress documentation sites.
5
+ * It includes the same color palette, typography, and component styles as VitePress.
6
+ * Based on VitePress source code for pixel-perfect compatibility.
7
+ */
8
+
9
+ // CSS Variables - Matches VitePress vars.css exactly
10
+ const varsCSS = `/**
11
+ * VitePress Theme for BunPress
12
+ * Colors: Solid
13
+ * -------------------------------------------------------------------------- */
14
+
15
+ :root {
16
+ --bp-c-white: #ffffff;
17
+ --bp-c-black: #000000;
18
+
19
+ --bp-c-neutral: var(--bp-c-black);
20
+ --bp-c-neutral-inverse: var(--bp-c-white);
21
+ }
22
+
23
+ .dark {
24
+ --bp-c-neutral: var(--bp-c-white);
25
+ --bp-c-neutral-inverse: var(--bp-c-black);
26
+ }
27
+
28
+ /**
29
+ * Colors: Palette - Light/Dark specific
30
+ * -------------------------------------------------------------------------- */
31
+
32
+ /**
33
+ * Colors: Palette
34
+ * -------------------------------------------------------------------------- */
35
+
36
+ :root {
37
+ --bp-c-gray-1: #dddde3;
38
+ --bp-c-gray-2: #e4e4e9;
39
+ --bp-c-gray-3: #ebebef;
40
+ --bp-c-gray-soft: rgba(142, 150, 170, 0.14);
41
+
42
+ --bp-c-indigo-1: #3451b2;
43
+ --bp-c-indigo-2: #3a5ccc;
44
+ --bp-c-indigo-3: #5672cd;
45
+ --bp-c-indigo-soft: rgba(100, 108, 255, 0.14);
46
+
47
+ --bp-c-purple-1: #6f42c1;
48
+ --bp-c-purple-2: #7e4cc9;
49
+ --bp-c-purple-3: #8e5cd9;
50
+ --bp-c-purple-soft: rgba(159, 122, 234, 0.14);
51
+
52
+ --bp-c-green-1: #18794e;
53
+ --bp-c-green-2: #299764;
54
+ --bp-c-green-3: #30a46c;
55
+ --bp-c-green-soft: rgba(16, 185, 129, 0.14);
56
+
57
+ --bp-c-yellow-1: #915930;
58
+ --bp-c-yellow-2: #946300;
59
+ --bp-c-yellow-3: #9f6a00;
60
+ --bp-c-yellow-soft: rgba(234, 179, 8, 0.14);
61
+
62
+ --bp-c-red-1: #b8272c;
63
+ --bp-c-red-2: #d5393e;
64
+ --bp-c-red-3: #e0575b;
65
+ --bp-c-red-soft: rgba(244, 63, 94, 0.14);
66
+
67
+ --bp-c-sponsor: #db2777;
68
+ }
69
+
70
+ .dark {
71
+ --bp-c-gray-1: #515c67;
72
+ --bp-c-gray-2: #414853;
73
+ --bp-c-gray-3: #32363f;
74
+ --bp-c-gray-soft: rgba(101, 117, 133, 0.16);
75
+
76
+ --bp-c-indigo-1: #a8b1ff;
77
+ --bp-c-indigo-2: #5c73e7;
78
+ --bp-c-indigo-3: #3e63dd;
79
+ --bp-c-indigo-soft: rgba(100, 108, 255, 0.16);
80
+
81
+ --bp-c-purple-1: #c8abfa;
82
+ --bp-c-purple-2: #a879e6;
83
+ --bp-c-purple-3: #8e5cd9;
84
+ --bp-c-purple-soft: rgba(159, 122, 234, 0.16);
85
+
86
+ --bp-c-green-1: #3dd68c;
87
+ --bp-c-green-2: #30a46c;
88
+ --bp-c-green-3: #298459;
89
+ --bp-c-green-soft: rgba(16, 185, 129, 0.16);
90
+
91
+ --bp-c-yellow-1: #f9b44e;
92
+ --bp-c-yellow-2: #da8b17;
93
+ --bp-c-yellow-3: #a46a0a;
94
+ --bp-c-yellow-soft: rgba(234, 179, 8, 0.16);
95
+
96
+ --bp-c-red-1: #f66f81;
97
+ --bp-c-red-2: #f14158;
98
+ --bp-c-red-3: #b62a3c;
99
+ --bp-c-red-soft: rgba(244, 63, 94, 0.16);
100
+ }
101
+
102
+ /**
103
+ * Colors: Background
104
+ * -------------------------------------------------------------------------- */
105
+
106
+ :root {
107
+ --bp-c-bg: #ffffff;
108
+ --bp-c-bg-alt: #f6f6f7;
109
+ --bp-c-bg-elv: #ffffff;
110
+ --bp-c-bg-soft: #f6f6f7;
111
+ }
112
+
113
+ .dark {
114
+ --bp-c-bg: #1b1b1f;
115
+ --bp-c-bg-alt: #161618;
116
+ --bp-c-bg-elv: #202127;
117
+ --bp-c-bg-soft: #202127;
118
+ }
119
+
120
+ /**
121
+ * Colors: Borders
122
+ * -------------------------------------------------------------------------- */
123
+
124
+ :root {
125
+ --bp-c-border: #c2c2c4;
126
+ --bp-c-divider: #e2e2e3;
127
+ --bp-c-gutter: #e2e2e3;
128
+ }
129
+
130
+ .dark {
131
+ --bp-c-border: #3c3f44;
132
+ --bp-c-divider: #2e2e32;
133
+ --bp-c-gutter: #000000;
134
+ }
135
+
136
+ /**
137
+ * Colors: Text
138
+ * Note: Using solid colors like VitePress for better consistency
139
+ * -------------------------------------------------------------------------- */
140
+
141
+ :root {
142
+ --bp-c-text-1: #3c3c43;
143
+ --bp-c-text-2: #67676c;
144
+ --bp-c-text-3: #929295;
145
+ }
146
+
147
+ .dark {
148
+ --bp-c-text-1: #dfdfd6;
149
+ --bp-c-text-2: #98989f;
150
+ --bp-c-text-3: #6a6a71;
151
+ }
152
+
153
+ /**
154
+ * Colors: Function
155
+ * -------------------------------------------------------------------------- */
156
+
157
+ :root {
158
+ --bp-c-default-1: var(--bp-c-gray-1);
159
+ --bp-c-default-2: var(--bp-c-gray-2);
160
+ --bp-c-default-3: var(--bp-c-gray-3);
161
+ --bp-c-default-soft: var(--bp-c-gray-soft);
162
+
163
+ --bp-c-brand-1: var(--bp-c-indigo-1);
164
+ --bp-c-brand-2: var(--bp-c-indigo-2);
165
+ --bp-c-brand-3: var(--bp-c-indigo-3);
166
+ --bp-c-brand-soft: var(--bp-c-indigo-soft);
167
+
168
+ --bp-c-brand: var(--bp-c-brand-1);
169
+
170
+ --bp-c-tip-1: var(--bp-c-brand-1);
171
+ --bp-c-tip-2: var(--bp-c-brand-2);
172
+ --bp-c-tip-3: var(--bp-c-brand-3);
173
+ --bp-c-tip-soft: var(--bp-c-brand-soft);
174
+
175
+ --bp-c-note-1: var(--bp-c-brand-1);
176
+ --bp-c-note-2: var(--bp-c-brand-2);
177
+ --bp-c-note-3: var(--bp-c-brand-3);
178
+ --bp-c-note-soft: var(--bp-c-brand-soft);
179
+
180
+ --bp-c-success-1: var(--bp-c-green-1);
181
+ --bp-c-success-2: var(--bp-c-green-2);
182
+ --bp-c-success-3: var(--bp-c-green-3);
183
+ --bp-c-success-soft: var(--bp-c-green-soft);
184
+
185
+ --bp-c-important-1: var(--bp-c-purple-1);
186
+ --bp-c-important-2: var(--bp-c-purple-2);
187
+ --bp-c-important-3: var(--bp-c-purple-3);
188
+ --bp-c-important-soft: var(--bp-c-purple-soft);
189
+
190
+ --bp-c-warning-1: var(--bp-c-yellow-1);
191
+ --bp-c-warning-2: var(--bp-c-yellow-2);
192
+ --bp-c-warning-3: var(--bp-c-yellow-3);
193
+ --bp-c-warning-soft: var(--bp-c-yellow-soft);
194
+
195
+ --bp-c-danger-1: var(--bp-c-red-1);
196
+ --bp-c-danger-2: var(--bp-c-red-2);
197
+ --bp-c-danger-3: var(--bp-c-red-3);
198
+ --bp-c-danger-soft: var(--bp-c-red-soft);
199
+
200
+ --bp-c-caution-1: var(--bp-c-red-1);
201
+ --bp-c-caution-2: var(--bp-c-red-2);
202
+ --bp-c-caution-3: var(--bp-c-red-3);
203
+ --bp-c-caution-soft: var(--bp-c-red-soft);
204
+ }
205
+
206
+ /**
207
+ * Typography
208
+ * -------------------------------------------------------------------------- */
209
+
210
+ :root {
211
+ --bp-font-family-base: 'Inter', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
212
+ --bp-font-family-mono: ui-monospace, 'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace;
213
+ font-optical-sizing: auto;
214
+ }
215
+
216
+ /**
217
+ * Shadows
218
+ * -------------------------------------------------------------------------- */
219
+
220
+ :root {
221
+ --bp-shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
222
+ --bp-shadow-2: 0 3px 12px rgba(0, 0, 0, 0.07), 0 1px 4px rgba(0, 0, 0, 0.07);
223
+ --bp-shadow-3: 0 12px 32px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.08);
224
+ --bp-shadow-4: 0 14px 44px rgba(0, 0, 0, 0.12), 0 3px 9px rgba(0, 0, 0, 0.12);
225
+ --bp-shadow-5: 0 18px 56px rgba(0, 0, 0, 0.16), 0 4px 12px rgba(0, 0, 0, 0.16);
226
+ }
227
+
228
+ /**
229
+ * Z-indexes
230
+ * -------------------------------------------------------------------------- */
231
+
232
+ :root {
233
+ --bp-z-index-footer: 10;
234
+ --bp-z-index-local-nav: 20;
235
+ --bp-z-index-nav: 30;
236
+ --bp-z-index-layout-top: 40;
237
+ --bp-z-index-backdrop: 50;
238
+ --bp-z-index-sidebar: 60;
239
+ }
240
+
241
+ @media (min-width: 960px) {
242
+ :root {
243
+ --bp-z-index-sidebar: 25;
244
+ }
245
+ }
246
+
247
+ /**
248
+ * Layouts
249
+ * -------------------------------------------------------------------------- */
250
+
251
+ :root {
252
+ --bp-layout-max-width: 1440px;
253
+ }
254
+
255
+ /**
256
+ * Component: Header Anchor
257
+ * -------------------------------------------------------------------------- */
258
+
259
+ :root {
260
+ --bp-header-anchor-symbol: '#';
261
+ }
262
+
263
+ /**
264
+ * Component: Code
265
+ * -------------------------------------------------------------------------- */
266
+
267
+ :root {
268
+ --bp-code-line-height: 1.7;
269
+ --bp-code-font-size: 0.875em;
270
+ --bp-code-color: var(--bp-c-brand-1);
271
+ --bp-code-link-color: var(--bp-c-brand-1);
272
+ --bp-code-link-hover-color: var(--bp-c-brand-2);
273
+ --bp-code-bg: var(--bp-c-default-soft);
274
+
275
+ --bp-code-block-color: var(--bp-c-text-2);
276
+ --bp-code-block-bg: var(--bp-c-bg-alt);
277
+ --bp-code-block-divider-color: var(--bp-c-gutter);
278
+
279
+ --bp-code-lang-color: var(--bp-c-text-2);
280
+
281
+ --bp-code-line-highlight-color: var(--bp-c-default-soft);
282
+ --bp-code-line-number-color: var(--bp-c-text-2);
283
+
284
+ --bp-code-line-diff-add-color: var(--bp-c-success-soft);
285
+ --bp-code-line-diff-add-symbol-color: var(--bp-c-success-1);
286
+
287
+ --bp-code-line-diff-remove-color: var(--bp-c-danger-soft);
288
+ --bp-code-line-diff-remove-symbol-color: var(--bp-c-danger-1);
289
+
290
+ --bp-code-line-warning-color: var(--bp-c-warning-soft);
291
+ --bp-code-line-error-color: var(--bp-c-danger-soft);
292
+
293
+ --bp-code-copy-code-border-color: var(--bp-c-divider);
294
+ --bp-code-copy-code-bg: var(--bp-c-bg-soft);
295
+ --bp-code-copy-code-hover-border-color: var(--bp-c-divider);
296
+ --bp-code-copy-code-hover-bg: var(--bp-c-bg);
297
+ --bp-code-copy-code-active-text: var(--bp-c-text-2);
298
+ --bp-code-copy-copied-text-content: 'Copied';
299
+
300
+ --bp-code-tab-divider: var(--bp-code-block-divider-color);
301
+ --bp-code-tab-text-color: var(--bp-c-text-2);
302
+ --bp-code-tab-bg: var(--bp-code-block-bg);
303
+ --bp-code-tab-hover-text-color: var(--bp-c-text-1);
304
+ --bp-code-tab-active-text-color: var(--bp-c-text-1);
305
+ --bp-code-tab-active-bar-color: var(--bp-c-brand-1);
306
+ }
307
+
308
+ /**
309
+ * Component: Button
310
+ * -------------------------------------------------------------------------- */
311
+
312
+ :root {
313
+ --bp-button-brand-border: transparent;
314
+ --bp-button-brand-text: var(--bp-c-white);
315
+ --bp-button-brand-bg: var(--bp-c-brand-3);
316
+ --bp-button-brand-hover-border: transparent;
317
+ --bp-button-brand-hover-text: var(--bp-c-white);
318
+ --bp-button-brand-hover-bg: var(--bp-c-brand-2);
319
+ --bp-button-brand-active-border: transparent;
320
+ --bp-button-brand-active-text: var(--bp-c-white);
321
+ --bp-button-brand-active-bg: var(--bp-c-brand-1);
322
+
323
+ --bp-button-alt-border: transparent;
324
+ --bp-button-alt-text: var(--bp-c-text-1);
325
+ --bp-button-alt-bg: var(--bp-c-default-3);
326
+ --bp-button-alt-hover-border: transparent;
327
+ --bp-button-alt-hover-text: var(--bp-c-text-1);
328
+ --bp-button-alt-hover-bg: var(--bp-c-default-2);
329
+ --bp-button-alt-active-border: transparent;
330
+ --bp-button-alt-active-text: var(--bp-c-text-1);
331
+ --bp-button-alt-active-bg: var(--bp-c-default-1);
332
+
333
+ --bp-button-sponsor-border: var(--bp-c-text-2);
334
+ --bp-button-sponsor-text: var(--bp-c-text-2);
335
+ --bp-button-sponsor-bg: transparent;
336
+ --bp-button-sponsor-hover-border: var(--bp-c-sponsor);
337
+ --bp-button-sponsor-hover-text: var(--bp-c-sponsor);
338
+ --bp-button-sponsor-hover-bg: transparent;
339
+ --bp-button-sponsor-active-border: var(--bp-c-sponsor);
340
+ --bp-button-sponsor-active-text: var(--bp-c-sponsor);
341
+ --bp-button-sponsor-active-bg: transparent;
342
+ }
343
+
344
+ /**
345
+ * Component: Custom Block
346
+ * -------------------------------------------------------------------------- */
347
+
348
+ :root {
349
+ --bp-custom-block-font-size: 14px;
350
+ --bp-custom-block-code-font-size: 13px;
351
+
352
+ --bp-custom-block-info-border: transparent;
353
+ --bp-custom-block-info-text: var(--bp-c-text-1);
354
+ --bp-custom-block-info-bg: var(--bp-c-default-soft);
355
+ --bp-custom-block-info-code-bg: var(--bp-c-default-soft);
356
+
357
+ --bp-custom-block-note-border: transparent;
358
+ --bp-custom-block-note-text: var(--bp-c-text-1);
359
+ --bp-custom-block-note-bg: var(--bp-c-default-soft);
360
+ --bp-custom-block-note-code-bg: var(--bp-c-default-soft);
361
+
362
+ --bp-custom-block-tip-border: transparent;
363
+ --bp-custom-block-tip-text: var(--bp-c-text-1);
364
+ --bp-custom-block-tip-bg: var(--bp-c-tip-soft);
365
+ --bp-custom-block-tip-code-bg: var(--bp-c-tip-soft);
366
+
367
+ --bp-custom-block-important-border: transparent;
368
+ --bp-custom-block-important-text: var(--bp-c-text-1);
369
+ --bp-custom-block-important-bg: var(--bp-c-important-soft);
370
+ --bp-custom-block-important-code-bg: var(--bp-c-important-soft);
371
+
372
+ --bp-custom-block-warning-border: transparent;
373
+ --bp-custom-block-warning-text: var(--bp-c-text-1);
374
+ --bp-custom-block-warning-bg: var(--bp-c-warning-soft);
375
+ --bp-custom-block-warning-code-bg: var(--bp-c-warning-soft);
376
+
377
+ --bp-custom-block-danger-border: transparent;
378
+ --bp-custom-block-danger-text: var(--bp-c-text-1);
379
+ --bp-custom-block-danger-bg: var(--bp-c-danger-soft);
380
+ --bp-custom-block-danger-code-bg: var(--bp-c-danger-soft);
381
+
382
+ --bp-custom-block-caution-border: transparent;
383
+ --bp-custom-block-caution-text: var(--bp-c-text-1);
384
+ --bp-custom-block-caution-bg: var(--bp-c-caution-soft);
385
+ --bp-custom-block-caution-code-bg: var(--bp-c-caution-soft);
386
+
387
+ --bp-custom-block-details-border: var(--bp-custom-block-info-border);
388
+ --bp-custom-block-details-text: var(--bp-custom-block-info-text);
389
+ --bp-custom-block-details-bg: var(--bp-custom-block-info-bg);
390
+ --bp-custom-block-details-code-bg: var(--bp-custom-block-info-code-bg);
391
+ }
392
+
393
+ /**
394
+ * Component: Nav
395
+ * -------------------------------------------------------------------------- */
396
+
397
+ :root {
398
+ --bp-nav-height: 64px;
399
+ --bp-nav-bg-color: var(--bp-c-bg);
400
+ --bp-nav-screen-bg-color: var(--bp-c-bg);
401
+ --bp-nav-logo-height: 24px;
402
+ }
403
+
404
+ /**
405
+ * Component: Sidebar
406
+ * -------------------------------------------------------------------------- */
407
+
408
+ :root {
409
+ --bp-sidebar-width: 272px;
410
+ --bp-sidebar-bg-color: var(--bp-c-bg-alt);
411
+ }
412
+
413
+ /**
414
+ * Colors Backdrop
415
+ * -------------------------------------------------------------------------- */
416
+
417
+ :root {
418
+ --bp-backdrop-bg-color: rgba(0, 0, 0, 0.6);
419
+ }
420
+
421
+ /**
422
+ * Component: Home
423
+ * -------------------------------------------------------------------------- */
424
+
425
+ :root {
426
+ --bp-home-hero-name-color: var(--bp-c-brand-1);
427
+ --bp-home-hero-name-background: transparent;
428
+ --bp-home-hero-image-background-image: none;
429
+ --bp-home-hero-image-filter: none;
430
+ }
431
+
432
+ /**
433
+ * Component: Badge
434
+ * -------------------------------------------------------------------------- */
435
+
436
+ :root {
437
+ --bp-badge-info-border: transparent;
438
+ --bp-badge-info-text: var(--bp-c-text-2);
439
+ --bp-badge-info-bg: var(--bp-c-default-soft);
440
+
441
+ --bp-badge-tip-border: transparent;
442
+ --bp-badge-tip-text: var(--bp-c-tip-1);
443
+ --bp-badge-tip-bg: var(--bp-c-tip-soft);
444
+
445
+ --bp-badge-warning-border: transparent;
446
+ --bp-badge-warning-text: var(--bp-c-warning-1);
447
+ --bp-badge-warning-bg: var(--bp-c-warning-soft);
448
+
449
+ --bp-badge-danger-border: transparent;
450
+ --bp-badge-danger-text: var(--bp-c-danger-1);
451
+ --bp-badge-danger-bg: var(--bp-c-danger-soft);
452
+ }
453
+
454
+ /**
455
+ * Icons - Matches VitePress icons.css exactly
456
+ * -------------------------------------------------------------------------- */
457
+
458
+ :root {
459
+ /* clipboard - matches VitePress exactly */
460
+ --bp-icon-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='rgba(128,128,128,1)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3C/g%3E%3C/svg%3E");
461
+ /* clipboard-check - matches VitePress exactly */
462
+ --bp-icon-copied: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='rgba(128,128,128,1)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='m9 14l2 2l4-4'/%3E%3C/g%3E%3C/svg%3E");
463
+ --bp-icon-external: 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");
464
+ }
465
+
466
+ /**
467
+ * Icon Classes - Matches VitePress .vpi-* icons
468
+ * -------------------------------------------------------------------------- */
469
+
470
+ [class^='bpi-'],
471
+ [class*=' bpi-'],
472
+ .bp-icon {
473
+ width: 1em;
474
+ height: 1em;
475
+ }
476
+
477
+ [class^='bpi-'].bg,
478
+ [class*=' bpi-'].bg,
479
+ .bp-icon.bg {
480
+ background-size: 100% 100%;
481
+ background-color: transparent;
482
+ }
483
+
484
+ [class^='bpi-']:not(.bg),
485
+ [class*=' bpi-']:not(.bg),
486
+ .bp-icon:not(.bg) {
487
+ -webkit-mask: var(--icon) no-repeat;
488
+ mask: var(--icon) no-repeat;
489
+ -webkit-mask-size: 100% 100%;
490
+ mask-size: 100% 100%;
491
+ background-color: currentColor;
492
+ color: inherit;
493
+ }
494
+
495
+ .bpi-align-left {
496
+ --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 12H3m14 6H3M21 6H3'/%3E%3C/svg%3E");
497
+ }
498
+
499
+ .bpi-arrow-right,
500
+ .bpi-arrow-down,
501
+ .bpi-arrow-left,
502
+ .bpi-arrow-up {
503
+ --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 12h14m-7-7l7 7l-7 7'/%3E%3C/svg%3E");
504
+ }
505
+
506
+ .bpi-chevron-right,
507
+ .bpi-chevron-down,
508
+ .bpi-chevron-left,
509
+ .bpi-chevron-up {
510
+ --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m9 18l6-6l-6-6'/%3E%3C/svg%3E");
511
+ }
512
+
513
+ .bpi-chevron-down,
514
+ .bpi-arrow-down {
515
+ transform: rotate(90deg);
516
+ }
517
+
518
+ .bpi-chevron-left,
519
+ .bpi-arrow-left {
520
+ transform: rotate(180deg);
521
+ }
522
+
523
+ .bpi-chevron-up,
524
+ .bpi-arrow-up {
525
+ transform: rotate(-90deg);
526
+ }
527
+
528
+ .bpi-square-pen {
529
+ --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z'/%3E%3C/g%3E%3C/svg%3E");
530
+ }
531
+
532
+ .bpi-plus {
533
+ --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 12h14m-7-7v14'/%3E%3C/svg%3E");
534
+ }
535
+
536
+ .bpi-sun {
537
+ --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2m0 16v2M4.93 4.93l1.41 1.41m11.32 11.32l1.41 1.41M2 12h2m16 0h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41'/%3E%3C/g%3E%3C/svg%3E");
538
+ }
539
+
540
+ .bpi-moon {
541
+ --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 3a6 6 0 0 0 9 9a9 9 0 1 1-9-9'/%3E%3C/svg%3E");
542
+ }
543
+
544
+ .bpi-more-horizontal {
545
+ --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3Ccircle cx='19' cy='12' r='1'/%3E%3Ccircle cx='5' cy='12' r='1'/%3E%3C/g%3E%3C/svg%3E");
546
+ }
547
+
548
+ .bpi-languages {
549
+ --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m5 8l6 6m-7 0l6-6l2-3M2 5h12M7 2h1m14 20l-5-10l-5 10m2-4h6'/%3E%3C/svg%3E");
550
+ }
551
+
552
+ .bpi-heart {
553
+ --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2c-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z'/%3E%3C/svg%3E");
554
+ }
555
+
556
+ .bpi-search {
557
+ --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.6'%3E%3Cpath d='m21 21l-4.34-4.34'/%3E%3Ccircle cx='11' cy='11' r='8' stroke-width='1.4'/%3E%3C/g%3E%3C/svg%3E");
558
+ }
559
+
560
+ .bpi-layout-list {
561
+ --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Crect width='7' height='7' x='3' y='3' rx='1'/%3E%3Crect width='7' height='7' x='3' y='14' rx='1'/%3E%3Cpath d='M14 4h7m-7 5h7m-7 6h7m-7 5h7'/%3E%3C/g%3E%3C/svg%3E");
562
+ }
563
+
564
+ .bpi-delete {
565
+ --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M10 5a2 2 0 0 0-1.344.519l-6.328 5.74a1 1 0 0 0 0 1.481l6.328 5.741A2 2 0 0 0 10 19h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2zm2 4l6 6m0-6l-6 6'/%3E%3C/svg%3E");
566
+ }
567
+
568
+ .bpi-corner-down-left {
569
+ --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M20 4v7a4 4 0 0 1-4 4H4'/%3E%3Cpath d='m9 10l-5 5l5 5'/%3E%3C/g%3E%3C/svg%3E");
570
+ }`
571
+
572
+ // Base CSS - Matches VitePress base.css exactly
573
+ const baseCSS = `/**
574
+ * VitePress Theme for BunPress - Base Styles
575
+ * -------------------------------------------------------------------------- */
576
+
577
+ @media (prefers-reduced-motion: reduce) {
578
+ *,
579
+ ::before,
580
+ ::after {
581
+ animation-delay: -1ms !important;
582
+ animation-duration: 1ms !important;
583
+ animation-iteration-count: 1 !important;
584
+ background-attachment: initial !important;
585
+ scroll-behavior: auto !important;
586
+ transition-duration: 0s !important;
587
+ transition-delay: 0s !important;
588
+ }
589
+ }
590
+
591
+ *,
592
+ ::before,
593
+ ::after {
594
+ box-sizing: border-box;
595
+ }
596
+
597
+ html {
598
+ line-height: 1.4;
599
+ font-size: 16px;
600
+ -webkit-text-size-adjust: 100%;
601
+ }
602
+
603
+ html.dark {
604
+ color-scheme: dark;
605
+ }
606
+
607
+ body {
608
+ margin: 0;
609
+ width: 100%;
610
+ min-width: 320px;
611
+ min-height: 100vh;
612
+ line-height: 24px;
613
+ font-family: var(--bp-font-family-base);
614
+ font-size: 16px;
615
+ font-weight: 400;
616
+ color: var(--bp-c-text-1);
617
+ background-color: var(--bp-c-bg);
618
+ font-synthesis: style;
619
+ text-rendering: optimizeLegibility;
620
+ -webkit-font-smoothing: antialiased;
621
+ -moz-osx-font-smoothing: grayscale;
622
+ }
623
+
624
+ main {
625
+ display: block;
626
+ }
627
+
628
+ h1,
629
+ h2,
630
+ h3,
631
+ h4,
632
+ h5,
633
+ h6 {
634
+ margin: 0;
635
+ line-height: 24px;
636
+ font-size: 16px;
637
+ font-weight: 400;
638
+ }
639
+
640
+ p {
641
+ margin: 0;
642
+ }
643
+
644
+ strong,
645
+ b {
646
+ font-weight: 600;
647
+ }
648
+
649
+ a,
650
+ area,
651
+ button,
652
+ [role='button'],
653
+ input,
654
+ label,
655
+ select,
656
+ summary,
657
+ textarea {
658
+ touch-action: manipulation;
659
+ }
660
+
661
+ a {
662
+ color: inherit;
663
+ text-decoration: inherit;
664
+ }
665
+
666
+ ol,
667
+ ul {
668
+ list-style: none;
669
+ margin: 0;
670
+ padding: 0;
671
+ }
672
+
673
+ blockquote {
674
+ margin: 0;
675
+ }
676
+
677
+ pre,
678
+ code,
679
+ kbd,
680
+ samp {
681
+ font-family: var(--bp-font-family-mono);
682
+ }
683
+
684
+ img,
685
+ svg,
686
+ video,
687
+ canvas,
688
+ audio,
689
+ iframe,
690
+ embed,
691
+ object {
692
+ display: block;
693
+ }
694
+
695
+ figure {
696
+ margin: 0;
697
+ }
698
+
699
+ img,
700
+ video {
701
+ max-width: 100%;
702
+ height: auto;
703
+ }
704
+
705
+ button,
706
+ input,
707
+ optgroup,
708
+ select,
709
+ textarea {
710
+ border: 0;
711
+ padding: 0;
712
+ line-height: inherit;
713
+ color: inherit;
714
+ }
715
+
716
+ button {
717
+ padding: 0;
718
+ font-family: inherit;
719
+ background-color: transparent;
720
+ background-image: none;
721
+ }
722
+
723
+ button:enabled,
724
+ [role='button']:enabled {
725
+ cursor: pointer;
726
+ }
727
+
728
+ button:focus,
729
+ button:focus-visible {
730
+ outline: 1px dotted;
731
+ outline: 4px auto -webkit-focus-ring-color;
732
+ }
733
+
734
+ button:focus:not(:focus-visible) {
735
+ outline: none !important;
736
+ }
737
+
738
+ input:focus,
739
+ textarea:focus,
740
+ select:focus {
741
+ outline: none;
742
+ }
743
+
744
+ table {
745
+ border-collapse: collapse;
746
+ }
747
+
748
+ input {
749
+ background-color: transparent;
750
+ }
751
+
752
+ input:-ms-input-placeholder,
753
+ textarea:-ms-input-placeholder {
754
+ color: var(--bp-c-text-3);
755
+ }
756
+
757
+ input::-ms-input-placeholder,
758
+ textarea::-ms-input-placeholder {
759
+ color: var(--bp-c-text-3);
760
+ }
761
+
762
+ input::placeholder,
763
+ textarea::placeholder {
764
+ color: var(--bp-c-text-3);
765
+ }
766
+
767
+ input::-webkit-outer-spin-button,
768
+ input::-webkit-inner-spin-button {
769
+ -webkit-appearance: none;
770
+ margin: 0;
771
+ }
772
+
773
+ input[type='number'] {
774
+ -moz-appearance: textfield;
775
+ }
776
+
777
+ textarea {
778
+ resize: vertical;
779
+ }
780
+
781
+ select {
782
+ -webkit-appearance: none;
783
+ }
784
+
785
+ fieldset {
786
+ margin: 0;
787
+ padding: 0;
788
+ }
789
+
790
+ h1,
791
+ h2,
792
+ h3,
793
+ h4,
794
+ h5,
795
+ h6,
796
+ li,
797
+ p {
798
+ overflow-wrap: break-word;
799
+ }
800
+
801
+ vite-error-overlay {
802
+ z-index: 9999;
803
+ }
804
+
805
+ mjx-container {
806
+ overflow-x: auto;
807
+ }
808
+
809
+ mjx-container > svg {
810
+ display: inline-block;
811
+ margin: auto;
812
+ }
813
+
814
+ /**
815
+ * Utility Classes
816
+ * -------------------------------------------------------------------------- */
817
+
818
+ .visually-hidden {
819
+ position: absolute;
820
+ width: 1px;
821
+ height: 1px;
822
+ white-space: nowrap;
823
+ clip: rect(0 0 0 0);
824
+ clip-path: inset(50%);
825
+ overflow: hidden;
826
+ }
827
+
828
+ /**
829
+ * VPDoc Styles - Documentation Content
830
+ * -------------------------------------------------------------------------- */
831
+
832
+ .bp-doc h1,
833
+ .bp-doc h2,
834
+ .bp-doc h3,
835
+ .bp-doc h4,
836
+ .bp-doc h5,
837
+ .bp-doc h6 {
838
+ position: relative;
839
+ font-weight: 600;
840
+ outline: none;
841
+ }
842
+
843
+ .bp-doc h1 {
844
+ letter-spacing: -0.02em;
845
+ line-height: 40px;
846
+ font-size: 28px;
847
+ }
848
+
849
+ .bp-doc h2 {
850
+ margin: 48px 0 16px;
851
+ border-top: 1px solid var(--bp-c-divider);
852
+ padding-top: 24px;
853
+ letter-spacing: -0.02em;
854
+ line-height: 32px;
855
+ font-size: 24px;
856
+ }
857
+
858
+ .bp-doc h3 {
859
+ margin: 32px 0 0;
860
+ letter-spacing: -0.01em;
861
+ line-height: 28px;
862
+ font-size: 20px;
863
+ }
864
+
865
+ .bp-doc h4 {
866
+ margin: 24px 0 0;
867
+ letter-spacing: -0.01em;
868
+ line-height: 24px;
869
+ font-size: 18px;
870
+ }
871
+
872
+ .bp-doc h5 {
873
+ margin: 16px 0 0;
874
+ font-size: 16px;
875
+ }
876
+
877
+ .bp-doc h6 {
878
+ margin: 16px 0 0;
879
+ font-size: 14px;
880
+ }
881
+
882
+ .bp-doc .header-anchor {
883
+ position: absolute;
884
+ top: 0;
885
+ left: 0;
886
+ margin-left: -0.87em;
887
+ font-weight: 500;
888
+ user-select: none;
889
+ opacity: 0;
890
+ text-decoration: none;
891
+ transition: color 0.25s, opacity 0.25s;
892
+ }
893
+
894
+ .bp-doc .header-anchor:before {
895
+ content: var(--bp-header-anchor-symbol);
896
+ }
897
+
898
+ .bp-doc h1:hover .header-anchor,
899
+ .bp-doc h1 .header-anchor:focus,
900
+ .bp-doc h2:hover .header-anchor,
901
+ .bp-doc h2 .header-anchor:focus,
902
+ .bp-doc h3:hover .header-anchor,
903
+ .bp-doc h3 .header-anchor:focus,
904
+ .bp-doc h4:hover .header-anchor,
905
+ .bp-doc h4 .header-anchor:focus,
906
+ .bp-doc h5:hover .header-anchor,
907
+ .bp-doc h5 .header-anchor:focus,
908
+ .bp-doc h6:hover .header-anchor,
909
+ .bp-doc h6 .header-anchor:focus {
910
+ opacity: 1;
911
+ }
912
+
913
+ @media (min-width: 768px) {
914
+ .bp-doc h1 {
915
+ letter-spacing: -0.02em;
916
+ line-height: 40px;
917
+ font-size: 32px;
918
+ }
919
+ }
920
+
921
+ .bp-doc h2 .header-anchor {
922
+ top: 24px;
923
+ }
924
+
925
+ /**
926
+ * Paragraph and inline elements
927
+ * -------------------------------------------------------------------------- */
928
+
929
+ .bp-doc p,
930
+ .bp-doc summary {
931
+ margin: 16px 0;
932
+ }
933
+
934
+ .bp-doc p {
935
+ line-height: 28px;
936
+ }
937
+
938
+ .bp-doc blockquote {
939
+ margin: 16px 0;
940
+ border-left: 2px solid var(--bp-c-divider);
941
+ padding-left: 16px;
942
+ transition: border-color 0.5s;
943
+ color: var(--bp-c-text-2);
944
+ }
945
+
946
+ .bp-doc blockquote > p {
947
+ margin: 0;
948
+ font-size: 16px;
949
+ transition: color 0.5s;
950
+ }
951
+
952
+ .bp-doc a {
953
+ font-weight: 500;
954
+ color: var(--bp-c-brand-1);
955
+ text-decoration: underline;
956
+ text-underline-offset: 2px;
957
+ transition: color 0.25s, opacity 0.25s;
958
+ }
959
+
960
+ .bp-doc a:hover {
961
+ color: var(--bp-c-brand-2);
962
+ }
963
+
964
+ .bp-doc strong {
965
+ font-weight: 600;
966
+ }
967
+
968
+ /**
969
+ * Lists
970
+ * -------------------------------------------------------------------------- */
971
+
972
+ .bp-doc ul,
973
+ .bp-doc ol {
974
+ padding-left: 1.25rem;
975
+ margin: 16px 0;
976
+ }
977
+
978
+ .bp-doc ul {
979
+ list-style: disc;
980
+ }
981
+
982
+ .bp-doc ol {
983
+ list-style: decimal;
984
+ }
985
+
986
+ .bp-doc li + li {
987
+ margin-top: 8px;
988
+ }
989
+
990
+ .bp-doc li > ol,
991
+ .bp-doc li > ul {
992
+ margin: 8px 0 0;
993
+ }
994
+
995
+ /* Task list styles */
996
+ .bp-doc .task-list {
997
+ list-style: none;
998
+ padding-left: 0;
999
+ }
1000
+
1001
+ .bp-doc .task-list-item {
1002
+ display: flex;
1003
+ align-items: flex-start;
1004
+ gap: 0.5rem;
1005
+ }
1006
+
1007
+ .bp-doc .task-list-checkbox {
1008
+ margin-top: 0.25rem;
1009
+ width: 1rem;
1010
+ height: 1rem;
1011
+ accent-color: var(--bp-c-brand-1);
1012
+ cursor: default;
1013
+ }
1014
+
1015
+ .bp-doc .task-list-item input[type="checkbox"]:checked + span,
1016
+ .bp-doc .task-list-item:has(input:checked) {
1017
+ color: var(--bp-c-text-2);
1018
+ }
1019
+
1020
+ /**
1021
+ * Table
1022
+ * -------------------------------------------------------------------------- */
1023
+
1024
+ .bp-doc table {
1025
+ display: block;
1026
+ border-collapse: collapse;
1027
+ margin: 20px 0;
1028
+ overflow-x: auto;
1029
+ }
1030
+
1031
+ .bp-doc tr {
1032
+ background-color: var(--bp-c-bg);
1033
+ border-top: 1px solid var(--bp-c-divider);
1034
+ transition: background-color 0.5s;
1035
+ }
1036
+
1037
+ .bp-doc tr:nth-child(2n) {
1038
+ background-color: var(--bp-c-bg-soft);
1039
+ }
1040
+
1041
+ .bp-doc th,
1042
+ .bp-doc td {
1043
+ border: 1px solid var(--bp-c-divider);
1044
+ padding: 8px 16px;
1045
+ }
1046
+
1047
+ .bp-doc th {
1048
+ text-align: left;
1049
+ font-size: 14px;
1050
+ font-weight: 600;
1051
+ color: var(--bp-c-text-2);
1052
+ background-color: var(--bp-c-bg-soft);
1053
+ }
1054
+
1055
+ .bp-doc td {
1056
+ font-size: 14px;
1057
+ }
1058
+
1059
+ /**
1060
+ * Decorational elements
1061
+ * -------------------------------------------------------------------------- */
1062
+
1063
+ .bp-doc hr {
1064
+ margin: 16px 0;
1065
+ border: none;
1066
+ border-top: 1px solid var(--bp-c-divider);
1067
+ }
1068
+
1069
+ /**
1070
+ * Inline code
1071
+ * -------------------------------------------------------------------------- */
1072
+
1073
+ .bp-doc :not(pre, h1, h2, h3, h4, h5, h6) > code {
1074
+ font-size: var(--bp-code-font-size);
1075
+ color: var(--bp-code-color);
1076
+ }
1077
+
1078
+ .bp-doc :not(pre) > code {
1079
+ border-radius: 4px;
1080
+ padding: 3px 6px;
1081
+ background-color: var(--bp-code-bg);
1082
+ transition: color 0.25s, background-color 0.5s;
1083
+ }
1084
+
1085
+ .bp-doc a > code {
1086
+ color: var(--bp-code-link-color);
1087
+ }
1088
+
1089
+ .bp-doc a:hover > code {
1090
+ color: var(--bp-code-link-hover-color);
1091
+ }
1092
+
1093
+ .bp-doc h1 > code,
1094
+ .bp-doc h2 > code,
1095
+ .bp-doc h3 > code,
1096
+ .bp-doc h4 > code {
1097
+ font-size: 0.9em;
1098
+ }
1099
+
1100
+ /**
1101
+ * Code blocks
1102
+ * -------------------------------------------------------------------------- */
1103
+
1104
+ .bp-doc div[class*='language-'],
1105
+ .bp-doc pre[data-lang],
1106
+ .bp-block {
1107
+ position: relative;
1108
+ margin: 16px -24px;
1109
+ background-color: var(--bp-code-block-bg);
1110
+ overflow-x: auto;
1111
+ transition: background-color 0.5s;
1112
+ }
1113
+
1114
+ @media (min-width: 640px) {
1115
+ .bp-doc div[class*='language-'],
1116
+ .bp-doc pre[data-lang],
1117
+ .bp-block {
1118
+ border-radius: 8px;
1119
+ margin: 16px 0;
1120
+ }
1121
+ }
1122
+
1123
+ @media (max-width: 639px) {
1124
+ .bp-doc li div[class*='language-'],
1125
+ .bp-doc li pre[data-lang] {
1126
+ border-radius: 8px 0 0 8px;
1127
+ }
1128
+ }
1129
+
1130
+ .bp-doc div[class*='language-'] + div[class*='language-'],
1131
+ .bp-doc div[class$='-api'] + div[class*='language-'],
1132
+ .bp-doc div[class*='language-'] + div[class$='-api'] > div[class*='language-'],
1133
+ .bp-doc pre[data-lang] + pre[data-lang] {
1134
+ margin-top: -8px;
1135
+ }
1136
+
1137
+ .bp-doc [class*='language-'] pre,
1138
+ .bp-doc [class*='language-'] code,
1139
+ .bp-doc pre[data-lang],
1140
+ .bp-doc pre[data-lang] code {
1141
+ -moz-tab-size: 4;
1142
+ -o-tab-size: 4;
1143
+ tab-size: 4;
1144
+ }
1145
+
1146
+ .bp-doc [class*='language-'] pre,
1147
+ .bp-doc pre[data-lang] {
1148
+ position: relative;
1149
+ z-index: 1;
1150
+ margin: 0;
1151
+ padding: 20px 0;
1152
+ background: transparent;
1153
+ overflow-x: auto;
1154
+ text-align: left;
1155
+ }
1156
+
1157
+ .bp-doc [class*='language-'] code,
1158
+ .bp-doc pre[data-lang] code {
1159
+ display: block;
1160
+ padding: 0 24px;
1161
+ width: fit-content;
1162
+ min-width: 100%;
1163
+ line-height: var(--bp-code-line-height);
1164
+ font-size: var(--bp-code-font-size);
1165
+ color: var(--bp-code-block-color);
1166
+ transition: color 0.5s;
1167
+ }
1168
+
1169
+ .bp-doc [class*='language-'] code .highlighted,
1170
+ .bp-doc pre[data-lang] code .highlighted {
1171
+ background-color: var(--bp-code-line-highlight-color);
1172
+ transition: background-color 0.5s;
1173
+ margin: 0 -24px;
1174
+ padding: 0 24px;
1175
+ width: calc(100% + 2 * 24px);
1176
+ display: inline-block;
1177
+ }
1178
+
1179
+ .bp-doc [class*='language-'] code .highlighted.error,
1180
+ .bp-doc pre[data-lang] code .highlighted.error {
1181
+ background-color: var(--bp-code-line-error-color);
1182
+ }
1183
+
1184
+ .bp-doc [class*='language-'] code .highlighted.warning,
1185
+ .bp-doc pre[data-lang] code .highlighted.warning {
1186
+ background-color: var(--bp-code-line-warning-color);
1187
+ }
1188
+
1189
+ .bp-doc [class*='language-'] code .diff,
1190
+ .bp-doc pre[data-lang] code .diff {
1191
+ transition: background-color 0.5s;
1192
+ margin: 0 -24px;
1193
+ padding: 0 24px;
1194
+ width: calc(100% + 2 * 24px);
1195
+ display: inline-block;
1196
+ }
1197
+
1198
+ .bp-doc [class*='language-'] code .diff::before,
1199
+ .bp-doc pre[data-lang] code .diff::before {
1200
+ position: absolute;
1201
+ left: 10px;
1202
+ }
1203
+
1204
+ /* Focus lines with blur effect - matches VitePress exactly */
1205
+ .bp-doc [class*='language-'] .has-focused-lines .line:not(.has-focus),
1206
+ .bp-doc pre[data-lang] .has-focused-lines .line:not(.has-focus) {
1207
+ filter: blur(0.095rem);
1208
+ opacity: 0.4;
1209
+ transition: filter 0.35s, opacity 0.35s;
1210
+ }
1211
+
1212
+ /* VitePress has a second rule that overrides the opacity to 0.7 */
1213
+ .bp-doc [class*='language-'] .has-focused-lines .line:not(.has-focus),
1214
+ .bp-doc pre[data-lang] .has-focused-lines .line:not(.has-focus) {
1215
+ opacity: 0.7;
1216
+ transition: filter 0.35s, opacity 0.35s;
1217
+ }
1218
+
1219
+ .bp-doc [class*='language-']:hover .has-focused-lines .line:not(.has-focus),
1220
+ .bp-doc pre[data-lang]:hover .has-focused-lines .line:not(.has-focus) {
1221
+ filter: blur(0);
1222
+ opacity: 1;
1223
+ }
1224
+
1225
+ .bp-doc [class*='language-'] code .diff.remove,
1226
+ .bp-doc pre[data-lang] code .diff.remove {
1227
+ background-color: var(--bp-code-line-diff-remove-color);
1228
+ opacity: 0.7;
1229
+ }
1230
+
1231
+ .bp-doc [class*='language-'] code .diff.remove::before,
1232
+ .bp-doc pre[data-lang] code .diff.remove::before {
1233
+ content: '-';
1234
+ color: var(--bp-code-line-diff-remove-symbol-color);
1235
+ }
1236
+
1237
+ .bp-doc [class*='language-'] code .diff.add,
1238
+ .bp-doc pre[data-lang] code .diff.add {
1239
+ background-color: var(--bp-code-line-diff-add-color);
1240
+ }
1241
+
1242
+ .bp-doc [class*='language-'] code .diff.add::before,
1243
+ .bp-doc pre[data-lang] code .diff.add::before {
1244
+ content: '+';
1245
+ color: var(--bp-code-line-diff-add-symbol-color);
1246
+ }
1247
+
1248
+ /* Line numbers */
1249
+ .bp-doc div[class*='language-'].line-numbers-mode,
1250
+ .bp-doc pre[data-lang].line-numbers-mode {
1251
+ padding-left: 32px;
1252
+ }
1253
+
1254
+ .bp-doc .line-numbers-wrapper {
1255
+ position: absolute;
1256
+ top: 0;
1257
+ bottom: 0;
1258
+ left: 0;
1259
+ z-index: 3;
1260
+ border-right: 1px solid var(--bp-code-block-divider-color);
1261
+ padding-top: 20px;
1262
+ width: 32px;
1263
+ text-align: center;
1264
+ font-family: var(--bp-font-family-mono);
1265
+ line-height: var(--bp-code-line-height);
1266
+ font-size: var(--bp-code-font-size);
1267
+ color: var(--bp-code-line-number-color);
1268
+ transition: border-color 0.5s, color 0.5s;
1269
+ }
1270
+
1271
+ /* Copy button */
1272
+ .bp-doc [class*='language-'] > button.copy,
1273
+ .bp-doc pre[data-lang] > button.copy {
1274
+ direction: ltr;
1275
+ position: absolute;
1276
+ top: 12px;
1277
+ right: 12px;
1278
+ z-index: 3;
1279
+ border: 1px solid var(--bp-code-copy-code-border-color);
1280
+ border-radius: 4px;
1281
+ width: 40px;
1282
+ height: 40px;
1283
+ background-color: var(--bp-code-copy-code-bg);
1284
+ opacity: 0;
1285
+ cursor: pointer;
1286
+ background-image: var(--bp-icon-copy);
1287
+ background-position: 50%;
1288
+ background-size: 20px;
1289
+ background-repeat: no-repeat;
1290
+ transition: border-color 0.25s, background-color 0.25s, opacity 0.25s;
1291
+ }
1292
+
1293
+ .bp-doc [class*='language-']:hover > button.copy,
1294
+ .bp-doc [class*='language-'] > button.copy:focus,
1295
+ .bp-doc pre[data-lang]:hover > button.copy,
1296
+ .bp-doc pre[data-lang] > button.copy:focus {
1297
+ opacity: 1;
1298
+ }
1299
+
1300
+ .bp-doc [class*='language-'] > button.copy:hover,
1301
+ .bp-doc [class*='language-'] > button.copy.copied,
1302
+ .bp-doc pre[data-lang] > button.copy:hover,
1303
+ .bp-doc pre[data-lang] > button.copy.copied {
1304
+ border-color: var(--bp-code-copy-code-hover-border-color);
1305
+ background-color: var(--bp-code-copy-code-hover-bg);
1306
+ }
1307
+
1308
+ .bp-doc [class*='language-'] > button.copy.copied,
1309
+ .bp-doc pre[data-lang] > button.copy.copied {
1310
+ border-radius: 0 4px 4px 0;
1311
+ background-image: var(--bp-icon-copied);
1312
+ }
1313
+
1314
+ .bp-doc [class*='language-'] > button.copy.copied::before,
1315
+ .bp-doc pre[data-lang] > button.copy.copied::before {
1316
+ position: relative;
1317
+ top: -1px;
1318
+ transform: translateX(calc(-100% - 1px));
1319
+ display: flex;
1320
+ justify-content: center;
1321
+ align-items: center;
1322
+ border: 1px solid var(--bp-code-copy-code-hover-border-color);
1323
+ border-right: 0;
1324
+ border-radius: 4px 0 0 4px;
1325
+ padding: 0 10px;
1326
+ width: fit-content;
1327
+ height: 40px;
1328
+ text-align: center;
1329
+ font-size: 12px;
1330
+ font-weight: 500;
1331
+ color: var(--bp-code-copy-code-active-text);
1332
+ background-color: var(--bp-code-copy-code-hover-bg);
1333
+ white-space: nowrap;
1334
+ content: var(--bp-code-copy-copied-text-content);
1335
+ }
1336
+
1337
+ /* Language label */
1338
+ .bp-doc [class*='language-'] > span.lang,
1339
+ .bp-doc pre[data-lang]::before {
1340
+ position: absolute;
1341
+ top: 2px;
1342
+ right: 8px;
1343
+ z-index: 2;
1344
+ font-size: 12px;
1345
+ font-weight: 500;
1346
+ user-select: none;
1347
+ color: var(--bp-code-lang-color);
1348
+ transition: color 0.4s, opacity 0.4s;
1349
+ }
1350
+
1351
+ .bp-doc pre[data-lang]::before {
1352
+ content: attr(data-lang);
1353
+ }
1354
+
1355
+ .bp-doc [class*='language-']:hover > button.copy + span.lang,
1356
+ .bp-doc [class*='language-'] > button.copy:focus + span.lang {
1357
+ opacity: 0;
1358
+ }
1359
+
1360
+ /**
1361
+ * External links
1362
+ * -------------------------------------------------------------------------- */
1363
+
1364
+ :is(.bp-external-link-icon, .bp-doc a[href*='://'], .bp-doc a[target='_blank']):not(:is(.no-icon, svg a, :has(img, svg)))::after {
1365
+ display: inline-block;
1366
+ margin-top: -1px;
1367
+ margin-left: 4px;
1368
+ width: 11px;
1369
+ height: 11px;
1370
+ background: currentColor;
1371
+ color: var(--bp-c-text-3);
1372
+ flex-shrink: 0;
1373
+ --icon: var(--bp-icon-external);
1374
+ -webkit-mask-image: var(--icon);
1375
+ mask-image: var(--icon);
1376
+ }
1377
+
1378
+ .bp-external-link-icon::after {
1379
+ content: '';
1380
+ }
1381
+
1382
+ .external-link-icon-enabled :is(.bp-doc a[href*='://'], .bp-doc a[target='_blank']):not(:is(.no-icon, svg a, :has(img, svg)))::after {
1383
+ content: '';
1384
+ color: currentColor;
1385
+ }
1386
+
1387
+ /**
1388
+ * Component: Team - VPTeamMembers
1389
+ * -------------------------------------------------------------------------- */
1390
+
1391
+ .bp-doc .BPTeamMembers {
1392
+ margin-top: 24px;
1393
+ }
1394
+
1395
+ .bp-doc .BPTeamMembers.small.count-1 .container {
1396
+ margin: 0 !important;
1397
+ max-width: calc((100% - 24px) / 2) !important;
1398
+ }
1399
+
1400
+ .bp-doc .BPTeamMembers.small.count-2 .container,
1401
+ .bp-doc .BPTeamMembers.small.count-3 .container {
1402
+ max-width: 100% !important;
1403
+ }
1404
+
1405
+ .bp-doc .BPTeamMembers.medium.count-1 .container {
1406
+ margin: 0 !important;
1407
+ max-width: calc((100% - 24px) / 2) !important;
1408
+ }
1409
+
1410
+ /**
1411
+ * Custom block code group tabs
1412
+ * -------------------------------------------------------------------------- */
1413
+
1414
+ .bp-doc .custom-block .bp-code-group .tabs {
1415
+ margin: 0;
1416
+ border-radius: 8px 8px 0 0;
1417
+ }`
1418
+
1419
+ // Custom Block CSS - Matches VitePress custom-block.css
1420
+ const customBlockCSS = `/**
1421
+ * VitePress Theme for BunPress - Custom Blocks
1422
+ * -------------------------------------------------------------------------- */
1423
+
1424
+ .custom-block {
1425
+ border: 1px solid transparent;
1426
+ border-radius: 8px;
1427
+ padding: 16px 16px 8px;
1428
+ line-height: 24px;
1429
+ font-size: var(--bp-custom-block-font-size);
1430
+ color: var(--bp-c-text-2);
1431
+ }
1432
+
1433
+ .custom-block.info {
1434
+ border-color: var(--bp-custom-block-info-border);
1435
+ color: var(--bp-custom-block-info-text);
1436
+ background-color: var(--bp-custom-block-info-bg);
1437
+ }
1438
+
1439
+ .custom-block.info a,
1440
+ .custom-block.info code {
1441
+ color: var(--bp-c-brand-1);
1442
+ }
1443
+
1444
+ .custom-block.info a:hover,
1445
+ .custom-block.info a:hover > code {
1446
+ color: var(--bp-c-brand-2);
1447
+ }
1448
+
1449
+ .custom-block.info code {
1450
+ background-color: var(--bp-custom-block-info-code-bg);
1451
+ }
1452
+
1453
+ .custom-block.note {
1454
+ border-color: var(--bp-custom-block-note-border);
1455
+ color: var(--bp-custom-block-note-text);
1456
+ background-color: var(--bp-custom-block-note-bg);
1457
+ }
1458
+
1459
+ .custom-block.note a,
1460
+ .custom-block.note code {
1461
+ color: var(--bp-c-brand-1);
1462
+ }
1463
+
1464
+ .custom-block.note a:hover,
1465
+ .custom-block.note a:hover > code {
1466
+ color: var(--bp-c-brand-2);
1467
+ }
1468
+
1469
+ .custom-block.note code {
1470
+ background-color: var(--bp-custom-block-note-code-bg);
1471
+ }
1472
+
1473
+ .custom-block.tip {
1474
+ border-color: var(--bp-custom-block-tip-border);
1475
+ color: var(--bp-custom-block-tip-text);
1476
+ background-color: var(--bp-custom-block-tip-bg);
1477
+ }
1478
+
1479
+ .custom-block.tip a,
1480
+ .custom-block.tip code {
1481
+ color: var(--bp-c-tip-1);
1482
+ }
1483
+
1484
+ .custom-block.tip a:hover,
1485
+ .custom-block.tip a:hover > code {
1486
+ color: var(--bp-c-tip-2);
1487
+ }
1488
+
1489
+ .custom-block.tip code {
1490
+ background-color: var(--bp-custom-block-tip-code-bg);
1491
+ }
1492
+
1493
+ .custom-block.important {
1494
+ border-color: var(--bp-custom-block-important-border);
1495
+ color: var(--bp-custom-block-important-text);
1496
+ background-color: var(--bp-custom-block-important-bg);
1497
+ }
1498
+
1499
+ .custom-block.important a,
1500
+ .custom-block.important code {
1501
+ color: var(--bp-c-important-1);
1502
+ }
1503
+
1504
+ .custom-block.important a:hover,
1505
+ .custom-block.important a:hover > code {
1506
+ color: var(--bp-c-important-2);
1507
+ }
1508
+
1509
+ .custom-block.important code {
1510
+ background-color: var(--bp-custom-block-important-code-bg);
1511
+ }
1512
+
1513
+ .custom-block.warning {
1514
+ border-color: var(--bp-custom-block-warning-border);
1515
+ color: var(--bp-custom-block-warning-text);
1516
+ background-color: var(--bp-custom-block-warning-bg);
1517
+ }
1518
+
1519
+ .custom-block.warning a,
1520
+ .custom-block.warning code {
1521
+ color: var(--bp-c-warning-1);
1522
+ }
1523
+
1524
+ .custom-block.warning a:hover,
1525
+ .custom-block.warning a:hover > code {
1526
+ color: var(--bp-c-warning-2);
1527
+ }
1528
+
1529
+ .custom-block.warning code {
1530
+ background-color: var(--bp-custom-block-warning-code-bg);
1531
+ }
1532
+
1533
+ .custom-block.danger {
1534
+ border-color: var(--bp-custom-block-danger-border);
1535
+ color: var(--bp-custom-block-danger-text);
1536
+ background-color: var(--bp-custom-block-danger-bg);
1537
+ }
1538
+
1539
+ .custom-block.danger a,
1540
+ .custom-block.danger code {
1541
+ color: var(--bp-c-danger-1);
1542
+ }
1543
+
1544
+ .custom-block.danger a:hover,
1545
+ .custom-block.danger a:hover > code {
1546
+ color: var(--bp-c-danger-2);
1547
+ }
1548
+
1549
+ .custom-block.danger code {
1550
+ background-color: var(--bp-custom-block-danger-code-bg);
1551
+ }
1552
+
1553
+ .custom-block.caution {
1554
+ border-color: var(--bp-custom-block-caution-border);
1555
+ color: var(--bp-custom-block-caution-text);
1556
+ background-color: var(--bp-custom-block-caution-bg);
1557
+ }
1558
+
1559
+ .custom-block.caution a,
1560
+ .custom-block.caution code {
1561
+ color: var(--bp-c-caution-1);
1562
+ }
1563
+
1564
+ .custom-block.caution a:hover,
1565
+ .custom-block.caution a:hover > code {
1566
+ color: var(--bp-c-caution-2);
1567
+ }
1568
+
1569
+ .custom-block.caution code {
1570
+ background-color: var(--bp-custom-block-caution-code-bg);
1571
+ }
1572
+
1573
+ .custom-block.details {
1574
+ border-color: var(--bp-custom-block-details-border);
1575
+ color: var(--bp-custom-block-details-text);
1576
+ background-color: var(--bp-custom-block-details-bg);
1577
+ }
1578
+
1579
+ .custom-block.details a {
1580
+ color: var(--bp-c-brand-1);
1581
+ }
1582
+
1583
+ .custom-block.details a:hover,
1584
+ .custom-block.details a:hover > code {
1585
+ color: var(--bp-c-brand-2);
1586
+ }
1587
+
1588
+ .custom-block.details code {
1589
+ background-color: var(--bp-custom-block-details-code-bg);
1590
+ }
1591
+
1592
+ .custom-block-title {
1593
+ font-weight: 600;
1594
+ }
1595
+
1596
+ .custom-block p + p {
1597
+ margin: 8px 0;
1598
+ }
1599
+
1600
+ .custom-block.details summary {
1601
+ margin: 0 0 8px;
1602
+ font-weight: 700;
1603
+ cursor: pointer;
1604
+ user-select: none;
1605
+ }
1606
+
1607
+ .custom-block.details summary + p {
1608
+ margin: 8px 0;
1609
+ }
1610
+
1611
+ .custom-block a {
1612
+ color: inherit;
1613
+ font-weight: 600;
1614
+ text-decoration: underline;
1615
+ text-underline-offset: 2px;
1616
+ transition: opacity 0.25s;
1617
+ }
1618
+
1619
+ .custom-block a:hover {
1620
+ opacity: 0.75;
1621
+ }
1622
+
1623
+ .custom-block code {
1624
+ font-size: var(--bp-custom-block-code-font-size);
1625
+ }
1626
+
1627
+ .custom-block.custom-block th,
1628
+ .custom-block.custom-block blockquote > p {
1629
+ font-size: var(--bp-custom-block-font-size);
1630
+ color: inherit;
1631
+ }
1632
+
1633
+ /* Custom blocks in vp-doc context */
1634
+ .bp-doc .custom-block {
1635
+ margin: 16px 0;
1636
+ }
1637
+
1638
+ .bp-doc .custom-block p {
1639
+ margin: 8px 0;
1640
+ line-height: 24px;
1641
+ }
1642
+
1643
+ .bp-doc .custom-block p:first-child {
1644
+ margin: 0;
1645
+ }
1646
+
1647
+ .bp-doc .custom-block div[class*='language-'],
1648
+ .bp-doc .custom-block pre[data-lang] {
1649
+ margin: 8px 0 !important;
1650
+ border-radius: 8px;
1651
+ }
1652
+
1653
+ .bp-doc .custom-block div[class*='language-'] code,
1654
+ .bp-doc .custom-block pre[data-lang] code {
1655
+ font-weight: 400;
1656
+ background-color: transparent;
1657
+ }
1658
+
1659
+ /**
1660
+ * GitHub-Flavored Alerts (VitePress style)
1661
+ * -------------------------------------------------------------------------- */
1662
+
1663
+ .github-alert {
1664
+ border: 1px solid transparent;
1665
+ border-radius: 8px;
1666
+ padding: 16px 16px 8px;
1667
+ line-height: 24px;
1668
+ font-size: var(--bp-custom-block-font-size);
1669
+ margin: 16px 0;
1670
+ }
1671
+
1672
+ .github-alert-title {
1673
+ display: flex;
1674
+ align-items: center;
1675
+ gap: 8px;
1676
+ font-weight: 600;
1677
+ margin-bottom: 8px;
1678
+ }
1679
+
1680
+ .github-alert-icon {
1681
+ flex-shrink: 0;
1682
+ width: 16px;
1683
+ height: 16px;
1684
+ }
1685
+
1686
+ .github-alert-content {
1687
+ line-height: 24px;
1688
+ }
1689
+
1690
+ .github-alert-content p {
1691
+ margin: 8px 0;
1692
+ }
1693
+
1694
+ .github-alert-content p:first-child {
1695
+ margin-top: 0;
1696
+ }
1697
+
1698
+ /* Note Alert */
1699
+ .github-alert-note {
1700
+ border-color: var(--bp-custom-block-note-border);
1701
+ color: var(--bp-custom-block-note-text);
1702
+ background-color: var(--bp-custom-block-note-bg);
1703
+ }
1704
+
1705
+ .github-alert-note .github-alert-title {
1706
+ color: var(--bp-c-brand-1);
1707
+ }
1708
+
1709
+ .github-alert-note .github-alert-icon {
1710
+ fill: var(--bp-c-brand-1);
1711
+ }
1712
+
1713
+ /* Tip Alert */
1714
+ .github-alert-tip {
1715
+ border-color: var(--bp-custom-block-tip-border);
1716
+ color: var(--bp-custom-block-tip-text);
1717
+ background-color: var(--bp-custom-block-tip-bg);
1718
+ }
1719
+
1720
+ .github-alert-tip .github-alert-title {
1721
+ color: var(--bp-c-tip-1);
1722
+ }
1723
+
1724
+ .github-alert-tip .github-alert-icon {
1725
+ fill: var(--bp-c-tip-1);
1726
+ }
1727
+
1728
+ /* Important Alert */
1729
+ .github-alert-important {
1730
+ border-color: var(--bp-custom-block-important-border);
1731
+ color: var(--bp-custom-block-important-text);
1732
+ background-color: var(--bp-custom-block-important-bg);
1733
+ }
1734
+
1735
+ .github-alert-important .github-alert-title {
1736
+ color: var(--bp-c-important-1);
1737
+ }
1738
+
1739
+ .github-alert-important .github-alert-icon {
1740
+ fill: var(--bp-c-important-1);
1741
+ }
1742
+
1743
+ /* Warning Alert */
1744
+ .github-alert-warning {
1745
+ border-color: var(--bp-custom-block-warning-border);
1746
+ color: var(--bp-custom-block-warning-text);
1747
+ background-color: var(--bp-custom-block-warning-bg);
1748
+ }
1749
+
1750
+ .github-alert-warning .github-alert-title {
1751
+ color: var(--bp-c-warning-1);
1752
+ }
1753
+
1754
+ .github-alert-warning .github-alert-icon {
1755
+ fill: var(--bp-c-warning-1);
1756
+ }
1757
+
1758
+ /* Caution Alert */
1759
+ .github-alert-caution {
1760
+ border-color: var(--bp-custom-block-caution-border);
1761
+ color: var(--bp-custom-block-caution-text);
1762
+ background-color: var(--bp-custom-block-caution-bg);
1763
+ }
1764
+
1765
+ .github-alert-caution .github-alert-title {
1766
+ color: var(--bp-c-caution-1);
1767
+ }
1768
+
1769
+ .github-alert-caution .github-alert-icon {
1770
+ fill: var(--bp-c-caution-1);
1771
+ }`
1772
+
1773
+ // Code Group CSS - Matches VitePress vp-code-group.css exactly
1774
+ const codeGroupCSS = `/**
1775
+ * VitePress Theme for BunPress - Code Groups
1776
+ * -------------------------------------------------------------------------- */
1777
+
1778
+ .bp-code-group {
1779
+ margin-top: 16px;
1780
+ }
1781
+
1782
+ .bp-code-group .tabs,
1783
+ .code-group-tabs {
1784
+ position: relative;
1785
+ display: flex;
1786
+ margin-right: -24px;
1787
+ margin-left: -24px;
1788
+ padding: 0 12px;
1789
+ background-color: var(--bp-code-tab-bg);
1790
+ overflow-x: auto;
1791
+ overflow-y: hidden;
1792
+ box-shadow: inset 0 -1px var(--bp-code-tab-divider);
1793
+ }
1794
+
1795
+ @media (min-width: 640px) {
1796
+ .bp-code-group .tabs,
1797
+ .code-group-tabs {
1798
+ margin-right: 0;
1799
+ margin-left: 0;
1800
+ border-radius: 8px 8px 0 0;
1801
+ }
1802
+ }
1803
+
1804
+ /* Hidden input for tab switching - matches VitePress exactly */
1805
+ .bp-code-group .tabs input {
1806
+ position: fixed;
1807
+ opacity: 0;
1808
+ pointer-events: none;
1809
+ }
1810
+
1811
+ .bp-code-group .tabs label,
1812
+ .code-group-tab {
1813
+ position: relative;
1814
+ display: inline-block;
1815
+ border-bottom: 1px solid transparent;
1816
+ padding: 0 12px;
1817
+ line-height: 48px;
1818
+ font-size: 14px;
1819
+ font-weight: 500;
1820
+ color: var(--bp-code-tab-text-color);
1821
+ white-space: nowrap;
1822
+ cursor: pointer;
1823
+ transition: color 0.25s;
1824
+ background: transparent;
1825
+ border: none;
1826
+ font-family: inherit;
1827
+ }
1828
+
1829
+ .bp-code-group .tabs label::after,
1830
+ .code-group-tab::after {
1831
+ position: absolute;
1832
+ right: 8px;
1833
+ bottom: -1px;
1834
+ left: 8px;
1835
+ z-index: 1;
1836
+ height: 2px;
1837
+ border-radius: 2px;
1838
+ content: '';
1839
+ background-color: transparent;
1840
+ transition: background-color 0.25s;
1841
+ }
1842
+
1843
+ .bp-code-group label:hover,
1844
+ .code-group-tab:hover {
1845
+ color: var(--bp-code-tab-hover-text-color);
1846
+ }
1847
+
1848
+ .bp-code-group input:checked + label,
1849
+ .code-group-tab.active {
1850
+ color: var(--bp-code-tab-active-text-color);
1851
+ }
1852
+
1853
+ .bp-code-group input:checked + label::after,
1854
+ .code-group-tab.active::after {
1855
+ background-color: var(--bp-code-tab-active-bar-color);
1856
+ }
1857
+
1858
+ .bp-code-group div[class*='language-'],
1859
+ .bp-code-group pre[data-lang],
1860
+ .code-group-panel,
1861
+ .bp-block {
1862
+ display: none;
1863
+ margin-top: 0 !important;
1864
+ border-top-left-radius: 0 !important;
1865
+ border-top-right-radius: 0 !important;
1866
+ }
1867
+
1868
+ .bp-code-group div[class*='language-'].active,
1869
+ .bp-code-group pre[data-lang].active,
1870
+ .code-group-panel.active,
1871
+ .bp-block.active {
1872
+ display: block;
1873
+ }
1874
+
1875
+ .bp-block,
1876
+ .code-group-panel {
1877
+ padding: 20px 24px;
1878
+ }
1879
+
1880
+ /* Code group container */
1881
+ .code-group {
1882
+ margin: 16px 0;
1883
+ border: 1px solid var(--bp-c-divider);
1884
+ border-radius: 8px;
1885
+ overflow: hidden;
1886
+ }
1887
+
1888
+ @media (min-width: 640px) {
1889
+ .code-group {
1890
+ border: none;
1891
+ }
1892
+ }
1893
+
1894
+ .code-group-panels {
1895
+ position: relative;
1896
+ }
1897
+
1898
+ .code-group-panel pre {
1899
+ margin: 0;
1900
+ border-radius: 0;
1901
+ border: none;
1902
+ }`
1903
+
1904
+ /**
1905
+ * Get all VitePress theme CSS combined
1906
+ */
1907
+ export function getVitePressThemeCSS(): string {
1908
+ return `
1909
+ /* VitePress Theme for BunPress */
1910
+ ${varsCSS}
1911
+ ${baseCSS}
1912
+ ${customBlockCSS}
1913
+ ${codeGroupCSS}
1914
+ `
1915
+ }
1916
+
1917
+ /**
1918
+ * Get VitePress theme CSS variables only
1919
+ */
1920
+ export function getVitePressVars(): string {
1921
+ return varsCSS
1922
+ }
1923
+
1924
+ /**
1925
+ * Get VitePress base styles only
1926
+ */
1927
+ export function getVitePressBase(): string {
1928
+ return baseCSS
1929
+ }
1930
+
1931
+ /**
1932
+ * Get VitePress custom block styles only
1933
+ */
1934
+ export function getVitePressCustomBlocks(): string {
1935
+ return customBlockCSS
1936
+ }
1937
+
1938
+ /**
1939
+ * Get VitePress code group styles only
1940
+ */
1941
+ export function getVitePressCodeGroups(): string {
1942
+ return codeGroupCSS
1943
+ }
1944
+
1945
+ export interface VitePressTheme {
1946
+ name: string
1947
+ getCSS: () => string
1948
+ getVars: () => string
1949
+ getBase: () => string
1950
+ getCustomBlocks: () => string
1951
+ getCodeGroups: () => string
1952
+ }
1953
+
1954
+ const vitePressTheme: VitePressTheme = {
1955
+ name: 'vitepress',
1956
+ getCSS: getVitePressThemeCSS,
1957
+ getVars: getVitePressVars,
1958
+ getBase: getVitePressBase,
1959
+ getCustomBlocks: getVitePressCustomBlocks,
1960
+ getCodeGroups: getVitePressCodeGroups,
1961
+ }
1962
+
1963
+ export default vitePressTheme