@vercel/geistdocs 1.25.1-canary.9556d32 → 1.25.1-canary.b6fcbed

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 (48) hide show
  1. package/dist/cli/index.js +1 -1
  2. package/dist/components/blockquote.d.ts +3 -0
  3. package/dist/components/blockquote.d.ts.map +1 -0
  4. package/dist/components/blockquote.js +3 -0
  5. package/dist/components/callout.d.ts +13 -10
  6. package/dist/components/callout.d.ts.map +1 -1
  7. package/dist/components/callout.js +6 -6
  8. package/dist/components/code-block-tabs.d.ts +5 -2
  9. package/dist/components/code-block-tabs.d.ts.map +1 -1
  10. package/dist/components/code-block-tabs.js +29 -4
  11. package/dist/components/code-block.d.ts +1 -1
  12. package/dist/components/code-block.d.ts.map +1 -1
  13. package/dist/components/code-block.js +27 -2
  14. package/dist/components/copy-prompt.d.ts +2 -1
  15. package/dist/components/copy-prompt.d.ts.map +1 -1
  16. package/dist/components/copy-prompt.js +2 -2
  17. package/dist/components/heading.d.ts +7 -0
  18. package/dist/components/heading.d.ts.map +1 -0
  19. package/dist/components/heading.js +14 -0
  20. package/dist/components/table.d.ts +3 -0
  21. package/dist/components/table.d.ts.map +1 -0
  22. package/dist/components/table.js +3 -0
  23. package/dist/controls.js +1 -1
  24. package/dist/internal/chat/prompt-input.d.ts.map +1 -1
  25. package/dist/internal/chat/prompt-input.js +2 -1
  26. package/dist/internal/page-actions-client.d.ts.map +1 -1
  27. package/dist/internal/page-actions-client.js +1 -2
  28. package/dist/internal/search.d.ts.map +1 -1
  29. package/dist/internal/search.js +2 -2
  30. package/dist/internal/sidebar.d.ts.map +1 -1
  31. package/dist/internal/sidebar.js +17 -14
  32. package/dist/internal/table-of-contents.d.ts.map +1 -1
  33. package/dist/internal/table-of-contents.js +1 -1
  34. package/dist/mdx.d.ts.map +1 -1
  35. package/dist/mdx.js +18 -3
  36. package/dist/pages/docs.d.ts.map +1 -1
  37. package/dist/pages/docs.js +7 -2
  38. package/docs/agents.md +1 -1
  39. package/docs/llms.txt +169 -13
  40. package/docs/manifest.json +1 -1
  41. package/docs/pages/migration.md +1 -1
  42. package/docs/pages/syntax.md +167 -11
  43. package/package.json +3 -3
  44. package/template/app/styles/geistdocs.css +1 -1
  45. package/template/content/docs/migration.mdx +1 -1
  46. package/template/content/docs/syntax.mdx +172 -11
  47. package/template/package.json +2 -2
  48. package/theme.css +44 -43
@@ -12,7 +12,9 @@ related:
12
12
  Geistdocs supports MDX, a superset of Markdown that allows you to use JSX components within your documentation. This guide covers all the formatting options available.
13
13
 
14
14
  <CopyPrompt text="Help me write a Geistdocs MDX page. Use this page as a syntax reference and create an example page with frontmatter, headings, links, a code block, a Callout, and a CopyPrompt component.">
15
- Help me write a Geistdocs MDX page. Use this page as a syntax reference and create an example page with frontmatter, headings, links, a code block, a `Callout`, and a `CopyPrompt` component.
15
+ Help me write a Geistdocs MDX page. Use this page as a syntax reference and
16
+ create an example page with frontmatter, headings, links, a code block, a
17
+ `Callout`, and a `CopyPrompt` component.
16
18
  </CopyPrompt>
17
19
 
18
20
  ## Frontmatter
@@ -65,11 +67,17 @@ Headings automatically generate anchor links for navigation and deep linking.
65
67
 
66
68
  Create unordered lists with `-`, `*`, or `+`:
67
69
 
68
- - First item
69
- - Second item
70
- - Nested item
71
- - Another nested item
72
- - Third item
70
+ ```md
71
+ - Install the required packages
72
+ - Configure your project
73
+ - Start the development server
74
+ ```
75
+
76
+ This renders as:
77
+
78
+ - Install the required packages
79
+ - Configure your project
80
+ - Start the development server
73
81
 
74
82
  Create ordered lists with numbers:
75
83
 
