@vercel/geistdocs 1.12.0 → 1.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.
Files changed (103) hide show
  1. package/dist/cli/index.js +1 -1
  2. package/dist/config.d.ts +5 -0
  3. package/dist/config.d.ts.map +1 -1
  4. package/dist/config.js +35 -0
  5. package/dist/controls.d.ts.map +1 -1
  6. package/dist/controls.js +7 -5
  7. package/dist/footer.d.ts +1 -1
  8. package/dist/footer.d.ts.map +1 -1
  9. package/dist/footer.js +1 -1
  10. package/dist/home-layout.d.ts.map +1 -1
  11. package/dist/home-layout.js +2 -7
  12. package/dist/internal/chat/shell.d.ts.map +1 -1
  13. package/dist/internal/chat/shell.js +2 -1
  14. package/dist/internal/footer/rss-button.d.ts +3 -1
  15. package/dist/internal/footer/rss-button.d.ts.map +1 -1
  16. package/dist/internal/footer/rss-button.js +2 -1
  17. package/dist/internal/localized-link.d.ts.map +1 -1
  18. package/dist/internal/localized-link.js +9 -4
  19. package/dist/internal/page-actions-client.d.ts +1 -0
  20. package/dist/internal/page-actions-client.d.ts.map +1 -1
  21. package/dist/internal/page-actions-client.js +2 -4
  22. package/dist/internal/provider-client.d.ts.map +1 -1
  23. package/dist/internal/provider-client.js +1 -1
  24. package/dist/internal/search.d.ts.map +1 -1
  25. package/dist/internal/search.js +2 -1
  26. package/dist/internal/sidebar-responsive.d.ts +3 -0
  27. package/dist/internal/sidebar-responsive.d.ts.map +1 -0
  28. package/dist/internal/sidebar-responsive.js +10 -0
  29. package/dist/internal/sidebar-tree.d.ts +23 -0
  30. package/dist/internal/sidebar-tree.d.ts.map +1 -0
  31. package/dist/internal/sidebar-tree.js +115 -0
  32. package/dist/internal/sidebar.d.ts +2 -5
  33. package/dist/internal/sidebar.d.ts.map +1 -1
  34. package/dist/internal/sidebar.js +282 -44
  35. package/dist/internal/table-of-contents.js +1 -1
  36. package/dist/internal/ui/sheet.d.ts.map +1 -1
  37. package/dist/internal/ui/sheet.js +2 -2
  38. package/dist/internal/version-paths.d.ts +49 -0
  39. package/dist/internal/version-paths.d.ts.map +1 -0
  40. package/dist/internal/version-paths.js +57 -0
  41. package/dist/layout.d.ts.map +1 -1
  42. package/dist/layout.js +1 -6
  43. package/dist/mdx.d.ts +1 -0
  44. package/dist/mdx.d.ts.map +1 -1
  45. package/dist/mobile-docs-bar.d.ts.map +1 -1
  46. package/dist/mobile-docs-bar.js +3 -3
  47. package/dist/navbar.js +1 -1
  48. package/dist/pages/docs.d.ts +25 -7
  49. package/dist/pages/docs.d.ts.map +1 -1
  50. package/dist/pages/docs.js +40 -8
  51. package/dist/proxy.d.ts +4 -3
  52. package/dist/proxy.d.ts.map +1 -1
  53. package/dist/proxy.js +124 -46
  54. package/dist/routes/agents.d.ts +1 -1
  55. package/dist/routes/agents.d.ts.map +1 -1
  56. package/dist/routes/agents.js +27 -16
  57. package/dist/routes/chat.d.ts +1 -1
  58. package/dist/routes/chat.d.ts.map +1 -1
  59. package/dist/routes/chat.js +18 -11
  60. package/dist/routes/discovery.d.ts +6 -2
  61. package/dist/routes/discovery.d.ts.map +1 -1
  62. package/dist/routes/discovery.js +6 -12
  63. package/dist/routes/sitemap.d.ts +3 -2
  64. package/dist/routes/sitemap.d.ts.map +1 -1
  65. package/dist/routes/sitemap.js +18 -5
  66. package/dist/source-config.d.ts +1 -0
  67. package/dist/source-config.d.ts.map +1 -1
  68. package/dist/source-config.js +1 -0
  69. package/dist/source.d.ts +40 -2
  70. package/dist/source.d.ts.map +1 -1
  71. package/dist/source.js +132 -15
  72. package/dist/versions.d.ts +22 -2
  73. package/dist/versions.d.ts.map +1 -1
  74. package/dist/versions.js +29 -6
  75. package/docs/agents.md +2 -2
  76. package/docs/llms.txt +313 -31
  77. package/docs/manifest.json +10 -9
  78. package/docs/pages/configuration.md +26 -1
  79. package/docs/pages/getting-started.md +2 -0
  80. package/docs/pages/guides/nested-navigation.md +174 -13
  81. package/docs/pages/md.md +4 -0
  82. package/docs/pages/migration.md +4 -0
  83. package/docs/pages/proxy.md +15 -0
  84. package/docs/pages/rss.md +2 -0
  85. package/docs/pages/syntax.md +2 -1
  86. package/docs/pages/versioned-docs.md +68 -0
  87. package/docs/sitemap.md +1 -1
  88. package/package.json +1 -1
  89. package/source-config.js +1 -0
  90. package/template/AGENTS.md +2 -0
  91. package/template/app/[lang]/rss.xml/route.ts +7 -3
  92. package/template/app/styles/geistdocs.css +8 -6
  93. package/template/content/docs/configuration.mdx +26 -1
  94. package/template/content/docs/getting-started.mdx +2 -0
  95. package/template/content/docs/guides/nested-navigation.mdx +174 -12
  96. package/template/content/docs/md.mdx +4 -0
  97. package/template/content/docs/migration.mdx +4 -0
  98. package/template/content/docs/proxy.mdx +15 -0
  99. package/template/content/docs/rss.mdx +2 -0
  100. package/template/content/docs/syntax.mdx +2 -1
  101. package/template/content/docs/versioned-docs.mdx +68 -0
  102. package/template/package.json +1 -1
  103. package/theme.css +150 -0
