@stacksjs/bunpress 0.2.0 → 0.2.2
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/bin/commands/doctor.d.ts +1 -0
- package/dist/bin/commands/seo.d.ts +19 -0
- package/dist/{chunk-2ns9va8d.js → chunk-2vne40yj.js} +1291 -419
- package/dist/{chunk-n0ebp7d8.js → chunk-3f29kjd8.js} +1 -1
- package/dist/{chunk-av14gbps.js → chunk-5cxb3t2e.js} +1 -1
- package/dist/chunk-8b52ry67.js +393 -0
- package/dist/{chunk-avg4ftb9.js → chunk-he00q0q4.js} +323 -7
- package/dist/chunk-m6pshd6t.js +2 -0
- package/dist/{chunk-fyb5bzsp.js → chunk-mbcjfn27.js} +1 -1
- package/dist/{chunk-trhgd2dy.js → chunk-pbdzef6w.js} +1 -1
- package/dist/src/highlighter.d.ts +1 -0
- package/dist/src/index.js +1 -1
- package/dist/src/markdown-fences.d.ts +37 -0
- package/dist/src/toc.d.ts +14 -0
- package/dist/src/types.d.ts +44 -1
- package/dist/templates/hero.stx +22 -0
- package/dist/templates/navbar.stx +2 -0
- package/dist/themes/vitepress/index.ts +515 -10
- package/package.json +1 -1
- package/dist/chunk-w615shtf.js +0 -2
- package/dist/chunk-x5m3c6jd.js +0 -469
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
`).map((X)=>`<span class="line">${
|
|
4
|
-
`);try{let J
|
|
5
|
-
`);return(await Promise.all(
|
|
6
|
-
`)}catch(
|
|
7
|
-
`).map((q)=>`<span class="line">${
|
|
8
|
-
`)}}function
|
|
2
|
+
import{$ as CQ,B as FQ,D as H,G as qJ,H as PQ,I as HQ,J as yJ,K as SJ,M as yQ,N as SQ,O as kQ,Q as xQ,Z as WJ,_ as vQ}from"./chunk-he00q0q4.js";import{aa as l,ba as PJ,ca as HJ,da as wQ,ea as IQ,fa as DQ,ga as TQ,ha as LJ,ia as AQ,ja as LQ}from"./chunk-3f29kjd8.js";var{Glob:OQ,YAML:BQ}=globalThis.Bun;import{stat as EQ}from"fs/promises";import{join as zJ}from"path";import s from"process";var{Glob:nQ}=globalThis.Bun;import{join as uJ,resolve as tQ}from"path";import eQ from"process";var e=new Map;function JZ(J,Z,Q){let Y=Z.split("."),$=J;for(let X=0;X<Y.length-1;X++){let q=Y[X];if(typeof $[q]!=="object"||$[q]===null)$[q]={};$=$[q]}$[Y[Y.length-1]]=Q}async function gJ(J,Z){let Q=Z?tQ(eQ.cwd(),Z):uJ(J,".data");if(e.has(Q))return e.get(Q);let Y={};try{let $=new nQ("**/*.json");for await(let X of $.scan({cwd:Q,absolute:!1}))try{let q=await Bun.file(uJ(Q,X)).text(),W=X.replace(/\.json$/,"").replace(/[/\\]/g,".");JZ(Y,W,JSON.parse(q))}catch{}}catch{}return e.set(Q,Y),Y}function hJ(){e.clear()}import{createHighlighter as QZ,highlight as ZZ,listLanguages as $Z}from"ts-syntax-highlighter";var d=null;function H0(){d=null}async function dJ(){if(d)return d;return d=await QZ({theme:"github-light",cache:!0}),d}var NJ=null;function mJ(){if(NJ)return NJ;let J=new Map;try{for(let Z of $Z()){J.set(Z.id.toLowerCase(),Z.id);for(let Q of Z.aliases??[])J.set(Q.toLowerCase(),Z.id)}}catch{}return NJ=J,J}var JJ={};function cJ(J){JJ={};for(let[Z,Q]of Object.entries(J??{}))JJ[Z.toLowerCase().trim()]=Q.toLowerCase().trim()}function lJ(J){let Z=J.toLowerCase().trim(),Q=JJ[Z]??Z;return mJ().get(Q)??Q}function sJ(J){let Z=J.toLowerCase().trim();return mJ().has(JJ[Z]??Z)}function QJ(J){return J.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function YZ(J,Z){let Q=/<span[^>]*class="token[^"]*"[^>]*>([^<]*)<\/span>/g,Y=[],$;while(($=Q.exec(Z))!==null){let W=$[1].replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/�*39;/g,"'");if(W)Y.push({text:W,span:$[0]})}if(Y.length===0)return Z;let X="",q=0;for(let W=0;W<Y.length;W++){let{text:K,span:_}=Y[W],z=J.indexOf(K,q);if(z===-1){X+=_;continue}if(z>q){let V=J.substring(q,z);if(/^\s+$/.test(V))X+=V}X+=_,q=z+K.length}return X}async function ZJ(J,Z,Q="github-light"){let Y=lJ(Z);if(!sJ(Y))return J.split(`
|
|
3
|
+
`).map((X)=>`<span class="line">${QJ(X)}</span>`).join(`
|
|
4
|
+
`);try{let $=J.split(`
|
|
5
|
+
`);return(await Promise.all($.map(async(q)=>{if(!q.trim())return`<span class="line">${q}</span>`;let K=(await ZZ(q,Y,{theme:Q})).html;if(K=K.replace(/<div[^>]*class="syntax-wrapper"[^>]*>/g,""),K=K.replace(/<\/div>\s*$/g,""),K=K.replace(/<pre[^>]*>/g,""),K=K.replace(/<\/pre>/g,""),K=K.replace(/<code[^>]*>/g,""),K=K.replace(/<\/code>/g,""),K=YZ(q,K.trim()),!K.startsWith('<span class="line">'))K=`<span class="line">${K}</span>`;return K}))).join(`
|
|
6
|
+
`)}catch($){return console.warn(`Failed to highlight code for language "${Z}":`,$),J.split(`
|
|
7
|
+
`).map((q)=>`<span class="line">${QJ(q)}</span>`).join(`
|
|
8
|
+
`)}}function y0(J,Z){let Q=lJ(Z);if(!sJ(Q))return QJ(J);return QJ(J)}function rJ(){return`
|
|
9
9
|
/* Basic syntax highlighting styles for ts-syntax-highlighter */
|
|
10
10
|
/* The actual theme colors are injected by ts-syntax-highlighter */
|
|
11
11
|
|
|
@@ -42,15 +42,75 @@ pre code {
|
|
|
42
42
|
|
|
43
43
|
/* Dark theme support. Gated on html.dark so an explicit light choice (or a
|
|
44
44
|
* site with darkMode: 'light') is never overridden by the OS preference. */
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
45
|
+
html.dark pre:not([data-lang]):not([class*='language-']) {
|
|
46
|
+
background: #0d1117;
|
|
47
|
+
color: #e6edf3;
|
|
48
|
+
}
|
|
50
49
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
.token:not([style*="color"]) {
|
|
51
|
+
color: inherit;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* Dark-mode token colours.
|
|
55
|
+
* -------------------------------------------------------------------------
|
|
56
|
+
* The highlighter resolves one theme at build time and writes the result as
|
|
57
|
+
* an INLINE style on every token. That theme is a light one, so in dark mode
|
|
58
|
+
* every code block was rendering light-theme colours on a dark ground:
|
|
59
|
+
* string literals at #0a3069 (navy) on a near-black panel is about 1.4:1,
|
|
60
|
+
* which is unreadable, and the default token colour #24292f is worse.
|
|
61
|
+
*
|
|
62
|
+
* Inline styles cannot be beaten by specificity, so this sheet corrects them
|
|
63
|
+
* with !important. Tokens carry TextMate scope names as classes
|
|
64
|
+
* (\`token string-quoted-double-rust\`, \`token keyword-control-ts\`), and the
|
|
65
|
+
* language suffix varies per grammar, so the scopes are matched by substring
|
|
66
|
+
* rather than enumerated. Palette is GitHub Dark, which is designed for this
|
|
67
|
+
* ground and clears WCAG AA on all of it.
|
|
68
|
+
*
|
|
69
|
+
* Rules run general to specific: a scope like \`support-function-builtin\`
|
|
70
|
+
* matches more than one selector, and the later, more specific one wins.
|
|
71
|
+
* The default rule below deliberately stays at one class + one type so every
|
|
72
|
+
* scope rule under it (which adds an attribute selector) outranks it. */
|
|
73
|
+
html.dark .token {
|
|
74
|
+
color: #e6edf3 !important;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
html.dark .token[class*='variable'] {
|
|
78
|
+
color: #ffa657 !important;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
html.dark .token[class*='entity-name-type'],
|
|
82
|
+
html.dark .token[class*='support-type'],
|
|
83
|
+
html.dark .token[class*='support-class'] {
|
|
84
|
+
color: #7ee787 !important;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
html.dark .token[class*='entity-name-function'],
|
|
88
|
+
html.dark .token[class*='support-function'],
|
|
89
|
+
html.dark .token[class*='entity-name-tag'] {
|
|
90
|
+
color: #d2a8ff !important;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
html.dark .token[class*='constant'],
|
|
94
|
+
html.dark .token[class*='entity-other-attribute'] {
|
|
95
|
+
color: #79c0ff !important;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
html.dark .token[class*='keyword'],
|
|
99
|
+
html.dark .token[class*='storage'] {
|
|
100
|
+
color: #ff7b72 !important;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
html.dark .token[class*='string'],
|
|
104
|
+
html.dark .token[class*='markup-inserted'] {
|
|
105
|
+
color: #a5d6ff !important;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
html.dark .token[class*='comment'] {
|
|
109
|
+
color: #8b949e !important;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
html.dark .token[class*='invalid'] {
|
|
113
|
+
color: #ffa198 !important;
|
|
54
114
|
}
|
|
55
115
|
|
|
56
116
|
/* Line highlighting
|
|
@@ -132,8 +192,8 @@ pre code {
|
|
|
132
192
|
color: #9ca3af;
|
|
133
193
|
}
|
|
134
194
|
}
|
|
135
|
-
`}async function
|
|
136
|
-
`)){if(!W.trim())continue;if(/^\d{4}-\d{2}-\d{2}T/.test(W)){q=W.trim();continue}if(q&&!X.has(W))X.set(W,q)}return
|
|
195
|
+
`}async function S0(){await dJ()}async function k0(){return dJ()}import{stat as XZ}from"fs/promises";import{relative as iJ,resolve as c}from"path";import qZ from"process";var m=new Map;async function WZ(J){let Z=c(J);if(m.has(Z))return m.get(Z);try{let Q=Bun.spawn(["git","log","--pretty=format:%cI","--name-only","--relative","--no-merges","--","."],{cwd:Z,stdout:"pipe",stderr:"ignore"}),[Y,$]=await Promise.all([Q.exited,new Response(Q.stdout).text()]);if(Y!==0)return m.set(Z,null),null;let X=new Map,q="";for(let W of $.split(`
|
|
196
|
+
`)){if(!W.trim())continue;if(/^\d{4}-\d{2}-\d{2}T/.test(W)){q=W.trim();continue}if(q&&!X.has(W))X.set(W,q)}return m.set(Z,X),X}catch{return m.set(Z,null),null}}async function oJ(J,Z){let Q=await WZ(J);if(Q){let Y=iJ(c(J),c(Z)).replace(/\\/g,"/"),$=Q.get(Y);if($)return $}try{return(await XZ(Z)).mtime.toISOString()}catch{return null}}function aJ(J,Z,Q){let Y=iJ(c(qZ.cwd(),Z),c(Q)).replace(/\\/g,"/");return J.includes(":path")?J.replace(":path",Y):`${J.replace(/\/$/,"")}/${Y}`}function nJ(J,Z,Q){let Y=new Date(J);if(Number.isNaN(Y.getTime()))return"";try{return new Intl.DateTimeFormat(Z,Q??{dateStyle:"medium"}).format(Y)}catch{return Y.toISOString().slice(0,10)}}import{join as RJ}from"path";var $J=new Map,tJ="\x00BPCODE",eJ="\x00";async function zZ(J,Z){let Q=RJ(J,Z);if($J.has(Q))return $J.get(Q);let Y=[RJ(J,`${Z}.stx`),RJ(J,Z,"index.stx")],$=null;for(let X of Y){let q=Bun.file(X);if(await q.exists()){$=await q.text();break}}return $J.set(Q,$),$}function JQ(){$J.clear()}function KZ(J,Z){try{let Q=Object.keys(Z),Y=Q.map(($)=>Z[$]);return Function(...Q,`"use strict"; return (${J});`)(...Y)}catch{return}}function VZ(J,Z){let Q={};if(!J)return Q;let Y=/([:@]?[\w-]+)(?:=(?:"([^"]*)"|'([^']*)'|\{([^}]*)\}))?/g,$;while($=Y.exec(J)){let X=$[1];if(!X)continue;let q=X.startsWith(":"),W=X.replace(/^[:@]/,""),K=$[2],_=$[3],z=$[4],V=K??_??z;if(V===void 0)Q[W]=!0;else if(q||z!==void 0)Q[W]=KZ(V,Z);else Q[W]=V}return Q}async function MJ(J,Z,Q,Y=0){if(Y>10||!J.includes("<"))return J;let $=[],X=J.replace(/```[\s\S]*?```/g,(V)=>{return $.push(V),`${tJ}${$.length-1}${eJ}`}).replace(/`[^`\n]*`/g,(V)=>{return $.push(V),`${tJ}${$.length-1}${eJ}`}),q=/<([A-Z][A-Za-z0-9]*)((?:\s[^>]*?)?)(\/?)>/g,W="",K=0,_=!1,z;while(z=q.exec(X)){let V=z[0],G=z[1],N=z[2],B=z[3],j=await zZ(Z,G);if(j==null)continue;_=!0,W+=X.slice(K,z.index);let O="",U=z.index+V.length;if(!B){let M=new RegExp(`</${G}>`,"g");M.lastIndex=U;let F=M.exec(X);if(F)O=X.slice(U,F.index).trim(),U=F.index+F[0].length}let E=VZ(N.trim(),Q),w;try{let{renderString:M}=await import("@stacksjs/stx/render");w=await M(j,{...Q,...E,slot:O},{injectCSS:!1,templateOnly:!0})}catch(M){let F=M instanceof Error?M.message:String(M);throw Error(`Failed to render BunPress component ${G}: ${F}`,{cause:M})}W+=w,K=U,q.lastIndex=U}if(W+=X.slice(K),W=W.replace(/\u0000BPCODE(\d+)\u0000/g,(V,G)=>$[Number(G)]??""),_)return MJ(W,Z,Q,Y+1);return W}import{join as $Q}from"path";var _Z=$Q(import.meta.dir,"templates"),YJ=new Map;async function GZ(J){if(YJ.has(J))return YJ.get(J);let Z=$Q(_Z,`${J}.stx`),Q=Bun.file(Z);if(!await Q.exists())throw Error(`Template not found: ${J}`);let Y=await Q.text();return YJ.set(J,Y),Y}async function T(J,Z){let Q=await GZ(J);return jZ(Q,Z)}function YQ(){YJ.clear()}function jZ(J,Z){return J.replace(/\{!!\s*([\w.]+)\s*!!\}|\{\{\s*([\w.]+)\s*\}\}/g,(Q,Y,$)=>{if(Y!==void 0)return ZQ(QQ(Z,Y));return UZ(ZQ(QQ(Z,$)))})}function QQ(J,Z){return Z.split(".").reduce((Q,Y)=>{if(Q==null||typeof Q!=="object")return;return Q[Y]},J)}function ZQ(J){if(J==null)return"";return String(J)}function UZ(J){return J.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}var XQ=`/**
|
|
137
197
|
* VitePress Theme for BunPress - Layout & Chrome
|
|
138
198
|
* -------------------------------------------------------------------------- */
|
|
139
199
|
|
|
@@ -254,27 +314,51 @@ pre code {
|
|
|
254
314
|
transition: transform 0.25s;
|
|
255
315
|
}
|
|
256
316
|
|
|
257
|
-
.BPNavBarMenu-group:hover > .BPNavBarMenu-group-button .chevron
|
|
317
|
+
.BPNavBarMenu-group:hover > .BPNavBarMenu-group-button .chevron,
|
|
318
|
+
.BPNavBarMenu-group:focus-within > .BPNavBarMenu-group-button .chevron,
|
|
319
|
+
.BPNavBarMenu-group.is-open > .BPNavBarMenu-group-button .chevron {
|
|
258
320
|
transform: rotate(180deg);
|
|
259
321
|
}
|
|
260
322
|
|
|
323
|
+
/* The button sits at the top of the bar and the panel hangs below it. The
|
|
324
|
+
* gap between them used to be margin, so the pointer left the group on the
|
|
325
|
+
* way down and the panel closed underneath it. It is padding on the panel
|
|
326
|
+
* now: the same visual offset, but the space belongs to the hover target. */
|
|
261
327
|
.BPNavBarMenu-group-items {
|
|
262
|
-
display: none;
|
|
263
328
|
position: absolute;
|
|
264
329
|
right: 0;
|
|
265
330
|
top: 100%;
|
|
266
|
-
|
|
267
|
-
padding: 8px 0;
|
|
331
|
+
padding-top: 8px;
|
|
268
332
|
min-width: 192px;
|
|
333
|
+
z-index: 30;
|
|
334
|
+
opacity: 0;
|
|
335
|
+
visibility: hidden;
|
|
336
|
+
transform: translateY(-4px);
|
|
337
|
+
transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.BPNavBarMenu-group:hover > .BPNavBarMenu-group-items,
|
|
341
|
+
.BPNavBarMenu-group:focus-within > .BPNavBarMenu-group-items,
|
|
342
|
+
.BPNavBarMenu-group.is-open > .BPNavBarMenu-group-items {
|
|
343
|
+
opacity: 1;
|
|
344
|
+
visibility: visible;
|
|
345
|
+
transform: translateY(0);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
/* The surface itself, so the 8px hover bridge above stays transparent. */
|
|
349
|
+
.BPNavBarMenu-group-items::before {
|
|
350
|
+
content: "";
|
|
351
|
+
position: absolute;
|
|
352
|
+
inset: 8px 0 0;
|
|
269
353
|
background: var(--bp-c-bg);
|
|
270
354
|
border: 1px solid var(--bp-c-divider);
|
|
271
|
-
border-radius:
|
|
355
|
+
border-radius: 12px;
|
|
272
356
|
box-shadow: var(--bp-shadow-3, 0 12px 32px rgba(0, 0, 0, 0.1));
|
|
273
|
-
z-index:
|
|
357
|
+
z-index: -1;
|
|
274
358
|
}
|
|
275
359
|
|
|
276
|
-
.BPNavBarMenu-group
|
|
277
|
-
|
|
360
|
+
.BPNavBarMenu-group-items > * {
|
|
361
|
+
position: relative;
|
|
278
362
|
}
|
|
279
363
|
|
|
280
364
|
.BPNavBarMenu-group-items a {
|
|
@@ -286,11 +370,325 @@ pre code {
|
|
|
286
370
|
transition: color 0.25s, background-color 0.25s;
|
|
287
371
|
}
|
|
288
372
|
|
|
289
|
-
.BPNavBarMenu-group-items
|
|
373
|
+
.BPNavBarMenu-group-items:not(.BPMega) {
|
|
374
|
+
padding-bottom: 8px;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.BPNavBarMenu-group-items:not(.BPMega) a:first-of-type {
|
|
378
|
+
margin-top: 8px;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.BPNavBarMenu-group-items a:hover,
|
|
382
|
+
.BPNavBarMenu-group-items a.is-active {
|
|
383
|
+
color: var(--bp-c-brand-1);
|
|
384
|
+
background-color: var(--bp-c-bg-soft);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Mega menu \u2014 a nav item whose children carry descriptions or nest into
|
|
389
|
+
* groups. Anchored to the bar rather than to the button, so a wide panel
|
|
390
|
+
* stays inside the viewport no matter which item opened it.
|
|
391
|
+
* -------------------------------------------------------------------------- */
|
|
392
|
+
|
|
393
|
+
/* A mega panel is anchored to the bar, not to the button that opens it: a
|
|
394
|
+
* 900px panel centred on a nav item near the right edge would hang off the
|
|
395
|
+
* viewport. Going position:static hands the absolute positioning up to .BPNav.
|
|
396
|
+
* Stretching the group to full bar height also keeps the pointer inside the
|
|
397
|
+
* hover target on its way down to the panel. */
|
|
398
|
+
.BPNavBarMenu-group.is-mega {
|
|
399
|
+
position: static;
|
|
400
|
+
align-self: stretch;
|
|
401
|
+
display: flex;
|
|
402
|
+
align-items: center;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
.BPMega {
|
|
406
|
+
--bp-mega-columns: 3;
|
|
407
|
+
right: auto;
|
|
408
|
+
left: 50%;
|
|
409
|
+
width: max-content;
|
|
410
|
+
max-width: min(920px, calc(100vw - 32px));
|
|
411
|
+
transform: translate(-50%, -4px);
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
.BPNavBarMenu-group:hover > .BPMega,
|
|
415
|
+
.BPNavBarMenu-group:focus-within > .BPMega,
|
|
416
|
+
.BPNavBarMenu-group.is-open > .BPMega {
|
|
417
|
+
transform: translate(-50%, 0);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.BPMega-columns {
|
|
421
|
+
display: grid;
|
|
422
|
+
grid-template-columns: repeat(var(--bp-mega-columns), minmax(200px, 1fr));
|
|
423
|
+
gap: 4px 8px;
|
|
424
|
+
padding: 16px;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
.BPMega-group-title {
|
|
428
|
+
margin: 4px 0 8px;
|
|
429
|
+
padding: 0 10px;
|
|
430
|
+
font-size: 11px;
|
|
431
|
+
font-weight: 600;
|
|
432
|
+
letter-spacing: 0.06em;
|
|
433
|
+
text-transform: uppercase;
|
|
434
|
+
color: var(--bp-c-text-3, var(--bp-c-text-2));
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
.BPNavBarMenu .BPMega-item {
|
|
438
|
+
display: flex;
|
|
439
|
+
gap: 10px;
|
|
440
|
+
align-items: flex-start;
|
|
441
|
+
padding: 8px 10px;
|
|
442
|
+
border-radius: 8px;
|
|
443
|
+
font-size: 13px;
|
|
444
|
+
font-weight: 500;
|
|
445
|
+
color: var(--bp-c-text-1);
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
.BPNavBarMenu .BPMega-item:hover,
|
|
449
|
+
.BPNavBarMenu .BPMega-item.is-active {
|
|
450
|
+
background-color: var(--bp-c-bg-soft);
|
|
451
|
+
color: var(--bp-c-text-1);
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
.BPMega-item-icon {
|
|
455
|
+
display: flex;
|
|
456
|
+
align-items: center;
|
|
457
|
+
justify-content: center;
|
|
458
|
+
flex-shrink: 0;
|
|
459
|
+
width: 26px;
|
|
460
|
+
height: 26px;
|
|
461
|
+
margin-top: 1px;
|
|
462
|
+
border-radius: 7px;
|
|
463
|
+
background: var(--bp-c-bg-soft);
|
|
464
|
+
color: var(--bp-c-brand-1);
|
|
465
|
+
font-size: 13px;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.BPMega-item:hover .BPMega-item-icon {
|
|
469
|
+
background: var(--bp-c-brand-soft, var(--bp-c-bg-alt));
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.BPMega-item-icon svg {
|
|
473
|
+
width: 15px;
|
|
474
|
+
height: 15px;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
.BPMega-item-body {
|
|
478
|
+
display: flex;
|
|
479
|
+
flex-direction: column;
|
|
480
|
+
gap: 2px;
|
|
481
|
+
min-width: 0;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
.BPMega-item-title {
|
|
485
|
+
font-weight: 600;
|
|
486
|
+
line-height: 1.4;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
.BPMega-item:hover .BPMega-item-title,
|
|
490
|
+
.BPMega-item.is-active .BPMega-item-title {
|
|
290
491
|
color: var(--bp-c-brand-1);
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
.BPMega-item-desc {
|
|
495
|
+
font-size: 12px;
|
|
496
|
+
font-weight: 400;
|
|
497
|
+
line-height: 1.5;
|
|
498
|
+
color: var(--bp-c-text-2);
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
.BPMega-footer {
|
|
502
|
+
display: flex;
|
|
503
|
+
align-items: center;
|
|
504
|
+
gap: 8px;
|
|
505
|
+
padding: 12px 26px;
|
|
506
|
+
border-top: 1px solid var(--bp-c-divider);
|
|
507
|
+
background: var(--bp-c-bg-soft);
|
|
508
|
+
border-radius: 0 0 12px 12px;
|
|
509
|
+
font-size: 12px;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
.BPMega-footer-note {
|
|
513
|
+
color: var(--bp-c-text-2);
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
.BPNavBarMenu .BPMega-footer-link {
|
|
517
|
+
padding: 0;
|
|
518
|
+
font-size: 12px;
|
|
519
|
+
font-weight: 600;
|
|
520
|
+
color: var(--bp-c-brand-1);
|
|
521
|
+
background: none;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
.BPNavBarMenu .BPMega-footer-link:hover {
|
|
525
|
+
background: none;
|
|
526
|
+
text-decoration: underline;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
@media (max-width: 1100px) {
|
|
530
|
+
.BPMega-columns {
|
|
531
|
+
grid-template-columns: repeat(min(var(--bp-mega-columns), 2), minmax(190px, 1fr));
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
@media (prefers-reduced-motion: reduce) {
|
|
536
|
+
.BPNavBarMenu-group-items,
|
|
537
|
+
.BPMega,
|
|
538
|
+
.BPNavBarMenu-group-button .chevron {
|
|
539
|
+
transition: none;
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
/**
|
|
544
|
+
* Stacked nav for narrow viewports. The bar hides its links below 960px, and
|
|
545
|
+
* the home and page layouts have no sidebar hamburger to fall back on.
|
|
546
|
+
* -------------------------------------------------------------------------- */
|
|
547
|
+
|
|
548
|
+
.BPNavToggle {
|
|
549
|
+
display: none;
|
|
550
|
+
align-items: center;
|
|
551
|
+
justify-content: center;
|
|
552
|
+
width: 36px;
|
|
553
|
+
height: 36px;
|
|
554
|
+
border: none;
|
|
555
|
+
border-radius: 8px;
|
|
556
|
+
background: transparent;
|
|
557
|
+
color: var(--bp-c-text-2);
|
|
558
|
+
cursor: pointer;
|
|
559
|
+
transition: color 0.25s, background-color 0.25s;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
.BPNavToggle:hover {
|
|
563
|
+
color: var(--bp-c-text-1);
|
|
291
564
|
background-color: var(--bp-c-bg-soft);
|
|
292
565
|
}
|
|
293
566
|
|
|
567
|
+
.BPNavToggle svg {
|
|
568
|
+
width: 20px;
|
|
569
|
+
height: 20px;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
.BPNavToggle .BPNavToggle-close,
|
|
573
|
+
.BPNavToggle[aria-expanded="true"] .BPNavToggle-open {
|
|
574
|
+
display: none;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
.BPNavToggle[aria-expanded="true"] .BPNavToggle-close {
|
|
578
|
+
display: block;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
.BPNavScreen {
|
|
582
|
+
display: none;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
.BPNavScreen-nav {
|
|
586
|
+
padding: 8px 16px 24px;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
.BPNavScreen-section {
|
|
590
|
+
border-bottom: 1px solid var(--bp-c-divider);
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
.BPNavScreen-section:last-child {
|
|
594
|
+
border-bottom: none;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
.BPNavScreen-summary {
|
|
598
|
+
display: flex;
|
|
599
|
+
align-items: center;
|
|
600
|
+
justify-content: space-between;
|
|
601
|
+
padding: 12px 4px;
|
|
602
|
+
font-size: 15px;
|
|
603
|
+
font-weight: 600;
|
|
604
|
+
color: var(--bp-c-text-1);
|
|
605
|
+
cursor: pointer;
|
|
606
|
+
list-style: none;
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
.BPNavScreen-summary::-webkit-details-marker {
|
|
610
|
+
display: none;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
.BPNavScreen-summary .chevron {
|
|
614
|
+
width: 14px;
|
|
615
|
+
height: 14px;
|
|
616
|
+
color: var(--bp-c-text-3, var(--bp-c-text-2));
|
|
617
|
+
transition: transform 0.2s ease;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
.BPNavScreen-section[open] > .BPNavScreen-summary .chevron {
|
|
621
|
+
transform: rotate(180deg);
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
.BPNavScreen-items {
|
|
625
|
+
padding: 0 0 12px 4px;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
.BPNavScreen-subtitle {
|
|
629
|
+
margin: 12px 0 4px;
|
|
630
|
+
font-size: 11px;
|
|
631
|
+
font-weight: 600;
|
|
632
|
+
letter-spacing: 0.06em;
|
|
633
|
+
text-transform: uppercase;
|
|
634
|
+
color: var(--bp-c-text-3, var(--bp-c-text-2));
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
.BPNavScreen-link {
|
|
638
|
+
display: block;
|
|
639
|
+
padding: 8px 0;
|
|
640
|
+
font-size: 14px;
|
|
641
|
+
font-weight: 500;
|
|
642
|
+
color: var(--bp-c-text-2);
|
|
643
|
+
text-decoration: none;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
.BPNavScreen-section > .BPNavScreen-link {
|
|
647
|
+
padding: 12px 4px;
|
|
648
|
+
font-size: 15px;
|
|
649
|
+
font-weight: 600;
|
|
650
|
+
color: var(--bp-c-text-1);
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
.BPNavScreen-link:hover,
|
|
654
|
+
.BPNavScreen-link.is-active {
|
|
655
|
+
color: var(--bp-c-brand-1);
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
@media (max-width: 959px) {
|
|
659
|
+
.BPNavToggle {
|
|
660
|
+
display: inline-flex;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
/* Absolute, not fixed. .BPNav sets a backdrop-filter, which makes it the
|
|
664
|
+
* containing block for fixed-position descendants, so a fixed panel
|
|
665
|
+
* measured its top/bottom against the 64px bar and collapsed to nothing.
|
|
666
|
+
* Anchoring to the bar's own bottom edge is what was meant anyway. */
|
|
667
|
+
.BPNavScreen {
|
|
668
|
+
display: block;
|
|
669
|
+
position: absolute;
|
|
670
|
+
top: 100%;
|
|
671
|
+
left: 0;
|
|
672
|
+
right: 0;
|
|
673
|
+
max-height: calc(100dvh - var(--bp-nav-height, 64px));
|
|
674
|
+
overflow-y: auto;
|
|
675
|
+
overscroll-behavior: contain;
|
|
676
|
+
background: var(--bp-c-bg);
|
|
677
|
+
border-bottom: 1px solid var(--bp-c-divider);
|
|
678
|
+
box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
|
|
679
|
+
z-index: 40;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
.BPNavScreen[hidden] {
|
|
683
|
+
display: none;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
html.bp-nav-screen-open,
|
|
687
|
+
html.bp-nav-screen-open body {
|
|
688
|
+
overflow: hidden;
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
|
|
294
692
|
/* Search trigger. A button that looks like a field: the real input lives in
|
|
295
693
|
* the search dialog it opens. */
|
|
296
694
|
.BPNavBarSearch {
|
|
@@ -474,15 +872,136 @@ pre code {
|
|
|
474
872
|
}
|
|
475
873
|
}
|
|
476
874
|
|
|
477
|
-
@media (max-width: 419px) {
|
|
478
|
-
.BPNavBarTitle {
|
|
479
|
-
font-size: 15px;
|
|
480
|
-
}
|
|
875
|
+
@media (max-width: 419px) {
|
|
876
|
+
.BPNavBarTitle {
|
|
877
|
+
font-size: 15px;
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
/**
|
|
882
|
+
* Hero (home layout) \u2014 used by hero.stx + serve.ts generateHero
|
|
883
|
+
* -------------------------------------------------------------------------- */
|
|
884
|
+
|
|
885
|
+
.BPHero-announcement {
|
|
886
|
+
display: inline-flex;
|
|
887
|
+
align-items: center;
|
|
888
|
+
gap: 8px;
|
|
889
|
+
margin: 0 0 20px;
|
|
890
|
+
padding: 5px 14px 5px 6px;
|
|
891
|
+
border: 1px solid var(--bp-c-divider);
|
|
892
|
+
border-radius: 999px;
|
|
893
|
+
background: var(--bp-c-bg-soft);
|
|
894
|
+
font-size: 13px;
|
|
895
|
+
color: var(--bp-c-text-2);
|
|
896
|
+
text-decoration: none;
|
|
897
|
+
transition: border-color 0.25s, color 0.25s;
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
.BPHero-announcement:hover {
|
|
901
|
+
border-color: var(--bp-c-brand-1);
|
|
902
|
+
color: var(--bp-c-text-1);
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
.BPHero-announcement-tag {
|
|
906
|
+
padding: 2px 8px;
|
|
907
|
+
border-radius: 999px;
|
|
908
|
+
background: var(--bp-c-brand-soft, var(--bp-c-bg-alt));
|
|
909
|
+
color: var(--bp-c-brand-1);
|
|
910
|
+
font-size: 12px;
|
|
911
|
+
font-weight: 600;
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
.BPHero-announcement-arrow {
|
|
915
|
+
width: 13px;
|
|
916
|
+
height: 13px;
|
|
917
|
+
transition: transform 0.25s;
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
.BPHero-announcement:hover .BPHero-announcement-arrow {
|
|
921
|
+
transform: translateX(2px);
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
/**
|
|
925
|
+
* Hero code panel \u2014 the visual for a tool people evaluate by reading code.
|
|
926
|
+
* -------------------------------------------------------------------------- */
|
|
927
|
+
|
|
928
|
+
.BPHeroCode {
|
|
929
|
+
width: 100%;
|
|
930
|
+
min-width: 0;
|
|
931
|
+
border: 1px solid var(--bp-c-divider);
|
|
932
|
+
border-radius: 12px;
|
|
933
|
+
background: var(--bp-code-block-bg, var(--bp-c-bg-alt));
|
|
934
|
+
overflow: hidden;
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
.BPHeroCode-head {
|
|
938
|
+
display: flex;
|
|
939
|
+
align-items: center;
|
|
940
|
+
gap: 4px;
|
|
941
|
+
min-height: 38px;
|
|
942
|
+
padding: 0 12px;
|
|
943
|
+
border-bottom: 1px solid var(--bp-c-divider);
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
.BPHeroCode-head:empty {
|
|
947
|
+
display: none;
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
.BPHeroCode-file {
|
|
951
|
+
font-family: var(--bp-font-family-mono, ui-monospace, monospace);
|
|
952
|
+
font-size: 12px;
|
|
953
|
+
color: var(--bp-c-text-3, var(--bp-c-text-2));
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
.BPHeroCode-tabs {
|
|
957
|
+
display: flex;
|
|
958
|
+
gap: 2px;
|
|
959
|
+
overflow-x: auto;
|
|
481
960
|
}
|
|
482
961
|
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
962
|
+
.BPHeroCode-tab {
|
|
963
|
+
padding: 8px 12px;
|
|
964
|
+
border: none;
|
|
965
|
+
border-bottom: 2px solid transparent;
|
|
966
|
+
background: none;
|
|
967
|
+
font-family: var(--bp-font-family-mono, ui-monospace, monospace);
|
|
968
|
+
font-size: 12px;
|
|
969
|
+
color: var(--bp-c-text-2);
|
|
970
|
+
white-space: nowrap;
|
|
971
|
+
cursor: pointer;
|
|
972
|
+
transition: color 0.25s, border-color 0.25s;
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
.BPHeroCode-tab:hover {
|
|
976
|
+
color: var(--bp-c-text-1);
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
.BPHeroCode-tab.is-active {
|
|
980
|
+
color: var(--bp-c-text-1);
|
|
981
|
+
border-bottom-color: var(--bp-c-brand-1);
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
.BPHeroCode-body pre {
|
|
985
|
+
margin: 0;
|
|
986
|
+
padding: 18px 20px;
|
|
987
|
+
overflow-x: auto;
|
|
988
|
+
background: transparent;
|
|
989
|
+
font-size: 13px;
|
|
990
|
+
line-height: 1.7;
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
/* The head already names the sample, and the fence language is often a
|
|
994
|
+
* stand-in for a grammar the highlighter does not ship. Printing it in the
|
|
995
|
+
* corner of the panel labels the code as the wrong language. */
|
|
996
|
+
.BPHeroCode pre[data-lang]::before {
|
|
997
|
+
content: none;
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
.BPHeroCode-body code {
|
|
1001
|
+
background: none;
|
|
1002
|
+
padding: 0;
|
|
1003
|
+
font-size: inherit;
|
|
1004
|
+
}
|
|
486
1005
|
|
|
487
1006
|
.BPHero-name {
|
|
488
1007
|
font-size: clamp(18px, 4vw, 24px);
|
|
@@ -601,7 +1120,9 @@ pre code {
|
|
|
601
1120
|
}
|
|
602
1121
|
|
|
603
1122
|
.BPFeature {
|
|
604
|
-
display:
|
|
1123
|
+
display: flex;
|
|
1124
|
+
flex-direction: column;
|
|
1125
|
+
align-items: flex-start;
|
|
605
1126
|
padding: 26px;
|
|
606
1127
|
background-color: var(--bp-c-bg-soft, var(--bp-c-bg-alt));
|
|
607
1128
|
border: 1px solid var(--bp-c-divider);
|
|
@@ -611,11 +1132,55 @@ pre code {
|
|
|
611
1132
|
color: inherit;
|
|
612
1133
|
}
|
|
613
1134
|
|
|
1135
|
+
/* A cell can claim extra columns, turning the equal grid into a bento. Only
|
|
1136
|
+
* from 640px up, where there is more than one column to claim. */
|
|
1137
|
+
@media (min-width: 640px) {
|
|
1138
|
+
.BPFeature {
|
|
1139
|
+
grid-column: span min(var(--bp-feature-span, 1), 2);
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
@media (min-width: 960px) {
|
|
1144
|
+
.BPFeature {
|
|
1145
|
+
grid-column: span var(--bp-feature-span, 1);
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
|
|
614
1149
|
.BPFeature:hover {
|
|
615
1150
|
border-color: var(--bp-c-brand-1);
|
|
616
1151
|
box-shadow: 0 2px 12px rgba(86, 114, 205, 0.08);
|
|
617
1152
|
}
|
|
618
1153
|
|
|
1154
|
+
/* The affordance that says a card navigates. Pushed to the bottom so it lines
|
|
1155
|
+
* up across a row of cards with different amounts of body copy. */
|
|
1156
|
+
.BPFeature-link {
|
|
1157
|
+
display: inline-flex;
|
|
1158
|
+
align-items: center;
|
|
1159
|
+
gap: 5px;
|
|
1160
|
+
margin-top: auto;
|
|
1161
|
+
padding-top: 14px;
|
|
1162
|
+
font-size: 13px;
|
|
1163
|
+
font-weight: 600;
|
|
1164
|
+
color: var(--bp-c-brand-1);
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
.BPFeature-link svg {
|
|
1168
|
+
width: 13px;
|
|
1169
|
+
height: 13px;
|
|
1170
|
+
transition: transform 0.25s;
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
.BPFeature.is-linked:hover .BPFeature-link svg {
|
|
1174
|
+
transform: translateX(3px);
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1178
|
+
.BPFeature-link svg,
|
|
1179
|
+
.BPHero-announcement-arrow {
|
|
1180
|
+
transition: none;
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
|
|
619
1184
|
.BPFeature-icon {
|
|
620
1185
|
width: 40px;
|
|
621
1186
|
height: 40px;
|
|
@@ -924,7 +1489,7 @@ pre code {
|
|
|
924
1489
|
padding: 20px 16px 56px;
|
|
925
1490
|
}
|
|
926
1491
|
}
|
|
927
|
-
`;function
|
|
1492
|
+
`;function FJ(){return`
|
|
928
1493
|
/* VitePress Theme for BunPress */
|
|
929
1494
|
${`/**
|
|
930
1495
|
* VitePress Theme for BunPress
|
|
@@ -2612,52 +3177,390 @@ ${`/**
|
|
|
2612
3177
|
transition: color 0.25s;
|
|
2613
3178
|
}
|
|
2614
3179
|
|
|
2615
|
-
.BPNavBarMenu-group-button:hover {
|
|
2616
|
-
color: var(--bp-c-brand-1);
|
|
3180
|
+
.BPNavBarMenu-group-button:hover {
|
|
3181
|
+
color: var(--bp-c-brand-1);
|
|
3182
|
+
}
|
|
3183
|
+
|
|
3184
|
+
.BPNavBarMenu-group-button .chevron {
|
|
3185
|
+
width: 12px;
|
|
3186
|
+
height: 12px;
|
|
3187
|
+
flex-shrink: 0;
|
|
3188
|
+
transition: transform 0.25s;
|
|
3189
|
+
}
|
|
3190
|
+
|
|
3191
|
+
.BPNavBarMenu-group:hover > .BPNavBarMenu-group-button .chevron,
|
|
3192
|
+
.BPNavBarMenu-group:focus-within > .BPNavBarMenu-group-button .chevron,
|
|
3193
|
+
.BPNavBarMenu-group.is-open > .BPNavBarMenu-group-button .chevron {
|
|
3194
|
+
transform: rotate(180deg);
|
|
3195
|
+
}
|
|
3196
|
+
|
|
3197
|
+
/* The button sits at the top of the bar and the panel hangs below it. The
|
|
3198
|
+
* gap between them used to be margin, so the pointer left the group on the
|
|
3199
|
+
* way down and the panel closed underneath it. It is padding on the panel
|
|
3200
|
+
* now: the same visual offset, but the space belongs to the hover target. */
|
|
3201
|
+
.BPNavBarMenu-group-items {
|
|
3202
|
+
position: absolute;
|
|
3203
|
+
right: 0;
|
|
3204
|
+
top: 100%;
|
|
3205
|
+
padding-top: 8px;
|
|
3206
|
+
min-width: 192px;
|
|
3207
|
+
z-index: 30;
|
|
3208
|
+
opacity: 0;
|
|
3209
|
+
visibility: hidden;
|
|
3210
|
+
transform: translateY(-4px);
|
|
3211
|
+
transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
|
|
3212
|
+
}
|
|
3213
|
+
|
|
3214
|
+
.BPNavBarMenu-group:hover > .BPNavBarMenu-group-items,
|
|
3215
|
+
.BPNavBarMenu-group:focus-within > .BPNavBarMenu-group-items,
|
|
3216
|
+
.BPNavBarMenu-group.is-open > .BPNavBarMenu-group-items {
|
|
3217
|
+
opacity: 1;
|
|
3218
|
+
visibility: visible;
|
|
3219
|
+
transform: translateY(0);
|
|
3220
|
+
}
|
|
3221
|
+
|
|
3222
|
+
/* The surface itself, so the 8px hover bridge above stays transparent. */
|
|
3223
|
+
.BPNavBarMenu-group-items::before {
|
|
3224
|
+
content: "";
|
|
3225
|
+
position: absolute;
|
|
3226
|
+
inset: 8px 0 0;
|
|
3227
|
+
background: var(--bp-c-bg);
|
|
3228
|
+
border: 1px solid var(--bp-c-divider);
|
|
3229
|
+
border-radius: 12px;
|
|
3230
|
+
box-shadow: var(--bp-shadow-3, 0 12px 32px rgba(0, 0, 0, 0.1));
|
|
3231
|
+
z-index: -1;
|
|
3232
|
+
}
|
|
3233
|
+
|
|
3234
|
+
.BPNavBarMenu-group-items > * {
|
|
3235
|
+
position: relative;
|
|
3236
|
+
}
|
|
3237
|
+
|
|
3238
|
+
.BPNavBarMenu-group-items a {
|
|
3239
|
+
display: block;
|
|
3240
|
+
padding: 6px 16px;
|
|
3241
|
+
font-size: 13px;
|
|
3242
|
+
color: var(--bp-c-text-1);
|
|
3243
|
+
text-decoration: none;
|
|
3244
|
+
transition: color 0.25s, background-color 0.25s;
|
|
3245
|
+
}
|
|
3246
|
+
|
|
3247
|
+
.BPNavBarMenu-group-items:not(.BPMega) {
|
|
3248
|
+
padding-bottom: 8px;
|
|
3249
|
+
}
|
|
3250
|
+
|
|
3251
|
+
.BPNavBarMenu-group-items:not(.BPMega) a:first-of-type {
|
|
3252
|
+
margin-top: 8px;
|
|
3253
|
+
}
|
|
3254
|
+
|
|
3255
|
+
.BPNavBarMenu-group-items a:hover,
|
|
3256
|
+
.BPNavBarMenu-group-items a.is-active {
|
|
3257
|
+
color: var(--bp-c-brand-1);
|
|
3258
|
+
background-color: var(--bp-c-bg-soft);
|
|
3259
|
+
}
|
|
3260
|
+
|
|
3261
|
+
/**
|
|
3262
|
+
* Mega menu \u2014 a nav item whose children carry descriptions or nest into
|
|
3263
|
+
* groups. Anchored to the bar rather than to the button, so a wide panel
|
|
3264
|
+
* stays inside the viewport no matter which item opened it.
|
|
3265
|
+
* -------------------------------------------------------------------------- */
|
|
3266
|
+
|
|
3267
|
+
/* A mega panel is anchored to the bar, not to the button that opens it: a
|
|
3268
|
+
* 900px panel centred on a nav item near the right edge would hang off the
|
|
3269
|
+
* viewport. Going position:static hands the absolute positioning up to .BPNav.
|
|
3270
|
+
* Stretching the group to full bar height also keeps the pointer inside the
|
|
3271
|
+
* hover target on its way down to the panel. */
|
|
3272
|
+
.BPNavBarMenu-group.is-mega {
|
|
3273
|
+
position: static;
|
|
3274
|
+
align-self: stretch;
|
|
3275
|
+
display: flex;
|
|
3276
|
+
align-items: center;
|
|
3277
|
+
}
|
|
3278
|
+
|
|
3279
|
+
.BPMega {
|
|
3280
|
+
--bp-mega-columns: 3;
|
|
3281
|
+
right: auto;
|
|
3282
|
+
left: 50%;
|
|
3283
|
+
width: max-content;
|
|
3284
|
+
max-width: min(920px, calc(100vw - 32px));
|
|
3285
|
+
transform: translate(-50%, -4px);
|
|
3286
|
+
}
|
|
3287
|
+
|
|
3288
|
+
.BPNavBarMenu-group:hover > .BPMega,
|
|
3289
|
+
.BPNavBarMenu-group:focus-within > .BPMega,
|
|
3290
|
+
.BPNavBarMenu-group.is-open > .BPMega {
|
|
3291
|
+
transform: translate(-50%, 0);
|
|
3292
|
+
}
|
|
3293
|
+
|
|
3294
|
+
.BPMega-columns {
|
|
3295
|
+
display: grid;
|
|
3296
|
+
grid-template-columns: repeat(var(--bp-mega-columns), minmax(200px, 1fr));
|
|
3297
|
+
gap: 4px 8px;
|
|
3298
|
+
padding: 16px;
|
|
3299
|
+
}
|
|
3300
|
+
|
|
3301
|
+
.BPMega-group-title {
|
|
3302
|
+
margin: 4px 0 8px;
|
|
3303
|
+
padding: 0 10px;
|
|
3304
|
+
font-size: 11px;
|
|
3305
|
+
font-weight: 600;
|
|
3306
|
+
letter-spacing: 0.06em;
|
|
3307
|
+
text-transform: uppercase;
|
|
3308
|
+
color: var(--bp-c-text-3, var(--bp-c-text-2));
|
|
3309
|
+
}
|
|
3310
|
+
|
|
3311
|
+
.BPNavBarMenu .BPMega-item {
|
|
3312
|
+
display: flex;
|
|
3313
|
+
gap: 10px;
|
|
3314
|
+
align-items: flex-start;
|
|
3315
|
+
padding: 8px 10px;
|
|
3316
|
+
border-radius: 8px;
|
|
3317
|
+
font-size: 13px;
|
|
3318
|
+
font-weight: 500;
|
|
3319
|
+
color: var(--bp-c-text-1);
|
|
3320
|
+
}
|
|
3321
|
+
|
|
3322
|
+
.BPNavBarMenu .BPMega-item:hover,
|
|
3323
|
+
.BPNavBarMenu .BPMega-item.is-active {
|
|
3324
|
+
background-color: var(--bp-c-bg-soft);
|
|
3325
|
+
color: var(--bp-c-text-1);
|
|
3326
|
+
}
|
|
3327
|
+
|
|
3328
|
+
.BPMega-item-icon {
|
|
3329
|
+
display: flex;
|
|
3330
|
+
align-items: center;
|
|
3331
|
+
justify-content: center;
|
|
3332
|
+
flex-shrink: 0;
|
|
3333
|
+
width: 26px;
|
|
3334
|
+
height: 26px;
|
|
3335
|
+
margin-top: 1px;
|
|
3336
|
+
border-radius: 7px;
|
|
3337
|
+
background: var(--bp-c-bg-soft);
|
|
3338
|
+
color: var(--bp-c-brand-1);
|
|
3339
|
+
font-size: 13px;
|
|
3340
|
+
}
|
|
3341
|
+
|
|
3342
|
+
.BPMega-item:hover .BPMega-item-icon {
|
|
3343
|
+
background: var(--bp-c-brand-soft, var(--bp-c-bg-alt));
|
|
3344
|
+
}
|
|
3345
|
+
|
|
3346
|
+
.BPMega-item-icon svg {
|
|
3347
|
+
width: 15px;
|
|
3348
|
+
height: 15px;
|
|
3349
|
+
}
|
|
3350
|
+
|
|
3351
|
+
.BPMega-item-body {
|
|
3352
|
+
display: flex;
|
|
3353
|
+
flex-direction: column;
|
|
3354
|
+
gap: 2px;
|
|
3355
|
+
min-width: 0;
|
|
3356
|
+
}
|
|
3357
|
+
|
|
3358
|
+
.BPMega-item-title {
|
|
3359
|
+
font-weight: 600;
|
|
3360
|
+
line-height: 1.4;
|
|
3361
|
+
}
|
|
3362
|
+
|
|
3363
|
+
.BPMega-item:hover .BPMega-item-title,
|
|
3364
|
+
.BPMega-item.is-active .BPMega-item-title {
|
|
3365
|
+
color: var(--bp-c-brand-1);
|
|
3366
|
+
}
|
|
3367
|
+
|
|
3368
|
+
.BPMega-item-desc {
|
|
3369
|
+
font-size: 12px;
|
|
3370
|
+
font-weight: 400;
|
|
3371
|
+
line-height: 1.5;
|
|
3372
|
+
color: var(--bp-c-text-2);
|
|
3373
|
+
}
|
|
3374
|
+
|
|
3375
|
+
.BPMega-footer {
|
|
3376
|
+
display: flex;
|
|
3377
|
+
align-items: center;
|
|
3378
|
+
gap: 8px;
|
|
3379
|
+
padding: 12px 26px;
|
|
3380
|
+
border-top: 1px solid var(--bp-c-divider);
|
|
3381
|
+
background: var(--bp-c-bg-soft);
|
|
3382
|
+
border-radius: 0 0 12px 12px;
|
|
3383
|
+
font-size: 12px;
|
|
3384
|
+
}
|
|
3385
|
+
|
|
3386
|
+
.BPMega-footer-note {
|
|
3387
|
+
color: var(--bp-c-text-2);
|
|
3388
|
+
}
|
|
3389
|
+
|
|
3390
|
+
.BPNavBarMenu .BPMega-footer-link {
|
|
3391
|
+
padding: 0;
|
|
3392
|
+
font-size: 12px;
|
|
3393
|
+
font-weight: 600;
|
|
3394
|
+
color: var(--bp-c-brand-1);
|
|
3395
|
+
background: none;
|
|
3396
|
+
}
|
|
3397
|
+
|
|
3398
|
+
.BPNavBarMenu .BPMega-footer-link:hover {
|
|
3399
|
+
background: none;
|
|
3400
|
+
text-decoration: underline;
|
|
3401
|
+
}
|
|
3402
|
+
|
|
3403
|
+
@media (max-width: 1100px) {
|
|
3404
|
+
.BPMega-columns {
|
|
3405
|
+
grid-template-columns: repeat(min(var(--bp-mega-columns), 2), minmax(190px, 1fr));
|
|
3406
|
+
}
|
|
3407
|
+
}
|
|
3408
|
+
|
|
3409
|
+
@media (prefers-reduced-motion: reduce) {
|
|
3410
|
+
.BPNavBarMenu-group-items,
|
|
3411
|
+
.BPMega,
|
|
3412
|
+
.BPNavBarMenu-group-button .chevron {
|
|
3413
|
+
transition: none;
|
|
3414
|
+
}
|
|
3415
|
+
}
|
|
3416
|
+
|
|
3417
|
+
/**
|
|
3418
|
+
* Stacked nav for narrow viewports. The bar hides its links below 960px, and
|
|
3419
|
+
* the home and page layouts have no sidebar hamburger to fall back on.
|
|
3420
|
+
* -------------------------------------------------------------------------- */
|
|
3421
|
+
|
|
3422
|
+
.BPNavToggle {
|
|
3423
|
+
display: none;
|
|
3424
|
+
align-items: center;
|
|
3425
|
+
justify-content: center;
|
|
3426
|
+
width: 36px;
|
|
3427
|
+
height: 36px;
|
|
3428
|
+
border: none;
|
|
3429
|
+
border-radius: 8px;
|
|
3430
|
+
background: transparent;
|
|
3431
|
+
color: var(--bp-c-text-2);
|
|
3432
|
+
cursor: pointer;
|
|
3433
|
+
transition: color 0.25s, background-color 0.25s;
|
|
3434
|
+
}
|
|
3435
|
+
|
|
3436
|
+
.BPNavToggle:hover {
|
|
3437
|
+
color: var(--bp-c-text-1);
|
|
3438
|
+
background-color: var(--bp-c-bg-soft);
|
|
3439
|
+
}
|
|
3440
|
+
|
|
3441
|
+
.BPNavToggle svg {
|
|
3442
|
+
width: 20px;
|
|
3443
|
+
height: 20px;
|
|
3444
|
+
}
|
|
3445
|
+
|
|
3446
|
+
.BPNavToggle .BPNavToggle-close,
|
|
3447
|
+
.BPNavToggle[aria-expanded="true"] .BPNavToggle-open {
|
|
3448
|
+
display: none;
|
|
3449
|
+
}
|
|
3450
|
+
|
|
3451
|
+
.BPNavToggle[aria-expanded="true"] .BPNavToggle-close {
|
|
3452
|
+
display: block;
|
|
3453
|
+
}
|
|
3454
|
+
|
|
3455
|
+
.BPNavScreen {
|
|
3456
|
+
display: none;
|
|
3457
|
+
}
|
|
3458
|
+
|
|
3459
|
+
.BPNavScreen-nav {
|
|
3460
|
+
padding: 8px 16px 24px;
|
|
3461
|
+
}
|
|
3462
|
+
|
|
3463
|
+
.BPNavScreen-section {
|
|
3464
|
+
border-bottom: 1px solid var(--bp-c-divider);
|
|
3465
|
+
}
|
|
3466
|
+
|
|
3467
|
+
.BPNavScreen-section:last-child {
|
|
3468
|
+
border-bottom: none;
|
|
3469
|
+
}
|
|
3470
|
+
|
|
3471
|
+
.BPNavScreen-summary {
|
|
3472
|
+
display: flex;
|
|
3473
|
+
align-items: center;
|
|
3474
|
+
justify-content: space-between;
|
|
3475
|
+
padding: 12px 4px;
|
|
3476
|
+
font-size: 15px;
|
|
3477
|
+
font-weight: 600;
|
|
3478
|
+
color: var(--bp-c-text-1);
|
|
3479
|
+
cursor: pointer;
|
|
3480
|
+
list-style: none;
|
|
3481
|
+
}
|
|
3482
|
+
|
|
3483
|
+
.BPNavScreen-summary::-webkit-details-marker {
|
|
3484
|
+
display: none;
|
|
2617
3485
|
}
|
|
2618
3486
|
|
|
2619
|
-
.
|
|
2620
|
-
width:
|
|
2621
|
-
height:
|
|
2622
|
-
|
|
2623
|
-
transition: transform 0.
|
|
3487
|
+
.BPNavScreen-summary .chevron {
|
|
3488
|
+
width: 14px;
|
|
3489
|
+
height: 14px;
|
|
3490
|
+
color: var(--bp-c-text-3, var(--bp-c-text-2));
|
|
3491
|
+
transition: transform 0.2s ease;
|
|
2624
3492
|
}
|
|
2625
3493
|
|
|
2626
|
-
.
|
|
3494
|
+
.BPNavScreen-section[open] > .BPNavScreen-summary .chevron {
|
|
2627
3495
|
transform: rotate(180deg);
|
|
2628
3496
|
}
|
|
2629
3497
|
|
|
2630
|
-
.
|
|
2631
|
-
|
|
2632
|
-
position: absolute;
|
|
2633
|
-
right: 0;
|
|
2634
|
-
top: 100%;
|
|
2635
|
-
margin-top: 8px;
|
|
2636
|
-
padding: 8px 0;
|
|
2637
|
-
min-width: 192px;
|
|
2638
|
-
background: var(--bp-c-bg);
|
|
2639
|
-
border: 1px solid var(--bp-c-divider);
|
|
2640
|
-
border-radius: 8px;
|
|
2641
|
-
box-shadow: var(--bp-shadow-3, 0 12px 32px rgba(0, 0, 0, 0.1));
|
|
2642
|
-
z-index: 10;
|
|
3498
|
+
.BPNavScreen-items {
|
|
3499
|
+
padding: 0 0 12px 4px;
|
|
2643
3500
|
}
|
|
2644
3501
|
|
|
2645
|
-
.
|
|
2646
|
-
|
|
3502
|
+
.BPNavScreen-subtitle {
|
|
3503
|
+
margin: 12px 0 4px;
|
|
3504
|
+
font-size: 11px;
|
|
3505
|
+
font-weight: 600;
|
|
3506
|
+
letter-spacing: 0.06em;
|
|
3507
|
+
text-transform: uppercase;
|
|
3508
|
+
color: var(--bp-c-text-3, var(--bp-c-text-2));
|
|
2647
3509
|
}
|
|
2648
3510
|
|
|
2649
|
-
.
|
|
3511
|
+
.BPNavScreen-link {
|
|
2650
3512
|
display: block;
|
|
2651
|
-
padding:
|
|
2652
|
-
font-size:
|
|
2653
|
-
|
|
3513
|
+
padding: 8px 0;
|
|
3514
|
+
font-size: 14px;
|
|
3515
|
+
font-weight: 500;
|
|
3516
|
+
color: var(--bp-c-text-2);
|
|
2654
3517
|
text-decoration: none;
|
|
2655
|
-
transition: color 0.25s, background-color 0.25s;
|
|
2656
3518
|
}
|
|
2657
3519
|
|
|
2658
|
-
.
|
|
3520
|
+
.BPNavScreen-section > .BPNavScreen-link {
|
|
3521
|
+
padding: 12px 4px;
|
|
3522
|
+
font-size: 15px;
|
|
3523
|
+
font-weight: 600;
|
|
3524
|
+
color: var(--bp-c-text-1);
|
|
3525
|
+
}
|
|
3526
|
+
|
|
3527
|
+
.BPNavScreen-link:hover,
|
|
3528
|
+
.BPNavScreen-link.is-active {
|
|
2659
3529
|
color: var(--bp-c-brand-1);
|
|
2660
|
-
|
|
3530
|
+
}
|
|
3531
|
+
|
|
3532
|
+
@media (max-width: 959px) {
|
|
3533
|
+
.BPNavToggle {
|
|
3534
|
+
display: inline-flex;
|
|
3535
|
+
}
|
|
3536
|
+
|
|
3537
|
+
/* Absolute, not fixed. .BPNav sets a backdrop-filter, which makes it the
|
|
3538
|
+
* containing block for fixed-position descendants, so a fixed panel
|
|
3539
|
+
* measured its top/bottom against the 64px bar and collapsed to nothing.
|
|
3540
|
+
* Anchoring to the bar's own bottom edge is what was meant anyway. */
|
|
3541
|
+
.BPNavScreen {
|
|
3542
|
+
display: block;
|
|
3543
|
+
position: absolute;
|
|
3544
|
+
top: 100%;
|
|
3545
|
+
left: 0;
|
|
3546
|
+
right: 0;
|
|
3547
|
+
max-height: calc(100dvh - var(--bp-nav-height, 64px));
|
|
3548
|
+
overflow-y: auto;
|
|
3549
|
+
overscroll-behavior: contain;
|
|
3550
|
+
background: var(--bp-c-bg);
|
|
3551
|
+
border-bottom: 1px solid var(--bp-c-divider);
|
|
3552
|
+
box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
|
|
3553
|
+
z-index: 40;
|
|
3554
|
+
}
|
|
3555
|
+
|
|
3556
|
+
.BPNavScreen[hidden] {
|
|
3557
|
+
display: none;
|
|
3558
|
+
}
|
|
3559
|
+
|
|
3560
|
+
html.bp-nav-screen-open,
|
|
3561
|
+
html.bp-nav-screen-open body {
|
|
3562
|
+
overflow: hidden;
|
|
3563
|
+
}
|
|
2661
3564
|
}
|
|
2662
3565
|
|
|
2663
3566
|
/* Search trigger. A button that looks like a field: the real input lives in
|
|
@@ -2853,6 +3756,127 @@ ${`/**
|
|
|
2853
3756
|
* Hero (home layout) \u2014 used by hero.stx + serve.ts generateHero
|
|
2854
3757
|
* -------------------------------------------------------------------------- */
|
|
2855
3758
|
|
|
3759
|
+
.BPHero-announcement {
|
|
3760
|
+
display: inline-flex;
|
|
3761
|
+
align-items: center;
|
|
3762
|
+
gap: 8px;
|
|
3763
|
+
margin: 0 0 20px;
|
|
3764
|
+
padding: 5px 14px 5px 6px;
|
|
3765
|
+
border: 1px solid var(--bp-c-divider);
|
|
3766
|
+
border-radius: 999px;
|
|
3767
|
+
background: var(--bp-c-bg-soft);
|
|
3768
|
+
font-size: 13px;
|
|
3769
|
+
color: var(--bp-c-text-2);
|
|
3770
|
+
text-decoration: none;
|
|
3771
|
+
transition: border-color 0.25s, color 0.25s;
|
|
3772
|
+
}
|
|
3773
|
+
|
|
3774
|
+
.BPHero-announcement:hover {
|
|
3775
|
+
border-color: var(--bp-c-brand-1);
|
|
3776
|
+
color: var(--bp-c-text-1);
|
|
3777
|
+
}
|
|
3778
|
+
|
|
3779
|
+
.BPHero-announcement-tag {
|
|
3780
|
+
padding: 2px 8px;
|
|
3781
|
+
border-radius: 999px;
|
|
3782
|
+
background: var(--bp-c-brand-soft, var(--bp-c-bg-alt));
|
|
3783
|
+
color: var(--bp-c-brand-1);
|
|
3784
|
+
font-size: 12px;
|
|
3785
|
+
font-weight: 600;
|
|
3786
|
+
}
|
|
3787
|
+
|
|
3788
|
+
.BPHero-announcement-arrow {
|
|
3789
|
+
width: 13px;
|
|
3790
|
+
height: 13px;
|
|
3791
|
+
transition: transform 0.25s;
|
|
3792
|
+
}
|
|
3793
|
+
|
|
3794
|
+
.BPHero-announcement:hover .BPHero-announcement-arrow {
|
|
3795
|
+
transform: translateX(2px);
|
|
3796
|
+
}
|
|
3797
|
+
|
|
3798
|
+
/**
|
|
3799
|
+
* Hero code panel \u2014 the visual for a tool people evaluate by reading code.
|
|
3800
|
+
* -------------------------------------------------------------------------- */
|
|
3801
|
+
|
|
3802
|
+
.BPHeroCode {
|
|
3803
|
+
width: 100%;
|
|
3804
|
+
min-width: 0;
|
|
3805
|
+
border: 1px solid var(--bp-c-divider);
|
|
3806
|
+
border-radius: 12px;
|
|
3807
|
+
background: var(--bp-code-block-bg, var(--bp-c-bg-alt));
|
|
3808
|
+
overflow: hidden;
|
|
3809
|
+
}
|
|
3810
|
+
|
|
3811
|
+
.BPHeroCode-head {
|
|
3812
|
+
display: flex;
|
|
3813
|
+
align-items: center;
|
|
3814
|
+
gap: 4px;
|
|
3815
|
+
min-height: 38px;
|
|
3816
|
+
padding: 0 12px;
|
|
3817
|
+
border-bottom: 1px solid var(--bp-c-divider);
|
|
3818
|
+
}
|
|
3819
|
+
|
|
3820
|
+
.BPHeroCode-head:empty {
|
|
3821
|
+
display: none;
|
|
3822
|
+
}
|
|
3823
|
+
|
|
3824
|
+
.BPHeroCode-file {
|
|
3825
|
+
font-family: var(--bp-font-family-mono, ui-monospace, monospace);
|
|
3826
|
+
font-size: 12px;
|
|
3827
|
+
color: var(--bp-c-text-3, var(--bp-c-text-2));
|
|
3828
|
+
}
|
|
3829
|
+
|
|
3830
|
+
.BPHeroCode-tabs {
|
|
3831
|
+
display: flex;
|
|
3832
|
+
gap: 2px;
|
|
3833
|
+
overflow-x: auto;
|
|
3834
|
+
}
|
|
3835
|
+
|
|
3836
|
+
.BPHeroCode-tab {
|
|
3837
|
+
padding: 8px 12px;
|
|
3838
|
+
border: none;
|
|
3839
|
+
border-bottom: 2px solid transparent;
|
|
3840
|
+
background: none;
|
|
3841
|
+
font-family: var(--bp-font-family-mono, ui-monospace, monospace);
|
|
3842
|
+
font-size: 12px;
|
|
3843
|
+
color: var(--bp-c-text-2);
|
|
3844
|
+
white-space: nowrap;
|
|
3845
|
+
cursor: pointer;
|
|
3846
|
+
transition: color 0.25s, border-color 0.25s;
|
|
3847
|
+
}
|
|
3848
|
+
|
|
3849
|
+
.BPHeroCode-tab:hover {
|
|
3850
|
+
color: var(--bp-c-text-1);
|
|
3851
|
+
}
|
|
3852
|
+
|
|
3853
|
+
.BPHeroCode-tab.is-active {
|
|
3854
|
+
color: var(--bp-c-text-1);
|
|
3855
|
+
border-bottom-color: var(--bp-c-brand-1);
|
|
3856
|
+
}
|
|
3857
|
+
|
|
3858
|
+
.BPHeroCode-body pre {
|
|
3859
|
+
margin: 0;
|
|
3860
|
+
padding: 18px 20px;
|
|
3861
|
+
overflow-x: auto;
|
|
3862
|
+
background: transparent;
|
|
3863
|
+
font-size: 13px;
|
|
3864
|
+
line-height: 1.7;
|
|
3865
|
+
}
|
|
3866
|
+
|
|
3867
|
+
/* The head already names the sample, and the fence language is often a
|
|
3868
|
+
* stand-in for a grammar the highlighter does not ship. Printing it in the
|
|
3869
|
+
* corner of the panel labels the code as the wrong language. */
|
|
3870
|
+
.BPHeroCode pre[data-lang]::before {
|
|
3871
|
+
content: none;
|
|
3872
|
+
}
|
|
3873
|
+
|
|
3874
|
+
.BPHeroCode-body code {
|
|
3875
|
+
background: none;
|
|
3876
|
+
padding: 0;
|
|
3877
|
+
font-size: inherit;
|
|
3878
|
+
}
|
|
3879
|
+
|
|
2856
3880
|
.BPHero-name {
|
|
2857
3881
|
font-size: clamp(18px, 4vw, 24px);
|
|
2858
3882
|
font-weight: 700;
|
|
@@ -2970,7 +3994,9 @@ ${`/**
|
|
|
2970
3994
|
}
|
|
2971
3995
|
|
|
2972
3996
|
.BPFeature {
|
|
2973
|
-
display:
|
|
3997
|
+
display: flex;
|
|
3998
|
+
flex-direction: column;
|
|
3999
|
+
align-items: flex-start;
|
|
2974
4000
|
padding: 26px;
|
|
2975
4001
|
background-color: var(--bp-c-bg-soft, var(--bp-c-bg-alt));
|
|
2976
4002
|
border: 1px solid var(--bp-c-divider);
|
|
@@ -2980,11 +4006,55 @@ ${`/**
|
|
|
2980
4006
|
color: inherit;
|
|
2981
4007
|
}
|
|
2982
4008
|
|
|
4009
|
+
/* A cell can claim extra columns, turning the equal grid into a bento. Only
|
|
4010
|
+
* from 640px up, where there is more than one column to claim. */
|
|
4011
|
+
@media (min-width: 640px) {
|
|
4012
|
+
.BPFeature {
|
|
4013
|
+
grid-column: span min(var(--bp-feature-span, 1), 2);
|
|
4014
|
+
}
|
|
4015
|
+
}
|
|
4016
|
+
|
|
4017
|
+
@media (min-width: 960px) {
|
|
4018
|
+
.BPFeature {
|
|
4019
|
+
grid-column: span var(--bp-feature-span, 1);
|
|
4020
|
+
}
|
|
4021
|
+
}
|
|
4022
|
+
|
|
2983
4023
|
.BPFeature:hover {
|
|
2984
4024
|
border-color: var(--bp-c-brand-1);
|
|
2985
4025
|
box-shadow: 0 2px 12px rgba(86, 114, 205, 0.08);
|
|
2986
4026
|
}
|
|
2987
4027
|
|
|
4028
|
+
/* The affordance that says a card navigates. Pushed to the bottom so it lines
|
|
4029
|
+
* up across a row of cards with different amounts of body copy. */
|
|
4030
|
+
.BPFeature-link {
|
|
4031
|
+
display: inline-flex;
|
|
4032
|
+
align-items: center;
|
|
4033
|
+
gap: 5px;
|
|
4034
|
+
margin-top: auto;
|
|
4035
|
+
padding-top: 14px;
|
|
4036
|
+
font-size: 13px;
|
|
4037
|
+
font-weight: 600;
|
|
4038
|
+
color: var(--bp-c-brand-1);
|
|
4039
|
+
}
|
|
4040
|
+
|
|
4041
|
+
.BPFeature-link svg {
|
|
4042
|
+
width: 13px;
|
|
4043
|
+
height: 13px;
|
|
4044
|
+
transition: transform 0.25s;
|
|
4045
|
+
}
|
|
4046
|
+
|
|
4047
|
+
.BPFeature.is-linked:hover .BPFeature-link svg {
|
|
4048
|
+
transform: translateX(3px);
|
|
4049
|
+
}
|
|
4050
|
+
|
|
4051
|
+
@media (prefers-reduced-motion: reduce) {
|
|
4052
|
+
.BPFeature-link svg,
|
|
4053
|
+
.BPHero-announcement-arrow {
|
|
4054
|
+
transition: none;
|
|
4055
|
+
}
|
|
4056
|
+
}
|
|
4057
|
+
|
|
2988
4058
|
.BPFeature-icon {
|
|
2989
4059
|
width: 40px;
|
|
2990
4060
|
height: 40px;
|
|
@@ -3865,7 +4935,7 @@ ${`/**
|
|
|
3865
4935
|
border-radius: 0;
|
|
3866
4936
|
border: none;
|
|
3867
4937
|
}`}
|
|
3868
|
-
`}function
|
|
4938
|
+
`}function OZ(){return`/**
|
|
3869
4939
|
* VitePress Theme for BunPress
|
|
3870
4940
|
* Colors: Solid
|
|
3871
4941
|
* -------------------------------------------------------------------------- */
|
|
@@ -4434,7 +5504,7 @@ ${`/**
|
|
|
4434
5504
|
|
|
4435
5505
|
.bpi-corner-down-left {
|
|
4436
5506
|
--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");
|
|
4437
|
-
}`}function
|
|
5507
|
+
}`}function BZ(){return`/**
|
|
4438
5508
|
* VitePress Theme for BunPress - Base Styles
|
|
4439
5509
|
* -------------------------------------------------------------------------- */
|
|
4440
5510
|
|
|
@@ -5439,7 +6509,7 @@ mjx-container > svg {
|
|
|
5439
6509
|
.bp-doc .custom-block .bp-code-group .tabs {
|
|
5440
6510
|
margin: 0;
|
|
5441
6511
|
border-radius: 8px 8px 0 0;
|
|
5442
|
-
}`}function
|
|
6512
|
+
}`}function EZ(){return`/**
|
|
5443
6513
|
* VitePress Theme for BunPress - Custom Blocks
|
|
5444
6514
|
* -------------------------------------------------------------------------- */
|
|
5445
6515
|
|
|
@@ -5867,7 +6937,7 @@ mjx-container > svg {
|
|
|
5867
6937
|
|
|
5868
6938
|
.github-alert-caution .github-alert-icon {
|
|
5869
6939
|
fill: var(--bp-c-caution-1);
|
|
5870
|
-
}`}function
|
|
6940
|
+
}`}function NZ(){return`/**
|
|
5871
6941
|
* VitePress Theme for BunPress - Code Groups
|
|
5872
6942
|
* -------------------------------------------------------------------------- */
|
|
5873
6943
|
|
|
@@ -6008,7 +7078,7 @@ mjx-container > svg {
|
|
|
6008
7078
|
margin: 0;
|
|
6009
7079
|
border-radius: 0;
|
|
6010
7080
|
border: none;
|
|
6011
|
-
}`}var
|
|
7081
|
+
}`}var RZ={name:"vitepress",getCSS:FJ,getVars:OZ,getBase:BZ,getCustomBlocks:EZ,getCodeGroups:NZ},qQ=RZ;var WQ=`/**
|
|
6012
7082
|
* Bun Theme for BunPress
|
|
6013
7083
|
* Colors extracted from bun.sh
|
|
6014
7084
|
* -------------------------------------------------------------------------- */
|
|
@@ -6562,7 +7632,7 @@ mjx-container > svg {
|
|
|
6562
7632
|
|
|
6563
7633
|
.bpi-search {
|
|
6564
7634
|
--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");
|
|
6565
|
-
}`,
|
|
7635
|
+
}`,zQ=`/**
|
|
6566
7636
|
* Bun Theme for BunPress - Base Styles
|
|
6567
7637
|
* -------------------------------------------------------------------------- */
|
|
6568
7638
|
|
|
@@ -7361,7 +8431,7 @@ p {
|
|
|
7361
8431
|
.bp-doc .custom-block .bp-code-group .tabs {
|
|
7362
8432
|
margin: 0;
|
|
7363
8433
|
border-radius: 5px 5px 0 0;
|
|
7364
|
-
}`,
|
|
8434
|
+
}`,KQ=`/**
|
|
7365
8435
|
* Bun Theme for BunPress - Custom Blocks
|
|
7366
8436
|
* -------------------------------------------------------------------------- */
|
|
7367
8437
|
|
|
@@ -7725,7 +8795,7 @@ p {
|
|
|
7725
8795
|
|
|
7726
8796
|
.github-alert-caution .github-alert-icon {
|
|
7727
8797
|
fill: var(--bp-c-caution-1);
|
|
7728
|
-
}`,
|
|
8798
|
+
}`,VQ=`/**
|
|
7729
8799
|
* Bun Theme for BunPress - Code Groups
|
|
7730
8800
|
* -------------------------------------------------------------------------- */
|
|
7731
8801
|
|
|
@@ -7855,7 +8925,7 @@ p {
|
|
|
7855
8925
|
margin: 0;
|
|
7856
8926
|
border-radius: 0;
|
|
7857
8927
|
border: none;
|
|
7858
|
-
}`,
|
|
8928
|
+
}`,_Q=`/**
|
|
7859
8929
|
* Bun Theme for BunPress - Extra Bun-specific styles
|
|
7860
8930
|
* -------------------------------------------------------------------------- */
|
|
7861
8931
|
|
|
@@ -8009,267 +9079,35 @@ p {
|
|
|
8009
9079
|
|
|
8010
9080
|
.interactive-hover:hover {
|
|
8011
9081
|
transform: scale(1.06);
|
|
8012
|
-
}`;function
|
|
9082
|
+
}`;function GQ(){return`
|
|
8013
9083
|
/* Bun Theme for BunPress */
|
|
8014
9084
|
/* Colors extracted from bun.sh */
|
|
8015
|
-
${
|
|
8016
|
-
${
|
|
8017
|
-
${
|
|
8018
|
-
${
|
|
8019
|
-
${
|
|
8020
|
-
${
|
|
8021
|
-
`}function
|
|
8022
|
-
${W.map((K)=>{let G=K.children.length>0,E=G&&X?"toc-expand":"",N=G?q(K.children,z+1):"",j=50,U=K.text.length>50?`${K.text.substring(0,50)}...`:K.text,O=K.text.length>50?"toc-truncate":"";return`<li class="${K.hasCode?"toc-code":""} ${E} ${V} ${O}">
|
|
8023
|
-
<a href="#${K.id}" class="toc-link" title="${K.text.replace(/<[^>]*>/g,"")}">${U}</a>
|
|
8024
|
-
${N}
|
|
8025
|
-
</li>`}).join(`
|
|
8026
|
-
`)}
|
|
8027
|
-
</ul>`};return[`<nav class="${J}" role="navigation" aria-label="${Z}">`,'<div class="toc-container">',` <h2 class="toc-title">${Z}</h2>`,` ${q($)}`,"</div>","</nav>"].join(`
|
|
8028
|
-
`)}function JQ(Q){return $Q(Q).replace("table-of-contents","table-of-contents toc-inline inline-toc")}function E0(Q){return $Q(Q).replace("table-of-contents","table-of-contents toc-sidebar sidebar-toc")}function R0(Q){return $Q(Q).replace("table-of-contents","table-of-contents toc-floating floating-toc")}function M0(Q,$={}){let Z={...$};if(typeof Z.position==="string")Z.position=[Z.position];let Y={...FQ,...Z},J=IQ(Q),X=LQ(J),q=DQ(X,Y);return{title:Y.title,items:q,config:Y}}function u1(Q,$={}){let Z=M0(Q,$);return(Array.isArray($.position)?$.position:[$.position||"sidebar"]).map((J)=>{let X;switch(J){case"inline":X=JQ(Z);break;case"sidebar":X=E0(Z);break;case"floating":X=R0(Z);break;default:X=$Q(Z)}return{position:J,data:Z,html:X}})}function g1(Q,$){let Z=JQ($);return Q.replace(/\[\[toc\]\]/gi,Z)}function h1(Q){let $=new Set;return Q.replace(/<h([1-6])>(.*?)<\/h[1-6]>/gi,(Z,Y,J)=>{let X=NZ(J.replace(/<[^>]*>/g,""),$);return`<h${Y} id="${X}"><a href="#${X}" class="heading-anchor">#</a>${J}</h${Y}>`})}function m1(){return`
|
|
8029
|
-
.table-of-contents {
|
|
8030
|
-
position: sticky;
|
|
8031
|
-
top: 60px; /* Match navbar height */
|
|
8032
|
-
height: calc(100vh - 60px);
|
|
8033
|
-
width: 200px;
|
|
8034
|
-
overflow-y: auto;
|
|
8035
|
-
padding: 1rem;
|
|
8036
|
-
}
|
|
8037
|
-
|
|
8038
|
-
.toc-container {
|
|
8039
|
-
padding: 0;
|
|
8040
|
-
}
|
|
8041
|
-
|
|
8042
|
-
.toc-title {
|
|
8043
|
-
margin: 0 0 1rem 0;
|
|
8044
|
-
font-size: 1.2rem;
|
|
8045
|
-
font-weight: 600;
|
|
8046
|
-
}
|
|
8047
|
-
|
|
8048
|
-
.toc-list,
|
|
8049
|
-
.toc-sublist {
|
|
8050
|
-
list-style: none;
|
|
8051
|
-
padding: 0;
|
|
8052
|
-
margin: 0;
|
|
8053
|
-
}
|
|
8054
|
-
|
|
8055
|
-
.toc-list {
|
|
8056
|
-
padding-left: 0;
|
|
8057
|
-
}
|
|
8058
|
-
|
|
8059
|
-
.toc-sublist {
|
|
8060
|
-
padding-left: 1rem;
|
|
8061
|
-
margin-top: 0.5rem;
|
|
8062
|
-
}
|
|
8063
|
-
|
|
8064
|
-
.toc-item,
|
|
8065
|
-
.toc-subitem {
|
|
8066
|
-
margin-bottom: 0.5rem;
|
|
8067
|
-
}
|
|
8068
|
-
|
|
8069
|
-
.toc-link {
|
|
8070
|
-
color: inherit;
|
|
8071
|
-
text-decoration: none;
|
|
8072
|
-
display: block;
|
|
8073
|
-
padding: 0.25rem 0;
|
|
8074
|
-
border-radius: 0.25rem;
|
|
8075
|
-
transition: background-color 0.2s;
|
|
8076
|
-
}
|
|
8077
|
-
|
|
8078
|
-
.toc-link:hover {
|
|
8079
|
-
background-color: rgba(0, 0, 0, 0.05);
|
|
8080
|
-
}
|
|
8081
|
-
|
|
8082
|
-
.toc-active .toc-link,
|
|
8083
|
-
.active-toc-item .toc-link {
|
|
8084
|
-
background-color: rgba(0, 123, 255, 0.1);
|
|
8085
|
-
font-weight: 500;
|
|
8086
|
-
}
|
|
8087
|
-
|
|
8088
|
-
.toc-truncate {
|
|
8089
|
-
/* Styles for truncated TOC items */
|
|
8090
|
-
}
|
|
8091
|
-
|
|
8092
|
-
.toc-truncate .toc-link {
|
|
8093
|
-
white-space: nowrap;
|
|
8094
|
-
overflow: hidden;
|
|
8095
|
-
text-overflow: ellipsis;
|
|
8096
|
-
}
|
|
8097
|
-
|
|
8098
|
-
.toc-collapse .toc-link::before {
|
|
8099
|
-
content: '\u25B6';
|
|
8100
|
-
margin-right: 0.5rem;
|
|
8101
|
-
transition: transform 0.2s;
|
|
8102
|
-
}
|
|
8103
|
-
|
|
8104
|
-
.toc-collapse.collapsed .toc-link::before {
|
|
8105
|
-
transform: rotate(90deg);
|
|
8106
|
-
}
|
|
8107
|
-
|
|
8108
|
-
.toc-expand .toc-link::before {
|
|
8109
|
-
content: '\u25BC';
|
|
8110
|
-
margin-right: 0.5rem;
|
|
8111
|
-
}
|
|
8112
|
-
|
|
8113
|
-
.heading-anchor {
|
|
8114
|
-
color: inherit;
|
|
8115
|
-
text-decoration: none;
|
|
8116
|
-
opacity: 0;
|
|
8117
|
-
margin-left: -1rem;
|
|
8118
|
-
padding-right: 0.5rem;
|
|
8119
|
-
transition: opacity 0.2s;
|
|
8120
|
-
}
|
|
8121
|
-
|
|
8122
|
-
h1:hover .heading-anchor,
|
|
8123
|
-
h2:hover .heading-anchor,
|
|
8124
|
-
h3:hover .heading-anchor,
|
|
8125
|
-
h4:hover .heading-anchor,
|
|
8126
|
-
h5:hover .heading-anchor,
|
|
8127
|
-
h6:hover .heading-anchor {
|
|
8128
|
-
opacity: 0.7;
|
|
8129
|
-
}
|
|
8130
|
-
|
|
8131
|
-
.heading-anchor:hover {
|
|
8132
|
-
opacity: 1;
|
|
8133
|
-
}
|
|
8134
|
-
|
|
8135
|
-
/* Smooth scrolling */
|
|
8136
|
-
html {
|
|
8137
|
-
scroll-behavior: smooth;
|
|
8138
|
-
}
|
|
8139
|
-
|
|
8140
|
-
/* Responsive adjustments */
|
|
8141
|
-
@media (max-width: 768px) {
|
|
8142
|
-
.toc-sidebar {
|
|
8143
|
-
display: none;
|
|
8144
|
-
}
|
|
8145
|
-
|
|
8146
|
-
.toc-floating {
|
|
8147
|
-
position: fixed;
|
|
8148
|
-
bottom: 1rem;
|
|
8149
|
-
right: 1rem;
|
|
8150
|
-
background: white;
|
|
8151
|
-
border: 1px solid #ddd;
|
|
8152
|
-
border-radius: 0.5rem;
|
|
8153
|
-
padding: 1rem;
|
|
8154
|
-
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
8155
|
-
max-width: 250px;
|
|
8156
|
-
}
|
|
8157
|
-
}
|
|
8158
|
-
`}function d1(Q={}){let $=Q.smoothScroll!==!1,Z=Q.activeHighlight!==!1,Y=Q.collapsible!==!1;return`
|
|
8159
|
-
function initToc() {
|
|
8160
|
-
const tocLinks = document.querySelectorAll('.toc-link')
|
|
8161
|
-
|
|
8162
|
-
// Smooth scrolling for TOC links
|
|
8163
|
-
if (${String($)}) tocLinks.forEach(link => {
|
|
8164
|
-
link.addEventListener('click', function(e) {
|
|
8165
|
-
e.preventDefault()
|
|
8166
|
-
const targetId = this.getAttribute('href')?.substring(1)
|
|
8167
|
-
const targetElement = document.getElementById(targetId)
|
|
8168
|
-
|
|
8169
|
-
if (targetElement) {
|
|
8170
|
-
targetElement.scrollIntoView({
|
|
8171
|
-
behavior: 'smooth',
|
|
8172
|
-
block: 'start'
|
|
8173
|
-
})
|
|
8174
|
-
|
|
8175
|
-
// Update URL without page reload
|
|
8176
|
-
history.pushState(null, '', '#' + targetId)
|
|
8177
|
-
}
|
|
8178
|
-
})
|
|
8179
|
-
})
|
|
8180
|
-
|
|
8181
|
-
// Active TOC item highlighting on scroll
|
|
8182
|
-
function updateActiveTocItem() {
|
|
8183
|
-
if (!${String(Z)}) return
|
|
8184
|
-
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6')
|
|
8185
|
-
const tocLinks = document.querySelectorAll('.toc-link')
|
|
8186
|
-
|
|
8187
|
-
let currentActive = null
|
|
8188
|
-
let currentDistance = Infinity
|
|
8189
|
-
|
|
8190
|
-
headings.forEach((heading, index) => {
|
|
8191
|
-
const rect = heading.getBoundingClientRect()
|
|
8192
|
-
const distance = Math.abs(rect.top)
|
|
8193
|
-
|
|
8194
|
-
if (distance < currentDistance && rect.top <= 100) {
|
|
8195
|
-
currentActive = heading.id
|
|
8196
|
-
currentDistance = distance
|
|
8197
|
-
}
|
|
8198
|
-
})
|
|
8199
|
-
|
|
8200
|
-
tocLinks.forEach(link => {
|
|
8201
|
-
const parent = link.parentElement
|
|
8202
|
-
if (parent) {
|
|
8203
|
-
parent.classList.remove('toc-active', 'active-toc-item')
|
|
8204
|
-
const href = link.getAttribute('href')?.substring(1)
|
|
8205
|
-
if (href === currentActive) {
|
|
8206
|
-
parent.classList.add('toc-active', 'active-toc-item')
|
|
8207
|
-
}
|
|
8208
|
-
}
|
|
8209
|
-
})
|
|
8210
|
-
}
|
|
8211
|
-
|
|
8212
|
-
// Throttle scroll events
|
|
8213
|
-
let scrollTimeout
|
|
8214
|
-
function throttledUpdate() {
|
|
8215
|
-
if (!scrollTimeout) {
|
|
8216
|
-
scrollTimeout = setTimeout(() => {
|
|
8217
|
-
updateActiveTocItem()
|
|
8218
|
-
scrollTimeout = null
|
|
8219
|
-
}, 100)
|
|
8220
|
-
}
|
|
8221
|
-
}
|
|
8222
|
-
|
|
8223
|
-
window.addEventListener('scroll', throttledUpdate)
|
|
8224
|
-
updateActiveTocItem()
|
|
8225
|
-
|
|
8226
|
-
// TOC collapse/expand functionality
|
|
8227
|
-
const expandableItems = ${String(Y)} ? document.querySelectorAll('.toc-expand') : []
|
|
8228
|
-
|
|
8229
|
-
expandableItems.forEach(item => {
|
|
8230
|
-
item.addEventListener('click', function(e) {
|
|
8231
|
-
if (e.target === this || e.target.closest('.toc-link')) {
|
|
8232
|
-
this.classList.toggle('collapsed')
|
|
8233
|
-
}
|
|
8234
|
-
})
|
|
8235
|
-
})
|
|
8236
|
-
|
|
8237
|
-
// Handle URL hash on page load
|
|
8238
|
-
if (window.location.hash) {
|
|
8239
|
-
const targetId = window.location.hash.substring(1)
|
|
8240
|
-
const targetElement = document.getElementById(targetId)
|
|
8241
|
-
|
|
8242
|
-
if (targetElement) {
|
|
8243
|
-
setTimeout(() => {
|
|
8244
|
-
targetElement.scrollIntoView({
|
|
8245
|
-
behavior: 'smooth',
|
|
8246
|
-
block: 'start'
|
|
8247
|
-
})
|
|
8248
|
-
}, 100)
|
|
8249
|
-
}
|
|
8250
|
-
}
|
|
8251
|
-
}
|
|
8252
|
-
|
|
8253
|
-
// Initialize TOC when DOM is ready
|
|
8254
|
-
if (document.readyState === 'loading') {
|
|
8255
|
-
document.addEventListener('DOMContentLoaded', initToc)
|
|
8256
|
-
}
|
|
8257
|
-
else {
|
|
8258
|
-
initToc()
|
|
8259
|
-
}
|
|
8260
|
-
`}async function A0(Q,$){let Z=Q.themeConfig?.sidebar||Q.markdown?.sidebar;if(!Z)return"";let Y=[];if(Array.isArray(Z))Y=Z;else if(typeof Z==="object"){let q=Object.keys(Z).sort((W,z)=>z.length-W.length).find((W)=>$.startsWith(W))||"/";Y=Z[q]||[]}let J=await Promise.all(Y.map(async(X)=>{let q=X.items?X.items.map((W)=>{let z=W.link||"/",_=WQ(Q,z);return`<li><a class="${z===$||W.link===$?"BPSidebarItem-link is-active":"BPSidebarItem-link"}" href="${_}">${W.text}</a></li>`}).join(""):"";return await L("sidebar-section",{title:X.text,items:q,collapsedClass:X.collapsed?" collapsed":""})}));return await L("sidebar",{sections:J.join("")})}var F0=`<button class="BPNavBarHamburger" type="button" aria-label="Toggle navigation" onclick="toggleSidebar()">
|
|
9085
|
+
${WQ}
|
|
9086
|
+
${zQ}
|
|
9087
|
+
${XQ}
|
|
9088
|
+
${KQ}
|
|
9089
|
+
${VQ}
|
|
9090
|
+
${_Q}
|
|
9091
|
+
`}function MZ(){return WQ}function FZ(){return zQ}function wZ(){return KQ}function IZ(){return VQ}function DZ(){return _Q}var TZ={name:"bun",getCSS:GQ,getVars:MZ,getBase:FZ,getCustomBlocks:wZ,getCodeGroups:IZ,getExtras:DZ},jQ=TZ;var AZ={vitepress:qQ,bun:jQ};function UQ(J="vitepress"){let Z=AZ[J];if(!Z)return console.warn(`[BunPress] Unknown theme: ${J}, falling back to vitepress`),FJ();return Z.getCSS()}async function LZ(J,Z){let Q=J.themeConfig?.sidebar||J.markdown?.sidebar;if(!Q)return"";let Y=[];if(Array.isArray(Q))Y=Q;else if(typeof Q==="object"){let q=Object.keys(Q).sort((W,K)=>K.length-W.length).find((W)=>Z.startsWith(W))||"/";Y=Q[q]||[]}let $=await Promise.all(Y.map(async(X)=>{let q=X.items?X.items.map((W)=>{let K=W.link||"/",_=r(J,K);return`<li><a class="${K===Z||W.link===Z?"BPSidebarItem-link is-active":"BPSidebarItem-link"}" href="${_}">${W.text}</a></li>`}).join(""):"";return await T("sidebar-section",{title:X.text,items:q,collapsedClass:X.collapsed?" collapsed":""})}));return await T("sidebar",{sections:$.join("")})}cJ(H.markdown?.languageAliases);var PZ=`<button class="BPNavBarHamburger" type="button" aria-label="Toggle navigation" onclick="toggleSidebar()">
|
|
8261
9092
|
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
|
|
8262
9093
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path>
|
|
8263
9094
|
</svg>
|
|
8264
|
-
</button
|
|
9095
|
+
</button>`,HZ=`<button class="BPNavToggle" type="button" aria-label="Menu" aria-expanded="false" aria-controls="bp-nav-screen" onclick="toggleNavScreen()">
|
|
9096
|
+
<svg class="BPNavToggle-open" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
|
|
9097
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 7h16M4 12h16M4 17h16"></path>
|
|
9098
|
+
</svg>
|
|
9099
|
+
<svg class="BPNavToggle-close" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
|
|
9100
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 6l12 12M18 6L6 18"></path>
|
|
9101
|
+
</svg>
|
|
9102
|
+
</button>`;function yZ(J){if(!J.keyboard||!J.keys.length)return{hint:"",aria:""};let Z=(Q,Y)=>{let $=[];if(Q.ctrl)$.push(Y?"Ctrl":"Control");if(Q.meta)$.push(Y?"\u2318":"Meta");if(Q.alt)$.push(Y?"\u2325":"Alt");if(Q.shift)$.push("Shift");return $.push(Q.key.length===1?Q.key.toUpperCase():Q.key),Y?$.join(""):$.join("+")};return{hint:Z(J.keys[0],!0),aria:J.keys.map((Q)=>Z(Q,!1)).join(" ")}}function SZ(J,Z){let{hint:Q,aria:Y}=yZ(Z),$=R(J);return`<button class="BPNavBarSearch" type="button" aria-label="${$}"${Y?` aria-keyshortcuts="${R(Y)}"`:""}>
|
|
8265
9103
|
<svg class="BPNavBarSearch-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
|
|
8266
9104
|
<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>
|
|
8267
9105
|
</svg>
|
|
8268
|
-
<span class="BPNavBarSearch-label">${
|
|
8269
|
-
${
|
|
8270
|
-
</button>`}var
|
|
8271
|
-
`)}function
|
|
8272
|
-
`);return{aside:await
|
|
9106
|
+
<span class="BPNavBarSearch-label">${$}</span>
|
|
9107
|
+
${Q?`<kbd class="BPNavBarSearch-kbd">${R(Q)}</kbd>`:""}
|
|
9108
|
+
</button>`}var kZ={github:'<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"/>',twitter:'<path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/>',discord:'<path d="M20.317 4.37a19.79 19.79 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.6 12.6 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.74 19.74 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.1 13.1 0 0 1-1.872-.892.077.077 0 0 1-.008-.128c.126-.094.252-.192.372-.291a.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.009c.12.099.246.198.373.292a.077.077 0 0 1-.006.127 12.3 12.3 0 0 1-1.873.891.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.84 19.84 0 0 0 6.002-3.03.077.077 0 0 0 .032-.056c.5-5.177-.838-9.674-3.549-13.66a.06.06 0 0 0-.031-.028M8.02 15.331c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418m7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418"/>',x:'<path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/>'};function xZ(J){return(J.themeConfig?.socialLinks??[]).map(({icon:Q,link:Y})=>{let $=kZ[Q?.toLowerCase()],X=Q?Q.charAt(0).toUpperCase()+Q.slice(1):"Link",q=$?`<svg fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">${$}</svg>`:`<span class="BPSocialLinks-text">${R(X)}</span>`;return`<a href="${R(Y)}" target="_blank" rel="noopener external" aria-label="${R(X)}">${q}</a>`}).join(`
|
|
9109
|
+
`)}function R(J){return String(J??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}async function vZ(J,Z="On this page"){let Q=J.replace(/<nav class="table-of-contents[\s\S]*?<\/nav>/g,""),Y=/<h([2-6])([^>]*)>(.*?)<\/h\1>/g,$=[],X;while((X=Y.exec(Q))!==null){let W=Number.parseInt(X[1]),K=X[2],_=X[3];_=_.replace(/<[^>]*>/g,"");let z=K.match(/id="([^"]*)"/),V=z?z[1]:_.toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]/g,"");$.push({level:W,text:_,id:V})}if($.length===0)return{aside:"",inline:""};let q=$.map((W)=>{let K=W.level>2?`level-${W.level}`:"";return`<a href="#${W.id}" class="${K}">${W.text}</a>`}).join(`
|
|
9110
|
+
`);return{aside:await T("page-toc",{items:q,title:Z}),inline:await T("page-outline",{items:q,count:String($.length),title:Z})}}function CZ(J){let Z=new Set;return J.replace(/<h([1-6])([^>]*)>(.*?)<\/h\1>/g,(Q,Y,$,X)=>{if($.includes("id=")){let _=$.match(/\bid=["']([^"']+)["']/)?.[1];if(_)Z.add(_);return Q}let q=X.match(/\s*\{#([\w-]+)\}\s*$/),W,K=X;if(q)W=q[1],K=X.replace(/\s*\{#[\w-]+\}\s*$/,"");else{let _=X.replace(/<[^>]*>/g,"");W=yJ(_)}return W=SJ(W,Z),`<h${Y}${$} id="${W}">${K}</h${Y}>`})}function bZ(J,Z,Q=""){if(!Z&&!Q)return J;let Y=!1,$=J.replace(/<h1(?:\s[^>]*)?>[\s\S]*?<\/h1>/,(X)=>{return Y=!0,`<div class="bp-page-header">${X}${Z}</div>${Q}`});return Y?$:`${Q}${J}`}function wJ(J){let Z=fZ(),Q=J.lastIndexOf("</body>");if(Q===-1)return J+Z;return J.slice(0,Q)+Z+J.slice(Q)}function IJ(J,Z){if(!Z)return J;let Q=J.lastIndexOf("</body>");if(Q===-1)return J+Z;return J.slice(0,Q)+Z+J.slice(Q)}function fZ(){return`<script data-bp-router="1">
|
|
8273
9111
|
(function(){
|
|
8274
9112
|
if (history.scrollRestoration) history.scrollRestoration = 'manual';
|
|
8275
9113
|
|
|
@@ -8570,31 +9408,55 @@ else {
|
|
|
8570
9408
|
|
|
8571
9409
|
updateActiveLinks();
|
|
8572
9410
|
})();
|
|
8573
|
-
<`+"/script>"}
|
|
8574
|
-
|
|
8575
|
-
|
|
8576
|
-
|
|
8577
|
-
<
|
|
8578
|
-
|
|
8579
|
-
|
|
8580
|
-
|
|
8581
|
-
|
|
9411
|
+
<`+"/script>"}var bQ=`<svg class="chevron" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
|
|
9412
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
|
|
9413
|
+
</svg>`;function fQ(J){return J.themeConfig?.nav||J.markdown?.nav||J.nav||[]}function pQ(J){if(typeof J.mega==="boolean")return J.mega;return(J.items??[]).some((Z)=>!!Z.description||(Z.items?.length??0)>0)}function uQ(J){let Z=J.items??[],Q=Z.filter((X)=>(X.items?.length??0)>0);if(Q.length===0)return[{items:Z}];let Y=Z.filter((X)=>(X.items?.length??0)===0),$=Q.map((X)=>({text:X.text,items:X.items??[]}));return Y.length>0?[{items:Y},...$]:$}function pZ(J,Z=""){let Q=fQ(J);if(Q.length===0)return"";let Y=(z)=>{return r(J,z||"/")},$=(z)=>gQ(z,Z),X=(z)=>$(z)||(z.items??[]).some((V)=>X(V)),q=(z)=>{let V=z.icon?`<span class="BPMega-item-icon" aria-hidden="true">${z.icon}</span>`:"",G=z.description?`<span class="BPMega-item-desc">${z.description}</span>`:"";return`<a class="BPMega-item${$(z)?" is-active":""}" href="${R(Y(z.link))}">
|
|
9414
|
+
${V}
|
|
9415
|
+
<span class="BPMega-item-body">
|
|
9416
|
+
<span class="BPMega-item-title">${z.text}</span>
|
|
9417
|
+
${G}
|
|
9418
|
+
</span>
|
|
9419
|
+
</a>`},W=(z)=>{let V=uQ(z),G=Math.max(1,Math.min(z.columns??V.length,4)),N=V.map((j)=>{return`<div class="BPMega-group">
|
|
9420
|
+
${j.text?`<p class="BPMega-group-title">${j.text}</p>`:""}
|
|
9421
|
+
${j.items.map(q).join(`
|
|
9422
|
+
`)}
|
|
9423
|
+
</div>`}).join(`
|
|
9424
|
+
`),B=z.footer?`<div class="BPMega-footer">
|
|
9425
|
+
${z.footer.note?`<span class="BPMega-footer-note">${z.footer.note}</span>`:""}
|
|
9426
|
+
<a class="BPMega-footer-link" href="${R(Y(z.footer.link))}">${z.footer.text}</a>
|
|
9427
|
+
</div>`:"";return`<div class="BPMega BPNavBarMenu-group-items" style="--bp-mega-columns:${G}">
|
|
9428
|
+
<div class="BPMega-columns">
|
|
9429
|
+
${N}
|
|
8582
9430
|
</div>
|
|
8583
|
-
|
|
8584
|
-
|
|
8585
|
-
|
|
9431
|
+
${B}
|
|
9432
|
+
</div>`},K=(z)=>`<div class="BPNavBarMenu-group-items">
|
|
9433
|
+
${(z.items??[]).map((V)=>`<a href="${R(Y(V.link))}"${$(V)?' class="is-active"':""}>${V.text}</a>`).join("")}
|
|
9434
|
+
</div>`;return Q.map((z)=>{if(z.items&&z.items.length>0){let G=pQ(z),N=X(z)?" is-active":"";return`<div class="BPNavBarMenu-group${G?" is-mega":""}${N}">
|
|
9435
|
+
<button class="BPNavBarMenu-group-button" type="button" aria-expanded="false" aria-haspopup="true">
|
|
9436
|
+
<span>${z.text}</span>
|
|
9437
|
+
${bQ}
|
|
9438
|
+
</button>
|
|
9439
|
+
${G?W(z):K(z)}
|
|
9440
|
+
</div>`}return`<a class="BPNavBarMenu-link${$(z)?" is-active":""}" href="${R(Y(z.link))}">${z.text}</a>`}).join("")}function gQ(J,Z){if(J.activeMatch)try{return new RegExp(J.activeMatch).test(Z)}catch{return!1}if(!J.link)return!1;let Q=J.link.split("#")[0].replace(/\/$/,"");return Q!==""&&Q!=="/"&&(Z===Q||Z.startsWith(`${Q}/`))}function uZ(J,Z=""){let Q=fQ(J);if(Q.length===0)return"";let Y=(W)=>r(J,W||"/"),$=(W)=>gQ(W,Z),X=(W,K)=>`<a class="${K}${$(W)?" is-active":""}" href="${R(Y(W.link))}">${W.text}</a>`;return`<div class="BPNavScreen" id="bp-nav-screen" hidden>
|
|
9441
|
+
<nav class="BPNavScreen-nav" aria-label="Site">${Q.map((W)=>{if(!W.items||W.items.length===0)return`<div class="BPNavScreen-section">${X(W,"BPNavScreen-link")}</div>`;let _=(pQ(W)?uQ(W):[{items:W.items}]).map((z)=>{return`${z.text?`<p class="BPNavScreen-subtitle">${z.text}</p>`:""}${z.items.map((G)=>X(G,"BPNavScreen-link")).join("")}`}).join("");return`<details class="BPNavScreen-section"${(W.items??[]).some((z)=>$(z))?" open":""}>
|
|
9442
|
+
<summary class="BPNavScreen-summary">${W.text}${bQ}</summary>
|
|
9443
|
+
<div class="BPNavScreen-items">${_}</div>
|
|
9444
|
+
</details>`}).join("")}</nav>
|
|
9445
|
+
</div>`}function hQ(J){if(J.basePath){let Q=J.basePath.trim().replace(/\/+$/,"");if(!Q||Q==="/")return"";return Q.startsWith("/")?Q:`/${Q}`}let Z=J.sitemap?.baseUrl;if(!Z)return"";try{let Q=new URL(Z).pathname.replace(/\/+$/,"");return Q==="/"?"":Q}catch{return""}}function gZ(J,Z){let Q=hQ(J);if(!Q)return Z;if(Z===Q||Z.startsWith(`${Q}/`))return Z.slice(Q.length)||"/";return Z}function r(J,Z){let Q=hQ(J);if(!Q||!Z.startsWith("/")||Z.startsWith("//"))return Z;if(Z===Q||Z.startsWith(`${Q}/`))return Z;return Z==="/"?`${Q}/`:`${Q}${Z}`}function DJ(J,Z){return J.replace(/\b(href|src|action)="(\/[^"]*)"/g,(Q,Y,$)=>{let X=r(Z,$);return X===$?Q:`${Y}="${X}"`})}function hZ(J,Z,Q){if(Q)return`<link rel="canonical" href="${R(Q)}">`;let Y=J.sitemap?.baseUrl;if(!Y)return"";return`<link rel="canonical" href="${Y.replace(/\/$/,"")}${Z==="/index"?"/":Z}">`}function dZ(J,Z,Q,Y,$){let X=Q.sitemap?.baseUrl;if(!X)return"";let K=`${X.replace(/\/$/,"")}${Y==="/index"?"/":Y}`,_=Q.title||Q.markdown?.title||J,z=$||Q.markdown?.meta?.["og:image"]||Q.markdown?.meta?.ogImage,V=['<meta property="og:type" content="website">',`<meta property="og:url" content="${K}">`,`<meta property="og:title" content="${J}">`,`<meta property="og:description" content="${Z}">`,`<meta property="og:site_name" content="${_}">`];if(z)V.push(`<meta property="og:image" content="${z}">`);return V.join(`
|
|
9446
|
+
`)}function mZ(J,Z,Q,Y){let $=Q.markdown?.meta?.["twitter:card"]||Q.markdown?.meta?.twitterCard||"summary",X=Q.markdown?.meta?.["twitter:site"]||Q.markdown?.meta?.twitterSite,q=Y||Q.markdown?.meta?.["twitter:image"]||Q.markdown?.meta?.twitterImage,W=[`<meta name="twitter:card" content="${$}">`,`<meta name="twitter:title" content="${J}">`,`<meta name="twitter:description" content="${Z}">`];if(X)W.push(`<meta name="twitter:site" content="${X}">`);if(q)W.push(`<meta name="twitter:image" content="${q}">`);return W.join(`
|
|
9447
|
+
`)}function cZ(J,Z,Q,Y){let $=Q.sitemap?.baseUrl;if(!$)return"";let X=$.replace(/\/$/,""),q=Y==="/index"?"/":Y,W=`${X}${q}`;if(q==="/"){let V={"@context":"https://schema.org","@type":"WebSite",name:Q.title||Q.markdown?.title||J,description:Z,url:X};return`<script type="application/ld+json">
|
|
9448
|
+
${JSON.stringify(V,null,2)}
|
|
9449
|
+
</script>`}let K={"@context":"https://schema.org","@type":"TechArticle",headline:J,description:Z,url:W},_=q.split("/").filter(Boolean),z=_.map((V,G)=>{let N=G+1,B=`${X}/${_.slice(0,N).join("/")}`;return{"@type":"ListItem",position:N,name:V.replace(/-/g," ").replace(/\b\w/g,(j)=>j.toUpperCase()),item:B}});if(z.length>0){let V={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:z};return`<script type="application/ld+json">
|
|
8586
9450
|
${JSON.stringify(K,null,2)}
|
|
8587
|
-
</script>`}let z={"@context":"https://schema.org","@type":"TechArticle",headline:Q,description:$,url:W},_=q.split("/").filter(Boolean),V=_.map((K,G)=>{let E=G+1,N=`${X}/${_.slice(0,E).join("/")}`;return{"@type":"ListItem",position:E,name:K.replace(/-/g," ").replace(/\b\w/g,(j)=>j.toUpperCase()),item:N}});if(V.length>0){let K={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:V};return`<script type="application/ld+json">
|
|
8588
|
-
${JSON.stringify(z,null,2)}
|
|
8589
9451
|
</script>
|
|
8590
9452
|
<script type="application/ld+json">
|
|
8591
|
-
${JSON.stringify(
|
|
9453
|
+
${JSON.stringify(V,null,2)}
|
|
8592
9454
|
</script>`}return`<script type="application/ld+json">
|
|
8593
|
-
${JSON.stringify(
|
|
8594
|
-
</script>`}function
|
|
8595
|
-
`);return{fontLinks:
|
|
8596
|
-
`),fontFaceCss
|
|
8597
|
-
${
|
|
9455
|
+
${JSON.stringify(K,null,2)}
|
|
9456
|
+
</script>`}function lZ(J){let Z=J.fonts;if(!Z)return{fontLinks:"",fontFaceCss:""};let Q=[],Y=Z.google?.filter(Boolean)??[];if(Y.length>0){if(Z.preconnect!==!1)Q.push('<link rel="preconnect" href="https://fonts.googleapis.com">'),Q.push('<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>');let X=Y.map((W)=>`family=${W.trim().replace(/\s+/g,"+")}`).join("&"),q=Z.display??"swap";Q.push(`<link href="https://fonts.googleapis.com/css2?${X}&display=${q}" rel="stylesheet">`)}let $=(Z.faces??[]).map((X)=>X.trim()).filter(Boolean).join(`
|
|
9457
|
+
`);return{fontLinks:Q.join(`
|
|
9458
|
+
`),fontFaceCss:$}}function sZ(J){let Z={...J.markdown?.themeConfig,...J.themeConfig},Q=[],Y=(W,K)=>{if(K)Q.push(` ${W}: ${K};`)},$=Z.colors??{};Y("--bp-c-brand-1",$.primary),Y("--bp-c-brand-2",$.secondary||$.primary),Y("--bp-c-brand-3",$.accent||$.secondary||$.primary),Y("--bp-c-bg",$.background),Y("--bp-c-bg-alt",$.surface),Y("--bp-c-bg-soft",$.surface),Y("--bp-c-text-1",$.text),Y("--bp-c-text-2",$.muted);let X=Z.fonts??{};Y("--bp-font-family-base",X.body),Y("--bp-font-family-mono",X.mono);for(let[W,K]of Object.entries(Z.cssVars??{}))Y(W.startsWith("--")?W:`--${W}`,K);let q=[];if(Q.length)q.push(`:root {
|
|
9459
|
+
${Q.join(`
|
|
8598
9460
|
`)}
|
|
8599
9461
|
}`);if(X.heading)q.push(`.bp-doc h1,
|
|
8600
9462
|
.bp-doc h2,
|
|
@@ -8604,39 +9466,39 @@ ${Z.join(`
|
|
|
8604
9466
|
.bp-doc h6,
|
|
8605
9467
|
.BPHero-text {
|
|
8606
9468
|
font-family: ${X.heading};
|
|
8607
|
-
}`);if(
|
|
8608
|
-
|
|
8609
|
-
`)}function
|
|
8610
|
-
`)}}async function
|
|
8611
|
-
`),{fontLinks:
|
|
8612
|
-
`),
|
|
8613
|
-
`)||"",
|
|
8614
|
-
`),P=
|
|
8615
|
-
`)}):"",
|
|
8616
|
-
${P}`),
|
|
8617
|
-
${
|
|
8618
|
-
${R}
|
|
8619
|
-
${F}
|
|
9469
|
+
}`);if(Z.css)q.push(Z.css);return q.join(`
|
|
9470
|
+
|
|
9471
|
+
`)}function rZ(J,Z,Q,Y){let $=Z.match(/<h1(?:\s[^>]*)?>([\s\S]*?)<\/h1>/),X=$?$[1].replace(/<[^>]+>/g,"").trim():"",q=typeof J.title==="string"&&J.title.trim()||X||Q,W=q&&q!==Q?`${q} | ${Q}`:Q,K=typeof J.description==="string"&&J.description.trim()||Y.description||Y.markdown?.meta?.description||"Documentation built with BunPress",_=[],z=(B)=>{_.push(B)},V=J.keywords;if(V){let B=Array.isArray(V)?V.join(", "):String(V);if(B.trim())z(`<meta name="keywords" content="${R(B)}">`)}if(typeof J.author==="string"&&J.author.trim())z(`<meta name="author" content="${R(J.author)}">`);if(typeof J.robots==="string"&&J.robots.trim())z(`<meta name="robots" content="${R(J.robots)}">`);if(J.meta&&typeof J.meta==="object")for(let[B,j]of Object.entries(J.meta)){if(j===void 0||j===null)continue;let O=B.startsWith("og:")?"property":"name";z(`<meta ${O}="${R(B)}" content="${R(String(j))}">`)}if(Array.isArray(J.head))for(let B of J.head){if(!Array.isArray(B)||typeof B[0]!=="string")continue;let[j,O]=B;if(!["meta","link","base"].includes(j.toLowerCase()))continue;let U=Object.entries(O??{}).map(([E,w])=>`${R(E)}="${R(String(w))}"`).join(" ");z(`<${j.toLowerCase()}${U?` ${U}`:""}>`)}let G=typeof J.image==="string"?J.image:void 0,N=typeof J.canonical==="string"?J.canonical:void 0;return{documentTitle:W,pageTitle:q,description:K,image:G,canonical:N,extraTags:_.join(`
|
|
9472
|
+
`)}}async function iZ(J,Z,Q,Y,$){let X=J.themeConfig,q="",W="",K=X?.editLink?.pattern;if(K&&$&&Z.editLink!==!1){let N=aJ(K,Y,$),B=X?.editLink?.text??"Edit this page";q=`<a class="BPDocFooter-edit" href="${R(N)}" target="_blank" rel="noopener"><svg fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"></path></svg>${R(B)}</a>`}let _=X?.lastUpdated,z=Z.lastUpdated!==!1,V=_!==void 0&&_!==!1,G=typeof Z.lastUpdated==="string"?Z.lastUpdated:void 0;if(z&&(V||Z.lastUpdated===!0||G)){let N=G??($?await oJ(Y,$):null);if(N){let B=typeof _==="object"?_:{},j=nJ(N,Q,B.formatOptions);if(j){let O=B.text??"Last updated";W=`<p class="BPDocFooter-updated">${R(O)}: <time datetime="${R(N)}">${R(j)}</time></p>`}}}if(!q&&!W)return"";return T("doc-footer",{editLink:q,lastUpdated:W})}async function NQ(J,Z,Q,Y="doc",$={},X={}){let{i18n:q,locale:W,sourceFile:K,docsDir:_=Z.docsDir||"./docs"}=X,z=q??await HJ(PJ(Z),Z),V=W||z.defaultLocale,G=TQ(Z,z,V),N=(I)=>z.translate(I,V),B=G.title||G.themeConfig?.siteTitle||G.markdown?.title||"BunPress Documentation",j=rZ($,J,B,G),O=j.documentTitle,U=j.description,E=G.theme||"vitepress",w=UQ(E),M=rJ(),F=FQ.markdown?.css||"",A=G.markdown?.css||"",y=A&&A!==F?A:"",C=sZ(G),KJ=hZ(G,Q,j.canonical),b=dZ(j.pageTitle,U,G,Q,j.image),VJ=mZ(j.pageTitle,U,G,j.image),_J=cZ(j.pageTitle,U,G,Q),kJ=Object.entries(G.markdown?.meta||{}).filter(([I])=>!I.startsWith("og:")&&!I.startsWith("twitter:")&&I!=="description"&&I!=="ogImage"&&I!=="twitterCard"&&I!=="twitterSite"&&I!=="twitterImage").map(([I,v])=>`<meta name="${I}" content="${v}">`).join(`
|
|
9473
|
+
`),{fontLinks:S,fontFaceCss:L}=lZ(G),D=AQ(z,G,Q),u=[kJ,KJ,D,b,VJ,j.extraTags,S].filter(Boolean).join(`
|
|
9474
|
+
`),i=aZ(G),GJ=nZ(G),jJ=G.markdown?.scripts?.map((I)=>`<script>${I}</script>`).join(`
|
|
9475
|
+
`)||"",o=LQ(z),g=[_J,i,GJ,jJ,o?`<script>${o}</script>`:""].filter(Boolean).join(`
|
|
9476
|
+
`),P=pZ(G,Q),f=G.search??G.markdown?.search,a=f?.enabled!==!1,k=f?.algolia,xJ=f?.provider==="algolia"&&!!k?.appId&&!!k?.apiKey&&!!k?.indexName,x=vQ(G,r(G,WJ));if(!G.search?.placeholder&&!G.markdown?.search?.placeholder)x.placeholder=N("search.placeholder");x.locale=z.enabled?V:null;let UJ=a?await T(xJ?"search-algolia":"search",{placeholder:x.placeholder,runtimeConfig:JSON.stringify(xJ?{...x,algolia:k}:x).replace(/</g,"\\u003c")}):"",p=G.themeConfig?.footer,OJ=p?.message||p?.copyright?await T("footer",{message:p.message?`<p class="BPFooter-message">${p.message}</p>`:"",copyright:p.copyright?`<p class="BPFooter-copyright">${p.copyright}</p>`:""}):"",cQ=z.enabled?await T("locale-switcher",{label:N("nav.menu"),current:LJ(z,V),options:z.locales.map((I)=>{let v=IQ(z,I,Q==="/index"?"/":Q),h=I===V?' aria-current="true"':"";return`<li><a href="${R(v)}" data-locale="${R(I)}"${h}>${R(LJ(z,I))}</a></li>`}).join(`
|
|
9477
|
+
`)}):"",lQ=G.themeConfig?.logo?`<img class="BPNavBarTitle-logo" src="${R(G.themeConfig.logo)}" alt="">`:"",vJ=uZ(G,Q),BJ=async(I)=>$.navbar===!1?"":T("navbar",{title:B,logo:lQ,localeSwitcher:cQ,nav:P,navScreen:I==="doc"?"":vJ,navToggle:I==="doc"||!vJ?"":HZ,searchTrigger:a?SZ(x.placeholder,x.shortcuts):"",hamburger:I==="doc"?PZ:"",socialLinks:xZ(G)}),n=G.darkMode??G.themeConfig?.darkMode??"auto",t=n===!0||n==="dark"?"dark":n===!1||n==="light"?"light":"auto",EJ=t==="dark"?"dark":"";if(Y==="home"){let I=await TJ(`${J}
|
|
9478
|
+
${P}`),v=`${L}
|
|
9479
|
+
${w}
|
|
8620
9480
|
${M}
|
|
8621
|
-
${
|
|
8622
|
-
${b}`,h=await L("layout-home",{htmlClass:NQ,themeMode:n,lang:K,title:N,documentTitle:U,description:O,meta:u,customCSS:x,navbar:await OQ("plain"),search:jQ,footer:UQ,content:Q});return HQ(TQ(PQ(h,g)),G)}if(Y==="page"){let F=await yQ(`${Q}
|
|
8623
|
-
${P}`),x=`${T}
|
|
8624
|
-
${A}
|
|
8625
|
-
${R}
|
|
9481
|
+
${I}
|
|
8626
9482
|
${F}
|
|
9483
|
+
${y}
|
|
9484
|
+
${C}`,h=await T("layout-home",{htmlClass:EJ,themeMode:t,lang:V,title:B,documentTitle:O,description:U,meta:u,customCSS:v,navbar:await BJ("plain"),search:UJ,footer:OJ,content:J});return DJ(wJ(IJ(h,g)),G)}if(Y==="page"){let I=await TJ(`${J}
|
|
9485
|
+
${P}`),v=`${L}
|
|
9486
|
+
${w}
|
|
8627
9487
|
${M}
|
|
8628
|
-
${
|
|
8629
|
-
${
|
|
9488
|
+
${I}
|
|
9489
|
+
${F}
|
|
9490
|
+
${y}
|
|
9491
|
+
${C}`,h=await T("layout-page",{htmlClass:EJ,themeMode:t,lang:V,title:B,documentTitle:O,description:U,meta:u,customCSS:v,navbar:await BJ("plain"),search:UJ,footer:OJ,content:J});return DJ(wJ(IJ(h,g)),G)}let CJ=CZ(J),bJ=await vZ(CJ,N("toc.title")),fJ=await LZ(G,Q),pJ=bZ(CJ,await T("copy-page",{}),bJ.inline),sQ=bJ.aside,rQ=await TJ(`${pJ}
|
|
8630
9492
|
${P}
|
|
8631
|
-
${
|
|
8632
|
-
${
|
|
8633
|
-
${R}
|
|
8634
|
-
${fZ}
|
|
9493
|
+
${fJ}`),iQ=`${L}
|
|
9494
|
+
${w}
|
|
8635
9495
|
${M}
|
|
8636
|
-
${
|
|
8637
|
-
${
|
|
9496
|
+
${rQ}
|
|
9497
|
+
${F}
|
|
9498
|
+
${y}
|
|
9499
|
+
${C}`,oQ=await iZ(G,$,V,_,K),aQ=await T("layout-doc",{htmlClass:EJ,themeMode:t,lang:V,title:B,documentTitle:O,description:U,meta:u,customCSS:iQ,navbar:await BJ("doc"),search:UJ,docFooter:oQ,footer:OJ,sidebar:$.sidebar===!1?"":fJ,content:pJ,pageTOC:sQ});return DJ(wJ(IJ(aQ,g)),G)}var XJ=null,RQ=!1;async function oZ(){if(RQ)return XJ;RQ=!0;try{XJ=await import("@cwcss/crosswind")}catch{XJ=null}return XJ}async function TJ(J){let Z=await oZ();if(!Z)return"";let Y=new Z.Scanner([]).scanContent(J);if(Y.size===0)return"";let $=new Z.CSSGenerator(Z.defaultConfig);for(let X of Y)$.generate(X);return $.toCSS(!1,!1)}function aZ(J){if(!J.fathom?.enabled||!J.fathom?.siteId)return"";let Z=J.fathom.scriptUrl||"https://cdn.usefathom.com/script.js",Q=J.fathom.defer!==!1,Y=J.fathom.honorDNT||!1,$=J.fathom.auto!==!1,X=J.fathom.canonical,q=J.fathom.spa||!1,W=[`data-site="${J.fathom.siteId}"`,Y?'data-honor-dnt="true"':"",!$?'data-auto="false"':"",X?`data-canonical="${X}"`:"",q?'data-spa="auto"':""].filter(Boolean).join(" ");return`<script src="${Z}" ${W}${Q?" defer":""}></script>`}function nZ(J){let Z=J.analytics||J.selfHostedAnalytics;if(!Z?.enabled||!Z?.siteId)return"";let Q=AJ(Z.siteId);if(Z.scriptSrc)return`<script defer src="${AJ(Z.scriptSrc)}" data-site="${Q}"></script>`;let Y=Z.apiEndpoint?AJ(Z.apiEndpoint):"",$=Z.honorDNT?`var dnt=n.doNotTrack||w.doNotTrack||n.msDoNotTrack;if(dnt==="1"||dnt==="yes"||dnt===true){l('DNT enabled, skipping');return;}`:"",X=Z.trackHashChanges?"w.addEventListener('hashchange',function(){pv();});":"",q=Z.trackOutboundLinks?`d.addEventListener('click',function(e){try{var a=e.target.closest('a');if(a&&a.hostname&&a.hostname!==location.hostname){t('outbound',{url:a.href,text:(a.textContent||'').slice(0,100)});}}
|
|
8638
9500
|
catch (err){l('Outbound error',err);}});`:"",W=Y?` data-api="${Y}"`:"";return`<!-- ts-analytics: privacy-first analytics -->
|
|
8639
|
-
<script data-site="${
|
|
9501
|
+
<script data-site="${Q}"${W} defer>
|
|
8640
9502
|
(function(){
|
|
8641
9503
|
'use strict';
|
|
8642
9504
|
var d=document,w=window,n=navigator,ss=w.sessionStorage,s=d.currentScript;
|
|
@@ -8644,7 +9506,7 @@ var site=s.dataset.site,api=s.dataset.api||w.ANALYTICS_API_ENDPOINT||'/api/analy
|
|
|
8644
9506
|
var debug=w.ANALYTICS_DEBUG||false;
|
|
8645
9507
|
function l(){if(debug&&w.console)console.log.apply(console,['[Analytics]'].concat([].slice.call(arguments)));}
|
|
8646
9508
|
try{
|
|
8647
|
-
${
|
|
9509
|
+
${$}
|
|
8648
9510
|
var SK='_tsa_sid',VK='_tsa_vid';
|
|
8649
9511
|
var sid=ss.getItem(SK);
|
|
8650
9512
|
if(!sid){sid=Math.random().toString(36).slice(2)+Date.now().toString(36);ss.setItem(SK,sid);l('New session',sid);}
|
|
@@ -8697,50 +9559,60 @@ l('Initialized',site);
|
|
|
8697
9559
|
}
|
|
8698
9560
|
catch(err){if(w.console)console.error('[Analytics] Init error:',err);}
|
|
8699
9561
|
})();
|
|
8700
|
-
</script>`}function
|
|
8701
|
-
`),
|
|
8702
|
-
`)}</div>`;let X=
|
|
8703
|
-
|
|
8704
|
-
|
|
8705
|
-
<
|
|
8706
|
-
|
|
8707
|
-
|
|
8708
|
-
|
|
8709
|
-
`).
|
|
8710
|
-
|
|
8711
|
-
${J}
|
|
8712
|
-
|
|
8713
|
-
|
|
8714
|
-
|
|
8715
|
-
|
|
9562
|
+
</script>`}function AJ(J){return J.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function tZ(J){let Z=J.replace(/\r\n/g,`
|
|
9563
|
+
`),Q=/^---\n([\s\S]*?)\n---\n?/,Y=Z.match(Q);if(!Y)return{frontmatter:{},content:Z};let $=Y[1],X=Z.slice(Y[0].length);try{return{frontmatter:BQ.parse($),content:X}}catch{try{let q=$.replace(/^(\s*\w+:\s*)"(.+)",\s*(.+)$/gm,`$1'"$2," $3'`);return{frontmatter:BQ.parse(q),content:X}}catch(q){return console.error("Failed to parse frontmatter YAML:",q),{frontmatter:{},content:J}}}}async function eZ(J){if(!J)return"";let Z=J.name?`<p class="BPHero-name">${J.name}</p>`:"",Q=J.text?`<h1 class="BPHero-text">${J.text}</h1>`:"",Y=J.tagline?`<p class="BPHero-tagline">${J.tagline}</p>`:"",$="";if(J.actions)$=`<div class="BPHero-actions">${J.actions.map((_)=>{return`<a class="${_.theme==="brand"?"BPButton BPButton-brand":"BPButton BPButton-alt"}" href="${_.link}">${_.text}</a>`}).join(`
|
|
9564
|
+
`)}</div>`;let X=J.announcement?`<a class="BPHero-announcement" href="${R(J.announcement.link||"#")}">
|
|
9565
|
+
${J.announcement.tag?`<span class="BPHero-announcement-tag">${J.announcement.tag}</span>`:""}
|
|
9566
|
+
<span class="BPHero-announcement-text">${J.announcement.text||""}</span>
|
|
9567
|
+
<svg class="BPHero-announcement-arrow" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path></svg>
|
|
9568
|
+
</a>`:"",q=J.image?`<div class="hero-image"><img src="${R(J.image)}" alt="${R(J.name||"")}" /></div>`:"",W=(J.code?await J0(J.code):"")||q;return await T("hero",{announcement:X,name:Z,text:Q,tagline:Y,actions:$,image:W})}async function J0(J){let Q=(Array.isArray(J)?J:[J]).filter((X)=>typeof X?.content==="string"&&X.content.trim());if(Q.length===0)return"";let Y=await Promise.all(Q.map(async(X,q)=>{let W=X.lang||"ts",K=await ZJ(X.content.replace(/\n+$/,""),W);return`<div class="BPHeroCode-panel" data-index="${q}"${q===0?"":" hidden"}>
|
|
9569
|
+
<pre data-lang="${R(W)}"><code class="language-${R(W)}">${K}</code></pre>
|
|
9570
|
+
</div>`}));return`<div class="BPHeroCode">
|
|
9571
|
+
<div class="BPHeroCode-head">${Q.length>1?`<div class="BPHeroCode-tabs" role="tablist">${Q.map((X,q)=>`<button class="BPHeroCode-tab${q===0?" is-active":""}" type="button" role="tab" aria-selected="${q===0}" onclick="switchHeroCodeTab(this, ${q})">${X.file||X.lang||`Example ${q+1}`}</button>`).join("")}</div>`:Q[0].file?`<span class="BPHeroCode-file">${Q[0].file}</span>`:""}</div>
|
|
9572
|
+
<div class="BPHeroCode-body">${Y.join("")}</div>
|
|
9573
|
+
</div>`}var Q0={Fast:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z"/></svg>',Shield:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/></svg>',Blade:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"/></svg>',Tools:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"/></svg>',Components:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/></svg>',Stream:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M2 12h6l3-9 3 18 3-9h5"/></svg>',Desktop:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="2" y="3" width="20" height="14" rx="2"/><path d="M8 21h8m-4-4v4"/></svg>',Parser:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M16 18l6-6-6-6M8 6l-6 6 6 6"/></svg>',Icons:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="12" cy="12" r="4"/><path 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"/></svg>'};function Z0(J){if(J.startsWith("<")||/\p{Emoji}/u.test(J))return J;return Q0[J]||`<span class="BPFeature-icon-text">${J.charAt(0)}</span>`}async function $0(J){if(!J||J.length===0)return"";let Z=J.map((Q)=>{let Y=Q.icon?Z0(Q.icon):"",$=Y?`<div class="BPFeature-icon">${Y}</div>`:"",X=Q.link,q=X?"a":"div",W=X?` href="${R(X)}"`:"",K=Number(Q.span)>1?` style="--bp-feature-span:${Math.min(Math.trunc(Number(Q.span)),3)}"`:"",_=X?" is-linked":"",z=X?`<span class="BPFeature-link">${Q.linkText||"Learn more"}<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path></svg></span>`:"";return`
|
|
9574
|
+
<${q} class="BPFeature${_}"${W}${K}>
|
|
9575
|
+
${$}
|
|
9576
|
+
<h3 class="BPFeature-title">${Q.title||""}</h3>
|
|
9577
|
+
<p class="BPFeature-details">${Q.details||""}</p>
|
|
9578
|
+
${z}
|
|
9579
|
+
</${q}>`}).join("");return await T("features",{items:Z})}function Y0(J){let Z={smile:"\uD83D\uDE04",laughing:"\uD83D\uDE06",blush:"\uD83D\uDE0A",heart_eyes:"\uD83D\uDE0D",kissing_heart:"\uD83D\uDE18",relaxed:"\u263A\uFE0F",wink:"\uD83D\uDE09",grin:"\uD83D\uDE01",joy:"\uD83D\uDE02",sweat_smile:"\uD83D\uDE05",rofl:"\uD83E\uDD23",thinking:"\uD83E\uDD14",zipper_mouth:"\uD83E\uDD10",neutral_face:"\uD83D\uDE10",expressionless:"\uD83D\uDE11",confused:"\uD83D\uDE15",worried:"\uD83D\uDE1F",slightly_frowning_face:"\uD83D\uDE41",frowning_face:"\u2639\uFE0F",persevere:"\uD83D\uDE23",disappointed:"\uD83D\uDE1E",sweat:"\uD83D\uDE13",tired_face:"\uD83D\uDE2B",cry:"\uD83D\uDE22",sob:"\uD83D\uDE2D",triumph:"\uD83D\uDE24",angry:"\uD83D\uDE20",rage:"\uD83D\uDE21",no_mouth:"\uD83D\uDE36",sleeping:"\uD83D\uDE34","+1":"\uD83D\uDC4D",thumbsup:"\uD83D\uDC4D","-1":"\uD83D\uDC4E",thumbsdown:"\uD83D\uDC4E",clap:"\uD83D\uDC4F",raised_hands:"\uD83D\uDE4C",pray:"\uD83D\uDE4F",wave:"\uD83D\uDC4B",ok_hand:"\uD83D\uDC4C",point_up:"\u261D\uFE0F",point_down:"\uD83D\uDC47",point_left:"\uD83D\uDC48",point_right:"\uD83D\uDC49",muscle:"\uD83D\uDCAA",heart:"\u2764\uFE0F",blue_heart:"\uD83D\uDC99",green_heart:"\uD83D\uDC9A",yellow_heart:"\uD83D\uDC9B",purple_heart:"\uD83D\uDC9C",broken_heart:"\uD83D\uDC94",sparkling_heart:"\uD83D\uDC96",star:"\u2B50",star2:"\uD83C\uDF1F",sparkles:"\u2728",boom:"\uD83D\uDCA5",fire:"\uD83D\uDD25",tada:"\uD83C\uDF89",confetti_ball:"\uD83C\uDF8A",rocket:"\uD83D\uDE80",zap:"\u26A1",bulb:"\uD83D\uDCA1",bell:"\uD83D\uDD14",mega:"\uD83D\uDCE3",loudspeaker:"\uD83D\uDCE2",warning:"\u26A0\uFE0F",white_check_mark:"\u2705",check:"\u2705",x:"\u274C",heavy_check_mark:"\u2714\uFE0F",heavy_multiplication_x:"\u2716\uFE0F",question:"\u2753",grey_question:"\u2754",exclamation:"\u2757",grey_exclamation:"\u2755",heavy_plus_sign:"\u2795",heavy_minus_sign:"\u2796",pencil2:"\u270F\uFE0F",memo:"\uD83D\uDCDD",book:"\uD83D\uDCD6",books:"\uD83D\uDCDA",bookmark:"\uD83D\uDD16",mag:"\uD83D\uDD0D",mag_right:"\uD83D\uDD0E",lock:"\uD83D\uDD12",unlock:"\uD83D\uDD13",key:"\uD83D\uDD11",link:"\uD83D\uDD17",computer:"\uD83D\uDCBB",email:"\uD83D\uDCE7",inbox_tray:"\uD83D\uDCE5",outbox_tray:"\uD83D\uDCE4",package:"\uD83D\uDCE6",file_folder:"\uD83D\uDCC1",open_file_folder:"\uD83D\uDCC2",page_facing_up:"\uD83D\uDCC4",calendar:"\uD83D\uDCC5",chart_with_upwards_trend:"\uD83D\uDCC8",chart_with_downwards_trend:"\uD83D\uDCC9",bar_chart:"\uD83D\uDCCA",clipboard:"\uD83D\uDCCB",pushpin:"\uD83D\uDCCC",round_pushpin:"\uD83D\uDCCD",paperclip:"\uD83D\uDCCE",straight_ruler:"\uD83D\uDCCF",wrench:"\uD83D\uDD27",hammer:"\uD83D\uDD28",gear:"\u2699\uFE0F",nut_and_bolt:"\uD83D\uDD29",seedling:"\uD83C\uDF31",evergreen_tree:"\uD83C\uDF32",deciduous_tree:"\uD83C\uDF33",palm_tree:"\uD83C\uDF34",cactus:"\uD83C\uDF35",herb:"\uD83C\uDF3F",shamrock:"\u2618\uFE0F",four_leaf_clover:"\uD83C\uDF40",bug:"\uD83D\uDC1B",bee:"\uD83D\uDC1D",bird:"\uD83D\uDC26",dog:"\uD83D\uDC36",cat:"\uD83D\uDC31",penguin:"\uD83D\uDC27",turtle:"\uD83D\uDC22",fish:"\uD83D\uDC1F",coffee:"\u2615",tea:"\uD83C\uDF75",beer:"\uD83C\uDF7A",beers:"\uD83C\uDF7B",wine_glass:"\uD83C\uDF77",pizza:"\uD83C\uDF55",hamburger:"\uD83C\uDF54",fries:"\uD83C\uDF5F",cake:"\uD83C\uDF70",birthday:"\uD83C\uDF82",cookie:"\uD83C\uDF6A",doughnut:"\uD83C\uDF69",apple:"\uD83C\uDF4E",green_apple:"\uD83C\uDF4F",banana:"\uD83C\uDF4C",strawberry:"\uD83C\uDF53",house:"\uD83C\uDFE0",office:"\uD83C\uDFE2",hospital:"\uD83C\uDFE5",school:"\uD83C\uDFEB",car:"\uD83D\uDE97",taxi:"\uD83D\uDE95",bus:"\uD83D\uDE8C",train:"\uD83D\uDE82",airplane:"\u2708\uFE0F",ship:"\uD83D\uDEA2",bike:"\uD83D\uDEB2",soccer:"\u26BD",basketball:"\uD83C\uDFC0",football:"\uD83C\uDFC8",baseball:"\u26BE",tennis:"\uD83C\uDFBE",trophy:"\uD83C\uDFC6",medal:"\uD83C\uDFC5",dart:"\uD83C\uDFAF",game_die:"\uD83C\uDFB2",musical_note:"\uD83C\uDFB5",notes:"\uD83C\uDFB6",art:"\uD83C\uDFA8",camera:"\uD83D\uDCF7",movie_camera:"\uD83C\uDFA5",checkered_flag:"\uD83C\uDFC1",triangular_flag_on_post:"\uD83D\uDEA9",flag_us:"\uD83C\uDDFA\uD83C\uDDF8",flag_gb:"\uD83C\uDDEC\uD83C\uDDE7",flag_fr:"\uD83C\uDDEB\uD83C\uDDF7",flag_de:"\uD83C\uDDE9\uD83C\uDDEA",flag_jp:"\uD83C\uDDEF\uD83C\uDDF5",flag_cn:"\uD83C\uDDE8\uD83C\uDDF3"};return J.replace(/:(\w+):/g,(Q,Y)=>{return Z[Y]||Q})}function X0(J){let Z=/<Badge([^/>]+)\/>/gi;return J.replace(Z,(Q,Y)=>{let $=Y.match(/type="(info|tip|warning|danger)"/i),X=Y.match(/text="([^"]+)"/),q=$?$[1].toLowerCase():"info",W=X?X[1]:"";return`<span class="badge badge-${q}">${W}</span>`})}function q0(J,Z=!0,Q=!0){return J.replace(/<a\s+href="([^"]+)"([^>]*)>/g,(Y,$,X)=>{if(X.includes("target="))return Y;if($.startsWith("http://")||$.startsWith("https://"))return`<a href="${$}"${Z?' target="_blank"':""}${Q?' rel="noreferrer noopener"':""}${X}>`;return Y})}function W0(J){return J.replace(/<a\s+href="([^"]+)"\s+target="_blank"[^>]*>[\s\S]+?<\/a>/g,(Z,Q)=>{if(Z.includes("external-link-icon"))return Z;let Y='<svg class="external-link-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg>';return Z.replace("</a>",`${Y}</a>`)})}function z0(J){return J.replace(/<img([^>]+)>/g,(Z,Q)=>{if(Q.includes("loading="))return Z;return`<img ${Q} loading="lazy" decoding="async">`})}function K0(J,Z){if(!J.includes("[[toc]]"))return{content:J,tocHtml:null};let Q=yQ(J),Y={...PQ,...Z},$=kQ(Q,Y),q={items:SQ($),title:Y.title||"Table of Contents",config:Y},W=xQ(q),K="<!--INLINE_TOC_PLACEHOLDER-->";return{content:J.replace(/\[\[toc\]\]/g,K),tocHtml:W}}function V0(J,Z){return J.replace(/<!--INLINE_TOC_PLACEHOLDER-->/g,Z)}function dQ(J){let Z=J.replace(/\s+$/,"").split(`
|
|
9580
|
+
`),Q=Z.filter((X)=>X.trim()).map((X)=>X.match(/^[ \t]*/)[0].length),Y=Q.length>0?Math.min(...Q):0,$=Z.map((X)=>X.slice(Y)).join(`
|
|
9581
|
+
`).trim();return $?`
|
|
9582
|
+
|
|
9583
|
+
${$}
|
|
9584
|
+
|
|
9585
|
+
`:""}async function _0(J){let Z=/^>\s*\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]\s*\n((?:>\s*.*\n?)*)/gm,Q=Array.from(J.matchAll(Z)),Y=J;for(let $ of Q.reverse()){let[X,q,W]=$,K=W.split(`
|
|
9586
|
+
`).map((V)=>V.replace(/^>\s?/,"")).join(`
|
|
9587
|
+
`),_=q.toLowerCase(),z=await T(`blocks/alerts/${_}`,{content:dQ(K)});Y=`${Y.slice(0,$.index)}
|
|
9588
|
+
|
|
9589
|
+
${z}
|
|
9590
|
+
|
|
9591
|
+
${Y.slice($.index+X.length)}`}return Y}async function G0(J,Z){let Q=/^<<<\s+@\/([^\s[{#]+)(?:\{(\d+)-(\d+)\}|#(\w+))?\s*(?:\[[^\]]+\]\s*)?$/gm,Y=Array.from(J.matchAll(Q)),$=J;for(let X of Y.reverse()){let[q,W,K,_,z]=X;try{let{join:V}=await import("path"),G=V(Z,W),N=Bun.file(G);if(!await N.exists()){console.warn(`Code import: File not found: ${G}`);continue}let j=(await N.text()).split(`
|
|
9592
|
+
`),O=W.split(".").pop()||"",E={js:"javascript",ts:"typescript",jsx:"jsx",tsx:"tsx",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",cpp:"cpp",c:"c",cs:"csharp",php:"php",sh:"bash",bash:"bash",yaml:"yaml",yml:"yaml",json:"json",md:"markdown",html:"html",css:"css",scss:"scss",vue:"vue"}[O]||O;if(K&&_){let F=Number.parseInt(K)-1,A=Number.parseInt(_);j=j.slice(F,A)}else if(z){let F=j.findIndex((y)=>y.includes(`#region ${z}`)||y.includes(`// region ${z}`)||y.includes(`# region ${z}`)),A=j.findIndex((y,C)=>C>F&&(y.includes("#endregion")||y.includes("// endregion")||y.includes("# endregion")));if(F!==-1&&A!==-1)j=j.slice(F+1,A);else console.warn(`Code import: Region '${z}' not found in ${W}`)}let w=j.join(`
|
|
9593
|
+
`),M=`\`\`\`${E}
|
|
9594
|
+
${w}
|
|
9595
|
+
\`\`\``;$=$.slice(0,X.index)+M+$.slice(X.index+q.length)}catch(V){console.error(`Error importing code from ${W}:`,V)}}return $}async function mQ(J,Z,Q=new Set){let Y=/<!--@include:\s*([^\s{]+)(?:\{(\d+)-(\d+)\}|\{#([\w-]+)\})?\s*-->/g,$=Array.from(J.matchAll(Y)),X=J;for(let q of $.reverse()){let[W,K,_,z,V]=q;try{let{join:G,resolve:N}=await import("path"),B=N(G(Z,K));if(Q.has(B)){console.warn(`Markdown include: Circular reference detected for ${K}`);continue}let j=Bun.file(B);if(!await j.exists()){console.warn(`Markdown include: File not found: ${B}`);continue}let U=(await j.text()).split(`
|
|
9596
|
+
`);if(_&&z){let M=Number.parseInt(_)-1,F=Number.parseInt(z);U=U.slice(M,F)}else if(V){let M=U.findIndex((A)=>A.includes(`<!-- #region ${V} -->`)||A.includes(`<!-- region ${V} -->`)),F=U.findIndex((A,y)=>y>M&&(A.includes("<!-- #endregion -->")||A.includes("<!-- endregion -->")));if(M!==-1&&F!==-1)U=U.slice(M+1,F);else{console.warn(`Markdown include: Region '${V}' not found in ${K}`);continue}}let E=U.join(`
|
|
9597
|
+
`),w=new Set(Q);w.add(B),E=await mQ(E,Z,w),X=X.slice(0,q.index)+E+X.slice(q.index+W.length)}catch(G){console.error(`Error including markdown from ${K}:`,G)}}return X}async function j0(J){let Z=/^:::\s+code-group[ \t]*\n((?:(?!^:::)[\s\S])*)^:::$/gm,Q=Array.from(J.matchAll(Z)),Y=J;for(let $ of Q.reverse()){let[X,q]=$,W=/^```(\w+)[ \t]+\[([^\]]+)\][ \t]*\n((?:(?!^```)[\s\S])*)^```$/gm,K=Array.from(q.matchAll(W));if(K.length===0)continue;let _=new Bun.CryptoHasher("sha256");_.update(`${$.index}\x00${X}`);let z=`code-group-${_.digest("hex").slice(0,12)}`,V=K.map((B,j)=>{let O=B[2];return`<button class="code-group-tab${j===0?" active":""}" onclick="switchCodeTab('${z}', ${j})">${O}</button>`}).join(""),G=await Promise.all(K.map(async(B,j)=>{let O=B[1],U=B[3],E=j===0,w=H.markdown?.syntaxHighlightTheme||"github-light",M=await ZJ(U,O,w),F=`<pre data-lang="${O}"><code class="language-${O}">${M}</code></pre>`;return`<div class="code-group-panel${E?" active":""}" data-panel="${j}">
|
|
9598
|
+
${F}
|
|
9599
|
+
</div>`})),N=[`<div class="code-group" id="${z}">`,' <div class="code-group-tabs">',` ${V}`," </div>",' <div class="code-group-panels">',` ${G.join(`
|
|
9600
|
+
`)}`," </div>","</div>"].join(`
|
|
9601
|
+
`);Y=Y.slice(0,$.index)+N+Y.slice($.index+X.length)}return Y}async function U0(J){let Z=/^:::\s+(info|tip|warning|danger|details|raw)(?: +([^\n\t ][^\n]*))?\n((?:(?!^:::)[\s\S])*)^:::$/gm,Q=Array.from(J.matchAll(Z)),Y=J;for(let $ of Q.reverse()){let[X,q,W,K]=$,_={info:"INFO",tip:"TIP",warning:"WARNING",danger:"DANGER",details:"Details",raw:""},z=W&&W.trim()||_[q],V=await T(`blocks/containers/${q}`,{title:z,content:dQ(K)});Y=`${Y.slice(0,$.index)}
|
|
8716
9602
|
|
|
8717
9603
|
${V}
|
|
8718
9604
|
|
|
8719
|
-
${Y.slice(
|
|
8720
|
-
`),
|
|
8721
|
-
`),
|
|
8722
|
-
${
|
|
8723
|
-
|
|
8724
|
-
`)
|
|
8725
|
-
|
|
8726
|
-
|
|
8727
|
-
</div>`})),E=[`<div class="code-group" id="${V}">`,' <div class="code-group-tabs">',` ${K}`," </div>",' <div class="code-group-panels">',` ${G.join(`
|
|
8728
|
-
`)}`," </div>","</div>"].join(`
|
|
8729
|
-
`);Y=Y.slice(0,J.index)+E+Y.slice(J.index+X.length)}return Y}async function X1(Q){let $=/^:::\s+(info|tip|warning|danger|details|raw)(?: +([^\n\t ][^\n]*))?\n((?:(?!^:::)[\s\S])*)^:::$/gm,Z=Array.from(Q.matchAll($)),Y=Q;for(let J of Z.reverse()){let[X,q,W,z]=J,_={info:"INFO",tip:"TIP",warning:"WARNING",danger:"DANGER",details:"Details",raw:""},V=W&&W.trim()||_[q],K=await L(`blocks/containers/${q}`,{title:V,content:vZ(z)});Y=`${Y.slice(0,J.index)}
|
|
8730
|
-
|
|
8731
|
-
${K}
|
|
8732
|
-
|
|
8733
|
-
${Y.slice(J.index+X.length)}`}return Y}function q1(Q){let $=Q.match(/^(\w+)/),Z=$?$[1]:"",Y=Q.match(/\{([^}]+)\}/),J=[];if(Y){let q=Y[1].split(",");for(let W of q){let z=W.trim();if(z.includes("-")){let[_,V]=z.split("-").map(Number);for(let K=_;K<=V;K++)J.push(K)}else J.push(Number(z))}}let X=Q.includes(":line-numbers");return{lang:Z,highlights:J,showLineNumbers:X}}async function W1(Q,$,Z){let Y=Q[$],J=Y.match(/^(`{3,})/),X=J?J[1].length:3,q="`".repeat(X),W=Y.substring(X).trim(),z=q1(W),_=z.lang,V=Z.lineHighlighting?z.highlights:[],K=Z.lineNumbers?z.showLineNumbers:!1,G=[],E=$+1;while(E<Q.length){let k=Q[E];if(k.match(new RegExp(`^\`{${X},}\\s*$`)))break;G.push(k),E++}let N=new Set,j=new Set,U=new Set,O=new Set,B=new Set,A=G.map((k,T)=>{let I=k;if(I.includes("// [!code focus]"))N.add(T),I=I.replace(/\/\/ \[!code focus\]/,"").trimEnd();if(I.includes("// [!code ++]"))j.add(T),I=I.replace(/\/\/ \[!code \+\+\]/,"").trimEnd();if(I.includes("// [!code --]"))U.add(T),I=I.replace(/\/\/ \[!code --\]/,"").trimEnd();if(I.includes("// [!code error]"))O.add(T),I=I.replace(/\/\/ \[!code error\]/,"").trimEnd();if(I.includes("// [!code warning]"))B.add(T),I=I.replace(/\/\/ \[!code warning\]/,"").trimEnd();return I}),R=N.size>0,M=A.join(`
|
|
8734
|
-
`),D=y.markdown?.syntaxHighlightTheme||"github-light",zQ=(await EQ(M,_,D)).split(`
|
|
8735
|
-
`).map((k,T)=>{let I=T+1,u=V.includes(I),r=N.has(T),_Q=Z.diffs&&j.has(T),GQ=Z.diffs&&U.has(T),i=Z.errorWarningMarkers&&O.has(T),g=Z.errorWarningMarkers&&B.has(T),P=["line"];if(u)P.push("highlighted");if(r)P.push("focused");if(R&&!r)P.push("dimmed");if(_Q)P.push("diff-add");if(GQ)P.push("diff-remove");if(i)P.push("has-error");if(g)P.push("has-warning");if(k.startsWith('<span class="line">')){let o=P.join(" "),S=k.replace('<span class="line">',`<span class="${o}">`);if(K)return`<span class="${P.join(" ")}"><span class="line-number">${I}</span>${S.replace(/^<span class="[^"]*">/,"").replace(/<\/span>$/,"")}</span>`;return S}let p=P.length>0?` class="${P.join(" ")}"`:"";if(K)return`<span${p}><span class="line-number">${I}</span>${k}</span>`;return`<span${p}>${k}</span>`}).join(`
|
|
8736
|
-
`),C=[];if(K)C.push("line-numbers-mode");if(R)C.push("has-focused-lines");let VQ=C.length>0?` class="${C.join(" ")}"`:"",KQ=_?` data-lang="${_}"`:"";return{html:`<pre${VQ}${KQ}><code class="language-${_}">${zQ}</code></pre>`,endIndex:E}}function z1(Q){let $=new Map;return{content:Q.replace(/^(#{1,6})\s+(.*?)\s*\{#([\w-]+)\}\s*$/gm,(Y,J,X,q)=>{let W=X.trim().replace(/`([^`]+)`/g,"$1").replace(/\*\*(.+?)\*\*/g,"$1").replace(/__(.+?)__/g,"$1").replace(/\*(.+?)\*/g,"$1").replace(/_(.+?)_/g,"$1").replace(/~~(.+?)~~/g,"$1").trim();return $.set(W,q),`${J} ${X.trim()}`}),customAnchors:$}}async function V1(Q,$,Z){let Y=Q.split(`
|
|
8737
|
-
`),J=[],X=0,q=0;while(X<Y.length){let W=Y[X];if(W.match(/^`{3,}/)){let{html:z,endIndex:_}=await W1(Y,X,Z),V=`<!--BUNPRESS_CODE_${q++}-->`;$.set(V,z),J.push(""),J.push(V),J.push(""),X=_+1}else J.push(W),X++}return J.join(`
|
|
8738
|
-
`)}function K1(Q){return Q=Q.replace(/==(.+?)==/g,"<mark>$1</mark>"),Q=Q.replace(/\^(.+?)\^/g,"<sup>$1</sup>"),Q=Q.replace(/(?<!~)~(?!~)(.+?)(?<!~)~(?!~)/g,"<sub>$1</sub>"),Q}function _1(Q,$=!0,Z=!0,Y=!0){if(Z||$){let J=`${Z?`<div class="table-responsive">
|
|
8739
|
-
`:""}<table${$?' class="enhanced-table"':""}>`;Q=Q.replace(/<table>/g,J),Q=Q.replace(/<\/table>/g,Z?`</table>
|
|
8740
|
-
</div>`:"</table>")}if(Y)Q=Q.replace(/<(th|td) align="(left|center|right)">/g,(J,X,q)=>{return`<${X} style="text-align: ${q}">`}),Q=Q.replace(/<(th|td)>/g,(J,X)=>{return`<${X} style="text-align: left">`});return Q}function G1(Q,$){let Z=new Set;return Q.replace(/<h([1-6])([^>]*)>([\s\S]*?)<\/h\1>/g,(Y,J,X,q)=>{if(X.includes(" id="))return Y;let W=q.replace(/<[^>]+>/g,"").trim(),z=$.get(W);if(!z)z=wQ(W);if(Z.has(z)){let _=1;while(Z.has(`${z}-${_}`))_++;z=`${z}-${_}`}return Z.add(z),`<h${J} id="${z}"${X}>${q}</h${J}>`})}async function j1(Q,$="./docs"){let{frontmatter:Z,content:Y}=c0(Q);if(Z.layout==="home"){let X=await l0(Z.hero),q=await i0(Z.features),W=Y.trim()?await FZ(Y,Z,$):"",z=W?`<div class="BPHome-content"><div class="bp-doc vp-doc container">${W}</div></div>`:"";return{html:X+q+z,frontmatter:Z}}return{html:await FZ(Y,Z,$),frontmatter:Z}}async function FZ(Q,$,Z){let Y=y.markdown?.features,J=(O)=>{if(!Y)return!0;let B=Y[O];return B===void 0||B===!0||typeof B==="object"&&B!==null},X=(O,B)=>{if(!J(O))return!1;let A=Y?.[O];if(typeof A!=="object"||A===null)return!0;return A[B]!==!1},q=J("includes")?await xZ(Q,Z):Q,W={...$,data:await mQ(Z,y.dataDir),site:{title:y.title||y.markdown?.title||"",description:y.description||y.markdown?.meta?.description||"",themeConfig:y.themeConfig}},z=y.componentsDir?qQ(s.cwd(),y.componentsDir):qQ(Z,".components");q=await MQ(q,z,W);let _=q.replace(/```[\s\S]*?```/g,"");if(_.includes("@if")||_.includes("@foreach")||_.includes("@for (")||_.includes("<script server")||_.includes("@include")||/\{\{(?!\{)\s*\w/.test(_))try{let O=await import("@stacksjs/stx/render"),B=[],A=q.replace(/```[\s\S]*?```/g,(R)=>{return B.push(R),`\x00BPSTXCODE${B.length-1}\x00`}).replace(/`[^`\n]*`/g,(R)=>{return B.push(R),`\x00BPSTXCODE${B.length-1}\x00`});q=await O.renderString(A,W,{injectCSS:!1,templateOnly:!0}),q=q.replace(/\u0000BPSTXCODE(\d+)\u0000/g,(R,M)=>B[Number(M)]??"")}catch(O){let B=O instanceof Error?O.message:String(O);throw Error(`Failed to render BunPress stx syntax: ${B}`,{cause:O})}let{content:K,tocHtml:G}=J("inlineToc")?Q1(q,$.toc):{content:q,tocHtml:""};q=J("codeImports")?await J1(K,Z):K,q=J("codeGroups")?await Y1(q):q,q=J("githubAlerts")?await $1(q):q,q=J("containers")?await X1(q):q,q=J("emoji")?o0(q):q,q=J("badges")?a0(q):q;let{content:E,customAnchors:N}=J("customAnchors")?z1(q):{content:q,customAnchors:new Map};q=E;let j=new Map;q=J("codeBlocks")?await V1(q,j,{lineHighlighting:X("codeBlocks","lineHighlighting"),lineNumbers:X("codeBlocks","lineNumbers"),diffs:X("codeBlocks","diffs"),errorWarningMarkers:X("codeBlocks","errorWarningMarkers")}):q;let U=Bun.markdown.html(q,{tables:!0,strikethrough:!0,tasklists:!0,autolinks:!0,...y.markdown?.parserOptions??{}});for(let[O,B]of j)U=U.replace(`<p>${O}</p>`,B),U=U.replace(O,B);if(J("inlineFormatting"))U=K1(U);if(J("tables"))U=_1(U,X("tables","enhancedStyling"),X("tables","responsive"),X("tables","alignment"));if(U=G1(U,N),G)U=Z1(U,G);if(J("externalLinks")){if(X("externalLinks","autoTarget")||X("externalLinks","autoRel"))U=n0(U,X("externalLinks","autoTarget"),X("externalLinks","autoRel"));if(X("externalLinks","showIcon"))U=t0(U)}if(J("imageLazyLoading"))U=e0(U);return U}async function U1(Q={}){let $=Q.config||y,Z=Q.port??3000,Y=Q.root||"./docs",J=await xQ(vQ($),$),X=Bun.serve({port:Z,async fetch(z){let _=new URL(z.url),V=S0($,_.pathname);if(V==="/")V="/index";else if(V.length>1&&V.endsWith("/"))V=V.replace(/\/+$/,"");if(V===XQ.replace(/\.json$/,"")||_.pathname.endsWith(XQ)){let j=await kZ(Y,$);return new Response(JSON.stringify(j),{headers:{"Content-Type":"application/json","Cache-Control":"no-store"}})}if([".png",".jpg",".jpeg",".gif",".svg",".css",".js",".ico",".woff",".woff2",".ttf"].some((j)=>V.endsWith(j)))try{let j=`${Y}/public${V}`,U=Bun.file(j);if(await U.exists())return new Response(U);let O=`${Y}${V}`,B=Bun.file(O);if(await B.exists())return new Response(B)}catch{}let{locale:G,path:E}=IZ(J,V),N=DZ(J,Y,G,E);for(let j of N)try{let U=Bun.file(j);if(await U.exists()){let O=await U.text(),{html:B,frontmatter:A}=await j1(O,Y),R=A.layout||"doc",M=await MZ(B,$,E,R,A,{i18n:J,locale:G,sourceFile:j,docsDir:Y});return new Response(M,{headers:{"Content-Type":"text/html; charset=utf-8"}})}}catch{}return new Response(await MZ("<h1>404 - Page Not Found</h1><p>The page you are looking for does not exist.</p>",$,V),{status:404,headers:{"Content-Type":"text/html; charset=utf-8"}})}}),q=`http://localhost:${X.port}`,W=()=>X.stop();if(!Q.quiet)console.log(`
|
|
9605
|
+
${Y.slice($.index+X.length)}`}return Y}function O0(J){let Z=J.match(/^(\w+)/),Q=Z?Z[1]:"",Y=J.match(/\{([^}]+)\}/),$=[];if(Y){let q=Y[1].split(",");for(let W of q){let K=W.trim();if(K.includes("-")){let[_,z]=K.split("-").map(Number);for(let V=_;V<=z;V++)$.push(V)}else $.push(Number(K))}}let X=J.includes(":line-numbers");return{lang:Q,highlights:$,showLineNumbers:X}}async function B0(J,Z,Q){let Y=J[Z],$=Y.match(/^(`{3,})/),X=$?$[1].length:3,q="`".repeat(X),W=Y.substring(X).trim(),K=O0(W),_=K.lang,z=Q.lineHighlighting?K.highlights:[],V=Q.lineNumbers?K.showLineNumbers:!1,G=[],N=Z+1;while(N<J.length){let S=J[N];if(S.match(new RegExp(`^\`{${X},}\\s*$`)))break;G.push(S),N++}let B=new Set,j=new Set,O=new Set,U=new Set,E=new Set,w=G.map((S,L)=>{let D=S;if(D.includes("// [!code focus]"))B.add(L),D=D.replace(/\/\/ \[!code focus\]/,"").trimEnd();if(D.includes("// [!code ++]"))j.add(L),D=D.replace(/\/\/ \[!code \+\+\]/,"").trimEnd();if(D.includes("// [!code --]"))O.add(L),D=D.replace(/\/\/ \[!code --\]/,"").trimEnd();if(D.includes("// [!code error]"))U.add(L),D=D.replace(/\/\/ \[!code error\]/,"").trimEnd();if(D.includes("// [!code warning]"))E.add(L),D=D.replace(/\/\/ \[!code warning\]/,"").trimEnd();return D}),M=B.size>0,F=w.join(`
|
|
9606
|
+
`),A=H.markdown?.syntaxHighlightTheme||"github-light",KJ=(await ZJ(F,_,A)).split(`
|
|
9607
|
+
`).map((S,L)=>{let D=L+1,u=z.includes(D),i=B.has(L),GJ=Q.diffs&&j.has(L),jJ=Q.diffs&&O.has(L),o=Q.errorWarningMarkers&&U.has(L),g=Q.errorWarningMarkers&&E.has(L),P=["line"];if(u)P.push("highlighted");if(i)P.push("focused");if(M&&!i)P.push("dimmed");if(GJ)P.push("diff-add");if(jJ)P.push("diff-remove");if(o)P.push("has-error");if(g)P.push("has-warning");if(S.startsWith('<span class="line">')){let a=P.join(" "),k=S.replace('<span class="line">',`<span class="${a}">`);if(V)return`<span class="${P.join(" ")}"><span class="line-number">${D}</span>${k.replace(/^<span class="[^"]*">/,"").replace(/<\/span>$/,"")}</span>`;return k}let f=P.length>0?` class="${P.join(" ")}"`:"";if(V)return`<span${f}><span class="line-number">${D}</span>${S}</span>`;return`<span${f}>${S}</span>`}).join(`
|
|
9608
|
+
`),b=[];if(V)b.push("line-numbers-mode");if(M)b.push("has-focused-lines");let VJ=b.length>0?` class="${b.join(" ")}"`:"",_J=_?` data-lang="${_}"`:"";return{html:`<pre${VJ}${_J}><code class="language-${_}">${KJ}</code></pre>`,endIndex:N}}function E0(J){let Z=new Map;return{content:J.replace(/^(#{1,6})\s+(.*?)\s*\{#([\w-]+)\}\s*$/gm,(Y,$,X,q)=>{let W=HQ(X),K=Z.get(W)??[];return K.push(q),Z.set(W,K),`${$} ${X.trim()}`}),customAnchors:Z}}async function N0(J,Z,Q){let Y=J.split(`
|
|
9609
|
+
`),$=[],X=0,q=0;while(X<Y.length){let W=Y[X];if(W.match(/^`{3,}/)){let{html:K,endIndex:_}=await B0(Y,X,Q),z=`<!--BUNPRESS_CODE_${q++}-->`;Z.set(z,K),$.push(""),$.push(z),$.push(""),X=_+1}else $.push(W),X++}return $.join(`
|
|
9610
|
+
`)}function R0(J){return J=J.replace(/==(.+?)==/g,"<mark>$1</mark>"),J=J.replace(/\^(.+?)\^/g,"<sup>$1</sup>"),J=J.replace(/(?<!~)~(?!~)(.+?)(?<!~)~(?!~)/g,"<sub>$1</sub>"),J}function M0(J,Z=!0,Q=!0,Y=!0){if(Q||Z){let $=`${Q?`<div class="table-responsive">
|
|
9611
|
+
`:""}<table${Z?' class="enhanced-table"':""}>`;J=J.replace(/<table>/g,$),J=J.replace(/<\/table>/g,Q?`</table>
|
|
9612
|
+
</div>`:"</table>")}if(Y)J=J.replace(/<(th|td) align="(left|center|right)">/g,($,X,q)=>{return`<${X} style="text-align: ${q}">`}),J=J.replace(/<(th|td)>/g,($,X)=>{return`<${X} style="text-align: left">`});return J}function F0(J,Z){let Q=new Set;return J.replace(/<h([1-6])([^>]*)>([\s\S]*?)<\/h\1>/g,(Y,$,X,q)=>{if(X.includes(" id="))return Y;let W=q.replace(/<[^>]+>/g,"").trim(),_=Z.get(W)?.shift();if(!_)_=yJ(W);return _=SJ(_,Q),`<h${$} id="${_}"${X}>${q}</h${$}>`})}async function w0(J,Z="./docs"){let{frontmatter:Q,content:Y}=tZ(J);if(Q.layout==="home"){let X=await eZ(Q.hero),q=await $0(Q.features),W=Y.trim()?await MQ(Y,Q,Z):"",K=W?`<div class="BPHome-content"><div class="container bp-doc vp-doc">${W}</div></div>`:"";return{html:X+q+K,frontmatter:Q}}return{html:await MQ(Y,Q,Z),frontmatter:Q}}async function MQ(J,Z,Q){let Y=H.markdown?.features,$=(U)=>{if(!Y)return!0;let E=Y[U];return E===void 0||E===!0||typeof E==="object"&&E!==null},X=(U,E)=>{if(!$(U))return!1;let w=Y?.[U];if(typeof w!=="object"||w===null)return!0;return w[E]!==!1},q=$("includes")?await qJ(J,(U)=>mQ(U,Q)):J,W={...Z,data:await gJ(Q,H.dataDir),site:{title:H.title||H.markdown?.title||"",description:H.description||H.markdown?.meta?.description||"",themeConfig:H.themeConfig}},K=H.componentsDir?zJ(s.cwd(),H.componentsDir):zJ(Q,".components");q=await MJ(q,K,W);let _=q.replace(/```[\s\S]*?```/g,"");if(_.includes("@if")||_.includes("@foreach")||_.includes("@for (")||_.includes("<script server")||_.includes("@include")||/\{\{(?!\{)\s*\w/.test(_))try{let U=await import("@stacksjs/stx/render"),E=[],w=q.replace(/```[\s\S]*?```/g,(M)=>{return E.push(M),`\x00BPSTXCODE${E.length-1}\x00`}).replace(/`[^`\n]*`/g,(M)=>{return E.push(M),`\x00BPSTXCODE${E.length-1}\x00`});q=await U.renderString(w,W,{injectCSS:!1,templateOnly:!0}),q=q.replace(/\u0000BPSTXCODE(\d+)\u0000/g,(M,F)=>E[Number(F)]??"")}catch(U){let E=U instanceof Error?U.message:String(U);throw Error(`Failed to render BunPress stx syntax: ${E}`,{cause:U})}let{content:V,tocHtml:G}=$("inlineToc")?K0(q,Z.toc):{content:q,tocHtml:""};q=$("codeImports")?await qJ(V,(U)=>G0(U,Q)):V,q=$("codeGroups")?await j0(q):q,q=await qJ(q,async(U)=>{let E=$("githubAlerts")?await _0(U):U;return E=$("containers")?await U0(E):E,E=$("emoji")?Y0(E):E,E=$("badges")?X0(E):E,E});let{content:N,customAnchors:B}=$("customAnchors")?E0(q):{content:q,customAnchors:new Map};q=N;let j=new Map;q=$("codeBlocks")?await N0(q,j,{lineHighlighting:X("codeBlocks","lineHighlighting"),lineNumbers:X("codeBlocks","lineNumbers"),diffs:X("codeBlocks","diffs"),errorWarningMarkers:X("codeBlocks","errorWarningMarkers")}):q;let O=Bun.markdown.html(q,{tables:!0,strikethrough:!0,tasklists:!0,autolinks:!0,...H.markdown?.parserOptions??{}});for(let[U,E]of j)O=O.replace(`<p>${U}</p>`,E),O=O.replace(U,E);if($("inlineFormatting"))O=R0(O);if($("tables"))O=M0(O,X("tables","enhancedStyling"),X("tables","responsive"),X("tables","alignment"));if(O=F0(O,B),G)O=V0(O,G);if($("externalLinks")){if(X("externalLinks","autoTarget")||X("externalLinks","autoRel"))O=q0(O,X("externalLinks","autoTarget"),X("externalLinks","autoRel"));if(X("externalLinks","showIcon"))O=W0(O)}if($("imageLazyLoading"))O=z0(O);return O}async function I0(J={}){let Z=J.config||H,Q=J.port??3000,Y=J.root||"./docs",$=await HJ(PJ(Z),Z),X=Bun.serve({port:Q,async fetch(K){let _=new URL(K.url),z=gZ(Z,_.pathname);if(z==="/")z="/index";else if(z.length>1&&z.endsWith("/"))z=z.replace(/\/+$/,"");if(z===WJ.replace(/\.json$/,"")||_.pathname.endsWith(WJ)){let j=await CQ(Y,Z);return new Response(JSON.stringify(j),{headers:{"Content-Type":"application/json","Cache-Control":"no-store"}})}if([".png",".jpg",".jpeg",".gif",".svg",".css",".js",".ico",".woff",".woff2",".ttf"].some((j)=>z.endsWith(j)))try{let j=`${Y}/public${z}`,O=Bun.file(j);if(await O.exists())return new Response(O);let U=`${Y}${z}`,E=Bun.file(U);if(await E.exists())return new Response(E)}catch{}let{locale:G,path:N}=wQ($,z),B=DQ($,Y,G,N);for(let j of B)try{let O=Bun.file(j);if(await O.exists()){let U=await O.text(),{html:E,frontmatter:w}=await w0(U,Y),M=w.layout||"doc",F=await NQ(E,Z,N,M,w,{i18n:$,locale:G,sourceFile:j,docsDir:Y});return new Response(F,{headers:{"Content-Type":"text/html; charset=utf-8"}})}}catch{}return new Response(await NQ("<h1>404 - Page Not Found</h1><p>The page you are looking for does not exist.</p>",Z,z),{status:404,headers:{"Content-Type":"text/html; charset=utf-8"}})}}),q=`http://localhost:${X.port}`,W=()=>X.stop();if(!J.quiet)console.log(`
|
|
8741
9613
|
\uD83D\uDCDA BunPress documentation server running at ${q}`),console.log(`Press Ctrl+C to stop
|
|
8742
|
-
`);return{server:X,url:q,stop:W}}async function
|
|
8743
|
-
`);try{let
|
|
8744
|
-
Shutting down server...`)
|
|
8745
|
-
Shutting down server...`)
|
|
8746
|
-
export{
|
|
9614
|
+
`);return{server:X,url:q,stop:W}}async function K1(J={}){let{stop:Z}=await I0(J),Q=J.watch!==void 0?J.watch:!0,Y=J.root||"./docs";if(Q){console.log(`Watching for changes in ${Y} directory...
|
|
9615
|
+
`);try{let $=new Map,X=new OQ("**/*.{md,stx,ts,js,css,html}");for await(let K of X.scan(Y))try{let _=zJ(Y,K),z=await EQ(_);$.set(K,z.mtimeMs)}catch{}let q=null,W=()=>{if(q)clearTimeout(q);q=setTimeout(async()=>{console.log("File changed detected, reloading..."),YQ(),JQ(),hJ(),console.log("Ready for requests")},100)};setInterval(async()=>{try{let K=!1,_=new Set,z=new OQ("**/*.{md,stx,ts,js,css,html}");for await(let V of z.scan(Y)){_.add(V);try{let G=zJ(Y,V),N=await EQ(G),B=$.get(V);if(B===void 0||N.mtimeMs>B)K=!0,$.set(V,N.mtimeMs)}catch{}}for(let V of $.keys())if(!_.has(V))K=!0,$.delete(V);if(K)W()}catch{}},1000)}catch($){console.error("Error setting up file watcher:",$)}}s.on("SIGINT",()=>{console.log(`
|
|
9616
|
+
Shutting down server...`),Z(),s.exit(0)}),s.on("SIGTERM",()=>{console.log(`
|
|
9617
|
+
Shutting down server...`),Z(),s.exit(0)}),await new Promise(()=>{})}
|
|
9618
|
+
export{H0 as a,cJ as b,lJ as c,sJ as d,ZJ as e,y0 as f,rJ as g,S0 as h,k0 as i,hQ as j,gZ as k,NQ as l,w0 as m,I0 as n,K1 as o};
|