@@ -81,7 +89,69 @@ Create ordered lists with numbers:
81
89
 
82
90
  Use `>` to create blockquotes:
83
91
 
84
- > This is a blockquote. You can use it to highlight important information or quotes from external sources.
92
+ > **Watch:** Learn more about how to use `next/image` → [YouTube (9 minutes)](https://youtu.be/IU_qq_c_lKA).
93
+
94
+ ### Callouts
95
+
96
+ Use `<Callout>` for a highlighted informational note:
97
+
98
+ ```mdx
99
+ <Callout>This is automatically set when deploying to Vercel.</Callout>
100
+ ```
101
+
102
+ This renders as:
103
+
104
+ <Callout>This is automatically set when deploying to Vercel.</Callout>
105
+
106
+ Callouts can also contain a title and lists:
107
+
108
+ <Callout title="Good to know">
109
+ - The `App Router` uses [React canary
110
+ releases](https://react.dev/blog/2023/05/03/react-canaries) built-in, which
111
+ include all the stable React 19 changes, as well as newer features being
112
+ validated in frameworks, but you should still declare react and react-dom in
113
+ package.json for tooling and ecosystem compatibility.
114
+ - The `Pages Router` uses the React version from your `package.json`.
115
+ </Callout>
116
+
117
+ ### Copy Prompts
118
+
119
+ Short prompts render in full without an expansion control:
120
+
121
+ ```mdx
122
+ <CopyPrompt text="Summarize this documentation page and list the key concepts.">
123
+ Summarize this documentation page and list the key concepts.
124
+ </CopyPrompt>
125
+ ```
126
+
127
+ This renders as:
128
+
129
+ <CopyPrompt text="Summarize this documentation page and list the key concepts.">
130
+ Summarize this documentation page and list the key concepts.
131
+ </CopyPrompt>
132
+
133
+ Long prompts initially show a preview with a **Show more** control:
134
+
135
+ ```mdx
136
+ <CopyPrompt collapsible text="Write a detailed migration plan for this project.">
137
+ Write a detailed migration plan for this project. Include prerequisites,
138
+ implementation steps, validation, rollback guidance, and common pitfalls.
139
+ </CopyPrompt>
140
+ ```
141
+
142
+ Set the boolean `collapsible` prop when the prompt should initially render as a
143
+ two-line preview. This renders as:
144
+
145
+ <CopyPrompt collapsible text="Review this Geistdocs project in detail. Explain how the @vercel/geistdocs package, application layouts, local adapter files, source configuration, content/docs directory, navigation metadata, MDX components, syntax highlighting, search routes, and deployment configuration work together. Then identify the safest first files to edit, describe the effect of each change, call out common mistakes, and propose a step-by-step plan for customizing the documentation site without breaking routing, generated Markdown, or accessibility behavior.">
146
+ Review this Geistdocs project in detail. Explain how the `@vercel/geistdocs`
147
+ package, application layouts, local adapter files, source configuration,
148
+ `content/docs` directory, navigation metadata, MDX components, syntax
149
+ highlighting, search routes, and deployment configuration work together.
150
+ Then identify the safest first files to edit, describe the effect of each
151
+ change, call out common mistakes, and propose a step-by-step plan for
152
+ customizing the documentation site without breaking routing, generated
153
+ Markdown, or accessibility behavior.
154
+ </CopyPrompt>
85
155
 
86
156
  ### Links
87
157
 
@@ -90,6 +160,15 @@ Create links with `[text](url)`:
90
160
  - [External link](https://vercel.com)
91
161
  - [Internal link](/docs/getting-started)
92
162
 
163
+ Use an absolute `https://` or `http://` URL to mark a link as external. External
164
+ links open outside the docs site and display an arrow icon. Use a root-relative
165
+ path beginning with `/` for internal links:
166
+
167
+ ```md
168
+ [External link](https://vercel.com)
169
+ [Internal link](/docs/getting-started)
170
+ ```
171
+
93
172
  ### Images
94
173
 
95
174
  Add images with `![alt text](url)`:
@@ -122,6 +201,16 @@ This renders as:
122
201
  | GFM | GitHub extensions | Supported |
123
202
  | MDX | JSX in Markdown | Supported |
124
203
 
204
+ Tables can also include inline code, as commonly used for file references:
205
+
206
+ | File | Description |
207
+ | -------------------- | ------------------------------------------------ |
208
+ | `next.config.js` | Configuration file for Next.js |
209
+ | `package.json` | Project dependencies and scripts |
210
+ | `instrumentation.ts` | OpenTelemetry and instrumentation file |
211
+ | `.env.local` | Local environment variables |
212
+ | `tsconfig.json` | Configuration file for TypeScript |
213
+
125
214
  ### Task Lists
126
215
 
127
216
  Create interactive task lists:
@@ -194,6 +283,78 @@ export const Button = ({ children }) => {
194
283
  };
195
284
  ```
196
285
 
286
+ ### Tabs and switchers
287
+
288
+ Use consecutive fences with `tab` metadata for code tabs that expose every
289
+ option at once:
290
+
291
+ ````md
292
+ ```ts tab="TypeScript" title="example.ts"
293
+ export const greeting: string = "Hello from TypeScript";
294
+ ```
295
+
296
+ ```js tab="JavaScript" title="example.js"
297
+ export const greeting = "Hello from JavaScript";
298
+ ```
299
+ ````
300
+
301
+ This renders as:
302
+
303
+ ```ts tab="TypeScript" title="example.ts"
304
+ export const greeting: string = "Hello from TypeScript";
305
+ ```
306
+
307
+ ```js tab="JavaScript" title="example.js"
308
+ export const greeting = "Hello from JavaScript";
309
+ ```
310
+
311
+ Wrap the same fences in `<CodeBlockTabs compact>` to move the selector into the
312
+ code-block header:
313
+
314
+ ````mdx
315
+ <CompactCodeBlockTabs defaultValue="TypeScript">
316
+ <CodeBlockTabsList>
317
+ <CodeBlockTabsTrigger value="TypeScript">TypeScript</CodeBlockTabsTrigger>
318
+ <CodeBlockTabsTrigger value="JavaScript">JavaScript</CodeBlockTabsTrigger>
319
+ </CodeBlockTabsList>
320
+ <CodeBlockTab value="TypeScript">
321
+ ```ts title="example.ts"
322
+ export const greeting: string = "Hello from TypeScript";
323
+ ```
324
+ </CodeBlockTab>
325
+ <CodeBlockTab value="JavaScript">
326
+ ```js title="example.js"
327
+ export const greeting = "Hello from JavaScript";
328
+ ```
329
+ </CodeBlockTab>
330
+ </CompactCodeBlockTabs>
331
+ ````
332
+
333
+ This renders as:
334
+
335
+ <CompactCodeBlockTabs defaultValue="TypeScript">
336
+ <CodeBlockTabsList>
337
+ <CodeBlockTabsTrigger value="TypeScript">TypeScript</CodeBlockTabsTrigger>
338
+ <CodeBlockTabsTrigger value="JavaScript">JavaScript</CodeBlockTabsTrigger>
339
+ </CodeBlockTabsList>
340
+ <CodeBlockTab value="TypeScript">
341
+ ```ts title="example.ts"
342
+ export const greeting: string = "Hello from TypeScript";
343
+ ```
344
+ </CodeBlockTab>
345
+ <CodeBlockTab value="JavaScript">
346
+ ```js title="example.js"
347
+ export const greeting = "Hello from JavaScript";
348
+ ```
349
+ </CodeBlockTab>
350
+ </CompactCodeBlockTabs>
351
+
352
+ When migrating an existing site such as next-site, translate adjacent
353
+ `switcher` fences to `tab="TypeScript"` and `tab="JavaScript"`, then wrap the
354
+ pair with `<CodeBlockTabs compact>`. Import `@vercel/geistdocs/styles.css` (or
355
+ `theme.css` with the documented Geist dependencies) so Tailwind scans the
356
+ package's compiled components and emits the tab layout utilities.
357
+
197
358
  ### Framework icons
198
359
 
199
360
  Append `#<framework>` to the title to show a framework logo instead of the
@@ -202,22 +363,22 @@ values are `#next` / `#nextjs` and `#svelte` / `#sveltekit`:
202
363
 
203
364
  ````md
204
365
  ```ts title="flags.ts#next"
205
- import { flag } from 'flags/next';
366
+ import { flag } from "flags/next";
206
367
  ```
207
368
 
208
369
  ```ts title="flags.ts#svelte"
209
- import { flag } from 'flags/sveltekit';
370
+ import { flag } from "flags/sveltekit";
210
371
  ```
211
372
  ````
212
373
 
213
374
  This renders as:
214
375
 
215
376
  ```ts title="flags.ts#next"
216
- import { flag } from 'flags/next';
377
+ import { flag } from "flags/next";
217
378
  ```
218
379
 
219
380
  ```ts title="flags.ts#svelte"
220
- import { flag } from 'flags/sveltekit';
381
+ import { flag } from "flags/sveltekit";
221
382
  ```
222
383
 
223
384
  ### Line Numbers
@@ -19,7 +19,7 @@
19
19
  "@vercel/analytics": "^1.6.1",
20
20
  "@vercel/geistcn": "1.0.3",
21
21
  "@vercel/geistcn-assets": "2.0.1",
22
- "@vercel/geistdocs": "1.25.1-canary.9556d32",
22
+ "@vercel/geistdocs": "1.25.1-canary.b6fcbed",
23
23
  "@vercel/speed-insights": "^1.3.1",
24
24
  "ai": "^6.0.132",
25
25
  "class-variance-authority": "^0.7.1",
@@ -36,7 +36,7 @@
36
36
  "mermaid": "^11.12.2",
37
37
  "motion": "^12.23.25",
38
38
  "nanoid": "^5.1.6",
39
- "next": "16.3.1",
39
+ "next": "16.3.3",
40
40
  "next-themes": "^0.4.6",
41
41
  "radix-ui": "1.6.4",
42
42
  "react": "^19.2.3",
package/theme.css CHANGED
@@ -1,30 +1,14 @@
1
- /* Geistdocs integration layer: package source scanning, Fumadocs mappings,
2
- docs layout rules, syntax tokens, and package-specific behavior. Geistcn's
3
- tailwind.css and styles.css own design tokens, utilities, typography,
4
- material styles, and base resets.
5
-
6
- The @source lines below emit every class the package's compiled components
7
- and streamdown reference; they resolve relative to this file, so they work
8
- when a consumer imports it. Consumers therefore only need
9
- `@import "@vercel/geistdocs/theme.css";` and must not re-`@source` the
10
- package dist or streamdown downstream (delete any such line you find). Add a
11
- new @source here (never downstream) only when the package gains a new
12
- compiled dependency. */
13
-
14
- /* Streamdown classes for Ask AI markdown. Both paths cover the workspace and a
15
- published pnpm install; Tailwind ignores whichever doesn't resolve. */
16
1
  @source "node_modules/streamdown/dist/*.js";
17
2
  @source "../../streamdown/dist/*.js";
18
3
 
19
- /* The package's own compiled components (navbar container queries, etc.).
20
- `./dist` resolves next to this file in both the workspace and an install. */
21
4
  @source "./dist/**/*.js";
22
5
 
23
- /* Monorepo dev only: also scan the package's TypeScript source so new Tailwind
24
- classes hot-reload without rebuilding `dist`. `./src` exists only in the
25
- workspace; a published install has no `src`, so Tailwind ignores it. */
26
6
  @source "./src/**/*.{ts,tsx}";
27
7
 
8
+ button:not(:disabled, [aria-disabled="true"]) {
9
+ cursor: pointer;
10
+ }
11
+
28
12
  .prose h1 {
29
13
  @apply text-heading-32;
30
14
  }
@@ -46,14 +30,47 @@
46
30
  @apply text-heading-14;
47
31
  }
48
32
 
49
- /* Docs page title. Fumadocs' DocsTitle renders it outside .prose and hardcodes
50
- text-[1.75em] font-semibold via its own class merge, which our cn() can't
51
- reliably override. Own the Geist heading style here where specificity wins;
52
- tracking-tighter loosens text-heading-40's dense -2.4px. */
33
+ .prose :is(h1, h2, h3, h4, h5, h6)[id] {
34
+ position: relative;
35
+ }
36
+
37
+ .prose :is(h1, h2, h3, h4, h5, h6)[id] > a:first-child {
38
+ position: static;
39
+ }
40
+
41
+ .prose :is(h1, h2, h3, h4, h5, h6)[id] > a:first-child::after {
42
+ position: absolute;
43
+ inset: 0;
44
+ content: "";
45
+ }
46
+
47
+ .prose :is(h1, h2, h3, h4, h5, h6)[id] > svg {
48
+ pointer-events: none;
49
+ }
50
+
51
+ .prose :is(h1, h2, h3, h4, h5, h6)[id]:is(:hover, :focus-within) > svg {
52
+ opacity: 1;
53
+ }
54
+
55
+ .prose ul:where(:not(.not-prose, .not-prose *)) {
56
+ padding-left: 1.25rem;
57
+ }
58
+
59
+ .prose ul > li:where(:not(.not-prose, .not-prose *)) {
60
+ padding-left: 0.5rem;
61
+ }
62
+
53
63
  #nd-page h1:not(:where(.prose *)) {
54
64
  @apply text-heading-40 tracking-tighter;
55
65
  }
56
66
 
67
+ @media (width >= 80rem) {
68
+ #nd-page {
69
+ max-width: 780px;
70
+ transform: translateX(-20px);
71
+ }
72
+ }
73
+
57
74
  @layer utilities {
58
75
  .line-numbers code {
59
76
  counter-reset: step;
@@ -63,7 +80,7 @@
63
80
  .line-numbers code .line::before {
64
81
  content: counter(step);
65
82
  counter-increment: step;
66
- @apply mr-6 inline-block w-6 text-right tabular-nums text-gray-800;
83
+ @apply mr-5 inline-block w-4 shrink-0 text-right font-mono text-[13px] tabular-nums text-gray-600;
67
84
  }
68
85
  }
69
86
 
@@ -84,7 +101,6 @@
84
101
  @apply hidden;
85
102
  }
