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