@stacksjs/bunpress 0.1.3 → 0.1.5
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.
- package/README.md +7 -6
- package/dist/bin/cli.js +1 -1
- package/dist/chunk-2dt48d7r.js +2 -0
- package/dist/chunk-3w4kkysy.js +9006 -0
- package/dist/chunk-4j30b1q3.js +658 -0
- package/dist/{chunk-szme5v1e.js → chunk-e9211y1k.js} +1 -1
- package/dist/chunk-h6ac3d60.js +3 -0
- package/dist/chunk-mwr0x3ag.js +496 -0
- package/dist/src/index.js +1 -1
- package/dist/templates/blocks/alerts/caution.stx +1 -1
- package/dist/templates/blocks/alerts/important.stx +1 -1
- package/dist/templates/blocks/alerts/note.stx +1 -1
- package/dist/templates/blocks/alerts/tip.stx +1 -1
- package/dist/templates/blocks/alerts/warning.stx +1 -1
- package/dist/templates/blocks/containers/danger.stx +1 -1
- package/dist/templates/blocks/containers/details.stx +1 -1
- package/dist/templates/blocks/containers/info.stx +1 -1
- package/dist/templates/blocks/containers/raw.stx +1 -1
- package/dist/templates/blocks/containers/tip.stx +1 -1
- package/dist/templates/blocks/containers/warning.stx +1 -1
- package/dist/templates/features.stx +4 -17
- package/dist/templates/hero.stx +62 -7
- package/dist/templates/layout-doc.stx +23 -21
- package/dist/templates/layout-home.stx +0 -2
- package/dist/templates/layout-page.stx +10 -10
- package/dist/templates/page-toc.stx +6 -1
- package/dist/templates/sidebar-section.stx +68 -12
- package/dist/templates/sidebar.stx +23 -1
- package/dist/themes/vitepress/index.d.ts +638 -0
- package/dist/themes/vitepress/index.ts +640 -0
- package/package.json +3 -3
- package/dist/chunk-1ymh7yt2.js +0 -9656
- package/dist/chunk-8qj79f0y.js +0 -2
- package/dist/chunk-z0redasq.js +0 -530
|
@@ -1,20 +1,7 @@
|
|
|
1
|
-
<div class="VPHomeFeatures"
|
|
2
|
-
<div
|
|
3
|
-
<div class="VPFeatures"
|
|
4
|
-
{
|
|
1
|
+
<div class="VPHomeFeatures">
|
|
2
|
+
<div class="VPHomeFeatures-inner">
|
|
3
|
+
<div class="VPFeatures">
|
|
4
|
+
{!! items !!}
|
|
5
5
|
</div>
|
|
6
6
|
</div>
|
|
7
7
|
</div>
|
|
8
|
-
|
|
9
|
-
<style>
|
|
10
|
-
@media (min-width: 640px) {
|
|
11
|
-
.VPFeatures {
|
|
12
|
-
grid-template-columns: repeat(2, 1fr) !important;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
@media (min-width: 960px) {
|
|
16
|
-
.VPFeatures {
|
|
17
|
-
grid-template-columns: repeat(3, 1fr) !important;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
</style>
|
package/dist/templates/hero.stx
CHANGED
|
@@ -1,10 +1,65 @@
|
|
|
1
|
-
<div class="VPHomeHero"
|
|
2
|
-
<div
|
|
3
|
-
<div class="
|
|
4
|
-
{
|
|
5
|
-
{
|
|
6
|
-
{
|
|
7
|
-
{
|
|
1
|
+
<div class="VPHomeHero">
|
|
2
|
+
<div class="hero-container">
|
|
3
|
+
<div class="hero-content">
|
|
4
|
+
{!! name !!}
|
|
5
|
+
{!! text !!}
|
|
6
|
+
{!! tagline !!}
|
|
7
|
+
{!! actions !!}
|
|
8
8
|
</div>
|
|
9
|
+
{!! image !!}
|
|
9
10
|
</div>
|
|
10
11
|
</div>
|
|
12
|
+
|
|
13
|
+
<style>
|
|
14
|
+
.VPHomeHero {
|
|
15
|
+
position: relative;
|
|
16
|
+
padding: 64px 24px 48px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.hero-container {
|
|
20
|
+
max-width: 1152px;
|
|
21
|
+
margin: 0 auto;
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
align-items: center;
|
|
25
|
+
text-align: center;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.hero-content {
|
|
29
|
+
max-width: 640px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.hero-image {
|
|
33
|
+
margin-top: 32px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.hero-image img {
|
|
37
|
+
max-width: 200px;
|
|
38
|
+
height: auto;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@media (min-width: 960px) {
|
|
42
|
+
.VPHomeHero {
|
|
43
|
+
padding: 80px 64px 56px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.hero-container {
|
|
47
|
+
flex-direction: row;
|
|
48
|
+
text-align: left;
|
|
49
|
+
gap: 64px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.hero-content {
|
|
53
|
+
flex: 1;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.hero-image {
|
|
57
|
+
margin-top: 0;
|
|
58
|
+
flex-shrink: 0;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.hero-image img {
|
|
62
|
+
max-width: 280px;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
</style>
|
|
@@ -14,25 +14,29 @@
|
|
|
14
14
|
<body>
|
|
15
15
|
<div class="Layout">
|
|
16
16
|
<!-- VPNav - Header -->
|
|
17
|
-
<header class="VPNav"
|
|
18
|
-
<div
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
<header class="VPNav">
|
|
18
|
+
<div class="VPNavBar">
|
|
19
|
+
<div class="VPNavBarStart">
|
|
20
|
+
<button class="VPNavBarHamburger" type="button" aria-label="Toggle navigation" onclick="toggleSidebar()">
|
|
21
|
+
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
22
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path>
|
|
23
|
+
</svg>
|
|
24
|
+
</button>
|
|
25
|
+
<a href="/" class="VPNavBarTitle">{{ title }}</a>
|
|
26
|
+
<div class="VPNavBarSearch">
|
|
27
|
+
<svg class="VPNavBarSearch-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
24
28
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
|
|
25
29
|
</svg>
|
|
26
|
-
<input type="text"
|
|
27
|
-
<kbd
|
|
30
|
+
<input type="text" class="VPNavBarSearch-input" placeholder="Search" />
|
|
31
|
+
<kbd class="VPNavBarSearch-kbd">⌘ K</kbd>
|
|
28
32
|
</div>
|
|
29
33
|
</div>
|
|
30
34
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
<div class="VPNavBarEnd">
|
|
36
|
+
<div class="VPNavBarMenu">
|
|
37
|
+
{!! nav !!}
|
|
38
|
+
</div>
|
|
39
|
+
<div class="VPSocialLinks">
|
|
36
40
|
<button class="theme-toggle" onclick="toggleTheme()" aria-label="Toggle dark mode" title="Toggle dark mode">
|
|
37
41
|
<svg class="sun-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
38
42
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"></path>
|
|
@@ -41,8 +45,8 @@
|
|
|
41
45
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"></path>
|
|
42
46
|
</svg>
|
|
43
47
|
</button>
|
|
44
|
-
<a href="https://github.com/stacksjs/bunpress" target="_blank"
|
|
45
|
-
<svg
|
|
48
|
+
<a href="https://github.com/stacksjs/bunpress" target="_blank" rel="noopener external" aria-label="GitHub">
|
|
49
|
+
<svg fill="currentColor" viewBox="0 0 24 24">
|
|
46
50
|
<path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
|
|
47
51
|
</svg>
|
|
48
52
|
</a>
|
|
@@ -55,9 +59,9 @@
|
|
|
55
59
|
{!! sidebar !!}
|
|
56
60
|
|
|
57
61
|
<!-- VPContent - Main content area -->
|
|
58
|
-
<main class="VPContent
|
|
59
|
-
<div class="VPDoc"
|
|
60
|
-
<div class="VPDocContent"
|
|
62
|
+
<main class="VPContent VPContent--doc">
|
|
63
|
+
<div class="VPDoc">
|
|
64
|
+
<div class="VPDocContent">
|
|
61
65
|
<article class="bp-doc">
|
|
62
66
|
{!! content !!}
|
|
63
67
|
</article>
|
|
@@ -151,7 +155,5 @@
|
|
|
151
155
|
<!-- VPDocAside - TOC -->
|
|
152
156
|
{!! pageTOC !!}
|
|
153
157
|
</div>
|
|
154
|
-
|
|
155
|
-
{!! scripts !!}
|
|
156
158
|
</body>
|
|
157
159
|
</html>
|
|
@@ -14,27 +14,27 @@
|
|
|
14
14
|
<body>
|
|
15
15
|
<div class="Layout">
|
|
16
16
|
<!-- VPNav - Header -->
|
|
17
|
-
<header class="VPNav"
|
|
18
|
-
<div
|
|
19
|
-
<div
|
|
20
|
-
<a href="/" class="VPNavBarTitle"
|
|
17
|
+
<header class="VPNav">
|
|
18
|
+
<div class="VPNavBar">
|
|
19
|
+
<div class="VPNavBarStart">
|
|
20
|
+
<a href="/" class="VPNavBarTitle">{{ title }}</a>
|
|
21
21
|
</div>
|
|
22
|
-
<div
|
|
23
|
-
|
|
22
|
+
<div class="VPNavBarEnd">
|
|
23
|
+
<div class="VPNavBarMenu">
|
|
24
|
+
{!! nav !!}
|
|
25
|
+
</div>
|
|
24
26
|
</div>
|
|
25
27
|
</div>
|
|
26
28
|
</header>
|
|
27
29
|
|
|
28
30
|
<!-- VPContent - Full-width content without sidebar -->
|
|
29
|
-
<main class="VPContent
|
|
30
|
-
<div class="VPPage"
|
|
31
|
+
<main class="VPContent VPContent--page">
|
|
32
|
+
<div class="VPPage">
|
|
31
33
|
<article class="bp-doc">
|
|
32
34
|
{!! content !!}
|
|
33
35
|
</article>
|
|
34
36
|
</div>
|
|
35
37
|
</main>
|
|
36
38
|
</div>
|
|
37
|
-
|
|
38
|
-
{!! scripts !!}
|
|
39
39
|
</body>
|
|
40
40
|
</html>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<p class="outline-title">On this page</p>
|
|
4
4
|
<nav class="page-toc">
|
|
5
5
|
<div class="outline-marker"></div>
|
|
6
|
-
{
|
|
6
|
+
{!! items !!}
|
|
7
7
|
</nav>
|
|
8
8
|
</div>
|
|
9
9
|
</aside>
|
|
@@ -234,6 +234,11 @@ function initPageTOC() {
|
|
|
234
234
|
});
|
|
235
235
|
|
|
236
236
|
// Listen to scroll events on the actual scrolling container
|
|
237
|
+
// Remove any prior listener first so SPA navigation doesn't stack duplicates
|
|
238
|
+
if (scrollContainer.__bpTocScroll) {
|
|
239
|
+
scrollContainer.removeEventListener('scroll', scrollContainer.__bpTocScroll);
|
|
240
|
+
}
|
|
241
|
+
scrollContainer.__bpTocScroll = onScroll;
|
|
237
242
|
scrollContainer.addEventListener('scroll', onScroll);
|
|
238
243
|
|
|
239
244
|
// Handle URL hash on page load
|
|
@@ -1,27 +1,60 @@
|
|
|
1
|
-
<div class="VPSidebarItem sidebar-section"
|
|
2
|
-
<button
|
|
3
|
-
style="width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 8px 24px; font-size: 14px; font-weight: 600; color: var(--bp-c-text-1); background: transparent; border: none; cursor: pointer; transition: color 0.25s;"
|
|
4
|
-
onclick="toggleSection(this.parentElement)"
|
|
5
|
-
onmouseover="this.style.color='var(--bp-c-brand-1)'"
|
|
6
|
-
onmouseout="this.style.color='var(--bp-c-text-1)'"
|
|
7
|
-
>
|
|
1
|
+
<div class="VPSidebarItem sidebar-section">
|
|
2
|
+
<button class="sidebar-section-toggle" onclick="toggleSection(this.parentElement)" type="button">
|
|
8
3
|
<span>{{ title }}</span>
|
|
9
|
-
<svg class="chevron"
|
|
4
|
+
<svg class="chevron" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
10
5
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
|
|
11
6
|
</svg>
|
|
12
7
|
</button>
|
|
13
8
|
<div class="sidebar-items-wrapper">
|
|
14
|
-
<ul class="sidebar-items"
|
|
15
|
-
{
|
|
9
|
+
<ul class="sidebar-items">
|
|
10
|
+
{!! items !!}
|
|
16
11
|
</ul>
|
|
17
12
|
</div>
|
|
18
13
|
</div>
|
|
19
14
|
|
|
20
15
|
<style>
|
|
16
|
+
.sidebar-section {
|
|
17
|
+
margin-bottom: 16px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.sidebar-section-toggle {
|
|
21
|
+
width: 100%;
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
justify-content: space-between;
|
|
25
|
+
padding: 8px 24px;
|
|
26
|
+
font-size: 14px;
|
|
27
|
+
font-weight: 600;
|
|
28
|
+
color: var(--bp-c-text-1);
|
|
29
|
+
background: transparent;
|
|
30
|
+
border: none;
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
transition: color 0.25s;
|
|
33
|
+
font-family: inherit;
|
|
34
|
+
text-align: left;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.sidebar-section-toggle:hover {
|
|
38
|
+
color: var(--bp-c-brand-1);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.sidebar-section-toggle .chevron {
|
|
42
|
+
width: 16px;
|
|
43
|
+
height: 16px;
|
|
44
|
+
transition: transform 0.2s ease-in-out;
|
|
45
|
+
flex-shrink: 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.sidebar-items {
|
|
49
|
+
list-style: none;
|
|
50
|
+
margin: 4px 0 0 0;
|
|
51
|
+
padding: 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
21
54
|
.sidebar-items-wrapper {
|
|
22
55
|
overflow: hidden;
|
|
23
56
|
transition: max-height 0.3s ease-in-out, opacity 0.2s ease-in-out;
|
|
24
|
-
max-height:
|
|
57
|
+
max-height: 1000px;
|
|
25
58
|
opacity: 1;
|
|
26
59
|
}
|
|
27
60
|
|
|
@@ -30,9 +63,32 @@
|
|
|
30
63
|
opacity: 0;
|
|
31
64
|
}
|
|
32
65
|
|
|
33
|
-
.sidebar-section.collapsed .chevron {
|
|
66
|
+
.sidebar-section.collapsed .sidebar-section-toggle .chevron {
|
|
34
67
|
transform: rotate(-90deg);
|
|
35
68
|
}
|
|
69
|
+
|
|
70
|
+
.VPSidebarItem-link {
|
|
71
|
+
display: block;
|
|
72
|
+
padding: 6px 24px;
|
|
73
|
+
color: var(--bp-c-text-2);
|
|
74
|
+
text-decoration: none;
|
|
75
|
+
font-size: 14px;
|
|
76
|
+
line-height: 1.5;
|
|
77
|
+
transition: color 0.25s;
|
|
78
|
+
border-left: 2px solid transparent;
|
|
79
|
+
margin-left: 0;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.VPSidebarItem-link:hover {
|
|
83
|
+
color: var(--bp-c-brand-1);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.VPSidebarItem-link.is-active {
|
|
87
|
+
color: var(--bp-c-brand-1);
|
|
88
|
+
font-weight: 600;
|
|
89
|
+
border-left-color: var(--bp-c-brand-1);
|
|
90
|
+
padding-left: 22px;
|
|
91
|
+
}
|
|
36
92
|
</style>
|
|
37
93
|
|
|
38
94
|
<script>
|
|
@@ -1,9 +1,31 @@
|
|
|
1
|
+
<div class="VPSidebar-backdrop" onclick="toggleSidebar(false)"></div>
|
|
1
2
|
<nav class="VPSidebar">
|
|
2
3
|
<div class="sidebar-content">
|
|
3
|
-
{
|
|
4
|
+
{!! sections !!}
|
|
4
5
|
</div>
|
|
5
6
|
</nav>
|
|
6
7
|
|
|
8
|
+
<script>
|
|
9
|
+
function toggleSidebar(forceState) {
|
|
10
|
+
var sb = document.querySelector('.VPSidebar');
|
|
11
|
+
var bd = document.querySelector('.VPSidebar-backdrop');
|
|
12
|
+
if (!sb) return;
|
|
13
|
+
var nextOpen = typeof forceState === 'boolean' ? forceState : !sb.classList.contains('is-open');
|
|
14
|
+
sb.classList.toggle('is-open', nextOpen);
|
|
15
|
+
if (bd) bd.classList.toggle('is-open', nextOpen);
|
|
16
|
+
document.body.style.overflow = nextOpen ? 'hidden' : '';
|
|
17
|
+
}
|
|
18
|
+
if (!window.__bpSidebarBound) {
|
|
19
|
+
window.__bpSidebarBound = true;
|
|
20
|
+
// Close drawer when the user clicks a sidebar link on mobile
|
|
21
|
+
document.addEventListener('click', function(e) {
|
|
22
|
+
if (window.matchMedia('(min-width: 960px)').matches) return;
|
|
23
|
+
var a = e.target.closest('.VPSidebar a');
|
|
24
|
+
if (a) toggleSidebar(false);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
</script>
|
|
28
|
+
|
|
7
29
|
<style>
|
|
8
30
|
.VPSidebar {
|
|
9
31
|
position: fixed;
|