86
103
 
87
- /* Shiki syntax highlighting palette - matches packages/geist code-block.module.css */
88
104
  :root {
89
105
  --shiki-color-text: var(--ds-gray-1000);
90
106
  --shiki-color-background: var(--ds-background-100);
@@ -99,7 +115,6 @@
99
115
  --shiki-token-link: var(--ds-green-900);
100
116
  }
101
117
 
102
- /* Override fumadocs tokens to point at the Geist scale */
103
118
  :root {
104
119
  --color-fd-background: var(--ds-background-100);
105
120
  --color-fd-foreground: var(--ds-gray-1000);
@@ -120,7 +135,6 @@
120
135
  --color-fd-error: var(--ds-red-800);
121
136
  }
122
137
 
123
- /* Match the fumadocs sidebar selector to the Geist scale */
124
138
  #nd-sidebar {
125
139
  --color-fd-accent: var(--ds-gray-100);
126
140
  --color-fd-accent-foreground: var(--ds-gray-1000);
@@ -213,8 +227,6 @@
213
227
  }
214
228
  }
215
229
 
216
- /* fumadocs hardcodes the search dialog's className, so the command modal
217
- shadow is applied here via the data attribute set in search.tsx. */
218
230
  [data-geistdocs-command-modal] {
219
231
  box-shadow: var(--ds-shadow-modal);
220
232
  }