@@ -1,19 +1,181 @@
1
1
  ---
2
- title: Nested navigation
3
- description: How Geistdocs builds breadcrumbs from your page tree.
2
+ title: Configure sidebar navigation
3
+ description: Organize Geistdocs pages with ordered groups, separators, folder indexes, and nested navigation
4
+ badge: Beta
4
5
  type: guide
6
+ summary: Configure sidebar order, section labels, folder landing pages, and deeply nested page trees with meta.json files.
7
+ prerequisites:
8
+ - /docs/getting-started
9
+ related:
10
+ - /docs/configuration
11
+ - /docs/syntax
5
12
  ---
6
13
 
7
- Any page nested inside a folder shows a breadcrumb above its title, built
8
- automatically from the page tree. This page lives under the **Guides** folder,
9
- so the breadcrumb above reads _Guides_.
14
+ Use `meta.json` files to organize the Geistdocs sidebar without changing layout components. Each `meta.json` controls the pages and folders in its own directory, so the same pattern works at every nesting level.
10
15
 
11
- ## How it works
16
+ ## Start with the content tree
12
17
 
13
- The breadcrumb lists the folder ancestors of the current page, in order. It is
14
- rendered on the server from the page's URL and the sidebar tree, so it is
15
- present in the initial HTML — the page title never shifts once the page
16
- hydrates.
18
+ Directories become sidebar folders, and `.mdx` files become pages. The examples on this page use the following content tree:
17
19
 
