@vercel/geistdocs 2.6.1 → 2.7.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/dist/cli/index.js +1 -1
- package/dist/components/toasts.d.ts +10 -0
- package/dist/components/toasts.d.ts.map +1 -0
- package/dist/components/toasts.js +16 -0
- package/dist/internal/github-button.d.ts.map +1 -1
- package/dist/internal/github-button.js +2 -1
- package/dist/providers/public/components/badge.d.ts +13 -6
- package/dist/providers/public/components/badge.d.ts.map +1 -1
- package/dist/providers/public/components/badge.js +54 -9
- package/dist/providers/public/components/code-block-server.d.ts.map +1 -1
- package/dist/providers/public/components/code-block-server.js +13 -3
- package/dist/providers/public/components/filename-icon.d.ts +3 -0
- package/dist/providers/public/components/filename-icon.d.ts.map +1 -0
- package/dist/providers/public/components/filename-icon.js +13 -0
- package/dist/providers/public/components/input.d.ts +27 -0
- package/dist/providers/public/components/input.d.ts.map +1 -0
- package/dist/providers/public/components/input.js +27 -0
- package/dist/providers/public/components/theme-switcher.d.ts +5 -1
- package/dist/providers/public/components/theme-switcher.d.ts.map +1 -1
- package/dist/providers/public/components/theme-switcher.js +7 -3
- package/dist/providers/public/components/toasts.d.ts +1 -0
- package/dist/providers/public/components/toasts.d.ts.map +1 -1
- package/dist/providers/public/components/toasts.js +21 -1
- package/dist/providers/public/components/toggle.d.ts +26 -0
- package/dist/providers/public/components/toggle.d.ts.map +1 -0
- package/dist/providers/public/components/toggle.js +53 -0
- package/dist/providers/public/components/tooltip.d.ts +33 -7
- package/dist/providers/public/components/tooltip.d.ts.map +1 -1
- package/dist/providers/public/components/tooltip.js +19 -1
- package/dist/providers/public-assets/icons.d.ts +1 -0
- package/dist/providers/public-assets/icons.d.ts.map +1 -1
- package/dist/providers/public-assets/icons.js +1 -0
- package/docs/agents.md +25 -2
- package/docs/llms.txt +1023 -18
- package/docs/manifest.json +211 -4
- package/docs/pages/components/badge.md +30 -0
- package/docs/pages/components/button.md +28 -0
- package/docs/pages/components/callout.md +28 -0
- package/docs/pages/components/code-block.md +62 -0
- package/docs/pages/components/collapsible.md +38 -0
- package/docs/pages/components/command-prompt.md +59 -0
- package/docs/pages/components/copy-prompt.md +25 -0
- package/docs/pages/components/details.md +37 -0
- package/docs/pages/components/dropdown-menu.md +43 -0
- package/docs/pages/components/image.md +36 -0
- package/docs/pages/components/index.md +49 -0
- package/docs/pages/components/input.md +35 -0
- package/docs/pages/components/link.md +28 -0
- package/docs/pages/components/mermaid.md +29 -0
- package/docs/pages/components/navigation-menu.md +50 -0
- package/docs/pages/components/popover.md +38 -0
- package/docs/pages/components/scroll-area.md +40 -0
- package/docs/pages/components/tabs.md +47 -0
- package/docs/pages/components/theme-switcher.md +32 -0
- package/docs/pages/components/toast.md +49 -0
- package/docs/pages/components/toggle.md +37 -0
- package/docs/pages/components/tooltip.md +36 -0
- package/docs/pages/components/video.md +26 -0
- package/docs/pages/index.md +1 -1
- package/docs/pages/migration.md +5 -5
- package/docs/pages/provider.md +11 -3
- package/docs/pages/syntax.md +7 -7
- package/docs/sitemap.md +24 -1
- package/package.json +33 -1
- package/public-foundation.css +1 -1
- package/template/components/geistdocs/toast-demo.tsx +33 -0
- package/template/components/geistdocs/toggle-demo.tsx +14 -0
- package/template/content/docs/components/badge.mdx +26 -0
- package/template/content/docs/components/button.mdx +24 -0
- package/template/content/docs/components/callout.mdx +24 -0
- package/template/content/docs/components/code-block.mdx +58 -0
- package/template/content/docs/components/collapsible.mdx +34 -0
- package/template/content/docs/components/command-prompt.mdx +55 -0
- package/template/content/docs/components/copy-prompt.mdx +23 -0
- package/template/content/docs/components/details.mdx +33 -0
- package/template/content/docs/components/dropdown-menu.mdx +39 -0
- package/template/content/docs/components/image.mdx +32 -0
- package/template/content/docs/components/index.mdx +45 -0
- package/template/content/docs/components/input.mdx +31 -0
- package/template/content/docs/components/link.mdx +24 -0
- package/template/content/docs/components/mermaid.mdx +25 -0
- package/template/content/docs/components/meta.json +25 -1
- package/template/content/docs/components/navigation-menu.mdx +46 -0
- package/template/content/docs/components/popover.mdx +34 -0
- package/template/content/docs/components/scroll-area.mdx +36 -0
- package/template/content/docs/components/tabs.mdx +43 -0
- package/template/content/docs/components/theme-switcher.mdx +28 -0
- package/template/content/docs/components/toast.mdx +45 -0
- package/template/content/docs/components/toggle.mdx +33 -0
- package/template/content/docs/components/tooltip.mdx +32 -0
- package/template/content/docs/components/video.mdx +22 -0
- package/template/content/docs/index.mdx +1 -1
- package/template/content/docs/meta.json +1 -1
- package/template/content/docs/migration.mdx +5 -5
- package/template/content/docs/provider.cn.mdx +11 -3
- package/template/content/docs/provider.mdx +11 -3
- package/template/content/docs/syntax.cn.mdx +3 -3
- package/template/content/docs/syntax.mdx +7 -7
- package/template/package.json +1 -1
package/docs/sitemap.md
CHANGED
|
@@ -10,7 +10,7 @@ Use it to choose focused page files from `docs/pages/` before reading the full `
|
|
|
10
10
|
- [Migrate to Geistdocs](pages/migration.md) | URL: /docs/migration | Type: guide | Summary: Move an existing documentation site to @vercel/geistdocs while keeping local content, routing, middleware behavior, and AI-readable surfaces intact.
|
|
11
11
|
- [Choose a Geistdocs package](pages/packages.md) | URL: /docs/packages | Type: guide | Summary: Use the public package by default and the private package only where restricted Vercel npm dependencies are already available.
|
|
12
12
|
- [Configuration](pages/configuration.md) | URL: /docs/configuration | Type: reference | Summary: Configure site metadata, navigation, AI features, page actions, translations, and local adapters.
|
|
13
|
-
- [
|
|
13
|
+
- [MDX Components](pages/syntax.md) | URL: /docs/syntax | Type: reference | Summary: MDX component and authoring reference covering tabs, text formatting, code blocks, line highlighting, and Mermaid diagrams.
|
|
14
14
|
- [Geistdocs Provider](pages/provider.md) | URL: /docs/provider | Type: reference | Summary: The root provider component that wraps your application to handle toast notifications, search, and analytics.
|
|
15
15
|
- [Versioned docs](pages/versioned-docs.md) | URL: /docs/versioned-docs | Type: guide | Summary: Use createVersionedSources to configure stable, pre-release, or host-based documentation versions.
|
|
16
16
|
- [Proxy and markdown routes](pages/proxy.md) | URL: /docs/proxy | Type: reference | Summary: Configure createProxy with generated route discovery, request hooks, markdown mappings, and a static Next.js matcher.
|
|
@@ -18,14 +18,37 @@ Use it to choose focused page files from `docs/pages/` before reading the full `
|
|
|
18
18
|
- [.md Extension](pages/md.md) | URL: /docs/md | Type: conceptual | Summary: Access any documentation page as raw Markdown by appending .md or .mdx to the URL for AI tool consumption.
|
|
19
19
|
- [Agent readiness](pages/agent-readiness.md) | URL: /docs/agent-readiness | Type: guide | Summary: Generate /agents.md and /.well-known/mcp.json from Geistdocs config so agents can find docs, Markdown surfaces, API specs, and MCP endpoints.
|
|
20
20
|
- [Ask AI](pages/ask-ai.md) | URL: /docs/ask-ai | Type: conceptual | Summary: An AI-powered chat assistant with context-aware search, persistent history, and suggested prompts for your documentation.
|
|
21
|
+
- [Badge](pages/components/badge.md) | URL: /docs/components/badge | Type: reference | Summary: Import Badge from the package component subpath for labels outside authored MDX.
|
|
22
|
+
- [Button](pages/components/button.md) | URL: /docs/components/button | Type: reference | Summary: Use the provider-backed Button in application UI or directly in MDX.
|
|
23
|
+
- [Callout](pages/components/callout.md) | URL: /docs/components/callout | Type: reference | Summary: Use Callout directly or compose its container, title, and description primitives.
|
|
24
|
+
- [Code Block](pages/components/code-block.md) | URL: /docs/components/code-block | Type: reference | Summary: Use CodeBlock when code is highlighted or assembled outside authored Markdown fences.
|
|
25
|
+
- [Collapsible](pages/components/collapsible.md) | URL: /docs/components/collapsible | Type: reference | Summary: Compose Collapsible, CollapsibleTrigger, and CollapsibleContent in custom React UI.
|
|
26
|
+
- [Command Prompt](pages/components/command-prompt.md) | URL: /docs/components/command-prompt | Type: reference | Summary: Compose the CommandPrompt primitives for application-owned install and setup commands.
|
|
27
|
+
- [Components](pages/components/index.md) | URL: /docs/components/index | Type: overview | Summary: Browse every component subpath exported by Geistdocs. These components can be imported into application code without relying on the default MDX component map.
|
|
21
28
|
- [Configure sidebar navigation](pages/guides/nested-navigation.md) | URL: /docs/guides/nested-navigation | Type: guide | Summary: Configure sidebar order, section labels, folder landing pages, and deeply nested page trees with meta.json files.
|
|
29
|
+
- [Copy Prompt](pages/components/copy-prompt.md) | URL: /docs/components/copy-prompt | Type: reference | Summary: Use CopyPrompt for reusable instructions that readers can send to an AI assistant.
|
|
30
|
+
- [Details](pages/components/details.md) | URL: /docs/components/details | Type: reference | Summary: Compose Details and Summary for accessible browser-native disclosures.
|
|
31
|
+
- [Dropdown Menu](pages/components/dropdown-menu.md) | URL: /docs/components/dropdown-menu | Type: reference | Summary: Compose DropdownMenu primitives for application-owned menus outside MDX.
|
|
22
32
|
- [Edit on GitHub](pages/edit-on-github.md) | URL: /docs/edit-on-github | Type: integration | Summary: A direct link on every documentation page that lets readers propose changes through GitHub pull requests.
|
|
23
33
|
- [Feedback](pages/feedback.md) | URL: /docs/feedback | Type: integration | Summary: An interactive feedback widget that collects user sentiment and creates structured GitHub Issues automatically.
|
|
34
|
+
- [Image](pages/components/image.md) | URL: /docs/components/image | Type: reference | Summary: Use the Geistdocs Image wrapper for documentation-aware Next.js images.
|
|
24
35
|
- [Improve Ask AI answers with Mixedbread](pages/mixedbread-retrieval.md) | URL: /docs/mixedbread-retrieval | Type: guide | Summary: Provision a Mixedbread Store for one Geistdocs consumer site, enable semantic retrieval, and sync documentation during production builds.
|
|
36
|
+
- [Input](pages/components/input.md) | URL: /docs/components/input | Type: reference | Summary: Use Input for text entry in custom documentation and application interfaces.
|
|
25
37
|
- [Internationalization](pages/internationalization.md) | URL: /docs/internationalization | Type: guide | Summary: Serve documentation in multiple languages with automatic translation via the Geistdocs CLI and Fumadocs routing.
|
|
26
38
|
- [llms.txt](pages/llms-txt.md) | URL: /docs/llms-txt | Type: conceptual | Summary: A single endpoint that returns all documentation as plain Markdown text following the llms.txt standard.
|
|
39
|
+
- [Mermaid](pages/components/mermaid.md) | URL: /docs/components/mermaid | Type: reference | Summary: Use Mermaid directly when diagram source is assembled outside an MDX Mermaid fence.
|
|
40
|
+
- [Native Link](pages/components/link.md) | URL: /docs/components/link | Type: reference | Summary: Use NativeDocsLink where Next.js client navigation is not appropriate.
|
|
41
|
+
- [Navigation Menu](pages/components/navigation-menu.md) | URL: /docs/components/navigation-menu | Type: reference | Summary: Compose NavigationMenu primitives for custom product and documentation navigation.
|
|
27
42
|
- [Open in Chat](pages/open-in-chat.md) | URL: /docs/open-in-chat | Type: conceptual | Summary: Transfer documentation context to AI chat platforms like ChatGPT, Claude, Cursor, and v0 with a single click.
|
|
43
|
+
- [Popover](pages/components/popover.md) | URL: /docs/components/popover | Type: reference | Summary: Compose Popover, PopoverTrigger, and PopoverContent outside MDX.
|
|
28
44
|
- [RSS](pages/rss.md) | URL: /docs/rss | Type: conceptual | Summary: An automatically generated RSS 2.0 feed that keeps users informed when documentation is published or updated.
|
|
45
|
+
- [Scroll Area](pages/components/scroll-area.md) | URL: /docs/components/scroll-area | Type: reference | Summary: Compose ScrollArea and ScrollBar for constrained custom interfaces.
|
|
29
46
|
- [Steps](pages/components/steps.md) | URL: /docs/components/steps | Type: reference | Summary: Write consecutive headings that start with a number, such as "### 1. Install", to render a numbered step list. The Steps and Step components cover cases where a heading must be wrapped in another component.
|
|
30
47
|
- [Table of contents](pages/table-of-contents.md) | URL: /docs/table-of-contents | Type: reference | Summary: Geistdocs builds the "On this page" outline from your headings, indents sub-headings under their parent, and tracks the active section along a straight vertical guide rail.
|
|
48
|
+
- [Tabs](pages/components/tabs.md) | URL: /docs/components/tabs | Type: reference | Summary: Use Tabs for navigation-only controls or TabsWithChildren and TabContent for mounted content panels.
|
|
49
|
+
- [Theme Switcher](pages/components/theme-switcher.md) | URL: /docs/components/theme-switcher | Type: reference | Summary: Use ThemeSwitcher in custom navigation, settings, and footer UI.
|
|
50
|
+
- [Toast](pages/components/toast.md) | URL: /docs/components/toast | Type: reference | Summary: Trigger provider-backed success, warning, and error notifications.
|
|
51
|
+
- [Toggle](pages/components/toggle.md) | URL: /docs/components/toggle | Type: reference | Summary: Toggle is the provider-backed replacement for the former Switch export.
|
|
52
|
+
- [Tooltip](pages/components/tooltip.md) | URL: /docs/components/tooltip | Type: reference | Summary: Wrap controls with provider-backed Tooltip content outside MDX.
|
|
53
|
+
- [Video](pages/components/video.md) | URL: /docs/components/video | Type: reference | Summary: Use Video for embedded video sources inside React UI or authored MDX.
|
|
31
54
|
- [WebMCP](pages/webmcp.md) | URL: /docs/webmcp
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/geistdocs",
|
|
3
3
|
"description": "Runtime and CLI for Geistdocs projects.",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.7.1",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -180,6 +180,22 @@
|
|
|
180
180
|
"types": "./dist/components/button.d.ts",
|
|
181
181
|
"default": "./dist/components/button.js"
|
|
182
182
|
},
|
|
183
|
+
"./components/input": {
|
|
184
|
+
"types": "./dist/providers/public/components/input.d.ts",
|
|
185
|
+
"default": "./dist/providers/public/components/input.js"
|
|
186
|
+
},
|
|
187
|
+
"./components/toggle": {
|
|
188
|
+
"types": "./dist/providers/public/components/toggle.d.ts",
|
|
189
|
+
"default": "./dist/providers/public/components/toggle.js"
|
|
190
|
+
},
|
|
191
|
+
"./components/tooltip": {
|
|
192
|
+
"types": "./dist/providers/public/components/tooltip.d.ts",
|
|
193
|
+
"default": "./dist/providers/public/components/tooltip.js"
|
|
194
|
+
},
|
|
195
|
+
"./components/toasts": {
|
|
196
|
+
"types": "./dist/components/toasts.d.ts",
|
|
197
|
+
"default": "./dist/components/toasts.js"
|
|
198
|
+
},
|
|
183
199
|
"./components/theme-switcher": {
|
|
184
200
|
"types": "./dist/providers/public/components/theme-switcher.d.ts",
|
|
185
201
|
"default": "./dist/providers/public/components/theme-switcher.js"
|
|
@@ -252,6 +268,22 @@
|
|
|
252
268
|
"types": "./dist/components/video.d.ts",
|
|
253
269
|
"default": "./dist/components/video.js"
|
|
254
270
|
},
|
|
271
|
+
"./assets/icons": {
|
|
272
|
+
"types": "./dist/assets/icons/index.d.ts",
|
|
273
|
+
"default": "./dist/assets/icons/index.js"
|
|
274
|
+
},
|
|
275
|
+
"./assets/icons/*": {
|
|
276
|
+
"types": "./dist/assets/icons/*.d.ts",
|
|
277
|
+
"default": "./dist/assets/icons/*.js"
|
|
278
|
+
},
|
|
279
|
+
"./assets/logos": {
|
|
280
|
+
"types": "./dist/assets/logos/index.d.ts",
|
|
281
|
+
"default": "./dist/assets/logos/index.js"
|
|
282
|
+
},
|
|
283
|
+
"./assets/logos/*": {
|
|
284
|
+
"types": "./dist/assets/logos/*.d.ts",
|
|
285
|
+
"default": "./dist/assets/logos/*.js"
|
|
286
|
+
},
|
|
255
287
|
"./styles.css": "./styles.css",
|
|
256
288
|
"./theme.css": "./theme.css",
|
|
257
289
|
"./package.json": "./package.json"
|
package/public-foundation.css
CHANGED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { Button } from "@vercel/geistdocs/components/button";
|
|
4
|
+
import { useToasts } from "@vercel/geistdocs/components/toasts";
|
|
5
|
+
|
|
6
|
+
export function ToastDemo() {
|
|
7
|
+
const toast = useToasts();
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<div className="flex flex-wrap justify-center gap-2">
|
|
11
|
+
<Button
|
|
12
|
+
onClick={() => toast.success({ text: "Changes saved" })}
|
|
13
|
+
variant="secondary"
|
|
14
|
+
>
|
|
15
|
+
Success
|
|
16
|
+
</Button>
|
|
17
|
+
<Button
|
|
18
|
+
onClick={() =>
|
|
19
|
+
toast.warning({ text: "Review these changes before continuing" })
|
|
20
|
+
}
|
|
21
|
+
variant="secondary"
|
|
22
|
+
>
|
|
23
|
+
Warning
|
|
24
|
+
</Button>
|
|
25
|
+
<Button
|
|
26
|
+
onClick={() => toast.error({ text: "Something went wrong" })}
|
|
27
|
+
variant="secondary"
|
|
28
|
+
>
|
|
29
|
+
Error
|
|
30
|
+
</Button>
|
|
31
|
+
</div>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { Toggle } from "@vercel/geistdocs/components/toggle";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
|
|
6
|
+
export function ToggleDemo() {
|
|
7
|
+
const [enabled, setEnabled] = useState(false);
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<Toggle checked={enabled} onChange={setEnabled}>
|
|
11
|
+
Enable previews
|
|
12
|
+
</Toggle>
|
|
13
|
+
);
|
|
14
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Badge
|
|
3
|
+
description: Render compact status and category labels
|
|
4
|
+
type: reference
|
|
5
|
+
summary: Import Badge from the package component subpath for labels outside authored MDX.
|
|
6
|
+
related:
|
|
7
|
+
- /docs/components
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
import { Badge } from "@vercel/geistdocs/components/badge";
|
|
11
|
+
|
|
12
|
+
<div className="not-prose my-6 flex min-h-32 items-center justify-center rounded-lg border border-gray-400 bg-background-100 p-6">
|
|
13
|
+
<Badge variant="blue">New</Badge>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
Import `Badge` from the selected Geistdocs package:
|
|
17
|
+
|
|
18
|
+
```tsx
|
|
19
|
+
import { Badge } from "@vercel/geistdocs/components/badge";
|
|
20
|
+
|
|
21
|
+
export function Status() {
|
|
22
|
+
return <Badge variant="blue">New</Badge>;
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
The public variant supports `gray`, `blue`, `red`, `amber`, and `green` tones. The private package resolves the component through Geistcn.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Button
|
|
3
|
+
description: Render buttons and link-style actions
|
|
4
|
+
type: reference
|
|
5
|
+
summary: Use the provider-backed Button in application UI or directly in MDX.
|
|
6
|
+
related:
|
|
7
|
+
- /docs/components
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
import { Button } from "@vercel/geistdocs/components/button";
|
|
11
|
+
|
|
12
|
+
<div className="not-prose my-6 flex min-h-32 items-center justify-center rounded-lg border border-gray-400 bg-background-100 p-6">
|
|
13
|
+
<Button variant="secondary">Continue</Button>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
import { Button } from "@vercel/geistdocs/components/button";
|
|
18
|
+
|
|
19
|
+
export function Actions() {
|
|
20
|
+
return <Button variant="secondary">Continue</Button>;
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
`Button` supports native buttons, anchors, and internal localized links. It is also included in the default MDX component map.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Callout
|
|
3
|
+
description: Render notices with optional titles and descriptions
|
|
4
|
+
type: reference
|
|
5
|
+
summary: Use Callout directly or compose its container, title, and description primitives.
|
|
6
|
+
related:
|
|
7
|
+
- /docs/components
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
import { Callout } from "@vercel/geistdocs/components/callout";
|
|
11
|
+
|
|
12
|
+
<div className="not-prose my-6 rounded-lg border border-gray-400 bg-background-100 p-6">
|
|
13
|
+
<Callout title="Note">Restart the dev server after changing configuration.</Callout>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
import { Callout } from "@vercel/geistdocs/components/callout";
|
|
18
|
+
|
|
19
|
+
export function Notice() {
|
|
20
|
+
return <Callout title="Note">Restart the dev server after changing configuration.</Callout>;
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The subpath also exports `CalloutContainer`, `CalloutTitle`, and `CalloutDescription`. These components are included in the default MDX component map.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Code Block
|
|
3
|
+
description: Render highlighted code with filename and copy controls
|
|
4
|
+
type: reference
|
|
5
|
+
summary: Use CodeBlock when code is highlighted or assembled outside authored Markdown fences.
|
|
6
|
+
related:
|
|
7
|
+
- /docs/components
|
|
8
|
+
- /docs/syntax
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
import { CodeBlock } from "@vercel/geistdocs/components/code-block";
|
|
12
|
+
import {
|
|
13
|
+
CodeBlockTab,
|
|
14
|
+
CodeBlockTabs,
|
|
15
|
+
CodeBlockTabsList,
|
|
16
|
+
CodeBlockTabsTrigger,
|
|
17
|
+
} from "@vercel/geistdocs/components/code-block-tabs";
|
|
18
|
+
|
|
19
|
+
## Code block
|
|
20
|
+
|
|
21
|
+
<div className="not-prose my-6">
|
|
22
|
+
<CodeBlock title="example.ts">{'export const enabled = true;'}</CodeBlock>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
import { CodeBlock } from "@vercel/geistdocs/components/code-block";
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Pass a `title` to show header chrome with a filename-aware icon and copy control. Markdown code fences use `CodeBlock` automatically through the default MDX map.
|
|
30
|
+
|
|
31
|
+
## Code block with tabs
|
|
32
|
+
|
|
33
|
+
<div className="not-prose my-6">
|
|
34
|
+
<CodeBlockTabs defaultValue="pnpm">
|
|
35
|
+
<CodeBlockTabsList>
|
|
36
|
+
<CodeBlockTabsTrigger value="pnpm">pnpm</CodeBlockTabsTrigger>
|
|
37
|
+
<CodeBlockTabsTrigger value="npm">npm</CodeBlockTabsTrigger>
|
|
38
|
+
</CodeBlockTabsList>
|
|
39
|
+
<CodeBlockTab value="pnpm">
|
|
40
|
+
<CodeBlock title="Terminal">pnpm add @vercel/geistdocs</CodeBlock>
|
|
41
|
+
</CodeBlockTab>
|
|
42
|
+
<CodeBlockTab value="npm">
|
|
43
|
+
<CodeBlock title="Terminal">npm install @vercel/geistdocs</CodeBlock>
|
|
44
|
+
</CodeBlockTab>
|
|
45
|
+
</CodeBlockTabs>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
```tsx
|
|
49
|
+
import {
|
|
50
|
+
CodeBlockTab,
|
|
51
|
+
CodeBlockTabs,
|
|
52
|
+
CodeBlockTabsList,
|
|
53
|
+
CodeBlockTabsTrigger,
|
|
54
|
+
CompactCodeBlockTabs,
|
|
55
|
+
} from "@vercel/geistdocs/components/code-block-tabs";
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The same components are available without imports in authored MDX.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Collapsible
|
|
3
|
+
description: Show and hide expandable content regions
|
|
4
|
+
type: reference
|
|
5
|
+
summary: Compose Collapsible, CollapsibleTrigger, and CollapsibleContent in custom React UI.
|
|
6
|
+
related:
|
|
7
|
+
- /docs/components
|
|
8
|
+
- /docs/components/details
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
Collapsible,
|
|
13
|
+
CollapsibleContent,
|
|
14
|
+
CollapsibleTrigger,
|
|
15
|
+
} from "@vercel/geistdocs/components/collapsible";
|
|
16
|
+
|
|
17
|
+
<div className="not-prose my-6 flex min-h-32 items-center justify-center rounded-lg border border-gray-400 bg-background-100 p-6">
|
|
18
|
+
<Collapsible className="w-full max-w-sm" defaultOpen>
|
|
19
|
+
<CollapsibleTrigger className="font-medium">Advanced options</CollapsibleTrigger>
|
|
20
|
+
<CollapsibleContent className="pt-3 text-gray-900">
|
|
21
|
+
Configure optional behavior here.
|
|
22
|
+
</CollapsibleContent>
|
|
23
|
+
</Collapsible>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
```tsx
|
|
27
|
+
import {
|
|
28
|
+
Collapsible,
|
|
29
|
+
CollapsibleContent,
|
|
30
|
+
CollapsibleTrigger,
|
|
31
|
+
} from "@vercel/geistdocs/components/collapsible";
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Use the native [Details](/docs/components/details) component when browser-native disclosure behavior is sufficient.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Command Prompt
|
|
3
|
+
description: Render copyable commands and selectable command alternatives
|
|
4
|
+
type: reference
|
|
5
|
+
summary: Compose the CommandPrompt primitives for application-owned install and setup commands.
|
|
6
|
+
related:
|
|
7
|
+
- /docs/components
|
|
8
|
+
- /docs/components/copy-prompt
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
CommandPromptContent,
|
|
13
|
+
CommandPromptCopy,
|
|
14
|
+
CommandPromptList,
|
|
15
|
+
CommandPromptPrefix,
|
|
16
|
+
CommandPromptRoot,
|
|
17
|
+
CommandPromptSurface,
|
|
18
|
+
CommandPromptTrigger,
|
|
19
|
+
CommandPromptTriggerDivider,
|
|
20
|
+
CommandPromptViewport,
|
|
21
|
+
} from "@vercel/geistdocs/components/command-prompt";
|
|
22
|
+
|
|
23
|
+
<div className="not-prose my-6 flex min-h-32 items-center justify-center rounded-lg border border-gray-400 bg-background-100 p-6">
|
|
24
|
+
<CommandPromptRoot defaultValue="pnpm">
|
|
25
|
+
<CommandPromptList>
|
|
26
|
+
<CommandPromptTrigger value="pnpm">pnpm</CommandPromptTrigger>
|
|
27
|
+
<CommandPromptTriggerDivider />
|
|
28
|
+
<CommandPromptTrigger value="npm">npm</CommandPromptTrigger>
|
|
29
|
+
</CommandPromptList>
|
|
30
|
+
<CommandPromptSurface>
|
|
31
|
+
<CommandPromptPrefix>$</CommandPromptPrefix>
|
|
32
|
+
<CommandPromptViewport>
|
|
33
|
+
<CommandPromptContent value="pnpm">pnpm add @vercel/geistdocs</CommandPromptContent>
|
|
34
|
+
<CommandPromptContent value="npm">npm install @vercel/geistdocs</CommandPromptContent>
|
|
35
|
+
</CommandPromptViewport>
|
|
36
|
+
<CommandPromptCopy aria-label="Copy command" />
|
|
37
|
+
</CommandPromptSurface>
|
|
38
|
+
</CommandPromptRoot>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
```tsx
|
|
42
|
+
import {
|
|
43
|
+
CommandPromptContent,
|
|
44
|
+
CommandPromptCopy,
|
|
45
|
+
CommandPromptList,
|
|
46
|
+
CommandPromptPrefix,
|
|
47
|
+
CommandPromptRoot,
|
|
48
|
+
CommandPromptSurface,
|
|
49
|
+
CommandPromptTrigger,
|
|
50
|
+
CommandPromptTriggerDivider,
|
|
51
|
+
CommandPromptViewport,
|
|
52
|
+
} from "@vercel/geistdocs/components/command-prompt";
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
`CommandPromptRoot` owns the active command and copy state. Compose the remaining primitives within it to build a single command or a selectable package-manager list.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Copy Prompt
|
|
3
|
+
description: Render copyable prompts for agents and language models
|
|
4
|
+
type: reference
|
|
5
|
+
summary: Use CopyPrompt for reusable instructions that readers can send to an AI assistant.
|
|
6
|
+
related:
|
|
7
|
+
- /docs/components
|
|
8
|
+
- /docs/components/command-prompt
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
import { CopyPrompt } from "@vercel/geistdocs/components/copy-prompt";
|
|
12
|
+
|
|
13
|
+
<CopyPrompt text="Review this project and propose the safest migration plan." />
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import { CopyPrompt } from "@vercel/geistdocs/components/copy-prompt";
|
|
17
|
+
|
|
18
|
+
export function ReviewPrompt() {
|
|
19
|
+
return <CopyPrompt text="Review this project and propose the safest migration plan." />;
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
`CopyPrompt` is also included in the default MDX component map.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Details
|
|
3
|
+
description: Render styled native disclosure elements
|
|
4
|
+
type: reference
|
|
5
|
+
summary: Compose Details and Summary for accessible browser-native disclosures.
|
|
6
|
+
related:
|
|
7
|
+
- /docs/components
|
|
8
|
+
- /docs/components/collapsible
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
import { Details, Summary } from "@vercel/geistdocs/components/details";
|
|
12
|
+
|
|
13
|
+
<div className="not-prose my-6 min-h-32 rounded-lg border border-gray-400 bg-background-100 p-6">
|
|
14
|
+
<Details open>
|
|
15
|
+
<Summary>Advanced options</Summary>
|
|
16
|
+
Configure optional behavior here.
|
|
17
|
+
</Details>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { Details, Summary } from "@vercel/geistdocs/components/details";
|
|
22
|
+
|
|
23
|
+
export function Disclosure() {
|
|
24
|
+
return (
|
|
25
|
+
<Details>
|
|
26
|
+
<Summary>Advanced options</Summary>
|
|
27
|
+
Configure optional behavior here.
|
|
28
|
+
</Details>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
`Details` and `Summary` are also included in the default MDX component map.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Dropdown Menu
|
|
3
|
+
description: Render accessible action and selection menus
|
|
4
|
+
type: reference
|
|
5
|
+
summary: Compose DropdownMenu primitives for application-owned menus outside MDX.
|
|
6
|
+
related:
|
|
7
|
+
- /docs/components
|
|
8
|
+
- /docs/components/popover
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
DropdownMenu,
|
|
13
|
+
DropdownMenuContent,
|
|
14
|
+
DropdownMenuItem,
|
|
15
|
+
DropdownMenuTrigger,
|
|
16
|
+
} from "@vercel/geistdocs/components/dropdown-menu";
|
|
17
|
+
|
|
18
|
+
<div className="not-prose my-6 flex min-h-32 items-center justify-center rounded-lg border border-gray-400 bg-background-100 p-6">
|
|
19
|
+
<DropdownMenu>
|
|
20
|
+
<DropdownMenuTrigger className="h-8 rounded-md border border-gray-400 bg-background-100 px-3">
|
|
21
|
+
Open menu
|
|
22
|
+
</DropdownMenuTrigger>
|
|
23
|
+
<DropdownMenuContent>
|
|
24
|
+
<DropdownMenuItem>Edit</DropdownMenuItem>
|
|
25
|
+
<DropdownMenuItem>Duplicate</DropdownMenuItem>
|
|
26
|
+
</DropdownMenuContent>
|
|
27
|
+
</DropdownMenu>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
```tsx
|
|
31
|
+
import {
|
|
32
|
+
DropdownMenu,
|
|
33
|
+
DropdownMenuContent,
|
|
34
|
+
DropdownMenuItem,
|
|
35
|
+
DropdownMenuTrigger,
|
|
36
|
+
} from "@vercel/geistdocs/components/dropdown-menu";
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The subpath also exports label, separator, checkbox, radio, and nested submenu primitives.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Image
|
|
3
|
+
description: Render optimized images with optional light and dark sources
|
|
4
|
+
type: reference
|
|
5
|
+
summary: Use the Geistdocs Image wrapper for documentation-aware Next.js images.
|
|
6
|
+
related:
|
|
7
|
+
- /docs/components
|
|
8
|
+
- /docs/syntax
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
import { Image } from "@vercel/geistdocs/components/image";
|
|
12
|
+
|
|
13
|
+
<div className="not-prose my-6 flex min-h-40 items-center justify-center rounded-lg border border-gray-400 bg-background-100 p-6">
|
|
14
|
+
<Image
|
|
15
|
+
alt="Geistdocs preview favicon"
|
|
16
|
+
className="size-16"
|
|
17
|
+
figureClassName="my-0 w-auto"
|
|
18
|
+
height={64}
|
|
19
|
+
src="/favicon.preview.ico"
|
|
20
|
+
width={64}
|
|
21
|
+
/>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
```tsx
|
|
25
|
+
import { Image } from "@vercel/geistdocs/components/image";
|
|
26
|
+
|
|
27
|
+
export function Screenshot() {
|
|
28
|
+
return <Image alt="Project dashboard" src="/dashboard.png" />;
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Pass `srcLight` and `srcDark` for theme-aware artwork. `Image` is also included in the default MDX component map.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Components
|
|
3
|
+
description: Importable React components exposed by Geistdocs for application UI and documentation experiences
|
|
4
|
+
type: overview
|
|
5
|
+
summary: Browse every component subpath exported by Geistdocs. These components can be imported into application code without relying on the default MDX component map.
|
|
6
|
+
related:
|
|
7
|
+
- /docs/syntax
|
|
8
|
+
- /docs/packages
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
Geistdocs exports reusable React components for application UI, custom documentation layouts, and authored content. Import from the package variant selected by your project:
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import { Button } from "@vercel/geistdocs/components/button";
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Internal projects using `@vercel/geistdocs-private` use the same component subpaths. The private package resolves primitives through Geistcn; the public package provides public equivalents.
|
|
18
|
+
|
|
19
|
+
| Component | Import subpath | Purpose |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| [Badge](/docs/components/badge) | `components/badge` | Compact status and category labels |
|
|
22
|
+
| [Button](/docs/components/button) | `components/button` | Buttons and link-style actions |
|
|
23
|
+
| [Input](/docs/components/input) | `components/input` | Text input fields with provider-backed styling |
|
|
24
|
+
| [Toggle](/docs/components/toggle) | `components/toggle` | Controlled boolean controls |
|
|
25
|
+
| [Tooltip](/docs/components/tooltip) | `components/tooltip` | Contextual hover and focus labels |
|
|
26
|
+
| [Toast](/docs/components/toast) | `components/toasts` | Global success, warning, and error notifications |
|
|
27
|
+
| [Theme Switcher](/docs/components/theme-switcher) | `components/theme-switcher` | System, light, and dark theme selection |
|
|
28
|
+
| [Tabs](/docs/components/tabs) | `components/tabs`, `components/tabs-with-children` | Tab navigation and mounted content panels |
|
|
29
|
+
| [Collapsible](/docs/components/collapsible) | `components/collapsible` | Expandable content regions |
|
|
30
|
+
| [Details](/docs/components/details) | `components/details` | Styled native disclosure elements |
|
|
31
|
+
| [Callout](/docs/components/callout) | `components/callout` | Notices with optional titles and descriptions |
|
|
32
|
+
| [Code Block](/docs/components/code-block) | `components/code-block`, `components/code-block-tabs` | Highlighted code and tabbed code groups |
|
|
33
|
+
| [Command Prompt](/docs/components/command-prompt) | `components/command-prompt` | Command surfaces with copy support and alternatives |
|
|
34
|
+
| [Copy Prompt](/docs/components/copy-prompt) | `components/copy-prompt` | Copyable prompts for agents and language models |
|
|
35
|
+
| [Dropdown Menu](/docs/components/dropdown-menu) | `components/dropdown-menu` | Accessible action menus |
|
|
36
|
+
| [Navigation Menu](/docs/components/navigation-menu) | `components/navigation-menu` | Accessible navigation flyouts |
|
|
37
|
+
| [Popover](/docs/components/popover) | `components/popover` | Anchored floating content |
|
|
38
|
+
| [Scroll Area](/docs/components/scroll-area) | `components/scroll-area` | Styled overflow regions and scrollbars |
|
|
39
|
+
| [Image](/docs/components/image) | `components/image` | Next.js images with optional light and dark sources |
|
|
40
|
+
| [Native Link](/docs/components/link) | `components/link` | Styled anchors using browser-native navigation |
|
|
41
|
+
| [Mermaid](/docs/components/mermaid) | `components/mermaid` | Mermaid diagram rendering |
|
|
42
|
+
| [Video](/docs/components/video) | `components/video` | Responsive video playback |
|
|
43
|
+
| [Steps](/docs/components/steps) | `components/steps` | Numbered procedural content |
|
|
44
|
+
|
|
45
|
+
Components such as `Button`, `Callout`, `CodeBlock`, and `Steps` are also included in the default MDX component map. Importing them directly is useful in React components, layouts, and custom page renderers.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Input
|
|
3
|
+
description: Render accessible provider-backed text inputs
|
|
4
|
+
type: reference
|
|
5
|
+
summary: Use Input for text entry in custom documentation and application interfaces.
|
|
6
|
+
related:
|
|
7
|
+
- /docs/components
|
|
8
|
+
- /docs/components/toggle
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
import { Input } from "@vercel/geistdocs/components/input";
|
|
12
|
+
|
|
13
|
+
<div className="not-prose my-6 flex min-h-32 items-center justify-center rounded-lg border border-gray-400 bg-background-100 p-6">
|
|
14
|
+
<Input
|
|
15
|
+
aria-label="Project domain"
|
|
16
|
+
defaultValue="geistdocs"
|
|
17
|
+
prefix="https://"
|
|
18
|
+
suffix=".dev"
|
|
19
|
+
width={320}
|
|
20
|
+
/>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
```tsx
|
|
24
|
+
import { Input } from "@vercel/geistdocs/components/input";
|
|
25
|
+
|
|
26
|
+
export function SearchField() {
|
|
27
|
+
return <Input aria-label="Search documentation" placeholder="Search" />;
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Use `typeName` for the native input type. Labels, prefix and suffix adornments, error content, sizes, and rounded fields are supported by the public provider; the private package resolves the component through Geistcn.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Native Link
|
|
3
|
+
description: Render styled anchors with browser-native navigation
|
|
4
|
+
type: reference
|
|
5
|
+
summary: Use NativeDocsLink where Next.js client navigation is not appropriate.
|
|
6
|
+
related:
|
|
7
|
+
- /docs/components
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
import { NativeDocsLink } from "@vercel/geistdocs/components/link";
|
|
11
|
+
|
|
12
|
+
<div className="not-prose my-6 flex min-h-32 items-center justify-center rounded-lg border border-gray-400 bg-background-100 p-6">
|
|
13
|
+
<NativeDocsLink href="/docs/getting-started">Read the getting started guide</NativeDocsLink>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
import { NativeDocsLink } from "@vercel/geistdocs/components/link";
|
|
18
|
+
|
|
19
|
+
export function DownloadLink() {
|
|
20
|
+
return <NativeDocsLink href="/download">Download</NativeDocsLink>;
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Use this component for links that must retain native document navigation. The default MDX link resolver already handles internal and external authored links.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Mermaid
|
|
3
|
+
description: Render Mermaid diagrams from chart source
|
|
4
|
+
type: reference
|
|
5
|
+
summary: Use Mermaid directly when diagram source is assembled outside an MDX Mermaid fence.
|
|
6
|
+
related:
|
|
7
|
+
- /docs/components
|
|
8
|
+
- /docs/syntax
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
import { Mermaid } from "@vercel/geistdocs/components/mermaid";
|
|
12
|
+
|
|
13
|
+
<div className="not-prose my-6 rounded-lg border border-gray-400 bg-background-100 p-6">
|
|
14
|
+
<Mermaid chart={'graph LR; A["Start"] --> B["Finish"]'} />
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import { Mermaid } from "@vercel/geistdocs/components/mermaid";
|
|
19
|
+
|
|
20
|
+
export function Flow() {
|
|
21
|
+
return <Mermaid chart={'graph LR; A["Start"] --> B["Finish"]'} />;
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Mermaid code fences render this component automatically in authored MDX.
|