@vercel/geistdocs 1.2.3-canary.48fea3c → 1.2.3-canary.73598cf
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/assets/icons/icon-arrow-up-right-small.d.ts +8 -0
- package/dist/assets/icons/icon-arrow-up-right-small.d.ts.map +1 -0
- package/dist/assets/icons/icon-arrow-up-right-small.js +4 -0
- package/dist/assets/icons/icon-arrow-up-right.d.ts +5 -0
- package/dist/assets/icons/icon-arrow-up-right.d.ts.map +1 -0
- package/dist/assets/icons/icon-arrow-up-right.js +4 -0
- package/dist/assets/icons/icon-check.d.ts +5 -0
- package/dist/assets/icons/icon-check.d.ts.map +1 -0
- package/dist/assets/icons/icon-check.js +4 -0
- package/dist/assets/icons/icon-chevron-down-small.d.ts +8 -0
- package/dist/assets/icons/icon-chevron-down-small.d.ts.map +1 -0
- package/dist/assets/icons/icon-chevron-down-small.js +7 -0
- package/dist/assets/icons/icon-chevron-right.d.ts +5 -0
- package/dist/assets/icons/icon-chevron-right.d.ts.map +1 -0
- package/dist/assets/icons/icon-chevron-right.js +4 -0
- package/dist/assets/icons/icon-copy.d.ts +5 -0
- package/dist/assets/icons/icon-copy.d.ts.map +1 -0
- package/dist/assets/icons/icon-copy.js +4 -0
- package/dist/assets/icons/icon-file-text.d.ts +5 -0
- package/dist/assets/icons/icon-file-text.d.ts.map +1 -0
- package/dist/assets/icons/icon-file-text.js +4 -0
- package/dist/assets/icons/icon-menu-alt.d.ts +5 -0
- package/dist/assets/icons/icon-menu-alt.d.ts.map +1 -0
- package/dist/assets/icons/icon-menu-alt.js +4 -0
- package/dist/assets/icons/icon-slash-forward.d.ts +8 -0
- package/dist/assets/icons/icon-slash-forward.d.ts.map +1 -0
- package/dist/assets/icons/icon-slash-forward.js +4 -0
- package/dist/assets/icons/index.d.ts +10 -0
- package/dist/assets/icons/index.d.ts.map +1 -0
- package/{template/components/geistcn-fallbacks/geistcn-assets/icons/index.tsx → dist/assets/icons/index.js} +0 -1
- package/dist/assets/logos/index.d.ts +15 -0
- package/dist/assets/logos/index.d.ts.map +1 -0
- package/{template/components/geistcn-fallbacks/geistcn-assets/logos/index.tsx → dist/assets/logos/index.js} +2 -1
- package/dist/assets/logos/logo-ai-elements.d.ts +8 -0
- package/dist/assets/logos/logo-ai-elements.d.ts.map +1 -0
- package/dist/assets/logos/logo-ai-elements.js +8 -0
- package/dist/assets/logos/logo-ai-sdk.d.ts +8 -0
- package/dist/assets/logos/logo-ai-sdk.d.ts.map +1 -0
- package/dist/assets/logos/logo-ai-sdk.js +8 -0
- package/dist/assets/logos/logo-chat-sdk.d.ts +8 -0
- package/dist/assets/logos/logo-chat-sdk.d.ts.map +1 -0
- package/dist/assets/logos/logo-chat-sdk.js +8 -0
- package/dist/assets/logos/logo-flags-sdk.d.ts +8 -0
- package/dist/assets/logos/logo-flags-sdk.d.ts.map +1 -0
- package/dist/assets/logos/logo-flags-sdk.js +8 -0
- package/dist/assets/logos/logo-icon-vercel.d.ts +9 -0
- package/dist/assets/logos/logo-icon-vercel.d.ts.map +1 -0
- package/dist/assets/logos/logo-icon-vercel.js +8 -0
- package/dist/assets/logos/logo-nextjs.d.ts +8 -0
- package/dist/assets/logos/logo-nextjs.d.ts.map +1 -0
- package/dist/assets/logos/logo-nextjs.js +7 -0
- package/dist/assets/logos/logo-streamdown.d.ts +8 -0
- package/dist/assets/logos/logo-streamdown.d.ts.map +1 -0
- package/dist/assets/logos/logo-streamdown.js +8 -0
- package/dist/assets/logos/logo-svelte-kit.d.ts +8 -0
- package/dist/assets/logos/logo-svelte-kit.d.ts.map +1 -0
- package/dist/assets/logos/logo-svelte-kit.js +7 -0
- package/dist/assets/logos/logo-vercel-oss.d.ts +8 -0
- package/dist/assets/logos/logo-vercel-oss.d.ts.map +1 -0
- package/dist/assets/logos/logo-vercel-oss.js +7 -0
- package/dist/assets/logos/logo-workflow-sdk.d.ts +8 -0
- package/dist/assets/logos/logo-workflow-sdk.d.ts.map +1 -0
- package/dist/assets/logos/logo-workflow-sdk.js +8 -0
- package/dist/cli/index.js +1 -1
- package/dist/components/button-group.d.ts +2 -0
- package/dist/components/button-group.d.ts.map +1 -0
- package/dist/components/button-group.js +2 -0
- package/dist/components/button.d.ts +2 -0
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +2 -0
- package/dist/components/card.d.ts +2 -0
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.js +2 -0
- package/dist/components/code-block-tabs.js +3 -3
- package/dist/components/code-block.js +3 -3
- package/dist/components/collapsible.d.ts +2 -0
- package/dist/components/collapsible.d.ts.map +1 -0
- package/dist/components/collapsible.js +3 -0
- package/dist/components/copy-prompt.js +3 -3
- package/dist/components/dialog.d.ts +13 -0
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +35 -0
- package/dist/components/drawer.d.ts +2 -0
- package/dist/components/drawer.d.ts.map +1 -0
- package/dist/components/drawer.js +3 -0
- package/dist/components/dropdown-menu.d.ts +2 -0
- package/dist/components/dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu.js +3 -0
- package/dist/components/input-group.d.ts +2 -0
- package/dist/components/input-group.d.ts.map +1 -0
- package/dist/components/input-group.js +3 -0
- package/dist/components/input.d.ts +2 -0
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +2 -0
- package/dist/components/kbd.d.ts +2 -0
- package/dist/components/kbd.d.ts.map +1 -0
- package/dist/components/kbd.js +2 -0
- package/dist/components/navigation-menu.d.ts +2 -0
- package/dist/components/navigation-menu.d.ts.map +1 -0
- package/dist/components/navigation-menu.js +3 -0
- package/dist/components/popover.d.ts +2 -0
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.js +3 -0
- package/dist/components/scroll-area.d.ts +2 -0
- package/dist/components/scroll-area.d.ts.map +1 -0
- package/dist/components/scroll-area.js +3 -0
- package/dist/components/separator.d.ts +2 -0
- package/dist/components/separator.d.ts.map +1 -0
- package/dist/components/separator.js +3 -0
- package/dist/components/sheet.d.ts +2 -0
- package/dist/components/sheet.d.ts.map +1 -0
- package/dist/components/sheet.js +3 -0
- package/dist/components/sonner.d.ts +2 -0
- package/dist/components/sonner.d.ts.map +1 -0
- package/dist/components/sonner.js +3 -0
- package/dist/components/spinner.d.ts +2 -0
- package/dist/components/spinner.d.ts.map +1 -0
- package/dist/components/spinner.js +2 -0
- package/dist/components/textarea.d.ts +2 -0
- package/dist/components/textarea.d.ts.map +1 -0
- package/dist/components/textarea.js +2 -0
- package/dist/components/tooltip.d.ts +2 -0
- package/dist/components/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip.js +3 -0
- package/dist/config.d.ts +47 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/controls.js +4 -4
- package/dist/footer.d.ts +8 -0
- package/dist/footer.d.ts.map +1 -0
- package/dist/footer.js +6 -0
- package/dist/home-layout.d.ts +11 -0
- package/dist/home-layout.d.ts.map +1 -0
- package/dist/home-layout.js +31 -0
- package/dist/internal/chat/conversation.js +1 -1
- package/dist/internal/chat/message.js +1 -1
- package/dist/internal/chat/prompt-input.js +1 -1
- package/dist/internal/chat/shell.d.ts.map +1 -1
- package/dist/internal/chat/shell.js +6 -5
- package/dist/internal/chat/sources.js +1 -1
- package/dist/internal/config-context.d.ts +10 -0
- package/dist/internal/config-context.d.ts.map +1 -0
- package/dist/internal/config-context.js +15 -0
- package/dist/internal/footer/github-button.d.ts +7 -0
- package/dist/internal/footer/github-button.d.ts.map +1 -0
- package/dist/internal/footer/github-button.js +10 -0
- package/dist/internal/footer/rss-button.d.ts +2 -0
- package/dist/internal/footer/rss-button.d.ts.map +1 -0
- package/dist/internal/footer/rss-button.js +4 -0
- package/dist/internal/localized-link.d.ts +8 -0
- package/dist/internal/localized-link.d.ts.map +1 -0
- package/dist/internal/localized-link.js +13 -0
- package/dist/internal/navbar/desktop-menu.d.ts +10 -0
- package/dist/internal/navbar/desktop-menu.d.ts.map +1 -0
- package/dist/internal/navbar/desktop-menu.js +11 -0
- package/dist/internal/navbar/mobile-menu.d.ts +7 -0
- package/dist/internal/navbar/mobile-menu.d.ts.map +1 -0
- package/dist/internal/navbar/mobile-menu.js +44 -0
- package/dist/internal/navbar/navbar-logo.d.ts +16 -0
- package/dist/internal/navbar/navbar-logo.d.ts.map +1 -0
- package/dist/internal/navbar/navbar-logo.js +30 -0
- package/dist/internal/page-actions-client.d.ts.map +1 -1
- package/dist/internal/page-actions-client.js +17 -6
- package/dist/internal/page-visibility.d.ts +18 -0
- package/dist/internal/page-visibility.d.ts.map +1 -0
- package/dist/internal/page-visibility.js +24 -0
- package/dist/internal/provider-client.d.ts +1 -1
- package/dist/internal/provider-client.d.ts.map +1 -1
- package/dist/internal/provider-client.js +2 -1
- package/dist/internal/sidebar.js +3 -3
- package/dist/internal/ui/button-group.js +2 -2
- package/dist/internal/ui/button.d.ts +1 -1
- package/dist/internal/ui/button.d.ts.map +1 -1
- package/dist/internal/ui/button.js +7 -7
- package/dist/internal/ui/card.js +1 -1
- package/dist/internal/ui/drawer.js +1 -1
- package/dist/internal/ui/dropdown-menu.js +7 -7
- package/dist/internal/ui/input-group.js +2 -2
- package/dist/internal/ui/input.js +1 -1
- package/dist/internal/ui/kbd.js +1 -1
- package/dist/internal/ui/navigation-menu.d.ts +17 -0
- package/dist/internal/ui/navigation-menu.d.ts.map +1 -0
- package/dist/internal/ui/navigation-menu.js +38 -0
- package/dist/internal/ui/popover.js +1 -1
- package/dist/internal/ui/scroll-area.js +2 -2
- package/dist/internal/ui/separator.js +1 -1
- package/dist/internal/ui/sheet.js +4 -4
- package/dist/internal/ui/sonner.js +3 -3
- package/dist/internal/ui/textarea.js +1 -1
- package/dist/internal/ui/tooltip.js +1 -1
- package/dist/mdx.d.ts +55 -24
- package/dist/mdx.d.ts.map +1 -1
- package/dist/mdx.js +7 -46
- package/dist/mobile-docs-bar.d.ts +7 -0
- package/dist/mobile-docs-bar.d.ts.map +1 -0
- package/dist/mobile-docs-bar.js +13 -0
- package/dist/navbar.d.ts +7 -0
- package/dist/navbar.d.ts.map +1 -0
- package/dist/navbar.js +10 -0
- package/dist/pages/docs.d.ts +8 -2
- package/dist/pages/docs.d.ts.map +1 -1
- package/dist/pages/docs.js +13 -7
- package/dist/proxy.d.ts +1 -1
- package/dist/proxy.d.ts.map +1 -1
- package/dist/proxy.js +29 -2
- package/dist/routes/agents.d.ts +21 -0
- package/dist/routes/agents.d.ts.map +1 -0
- package/dist/routes/agents.js +201 -0
- package/dist/routes/chat.d.ts +7 -2
- package/dist/routes/chat.d.ts.map +1 -1
- package/dist/routes/chat.js +373 -65
- package/dist/routes/llms.d.ts +6 -5
- package/dist/routes/llms.d.ts.map +1 -1
- package/dist/routes/llms.js +63 -12
- package/dist/routes/search.d.ts +6 -4
- package/dist/routes/search.d.ts.map +1 -1
- package/dist/routes/search.js +8 -1
- package/dist/routes/sitemap.d.ts +6 -3
- package/dist/routes/sitemap.d.ts.map +1 -1
- package/dist/routes/sitemap.js +10 -2
- package/dist/shiki-theme.d.ts +20 -0
- package/dist/shiki-theme.d.ts.map +1 -0
- package/dist/shiki-theme.js +110 -0
- package/dist/source-config.d.ts +68 -0
- package/dist/source-config.d.ts.map +1 -0
- package/dist/source-config.js +161 -0
- package/dist/source.d.ts +8 -1
- package/dist/source.d.ts.map +1 -1
- package/dist/source.js +14 -1
- package/dist/versions.d.ts +31 -1
- package/dist/versions.d.ts.map +1 -1
- package/dist/versions.js +56 -29
- package/package.json +126 -5
- package/source-config.js +174 -0
- package/styles.css +465 -102
- package/template/AGENTS.md +95 -0
- package/template/app/[lang]/(home)/components/centered-section.tsx +1 -3
- package/template/app/[lang]/(home)/components/hero.tsx +2 -2
- package/template/app/[lang]/(home)/components/one-two-section.tsx +1 -3
- package/template/app/[lang]/(home)/components/templates.tsx +3 -5
- package/template/app/[lang]/(home)/components/text-grid-section.tsx +1 -1
- package/template/app/[lang]/(home)/layout.tsx +4 -3
- package/template/app/[lang]/(home)/page.tsx +2 -2
- package/template/app/[lang]/agents.md/route.ts +6 -0
- package/template/app/[lang]/docs/[[...slug]]/page.tsx +4 -1
- package/template/app/[lang]/layout.tsx +6 -6
- package/template/app/[lang]/llms.mdx/[[...slug]]/route.ts +1 -1
- package/template/app/[lang]/sitemap.md/route.ts +2 -2
- package/template/app/api/chat/route.ts +11 -0
- package/template/app/api/search/route.ts +2 -2
- package/template/app/styles/geistdocs.css +150 -109
- package/template/components/ui/badge.tsx +5 -5
- package/template/components/ui/button.tsx +7 -7
- package/template/components/ui/command-prompt.tsx +2 -2
- package/template/content/docs/agent-readiness.mdx +103 -0
- package/template/content/docs/ask-ai.mdx +55 -3
- package/template/content/docs/configuration.mdx +77 -2
- package/template/content/docs/deployment.mdx +11 -0
- package/template/content/docs/env.mdx +36 -5
- package/template/content/docs/getting-started.mdx +8 -1
- package/template/content/docs/index.mdx +5 -0
- package/template/content/docs/llms-txt.mdx +1 -0
- package/template/content/docs/md.mdx +2 -1
- package/template/content/docs/meta.json +2 -0
- package/template/content/docs/migration.mdx +364 -0
- package/template/content/docs/proxy.cn.mdx +1 -1
- package/template/content/docs/proxy.mdx +56 -2
- package/template/content/docs/theme-aware-image.mdx +1 -1
- package/template/content/docs/versioned-docs.mdx +49 -2
- package/template/geistdocs.tsx +26 -0
- package/template/lib/geistdocs/config.tsx +3 -0
- package/template/package.json +5 -5
- package/template/proxy.ts +1 -2
- package/template/source.config.ts +8 -47
- package/template/app/actions/feedback/emotions.ts +0 -18
- package/template/app/actions/feedback/index.ts +0 -45
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right-small.tsx +0 -35
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right.tsx +0 -27
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-check.tsx +0 -27
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-down-small.tsx +0 -30
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-right.tsx +0 -27
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-copy.tsx +0 -27
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-file-text.tsx +0 -25
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-menu-alt.tsx +0 -27
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-slash-forward.tsx +0 -36
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-elements.tsx +0 -29
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-sdk.tsx +0 -38
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-chat-sdk.tsx +0 -42
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-flags-sdk.tsx +0 -42
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-icon-vercel.tsx +0 -31
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-streamdown.tsx +0 -29
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-vercel-oss.tsx +0 -24
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-workflow-sdk.tsx +0 -73
- package/template/components/geistdocs/callout.tsx +0 -40
- package/template/components/geistdocs/chat.tsx +0 -24
- package/template/components/geistdocs/code-block-tabs.tsx +0 -61
- package/template/components/geistdocs/code-block.tsx +0 -134
- package/template/components/geistdocs/copy-page.tsx +0 -27
- package/template/components/geistdocs/desktop-menu.tsx +0 -52
- package/template/components/geistdocs/docs-page.tsx +0 -35
- package/template/components/geistdocs/edit-source.tsx +0 -30
- package/template/components/geistdocs/feedback.tsx +0 -139
- package/template/components/geistdocs/footer.tsx +0 -30
- package/template/components/geistdocs/github-button.tsx +0 -19
- package/template/components/geistdocs/home-layout.tsx +0 -46
- package/template/components/geistdocs/icons.tsx +0 -13
- package/template/components/geistdocs/installer.tsx +0 -58
- package/template/components/geistdocs/language-selector.tsx +0 -3
- package/template/components/geistdocs/mermaid.tsx +0 -68
- package/template/components/geistdocs/mobile-docs-bar.tsx +0 -77
- package/template/components/geistdocs/mobile-menu.tsx +0 -150
- package/template/components/geistdocs/navbar-logo.tsx +0 -124
- package/template/components/geistdocs/navbar.tsx +0 -22
- package/template/components/geistdocs/rss-button.tsx +0 -10
- package/template/components/geistdocs/scroll-top.tsx +0 -21
- package/template/components/geistdocs/search.tsx +0 -17
- package/template/components/geistdocs/sidebar.tsx +0 -128
- package/template/components/geistdocs/theme-aware-image.tsx +0 -22
- package/template/components/geistdocs/theme-toggle.tsx +0 -3
- package/template/components/geistdocs/video.tsx +0 -16
- package/template/components/ui/button-group.tsx +0 -83
- package/template/components/ui/card.tsx +0 -92
- package/template/components/ui/collapsible.tsx +0 -33
- package/template/components/ui/command.tsx +0 -184
- package/template/components/ui/dialog.tsx +0 -143
- package/template/components/ui/drawer.tsx +0 -135
- package/template/components/ui/dropdown-menu.tsx +0 -257
- package/template/components/ui/hover-card.tsx +0 -44
- package/template/components/ui/input-group.tsx +0 -170
- package/template/components/ui/input.tsx +0 -21
- package/template/components/ui/kbd.tsx +0 -28
- package/template/components/ui/navigation-menu.tsx +0 -192
- package/template/components/ui/popover.tsx +0 -48
- package/template/components/ui/scroll-area.tsx +0 -58
- package/template/components/ui/select.tsx +0 -187
- package/template/components/ui/separator.tsx +0 -28
- package/template/components/ui/sheet.tsx +0 -139
- package/template/components/ui/sonner.tsx +0 -40
- package/template/components/ui/spinner.tsx +0 -16
- package/template/components/ui/textarea.tsx +0 -18
- package/template/components/ui/tooltip.tsx +0 -61
- package/template/hooks/geistdocs/use-sidebar.ts +0 -13
- package/template/hooks/use-mobile.ts +0 -19
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { DocsLayout as FumadocsDocsLayout } from "fumadocs-ui/layouts/docs";
|
|
2
|
-
import type { ComponentProps, CSSProperties, ReactNode } from "react";
|
|
3
|
-
import { i18n } from "@/lib/geistdocs/i18n";
|
|
4
|
-
import { Folder, Item, Separator, Sidebar } from "./sidebar";
|
|
5
|
-
|
|
6
|
-
interface HomeLayoutProps {
|
|
7
|
-
children: ReactNode;
|
|
8
|
-
tree: ComponentProps<typeof FumadocsDocsLayout>["tree"];
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const HomeLayout = ({ tree, children }: HomeLayoutProps) => (
|
|
12
|
-
<FumadocsDocsLayout
|
|
13
|
-
containerProps={{
|
|
14
|
-
className: "p-0! max-w-full mx-0 [&_[data-sidebar-placeholder]]:hidden",
|
|
15
|
-
style: {
|
|
16
|
-
display: "flex",
|
|
17
|
-
flexDirection: "column",
|
|
18
|
-
"--fd-docs-row-1": "4rem",
|
|
19
|
-
} as CSSProperties,
|
|
20
|
-
}}
|
|
21
|
-
i18n={i18n}
|
|
22
|
-
nav={{
|
|
23
|
-
enabled: false,
|
|
24
|
-
}}
|
|
25
|
-
searchToggle={{
|
|
26
|
-
enabled: false,
|
|
27
|
-
}}
|
|
28
|
-
sidebar={{
|
|
29
|
-
className: "md:hidden",
|
|
30
|
-
collapsible: false,
|
|
31
|
-
component: <Sidebar />,
|
|
32
|
-
components: {
|
|
33
|
-
Folder,
|
|
34
|
-
Item,
|
|
35
|
-
Separator,
|
|
36
|
-
},
|
|
37
|
-
}}
|
|
38
|
-
tabMode="auto"
|
|
39
|
-
themeSwitch={{
|
|
40
|
-
enabled: false,
|
|
41
|
-
}}
|
|
42
|
-
tree={tree}
|
|
43
|
-
>
|
|
44
|
-
{children}
|
|
45
|
-
</FumadocsDocsLayout>
|
|
46
|
-
);
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { ComponentProps } from "react";
|
|
2
|
-
|
|
3
|
-
export const SlashIcon = (props: ComponentProps<"svg">) => (
|
|
4
|
-
<svg aria-hidden="true" strokeLinejoin="round" viewBox="0 0 16 16" {...props}>
|
|
5
|
-
<title>Slash</title>
|
|
6
|
-
<path
|
|
7
|
-
clipRule="evenodd"
|
|
8
|
-
d="M4.01526 15.3939L4.3107 14.7046L10.3107 0.704556L10.6061 0.0151978L11.9849 0.606077L11.6894 1.29544L5.68942 15.2954L5.39398 15.9848L4.01526 15.3939Z"
|
|
9
|
-
fill="currentColor"
|
|
10
|
-
fillRule="evenodd"
|
|
11
|
-
/>
|
|
12
|
-
</svg>
|
|
13
|
-
);
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { track } from "@vercel/analytics";
|
|
4
|
-
import { CheckIcon, CopyIcon } from "lucide-react";
|
|
5
|
-
import { useState } from "react";
|
|
6
|
-
import { toast } from "sonner";
|
|
7
|
-
import {
|
|
8
|
-
InputGroup,
|
|
9
|
-
InputGroupAddon,
|
|
10
|
-
InputGroupButton,
|
|
11
|
-
InputGroupInput,
|
|
12
|
-
InputGroupText,
|
|
13
|
-
} from "@/components/ui/input-group";
|
|
14
|
-
|
|
15
|
-
const COPY_TIMEOUT = 2000;
|
|
16
|
-
|
|
17
|
-
interface InstallerProps {
|
|
18
|
-
className?: string;
|
|
19
|
-
command: string;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export const Installer = ({ command, className = "w-48" }: InstallerProps) => {
|
|
23
|
-
const [copied, setCopied] = useState(false);
|
|
24
|
-
|
|
25
|
-
const handleCopy = () => {
|
|
26
|
-
navigator.clipboard.writeText(command);
|
|
27
|
-
toast.success("Copied to clipboard");
|
|
28
|
-
setCopied(true);
|
|
29
|
-
|
|
30
|
-
track("Copied installer command");
|
|
31
|
-
setTimeout(() => {
|
|
32
|
-
setCopied(false);
|
|
33
|
-
}, COPY_TIMEOUT);
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
const Icon = copied ? CheckIcon : CopyIcon;
|
|
37
|
-
|
|
38
|
-
return (
|
|
39
|
-
<InputGroup className="h-10 bg-background font-mono shadow-none">
|
|
40
|
-
<InputGroupAddon>
|
|
41
|
-
<InputGroupText className="font-normal text-muted-foreground">
|
|
42
|
-
$
|
|
43
|
-
</InputGroupText>
|
|
44
|
-
</InputGroupAddon>
|
|
45
|
-
<InputGroupInput className={className} readOnly value={command} />
|
|
46
|
-
<InputGroupAddon align="inline-end">
|
|
47
|
-
<InputGroupButton
|
|
48
|
-
aria-label="Copy"
|
|
49
|
-
onClick={handleCopy}
|
|
50
|
-
size="icon-xs"
|
|
51
|
-
title="Copy"
|
|
52
|
-
>
|
|
53
|
-
<Icon className="size-3.5" size={14} />
|
|
54
|
-
</InputGroupButton>
|
|
55
|
-
</InputGroupAddon>
|
|
56
|
-
</InputGroup>
|
|
57
|
-
);
|
|
58
|
-
};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { useTheme } from "next-themes";
|
|
4
|
-
import { use, useEffect, useId, useState } from "react";
|
|
5
|
-
|
|
6
|
-
export const Mermaid = ({ chart }: { chart: string }) => {
|
|
7
|
-
const [mounted, setMounted] = useState(false);
|
|
8
|
-
|
|
9
|
-
useEffect(() => {
|
|
10
|
-
setMounted(true);
|
|
11
|
-
}, []);
|
|
12
|
-
|
|
13
|
-
if (!mounted) {
|
|
14
|
-
return null;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
return <MermaidContent chart={chart} />;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const cache = new Map<string, Promise<unknown>>();
|
|
21
|
-
|
|
22
|
-
function cachePromise<T>(
|
|
23
|
-
key: string,
|
|
24
|
-
setPromise: () => Promise<T>
|
|
25
|
-
): Promise<T> {
|
|
26
|
-
const cached = cache.get(key);
|
|
27
|
-
if (cached) {
|
|
28
|
-
return cached as Promise<T>;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const promise = setPromise();
|
|
32
|
-
cache.set(key, promise);
|
|
33
|
-
return promise;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function MermaidContent({ chart }: { chart: string }) {
|
|
37
|
-
const id = useId();
|
|
38
|
-
const { resolvedTheme } = useTheme();
|
|
39
|
-
const { default: mermaid } = use(
|
|
40
|
-
cachePromise("mermaid", () => import("mermaid"))
|
|
41
|
-
);
|
|
42
|
-
|
|
43
|
-
mermaid.initialize({
|
|
44
|
-
startOnLoad: false,
|
|
45
|
-
securityLevel: "loose",
|
|
46
|
-
fontFamily: "inherit",
|
|
47
|
-
themeCSS: "margin: 1.5rem auto 0;",
|
|
48
|
-
theme: resolvedTheme === "dark" ? "dark" : "default",
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
const { svg, bindFunctions } = use(
|
|
52
|
-
cachePromise(`${chart}-${resolvedTheme}`, () =>
|
|
53
|
-
mermaid.render(id, chart.replaceAll("\\n", "\n"))
|
|
54
|
-
)
|
|
55
|
-
);
|
|
56
|
-
|
|
57
|
-
return (
|
|
58
|
-
<div
|
|
59
|
-
// biome-ignore lint/security/noDangerouslySetInnerHtml: "this is needed."
|
|
60
|
-
dangerouslySetInnerHTML={{ __html: svg }}
|
|
61
|
-
ref={(container) => {
|
|
62
|
-
if (container) {
|
|
63
|
-
bindFunctions?.(container);
|
|
64
|
-
}
|
|
65
|
-
}}
|
|
66
|
-
/>
|
|
67
|
-
);
|
|
68
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { useGeistdocsSidebar } from "@vercel/geistdocs/sidebar";
|
|
4
|
-
import type { TableOfContents } from "fumadocs-core/toc";
|
|
5
|
-
import { useState } from "react";
|
|
6
|
-
import { IconFileText } from "@/components/geistcn-fallbacks/geistcn-assets/icons/icon-file-text";
|
|
7
|
-
import { IconMenuAlt } from "@/components/geistcn-fallbacks/geistcn-assets/icons/icon-menu-alt";
|
|
8
|
-
import {
|
|
9
|
-
Sheet,
|
|
10
|
-
SheetContent,
|
|
11
|
-
SheetDescription,
|
|
12
|
-
SheetHeader,
|
|
13
|
-
} from "@/components/ui/sheet";
|
|
14
|
-
import { cn } from "@/lib/utils";
|
|
15
|
-
|
|
16
|
-
interface MobileDocsBarProps {
|
|
17
|
-
toc?: TableOfContents;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export const MobileDocsBar = ({ toc }: MobileDocsBarProps) => {
|
|
21
|
-
const { setIsOpen: setSidebarOpen } = useGeistdocsSidebar();
|
|
22
|
-
const [tocOpen, setTocOpen] = useState(false);
|
|
23
|
-
|
|
24
|
-
return (
|
|
25
|
-
<div className="sticky top-16 z-30 -mx-6 -mt-6 mb-6 flex h-[54px] items-center justify-between border-b bg-background-100 px-6 md:hidden">
|
|
26
|
-
<button
|
|
27
|
-
className="flex items-center gap-3 text-base text-gray-1000"
|
|
28
|
-
onClick={() => setSidebarOpen(true)}
|
|
29
|
-
type="button"
|
|
30
|
-
>
|
|
31
|
-
<IconMenuAlt size={16} />
|
|
32
|
-
Menu
|
|
33
|
-
</button>
|
|
34
|
-
|
|
35
|
-
{toc && toc.length > 0 && (
|
|
36
|
-
<>
|
|
37
|
-
<button
|
|
38
|
-
aria-label="Table of contents"
|
|
39
|
-
className="flex size-8 items-center justify-center rounded-md border border-gray-200 text-gray-900 transition-colors hover:bg-gray-100 hover:text-gray-1000"
|
|
40
|
-
onClick={() => setTocOpen(true)}
|
|
41
|
-
type="button"
|
|
42
|
-
>
|
|
43
|
-
<IconFileText size={16} />
|
|
44
|
-
</button>
|
|
45
|
-
|
|
46
|
-
<Sheet onOpenChange={setTocOpen} open={tocOpen}>
|
|
47
|
-
<SheetContent className="w-72 gap-0" side="right">
|
|
48
|
-
<SheetHeader>
|
|
49
|
-
<SheetDescription className="sr-only">
|
|
50
|
-
Table of contents for the current page.
|
|
51
|
-
</SheetDescription>
|
|
52
|
-
</SheetHeader>
|
|
53
|
-
<nav className="flex-1 overflow-y-auto px-4 pb-4">
|
|
54
|
-
<ul className="space-y-1">
|
|
55
|
-
{toc.map((item) => (
|
|
56
|
-
<li key={item.url}>
|
|
57
|
-
<a
|
|
58
|
-
className={cn(
|
|
59
|
-
"block rounded-md py-1.5 text-gray-900 text-sm transition-colors hover:text-gray-1000",
|
|
60
|
-
item.depth > 2 && "pl-4"
|
|
61
|
-
)}
|
|
62
|
-
href={item.url}
|
|
63
|
-
onClick={() => setTocOpen(false)}
|
|
64
|
-
>
|
|
65
|
-
{item.title}
|
|
66
|
-
</a>
|
|
67
|
-
</li>
|
|
68
|
-
))}
|
|
69
|
-
</ul>
|
|
70
|
-
</nav>
|
|
71
|
-
</SheetContent>
|
|
72
|
-
</Sheet>
|
|
73
|
-
</>
|
|
74
|
-
)}
|
|
75
|
-
</div>
|
|
76
|
-
);
|
|
77
|
-
};
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import Link from "next/link";
|
|
4
|
-
import { useEffect, useState } from "react";
|
|
5
|
-
import { IconArrowUpRight } from "@/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right";
|
|
6
|
-
import { nav } from "@/geistdocs";
|
|
7
|
-
import { cn } from "@/lib/utils";
|
|
8
|
-
import { SearchButton } from "./search";
|
|
9
|
-
|
|
10
|
-
function NavLink({
|
|
11
|
-
href,
|
|
12
|
-
external,
|
|
13
|
-
onClick,
|
|
14
|
-
children,
|
|
15
|
-
}: {
|
|
16
|
-
href: string;
|
|
17
|
-
external?: boolean;
|
|
18
|
-
onClick?: () => void;
|
|
19
|
-
children: React.ReactNode;
|
|
20
|
-
}) {
|
|
21
|
-
return (
|
|
22
|
-
<Link
|
|
23
|
-
className="group flex items-center justify-between rounded-md p-3 text-gray-900 transition-colors hover:bg-gray-100 hover:text-gray-1000"
|
|
24
|
-
href={href}
|
|
25
|
-
onClick={onClick}
|
|
26
|
-
rel={external ? "noopener" : undefined}
|
|
27
|
-
target={external ? "_blank" : undefined}
|
|
28
|
-
>
|
|
29
|
-
{children}
|
|
30
|
-
{external && (
|
|
31
|
-
<IconArrowUpRight
|
|
32
|
-
className="text-gray-900 group-hover:text-gray-1000"
|
|
33
|
-
size={16}
|
|
34
|
-
/>
|
|
35
|
-
)}
|
|
36
|
-
</Link>
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function MobileMenuButton({
|
|
41
|
-
expanded,
|
|
42
|
-
onClick,
|
|
43
|
-
}: {
|
|
44
|
-
expanded: boolean;
|
|
45
|
-
onClick: () => void;
|
|
46
|
-
}) {
|
|
47
|
-
return (
|
|
48
|
-
<button
|
|
49
|
-
aria-expanded={expanded}
|
|
50
|
-
aria-label={expanded ? "Close menu" : "Open menu"}
|
|
51
|
-
className="relative flex size-8 items-center justify-center rounded-full border border-gray-200 transition-colors hover:bg-gray-100 lg:hidden"
|
|
52
|
-
onClick={onClick}
|
|
53
|
-
type="button"
|
|
54
|
-
>
|
|
55
|
-
<span className="flex flex-col items-center justify-center gap-[5px]">
|
|
56
|
-
<span
|
|
57
|
-
className={cn(
|
|
58
|
-
"block h-[1.5px] w-3.5 bg-gray-1000 transition-all duration-150",
|
|
59
|
-
expanded && "translate-y-[3.25px] rotate-45"
|
|
60
|
-
)}
|
|
61
|
-
/>
|
|
62
|
-
<span
|
|
63
|
-
className={cn(
|
|
64
|
-
"block h-[1.5px] w-3.5 bg-gray-1000 transition-all duration-150",
|
|
65
|
-
expanded && "-translate-y-[3.25px] -rotate-45"
|
|
66
|
-
)}
|
|
67
|
-
/>
|
|
68
|
-
</span>
|
|
69
|
-
</button>
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export const MobileMenu = () => {
|
|
74
|
-
const [show, setShow] = useState(false);
|
|
75
|
-
|
|
76
|
-
// Close on route change
|
|
77
|
-
useEffect(() => {
|
|
78
|
-
setShow(false);
|
|
79
|
-
}, []);
|
|
80
|
-
|
|
81
|
-
// Close on escape
|
|
82
|
-
useEffect(() => {
|
|
83
|
-
const handleEscape = (e: KeyboardEvent) => {
|
|
84
|
-
if (e.key === "Escape" && show) {
|
|
85
|
-
setShow(false);
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
document.addEventListener("keydown", handleEscape);
|
|
89
|
-
return () => document.removeEventListener("keydown", handleEscape);
|
|
90
|
-
}, [show]);
|
|
91
|
-
|
|
92
|
-
// Lock scroll when open
|
|
93
|
-
useEffect(() => {
|
|
94
|
-
document.body.style.overflow = show ? "hidden" : "";
|
|
95
|
-
return () => {
|
|
96
|
-
document.body.style.overflow = "";
|
|
97
|
-
};
|
|
98
|
-
}, [show]);
|
|
99
|
-
|
|
100
|
-
const close = () => setShow(false);
|
|
101
|
-
|
|
102
|
-
return (
|
|
103
|
-
<>
|
|
104
|
-
<MobileMenuButton expanded={show} onClick={() => setShow(!show)} />
|
|
105
|
-
|
|
106
|
-
{/* Backdrop */}
|
|
107
|
-
{/* biome-ignore lint/a11y/noNoninteractiveElementInteractions: backdrop dismiss */}
|
|
108
|
-
{/* biome-ignore lint/a11y/noStaticElementInteractions: backdrop dismiss */}
|
|
109
|
-
{/* biome-ignore lint/a11y/useKeyWithClickEvents: backdrop dismiss */}
|
|
110
|
-
<div
|
|
111
|
-
className={cn(
|
|
112
|
-
"fixed inset-0 top-16 z-40 bg-background-200 backdrop-blur-sm transition-opacity duration-200",
|
|
113
|
-
show
|
|
114
|
-
? "pointer-events-auto opacity-100"
|
|
115
|
-
: "pointer-events-none opacity-0"
|
|
116
|
-
)}
|
|
117
|
-
onClick={close}
|
|
118
|
-
/>
|
|
119
|
-
|
|
120
|
-
{/* Popover */}
|
|
121
|
-
<div
|
|
122
|
-
className={cn(
|
|
123
|
-
"fixed inset-x-0 top-16 bottom-0 z-40 overflow-y-auto bg-background-200 px-2 transition-all duration-200",
|
|
124
|
-
show
|
|
125
|
-
? "translate-y-0 opacity-100"
|
|
126
|
-
: "pointer-events-none -translate-y-2 opacity-0"
|
|
127
|
-
)}
|
|
128
|
-
>
|
|
129
|
-
{/* Search */}
|
|
130
|
-
<div className="p-4">
|
|
131
|
-
<SearchButton className="w-full" onClick={close} />
|
|
132
|
-
</div>
|
|
133
|
-
|
|
134
|
-
{/* Navigation */}
|
|
135
|
-
<nav className="px-1">
|
|
136
|
-
{nav.map(({ label, href }) => (
|
|
137
|
-
<NavLink
|
|
138
|
-
external={href.startsWith("http")}
|
|
139
|
-
href={href}
|
|
140
|
-
key={href}
|
|
141
|
-
onClick={close}
|
|
142
|
-
>
|
|
143
|
-
{label}
|
|
144
|
-
</NavLink>
|
|
145
|
-
))}
|
|
146
|
-
</nav>
|
|
147
|
-
</div>
|
|
148
|
-
</>
|
|
149
|
-
);
|
|
150
|
-
};
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import Link from "next/link";
|
|
4
|
-
import type { ComponentType, ReactNode } from "react";
|
|
5
|
-
import { IconSlashForward } from "@/components/geistcn-fallbacks/geistcn-assets/icons/icon-slash-forward";
|
|
6
|
-
import { LogoAiElements } from "@/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-elements";
|
|
7
|
-
import { LogoAiSdk } from "@/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-sdk";
|
|
8
|
-
import { LogoChatSdk } from "@/components/geistcn-fallbacks/geistcn-assets/logos/logo-chat-sdk";
|
|
9
|
-
import { LogoFlagsSdk } from "@/components/geistcn-fallbacks/geistcn-assets/logos/logo-flags-sdk";
|
|
10
|
-
import { LogoIconVercel } from "@/components/geistcn-fallbacks/geistcn-assets/logos/logo-icon-vercel";
|
|
11
|
-
import { LogoStreamdown } from "@/components/geistcn-fallbacks/geistcn-assets/logos/logo-streamdown";
|
|
12
|
-
import { LogoVercelOss } from "@/components/geistcn-fallbacks/geistcn-assets/logos/logo-vercel-oss";
|
|
13
|
-
import { LogoWorkflowSdk } from "@/components/geistcn-fallbacks/geistcn-assets/logos/logo-workflow-sdk";
|
|
14
|
-
import {
|
|
15
|
-
NavigationMenu,
|
|
16
|
-
NavigationMenuContent,
|
|
17
|
-
NavigationMenuItem,
|
|
18
|
-
NavigationMenuLink,
|
|
19
|
-
NavigationMenuList,
|
|
20
|
-
NavigationMenuTrigger,
|
|
21
|
-
} from "@/components/ui/navigation-menu";
|
|
22
|
-
import { cn } from "@/lib/utils";
|
|
23
|
-
|
|
24
|
-
const OSS_PRODUCT_LINKS: {
|
|
25
|
-
href: string;
|
|
26
|
-
logo: ComponentType<{ height: number }>;
|
|
27
|
-
height: number;
|
|
28
|
-
}[] = [
|
|
29
|
-
{ href: "https://ai-sdk.dev/", logo: LogoAiSdk, height: 12 },
|
|
30
|
-
{ href: "https://flags-sdk.dev/", logo: LogoFlagsSdk, height: 20 },
|
|
31
|
-
{ href: "https://chat-sdk.dev/", logo: LogoChatSdk, height: 20 },
|
|
32
|
-
{ href: "https://elements.ai-sdk.dev/", logo: LogoAiElements, height: 12 },
|
|
33
|
-
{ href: "https://workflow-sdk.dev/", logo: LogoWorkflowSdk, height: 12 },
|
|
34
|
-
{ href: "https://streamdown.ai/", logo: LogoStreamdown, height: 13 },
|
|
35
|
-
];
|
|
36
|
-
|
|
37
|
-
type NavbarLogoProps = {
|
|
38
|
-
className?: string;
|
|
39
|
-
/** Where the logo links to (defaults to "/") */
|
|
40
|
-
href?: string;
|
|
41
|
-
} & (
|
|
42
|
-
| {
|
|
43
|
-
variant: "oss";
|
|
44
|
-
/** Logo shown in the trigger (e.g. LogoAiSdk) */
|
|
45
|
-
logo: ReactNode;
|
|
46
|
-
}
|
|
47
|
-
| {
|
|
48
|
-
variant?: "standard";
|
|
49
|
-
/** Logo shown after the slash (e.g. product name) */
|
|
50
|
-
logo: ReactNode;
|
|
51
|
-
}
|
|
52
|
-
);
|
|
53
|
-
|
|
54
|
-
export function NavbarLogo({
|
|
55
|
-
className,
|
|
56
|
-
href = "/",
|
|
57
|
-
...props
|
|
58
|
-
}: NavbarLogoProps) {
|
|
59
|
-
const isOss = props.variant === "oss";
|
|
60
|
-
|
|
61
|
-
return (
|
|
62
|
-
<span className={cn("flex items-center gap-2.5", className)}>
|
|
63
|
-
<Link
|
|
64
|
-
className="text-gray-1000"
|
|
65
|
-
href={isOss ? "https://vercel.com/oss" : "https://vercel.com/"}
|
|
66
|
-
rel="noopener"
|
|
67
|
-
target="_blank"
|
|
68
|
-
>
|
|
69
|
-
{isOss ? (
|
|
70
|
-
<>
|
|
71
|
-
<LogoIconVercel className="sm:hidden" size={20} />
|
|
72
|
-
<LogoVercelOss className="hidden sm:block" size={18} />
|
|
73
|
-
</>
|
|
74
|
-
) : (
|
|
75
|
-
<LogoIconVercel size={20} />
|
|
76
|
-
)}
|
|
77
|
-
</Link>
|
|
78
|
-
<div className="w-4 text-center text-gray-300 text-lg dark:text-gray-600">
|
|
79
|
-
<IconSlashForward />
|
|
80
|
-
</div>
|
|
81
|
-
{isOss ? (
|
|
82
|
-
<NavigationMenu viewportClassName="-left-5 top-4">
|
|
83
|
-
<NavigationMenuList>
|
|
84
|
-
<NavigationMenuItem className="flex items-center">
|
|
85
|
-
<NavigationMenuTrigger className="-m-3 flex items-center gap-1.5 p-3">
|
|
86
|
-
<Link
|
|
87
|
-
className="flex items-center text-gray-1000"
|
|
88
|
-
href={href}
|
|
89
|
-
onClick={(e) => e.stopPropagation()}
|
|
90
|
-
>
|
|
91
|
-
{props.logo}
|
|
92
|
-
</Link>
|
|
93
|
-
</NavigationMenuTrigger>
|
|
94
|
-
<NavigationMenuContent>
|
|
95
|
-
<ul className="grid w-[200px] gap-0.5 p-2">
|
|
96
|
-
{OSS_PRODUCT_LINKS.map(
|
|
97
|
-
({ href, logo: ProductLogo, height }) => (
|
|
98
|
-
<li key={href}>
|
|
99
|
-
<NavigationMenuLink asChild>
|
|
100
|
-
<Link
|
|
101
|
-
className="flex h-10 items-center gap-3 rounded-md px-3 py-2.5 text-gray-1000 text-sm outline-none transition-colors hover:bg-gray-100"
|
|
102
|
-
href={href}
|
|
103
|
-
rel="noopener"
|
|
104
|
-
target="_blank"
|
|
105
|
-
>
|
|
106
|
-
<ProductLogo height={height} />
|
|
107
|
-
</Link>
|
|
108
|
-
</NavigationMenuLink>
|
|
109
|
-
</li>
|
|
110
|
-
)
|
|
111
|
-
)}
|
|
112
|
-
</ul>
|
|
113
|
-
</NavigationMenuContent>
|
|
114
|
-
</NavigationMenuItem>
|
|
115
|
-
</NavigationMenuList>
|
|
116
|
-
</NavigationMenu>
|
|
117
|
-
) : (
|
|
118
|
-
<Link className="flex items-center text-gray-1000" href={href}>
|
|
119
|
-
{props.logo}
|
|
120
|
-
</Link>
|
|
121
|
-
)}
|
|
122
|
-
</span>
|
|
123
|
-
);
|
|
124
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { basePath, Logo, nav, suggestions } from "@/geistdocs";
|
|
2
|
-
import { Chat } from "./chat";
|
|
3
|
-
import { DesktopMenu } from "./desktop-menu";
|
|
4
|
-
import { MobileMenu } from "./mobile-menu";
|
|
5
|
-
import { NavbarLogo } from "./navbar-logo";
|
|
6
|
-
import { SearchButton } from "./search";
|
|
7
|
-
|
|
8
|
-
export const Navbar = () => (
|
|
9
|
-
<header className="sticky top-0 z-40 flex h-16 justify-center border-b bg-background-200">
|
|
10
|
-
<div className="mx-auto flex w-full max-w-[1448px] justify-between px-2">
|
|
11
|
-
<div className="flex select-none flex-row items-center">
|
|
12
|
-
<NavbarLogo className="ml-4" logo={<Logo />} variant="oss" />
|
|
13
|
-
<DesktopMenu className="hidden pl-6 lg:flex" items={nav} />
|
|
14
|
-
</div>
|
|
15
|
-
<div className="mr-4 flex flex-row items-center justify-end gap-2">
|
|
16
|
-
<SearchButton className="hidden lg:flex" />
|
|
17
|
-
<Chat basePath={basePath} suggestions={suggestions} />
|
|
18
|
-
<MobileMenu />
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
21
|
-
</header>
|
|
22
|
-
);
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { RssIcon } from "lucide-react";
|
|
2
|
-
import { Button } from "../ui/button";
|
|
3
|
-
|
|
4
|
-
export const RSSButton = () => (
|
|
5
|
-
<Button asChild size="icon-sm" type="button" variant="ghost">
|
|
6
|
-
<a href="/rss.xml" rel="noopener" target="_blank">
|
|
7
|
-
<RssIcon className="size-4" />
|
|
8
|
-
</a>
|
|
9
|
-
</Button>
|
|
10
|
-
);
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { ArrowUpCircleIcon } from "lucide-react";
|
|
4
|
-
import { useCallback } from "react";
|
|
5
|
-
|
|
6
|
-
export const ScrollTop = () => {
|
|
7
|
-
const handleScrollToTop = useCallback(() => {
|
|
8
|
-
window.scrollTo({ top: 0, behavior: "smooth" });
|
|
9
|
-
}, []);
|
|
10
|
-
|
|
11
|
-
return (
|
|
12
|
-
<button
|
|
13
|
-
className="flex items-center gap-1.5 text-muted-foreground text-sm transition-colors hover:text-foreground"
|
|
14
|
-
onClick={handleScrollToTop}
|
|
15
|
-
type="button"
|
|
16
|
-
>
|
|
17
|
-
<ArrowUpCircleIcon className="size-3.5" />
|
|
18
|
-
<span>Scroll to top</span>
|
|
19
|
-
</button>
|
|
20
|
-
);
|
|
21
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { SearchButton as PackageSearchButton } from "@vercel/geistdocs/controls";
|
|
4
|
-
import type { ComponentProps } from "react";
|
|
5
|
-
import { cn } from "@/lib/utils";
|
|
6
|
-
|
|
7
|
-
type SearchButtonProps = ComponentProps<typeof PackageSearchButton>;
|
|
8
|
-
|
|
9
|
-
export const SearchButton = ({ className, ...props }: SearchButtonProps) => (
|
|
10
|
-
<PackageSearchButton
|
|
11
|
-
className={cn(
|
|
12
|
-
"group h-10 justify-between gap-8 pr-1.5 font-normal text-muted-foreground shadow-none lg:h-8 lg:w-[150px] lg:bg-background-200 hover:lg:bg-background-200 [&_[data-slot=kbd]]:transition-colors group-hover:[&_[data-slot=kbd]]:text-gray-1000",
|
|
13
|
-
className
|
|
14
|
-
)}
|
|
15
|
-
{...props}
|
|
16
|
-
/>
|
|
17
|
-
);
|