18
- Top-level pages (those not inside a folder) have no ancestors, so no breadcrumb
19
- is shown.
20
+ ```text
21
+ content/docs/
22
+ ├── index.mdx
23
+ ├── getting-started.mdx
24
+ ├── architecture.mdx
25
+ ├── api-reference.mdx
26
+ ├── changelog.mdx
27
+ ├── meta.json
28
+ └── guides/
29
+ ├── index.mdx
30
+ ├── quickstarts.mdx
31
+ ├── meta.json
32
+ └── integrations/
33
+ ├── nextjs.mdx
34
+ ├── sveltekit.mdx
35
+ ├── meta.json
36
+ └── advanced/
37
+ ├── index.mdx
38
+ ├── caching.mdx
39
+ ├── security.mdx
40
+ └── meta.json
41
+ ```
42
+
43
+ Every page needs a frontmatter `title`. Add a `description` to summarize the page. For a regular page, the frontmatter title becomes its sidebar label. Folder landing pages use the folder behavior described below.
44
+
45
+ ## Order top-level pages and add separators
46
+
47
+ Add page and folder names to the root `pages` array without file extensions:
48
+
49
+ ```json title="content/docs/meta.json"
50
+ {
51
+ "title": "My Product Documentation",
52
+ "root": true,
53
+ "pages": [
54
+ "index",
55
+ "getting-started",
56
+ "---Guides---",
57
+ "guides",
58
+ "---Internals---",
59
+ "architecture",
60
+ "api-reference",
61
+ "---Resources---",
62
+ "..."
63
+ ]
64
+ }
65
+ ```
66
+
67
+ This configuration produces three labeled groups after the two introductory pages:
68
+
69
+ - `---Guides---` adds a non-clickable **Guides** separator before the `guides` folder.
70
+ - `---Internals---` adds an **Internals** separator before the architecture and API reference pages.
71
+ - `---Resources---` adds a **Resources** separator before pages inserted by `...`.
72
+
73
+ The `...` entry inserts every page or folder that is not named elsewhere in the array. Place it where the remaining items should appear. Without `...`, unnamed items do not appear in that folder's sidebar navigation.
74
+
75
+ On desktop, top-level folders open as dedicated sidebar sections. On mobile, Geistdocs renders the same page tree as expandable nested navigation. Both layouts use the same `meta.json` files.
76
+
77
+ ## Add a folder landing page
78
+
79
+ Create `index.mdx` inside a nested directory when the folder needs its own landing page:
80
+
81
+ ```mdx title="content/docs/guides/index.mdx"
82
+ ---
83
+ title: Guides
84
+ description: Follow task-focused guides for My Product.
85
+ ---
86
+
87
+ Choose a guide based on the workflow you want to complete.
88
+ ```
89
+
90
+ Then order the folder's child pages in its `meta.json`:
91
+
92
+ ```json title="content/docs/guides/meta.json"
93
+ {
94
+ "title": "Guides",
95
+ "pages": ["quickstarts", "integrations"]
96
+ }
97
+ ```
98
+
99
+ Leave `index` out of a nested folder's `pages` array to use `index.mdx` as the folder landing page. In the desktop section view, Geistdocs exposes a top-level folder index as **Overview**. For a nested folder, the folder label links to its index while the disclosure control expands its children.
100
+
101
+ If you include `index` explicitly in `pages`, Geistdocs treats it as a regular child page instead of the folder landing page.
102
+
103
+ ## Configure deeply nested folders
104
+
105
+ Add another `meta.json` inside each nested directory. For the `integrations` folder from the example tree, group framework pages separately from advanced topics:
106
+
107
+ ```json title="content/docs/guides/integrations/meta.json"
108
+ {
109
+ "title": "Integrations",
110
+ "defaultOpen": true,
111
+ "pages": [
112
+ "---Frameworks---",
113
+ "nextjs",
114
+ "sveltekit",
115
+ "---Advanced---",
116
+ "advanced"
117
+ ]
118
+ }
119
+ ```
120
+
121
+ The `advanced` directory can define another level:
122
+
123
+ ```json title="content/docs/guides/integrations/advanced/meta.json"
124
+ {
125
+ "title": "Advanced Integrations",
126
+ "pages": ["caching", "security"]
127
+ }
128
+ ```
129
+
130
+ Because `advanced/index.mdx` exists and is not listed in `pages`, **Advanced Integrations** links to `/docs/guides/integrations/advanced`. Its child pages resolve to:
131
+
132
+ - `/docs/guides/integrations/advanced/caching`
133
+ - `/docs/guides/integrations/advanced/security`
134
+
135
+ Set `defaultOpen` to `true` when a folder should start expanded. Geistdocs also opens the folders that contain the active page, unless a folder explicitly sets `defaultOpen` to `false`.
136
+
137
+ ## Add a badge to a page
138
+
139
+ Add a short `badge` value to page frontmatter to show status or availability beside its sidebar label:
140
+
141
+ ```yaml title="content/docs/guides/new-api.mdx"
142
+ ---
143
+ title: New API
144
+ description: Use the new API in your application.
145
+ badge: Beta
146
+ ---
147
+ ```
148
+
149
+ Geistdocs renders the badge in desktop and mobile navigation. Badges also appear on folder landing pages because their sidebar items use the folder's `index.mdx` frontmatter. Keep badge text short so the page label has enough room to remain readable.
150
+
151
+ ## Add links to the navigation
152
+
153
+ The `pages` array can include internal and external links alongside content files:
154
+
155
+ ```json title="content/docs/meta.json"
156
+ {
157
+ "pages": [
158
+ "index",
159
+ "[Status](/status)",
160
+ "external:[GitHub](https://github.com/my-org/my-repo)"
161
+ ]
162
+ }
163
+ ```
164
+
165
+ Use `[Label](/path)` for an internal link. Prefix an external link with `external:` so Geistdocs opens it in a new tab and shows the external-link indicator.
166
+
167
+ ## Check breadcrumbs for nested pages
168
+
169
+ Geistdocs builds breadcrumbs from the same page tree. A page at `content/docs/guides/integrations/advanced/caching.mdx` receives the folder path **Guides**, **Integrations**, and **Advanced Integrations** before its page title.
170
+
171
+ Breadcrumbs render on the server from the page URL and sidebar tree, so they are present in the initial HTML. Top-level pages have no folder ancestors and do not render a breadcrumb.
172
+
173
+ ## Troubleshoot missing navigation items
174
+
175
+ Check these rules when a page or folder does not appear where expected:
176
+
177
+ - Match each `pages` entry to a file or directory name without its extension.
178
+ - Add a `meta.json` to every folder that needs custom ordering, separators, `defaultOpen` behavior, or a title override.
179
+ - Add `...` when unlisted files and folders should remain visible.
180
+ - Leave `index` out of a nested folder's `pages` array when it should act as the folder landing page.
181
+ - Keep separator labels between three hyphens on each side, such as `---Internals---`.
@@ -35,6 +35,10 @@ The `.mdx` version returns:
35
35
  - The full processed Markdown content
