@vercel/geistdocs 1.25.1-canary.c58830e → 1.25.1-canary.d2f4449

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 (138) hide show
  1. package/dist/cli/index.js +1 -1
  2. package/dist/components/blockquote.js +1 -1
  3. package/dist/components/callout.d.ts +13 -10
  4. package/dist/components/callout.d.ts.map +1 -1
  5. package/dist/components/callout.js +6 -6
  6. package/dist/components/code-block-tabs.d.ts.map +1 -1
  7. package/dist/components/code-block-tabs.js +3 -1
  8. package/dist/components/code-block.d.ts.map +1 -1
  9. package/dist/components/code-block.js +1 -1
  10. package/dist/components/command-prompt.d.ts.map +1 -1
  11. package/dist/components/command-prompt.js +15 -22
  12. package/dist/components/copy-prompt.d.ts +2 -1
  13. package/dist/components/copy-prompt.d.ts.map +1 -1
  14. package/dist/components/copy-prompt.js +2 -2
  15. package/dist/components/heading.d.ts +7 -0
  16. package/dist/components/heading.d.ts.map +1 -0
  17. package/dist/components/heading.js +14 -0
  18. package/dist/components/image.d.ts +19 -0
  19. package/dist/components/image.d.ts.map +1 -0
  20. package/dist/components/image.js +9 -0
  21. package/dist/components/table.d.ts +3 -0
  22. package/dist/components/table.d.ts.map +1 -0
  23. package/dist/components/table.js +3 -0
  24. package/dist/controls.d.ts.map +1 -1
  25. package/dist/controls.js +4 -3
  26. package/dist/internal/chat/activity.d.ts +20 -0
  27. package/dist/internal/chat/activity.d.ts.map +1 -0
  28. package/dist/internal/chat/activity.js +43 -0
  29. package/dist/internal/chat/context.d.ts +2 -0
  30. package/dist/internal/chat/context.d.ts.map +1 -1
  31. package/dist/internal/chat/context.js +24 -3
  32. package/dist/internal/chat/dots-spinner.d.ts.map +1 -1
  33. package/dist/internal/chat/dots-spinner.js +15 -9
  34. package/dist/internal/chat/loading-skeleton.d.ts +7 -0
  35. package/dist/internal/chat/loading-skeleton.d.ts.map +1 -0
  36. package/dist/internal/chat/loading-skeleton.js +46 -0
  37. package/dist/internal/chat/message-metadata.d.ts.map +1 -1
  38. package/dist/internal/chat/message-metadata.js +15 -30
  39. package/dist/internal/chat/message-sources.d.ts +3 -0
  40. package/dist/internal/chat/message-sources.d.ts.map +1 -0
  41. package/dist/internal/chat/message-sources.js +23 -0
  42. package/dist/internal/chat/message.d.ts.map +1 -1
  43. package/dist/internal/chat/message.js +59 -5
  44. package/dist/internal/chat/shell.d.ts.map +1 -1
  45. package/dist/internal/chat/shell.js +17 -17
  46. package/dist/internal/chat/source-chunks.d.ts +9 -0
  47. package/dist/internal/chat/source-chunks.d.ts.map +1 -0
  48. package/dist/internal/chat/source-chunks.js +7 -0
  49. package/dist/internal/chat/sources.d.ts +1 -1
  50. package/dist/internal/chat/sources.d.ts.map +1 -1
  51. package/dist/internal/chat/sources.js +7 -1
  52. package/dist/internal/link-href.d.ts +13 -0
  53. package/dist/internal/link-href.d.ts.map +1 -0
  54. package/dist/internal/link-href.js +51 -0
  55. package/dist/internal/mdx-to-markdown.d.ts +3 -0
  56. package/dist/internal/mdx-to-markdown.d.ts.map +1 -0
  57. package/dist/internal/mdx-to-markdown.js +134 -0
  58. package/dist/internal/mousedown-navigation-utils.d.ts +5 -0
  59. package/dist/internal/mousedown-navigation-utils.d.ts.map +1 -0
  60. package/dist/internal/mousedown-navigation-utils.js +95 -0
  61. package/dist/internal/mousedown-navigation.d.ts +10 -0
  62. package/dist/internal/mousedown-navigation.d.ts.map +1 -0
  63. package/dist/internal/mousedown-navigation.js +42 -0
  64. package/dist/internal/navbar/desktop-menu.js +1 -1
  65. package/dist/internal/navbar/mobile-menu.d.ts.map +1 -1
  66. package/dist/internal/navbar/mobile-menu.js +8 -13
  67. package/dist/internal/navbar/navbar-shell.d.ts.map +1 -1
  68. package/dist/internal/navbar/navbar-shell.js +2 -1
  69. package/dist/internal/page-actions-client.d.ts.map +1 -1
  70. package/dist/internal/page-actions-client.js +36 -32
  71. package/dist/internal/provider-client.d.ts.map +1 -1
  72. package/dist/internal/provider-client.js +29 -5
  73. package/dist/internal/react-node-text.d.ts +4 -0
  74. package/dist/internal/react-node-text.d.ts.map +1 -0
  75. package/dist/internal/react-node-text.js +11 -0
  76. package/dist/internal/search.d.ts.map +1 -1
  77. package/dist/internal/search.js +1 -1
  78. package/dist/internal/sidebar-responsive.d.ts +0 -1
  79. package/dist/internal/sidebar-responsive.d.ts.map +1 -1
  80. package/dist/internal/sidebar-responsive.js +0 -9
  81. package/dist/internal/sidebar-tree.d.ts.map +1 -1
  82. package/dist/internal/sidebar-tree.js +6 -1
  83. package/dist/internal/sidebar.d.ts.map +1 -1
  84. package/dist/internal/sidebar.js +78 -49
  85. package/dist/internal/table-of-contents.d.ts.map +1 -1
  86. package/dist/internal/table-of-contents.js +1 -1
  87. package/dist/internal/toc-items.d.ts.map +1 -1
  88. package/dist/internal/toc-items.js +18 -7
  89. package/dist/internal/ui/dropdown-menu.js +6 -6
  90. package/dist/internal/ui/navigation-menu.js +2 -2
  91. package/dist/internal/use-mobile.d.ts.map +1 -1
  92. package/dist/internal/use-mobile.js +2 -12
  93. package/dist/layout.d.ts +1 -0
  94. package/dist/layout.d.ts.map +1 -1
  95. package/dist/layout.js +2 -0
  96. package/dist/mdx.d.ts.map +1 -1
  97. package/dist/mdx.js +13 -4
  98. package/dist/pages/docs.d.ts.map +1 -1
  99. package/dist/pages/docs.js +17 -9
  100. package/dist/routes/chat.d.ts +1 -1
  101. package/dist/routes/chat.d.ts.map +1 -1
  102. package/dist/routes/chat.js +31 -14
  103. package/dist/routes/llms.d.ts +1 -1
  104. package/dist/routes/llms.d.ts.map +1 -1
  105. package/dist/routes/llms.js +12 -2
  106. package/dist/source.d.ts +10 -1
  107. package/dist/source.d.ts.map +1 -1
  108. package/dist/source.js +75 -34
  109. package/dist/versions.js +2 -2
  110. package/docs/agents.md +4 -3
  111. package/docs/llms.txt +359 -39
  112. package/docs/manifest.json +12 -3
  113. package/docs/pages/ask-ai.md +2 -2
  114. package/docs/pages/deployment.md +30 -5
  115. package/docs/pages/getting-started.md +38 -12
  116. package/docs/pages/guides/nested-navigation.md +1 -1
  117. package/docs/pages/md.md +25 -6
  118. package/docs/pages/migration-2.md +106 -0
  119. package/docs/pages/migration.md +5 -2
  120. package/docs/pages/syntax.md +144 -8
  121. package/docs/sitemap.md +3 -2
  122. package/package.json +12 -5
  123. package/template/app/[lang]/layout.tsx +4 -0
  124. package/template/app/styles/geistdocs.css +1 -1
  125. package/template/components/ui/button.tsx +1 -1
  126. package/template/content/docs/ask-ai.cn.mdx +2 -2
  127. package/template/content/docs/ask-ai.mdx +2 -2
  128. package/template/content/docs/deployment.mdx +31 -6
  129. package/template/content/docs/getting-started.mdx +39 -13
  130. package/template/content/docs/guides/nested-navigation.mdx +1 -1
  131. package/template/content/docs/md.mdx +25 -6
  132. package/template/content/docs/meta.json +1 -0
  133. package/template/content/docs/migration-2.mdx +106 -0
  134. package/template/content/docs/migration.mdx +5 -1
  135. package/template/content/docs/syntax.mdx +150 -8
  136. package/template/next.config.ts +9 -0
  137. package/template/package.json +4 -4
  138. package/theme.css +39 -105
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,88 +30,58 @@
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. */
53
- #nd-page h1:not(:where(.prose *)) {
54
- @apply text-heading-40 tracking-tighter;
33
+ .prose :is(h1, h2, h3, h4, h5, h6)[id] {
34
+ position: relative;
55
35
  }
