vitepress 1.0.0-draft.5 → 1.0.0-draft.8
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/dist/client/theme-default/components/VPBox.vue +1 -1
- package/dist/client/theme-default/components/VPButton.vue +0 -1
- package/dist/client/theme-default/components/VPDoc.vue +8 -5
- package/dist/client/theme-default/components/VPDocAside.vue +14 -2
- package/dist/client/theme-default/components/VPDocAsideOutline.vue +37 -32
- package/dist/client/theme-default/components/VPHero.vue +196 -30
- package/dist/client/theme-default/components/VPHomeFeatures.vue +1 -0
- package/dist/client/theme-default/components/VPHomeHero.vue +1 -0
- package/dist/client/theme-default/components/VPMenu.vue +1 -1
- package/dist/client/theme-default/components/VPNavBarExtra.vue +1 -5
- package/dist/client/theme-default/styles/base.css +4 -0
- package/dist/client/theme-default/styles/vars.css +3 -0
- package/dist/node/cli.js +2 -2
- package/dist/node/index.js +2 -2
- package/dist/node/{serve-f7c10936.js → serve-9c85885c.js} +4 -4
- package/dist/node-cjs/cli.cjs +2 -2
- package/dist/node-cjs/index.cjs +2 -2
- package/dist/node-cjs/{serve-c220f0a8.cjs → serve-a73b4871.cjs} +7 -7
- package/package.json +2 -2
|
@@ -59,7 +59,7 @@ const pageName = computed(() => {
|
|
|
59
59
|
|
|
60
60
|
@media (min-width: 960px) {
|
|
61
61
|
.VPDoc {
|
|
62
|
-
padding: 32px 32px
|
|
62
|
+
padding: 32px 32px 0;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
.VPDoc:not(.has-sidebar) .container {
|
|
@@ -118,7 +118,7 @@ const pageName = computed(() => {
|
|
|
118
118
|
top: 0;
|
|
119
119
|
margin-top: calc(var(--vp-nav-height-desktop) * -1 - 32px);
|
|
120
120
|
padding-top: calc(var(--vp-nav-height-desktop) + 32px);
|
|
121
|
-
|
|
121
|
+
height: 100vh;
|
|
122
122
|
overflow-x: hidden;
|
|
123
123
|
overflow-y: auto;
|
|
124
124
|
scrollbar-width: none;
|
|
@@ -133,12 +133,15 @@ const pageName = computed(() => {
|
|
|
133
133
|
bottom: 0;
|
|
134
134
|
z-index: 10;
|
|
135
135
|
width: 224px;
|
|
136
|
-
height:
|
|
136
|
+
height: 32px;
|
|
137
137
|
background: linear-gradient(transparent, var(--vp-c-bg) 70%);
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
.aside-content {
|
|
141
|
-
|
|
141
|
+
display: flex;
|
|
142
|
+
flex-direction: column;
|
|
143
|
+
min-height: calc(100vh - (var(--vp-nav-height-desktop) + 32px));
|
|
144
|
+
padding-bottom: 32px;
|
|
142
145
|
}
|
|
143
146
|
|
|
144
147
|
.content {
|
|
@@ -149,7 +152,7 @@ const pageName = computed(() => {
|
|
|
149
152
|
|
|
150
153
|
@media (min-width: 960px) {
|
|
151
154
|
.content {
|
|
152
|
-
padding: 0 32px
|
|
155
|
+
padding: 0 32px 128px;
|
|
153
156
|
}
|
|
154
157
|
}
|
|
155
158
|
|
|
@@ -14,6 +14,8 @@ const { page, theme } = useData()
|
|
|
14
14
|
<VPDocAsideOutline v-if="page.headers.length" />
|
|
15
15
|
<slot name="aside-outline-after" />
|
|
16
16
|
|
|
17
|
+
<div class="spacer" />
|
|
18
|
+
|
|
17
19
|
<slot name="aside-ads-before" />
|
|
18
20
|
<VPDocAsideCarbonAds v-if="theme.carbonAds" />
|
|
19
21
|
<slot name="aside-ads-after" />
|
|
@@ -23,8 +25,18 @@ const { page, theme } = useData()
|
|
|
23
25
|
</template>
|
|
24
26
|
|
|
25
27
|
<style scoped>
|
|
26
|
-
.VPDocAside
|
|
27
|
-
|
|
28
|
+
.VPDocAside {
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
flex-grow: 1;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.spacer {
|
|
35
|
+
flex-grow: 1;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.VPDocAside :deep(.spacer + .VPDocAsideSponsors),
|
|
39
|
+
.VPDocAside :deep(.spacer + .VPDocAsideCarbonAds) {
|
|
28
40
|
margin-top: 24px;
|
|
29
41
|
}
|
|
30
42
|
|
|
@@ -29,50 +29,55 @@ function handleClick({ target: el }: Event) {
|
|
|
29
29
|
|
|
30
30
|
<template>
|
|
31
31
|
<div class="VPDocAsideOutline" :class="{ 'has-outline': hasOutline }" ref="container">
|
|
32
|
-
<div class="
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
<
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
32
|
+
<div class="content">
|
|
33
|
+
<div class="outline-marker" ref="marker" />
|
|
34
|
+
|
|
35
|
+
<div class="outline-title">On this page</div>
|
|
36
|
+
|
|
37
|
+
<nav aria-labelledby="doc-outline-aria-label">
|
|
38
|
+
<span class="visually-hidden" id="doc-outline-aria-label">
|
|
39
|
+
Table of Contents for current page
|
|
40
|
+
</span>
|
|
41
|
+
|
|
42
|
+
<ul class="root">
|
|
43
|
+
<li
|
|
44
|
+
v-for="{ text, link, children, hidden } in resolvedHeaders"
|
|
45
|
+
v-show="!hidden"
|
|
46
|
+
>
|
|
47
|
+
<a class="outline-link" :href="link" @click="handleClick">
|
|
48
|
+
{{ text }}
|
|
49
|
+
</a>
|
|
50
|
+
<ul v-if="children && frontmatter.outline === 'deep'">
|
|
51
|
+
<li v-for="{ text, link, hidden } in children" v-show="!hidden">
|
|
52
|
+
<a class="outline-link nested" :href="link" @click="handleClick">
|
|
53
|
+
{{ text }}
|
|
54
|
+
</a>
|
|
55
|
+
</li>
|
|
56
|
+
</ul>
|
|
57
|
+
</li>
|
|
58
|
+
</ul>
|
|
59
|
+
</nav>
|
|
60
|
+
</div>
|
|
59
61
|
</div>
|
|
60
62
|
</template>
|
|
61
63
|
|
|
62
64
|
<style scoped>
|
|
63
65
|
.VPDocAsideOutline {
|
|
64
|
-
position: relative;
|
|
65
66
|
display: none;
|
|
66
|
-
border-left: 1px solid var(--vp-c-divider-light);
|
|
67
|
-
padding-left: 16px;
|
|
68
|
-
font-size: 13px;
|
|
69
|
-
font-weight: 500;
|
|
70
67
|
}
|
|
71
68
|
|
|
72
69
|
.VPDocAsideOutline.has-outline {
|
|
73
70
|
display: block;
|
|
74
71
|
}
|
|
75
72
|
|
|
73
|
+
.content {
|
|
74
|
+
position: relative;
|
|
75
|
+
border-left: 1px solid var(--vp-c-divider-light);
|
|
76
|
+
padding-left: 16px;
|
|
77
|
+
font-size: 13px;
|
|
78
|
+
font-weight: 500;
|
|
79
|
+
}
|
|
80
|
+
|
|
76
81
|
.outline-marker {
|
|
77
82
|
position: absolute;
|
|
78
83
|
top: 32px;
|
|
@@ -7,30 +7,45 @@ export interface HeroAction {
|
|
|
7
7
|
link: string
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
export interface Image {
|
|
11
|
+
src: string
|
|
12
|
+
alt?: string
|
|
13
|
+
}
|
|
14
|
+
|
|
10
15
|
defineProps<{
|
|
11
16
|
name?: string
|
|
12
17
|
text: string
|
|
13
18
|
tagline?: string
|
|
19
|
+
image?: Image
|
|
14
20
|
actions?: HeroAction[]
|
|
15
21
|
}>()
|
|
16
22
|
</script>
|
|
17
23
|
|
|
18
24
|
<template>
|
|
19
|
-
<div class="VPHero">
|
|
25
|
+
<div class="VPHero" :class="{ 'has-image': image }">
|
|
20
26
|
<div class="container">
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
<div v-
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
<div class="main">
|
|
28
|
+
<p v-if="name" class="name"><span class="clip">{{ name }}</span></p>
|
|
29
|
+
<h1 v-if="text" class="text">{{ text }}</h1>
|
|
30
|
+
<p v-if="tagline" class="tagline">{{ tagline }}</p>
|
|
31
|
+
|
|
32
|
+
<div v-if="actions" class="actions">
|
|
33
|
+
<div v-for="action in actions" :key="action.link" class="action">
|
|
34
|
+
<VPButton
|
|
35
|
+
tag="a"
|
|
36
|
+
size="medium"
|
|
37
|
+
:theme="action.theme"
|
|
38
|
+
:text="action.text"
|
|
39
|
+
:href="action.link"
|
|
40
|
+
/>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<div v-if="image" class="image">
|
|
46
|
+
<div class="image-container">
|
|
47
|
+
<div class="image-bg" />
|
|
48
|
+
<img class="image-src" :src="image.src" :alt="image.alt">
|
|
34
49
|
</div>
|
|
35
50
|
</div>
|
|
36
51
|
</div>
|
|
@@ -50,66 +65,113 @@ defineProps<{
|
|
|
50
65
|
}
|
|
51
66
|
|
|
52
67
|
.container {
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-direction: column;
|
|
53
70
|
margin: 0 auto;
|
|
54
71
|
max-width: 960px;
|
|
55
72
|
}
|
|
56
73
|
|
|
74
|
+
@media (min-width: 960px) {
|
|
75
|
+
.container {
|
|
76
|
+
flex-direction: row;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.main {
|
|
81
|
+
position: relative;
|
|
82
|
+
z-index: 10;
|
|
83
|
+
order: 2;
|
|
84
|
+
flex-grow: 1;
|
|
85
|
+
flex-shrink: 0;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.VPHero.has-image .container {
|
|
89
|
+
text-align: center;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@media (min-width: 960px) {
|
|
93
|
+
.VPHero.has-image .container {
|
|
94
|
+
text-align: left;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@media (min-width: 960px) {
|
|
99
|
+
.main {
|
|
100
|
+
order: 1;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@media (min-width: 960px) {
|
|
105
|
+
.main {
|
|
106
|
+
width: 100%;
|
|
107
|
+
max-width: calc((100% / 3) * 2);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
57
111
|
.name,
|
|
58
112
|
.text {
|
|
59
|
-
|
|
60
|
-
|
|
113
|
+
max-width: 392px;
|
|
114
|
+
letter-spacing: -0.4px;
|
|
115
|
+
line-height: 40px;
|
|
116
|
+
font-size: 32px;
|
|
61
117
|
font-weight: 700;
|
|
62
118
|
}
|
|
63
119
|
|
|
120
|
+
.VPHero.has-image .name,
|
|
121
|
+
.VPHero.has-image .text {
|
|
122
|
+
margin: 0 auto;
|
|
123
|
+
}
|
|
124
|
+
|
|
64
125
|
.name {
|
|
65
|
-
padding-bottom: 4px;
|
|
66
126
|
color: var(--vp-home-hero-name-color);
|
|
67
127
|
}
|
|
68
128
|
|
|
69
129
|
.clip {
|
|
70
130
|
background: var(--vp-home-hero-name-background);
|
|
71
|
-
-webkit-text-fill-color: var(--vp-home-hero-name-color);
|
|
72
131
|
-webkit-background-clip: text;
|
|
132
|
+
background-clip: text;
|
|
133
|
+
-webkit-text-fill-color: var(--vp-home-hero-name-color);
|
|
73
134
|
}
|
|
74
135
|
|
|
75
136
|
@media (min-width: 640px) {
|
|
76
137
|
.name,
|
|
77
138
|
.text {
|
|
78
|
-
max-width:
|
|
139
|
+
max-width: 576px;
|
|
79
140
|
line-height: 56px;
|
|
80
141
|
font-size: 48px;
|
|
81
142
|
}
|
|
82
|
-
|
|
83
|
-
.name {
|
|
84
|
-
padding-bottom: 6px;
|
|
85
|
-
}
|
|
86
143
|
}
|
|
87
144
|
|
|
88
145
|
@media (min-width: 960px) {
|
|
89
146
|
.name,
|
|
90
147
|
.text {
|
|
91
|
-
max-width: 720px;
|
|
92
148
|
line-height: 64px;
|
|
93
149
|
font-size: 56px;
|
|
94
150
|
}
|
|
95
151
|
|
|
96
|
-
.name
|
|
97
|
-
|
|
152
|
+
.VPHero.has-image .name,
|
|
153
|
+
.VPHero.has-image .text {
|
|
154
|
+
margin: 0;
|
|
98
155
|
}
|
|
99
156
|
}
|
|
100
157
|
|
|
101
158
|
.tagline {
|
|
102
159
|
padding-top: 16px;
|
|
160
|
+
max-width: 392px;
|
|
103
161
|
line-height: 28px;
|
|
104
162
|
font-size: 18px;
|
|
105
163
|
font-weight: 500;
|
|
106
164
|
color: var(--vp-c-text-2);
|
|
107
165
|
}
|
|
108
166
|
|
|
167
|
+
.VPHero.has-image .tagline {
|
|
168
|
+
margin: 0 auto;
|
|
169
|
+
}
|
|
170
|
+
|
|
109
171
|
@media (min-width: 640px) {
|
|
110
172
|
.tagline {
|
|
111
173
|
padding-top: 24px;
|
|
112
|
-
max-width:
|
|
174
|
+
max-width: 576px;
|
|
113
175
|
line-height: 32px;
|
|
114
176
|
font-size: 20px;
|
|
115
177
|
}
|
|
@@ -118,27 +180,131 @@ defineProps<{
|
|
|
118
180
|
@media (min-width: 960px) {
|
|
119
181
|
.tagline {
|
|
120
182
|
padding-top: 24px;
|
|
121
|
-
max-width: 640px;
|
|
122
183
|
line-height: 36px;
|
|
123
184
|
font-size: 24px;
|
|
124
185
|
}
|
|
186
|
+
|
|
187
|
+
.VPHero.has-image .tagline {
|
|
188
|
+
margin: 0;
|
|
189
|
+
}
|
|
125
190
|
}
|
|
126
191
|
|
|
127
192
|
.actions {
|
|
128
193
|
display: flex;
|
|
129
194
|
flex-wrap: wrap;
|
|
130
|
-
margin: -
|
|
195
|
+
margin: -6px;
|
|
131
196
|
padding-top: 24px;
|
|
132
197
|
}
|
|
133
198
|
|
|
199
|
+
.VPHero.has-image .actions {
|
|
200
|
+
justify-content: center;
|
|
201
|
+
}
|
|
202
|
+
|
|
134
203
|
@media (min-width: 640px) {
|
|
135
204
|
.actions {
|
|
136
205
|
padding-top: 32px;
|
|
137
206
|
}
|
|
138
207
|
}
|
|
139
208
|
|
|
209
|
+
@media (min-width: 960px) {
|
|
210
|
+
.VPHero.has-image .actions {
|
|
211
|
+
justify-content: flex-start;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
140
215
|
.action {
|
|
141
216
|
flex-shrink: 0;
|
|
142
|
-
padding:
|
|
217
|
+
padding: 6px;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.image {
|
|
221
|
+
order: 1;
|
|
222
|
+
margin: -76px -24px -48px;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
@media (min-width: 640px) {
|
|
226
|
+
.image {
|
|
227
|
+
margin: -108px -24px -48px;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
@media (min-width: 960px) {
|
|
232
|
+
.image {
|
|
233
|
+
order: 2;
|
|
234
|
+
margin: 0;
|
|
235
|
+
width: calc(100% / 3);
|
|
236
|
+
min-height: 100%;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.image-container {
|
|
241
|
+
position: relative;
|
|
242
|
+
margin: 0 auto;
|
|
243
|
+
width: 320px;
|
|
244
|
+
height: 320px;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
@media (min-width: 640px) {
|
|
248
|
+
.image-container {
|
|
249
|
+
width: 392px;
|
|
250
|
+
height: 392px;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
@media (min-width: 960px) {
|
|
255
|
+
.image-container {
|
|
256
|
+
display: flex;
|
|
257
|
+
justify-content: center;
|
|
258
|
+
align-items: center;
|
|
259
|
+
width: 100%;
|
|
260
|
+
height: 100%;
|
|
261
|
+
transform: translate(-32px, -32px);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.image-bg {
|
|
266
|
+
position: absolute;
|
|
267
|
+
top: 50%;
|
|
268
|
+
left: 50%;
|
|
269
|
+
border-radius: 50%;
|
|
270
|
+
width: 192px;
|
|
271
|
+
height: 192px;
|
|
272
|
+
background-image: var(--vp-home-hero-image-background-image);
|
|
273
|
+
filter: var(--vp-home-hero-image-filter);
|
|
274
|
+
transform: translate(-50%, -50%);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
@media (min-width: 640px) {
|
|
278
|
+
.image-bg {
|
|
279
|
+
width: 256px;
|
|
280
|
+
height: 256px;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
@media (min-width: 960px) {
|
|
285
|
+
.image-bg {
|
|
286
|
+
width: 320px;
|
|
287
|
+
height: 320px;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.image-src {
|
|
292
|
+
position: absolute;
|
|
293
|
+
top: 50%;
|
|
294
|
+
left: 50%;
|
|
295
|
+
max-width: 192px;
|
|
296
|
+
transform: translate(-50%, -50%);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
@media (min-width: 640px) {
|
|
300
|
+
.image-src {
|
|
301
|
+
max-width: 256px;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
@media (min-width: 960px) {
|
|
306
|
+
.image-src {
|
|
307
|
+
max-width: 320px;
|
|
308
|
+
}
|
|
143
309
|
}
|
|
144
310
|
</style>
|
|
@@ -53,10 +53,6 @@ const { site, theme } = useData()
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
.trans {
|
|
57
|
-
padding: 2px 16px 0;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
56
|
.trans-title {
|
|
61
57
|
padding: 0 24px 0 12px;
|
|
62
58
|
line-height: 32px;
|
|
@@ -69,7 +65,7 @@ const { site, theme } = useData()
|
|
|
69
65
|
.item.social-links {
|
|
70
66
|
display: flex;
|
|
71
67
|
align-items: center;
|
|
72
|
-
padding: 0
|
|
68
|
+
padding: 0 12px;
|
|
73
69
|
}
|
|
74
70
|
|
|
75
71
|
.item.appearance {
|
package/dist/node/cli.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as c, e as createServer, g as build, s as serve } from './serve-
|
|
1
|
+
import { h as c, e as createServer, g as build, s as serve } from './serve-9c85885c.js';
|
|
2
2
|
import 'shiki';
|
|
3
3
|
import 'fs';
|
|
4
4
|
import 'path';
|
|
@@ -266,7 +266,7 @@ function isNumber (x) {
|
|
|
266
266
|
return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
|
|
267
267
|
}
|
|
268
268
|
|
|
269
|
-
var version = "1.0.0-draft.
|
|
269
|
+
var version = "1.0.0-draft.8";
|
|
270
270
|
|
|
271
271
|
const argv = minimist(process.argv.slice(2));
|
|
272
272
|
console.log(c.cyan(`vitepress v${version}`));
|
package/dist/node/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { g as build, f as createMarkdownRenderer, e as createServer, d as defineConfig, a as defineConfigWithTheme, r as resolveConfig, b as resolveSiteData, c as resolveSiteDataByRoute, s as serve } from './serve-
|
|
1
|
+
export { g as build, f as createMarkdownRenderer, e as createServer, d as defineConfig, a as defineConfigWithTheme, r as resolveConfig, b as resolveSiteData, c as resolveSiteDataByRoute, s as serve } from './serve-9c85885c.js';
|
|
2
2
|
import 'vite';
|
|
3
3
|
import 'path';
|
|
4
4
|
import 'readline';
|
|
@@ -10,11 +10,11 @@ import 'stream';
|
|
|
10
10
|
import 'util';
|
|
11
11
|
import 'buffer';
|
|
12
12
|
import 'module';
|
|
13
|
+
import 'url';
|
|
13
14
|
import 'fs';
|
|
14
15
|
import 'child_process';
|
|
15
16
|
import 'punycode';
|
|
16
17
|
import 'shiki';
|
|
17
|
-
import 'url';
|
|
18
18
|
import 'querystring';
|
|
19
19
|
import 'net';
|
|
20
20
|
import 'zlib';
|
|
@@ -9,12 +9,12 @@ import require$$0$8 from 'stream';
|
|
|
9
9
|
import require$$0$9 from 'util';
|
|
10
10
|
import require$$0$d from 'buffer';
|
|
11
11
|
import { createRequire } from 'module';
|
|
12
|
+
import { fileURLToPath, URL, pathToFileURL } from 'url';
|
|
12
13
|
import * as require$$0$6 from 'fs';
|
|
13
14
|
import require$$0__default, { readdirSync, statSync as statSync$1 } from 'fs';
|
|
14
15
|
import require$$0$c from 'child_process';
|
|
15
16
|
import require$$8 from 'punycode';
|
|
16
17
|
import { getHighlighter } from 'shiki';
|
|
17
|
-
import { fileURLToPath, URL } from 'url';
|
|
18
18
|
import * as qs from 'querystring';
|
|
19
19
|
import qs__default from 'querystring';
|
|
20
20
|
import require$$4 from 'net';
|
|
@@ -39508,7 +39508,7 @@ var ora = ora$1.exports;
|
|
|
39508
39508
|
|
|
39509
39509
|
const require = createRequire(import.meta.url);
|
|
39510
39510
|
async function renderPage(config, page, result, appChunk, cssChunk, pageToHashMap, hashMapString) {
|
|
39511
|
-
const { createApp } = await import(path$q.join(config.tempDir, `app.js`));
|
|
39511
|
+
const { createApp } = await import(pathToFileURL(path$q.join(config.tempDir, `app.js`)).toString());
|
|
39512
39512
|
const { app, router } = createApp();
|
|
39513
39513
|
const routePath = `/${page.replace(/\.md$/, "")}`;
|
|
39514
39514
|
const siteData = resolveSiteDataByRoute(config.site, routePath);
|
|
@@ -39521,12 +39521,12 @@ async function renderPage(config, page, result, appChunk, cssChunk, pageToHashMa
|
|
|
39521
39521
|
} catch (e) {
|
|
39522
39522
|
rendererPath = require.resolve("vue/server-renderer");
|
|
39523
39523
|
}
|
|
39524
|
-
const content = await import(rendererPath).then((r) => r.renderToString(app));
|
|
39524
|
+
const content = await import(pathToFileURL(rendererPath).toString()).then((r) => r.renderToString(app));
|
|
39525
39525
|
const pageName = page.replace(/\//g, "_");
|
|
39526
39526
|
const pageServerJsFileName = pageName + ".js";
|
|
39527
39527
|
const pageHash = pageToHashMap[pageName.toLowerCase()];
|
|
39528
39528
|
const pageClientJsFileName = `assets/${pageName}.${pageHash}.lean.js`;
|
|
39529
|
-
const { __pageData } = await import(path$q.join(config.tempDir, pageServerJsFileName));
|
|
39529
|
+
const { __pageData } = await import(pathToFileURL(path$q.join(config.tempDir, pageServerJsFileName)).toString());
|
|
39530
39530
|
const pageData = JSON.parse(__pageData);
|
|
39531
39531
|
let preloadLinks = config.mpa ? appChunk ? [appChunk.fileName] : [] : result && appChunk ? [
|
|
39532
39532
|
.../* @__PURE__ */ new Set([
|
package/dist/node-cjs/cli.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var serve = require('./serve-
|
|
3
|
+
var serve = require('./serve-a73b4871.cjs');
|
|
4
4
|
require('shiki');
|
|
5
5
|
require('fs');
|
|
6
6
|
require('path');
|
|
@@ -268,7 +268,7 @@ function isNumber (x) {
|
|
|
268
268
|
return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
-
var version = "1.0.0-draft.
|
|
271
|
+
var version = "1.0.0-draft.8";
|
|
272
272
|
|
|
273
273
|
const argv = minimist(process.argv.slice(2));
|
|
274
274
|
console.log(serve.c.cyan(`vitepress v${version}`));
|
package/dist/node-cjs/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var serve = require('./serve-
|
|
5
|
+
var serve = require('./serve-a73b4871.cjs');
|
|
6
6
|
require('vite');
|
|
7
7
|
require('path');
|
|
8
8
|
require('readline');
|
|
@@ -14,11 +14,11 @@ require('stream');
|
|
|
14
14
|
require('util');
|
|
15
15
|
require('buffer');
|
|
16
16
|
require('module');
|
|
17
|
+
require('url');
|
|
17
18
|
require('fs');
|
|
18
19
|
require('child_process');
|
|
19
20
|
require('punycode');
|
|
20
21
|
require('shiki');
|
|
21
|
-
require('url');
|
|
22
22
|
require('querystring');
|
|
23
23
|
require('net');
|
|
24
24
|
require('zlib');
|
|
@@ -11,11 +11,11 @@ var require$$0$7 = require('stream');
|
|
|
11
11
|
var require$$0$9 = require('util');
|
|
12
12
|
var require$$0$d = require('buffer');
|
|
13
13
|
var module$1 = require('module');
|
|
14
|
+
var url$1 = require('url');
|
|
14
15
|
var require$$0$8 = require('fs');
|
|
15
16
|
var require$$0$c = require('child_process');
|
|
16
17
|
var require$$8 = require('punycode');
|
|
17
18
|
var shiki = require('shiki');
|
|
18
|
-
var url$1 = require('url');
|
|
19
19
|
var qs = require('querystring');
|
|
20
20
|
var require$$4 = require('net');
|
|
21
21
|
var require$$7 = require('zlib');
|
|
@@ -9414,8 +9414,8 @@ function cleanRoute(siteData, route) {
|
|
|
9414
9414
|
return route.slice(baseWithoutSuffix.length);
|
|
9415
9415
|
}
|
|
9416
9416
|
|
|
9417
|
-
const require$2 = module$1.createRequire((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('serve-
|
|
9418
|
-
const PKG_ROOT = path$q.resolve(url$1.fileURLToPath((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('serve-
|
|
9417
|
+
const require$2 = module$1.createRequire((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('serve-a73b4871.cjs', document.baseURI).href)));
|
|
9418
|
+
const PKG_ROOT = path$q.resolve(url$1.fileURLToPath((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('serve-a73b4871.cjs', document.baseURI).href))), "../..");
|
|
9419
9419
|
const DIST_CLIENT_PATH = path$q.resolve(PKG_ROOT, "client");
|
|
9420
9420
|
const APP_PATH = path$q.join(DIST_CLIENT_PATH, "app");
|
|
9421
9421
|
path$q.join(DIST_CLIENT_PATH, "shared");
|
|
@@ -39546,9 +39546,9 @@ ora$1.exports.promise = (action, options) => {
|
|
|
39546
39546
|
|
|
39547
39547
|
var ora = ora$1.exports;
|
|
39548
39548
|
|
|
39549
|
-
const require$1 = module$1.createRequire((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('serve-
|
|
39549
|
+
const require$1 = module$1.createRequire((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('serve-a73b4871.cjs', document.baseURI).href)));
|
|
39550
39550
|
async function renderPage(config, page, result, appChunk, cssChunk, pageToHashMap, hashMapString) {
|
|
39551
|
-
const { createApp } = await (function (t) { return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(t)); }); })(path__default["default"].join(config.tempDir, `app.js`));
|
|
39551
|
+
const { createApp } = await (function (t) { return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(t)); }); })(url$1.pathToFileURL(path__default["default"].join(config.tempDir, `app.js`)).toString());
|
|
39552
39552
|
const { app, router } = createApp();
|
|
39553
39553
|
const routePath = `/${page.replace(/\.md$/, "")}`;
|
|
39554
39554
|
const siteData = resolveSiteDataByRoute(config.site, routePath);
|
|
@@ -39561,12 +39561,12 @@ async function renderPage(config, page, result, appChunk, cssChunk, pageToHashMa
|
|
|
39561
39561
|
} catch (e) {
|
|
39562
39562
|
rendererPath = require$1.resolve("vue/server-renderer");
|
|
39563
39563
|
}
|
|
39564
|
-
const content = await (function (t) { return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(t)); }); })(rendererPath).then((r) => r.renderToString(app));
|
|
39564
|
+
const content = await (function (t) { return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(t)); }); })(url$1.pathToFileURL(rendererPath).toString()).then((r) => r.renderToString(app));
|
|
39565
39565
|
const pageName = page.replace(/\//g, "_");
|
|
39566
39566
|
const pageServerJsFileName = pageName + ".js";
|
|
39567
39567
|
const pageHash = pageToHashMap[pageName.toLowerCase()];
|
|
39568
39568
|
const pageClientJsFileName = `assets/${pageName}.${pageHash}.lean.js`;
|
|
39569
|
-
const { __pageData } = await (function (t) { return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(t)); }); })(path__default["default"].join(config.tempDir, pageServerJsFileName));
|
|
39569
|
+
const { __pageData } = await (function (t) { return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(t)); }); })(url$1.pathToFileURL(path__default["default"].join(config.tempDir, pageServerJsFileName)).toString());
|
|
39570
39570
|
const pageData = JSON.parse(__pageData);
|
|
39571
39571
|
let preloadLinks = config.mpa ? appChunk ? [appChunk.fileName] : [] : result && appChunk ? [
|
|
39572
39572
|
.../* @__PURE__ */ new Set([
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitepress",
|
|
3
|
-
"version": "1.0.0-draft.
|
|
3
|
+
"version": "1.0.0-draft.8",
|
|
4
4
|
"description": "Vite & Vue powered static site generator",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "pnpm@7.0.1",
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"vitest": "^0.10.4"
|
|
114
114
|
},
|
|
115
115
|
"simple-git-hooks": {
|
|
116
|
-
"pre-commit": "lint-staged"
|
|
116
|
+
"pre-commit": "pnpm lint-staged"
|
|
117
117
|
},
|
|
118
118
|
"lint-staged": {
|
|
119
119
|
"*": [
|