@@ -241,11 +253,6 @@
241
253
  right: max(1rem, env(safe-area-inset-right));
242
254
  }
243
255
 
244
- /* Keep the table of contents scrollbar hidden on every platform. The
245
- mask-gradient fade on the scroll area already signals that the list scrolls,
246
- so a visible bar only adds clutter. `scrollbar-width: none` covers Firefox
247
- (and non-overlay contexts); the WebKit rule covers Chrome/Safari on platforms
248
- that render classic, space-consuming scrollbars. */
249
256
  #nd-toc .geistdocs-toc-scroll {
250
257
  scrollbar-width: none;
251
258
  }
@@ -274,9 +281,6 @@
274
281
  }
275
282
  }
276
283
 
277
- /* On home routes (GeistdocsHomeLayout renders the [data-home-route] marker),
278
- the navbar starts borderless and fades its bottom border in only once the
279
- page is scrolled (ScrollState toggles [data-scrolled] on <html>). */
280
284
  body:has([data-home-route]) header {
281
285
  border-bottom-color: transparent !important;
282
286
  transition: border-color 200ms ease;
@@ -284,15 +288,12 @@ body:has([data-home-route]) header {
284
288
  html[data-scrolled] body:has([data-home-route]) header {
285
289
  border-bottom-color: var(--ds-gray-alpha-400) !important;
286
290
  }
287
- /* Hide the header border while the dropdown or mobile menu is open. `html body`
288
- matches the scroll-reveal rule's specificity so this (later) rule wins there,
289
- and covers every other route too. */
290
- html body
291
+ html
292
+ body
291
293
  header:has(
292
294
  [data-slot="navigation-menu-trigger"][data-state="open"],
293
295
  [data-slot="mobile-menu-toggle"][aria-expanded="true"]
294
296
  ) {
295
297
  border-bottom-color: transparent !important;
296
- /* Hide instantly; the scroll-reveal fade above still applies when closed. */
297
298
  transition: none !important;
298
299
  }