56
36
 
57
- @layer utilities {
58
- .line-numbers code {
59
- counter-reset: step;
60
- counter-increment: step 0;
61
- }
62
-
63
- .line-numbers code .line::before {
64
- content: counter(step);
65
- counter-increment: step;
66
- @apply mr-5 inline-block w-4 shrink-0 text-right font-mono text-[13px] tabular-nums text-gray-600;
67
- }
37
+ .prose :is(h1, h2, h3, h4, h5, h6)[id] > a:first-child {
38
+ position: static;
68
39
  }
69
40
 
70
- /* Match GeistCN CodeBlock's complete line-state treatment for Shiki output. */
71
- [data-geist-code-block] :is(.line, .highlighted-line) {
72
- position: relative;
73
- display: inline-block;
74
- width: max-content;
75
- min-width: 100%;
76
- height: 20px;
77
- padding: 0 20px !important;
41
+ .prose :is(h1, h2, h3, h4, h5, h6)[id] > a:first-child::after {
42
+ position: absolute;
43
+ inset: 0;
44
+ content: "";
78
45
  }
79
46
 
80
- [data-geist-code-block]
81
- :is(.highlighted-line, .line.highlighted, [data-highlighted="true"]) {
82
- background: var(--ds-blue-300) !important;
83
- border-left: 0 !important;
84
- box-shadow: inset 2px 0 0 0 var(--ds-blue-900);
47
+ .prose :is(h1, h2, h3, h4, h5, h6)[id] > svg {
48
+ pointer-events: none;
85
49
  }
86
50
 
87
- [data-geist-code-block] .line[data-active="true"] {
88
- background: var(--ds-amber-300) !important;
89
- box-shadow: inset 2px 0 0 0 var(--ds-amber-900);
51
+ .prose :is(h1, h2, h3, h4, h5, h6)[id]:is(:hover, :focus-within) > svg {
52
+ opacity: 1;
90
53
  }
91
54
 
92
- [data-geist-code-block] :is([data-added="true"], .line.diff.add) {
93
- background: var(--ds-green-300) !important;
94
- box-shadow: inset 2px 0 0 0 var(--ds-green-900);
55
+ .prose ul:where(:not(.not-prose, .not-prose *)) {
56
+ padding-left: 1.25rem;
95
57
  }
96
58
 
97
- [data-geist-code-block] :is([data-removed="true"], .line.diff.remove) {
98
- /* Current GeistCN red-300; the legacy design-system layer redefines the
99
- variable to a weaker HSL value later in the cascade. */
100
- background: oklch(94.33% 0.0369 15.0115) !important;
101
- box-shadow: inset 2px 0 0 0 var(--ds-red-900);
102
- opacity: 1 !important;
59
+ .prose ul > li:where(:not(.not-prose, .not-prose *)) {
60
+ padding-left: 0.5rem;
103
61
  }
104
62
 
105
- [data-geist-code-block] :is(.line.diff.add, .line.diff.remove)::before {
106
- content: none !important;
63
+ #nd-page h1:not(:where(.prose *)) {
64
+ @apply text-heading-40 tracking-tighter;
107
65
  }
108
66
 
109
- [data-geist-code-block]
110
- :is(
111
- [data-added="true"],
112
- [data-removed="true"],
113
- .line.diff.add,
114
- .line.diff.remove
115
- )::after {
116
- position: absolute;
117
- inset: 0;
118
- padding-left: 8px;
119
- font-weight: 500;
120
- pointer-events: none;
67
+ @media (width >= 80rem) {
68
+ #nd-page {
69
+ max-width: 780px;
70
+ transform: translateX(-20px);
71
+ }
121
72
  }
122
73
 
123
- [data-geist-code-block] :is([data-added="true"], .line.diff.add)::after {
124
- color: var(--ds-green-900);
125
- content: "+";
126
- }
74
+ @layer utilities {
75
+ .line-numbers code {
76
+ counter-reset: step;
77
+ counter-increment: step 0;
78
+ }
127
79
 
128
- [data-geist-code-block] :is([data-removed="true"], .line.diff.remove)::after {
129
- color: var(--ds-red-900);
130
- content: "-";
80
+ .line-numbers code .line::before {
81
+ content: counter(step);
82
+ counter-increment: step;
83
+ @apply mr-5 inline-block w-4 shrink-0 text-right font-mono text-[13px] tabular-nums text-gray-600;
84
+ }
131
85
  }
132
86
 
133
87
  :root {
@@ -147,7 +101,6 @@
147
101
  @apply hidden;
148
102
  }
149
103
 
150
- /* Shiki syntax highlighting palette - matches packages/geist code-block.module.css */
151
104
  :root {
152
105
  --shiki-color-text: var(--ds-gray-1000);
153
106
  --shiki-color-background: var(--ds-background-100);
@@ -162,7 +115,6 @@
162
115
  --shiki-token-link: var(--ds-green-900);
163
116
  }
164
117
 
165
- /* Override fumadocs tokens to point at the Geist scale */
166
118
  :root {
167
119
  --color-fd-background: var(--ds-background-100);
168
120
  --color-fd-foreground: var(--ds-gray-1000);
@@ -183,7 +135,6 @@
183
135
  --color-fd-error: var(--ds-red-800);
184
136
  }
185
137
 
186
- /* Match the fumadocs sidebar selector to the Geist scale */
187
138
  #nd-sidebar {
188
139
  --color-fd-accent: var(--ds-gray-100);
189
140
  --color-fd-accent-foreground: var(--ds-gray-1000);
@@ -276,12 +227,6 @@
276
227
  }
277
228
  }
278
229
 
279
- /* fumadocs hardcodes the search dialog's className, so the command modal
280
- shadow is applied here via the data attribute set in search.tsx. */
281
- [data-geistdocs-command-modal] {
282
- box-shadow: var(--ds-shadow-modal);
283
- }
284
-
285
230
  [data-geistdocs-command-modal] .text-fd-muted-foreground {
286
231
  color: var(--ds-gray-900);
287
232
  }
@@ -304,11 +249,6 @@
304
249
  right: max(1rem, env(safe-area-inset-right));
305
250
  }
306
251
 
307
- /* Keep the table of contents scrollbar hidden on every platform. The
308
- mask-gradient fade on the scroll area already signals that the list scrolls,
309
- so a visible bar only adds clutter. `scrollbar-width: none` covers Firefox
310
- (and non-overlay contexts); the WebKit rule covers Chrome/Safari on platforms
311
- that render classic, space-consuming scrollbars. */
312
252
  #nd-toc .geistdocs-toc-scroll {
313
253
  scrollbar-width: none;
314
254
  }
@@ -337,9 +277,6 @@
337
277
  }
338
278
  }
339
279
 
340
- /* On home routes (GeistdocsHomeLayout renders the [data-home-route] marker),
341
- the navbar starts borderless and fades its bottom border in only once the
342
- page is scrolled (ScrollState toggles [data-scrolled] on <html>). */
343
280
  body:has([data-home-route]) header {
344
281
  border-bottom-color: transparent !important;
345
282
  transition: border-color 200ms ease;
@@ -347,15 +284,12 @@ body:has([data-home-route]) header {
347
284
  html[data-scrolled] body:has([data-home-route]) header {
348
285
  border-bottom-color: var(--ds-gray-alpha-400) !important;
349
286
  }
350
- /* Hide the header border while the dropdown or mobile menu is open. `html body`
351
- matches the scroll-reveal rule's specificity so this (later) rule wins there,
352
- and covers every other route too. */
353
- html body
287
+ html
288
+ body
354
289
  header:has(
355
290
  [data-slot="navigation-menu-trigger"][data-state="open"],
356
291
  [data-slot="mobile-menu-toggle"][aria-expanded="true"]
357
292
  ) {
358
293
  border-bottom-color: transparent !important;
359
- /* Hide instantly; the scroll-reveal fade above still applies when closed. */
360
294
  transition: none !important;
361
295
  }