36
36
  - No HTML, styling, or navigation
37
37
 
38
+ For a docs section mounted at `/docs`, the section root remains `/docs.md`. For a source mounted at the app root with `baseUrl: "/"`, Geistdocs uses `/index.md` for the root page. If Next.js has `basePath: "/docs"`, that public root Markdown URL is `/docs/index.md`.
39
+
40
+ Copy Page, View as Markdown, and the `text/markdown` metadata alternate all use the same package resolver. Use `createDocsPage({ getMarkdownUrl })` only when the deployment needs a different public contract.
41
+
38
42
  ## Use cases
39
43
 
40
44
  This feature is particularly useful for:
@@ -145,6 +145,8 @@ export const geistdocsSource = createSource({
145
145
  });
146
146
  ```
147
147
 
148
+ If the Next.js application also uses `basePath`, pass the same value through `defineConfig` but do not add it to `baseUrl`, `content.route`, `getPageUrl`, or `markdownRoutes`. Those values remain app-local. Geistdocs adds the public prefix to page actions, metadata, generated Markdown, discovery links, chat citations, and proxy destinations.
149
+
148
150
  ## Add route adapters
149
151
 
150
152
  Keep App Router files thin. Route files should call package helpers instead of copying package internals.
@@ -319,6 +321,8 @@ const proxy = createProxy({
319
321
  });
320
322
  ```
