@writedocs/generator 0.10.20 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/astro.config.mjs +32 -8
- package/package.json +3 -1
- package/src/cli/astro-output.js +44 -11
- package/src/cli/base-path-layout.js +44 -0
- package/src/cli/build.js +18 -9
- package/src/cli/check-built-styles.js +41 -33
- package/src/cli/dev.js +21 -4
- package/src/cli/run-pagefind.js +154 -148
- package/src/cli/write-mcp-files.js +103 -96
- package/src/cli/write-redirects-file.js +25 -8
- package/src/components/AppIcon.astro +51 -50
- package/src/components/Card.astro +193 -192
- package/src/components/CopyPageMenu.astro +374 -370
- package/src/components/Hint.astro +188 -187
- package/src/components/Icon.astro +72 -71
- package/src/components/Image.astro +3 -2
- package/src/components/Tile.astro +67 -66
- package/src/components/Video.astro +137 -136
- package/src/layout/BaseLayout.astro +21 -12
- package/src/layout/components/AnalyticsScripts.astro +6 -2
- package/src/layout/components/Breadcrumbs.astro +98 -97
- package/src/layout/components/ConsentBanner.astro +119 -118
- package/src/layout/components/MobileMenu.astro +229 -228
- package/src/layout/components/NavTree.astro +393 -392
- package/src/layout/components/Sidebar.astro +232 -231
- package/src/layout/components/SiteFooter.astro +87 -86
- package/src/layout/components/TopBar.astro +386 -385
- package/src/lib/agent-markdown.js +164 -162
- package/src/lib/asset-dimensions.js +89 -89
- package/src/lib/base-path.js +90 -0
- package/src/lib/config-schema.js +10 -0
- package/src/lib/config-schema.ts +17 -0
- package/src/lib/config.ts +1314 -1289
- package/src/lib/consent.js +108 -102
- package/src/lib/json-schema-descriptions.js +1 -0
- package/src/lib/link-check.js +7 -2
- package/src/lib/llms-index.ts +90 -88
- package/src/lib/mcp-dev-integration.js +65 -60
- package/src/lib/mcp-index.ts +102 -101
- package/src/lib/project-files-integration.js +2 -2
- package/src/lib/rehype-base-path.js +62 -0
- package/src/lib/robots-txt.js +21 -16
- package/src/lib/seo-tags.js +155 -140
- package/src/lib/site-base.ts +27 -0
- package/src/lib/styles-asset-integration.js +23 -10
- package/src/lib/wdignore-cases.json +195 -195
- package/src/lib/wdignore.js +177 -177
- package/src/pages/404.astro +63 -62
- package/src/pages/[...slug].astro +1604 -1597
- package/src/pages/[...slug].md.ts +93 -93
- package/src/pages/llms-full.txt.ts +88 -86
- package/src/scripts/search.ts +245 -237
- package/writedocs.schema.json +6 -0
|
@@ -1,392 +1,393 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { navTreeContainsSlug, isExternalHref, type NavTreeNode } from "../../lib/config";
|
|
3
|
-
import AppIcon from "../../components/AppIcon.astro";
|
|
4
|
-
import { methodClass } from "../../lib/openapi-render";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
{node.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
//
|
|
38
|
-
//
|
|
39
|
-
//
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
{
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
stroke
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
stroke-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
//
|
|
70
|
-
//
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
//
|
|
89
|
-
//
|
|
90
|
-
//
|
|
91
|
-
//
|
|
92
|
-
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
stroke
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
stroke-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
.wd-nav-list li
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
.wd-nav-list li summary:hover
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
.wd-nav-list li
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
.wd-nav-depth-0 >
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
font-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
title
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
font-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
.wd-nav-group .wd-nav-section-title a
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
.wd-nav-depth-
|
|
199
|
-
.wd-nav-depth-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
.wd-nav-depth-
|
|
206
|
-
|
|
207
|
-
margin-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
hover
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
:global(
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
font-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
font-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
the
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
.wd-nav-collapsible summary
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
1
|
+
---
|
|
2
|
+
import { navTreeContainsSlug, isExternalHref, type NavTreeNode } from "../../lib/config";
|
|
3
|
+
import AppIcon from "../../components/AppIcon.astro";
|
|
4
|
+
import { methodClass } from "../../lib/openapi-render";
|
|
5
|
+
import { siteHref } from '../../lib/site-base';
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
nodes: NavTreeNode[];
|
|
9
|
+
hrefForSlug: (slug: string) => string;
|
|
10
|
+
currentSlug: string;
|
|
11
|
+
depth?: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const { nodes, hrefForSlug, currentSlug, depth = 0 } = Astro.props as Props;
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
<ul class={`wd-nav-list wd-nav-depth-${depth}`}>
|
|
18
|
+
{
|
|
19
|
+
nodes.map((node) => {
|
|
20
|
+
if (node.kind === "page") {
|
|
21
|
+
return (
|
|
22
|
+
<li>
|
|
23
|
+
<a href={siteHref(hrefForSlug(node.slug))} class={node.slug === currentSlug ? "active" : ""}>
|
|
24
|
+
{node.method && (
|
|
25
|
+
<span class={`wd-nav-method wd-nav-method-${methodClass(node.method)}`}>{node.method}</span>
|
|
26
|
+
)}
|
|
27
|
+
{node.icon && <AppIcon icon={node.icon} class="wd-nav-page-icon" />}
|
|
28
|
+
<span class="wd-nav-title">{node.title}</span>
|
|
29
|
+
{node.deprecated && <span class="wd-nav-tag wd-nav-tag-deprecated">Deprecated</span>}
|
|
30
|
+
{node.tag && <span class="wd-nav-tag">{node.tag}</span>}
|
|
31
|
+
</a>
|
|
32
|
+
</li>
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (node.kind === "link") {
|
|
37
|
+
// A bare external link sitting directly in the page tree (see
|
|
38
|
+
// NavItem's `{ label, href }` leaf in lib/config.ts) - styled like
|
|
39
|
+
// a page row, but never "active" (it's not a content page) and
|
|
40
|
+
// always opens in a new tab since it's meant to point off-site.
|
|
41
|
+
const external = isExternalHref(node.href);
|
|
42
|
+
return (
|
|
43
|
+
<li>
|
|
44
|
+
<a
|
|
45
|
+
href={siteHref(node.href)}
|
|
46
|
+
class="wd-nav-link-leaf"
|
|
47
|
+
target={external ? "_blank" : undefined}
|
|
48
|
+
rel={external ? "noopener noreferrer" : undefined}
|
|
49
|
+
>
|
|
50
|
+
<span>{node.label}</span>
|
|
51
|
+
{external && (
|
|
52
|
+
<svg class="wd-nav-external-icon" width="10" height="10" viewBox="0 0 10 10" aria-hidden="true">
|
|
53
|
+
<path
|
|
54
|
+
d="M3 1.5H8.5V7M8.5 1.5L1.5 8.5"
|
|
55
|
+
stroke="currentColor"
|
|
56
|
+
stroke-width="1.2"
|
|
57
|
+
fill="none"
|
|
58
|
+
stroke-linecap="round"
|
|
59
|
+
stroke-linejoin="round"
|
|
60
|
+
/>
|
|
61
|
+
</svg>
|
|
62
|
+
)}
|
|
63
|
+
</a>
|
|
64
|
+
</li>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (depth === 0) {
|
|
69
|
+
// Top-level group = a static sidebar section title, never a
|
|
70
|
+
// disclosure control - matches the reference design where the first
|
|
71
|
+
// group level is just a bold label above its pages.
|
|
72
|
+
return (
|
|
73
|
+
<li class="wd-nav-group">
|
|
74
|
+
<div class="wd-nav-section-title">
|
|
75
|
+
{node.pageSlug ? (
|
|
76
|
+
<a href={siteHref(hrefForSlug(node.pageSlug))} class={node.pageSlug === currentSlug ? "active" : ""}>
|
|
77
|
+
{node.label}
|
|
78
|
+
</a>
|
|
79
|
+
) : (
|
|
80
|
+
node.label
|
|
81
|
+
)}
|
|
82
|
+
</div>
|
|
83
|
+
<Astro.self nodes={node.children} hrefForSlug={hrefForSlug} currentSlug={currentSlug} depth={depth + 1} />
|
|
84
|
+
</li>
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Depth >= 1: a nested group renders as a collapsible row, styled and
|
|
89
|
+
// inset exactly like a sibling page link, with a chevron on the
|
|
90
|
+
// right. Defaults open whenever the active page lives anywhere inside
|
|
91
|
+
// it (itself or a descendant), so landing on a child page never
|
|
92
|
+
// leaves its own parent collapsed.
|
|
93
|
+
const isActive = node.pageSlug === currentSlug;
|
|
94
|
+
const open = isActive || navTreeContainsSlug(node.children, currentSlug);
|
|
95
|
+
return (
|
|
96
|
+
<li class="wd-nav-collapsible">
|
|
97
|
+
<details open={open}>
|
|
98
|
+
<summary class={isActive ? "active" : ""}>
|
|
99
|
+
{node.pageSlug ? (
|
|
100
|
+
<a href={siteHref(hrefForSlug(node.pageSlug))} class={isActive ? "active" : ""}>
|
|
101
|
+
{node.label}
|
|
102
|
+
</a>
|
|
103
|
+
) : (
|
|
104
|
+
<span class="wd-nav-group-label">{node.label}</span>
|
|
105
|
+
)}
|
|
106
|
+
<svg class="wd-nav-chevron" width="10" height="10" viewBox="0 0 10 10" aria-hidden="true">
|
|
107
|
+
<path
|
|
108
|
+
d="M3.5 2L6.5 5L3.5 8"
|
|
109
|
+
stroke="currentColor"
|
|
110
|
+
stroke-width="1.4"
|
|
111
|
+
fill="none"
|
|
112
|
+
stroke-linecap="round"
|
|
113
|
+
stroke-linejoin="round"
|
|
114
|
+
/>
|
|
115
|
+
</svg>
|
|
116
|
+
</summary>
|
|
117
|
+
<Astro.self nodes={node.children} hrefForSlug={hrefForSlug} currentSlug={currentSlug} depth={depth + 1} />
|
|
118
|
+
</details>
|
|
119
|
+
</li>
|
|
120
|
+
);
|
|
121
|
+
})
|
|
122
|
+
}
|
|
123
|
+
</ul>
|
|
124
|
+
|
|
125
|
+
<style>
|
|
126
|
+
.wd-nav-list {
|
|
127
|
+
list-style: none;
|
|
128
|
+
margin: 0;
|
|
129
|
+
padding: 0;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.wd-nav-list li a,
|
|
133
|
+
.wd-nav-list li summary {
|
|
134
|
+
border-left: 1px solid transparent;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.wd-nav-list li a:not(summary a):hover,
|
|
138
|
+
.wd-nav-list li summary:hover {
|
|
139
|
+
border-left: 1px solid var(--wd-primary);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.wd-nav-list li a.active:not(summary a),
|
|
143
|
+
.wd-nav-list li summary.active {
|
|
144
|
+
border-left: 1px solid var(--wd-primary);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.wd-nav-depth-0 {
|
|
148
|
+
margin-bottom: 1.25rem;
|
|
149
|
+
}
|
|
150
|
+
/* Space between a top-level group and whatever sits next to it - another
|
|
151
|
+
group, or a page outside any group - so each group reads as its own
|
|
152
|
+
block. */
|
|
153
|
+
.wd-nav-depth-0 > .wd-nav-group + li,
|
|
154
|
+
.wd-nav-depth-0 > li + .wd-nav-group {
|
|
155
|
+
margin-top: 2rem;
|
|
156
|
+
}
|
|
157
|
+
.wd-nav-section-title {
|
|
158
|
+
padding: 0;
|
|
159
|
+
margin-bottom: 0.4rem;
|
|
160
|
+
color: var(--wd-nav-title);
|
|
161
|
+
font-size: 0.75rem;
|
|
162
|
+
font-weight: 600;
|
|
163
|
+
text-transform: uppercase;
|
|
164
|
+
letter-spacing: 0.04em;
|
|
165
|
+
}
|
|
166
|
+
/* Overrides `.wd-nav-list a`'s own block/padding/font-size/pill-when-
|
|
167
|
+
active styling further below - without this, a group-with-a-page's
|
|
168
|
+
title (e.g. "Concepts" linking to its own overview page) inherits
|
|
169
|
+
the same big rounded background pill a regular page row gets when
|
|
170
|
+
active, which looks completely out of place sitting next to a
|
|
171
|
+
plain-text sibling title like "Getting Started". A linked section
|
|
172
|
+
title should still read as a section title - same size/weight/
|
|
173
|
+
case/color as an unlinked one - just tinted primary on hover/active
|
|
174
|
+
instead. The extra `.wd-nav-group` ancestor qualifier (2 classes)
|
|
175
|
+
is load-bearing, not decoration: `.wd-nav-section-title a` alone
|
|
176
|
+
has the exact same specificity as `.wd-nav-list a` (1 class + 1
|
|
177
|
+
type each), so whichever rule happens to sit later in the
|
|
178
|
+
stylesheet would silently win regardless of intent - this avoids
|
|
179
|
+
that tie entirely. Mirrors the same "override to neutral, re-apply
|
|
180
|
+
only color" pattern already used for .wd-nav-collapsible summary a
|
|
181
|
+
below (which sidesteps the same tie via a `summary` type selector
|
|
182
|
+
instead). */
|
|
183
|
+
.wd-nav-group .wd-nav-section-title a {
|
|
184
|
+
display: inline;
|
|
185
|
+
padding: 0;
|
|
186
|
+
border-radius: 0;
|
|
187
|
+
background: none;
|
|
188
|
+
color: inherit;
|
|
189
|
+
font-size: inherit;
|
|
190
|
+
font-weight: inherit;
|
|
191
|
+
text-decoration: none;
|
|
192
|
+
}
|
|
193
|
+
.wd-nav-group .wd-nav-section-title a.active,
|
|
194
|
+
.wd-nav-group .wd-nav-section-title a:hover {
|
|
195
|
+
background: none;
|
|
196
|
+
color: var(--wd-primary);
|
|
197
|
+
}
|
|
198
|
+
.wd-nav-depth-1,
|
|
199
|
+
.wd-nav-depth-2,
|
|
200
|
+
.wd-nav-depth-3 {
|
|
201
|
+
margin-bottom: 0.5rem;
|
|
202
|
+
border-left: 1px solid var(--wd-border);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.wd-nav-depth-2,
|
|
206
|
+
.wd-nav-depth-3 {
|
|
207
|
+
margin-bottom: 0.5rem;
|
|
208
|
+
margin-left: 0.75rem;
|
|
209
|
+
border-left: 1px solid var(--wd-border);
|
|
210
|
+
}
|
|
211
|
+
.wd-nav-list a {
|
|
212
|
+
display: flex;
|
|
213
|
+
align-items: center;
|
|
214
|
+
gap: 0.45rem;
|
|
215
|
+
padding: 0.2rem 0.75rem;
|
|
216
|
+
margin: 0.1rem 0;
|
|
217
|
+
border-radius: 0 0.4rem 0.4rem 0;
|
|
218
|
+
text-decoration: none;
|
|
219
|
+
color: var(--wd-nav-text);
|
|
220
|
+
font-size: 0.9rem;
|
|
221
|
+
}
|
|
222
|
+
/* Primary-tinted rather than a neutral surface gray - a faint preview
|
|
223
|
+
of the active pill's own color (12% alpha), at half its strength, so
|
|
224
|
+
hover reads as "this could become active" instead of a generic
|
|
225
|
+
hover state shared with every other clickable thing on the page. */
|
|
226
|
+
.wd-nav-list a:hover {
|
|
227
|
+
background: color-mix(in srgb, var(--wd-primary) 6%, transparent);
|
|
228
|
+
color: var(--wd-nav-title);
|
|
229
|
+
}
|
|
230
|
+
.wd-nav-list a.active {
|
|
231
|
+
background: color-mix(in srgb, var(--wd-primary) 12%, transparent);
|
|
232
|
+
color: var(--wd-primary);
|
|
233
|
+
font-weight: 500;
|
|
234
|
+
}
|
|
235
|
+
.wd-nav-title {
|
|
236
|
+
flex: 1;
|
|
237
|
+
min-width: 0;
|
|
238
|
+
overflow: hidden;
|
|
239
|
+
/* text-overflow: ellipsis;
|
|
240
|
+
white-space: nowrap; */
|
|
241
|
+
}
|
|
242
|
+
/* A page's own frontmatter `icon` (Mintlify's) - :global() because
|
|
243
|
+
AppIcon.astro renders the svg/span, not this component. */
|
|
244
|
+
:global(svg.wd-nav-page-icon),
|
|
245
|
+
:global(span.wd-nav-page-icon) {
|
|
246
|
+
flex-shrink: 0;
|
|
247
|
+
width: 1em;
|
|
248
|
+
height: 1em;
|
|
249
|
+
}
|
|
250
|
+
:global(span.wd-nav-page-icon) {
|
|
251
|
+
display: flex;
|
|
252
|
+
align-items: center;
|
|
253
|
+
justify-content: center;
|
|
254
|
+
}
|
|
255
|
+
/* Frontmatter `tag` / `deprecated` - a small pill after the title, same
|
|
256
|
+
shape as the method badge. */
|
|
257
|
+
.wd-nav-tag {
|
|
258
|
+
flex-shrink: 0;
|
|
259
|
+
padding: 0.05rem 0.4rem;
|
|
260
|
+
border-radius: 999px;
|
|
261
|
+
font-size: 0.62rem;
|
|
262
|
+
font-weight: 700;
|
|
263
|
+
line-height: 1.5;
|
|
264
|
+
letter-spacing: 0.02em;
|
|
265
|
+
color: var(--wd-primary);
|
|
266
|
+
background: color-mix(in srgb, var(--wd-primary) 12%, transparent);
|
|
267
|
+
}
|
|
268
|
+
.wd-nav-tag-deprecated {
|
|
269
|
+
color: #d97706;
|
|
270
|
+
background: color-mix(in srgb, #d97706 15%, transparent);
|
|
271
|
+
}
|
|
272
|
+
.wd-nav-method {
|
|
273
|
+
flex-shrink: 0;
|
|
274
|
+
display: inline-block;
|
|
275
|
+
padding: 0.05rem 0.4rem;
|
|
276
|
+
border-radius: 0.3rem;
|
|
277
|
+
font-size: 0.62rem;
|
|
278
|
+
font-weight: 700;
|
|
279
|
+
letter-spacing: 0.02em;
|
|
280
|
+
line-height: 1.5;
|
|
281
|
+
}
|
|
282
|
+
.wd-nav-method-get {
|
|
283
|
+
background: color-mix(in srgb, #16a34a 15%, transparent);
|
|
284
|
+
color: #16a34a;
|
|
285
|
+
}
|
|
286
|
+
.wd-nav-method-post {
|
|
287
|
+
background: color-mix(in srgb, #2563eb 15%, transparent);
|
|
288
|
+
color: #2563eb;
|
|
289
|
+
}
|
|
290
|
+
.wd-nav-method-put {
|
|
291
|
+
background: color-mix(in srgb, #9333ea 15%, transparent);
|
|
292
|
+
color: #9333ea;
|
|
293
|
+
}
|
|
294
|
+
.wd-nav-method-patch {
|
|
295
|
+
background: color-mix(in srgb, #d97706 15%, transparent);
|
|
296
|
+
color: #d97706;
|
|
297
|
+
}
|
|
298
|
+
.wd-nav-method-delete {
|
|
299
|
+
background: color-mix(in srgb, #dc2626 15%, transparent);
|
|
300
|
+
color: #dc2626;
|
|
301
|
+
}
|
|
302
|
+
.wd-nav-method-other {
|
|
303
|
+
background: var(--wd-surface);
|
|
304
|
+
color: var(--wd-text-muted);
|
|
305
|
+
}
|
|
306
|
+
.wd-nav-link-leaf {
|
|
307
|
+
display: flex !important;
|
|
308
|
+
align-items: center;
|
|
309
|
+
justify-content: space-between;
|
|
310
|
+
gap: 0.5rem;
|
|
311
|
+
}
|
|
312
|
+
.wd-nav-external-icon {
|
|
313
|
+
flex-shrink: 0;
|
|
314
|
+
color: var(--wd-text-muted);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/* Depth >= 1 group: a collapsible row that looks like a page link. */
|
|
318
|
+
.wd-nav-collapsible details {
|
|
319
|
+
margin: 0;
|
|
320
|
+
}
|
|
321
|
+
.wd-nav-collapsible summary {
|
|
322
|
+
display: flex;
|
|
323
|
+
align-items: center;
|
|
324
|
+
justify-content: space-between;
|
|
325
|
+
gap: 0.5rem;
|
|
326
|
+
padding: 0.2rem 0.75rem;
|
|
327
|
+
margin: 0.1rem 0;
|
|
328
|
+
border-radius: 0 0.4rem 0.4rem 0;
|
|
329
|
+
cursor: pointer;
|
|
330
|
+
color: var(--wd-nav-text);
|
|
331
|
+
font-size: 0.9rem;
|
|
332
|
+
list-style: none;
|
|
333
|
+
}
|
|
334
|
+
.wd-nav-collapsible summary::-webkit-details-marker {
|
|
335
|
+
display: none;
|
|
336
|
+
}
|
|
337
|
+
.wd-nav-collapsible summary::marker {
|
|
338
|
+
content: "";
|
|
339
|
+
}
|
|
340
|
+
/* Same primary-tinted hover as a plain page link above. */
|
|
341
|
+
.wd-nav-collapsible summary:hover {
|
|
342
|
+
background: color-mix(in srgb, var(--wd-primary) 6%, transparent);
|
|
343
|
+
color: var(--wd-nav-title);
|
|
344
|
+
}
|
|
345
|
+
/* When the group's own attached page is the current page, the pill
|
|
346
|
+
background lives on <summary> itself (not the inner <a> below,
|
|
347
|
+
which is deliberately stripped of its own background/padding so the
|
|
348
|
+
chevron can share the row) - otherwise only the label text would be
|
|
349
|
+
highlighted, leaving the chevron sitting outside the pill. This is
|
|
350
|
+
the same background/radius a plain `.wd-nav-list a.active` pill
|
|
351
|
+
uses, so an active group header looks identical to an active leaf
|
|
352
|
+
page row instead of falling back to text-only bold+color. */
|
|
353
|
+
.wd-nav-collapsible summary.active {
|
|
354
|
+
background: color-mix(in srgb, var(--wd-primary) 12%, transparent);
|
|
355
|
+
border-left: 1px solid var(--wd-primary);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.wd-nav-collapsible summary.active > a {
|
|
359
|
+
border-left: none;
|
|
360
|
+
}
|
|
361
|
+
/* Overrides `.wd-nav-list a`'s own block/padding - the row's padding is
|
|
362
|
+
owned by <summary> now, the label inside is just flex content. Wins
|
|
363
|
+
on specificity (class + 2 tags vs class + 1 tag) regardless of
|
|
364
|
+
source order. */
|
|
365
|
+
.wd-nav-collapsible summary a,
|
|
366
|
+
.wd-nav-collapsible summary .wd-nav-group-label {
|
|
367
|
+
display: block;
|
|
368
|
+
padding: 0;
|
|
369
|
+
border-radius: 0;
|
|
370
|
+
background: none;
|
|
371
|
+
color: inherit;
|
|
372
|
+
font-weight: inherit;
|
|
373
|
+
flex: 1;
|
|
374
|
+
min-width: 0;
|
|
375
|
+
}
|
|
376
|
+
.wd-nav-collapsible summary a:hover {
|
|
377
|
+
background: none;
|
|
378
|
+
color: var(--wd-nav-title);
|
|
379
|
+
}
|
|
380
|
+
.wd-nav-collapsible summary a.active {
|
|
381
|
+
background: none;
|
|
382
|
+
color: var(--wd-primary);
|
|
383
|
+
font-weight: 500;
|
|
384
|
+
}
|
|
385
|
+
.wd-nav-chevron {
|
|
386
|
+
flex-shrink: 0;
|
|
387
|
+
color: var(--wd-text-muted);
|
|
388
|
+
transition: transform 0.15s ease;
|
|
389
|
+
}
|
|
390
|
+
.wd-nav-collapsible details[open] > summary .wd-nav-chevron {
|
|
391
|
+
transform: rotate(90deg);
|
|
392
|
+
}
|
|
393
|
+
</style>
|