@stacksjs/bunpress 0.2.30 → 0.2.32
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/bin/cli.js +1 -1
- package/dist/{chunk-3gfsnj29.js → chunk-ebrg03kn.js} +16 -11
- package/dist/{chunk-778jqyb6.js → chunk-f5ycxw18.js} +56 -41
- package/dist/{chunk-m7jpbnwq.js → chunk-fy78hg56.js} +1 -1
- package/dist/{chunk-m8wez6xg.js → chunk-ttas3mc2.js} +588 -233
- package/dist/{chunk-9sjj447p.js → chunk-verdt5gx.js} +1 -1
- package/dist/src/dark-mode-fallback.d.ts +39 -0
- package/dist/src/index.js +1 -1
- package/dist/templates/search.stx +4 -2
- package/package.json +1 -1
- package/dist/themes/vitepress/base.css +0 -549
- package/dist/themes/vitepress/code-group.css +0 -121
- package/dist/themes/vitepress/custom-block.css +0 -330
- package/dist/themes/vitepress/index.ts +0 -3524
- package/dist/themes/vitepress/vars.css +0 -436
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{o as $,p as I,q as f,r as h,t as x}from"./chunk-
|
|
2
|
+
import{o as $,p as I,q as f,r as h,t as x}from"./chunk-ebrg03kn.js";import"./chunk-5dtz0br7.js";import{B as _}from"./chunk-f5ycxw18.js";import"./chunk-gn1n2yxt.js";import{join as D}from"path";var E="@stacksjs/ts-cloud";async function Y(){try{return await import(E)}catch(j){throw Error(`Deploying requires @stacksjs/ts-cloud, which is an optional dependency.
|
|
3
3
|
Install it with: bun add -d @stacksjs/ts-cloud
|
|
4
4
|
Original error: ${j instanceof Error?j.message:String(j)}`)}}function W(j,A){let k=A||j?.provider;if(!k||k==="route53")return null;if(k==="porkbun"){let m=j?.apiKey||process.env.PORKBUN_API_KEY,w=j?.secretKey||process.env.PORKBUN_SECRET_KEY;if(!m||!w)throw Error("Porkbun API credentials not found. Set PORKBUN_API_KEY and PORKBUN_SECRET_KEY environment variables, or configure them in bunpress.config.ts under cloud.dnsProvider");return{provider:"porkbun",apiKey:m,secretKey:w}}if(k==="godaddy"){let m=j?.apiKey||process.env.GODADDY_API_KEY,w=j?.secretKey||process.env.GODADDY_API_SECRET,J=j?.environment||process.env.GODADDY_ENVIRONMENT;if(!m||!w)throw Error("GoDaddy API credentials not found. Set GODADDY_API_KEY and GODADDY_API_SECRET environment variables, or configure them in bunpress.config.ts under cloud.dnsProvider");return{provider:"godaddy",apiKey:m,apiSecret:w,environment:J}}throw Error(`Unknown DNS provider: ${k}. Supported: porkbun, godaddy, route53`)}async function F(j={}){let A=await _,k=A.cloud||{},m=j.verbose??A.verbose??!1;if(k.driver&&k.driver!=="aws")return I(`Unsupported cloud driver: ${k.driver}. Only 'aws' is implemented.`),!1;let w=j.region||k.region||"us-east-1",J=j.domain||k.domain,M=j.subdomain||k.subdomain,N=j.baseDomain||k.baseDomain,O=j.bucket||k.bucket,P=j.stackName||k.stackName,U=j.hostedZoneId||k.hostedZoneId,Q=j.certificateArn||k.certificateArn,V=k.cacheControl||"max-age=31536000, public",B;if(J)B=J;else if(M&&N)B=`${M}.${N}`;let K=B?.replace(/\./g,"-")||"bunpress-site",G=null;try{G=W(k.dnsProvider,j.dnsProvider)}catch(H){return I(H.message),!1}let L=G!==null;if(j.dryRun){if(f("Dry run mode - no changes will be made"),console.log(`
|
|
5
5
|
Configuration:`),console.log(` Region: ${w}`),console.log(` Site Name: ${K}`),console.log(` Bucket: ${O||"auto-generated"}`),console.log(` Domain: ${B||"not specified"}`),console.log(` Stack Name: ${P||`${K}-static-site`}`),console.log(` DNS Provider: ${G?.provider||"route53 (AWS)"}`),!L)console.log(` Hosted Zone ID: ${U||"auto-detected"}`);return console.log(` Certificate ARN: ${Q||"auto-created"}`),!0}if(!process.env.AWS_ACCESS_KEY_ID||!process.env.AWS_SECRET_ACCESS_KEY)return I("AWS credentials not found. Set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables."),!1;let z=new h("Building documentation...");try{if(!m)z.start();if(!await x({verbose:m})){if(!m)z.fail("Build failed");return!1}if(!m)z.succeed("Documentation built successfully");let C=A.outDir||"./dist",X=D(C,".bunpress");if(!m)z.text="Deploying infrastructure with CloudFormation...",z.start();else if(console.log(`
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build the `prefers-color-scheme: dark` mirror of every dark rule in a
|
|
3
|
+
* stylesheet, or an empty string when it has none.
|
|
4
|
+
*
|
|
5
|
+
* At-rules are not descended into. A dark rule already inside a media query
|
|
6
|
+
* cannot be mirrored into another one - media queries do not nest in plain CSS
|
|
7
|
+
* - and the only dark rules the themes put inside one are width-conditional
|
|
8
|
+
* component tweaks, which the mirrored palette underneath them already covers.
|
|
9
|
+
*/
|
|
10
|
+
export declare function darkModeFallbackCSS(css: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* A dark palette for readers with no JavaScript.
|
|
13
|
+
*
|
|
14
|
+
* BunPress switches theme by putting `dark` on `<html>`, which means every
|
|
15
|
+
* dark rule in every stylesheet - the palette, the syntax colours, the message
|
|
16
|
+
* previews, a site's own overrides - is gated on a class that only a script
|
|
17
|
+
* can add. With scripting off, nothing adds it: a reader whose machine asks
|
|
18
|
+
* for dark gets the light palette, and the site has no way to know. Nothing
|
|
19
|
+
* reports it either, because the CSS is valid and the HTML is valid; the
|
|
20
|
+
* document simply never acquires the class the CSS is waiting for.
|
|
21
|
+
*
|
|
22
|
+
* So the dark rules are mirrored under `prefers-color-scheme: dark`, and the
|
|
23
|
+
* mirror is generated from the rules themselves rather than written out beside
|
|
24
|
+
* them. Written out, it would be a second copy of the palette to keep in step,
|
|
25
|
+
* and the next dark rule anyone adds would be missing from it - which is the
|
|
26
|
+
* failure this file exists to fix, reintroduced one rule at a time.
|
|
27
|
+
*
|
|
28
|
+
* The mirror's selector is the handshake with `THEME_BOOTSTRAP` in `serve.ts`:
|
|
29
|
+
*
|
|
30
|
+
* html[data-theme-mode='auto']:not([data-bp-theme])
|
|
31
|
+
*
|
|
32
|
+
* `data-theme-mode` is SSR'd, and is `auto` only when the site leaves the
|
|
33
|
+
* choice to the reader - a site forcing light or dark is never second-guessed
|
|
34
|
+
* by the machine. `data-bp-theme` is set by script the moment it resolves a
|
|
35
|
+
* stored choice, which stands the mirror down before the first paint, so the
|
|
36
|
+
* class and the media query are never both in force.
|
|
37
|
+
*/
|
|
38
|
+
/** The selector the mirrored rules are keyed on. */
|
|
39
|
+
export declare const DARK_FALLBACK_SCOPE: `html[data-theme-mode='auto']:not([data-bp-theme])`;
|
package/dist/src/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{a as p,b as u,c as m,d as o,e as s,f as h,g as a,h as d,i as t,j as Lj,k as Oj,l as kj,m as Cj,n as Mj}from"../chunk-
|
|
2
|
+
import{a as p,b as u,c as m,d as o,e as s,f as h,g as a,h as d,i as t,j as Lj,k as Oj,l as kj,m as Cj,n as Mj}from"../chunk-ttas3mc2.js";import{u as S,v as V,w as W,x as X,y as Y}from"../chunk-5dtz0br7.js";import{$,A as v,B as g,C as f,H as Dj,I as Ej,J as Gj,K as Jj,L as Kj,M as Nj,N as Pj,O as Qj,P as Sj,Q as Vj,R as Wj,S as Xj,T as Yj,U as Zj,V as _j,W as $j,X as Aj,Y as Fj,Z,_,aa as Ij,z as x}from"../chunk-f5ycxw18.js";import{ha as c,ia as i,ja as l,ka as n,la as r,ma as e,na as jj,oa as qj,pa as zj,qa as Bj}from"../chunk-gn1n2yxt.js";function D(E){return E.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function N(E,K=!1){let z=E.trim();if(!z||/[\u0000-\u0020\u007f-\u009f\\]/.test(z))return null;let G=/^([a-z][a-z\d+.-]*):/i.exec(z)?.[1]?.toLowerCase();if(/^[^/]*:/.test(z)&&(!G||!["http","https",...K?[]:["mailto"]].includes(G)))return null;return z}function F(E,K={}){let z=[],G=E.replace(/[\u0000-\u0002]/g,""),Q=(j)=>j.replace(/\u0001(\d+)\u0002/g,(q,B)=>z[Number(B)]??""),J=(j)=>D(Q(j));return Bun.markdown.render(G,{text:(j)=>`\x01${z.push(j)-1}\x02`,heading:(j,q)=>`<h${q.level} id="wiki-${D(q.id??"")}">${j}</h${q.level}>`,paragraph:(j)=>`<p>${j}</p>`,blockquote:(j)=>`<blockquote>${j}</blockquote>`,strong:(j)=>`<strong>${j}</strong>`,emphasis:(j)=>`<em>${j}</em>`,strikethrough:(j)=>`<del>${j}</del>`,hr:()=>"<hr>",codespan:(j)=>`<code>${J(j)}</code>`,code:(j,q)=>{return`<pre><code${q?.language&&/^[\w+#.-]{1,30}$/.test(q.language)?` class="language-${D(q.language)}"`:""}>${J(j)}</code></pre>`},list:(j,q)=>q.ordered?`<ol start="${q.start??1}">${j}</ol>`:`<ul>${j}</ul>`,listItem:(j,q)=>`<li>${typeof q.checked==="boolean"?`<input type="checkbox" disabled${q.checked?" checked":""}>`:""}${j}</li>`,table:(j)=>`<table>${j}</table>`,thead:(j)=>`<thead>${j}</thead>`,tbody:(j)=>`<tbody>${j}</tbody>`,tr:(j)=>`<tr>${j}</tr>`,th:(j)=>`<th>${j}</th>`,td:(j)=>`<td>${j}</td>`,link:(j,q)=>{let B=N(q.href);if(!B)return j;let P=N(K.resolveLink?.(B)??B);return P?`<a href="${D(P)}" rel="nofollow noopener noreferrer">${j}</a>`:j},image:(j,q)=>{let B=N(q.src,!0);return B?`<img src="${D(B)}" alt="${J(j)}" loading="lazy">`:J(j)},html:(j)=>j},{tables:!0,strikethrough:!0,tasklists:!0,autolinks:!0,headings:{ids:!0}}).replace(/\u0001(\d+)\u0002/g,(j,q)=>D(z[Number(q)]??""))}export{Oj as wrapInLayout,Lj as stripConfiguredBasePath,Cj as startServer,n as splitLocaleFromPath,u as setLanguageAliases,Mj as serveCLI,i as resolveI18nConfig,p as resetHighlighter,Jj as reserveUniqueSlug,F as renderUntrustedMarkdown,_j as processInlineTocSyntax,d as prewarmHighlighter,m as normalizeLanguage,kj as markdownToHtml,Ej as markdownHeadingText,r as localizeUrl,qj as localeLabel,e as localeContentCandidates,l as loadI18nTranslations,o as isLanguageSupported,h as highlightCodeSync,s as highlightCode,a as getSyntaxHighlightingStyles,t as getHighlighterInstance,c as getConfiguredBasePath,f as getConfig,Kj as generateUniqueSlug,Aj as generateTocStyles,Fj as generateTocScripts,Zj as generateTocPositions,Sj as generateTocHtml,Yj as generateTocData,Gj as generateSlug,Y as generateSitemap,Wj as generateSidebarTocHtml,V as generateRssFeed,W as generateRobotsTxt,Bj as generateLocaleDetectionScript,Vj as generateInlineTocHtml,zj as generateHreflangTags,Xj as generateFloatingTocHtml,Qj as filterHeadings,Nj as extractHeadings,$j as enhanceHeadingsWithAnchors,Dj as defaultTocConfig,x as defaultConfig,Ij as decodeHtmlEntities,jj as configForLocale,g as config,Pj as buildTocHierarchy,X as buildSitemap,_ as buildSearchRuntimeConfig,$ as buildSearchIndex,S as buildRssFeed,v as applyConfigPlugins,Z as SEARCH_INDEX_PATH};
|
|
@@ -111,7 +111,9 @@
|
|
|
111
111
|
font-weight: 600;
|
|
112
112
|
color: var(--bp-c-text-3);
|
|
113
113
|
background-color: var(--bp-c-bg-soft);
|
|
114
|
-
|
|
114
|
+
/* The control edge, not the content hairline: see Colors: Borders in the
|
|
115
|
+
* theme. At the hairline's 1.29:1 the Esc button had no visible shape. */
|
|
116
|
+
border: 1px solid var(--bp-c-border);
|
|
115
117
|
border-radius: 5px;
|
|
116
118
|
cursor: pointer;
|
|
117
119
|
transition: color 0.2s, border-color 0.2s;
|
|
@@ -223,7 +225,7 @@
|
|
|
223
225
|
text-align: center;
|
|
224
226
|
color: var(--bp-c-text-2);
|
|
225
227
|
background-color: var(--bp-c-bg);
|
|
226
|
-
border: 1px solid var(--bp-c-
|
|
228
|
+
border: 1px solid var(--bp-c-border);
|
|
227
229
|
border-radius: 4px;
|
|
228
230
|
}
|
|
229
231
|
|
package/package.json
CHANGED
|
@@ -1,549 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* VitePress Theme for BunPress - Base Styles
|
|
3
|
-
* -------------------------------------------------------------------------- */
|
|
4
|
-
|
|
5
|
-
@media (prefers-reduced-motion: reduce) {
|
|
6
|
-
*,
|
|
7
|
-
::before,
|
|
8
|
-
::after {
|
|
9
|
-
animation-delay: -1ms !important;
|
|
10
|
-
animation-duration: 1ms !important;
|
|
11
|
-
animation-iteration-count: 1 !important;
|
|
12
|
-
background-attachment: initial !important;
|
|
13
|
-
scroll-behavior: auto !important;
|
|
14
|
-
transition-duration: 0s !important;
|
|
15
|
-
transition-delay: 0s !important;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
*,
|
|
20
|
-
::before,
|
|
21
|
-
::after {
|
|
22
|
-
box-sizing: border-box;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
html {
|
|
26
|
-
line-height: 1.4;
|
|
27
|
-
font-size: 16px;
|
|
28
|
-
-webkit-text-size-adjust: 100%;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
html.dark {
|
|
32
|
-
color-scheme: dark;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
body {
|
|
36
|
-
margin: 0;
|
|
37
|
-
width: 100%;
|
|
38
|
-
min-width: 320px;
|
|
39
|
-
min-height: 100vh;
|
|
40
|
-
line-height: 24px;
|
|
41
|
-
font-family: var(--vp-font-family-base);
|
|
42
|
-
font-size: 16px;
|
|
43
|
-
font-weight: 400;
|
|
44
|
-
color: var(--vp-c-text-1);
|
|
45
|
-
background-color: var(--vp-c-bg);
|
|
46
|
-
font-synthesis: style;
|
|
47
|
-
text-rendering: optimizeLegibility;
|
|
48
|
-
-webkit-font-smoothing: antialiased;
|
|
49
|
-
-moz-osx-font-smoothing: grayscale;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
main {
|
|
53
|
-
display: block;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
h1,
|
|
57
|
-
h2,
|
|
58
|
-
h3,
|
|
59
|
-
h4,
|
|
60
|
-
h5,
|
|
61
|
-
h6 {
|
|
62
|
-
margin: 0;
|
|
63
|
-
line-height: 24px;
|
|
64
|
-
font-size: 16px;
|
|
65
|
-
font-weight: 400;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
p {
|
|
69
|
-
margin: 0;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
strong,
|
|
73
|
-
b {
|
|
74
|
-
font-weight: 600;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
a,
|
|
78
|
-
area,
|
|
79
|
-
button,
|
|
80
|
-
[role='button'],
|
|
81
|
-
input,
|
|
82
|
-
label,
|
|
83
|
-
select,
|
|
84
|
-
summary,
|
|
85
|
-
textarea {
|
|
86
|
-
touch-action: manipulation;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
a {
|
|
90
|
-
color: inherit;
|
|
91
|
-
text-decoration: inherit;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
ol,
|
|
95
|
-
ul {
|
|
96
|
-
list-style: none;
|
|
97
|
-
margin: 0;
|
|
98
|
-
padding: 0;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
blockquote {
|
|
102
|
-
margin: 0;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
pre,
|
|
106
|
-
code,
|
|
107
|
-
kbd,
|
|
108
|
-
samp {
|
|
109
|
-
font-family: var(--vp-font-family-mono);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
img,
|
|
113
|
-
svg,
|
|
114
|
-
video,
|
|
115
|
-
canvas,
|
|
116
|
-
audio,
|
|
117
|
-
iframe,
|
|
118
|
-
embed,
|
|
119
|
-
object {
|
|
120
|
-
display: block;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
figure {
|
|
124
|
-
margin: 0;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
img,
|
|
128
|
-
video {
|
|
129
|
-
max-width: 100%;
|
|
130
|
-
height: auto;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
button,
|
|
134
|
-
input,
|
|
135
|
-
optgroup,
|
|
136
|
-
select,
|
|
137
|
-
textarea {
|
|
138
|
-
border: 0;
|
|
139
|
-
padding: 0;
|
|
140
|
-
line-height: inherit;
|
|
141
|
-
color: inherit;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* BPDoc Styles - Documentation Content
|
|
146
|
-
* -------------------------------------------------------------------------- */
|
|
147
|
-
|
|
148
|
-
.vp-doc h1,
|
|
149
|
-
.vp-doc h2,
|
|
150
|
-
.vp-doc h3,
|
|
151
|
-
.vp-doc h4,
|
|
152
|
-
.vp-doc h5,
|
|
153
|
-
.vp-doc h6 {
|
|
154
|
-
position: relative;
|
|
155
|
-
font-weight: 600;
|
|
156
|
-
outline: none;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
.vp-doc h1 {
|
|
160
|
-
letter-spacing: -0.02em;
|
|
161
|
-
line-height: 40px;
|
|
162
|
-
font-size: 28px;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.vp-doc h2 {
|
|
166
|
-
margin: 48px 0 16px;
|
|
167
|
-
border-top: 1px solid var(--vp-c-divider);
|
|
168
|
-
padding-top: 24px;
|
|
169
|
-
letter-spacing: -0.02em;
|
|
170
|
-
line-height: 32px;
|
|
171
|
-
font-size: 24px;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.vp-doc h3 {
|
|
175
|
-
margin: 32px 0 0;
|
|
176
|
-
letter-spacing: -0.01em;
|
|
177
|
-
line-height: 28px;
|
|
178
|
-
font-size: 20px;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
.vp-doc h4 {
|
|
182
|
-
margin: 24px 0 0;
|
|
183
|
-
letter-spacing: -0.01em;
|
|
184
|
-
line-height: 24px;
|
|
185
|
-
font-size: 18px;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.vp-doc .header-anchor {
|
|
189
|
-
position: absolute;
|
|
190
|
-
top: 0;
|
|
191
|
-
left: 0;
|
|
192
|
-
margin-left: -0.87em;
|
|
193
|
-
font-weight: 500;
|
|
194
|
-
user-select: none;
|
|
195
|
-
opacity: 0;
|
|
196
|
-
text-decoration: none;
|
|
197
|
-
transition: color 0.25s, opacity 0.25s;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
.vp-doc .header-anchor:before {
|
|
201
|
-
content: var(--vp-header-anchor-symbol);
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
.vp-doc h1:hover .header-anchor,
|
|
205
|
-
.vp-doc h1 .header-anchor:focus,
|
|
206
|
-
.vp-doc h2:hover .header-anchor,
|
|
207
|
-
.vp-doc h2 .header-anchor:focus,
|
|
208
|
-
.vp-doc h3:hover .header-anchor,
|
|
209
|
-
.vp-doc h3 .header-anchor:focus,
|
|
210
|
-
.vp-doc h4:hover .header-anchor,
|
|
211
|
-
.vp-doc h4 .header-anchor:focus,
|
|
212
|
-
.vp-doc h5:hover .header-anchor,
|
|
213
|
-
.vp-doc h5 .header-anchor:focus,
|
|
214
|
-
.vp-doc h6:hover .header-anchor,
|
|
215
|
-
.vp-doc h6 .header-anchor:focus {
|
|
216
|
-
opacity: 1;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
@media (min-width: 768px) {
|
|
220
|
-
.vp-doc h1 {
|
|
221
|
-
letter-spacing: -0.02em;
|
|
222
|
-
line-height: 40px;
|
|
223
|
-
font-size: 32px;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.vp-doc h2 .header-anchor {
|
|
228
|
-
top: 24px;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.vp-doc p,
|
|
232
|
-
.vp-doc summary {
|
|
233
|
-
margin: 16px 0;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.vp-doc p {
|
|
237
|
-
line-height: 28px;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
.vp-doc blockquote {
|
|
241
|
-
margin: 16px 0;
|
|
242
|
-
border-left: 2px solid var(--vp-c-divider);
|
|
243
|
-
padding-left: 16px;
|
|
244
|
-
transition: border-color 0.5s;
|
|
245
|
-
color: var(--vp-c-text-2);
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
.vp-doc blockquote > p {
|
|
249
|
-
margin: 0;
|
|
250
|
-
font-size: 16px;
|
|
251
|
-
transition: color 0.5s;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
.vp-doc a {
|
|
255
|
-
font-weight: 500;
|
|
256
|
-
color: var(--vp-c-brand-1);
|
|
257
|
-
text-decoration: underline;
|
|
258
|
-
text-underline-offset: 2px;
|
|
259
|
-
transition: color 0.25s, opacity 0.25s;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
.vp-doc a:hover {
|
|
263
|
-
color: var(--vp-c-brand-2);
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
.vp-doc strong {
|
|
267
|
-
font-weight: 600;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
.vp-doc ul,
|
|
271
|
-
.vp-doc ol {
|
|
272
|
-
padding-left: 1.25rem;
|
|
273
|
-
margin: 16px 0;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
.vp-doc ul {
|
|
277
|
-
list-style: disc;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
.vp-doc ol {
|
|
281
|
-
list-style: decimal;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
.vp-doc li + li {
|
|
285
|
-
margin-top: 8px;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
.vp-doc li > ol,
|
|
289
|
-
.vp-doc li > ul {
|
|
290
|
-
margin: 8px 0 0;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
.vp-doc table {
|
|
294
|
-
display: block;
|
|
295
|
-
border-collapse: collapse;
|
|
296
|
-
margin: 20px 0;
|
|
297
|
-
overflow-x: auto;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
.vp-doc tr {
|
|
301
|
-
background-color: var(--vp-c-bg);
|
|
302
|
-
border-top: 1px solid var(--vp-c-divider);
|
|
303
|
-
transition: background-color 0.5s;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
.vp-doc tr:nth-child(2n) {
|
|
307
|
-
background-color: var(--vp-c-bg-soft);
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
.vp-doc th,
|
|
311
|
-
.vp-doc td {
|
|
312
|
-
border: 1px solid var(--vp-c-divider);
|
|
313
|
-
padding: 8px 16px;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
.vp-doc th {
|
|
317
|
-
text-align: left;
|
|
318
|
-
font-size: 14px;
|
|
319
|
-
font-weight: 600;
|
|
320
|
-
color: var(--vp-c-text-2);
|
|
321
|
-
background-color: var(--vp-c-bg-soft);
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
.vp-doc td {
|
|
325
|
-
font-size: 14px;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
.vp-doc hr {
|
|
329
|
-
margin: 16px 0;
|
|
330
|
-
border: none;
|
|
331
|
-
border-top: 1px solid var(--vp-c-divider);
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
/* Inline code */
|
|
335
|
-
.vp-doc :not(pre, h1, h2, h3, h4, h5, h6) > code {
|
|
336
|
-
font-size: var(--vp-code-font-size);
|
|
337
|
-
color: var(--vp-code-color);
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
.vp-doc :not(pre) > code {
|
|
341
|
-
border-radius: 4px;
|
|
342
|
-
padding: 3px 6px;
|
|
343
|
-
background-color: var(--vp-code-bg);
|
|
344
|
-
transition: color 0.25s, background-color 0.5s;
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
.vp-doc a > code {
|
|
348
|
-
color: var(--vp-code-link-color);
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
.vp-doc a:hover > code {
|
|
352
|
-
color: var(--vp-code-link-hover-color);
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
.vp-doc h1 > code,
|
|
356
|
-
.vp-doc h2 > code,
|
|
357
|
-
.vp-doc h3 > code,
|
|
358
|
-
.vp-doc h4 > code {
|
|
359
|
-
font-size: 0.9em;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
/* Code blocks */
|
|
363
|
-
.vp-doc div[class*='language-'],
|
|
364
|
-
.vp-block {
|
|
365
|
-
position: relative;
|
|
366
|
-
margin: 16px -24px;
|
|
367
|
-
background-color: var(--vp-code-block-bg);
|
|
368
|
-
overflow-x: auto;
|
|
369
|
-
transition: background-color 0.5s;
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
@media (min-width: 640px) {
|
|
373
|
-
.vp-doc div[class*='language-'],
|
|
374
|
-
.vp-block {
|
|
375
|
-
border-radius: 8px;
|
|
376
|
-
margin: 16px 0;
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
.vp-doc [class*='language-'] pre,
|
|
381
|
-
.vp-doc [class*='language-'] code {
|
|
382
|
-
tab-size: 4;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
.vp-doc [class*='language-'] pre {
|
|
386
|
-
position: relative;
|
|
387
|
-
z-index: 1;
|
|
388
|
-
margin: 0;
|
|
389
|
-
padding: 20px 0;
|
|
390
|
-
background: transparent;
|
|
391
|
-
overflow-x: auto;
|
|
392
|
-
text-align: left;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
.vp-doc [class*='language-'] code {
|
|
396
|
-
display: block;
|
|
397
|
-
padding: 0 24px;
|
|
398
|
-
width: fit-content;
|
|
399
|
-
min-width: 100%;
|
|
400
|
-
line-height: var(--vp-code-line-height);
|
|
401
|
-
font-size: var(--vp-code-font-size);
|
|
402
|
-
color: var(--vp-code-block-color);
|
|
403
|
-
transition: color 0.5s;
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
.vp-doc [class*='language-'] code .highlighted {
|
|
407
|
-
background-color: var(--vp-code-line-highlight-color);
|
|
408
|
-
transition: background-color 0.5s;
|
|
409
|
-
margin: 0 -24px;
|
|
410
|
-
padding: 0 24px;
|
|
411
|
-
width: calc(100% + 2 * 24px);
|
|
412
|
-
display: inline-block;
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
.vp-doc [class*='language-'] code .highlighted.error {
|
|
416
|
-
background-color: var(--vp-code-line-error-color);
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
.vp-doc [class*='language-'] code .highlighted.warning {
|
|
420
|
-
background-color: var(--vp-code-line-warning-color);
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
.vp-doc [class*='language-'] code .diff {
|
|
424
|
-
transition: background-color 0.5s;
|
|
425
|
-
margin: 0 -24px;
|
|
426
|
-
padding: 0 24px;
|
|
427
|
-
width: calc(100% + 2 * 24px);
|
|
428
|
-
display: inline-block;
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
.vp-doc [class*='language-'] code .diff::before {
|
|
432
|
-
position: absolute;
|
|
433
|
-
left: 10px;
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
.vp-doc [class*='language-'] code .diff.remove {
|
|
437
|
-
background-color: var(--vp-code-line-diff-remove-color);
|
|
438
|
-
opacity: 0.7;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
.vp-doc [class*='language-'] code .diff.remove::before {
|
|
442
|
-
content: '-';
|
|
443
|
-
color: var(--vp-code-line-diff-remove-symbol-color);
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
.vp-doc [class*='language-'] code .diff.add {
|
|
447
|
-
background-color: var(--vp-code-line-diff-add-color);
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
.vp-doc [class*='language-'] code .diff.add::before {
|
|
451
|
-
content: '+';
|
|
452
|
-
color: var(--vp-code-line-diff-add-symbol-color);
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
/* Line numbers */
|
|
456
|
-
.vp-doc div[class*='language-'].line-numbers-mode {
|
|
457
|
-
padding-left: 32px;
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
.vp-doc .line-numbers-wrapper {
|
|
461
|
-
position: absolute;
|
|
462
|
-
top: 0;
|
|
463
|
-
bottom: 0;
|
|
464
|
-
left: 0;
|
|
465
|
-
z-index: 3;
|
|
466
|
-
border-right: 1px solid var(--vp-code-block-divider-color);
|
|
467
|
-
padding-top: 20px;
|
|
468
|
-
width: 32px;
|
|
469
|
-
text-align: center;
|
|
470
|
-
font-family: var(--vp-font-family-mono);
|
|
471
|
-
line-height: var(--vp-code-line-height);
|
|
472
|
-
font-size: var(--vp-code-font-size);
|
|
473
|
-
color: var(--vp-code-line-number-color);
|
|
474
|
-
transition: border-color 0.5s, color 0.5s;
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
/* Copy button */
|
|
478
|
-
.vp-doc [class*='language-'] > button.copy {
|
|
479
|
-
direction: ltr;
|
|
480
|
-
position: absolute;
|
|
481
|
-
top: 12px;
|
|
482
|
-
right: 12px;
|
|
483
|
-
z-index: 3;
|
|
484
|
-
border: 1px solid var(--vp-code-copy-code-border-color);
|
|
485
|
-
border-radius: 4px;
|
|
486
|
-
width: 40px;
|
|
487
|
-
height: 40px;
|
|
488
|
-
background-color: var(--vp-code-copy-code-bg);
|
|
489
|
-
opacity: 0;
|
|
490
|
-
cursor: pointer;
|
|
491
|
-
background-image: var(--vp-icon-copy);
|
|
492
|
-
background-position: 50%;
|
|
493
|
-
background-size: 20px;
|
|
494
|
-
background-repeat: no-repeat;
|
|
495
|
-
transition: border-color 0.25s, background-color 0.25s, opacity 0.25s;
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
.vp-doc [class*='language-']:hover > button.copy,
|
|
499
|
-
.vp-doc [class*='language-'] > button.copy:focus {
|
|
500
|
-
opacity: 1;
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
.vp-doc [class*='language-'] > button.copy:hover,
|
|
504
|
-
.vp-doc [class*='language-'] > button.copy.copied {
|
|
505
|
-
border-color: var(--vp-code-copy-code-hover-border-color);
|
|
506
|
-
background-color: var(--vp-code-copy-code-hover-bg);
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
/* Language label */
|
|
510
|
-
.vp-doc [class*='language-'] > span.lang {
|
|
511
|
-
position: absolute;
|
|
512
|
-
top: 2px;
|
|
513
|
-
right: 8px;
|
|
514
|
-
z-index: 2;
|
|
515
|
-
font-size: 12px;
|
|
516
|
-
font-weight: 500;
|
|
517
|
-
user-select: none;
|
|
518
|
-
color: var(--vp-code-lang-color);
|
|
519
|
-
transition: color 0.4s, opacity 0.4s;
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
.vp-doc [class*='language-']:hover > button.copy + span.lang,
|
|
523
|
-
.vp-doc [class*='language-'] > button.copy:focus + span.lang {
|
|
524
|
-
opacity: 0;
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
/* External links */
|
|
528
|
-
:is(.vp-external-link-icon, .vp-doc a[href*='://'], .vp-doc a[target='_blank']):not(:is(.no-icon, svg a, :has(img, svg)))::after {
|
|
529
|
-
display: inline-block;
|
|
530
|
-
margin-top: -1px;
|
|
531
|
-
margin-left: 4px;
|
|
532
|
-
width: 11px;
|
|
533
|
-
height: 11px;
|
|
534
|
-
background: currentColor;
|
|
535
|
-
color: var(--vp-c-text-3);
|
|
536
|
-
flex-shrink: 0;
|
|
537
|
-
--icon: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' %3E%3Cpath d='M0 0h24v24H0V0z' fill='none' /%3E%3Cpath d='M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5H9z' /%3E%3C/svg%3E");
|
|
538
|
-
-webkit-mask-image: var(--icon);
|
|
539
|
-
mask-image: var(--icon);
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
.vp-external-link-icon::after {
|
|
543
|
-
content: '';
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
.external-link-icon-enabled :is(.vp-doc a[href*='://'], .vp-doc a[target='_blank']):not(:is(.no-icon, svg a, :has(img, svg)))::after {
|
|
547
|
-
content: '';
|
|
548
|
-
color: currentColor;
|
|
549
|
-
}
|