321
323
 
324
+ For a base-path application whose root page is documentation, add `"/"` to the static proxy matcher and verify `<basePath>/index.md`. Keep normal application and API paths out of a broad root Markdown mapping with matcher exclusions or a `before` hook.
325
+
322
326
  ## Configure Tailwind CSS
323
327
 
324
328
  Tailwind CSS v4 requires `@source` entries for package components and related dependencies.
@@ -119,6 +119,8 @@ With these mappings:
119
119
 
120
120
  Use `[lang]` in the destination when your markdown route is nested under `app/[lang]`. Use `*path` or `:path*` to insert the matched wildcard path.
121
121
 
122
+ `markdownRoutes` are app-local even when `config.basePath` is set. For a Next.js `basePath` of `/docs`, keep a mapping such as `{ from: "/*path", to: "/[lang]/llms.mdx/*path" }`. `createProxy` preserves `/docs` when it rewrites the public request.
123
+
122
124
  ## Root-mounted docs
123
125
 
124
126
  For docs served from the site root, set the source `baseUrl` and config route to `/`:
@@ -160,6 +162,19 @@ const proxy = createProxy({
160
162
  });
161
163
  ```
162
164
 
165
+ When root-mounted docs are the entire base-path application, include `"/"` explicitly in the static matcher. Next.js does not apply a catch-all matcher to the base-path root:
166
+
167
+ ```ts title="proxy.ts"
168
+ export const config = {
169
+ matcher: [
170
+ "/",
171
+ "/((?!api(?:/|$)|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt).*)",
172
+ ],
173
+ };
174
+ ```
175
+
176
+ The package keeps `llms.txt`, `sitemap.md`, `agents.md`, MCP discovery, and RSS out of root page-Markdown negotiation. Continue to exclude site-specific application and API routes with the matcher or a `before` hook. A root Markdown page is exposed as `/index.md`, or `<basePath>/index.md` publicly.
177
+
163
178
  ## Hook context
164
179
 
165
180
  Both `before` and `after` receive the same context:
@@ -45,6 +45,8 @@ Users can subscribe to this URL using:
45
45
 
46
46
  An RSS button appears in the navigation bar so readers can discover and subscribe to your feed. Clicking the button opens the RSS XML in a new tab.
47
47
 
48
+ The package Footer applies `config.basePath` to this link. Custom RSS generators must also apply the base path to channel and item URLs; source `page.url` values intentionally remain app-local for Next.js navigation.
49
+
48
50
  ## Feed Format
49
51
 
50
52
  The RSS feed follows the RSS 2.0 specification and includes:
@@ -23,10 +23,11 @@ Every MDX file should include frontmatter at the top:
23
23
  ---
24
24
  title: Page Title
25
25
  description: A brief description of the page content
26
+ badge: Beta
26
27
  ---
27
28
  ```
28
29
 
29
- The `title` property is required and is used for the page heading and navigation. The `description` is used for SEO and page previews.
30
+ The `title` property is required and is used for the page heading and navigation. The `description` is used for SEO and page previews. The optional `badge` appears beside the page label in desktop and mobile sidebar navigation.
30
31
 
31
32
  ## Basic Markdown
32
33
 
@@ -218,6 +218,74 @@ For host-based versions, use `href` instead of `routePrefix`:
218
218
  />
