@vercel/geistdocs 2.6.1 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +1 -1
- 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/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 +975 -14
- 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-tabs.md +49 -0
- package/docs/pages/components/code-block.md +26 -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/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 +4 -4
- package/docs/pages/syntax.md +7 -7
- package/docs/sitemap.md +24 -1
- package/package.json +29 -1
- package/public-foundation.css +1 -1
- 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-tabs.mdx +45 -0
- package/template/content/docs/components/code-block.mdx +22 -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/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 +4 -4
- package/template/content/docs/syntax.cn.mdx +3 -3
- package/template/content/docs/syntax.mdx +7 -7
- package/template/package.json +1 -1
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.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -180,6 +180,18 @@
|
|
|
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
|
+
},
|
|
183
195
|
"./components/theme-switcher": {
|
|
184
196
|
"types": "./dist/providers/public/components/theme-switcher.d.ts",
|
|
185
197
|
"default": "./dist/providers/public/components/theme-switcher.js"
|
|
@@ -252,6 +264,22 @@
|
|
|
252
264
|
"types": "./dist/components/video.d.ts",
|
|
253
265
|
"default": "./dist/components/video.js"
|
|
254
266
|
},
|
|
267
|
+
"./assets/icons": {
|
|
268
|
+
"types": "./dist/assets/icons/index.d.ts",
|
|
269
|
+
"default": "./dist/assets/icons/index.js"
|
|
270
|
+
},
|
|
271
|
+
"./assets/icons/*": {
|
|
272
|
+
"types": "./dist/assets/icons/*.d.ts",
|
|
273
|
+
"default": "./dist/assets/icons/*.js"
|
|
274
|
+
},
|
|
275
|
+
"./assets/logos": {
|
|
276
|
+
"types": "./dist/assets/logos/index.d.ts",
|
|
277
|
+
"default": "./dist/assets/logos/index.js"
|
|
278
|
+
},
|
|
279
|
+
"./assets/logos/*": {
|
|
280
|
+
"types": "./dist/assets/logos/*.d.ts",
|
|
281
|
+
"default": "./dist/assets/logos/*.js"
|
|
282
|
+
},
|
|
255
283
|
"./styles.css": "./styles.css",
|
|
256
284
|
"./theme.css": "./theme.css",
|
|
257
285
|
"./package.json": "./package.json"
|
package/public-foundation.css
CHANGED
|
@@ -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,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Code Block Tabs
|
|
3
|
+
description: Group multiple code examples in one tabbed surface
|
|
4
|
+
type: reference
|
|
5
|
+
summary: Compose code-block tab lists, triggers, and panels outside authored MDX.
|
|
6
|
+
related:
|
|
7
|
+
- /docs/components
|
|
8
|
+
- /docs/components/code-block
|
|
9
|
+
- /docs/syntax
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
import { CodeBlock } from "@vercel/geistdocs/components/code-block";
|
|
13
|
+
import {
|
|
14
|
+
CodeBlockTab,
|
|
15
|
+
CodeBlockTabs,
|
|
16
|
+
CodeBlockTabsList,
|
|
17
|
+
CodeBlockTabsTrigger,
|
|
18
|
+
} from "@vercel/geistdocs/components/code-block-tabs";
|
|
19
|
+
|
|
20
|
+
<div className="not-prose my-6">
|
|
21
|
+
<CodeBlockTabs defaultValue="pnpm">
|
|
22
|
+
<CodeBlockTabsList>
|
|
23
|
+
<CodeBlockTabsTrigger value="pnpm">pnpm</CodeBlockTabsTrigger>
|
|
24
|
+
<CodeBlockTabsTrigger value="npm">npm</CodeBlockTabsTrigger>
|
|
25
|
+
</CodeBlockTabsList>
|
|
26
|
+
<CodeBlockTab value="pnpm">
|
|
27
|
+
<CodeBlock title="Terminal">pnpm add @vercel/geistdocs</CodeBlock>
|
|
28
|
+
</CodeBlockTab>
|
|
29
|
+
<CodeBlockTab value="npm">
|
|
30
|
+
<CodeBlock title="Terminal">npm install @vercel/geistdocs</CodeBlock>
|
|
31
|
+
</CodeBlockTab>
|
|
32
|
+
</CodeBlockTabs>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
```tsx
|
|
36
|
+
import {
|
|
37
|
+
CodeBlockTab,
|
|
38
|
+
CodeBlockTabs,
|
|
39
|
+
CodeBlockTabsList,
|
|
40
|
+
CodeBlockTabsTrigger,
|
|
41
|
+
CompactCodeBlockTabs,
|
|
42
|
+
} from "@vercel/geistdocs/components/code-block-tabs";
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The same components are available without imports in authored MDX.
|
|
@@ -0,0 +1,22 @@
|
|
|
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/components/code-block-tabs
|
|
9
|
+
- /docs/syntax
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
import { CodeBlock } from "@vercel/geistdocs/components/code-block";
|
|
13
|
+
|
|
14
|
+
<div className="not-prose my-6">
|
|
15
|
+
<CodeBlock title="example.ts">{'export const enabled = true;'}</CodeBlock>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
```tsx
|
|
19
|
+
import { CodeBlock } from "@vercel/geistdocs/components/code-block";
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
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.
|
|
@@ -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
|
+
| [Theme Switcher](/docs/components/theme-switcher) | `components/theme-switcher` | System, light, and dark theme selection |
|
|
27
|
+
| [Tabs](/docs/components/tabs) | `components/tabs`, `components/tabs-with-children` | Tab navigation and mounted content panels |
|
|
28
|
+
| [Collapsible](/docs/components/collapsible) | `components/collapsible` | Expandable content regions |
|
|
29
|
+
| [Details](/docs/components/details) | `components/details` | Styled native disclosure elements |
|
|
30
|
+
| [Callout](/docs/components/callout) | `components/callout` | Notices with optional titles and descriptions |
|
|
31
|
+
| [Code Block](/docs/components/code-block) | `components/code-block` | Highlighted code with filename and copy controls |
|
|
32
|
+
| [Code Block Tabs](/docs/components/code-block-tabs) | `components/code-block-tabs` | Multiple code examples in one tabbed surface |
|
|
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.
|
|
@@ -1,4 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"title": "Components",
|
|
3
|
-
"pages": [
|
|
3
|
+
"pages": [
|
|
4
|
+
"badge",
|
|
5
|
+
"button",
|
|
6
|
+
"input",
|
|
7
|
+
"toggle",
|
|
8
|
+
"tooltip",
|
|
9
|
+
"theme-switcher",
|
|
10
|
+
"tabs",
|
|
11
|
+
"collapsible",
|
|
12
|
+
"details",
|
|
13
|
+
"callout",
|
|
14
|
+
"code-block",
|
|
15
|
+
"code-block-tabs",
|
|
16
|
+
"command-prompt",
|
|
17
|
+
"copy-prompt",
|
|
18
|
+
"dropdown-menu",
|
|
19
|
+
"navigation-menu",
|
|
20
|
+
"popover",
|
|
21
|
+
"scroll-area",
|
|
22
|
+
"image",
|
|
23
|
+
"link",
|
|
24
|
+
"mermaid",
|
|
25
|
+
"video",
|
|
26
|
+
"steps"
|
|
27
|
+
]
|
|
4
28
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
related:
|
|
7
|
+
- /docs/components
|
|
8
|
+
- /docs/components/dropdown-menu
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
NavigationMenu,
|
|
13
|
+
NavigationMenuContent,
|
|
14
|
+
NavigationMenuItem,
|
|
15
|
+
NavigationMenuLink,
|
|
16
|
+
NavigationMenuList,
|
|
17
|
+
NavigationMenuTrigger,
|
|
18
|
+
} from "@vercel/geistdocs/components/navigation-menu";
|
|
19
|
+
|
|
20
|
+
<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">
|
|
21
|
+
<NavigationMenu>
|
|
22
|
+
<NavigationMenuList>
|
|
23
|
+
<NavigationMenuItem>
|
|
24
|
+
<NavigationMenuTrigger>Guides</NavigationMenuTrigger>
|
|
25
|
+
<NavigationMenuContent>
|
|
26
|
+
<NavigationMenuLink className="block w-56 p-3" href="/docs/getting-started">
|
|
27
|
+
Getting started
|
|
28
|
+
</NavigationMenuLink>
|
|
29
|
+
</NavigationMenuContent>
|
|
30
|
+
</NavigationMenuItem>
|
|
31
|
+
</NavigationMenuList>
|
|
32
|
+
</NavigationMenu>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
```tsx
|
|
36
|
+
import {
|
|
37
|
+
NavigationMenu,
|
|
38
|
+
NavigationMenuContent,
|
|
39
|
+
NavigationMenuItem,
|
|
40
|
+
NavigationMenuLink,
|
|
41
|
+
NavigationMenuList,
|
|
42
|
+
NavigationMenuTrigger,
|
|
43
|
+
} from "@vercel/geistdocs/components/navigation-menu";
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The subpath also exports `NavigationMenuIndicator`, `NavigationMenuViewport`, and `navigationMenuTriggerStyle`.
|