@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
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
url: /docs/components/image
|
|
7
|
+
source: apps/template/content/docs/components/image.mdx
|
|
8
|
+
related:
|
|
9
|
+
- /docs/components
|
|
10
|
+
- /docs/syntax
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Image
|
|
14
|
+
|
|
15
|
+
import { Image } from "@vercel/geistdocs/components/image";
|
|
16
|
+
|
|
17
|
+
<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">
|
|
18
|
+
<Image
|
|
19
|
+
alt="Geistdocs preview favicon"
|
|
20
|
+
className="size-16"
|
|
21
|
+
figureClassName="my-0 w-auto"
|
|
22
|
+
height={64}
|
|
23
|
+
src="/favicon.preview.ico"
|
|
24
|
+
width={64}
|
|
25
|
+
/>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
```tsx
|
|
29
|
+
import { Image } from "@vercel/geistdocs/components/image";
|
|
30
|
+
|
|
31
|
+
export function Screenshot() {
|
|
32
|
+
return <Image alt="Project dashboard" src="/dashboard.png" />;
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Pass `srcLight` and `srcDark` for theme-aware artwork. `Image` is also included in the default MDX component map.
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
url: /docs/components/index
|
|
7
|
+
source: apps/template/content/docs/components/index.mdx
|
|
8
|
+
related:
|
|
9
|
+
- /docs/syntax
|
|
10
|
+
- /docs/packages
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Components
|
|
14
|
+
|
|
15
|
+
Geistdocs exports reusable React components for application UI, custom documentation layouts, and authored content. Import from the package variant selected by your project:
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import { Button } from "@vercel/geistdocs/components/button";
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Internal projects using `@vercel/geistdocs-private` use the same component subpaths. The private package resolves primitives through Geistcn; the public package provides public equivalents.
|
|
22
|
+
|
|
23
|
+
| Component | Import subpath | Purpose |
|
|
24
|
+
| --- | --- | --- |
|
|
25
|
+
| [Badge](/docs/components/badge) | `components/badge` | Compact status and category labels |
|
|
26
|
+
| [Button](/docs/components/button) | `components/button` | Buttons and link-style actions |
|
|
27
|
+
| [Input](/docs/components/input) | `components/input` | Text input fields with provider-backed styling |
|
|
28
|
+
| [Toggle](/docs/components/toggle) | `components/toggle` | Controlled boolean controls |
|
|
29
|
+
| [Tooltip](/docs/components/tooltip) | `components/tooltip` | Contextual hover and focus labels |
|
|
30
|
+
| [Toast](/docs/components/toast) | `components/toasts` | Global success, warning, and error notifications |
|
|
31
|
+
| [Theme Switcher](/docs/components/theme-switcher) | `components/theme-switcher` | System, light, and dark theme selection |
|
|
32
|
+
| [Tabs](/docs/components/tabs) | `components/tabs`, `components/tabs-with-children` | Tab navigation and mounted content panels |
|
|
33
|
+
| [Collapsible](/docs/components/collapsible) | `components/collapsible` | Expandable content regions |
|
|
34
|
+
| [Details](/docs/components/details) | `components/details` | Styled native disclosure elements |
|
|
35
|
+
| [Callout](/docs/components/callout) | `components/callout` | Notices with optional titles and descriptions |
|
|
36
|
+
| [Code Block](/docs/components/code-block) | `components/code-block`, `components/code-block-tabs` | Highlighted code and tabbed code groups |
|
|
37
|
+
| [Command Prompt](/docs/components/command-prompt) | `components/command-prompt` | Command surfaces with copy support and alternatives |
|
|
38
|
+
| [Copy Prompt](/docs/components/copy-prompt) | `components/copy-prompt` | Copyable prompts for agents and language models |
|
|
39
|
+
| [Dropdown Menu](/docs/components/dropdown-menu) | `components/dropdown-menu` | Accessible action menus |
|
|
40
|
+
| [Navigation Menu](/docs/components/navigation-menu) | `components/navigation-menu` | Accessible navigation flyouts |
|
|
41
|
+
| [Popover](/docs/components/popover) | `components/popover` | Anchored floating content |
|
|
42
|
+
| [Scroll Area](/docs/components/scroll-area) | `components/scroll-area` | Styled overflow regions and scrollbars |
|
|
43
|
+
| [Image](/docs/components/image) | `components/image` | Next.js images with optional light and dark sources |
|
|
44
|
+
| [Native Link](/docs/components/link) | `components/link` | Styled anchors using browser-native navigation |
|
|
45
|
+
| [Mermaid](/docs/components/mermaid) | `components/mermaid` | Mermaid diagram rendering |
|
|
46
|
+
| [Video](/docs/components/video) | `components/video` | Responsive video playback |
|
|
47
|
+
| [Steps](/docs/components/steps) | `components/steps` | Numbered procedural content |
|
|
48
|
+
|
|
49
|
+
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,35 @@
|
|
|
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
|
+
url: /docs/components/input
|
|
7
|
+
source: apps/template/content/docs/components/input.mdx
|
|
8
|
+
related:
|
|
9
|
+
- /docs/components
|
|
10
|
+
- /docs/components/toggle
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Input
|
|
14
|
+
|
|
15
|
+
import { Input } from "@vercel/geistdocs/components/input";
|
|
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
|
+
<Input
|
|
19
|
+
aria-label="Project domain"
|
|
20
|
+
defaultValue="geistdocs"
|
|
21
|
+
prefix="https://"
|
|
22
|
+
suffix=".dev"
|
|
23
|
+
width={320}
|
|
24
|
+
/>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
```tsx
|
|
28
|
+
import { Input } from "@vercel/geistdocs/components/input";
|
|
29
|
+
|
|
30
|
+
export function SearchField() {
|
|
31
|
+
return <Input aria-label="Search documentation" placeholder="Search" />;
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
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,28 @@
|
|
|
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
|
+
url: /docs/components/link
|
|
7
|
+
source: apps/template/content/docs/components/link.mdx
|
|
8
|
+
related:
|
|
9
|
+
- /docs/components
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Native Link
|
|
13
|
+
|
|
14
|
+
import { NativeDocsLink } from "@vercel/geistdocs/components/link";
|
|
15
|
+
|
|
16
|
+
<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">
|
|
17
|
+
<NativeDocsLink href="/docs/getting-started">Read the getting started guide</NativeDocsLink>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { NativeDocsLink } from "@vercel/geistdocs/components/link";
|
|
22
|
+
|
|
23
|
+
export function DownloadLink() {
|
|
24
|
+
return <NativeDocsLink href="/download">Download</NativeDocsLink>;
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
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,29 @@
|
|
|
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
|
+
url: /docs/components/mermaid
|
|
7
|
+
source: apps/template/content/docs/components/mermaid.mdx
|
|
8
|
+
related:
|
|
9
|
+
- /docs/components
|
|
10
|
+
- /docs/syntax
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Mermaid
|
|
14
|
+
|
|
15
|
+
import { Mermaid } from "@vercel/geistdocs/components/mermaid";
|
|
16
|
+
|
|
17
|
+
<div className="not-prose my-6 rounded-lg border border-gray-400 bg-background-100 p-6">
|
|
18
|
+
<Mermaid chart={'graph LR; A["Start"] --> B["Finish"]'} />
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
import { Mermaid } from "@vercel/geistdocs/components/mermaid";
|
|
23
|
+
|
|
24
|
+
export function Flow() {
|
|
25
|
+
return <Mermaid chart={'graph LR; A["Start"] --> B["Finish"]'} />;
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Mermaid code fences render this component automatically in authored MDX.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Navigation Menu
|
|
3
|
+
description: Render accessible navigation links and flyout content
|
|
4
|
+
type: reference
|
|
5
|
+
summary: Compose NavigationMenu primitives for custom product and documentation navigation.
|
|
6
|
+
url: /docs/components/navigation-menu
|
|
7
|
+
source: apps/template/content/docs/components/navigation-menu.mdx
|
|
8
|
+
related:
|
|
9
|
+
- /docs/components
|
|
10
|
+
- /docs/components/dropdown-menu
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Navigation Menu
|
|
14
|
+
|
|
15
|
+
import {
|
|
16
|
+
NavigationMenu,
|
|
17
|
+
NavigationMenuContent,
|
|
18
|
+
NavigationMenuItem,
|
|
19
|
+
NavigationMenuLink,
|
|
20
|
+
NavigationMenuList,
|
|
21
|
+
NavigationMenuTrigger,
|
|
22
|
+
} from "@vercel/geistdocs/components/navigation-menu";
|
|
23
|
+
|
|
24
|
+
<div className="not-prose my-6 flex min-h-40 items-start justify-center rounded-lg border border-gray-400 bg-background-100 p-6">
|
|
25
|
+
<NavigationMenu>
|
|
26
|
+
<NavigationMenuList>
|
|
27
|
+
<NavigationMenuItem>
|
|
28
|
+
<NavigationMenuTrigger>Guides</NavigationMenuTrigger>
|
|
29
|
+
<NavigationMenuContent>
|
|
30
|
+
<NavigationMenuLink className="block w-56 p-3" href="/docs/getting-started">
|
|
31
|
+
Getting started
|
|
32
|
+
</NavigationMenuLink>
|
|
33
|
+
</NavigationMenuContent>
|
|
34
|
+
</NavigationMenuItem>
|
|
35
|
+
</NavigationMenuList>
|
|
36
|
+
</NavigationMenu>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
```tsx
|
|
40
|
+
import {
|
|
41
|
+
NavigationMenu,
|
|
42
|
+
NavigationMenuContent,
|
|
43
|
+
NavigationMenuItem,
|
|
44
|
+
NavigationMenuLink,
|
|
45
|
+
NavigationMenuList,
|
|
46
|
+
NavigationMenuTrigger,
|
|
47
|
+
} from "@vercel/geistdocs/components/navigation-menu";
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The subpath also exports `NavigationMenuIndicator`, `NavigationMenuViewport`, and `navigationMenuTriggerStyle`.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Popover
|
|
3
|
+
description: Render anchored floating content
|
|
4
|
+
type: reference
|
|
5
|
+
summary: Compose Popover, PopoverTrigger, and PopoverContent outside MDX.
|
|
6
|
+
url: /docs/components/popover
|
|
7
|
+
source: apps/template/content/docs/components/popover.mdx
|
|
8
|
+
related:
|
|
9
|
+
- /docs/components
|
|
10
|
+
- /docs/components/tooltip
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Popover
|
|
14
|
+
|
|
15
|
+
import {
|
|
16
|
+
Popover,
|
|
17
|
+
PopoverContent,
|
|
18
|
+
PopoverTrigger,
|
|
19
|
+
} from "@vercel/geistdocs/components/popover";
|
|
20
|
+
|
|
21
|
+
<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">
|
|
22
|
+
<Popover>
|
|
23
|
+
<PopoverTrigger className="h-8 rounded-md border border-gray-400 bg-background-100 px-3">
|
|
24
|
+
Open popover
|
|
25
|
+
</PopoverTrigger>
|
|
26
|
+
<PopoverContent>Additional context for this setting.</PopoverContent>
|
|
27
|
+
</Popover>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
```tsx
|
|
31
|
+
import {
|
|
32
|
+
Popover,
|
|
33
|
+
PopoverContent,
|
|
34
|
+
PopoverTrigger,
|
|
35
|
+
} from "@vercel/geistdocs/components/popover";
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Use a tooltip for short contextual labels and a popover for interactive or structured content.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Scroll Area
|
|
3
|
+
description: Render styled overflow regions and scrollbars
|
|
4
|
+
type: reference
|
|
5
|
+
summary: Compose ScrollArea and ScrollBar for constrained custom interfaces.
|
|
6
|
+
url: /docs/components/scroll-area
|
|
7
|
+
source: apps/template/content/docs/components/scroll-area.mdx
|
|
8
|
+
related:
|
|
9
|
+
- /docs/components
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Scroll Area
|
|
13
|
+
|
|
14
|
+
import {
|
|
15
|
+
ScrollArea,
|
|
16
|
+
ScrollBar,
|
|
17
|
+
} from "@vercel/geistdocs/components/scroll-area";
|
|
18
|
+
|
|
19
|
+
<div className="not-prose my-6 flex min-h-48 items-center justify-center rounded-lg border border-gray-400 bg-background-100 p-6">
|
|
20
|
+
<ScrollArea className="h-32 w-full max-w-sm rounded-md border border-gray-400 p-4">
|
|
21
|
+
<div className="space-y-3">
|
|
22
|
+
<p>Overview</p>
|
|
23
|
+
<p>Installation</p>
|
|
24
|
+
<p>Configuration</p>
|
|
25
|
+
<p>Deployment</p>
|
|
26
|
+
<p>Troubleshooting</p>
|
|
27
|
+
<p>Reference</p>
|
|
28
|
+
</div>
|
|
29
|
+
<ScrollBar />
|
|
30
|
+
</ScrollArea>
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
import {
|
|
35
|
+
ScrollArea,
|
|
36
|
+
ScrollBar,
|
|
37
|
+
} from "@vercel/geistdocs/components/scroll-area";
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Keep keyboard and native scrolling available; use the component to style overflow rather than to replace browser scrolling behavior.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Tabs
|
|
3
|
+
description: Render provider-backed tab navigation and content panels
|
|
4
|
+
type: reference
|
|
5
|
+
summary: Use Tabs for navigation-only controls or TabsWithChildren and TabContent for mounted content panels.
|
|
6
|
+
url: /docs/components/tabs
|
|
7
|
+
source: apps/template/content/docs/components/tabs.mdx
|
|
8
|
+
related:
|
|
9
|
+
- /docs/components
|
|
10
|
+
- /docs/syntax
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Tabs
|
|
14
|
+
|
|
15
|
+
import {
|
|
16
|
+
TabContent,
|
|
17
|
+
TabsWithChildren,
|
|
18
|
+
} from "@vercel/geistdocs/components/tabs-with-children";
|
|
19
|
+
|
|
20
|
+
<TabsWithChildren ariaLabel="Setup method" tabs={["Dashboard", "CLI"]}>
|
|
21
|
+
<TabContent className="mt-4 text-copy-14" order={1}>
|
|
22
|
+
Configure the project in the dashboard.
|
|
23
|
+
</TabContent>
|
|
24
|
+
<TabContent className="mt-4 text-copy-14" order={2}>
|
|
25
|
+
Run the setup command in your terminal.
|
|
26
|
+
</TabContent>
|
|
27
|
+
</TabsWithChildren>
|
|
28
|
+
|
|
29
|
+
```tsx
|
|
30
|
+
import {
|
|
31
|
+
TabContent,
|
|
32
|
+
TabsWithChildren,
|
|
33
|
+
} from "@vercel/geistdocs/components/tabs-with-children";
|
|
34
|
+
|
|
35
|
+
<TabsWithChildren ariaLabel="Setup method" tabs={["Dashboard", "CLI"]}>
|
|
36
|
+
<TabContent className="mt-4 text-copy-14" order={1}>
|
|
37
|
+
Configure the project in the dashboard.
|
|
38
|
+
</TabContent>
|
|
39
|
+
<TabContent className="mt-4 text-copy-14" order={2}>
|
|
40
|
+
Run the setup command in your terminal.
|
|
41
|
+
</TabContent>
|
|
42
|
+
</TabsWithChildren>;
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
`TabsWithChildren` associates labels with `TabContent` panels by order. Inactive content remains mounted so Markdown and search exports preserve every panel.
|
|
46
|
+
|
|
47
|
+
For a navigation-only tab list without panels, import the lower-level `Tabs` component from `@vercel/geistdocs/components/tabs`. Both forms are available in the default MDX component map.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Theme Switcher
|
|
3
|
+
description: Select the system, light, or dark display theme
|
|
4
|
+
type: reference
|
|
5
|
+
summary: Use ThemeSwitcher in custom navigation, settings, and footer UI.
|
|
6
|
+
url: /docs/components/theme-switcher
|
|
7
|
+
source: apps/template/content/docs/components/theme-switcher.mdx
|
|
8
|
+
related:
|
|
9
|
+
- /docs/components
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Theme Switcher
|
|
13
|
+
|
|
14
|
+
import { ThemeSwitcher } from "@vercel/geistdocs/components/theme-switcher";
|
|
15
|
+
|
|
16
|
+
<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">
|
|
17
|
+
<ThemeSwitcher />
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { ThemeSwitcher } from "@vercel/geistdocs/components/theme-switcher";
|
|
22
|
+
|
|
23
|
+
export function DisplaySettings() {
|
|
24
|
+
return <ThemeSwitcher />;
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Use the compact variant where space is limited:
|
|
29
|
+
|
|
30
|
+
```tsx
|
|
31
|
+
<ThemeSwitcher small />
|
|
32
|
+
```
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Toast
|
|
3
|
+
description: Show global status notifications
|
|
4
|
+
type: reference
|
|
5
|
+
summary: Trigger provider-backed success, warning, and error notifications.
|
|
6
|
+
url: /docs/components/toast
|
|
7
|
+
source: apps/template/content/docs/components/toast.mdx
|
|
8
|
+
related:
|
|
9
|
+
- /docs/components
|
|
10
|
+
- /docs/provider
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Toast
|
|
14
|
+
|
|
15
|
+
import { ToastDemo } from "@/components/geistdocs/toast-demo";
|
|
16
|
+
|
|
17
|
+
Use the buttons to preview every status variant:
|
|
18
|
+
|
|
19
|
+
<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">
|
|
20
|
+
<ToastDemo />
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
```tsx
|
|
24
|
+
"use client";
|
|
25
|
+
|
|
26
|
+
import { useToasts } from "@vercel/geistdocs/components/toasts";
|
|
27
|
+
|
|
28
|
+
export function StatusButtons() {
|
|
29
|
+
const toast = useToasts();
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<div>
|
|
33
|
+
<button onClick={() => toast.success({ text: "Changes saved" })}>
|
|
34
|
+
Success
|
|
35
|
+
</button>
|
|
36
|
+
<button
|
|
37
|
+
onClick={() => toast.warning({ text: "Review these changes" })}
|
|
38
|
+
>
|
|
39
|
+
Warning
|
|
40
|
+
</button>
|
|
41
|
+
<button onClick={() => toast.error({ text: "Something went wrong" })}>
|
|
42
|
+
Error
|
|
43
|
+
</button>
|
|
44
|
+
</div>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
`GeistdocsProvider` mounts the global toast area. Use `success`, `warning`, or `error` with a `{ text }` message from any client component below the provider.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Toggle
|
|
3
|
+
description: Render controlled boolean controls
|
|
4
|
+
type: reference
|
|
5
|
+
summary: Toggle is the provider-backed replacement for the former Switch export.
|
|
6
|
+
url: /docs/components/toggle
|
|
7
|
+
source: apps/template/content/docs/components/toggle.mdx
|
|
8
|
+
related:
|
|
9
|
+
- /docs/components
|
|
10
|
+
- /docs/components/input
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Toggle
|
|
14
|
+
|
|
15
|
+
import { ToggleDemo } from "@/components/geistdocs/toggle-demo";
|
|
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
|
+
<ToggleDemo />
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
"use client";
|
|
23
|
+
|
|
24
|
+
import { Toggle } from "@vercel/geistdocs/components/toggle";
|
|
25
|
+
import { useState } from "react";
|
|
26
|
+
|
|
27
|
+
export function Setting() {
|
|
28
|
+
const [enabled, setEnabled] = useState(false);
|
|
29
|
+
return (
|
|
30
|
+
<Toggle checked={enabled} onChange={setEnabled}>
|
|
31
|
+
Enable previews
|
|
32
|
+
</Toggle>
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Use `Toggle` and `onChange`; the v1 `Switch` and `onCheckedChange` names are not exported in Geistdocs v2.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Tooltip
|
|
3
|
+
description: Add contextual labels on hover and focus
|
|
4
|
+
type: reference
|
|
5
|
+
summary: Wrap controls with provider-backed Tooltip content outside MDX.
|
|
6
|
+
url: /docs/components/tooltip
|
|
7
|
+
source: apps/template/content/docs/components/tooltip.mdx
|
|
8
|
+
related:
|
|
9
|
+
- /docs/components
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Tooltip
|
|
13
|
+
|
|
14
|
+
import { Tooltip } from "@vercel/geistdocs/components/tooltip";
|
|
15
|
+
|
|
16
|
+
<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">
|
|
17
|
+
<Tooltip position="top" text="Copy to clipboard">
|
|
18
|
+
<button className="h-8 rounded-md border border-gray-400 bg-background-100 px-3" type="button">
|
|
19
|
+
Hover or focus
|
|
20
|
+
</button>
|
|
21
|
+
</Tooltip>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
```tsx
|
|
25
|
+
import { Tooltip } from "@vercel/geistdocs/components/tooltip";
|
|
26
|
+
|
|
27
|
+
export function Help() {
|
|
28
|
+
return (
|
|
29
|
+
<Tooltip position="top" text="Copy to clipboard">
|
|
30
|
+
<button type="button">Copy</button>
|
|
31
|
+
</Tooltip>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Provide an accessible name on icon-only triggers independently of the tooltip text.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Video
|
|
3
|
+
description: Render responsive video playback in documentation content
|
|
4
|
+
type: reference
|
|
5
|
+
summary: Use Video for embedded video sources inside React UI or authored MDX.
|
|
6
|
+
url: /docs/components/video
|
|
7
|
+
source: apps/template/content/docs/components/video.mdx
|
|
8
|
+
related:
|
|
9
|
+
- /docs/components
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Video
|
|
13
|
+
|
|
14
|
+
import { Video } from "@vercel/geistdocs/components/video";
|
|
15
|
+
|
|
16
|
+
<Video src="https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4" />
|
|
17
|
+
|
|
18
|
+
```tsx
|
|
19
|
+
import { Video } from "@vercel/geistdocs/components/video";
|
|
20
|
+
|
|
21
|
+
export function Demo() {
|
|
22
|
+
return <Video src="https://example.com/demo.mp4" />;
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
`Video` is also included in the default MDX component map.
|
package/docs/pages/index.md
CHANGED
|
@@ -97,4 +97,4 @@ Advanced projects can use package APIs for versioned docs, multiple content sour
|
|
|
97
97
|
- Read [Configuration](/docs/configuration) to customize the generated site.
|
|
98
98
|
- Read [Versioned docs](/docs/versioned-docs) to configure multiple docs versions.
|
|
99
99
|
- Read [Proxy and markdown routes](/docs/proxy) to add custom request logic.
|
|
100
|
-
- Read [
|
|
100
|
+
- Read [MDX Components](/docs/syntax) to author content with the default component map.
|
package/docs/pages/migration.md
CHANGED
|
@@ -111,12 +111,12 @@ Replace imports according to this table:
|
|
|
111
111
|
|
|
112
112
|
| Previous Geistdocs import | Replacement |
|
|
113
113
|
| --- | --- |
|
|
114
|
-
| `components/badge`, `components/button`,
|
|
115
|
-
| `components/dialog`, `components/drawer`, `components/
|
|
116
|
-
| `components/switch` |
|
|
117
|
-
| `components/sonner` | Use
|
|
114
|
+
| `components/badge`, `components/button`, `components/input`, `components/theme-switcher`, or `components/tooltip` | Keep the import package-backed. Geistdocs resolves these template primitives through the selected public or private provider. |
|
|
115
|
+
| `components/dialog`, `components/drawer`, `components/kbd`, `components/separator`, `components/sheet`, `components/spinner`, or `components/textarea` | Import the matching component directly from `@vercel/geistcn/components/<name>` in approved private projects, or keep an application-owned public equivalent. |
|
|
116
|
+
| `components/switch` | Replace `Switch` with package-backed `Toggle` from `components/toggle`, and replace `onCheckedChange` with `onChange`. |
|
|
117
|
+
| `components/sonner` | Use the package-backed `useToasts` from `components/toasts`. |
|
|
118
118
|
| `components/theme-aware-image` | Use `Image` from `@vercel/geistcn/components/image` with `srcLight` and `srcDark`. |
|
|
119
|
-
| `assets/icons`, `assets/icons/*`, `assets/logos`, or `assets/logos/*` |
|
|
119
|
+
| `assets/icons`, `assets/icons/*`, `assets/logos`, or `assets/logos/*` | Keep the import package-backed. Both Geistdocs package variants expose the index and deep asset subpaths. |
|
|
120
120
|
| `components/button-group`, `components/card`, or `components/input-group` | Use an appropriate Geistcn component or keep an application-owned composition. There is no direct Geistcn replacement with the same API. |
|
|
121
121
|
|
|
122
122
|
Keep documentation-specific composites such as `Callout`, `CodeBlock`, `CodeBlockTabs`, `CommandPrompt`, `CopyPrompt`, and `Mermaid` imported from `@vercel/geistdocs/components/*`.
|
package/docs/pages/provider.md
CHANGED
|
@@ -98,10 +98,18 @@ If Ask AI fails while rendering, its panel shows **Try again** and **Close** act
|
|
|
98
98
|
The provider includes a global toast notification system. Use it anywhere in your app:
|
|
99
99
|
|
|
100
100
|
```tsx title="page.tsx"
|
|
101
|
-
|
|
101
|
+
"use client";
|
|
102
102
|
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
import { useToasts } from "@vercel/geistdocs/components/toasts";
|
|
104
|
+
|
|
105
|
+
export function StatusActions() {
|
|
106
|
+
const toast = useToasts();
|
|
107
|
+
|
|
108
|
+
// Trigger these from your event handlers:
|
|
109
|
+
toast.success({ text: "Changes saved" });
|
|
110
|
+
toast.warning({ text: "Review these changes" });
|
|
111
|
+
toast.error({ text: "Something went wrong" });
|
|
112
|
+
}
|
|
105
113
|
```
|
|
106
114
|
|
|
107
115
|
## Analytics
|
package/docs/pages/syntax.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
3
|
-
description:
|
|
2
|
+
title: MDX Components
|
|
3
|
+
description: Author MDX content with supported components, Markdown syntax, and formatting options
|
|
4
4
|
type: reference
|
|
5
|
-
summary:
|
|
5
|
+
summary: MDX component and authoring reference covering tabs, text formatting, code blocks, line highlighting, and Mermaid diagrams.
|
|
6
6
|
url: /docs/syntax
|
|
7
7
|
source: apps/template/content/docs/syntax.mdx
|
|
8
8
|
prerequisites:
|
|
@@ -11,13 +11,13 @@ related:
|
|
|
11
11
|
- /docs/configuration
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
#
|
|
14
|
+
# MDX Components
|
|
15
15
|
|
|
16
16
|
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.
|
|
17
17
|
|
|
18
|
-
Help me write a Geistdocs MDX page. Use this page as
|
|
19
|
-
create an example page with frontmatter, headings, links, a
|
|
20
|
-
`Callout`, and a `CopyPrompt` component.
|
|
18
|
+
Help me write a Geistdocs MDX page. Use this page as an MDX component
|
|
19
|
+
reference and create an example page with frontmatter, headings, links, a
|
|
20
|
+
code block, a `Callout`, and a `CopyPrompt` component.
|
|
21
21
|
|
|
22
22
|
## Frontmatter
|
|
23
23
|
|