219
219
  ```
220
220
 
221
+ ## Avoid 404s when switching versions
222
+
223
+ By default the selector swaps the route prefix without checking that the page
224
+ exists in the target version, so pages that exist in only one version 404 on
225
+ switch. Pass `paths` — computed server-side with `collectVersionSwitchPaths` —
226
+ and the selector falls back to the nearest existing ancestor (or the version's
227
+ docs root) instead:
228
+
229
+ ```tsx title="app/[lang]/docs/layout.tsx"
230
+ import { collectVersionSwitchPaths } from "@vercel/geistdocs/source";
231
+ import { GeistdocsVersionSelect } from "@vercel/geistdocs/versions";
232
+ import { config } from "@/lib/geistdocs/config";
233
+ import { versions } from "@/lib/geistdocs/source";
234
+
235
+ const DocsLayout = async ({ children, params }) => {
236
+ const { lang } = await params;
237
+
238
+ return (
239
+ <GeistdocsDocsLayout
240
+ config={config}
241
+ sidebarTop={
242
+ <GeistdocsVersionSelect
243
+ current={versions.currentVersion}
244
+ paths={collectVersionSwitchPaths({ lang, versions })}
245
+ versions={config.versions}
246
+ />
247
+ }
248
+ tree={versions.current.source.pageTree[lang]}
249
+ >
250
+ {children}
251
+ </GeistdocsDocsLayout>
252
+ );
253
+ };
254
+ ```
255
+
256
+ `collectVersionSwitchPaths` enumerates every page of every version from the
257
+ `createVersionedSources` output and returns paths relative to each version's
258
+ `routePrefix`, plus each version's docs root as the fallback landing page.
259
+
260
+ When an app rewrites loader URLs at render time (for example serving a
261
+ `baseUrl: "/docs"` source under `/v5` with a custom `getPageUrl`), pass the
262
+ same mapping so the collected paths match the public URLs. For sources that
263
+ span several loaders per version (for example separate docs and cookbook
264
+ sources), use the lower-level `collectVersionPaths` per version instead:
265
+
266
+ ```tsx
267
+ import { collectVersionPaths } from "@vercel/geistdocs/source";
268
+
269
+ const paths = {
270
+ v4: {
271
+ fallbackPath: "/docs",
272
+ paths: collectVersionPaths({ lang, sources: [v4Docs, v4Cookbook] }),
273
+ },
274
+ v5: {
275
+ fallbackPath: "/docs",
276
+ paths: collectVersionPaths({
277
+ lang,
278
+ routePrefix: "/v5",
279
+ sources: [v5Docs, v5Cookbook],
280
+ }),
281
+ },
282
+ };
283
+ ```
284
+
285
+ Fallback resolution only applies to `routePrefix` versions. Host-based
286
+ versions (`href`) always keep the plain path swap, since the target host's
287
+ pages can't be enumerated locally.
288
+
221
289
  ## Configure markdown routes
222
290
 
223
291
  Each public route family needs a matching markdown route in `proxy.ts`. Read [Proxy and markdown routes](/docs/proxy) for the proxy configuration.
@@ -18,7 +18,7 @@
18
18
  "@streamdown/code": "^1.0.1",
19
19
  "@vercel/agent-readability": "^0.2.1",
20
20
  "@vercel/analytics": "^1.6.1",
21
- "@vercel/geistdocs": "1.12.0",
21
+ "@vercel/geistdocs": "1.14.0",
22
22
  "@vercel/speed-insights": "^1.3.1",
23
23
  "ai": "^6.0.132",
24
24
  "class-variance-authority": "^0.7.1",
package/theme.css CHANGED
@@ -32,6 +32,13 @@
32
32
  --radius-xl: 0.75rem; /* 12px */
33
33
  --radius-2xl: 1rem; /* 16px */
34
34
 
35
+ /* Geist responsive scale */
36
+ --breakpoint-sm: 401px;
37
+ --breakpoint-md: 601px;
38
+ --breakpoint-lg: 961px;
39
+ --breakpoint-xl: 1200px;
40
+ --breakpoint-2xl: 1400px;
41
+
35
42
  --shadow-2xs: var(--ds-shadow-2xs);
36
43
  --shadow-xs: var(--ds-shadow-xs);
37
44
  --shadow-sm: var(--ds-shadow-small);
@@ -288,6 +295,9 @@
288
295
  0px 8px 16px -4px rgba(0, 0, 0, 0.04),
289
296
  0px 24px 32px -8px rgba(0, 0, 0, 0.06), var(--ds-shadow-background-border);
290
297
 
298
+ --ds-focus-ring:
299
+ 0 0 0 2px var(--ds-background-100), 0 0 0 4px var(--ds-blue-700);
300
+
291
301
  --ds-shadow-fullscreen:
292
302
  var(--ds-shadow-border-base), 0px 1px 1px rgba(0, 0, 0, 0.02),
293
303
  0px 8px 16px -4px rgba(0, 0, 0, 0.04),
@@ -443,6 +453,9 @@
443
453
  var(--ds-shadow-border-base), 0px 1px 1px rgba(0, 0, 0, 0.08),
444
454
  0px 8px 16px -4px rgba(0, 0, 0, 0.16),
445
455
  0px 24px 32px -8px rgba(0, 0, 0, 0.24), var(--ds-shadow-background-border);
456
+
457
+ --ds-focus-ring:
458
+ 0 0 0 2px var(--ds-background-100), 0 0 0 4px var(--ds-blue-900);
446
459
  }
447
460
 
448
461
  @layer base {
@@ -746,6 +759,143 @@
746
759
  border-color: var(--ds-gray-alpha-400);
747
760
  }
748
761
 
762
+ @property --geistdocs-sidebar-fade-top {
763
+ syntax: "<length>";
764
+ inherits: false;
765
+ initial-value: 0px;
766
+ }
767
+
768
+ @property --geistdocs-sidebar-fade-bottom {
769
+ syntax: "<length>";
770
+ inherits: false;
771
+ initial-value: 0px;
772
+ }
773
+
774
+ .geistdocs-sidebar-scroll {
775
+ -ms-overflow-style: none;
776
+ scrollbar-width: none;
777
+ }
778
+
779
+ .geistdocs-sidebar-scroll::-webkit-scrollbar {
780
+ display: none;
781
+ }
782
+
783
+ .geistdocs-sidebar-pane {
784
+ transition:
785
+ transform 150ms cubic-bezier(0.175, 0.885, 0.32, 1.1),
786
+ opacity 150ms cubic-bezier(0.175, 0.885, 0.32, 1.1);
787
+ }
788
+
789
+ @media (min-width: 961px) {
790
+ .geistdocs-sidebar-scroll {
791
+ --geistdocs-sidebar-fade-size: 40px;
792
+ scroll-padding-block: var(--geistdocs-sidebar-fade-size);
793
+ mask-image: linear-gradient(
794
+ to bottom,
795
+ transparent 0,
796
+ black var(--geistdocs-sidebar-fade-top),
797
+ black calc(100% - var(--geistdocs-sidebar-fade-bottom)),
798
+ transparent 100%
799
+ );
800
+ transition:
801
+ --geistdocs-sidebar-fade-top 150ms ease,
802
+ --geistdocs-sidebar-fade-bottom 150ms ease;
803
+ }
804
+
805
+ .geistdocs-sidebar-scroll[data-fade-top="true"] {
806
+ --geistdocs-sidebar-fade-top: var(--geistdocs-sidebar-fade-size);
807
+ }
808
+
809
+ .geistdocs-sidebar-scroll[data-fade-bottom="true"] {
810
+ --geistdocs-sidebar-fade-bottom: var(--geistdocs-sidebar-fade-size);
811
+ }
812
+
813
+ @supports (animation-timeline: scroll()) {
814
+ .geistdocs-sidebar-scroll {
815
+ animation:
816
+ geistdocs-sidebar-fade-top linear both,
817
+ geistdocs-sidebar-fade-bottom linear both;
818
+ animation-range:
819
+ 0 var(--geistdocs-sidebar-fade-size),
820
+ calc(100% - var(--geistdocs-sidebar-fade-size)) 100%;
821
+ animation-timeline: scroll(self), scroll(self);
822
+ }
823
+
824
+ @keyframes geistdocs-sidebar-fade-top {
825
+ to {
826
+ --geistdocs-sidebar-fade-top: var(--geistdocs-sidebar-fade-size);
827
+ }
828
+ }
829
+
830
+ @keyframes geistdocs-sidebar-fade-bottom {
831
+ from {
832
+ --geistdocs-sidebar-fade-bottom: var(--geistdocs-sidebar-fade-size);
833
+ }
834
+ }
835
+ }
836
+ }
837
+
838
+ @container (max-width: 960px) {
839
+ #nd-page > .text-fd-muted-foreground:first-child {
840
+ display: none;
841
+ }
842
+ }
843
+
844
+ [data-geistdocs-mobile-sidebar] [data-slot="sheet-header"] {
845
+ height: calc(4rem + env(safe-area-inset-top));
846
+ padding-top: env(safe-area-inset-top);
847
+ padding-right: max(1rem, env(safe-area-inset-right));
848
+ padding-left: max(1rem, env(safe-area-inset-left));
849
+ }
850
+
851
+ [data-geistdocs-mobile-sidebar] nav {
852
+ padding-right: max(0.5rem, env(safe-area-inset-right));
853
+ padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
854
+ padding-left: max(0.5rem, env(safe-area-inset-left));
855
+ }
856
+
857
+ [data-geistdocs-mobile-sidebar] [data-slot="sheet-close"] {
858
+ top: calc(1rem + env(safe-area-inset-top));
859
+ right: max(1rem, env(safe-area-inset-right));
860
+ }
861
+
862
+ [data-geistdocs-mobile-toc] [data-slot="sheet-close"] {
863
+ top: calc(1rem + env(safe-area-inset-top));
864
+ right: max(1rem, env(safe-area-inset-right));
865
+ }
866
+
867
+ [data-geistdocs-mobile-toc] [data-slot="sheet-header"] {
868
+ padding-top: max(1rem, env(safe-area-inset-top));
869
+ padding-right: max(1rem, env(safe-area-inset-right));
870
+ padding-left: max(1rem, env(safe-area-inset-left));
871
+ }
872
+
873
+ [data-geistdocs-mobile-toc] nav {
874
+ padding-right: max(1rem, env(safe-area-inset-right));
875
+ padding-bottom: max(1rem, env(safe-area-inset-bottom));
876
+ padding-left: max(1rem, env(safe-area-inset-left));
877
+ }
878
+
879
+ [data-mobile-docs-bar] {
880
+ padding-right: max(1.5rem, env(safe-area-inset-right));
881
+ padding-left: max(1.5rem, env(safe-area-inset-left));
882
+ }
883
+
884
+ @media (prefers-reduced-motion: reduce) {
885
+ .geistdocs-sidebar-pane,
886
+ .geistdocs-sidebar-scroll,
887
+ body:has([data-home-route]) header {
888
+ transition: none;
889
+ animation: none;
890
+ }
891
+ }
892
+
893
+ @media (min-width: 1200px) {
894
+ [data-mobile-toc-trigger] {
895
+ display: none;
896
+ }
897
+ }
898
+
749
899
  /* On home routes (GeistdocsHomeLayout renders the [data-home-route] marker),
750
900
  the navbar starts borderless and fades its bottom border in only once the
751
901
  page is scrolled (ScrollState toggles [data-scrolled] on <html>). */