@vercel/geistdocs 1.2.3-canary.48fea3c → 1.2.3-canary.53ff3db
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.js +4 -4
- 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 +357 -62
- 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 +124 -3
- package/source-config.js +174 -0
- package/styles.css +465 -102
- package/template/AGENTS.md +90 -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 +37 -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 +2 -1
- package/template/content/docs/index.mdx +3 -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 +321 -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 +3 -3
- 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,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Temporary Workflow SDK logo fallback.
|
|
3
|
-
*/
|
|
4
|
-
export function LogoWorkflowSdk({
|
|
5
|
-
height = 22,
|
|
6
|
-
className,
|
|
7
|
-
}: {
|
|
8
|
-
height?: number;
|
|
9
|
-
className?: string;
|
|
10
|
-
}) {
|
|
11
|
-
const width = (437.736 / 58) * height;
|
|
12
|
-
return (
|
|
13
|
-
<svg
|
|
14
|
-
aria-hidden="true"
|
|
15
|
-
className={className}
|
|
16
|
-
fill="none"
|
|
17
|
-
height={height}
|
|
18
|
-
role="img"
|
|
19
|
-
viewBox="0 0 437.736 58"
|
|
20
|
-
width={width}
|
|
21
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
22
|
-
>
|
|
23
|
-
<path
|
|
24
|
-
clipRule="evenodd"
|
|
25
|
-
d="M182.808 13.1499C195.226 13.1502 203.399 21.82 203.399 35.1393C203.399 48.4579 195.225 57.1285 182.808 57.1289C170.313 57.1289 162.142 48.4582 162.141 35.1393C162.141 21.8197 170.313 13.1499 182.808 13.1499ZM182.808 21.3468C176.286 21.3468 172.59 26.4698 172.59 35.1393C172.59 43.8869 176.286 48.9319 182.808 48.9319C189.252 48.9314 192.946 43.8865 192.947 35.1393C192.947 26.4702 189.253 21.3473 182.808 21.3468Z"
|
|
26
|
-
fill="currentColor"
|
|
27
|
-
fillRule="evenodd"
|
|
28
|
-
/>
|
|
29
|
-
<path
|
|
30
|
-
clipRule="evenodd"
|
|
31
|
-
d="M352.976 13.1499C365.393 13.1502 373.567 21.82 373.567 35.1393C373.566 48.4579 365.393 57.1286 352.976 57.1289C340.481 57.1289 332.309 48.4582 332.309 35.1393C332.309 21.8197 340.48 13.1499 352.976 13.1499ZM352.976 21.3468C346.453 21.3468 342.757 26.4698 342.757 35.1393C342.757 43.8869 346.454 48.9319 352.976 48.9319C359.42 48.9315 363.114 43.8865 363.114 35.1393C363.114 26.4701 359.42 21.3473 352.976 21.3468Z"
|
|
32
|
-
fill="currentColor"
|
|
33
|
-
fillRule="evenodd"
|
|
34
|
-
/>
|
|
35
|
-
<path
|
|
36
|
-
d="M14.4399 39.7095C15.5788 39.7095 16.5037 40.6379 16.5044 41.78V54.1909C16.5044 55.3334 15.5792 56.2612 14.4399 56.2612H2.06448C0.925195 56.2612 0 55.3334 0 54.1909V41.78C0.000584084 40.6379 0.925555 39.7095 2.06448 39.7095H14.4399Z"
|
|
37
|
-
fill="currentColor"
|
|
38
|
-
/>
|
|
39
|
-
<path
|
|
40
|
-
d="M28.1958 20.3999C29.3343 20.3999 30.2592 21.3248 30.2603 22.4666V36.3475C30.3072 38.2044 31.8186 39.6973 33.6793 39.7071H41.9487C43.0877 39.7071 44.0126 40.6356 44.0133 41.7776V54.1885C44.0133 55.331 43.088 56.2589 41.9487 56.2589H29.5733C28.4338 56.2589 27.5089 55.331 27.5089 54.1885V40.3075C27.4614 38.4749 25.9864 36.9984 24.1589 36.9517L24.0706 36.9478H15.8203C14.6813 36.9478 13.7563 36.0235 13.7559 34.8813V22.4666C13.757 21.3248 14.6817 20.3999 15.8203 20.3999H28.1958Z"
|
|
41
|
-
fill="currentColor"
|
|
42
|
-
/>
|
|
43
|
-
<path
|
|
44
|
-
d="M41.9437 1.08936C43.0827 1.08936 44.0076 2.01766 44.0083 3.15977V17.0408C44.0558 18.9035 45.5776 20.4004 47.4465 20.4004H55.6967C56.8354 20.4004 57.7601 21.3253 57.7612 22.467V36.348C57.8082 38.205 59.3196 39.6977 61.1803 39.7076H69.4497C70.5886 39.7076 71.5136 40.636 71.5142 41.7781V54.189C71.5142 55.3315 70.589 56.2594 69.4497 56.2594H57.0744C55.9349 56.2594 55.0099 55.3315 55.0099 54.189V40.3079C54.9624 38.4754 53.4875 36.9989 51.6599 36.9521L51.5716 36.9483H43.3214C42.1822 36.9483 41.2573 36.0239 41.2569 34.8818V21.0007C41.2107 19.1671 39.7353 17.6876 37.9069 17.6411H29.5684C28.4288 17.6411 27.5039 16.7133 27.5039 15.5707V3.15977C27.5045 2.01766 28.4293 1.08936 29.5684 1.08936H41.9437Z"
|
|
45
|
-
fill="currentColor"
|
|
46
|
-
/>
|
|
47
|
-
<path
|
|
48
|
-
d="M108.215 41.9952L118.511 0.225098H128.02L138.315 41.9952L148.453 0.225098H159.297L144.367 56.1841H133.05L123.303 17.8814L113.56 56.1841H102.163L87.2324 0.225098H98L108.215 41.9952Z"
|
|
49
|
-
fill="currentColor"
|
|
50
|
-
/>
|
|
51
|
-
<path
|
|
52
|
-
d="M218.461 22.2913C220.111 16.6175 223.337 14.0942 228.523 14.0942H232.371V22.7646H228.443C221.998 22.7648 218.856 25.4458 218.856 31.9083V56.1837H208.795V14.0942H218.227L218.461 22.2913Z"
|
|
53
|
-
fill="currentColor"
|
|
54
|
-
/>
|
|
55
|
-
<path
|
|
56
|
-
d="M247.859 33.0901L265.073 14.0946H277.486L261.063 31.593L278.039 56.1841H266.723L254.462 37.585L247.859 44.5966V56.1841H237.801V0.225098H247.859V33.0901Z"
|
|
57
|
-
fill="currentColor"
|
|
58
|
-
/>
|
|
59
|
-
<path
|
|
60
|
-
d="M309.551 8.02957H303.262C299.962 8.03016 298.55 9.76311 298.55 12.994V14.0946H308.999V21.8991H298.55V56.1841H288.488V21.8991H282.518V14.0946H288.488V12.4398C288.489 4.87451 292.498 0.225098 301.379 0.225098H309.551V8.02957Z"
|
|
61
|
-
fill="currentColor"
|
|
62
|
-
/>
|
|
63
|
-
<path
|
|
64
|
-
d="M324.617 45.2278C324.617 47.4343 325.716 48.3792 327.76 48.3796H330.826V56.1841H324.617C318.487 56.184 314.559 53.2659 314.559 46.2515V0.225098H324.617V45.2278Z"
|
|
65
|
-
fill="currentColor"
|
|
66
|
-
/>
|
|
67
|
-
<path
|
|
68
|
-
d="M393.575 44.7541L401.982 14.0942H410.785L419.27 44.7541L427.443 14.0942H437.739L425.087 56.1837H414.715L406.384 27.9676L398.13 56.1837H387.757L375.105 14.0942H385.401L393.575 44.7541Z"
|
|
69
|
-
fill="currentColor"
|
|
70
|
-
/>
|
|
71
|
-
</svg>
|
|
72
|
-
);
|
|
73
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
CalloutContainer as CalloutContainerPrimitive,
|
|
3
|
-
CalloutDescription as CalloutDescriptionPrimitive,
|
|
4
|
-
Callout as CalloutPrimitive,
|
|
5
|
-
CalloutTitle as CalloutTitlePrimitive,
|
|
6
|
-
} from "fumadocs-ui/components/callout";
|
|
7
|
-
import type { ComponentProps } from "react";
|
|
8
|
-
import { cn } from "@/lib/utils";
|
|
9
|
-
|
|
10
|
-
type CalloutProps = ComponentProps<typeof CalloutPrimitive>;
|
|
11
|
-
|
|
12
|
-
export const Callout = ({ className, ...props }: CalloutProps) => (
|
|
13
|
-
<CalloutPrimitive
|
|
14
|
-
className={cn(
|
|
15
|
-
"rounded-sm bg-transparent p-3! shadow-none [&_div[role='none']]:hidden",
|
|
16
|
-
className
|
|
17
|
-
)}
|
|
18
|
-
{...props}
|
|
19
|
-
/>
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
type CalloutContainerProps = ComponentProps<typeof CalloutContainerPrimitive>;
|
|
23
|
-
|
|
24
|
-
export const CalloutContainer = (props: CalloutContainerProps) => (
|
|
25
|
-
<CalloutContainerPrimitive {...props} />
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
type CalloutTitleProps = ComponentProps<typeof CalloutTitlePrimitive>;
|
|
29
|
-
|
|
30
|
-
export const CalloutTitle = (props: CalloutTitleProps) => (
|
|
31
|
-
<CalloutTitlePrimitive {...props} />
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
type CalloutDescriptionProps = ComponentProps<
|
|
35
|
-
typeof CalloutDescriptionPrimitive
|
|
36
|
-
>;
|
|
37
|
-
|
|
38
|
-
export const CalloutDescription = (props: CalloutDescriptionProps) => (
|
|
39
|
-
<CalloutDescriptionPrimitive {...props} />
|
|
40
|
-
);
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { AskAIButton } from "@vercel/geistdocs/controls";
|
|
2
|
-
|
|
3
|
-
interface ChatProps {
|
|
4
|
-
basePath: string | undefined;
|
|
5
|
-
suggestions: string[];
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export const Chat = ({
|
|
9
|
-
basePath: _basePath,
|
|
10
|
-
suggestions: _suggestions,
|
|
11
|
-
}: ChatProps) => (
|
|
12
|
-
<>
|
|
13
|
-
<AskAIButton
|
|
14
|
-
className="hidden shrink-0 shadow-none md:flex"
|
|
15
|
-
size="sm"
|
|
16
|
-
variant="outline"
|
|
17
|
-
/>
|
|
18
|
-
<AskAIButton
|
|
19
|
-
className="shadow-none md:hidden"
|
|
20
|
-
size="sm"
|
|
21
|
-
variant="outline"
|
|
22
|
-
/>
|
|
23
|
-
</>
|
|
24
|
-
);
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Tabs,
|
|
3
|
-
TabsContent,
|
|
4
|
-
TabsList,
|
|
5
|
-
TabsTrigger,
|
|
6
|
-
} from "fumadocs-ui/components/tabs.unstyled";
|
|
7
|
-
import type { ComponentProps } from "react";
|
|
8
|
-
import { cn } from "@/lib/utils";
|
|
9
|
-
|
|
10
|
-
export const CodeBlockTabsList = (props: ComponentProps<typeof TabsList>) => (
|
|
11
|
-
<TabsList
|
|
12
|
-
{...props}
|
|
13
|
-
className={cn(
|
|
14
|
-
"w-full rounded-none border-b bg-sidebar px-2.5 text-muted-foreground",
|
|
15
|
-
props.className
|
|
16
|
-
)}
|
|
17
|
-
>
|
|
18
|
-
{props.children}
|
|
19
|
-
</TabsList>
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
export const CodeBlockTabsTrigger = ({
|
|
23
|
-
children,
|
|
24
|
-
...props
|
|
25
|
-
}: ComponentProps<typeof TabsTrigger>) => (
|
|
26
|
-
<TabsTrigger
|
|
27
|
-
{...props}
|
|
28
|
-
className={cn(
|
|
29
|
-
"group relative px-1 py-2 text-sm data-[state=active]:text-primary",
|
|
30
|
-
props.className
|
|
31
|
-
)}
|
|
32
|
-
>
|
|
33
|
-
<div className="absolute inset-x-0 bottom-0 h-px group-data-[state=active]:bg-primary" />
|
|
34
|
-
{children}
|
|
35
|
-
</TabsTrigger>
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
export const CodeBlockTabs = ({
|
|
39
|
-
ref,
|
|
40
|
-
...props
|
|
41
|
-
}: ComponentProps<typeof Tabs>) => (
|
|
42
|
-
<Tabs
|
|
43
|
-
{...props}
|
|
44
|
-
className={cn(
|
|
45
|
-
"overflow-hidden rounded-sm border bg-background",
|
|
46
|
-
props.className
|
|
47
|
-
)}
|
|
48
|
-
>
|
|
49
|
-
{props.children}
|
|
50
|
-
</Tabs>
|
|
51
|
-
);
|
|
52
|
-
|
|
53
|
-
export const CodeBlockTab = (props: ComponentProps<typeof TabsContent>) => (
|
|
54
|
-
<TabsContent
|
|
55
|
-
{...props}
|
|
56
|
-
className={cn(
|
|
57
|
-
"[&>div]:mb-0 [&_pre]:rounded-none [&_pre]:border-none",
|
|
58
|
-
props.className
|
|
59
|
-
)}
|
|
60
|
-
/>
|
|
61
|
-
);
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { CheckIcon, CopyIcon } from "lucide-react";
|
|
4
|
-
import {
|
|
5
|
-
type CSSProperties,
|
|
6
|
-
type ReactNode,
|
|
7
|
-
useCallback,
|
|
8
|
-
useRef,
|
|
9
|
-
useState,
|
|
10
|
-
} from "react";
|
|
11
|
-
import { toast } from "sonner";
|
|
12
|
-
import { Button } from "@/components/ui/button";
|
|
13
|
-
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
|
14
|
-
import { cn } from "@/lib/utils";
|
|
15
|
-
|
|
16
|
-
interface CodeBlockProps {
|
|
17
|
-
children: ReactNode;
|
|
18
|
-
className?: string;
|
|
19
|
-
"data-line-highlighting"?: string;
|
|
20
|
-
"data-line-numbers"?: string;
|
|
21
|
-
icon?: ReactNode;
|
|
22
|
-
style?: CSSProperties;
|
|
23
|
-
tabIndex?: number;
|
|
24
|
-
title?: string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export const CodeBlock = ({
|
|
28
|
-
children,
|
|
29
|
-
className,
|
|
30
|
-
icon,
|
|
31
|
-
style,
|
|
32
|
-
tabIndex,
|
|
33
|
-
title,
|
|
34
|
-
...rest
|
|
35
|
-
}: CodeBlockProps) => {
|
|
36
|
-
const ref = useRef<HTMLPreElement>(null);
|
|
37
|
-
const [isCopied, setIsCopied] = useState(false);
|
|
38
|
-
const { "data-line-numbers": lineNumbers } = rest;
|
|
39
|
-
|
|
40
|
-
const copyToClipboard = useCallback(async () => {
|
|
41
|
-
if (typeof window === "undefined" || !navigator?.clipboard?.writeText) {
|
|
42
|
-
toast.error("Clipboard API not available");
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const code = ref.current?.innerText;
|
|
47
|
-
|
|
48
|
-
if (!code) {
|
|
49
|
-
toast.error("No code to copy");
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
try {
|
|
54
|
-
await navigator.clipboard.writeText(code);
|
|
55
|
-
setIsCopied(true);
|
|
56
|
-
setTimeout(() => setIsCopied(false), 2000);
|
|
57
|
-
} catch (error) {
|
|
58
|
-
const message = error instanceof Error ? error.message : "Unknown error";
|
|
59
|
-
|
|
60
|
-
toast.error(message);
|
|
61
|
-
}
|
|
62
|
-
}, []);
|
|
63
|
-
|
|
64
|
-
const Icon = isCopied ? CheckIcon : CopyIcon;
|
|
65
|
-
|
|
66
|
-
const CodeBlockComponent = useCallback(
|
|
67
|
-
(props: { className?: string }) => (
|
|
68
|
-
<pre
|
|
69
|
-
className={cn(
|
|
70
|
-
"not-prose flex-1 overflow-x-auto rounded-sm border bg-background py-3 text-sm outline-none",
|
|
71
|
-
"[&>code]:grid [&>code]:min-w-max",
|
|
72
|
-
className,
|
|
73
|
-
props.className
|
|
74
|
-
)}
|
|
75
|
-
ref={ref}
|
|
76
|
-
style={style}
|
|
77
|
-
tabIndex={tabIndex}
|
|
78
|
-
>
|
|
79
|
-
{children}
|
|
80
|
-
</pre>
|
|
81
|
-
),
|
|
82
|
-
[children, style, tabIndex, className]
|
|
83
|
-
);
|
|
84
|
-
|
|
85
|
-
if (!title) {
|
|
86
|
-
return (
|
|
87
|
-
<div className="relative mb-6">
|
|
88
|
-
<CodeBlockComponent
|
|
89
|
-
className={cn(lineNumbers ? "line-numbers" : "", className)}
|
|
90
|
-
/>
|
|
91
|
-
<Button
|
|
92
|
-
className="absolute top-[5px] right-[5px] bg-background/80 backdrop-blur-sm"
|
|
93
|
-
onClick={copyToClipboard}
|
|
94
|
-
size="icon"
|
|
95
|
-
variant="ghost"
|
|
96
|
-
>
|
|
97
|
-
<Icon size={14} />
|
|
98
|
-
</Button>
|
|
99
|
-
</div>
|
|
100
|
-
);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
return (
|
|
104
|
-
<Card className="not-prose mb-6 gap-0 overflow-hidden rounded-sm p-0 shadow-none">
|
|
105
|
-
<CardHeader className="flex items-center gap-2 border-b bg-sidebar py-1.5! pr-1.5 pl-4 text-muted-foreground">
|
|
106
|
-
<div
|
|
107
|
-
className="flex size-3.5 shrink-0"
|
|
108
|
-
// biome-ignore lint/security/noDangerouslySetInnerHtml: "Required for icon prop."
|
|
109
|
-
dangerouslySetInnerHTML={{ __html: icon as unknown as TrustedHTML }}
|
|
110
|
-
/>
|
|
111
|
-
<CardTitle className="flex-1 font-mono font-normal text-sm tracking-tight">
|
|
112
|
-
{title}
|
|
113
|
-
</CardTitle>
|
|
114
|
-
<Button
|
|
115
|
-
className={cn("shrink-0", className)}
|
|
116
|
-
onClick={copyToClipboard}
|
|
117
|
-
size="icon"
|
|
118
|
-
variant="ghost"
|
|
119
|
-
>
|
|
120
|
-
<Icon size={14} />
|
|
121
|
-
</Button>
|
|
122
|
-
</CardHeader>
|
|
123
|
-
<CardContent className="p-0">
|
|
124
|
-
<CodeBlockComponent
|
|
125
|
-
className={cn(
|
|
126
|
-
className,
|
|
127
|
-
"rounded-none border-none",
|
|
128
|
-
lineNumbers ? "line-numbers" : ""
|
|
129
|
-
)}
|
|
130
|
-
/>
|
|
131
|
-
</CardContent>
|
|
132
|
-
</Card>
|
|
133
|
-
);
|
|
134
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { useCopyButton } from "fumadocs-ui/utils/use-copy-button";
|
|
4
|
-
import { CheckIcon, CopyIcon } from "lucide-react";
|
|
5
|
-
|
|
6
|
-
interface CopyPageProps {
|
|
7
|
-
text: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const CopyPage = ({ text }: CopyPageProps) => {
|
|
11
|
-
const [checked, handleCopy] = useCopyButton(async () => {
|
|
12
|
-
await navigator.clipboard.writeText(text);
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
const Icon = checked ? CheckIcon : CopyIcon;
|
|
16
|
-
|
|
17
|
-
return (
|
|
18
|
-
<button
|
|
19
|
-
className="flex items-center gap-1.5 text-muted-foreground text-sm transition-colors hover:text-foreground"
|
|
20
|
-
onClick={handleCopy}
|
|
21
|
-
type="button"
|
|
22
|
-
>
|
|
23
|
-
<Icon className="size-3.5" />
|
|
24
|
-
<span>Copy page</span>
|
|
25
|
-
</button>
|
|
26
|
-
);
|
|
27
|
-
};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import DynamicLink from "fumadocs-core/dynamic-link";
|
|
4
|
-
import { IconArrowUpRightSmall } from "@/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right-small";
|
|
5
|
-
import {
|
|
6
|
-
NavigationMenu,
|
|
7
|
-
NavigationMenuItem,
|
|
8
|
-
NavigationMenuLink,
|
|
9
|
-
NavigationMenuList,
|
|
10
|
-
} from "@/components/ui/navigation-menu";
|
|
11
|
-
import { useIsMobile } from "@/hooks/use-mobile";
|
|
12
|
-
import { cn } from "@/lib/utils";
|
|
13
|
-
|
|
14
|
-
interface DesktopMenuProps {
|
|
15
|
-
className?: string;
|
|
16
|
-
items: { label: string; href: string }[];
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export const DesktopMenu = ({ items, className }: DesktopMenuProps) => {
|
|
20
|
-
const isMobile = useIsMobile();
|
|
21
|
-
|
|
22
|
-
return (
|
|
23
|
-
<NavigationMenu viewport={isMobile}>
|
|
24
|
-
<NavigationMenuList className={cn("h-14 gap-4", className)}>
|
|
25
|
-
{items.map((item) => (
|
|
26
|
-
<NavigationMenuItem key={item.href}>
|
|
27
|
-
<NavigationMenuLink
|
|
28
|
-
asChild
|
|
29
|
-
className="flex items-center text-gray-900 text-sm transition-colors duration-100 hover:text-gray-1000"
|
|
30
|
-
>
|
|
31
|
-
{item.href.startsWith("http") ? (
|
|
32
|
-
<a
|
|
33
|
-
className="flex flex-row items-center gap-1"
|
|
34
|
-
href={item.href}
|
|
35
|
-
rel="noopener"
|
|
36
|
-
target="_blank"
|
|
37
|
-
>
|
|
38
|
-
{item.label}
|
|
39
|
-
<IconArrowUpRightSmall aria-hidden="true" size={12} />
|
|
40
|
-
</a>
|
|
41
|
-
) : (
|
|
42
|
-
<DynamicLink href={`/[lang]${item.href}`}>
|
|
43
|
-
{item.label}
|
|
44
|
-
</DynamicLink>
|
|
45
|
-
)}
|
|
46
|
-
</NavigationMenuLink>
|
|
47
|
-
</NavigationMenuItem>
|
|
48
|
-
))}
|
|
49
|
-
</NavigationMenuList>
|
|
50
|
-
</NavigationMenu>
|
|
51
|
-
);
|
|
52
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DocsBody as FumadocsDocsBody,
|
|
3
|
-
DocsDescription as FumadocsDocsDescription,
|
|
4
|
-
DocsPage as FumadocsDocsPage,
|
|
5
|
-
DocsTitle as FumadocsDocsTitle,
|
|
6
|
-
} from "fumadocs-ui/layouts/docs/page";
|
|
7
|
-
import type { ComponentProps } from "react";
|
|
8
|
-
import { cn } from "@/lib/utils";
|
|
9
|
-
|
|
10
|
-
type PageProps = ComponentProps<typeof FumadocsDocsPage>;
|
|
11
|
-
|
|
12
|
-
export const DocsPage = ({ ...props }: PageProps) => (
|
|
13
|
-
<FumadocsDocsPage {...props} />
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
export const DocsTitle = ({
|
|
17
|
-
className,
|
|
18
|
-
...props
|
|
19
|
-
}: ComponentProps<typeof FumadocsDocsTitle>) => (
|
|
20
|
-
<FumadocsDocsTitle
|
|
21
|
-
className={cn("mb-4 text-4xl tracking-tight", className)}
|
|
22
|
-
{...props}
|
|
23
|
-
/>
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
export const DocsDescription = (
|
|
27
|
-
props: ComponentProps<typeof FumadocsDocsDescription>
|
|
28
|
-
) => <FumadocsDocsDescription {...props} />;
|
|
29
|
-
|
|
30
|
-
export const DocsBody = ({
|
|
31
|
-
className,
|
|
32
|
-
...props
|
|
33
|
-
}: ComponentProps<typeof FumadocsDocsBody>) => (
|
|
34
|
-
<FumadocsDocsBody className={cn("mx-auto w-full", className)} {...props} />
|
|
35
|
-
);
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { SiGithub } from "@icons-pack/react-simple-icons";
|
|
2
|
-
import { github } from "@/geistdocs";
|
|
3
|
-
|
|
4
|
-
interface EditSourceProps {
|
|
5
|
-
path: string | undefined;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export const EditSource = ({ path }: EditSourceProps) => {
|
|
9
|
-
let url: string | undefined;
|
|
10
|
-
|
|
11
|
-
if (github.owner && github.repo && path) {
|
|
12
|
-
url = `https://github.com/${github.owner}/${github.repo}/edit/main/content/docs/${path}`;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
if (!url) {
|
|
16
|
-
return null;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
return (
|
|
20
|
-
<a
|
|
21
|
-
className="flex items-center gap-1.5 text-muted-foreground text-sm transition-colors hover:text-foreground"
|
|
22
|
-
href={url}
|
|
23
|
-
rel="noopener noreferrer"
|
|
24
|
-
target="_blank"
|
|
25
|
-
>
|
|
26
|
-
<SiGithub className="size-3.5" />
|
|
27
|
-
<span>Edit this page on GitHub</span>
|
|
28
|
-
</a>
|
|
29
|
-
);
|
|
30
|
-
};
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { SiMarkdown } from "@icons-pack/react-simple-icons";
|
|
4
|
-
import { ThumbsUpIcon } from "lucide-react";
|
|
5
|
-
import { usePathname } from "next/navigation";
|
|
6
|
-
import {
|
|
7
|
-
type FormEventHandler,
|
|
8
|
-
useEffect,
|
|
9
|
-
useState,
|
|
10
|
-
useTransition,
|
|
11
|
-
} from "react";
|
|
12
|
-
import { sendFeedback } from "@/app/actions/feedback";
|
|
13
|
-
import { emotions } from "@/app/actions/feedback/emotions";
|
|
14
|
-
import { cn } from "@/lib/utils";
|
|
15
|
-
import { Button } from "../ui/button";
|
|
16
|
-
import { Popover, PopoverContent, PopoverTrigger } from "../ui/popover";
|
|
17
|
-
import { Textarea } from "../ui/textarea";
|
|
18
|
-
|
|
19
|
-
type Emotion = (typeof emotions)[number]["name"];
|
|
20
|
-
|
|
21
|
-
export interface Feedback {
|
|
22
|
-
emotion: Emotion;
|
|
23
|
-
message: string;
|
|
24
|
-
url?: string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export const Feedback = () => {
|
|
28
|
-
const url = usePathname();
|
|
29
|
-
const [submitted, setSubmitted] = useState(false);
|
|
30
|
-
const [emotion, setEmotion] = useState<Emotion | null>(null);
|
|
31
|
-
const [message, setMessage] = useState("");
|
|
32
|
-
const [isPending, startTransition] = useTransition();
|
|
33
|
-
|
|
34
|
-
useEffect(() => {
|
|
35
|
-
const item = localStorage.getItem(`docs-feedback-${url}`);
|
|
36
|
-
|
|
37
|
-
if (!item) {
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
setSubmitted(true);
|
|
42
|
-
}, [url]);
|
|
43
|
-
|
|
44
|
-
const submit: FormEventHandler<HTMLFormElement> = (e) => {
|
|
45
|
-
e.preventDefault();
|
|
46
|
-
|
|
47
|
-
if (!emotion) {
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
startTransition(() => {
|
|
52
|
-
const feedback: Feedback = {
|
|
53
|
-
emotion,
|
|
54
|
-
message,
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
sendFeedback(url, feedback).then(() => {
|
|
58
|
-
setSubmitted(true);
|
|
59
|
-
setMessage("");
|
|
60
|
-
setEmotion(null);
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
e?.preventDefault();
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
return (
|
|
68
|
-
<Popover>
|
|
69
|
-
<PopoverTrigger asChild>
|
|
70
|
-
<button
|
|
71
|
-
className="flex items-center gap-1.5 text-muted-foreground text-sm transition-colors hover:text-foreground"
|
|
72
|
-
type="button"
|
|
73
|
-
>
|
|
74
|
-
<ThumbsUpIcon className="size-3.5" />
|
|
75
|
-
<span>Give feedback</span>
|
|
76
|
-
</button>
|
|
77
|
-
</PopoverTrigger>
|
|
78
|
-
<PopoverContent className="overflow-hidden p-0">
|
|
79
|
-
<div className="overflow-visible">
|
|
80
|
-
{submitted ? (
|
|
81
|
-
<div className="flex flex-col items-center gap-3 rounded-xl bg-sidebar px-3 py-6 text-center text-sm">
|
|
82
|
-
<p>Thank you for your feedback!</p>
|
|
83
|
-
</div>
|
|
84
|
-
) : (
|
|
85
|
-
<form className="flex flex-col" onSubmit={submit}>
|
|
86
|
-
<div className="p-2">
|
|
87
|
-
<Textarea
|
|
88
|
-
autoFocus
|
|
89
|
-
className="max-h-48 min-h-24 shadow-none"
|
|
90
|
-
onChange={(e) => setMessage(e.target.value)}
|
|
91
|
-
onKeyDown={(e) => {
|
|
92
|
-
if (!e.shiftKey && e.key === "Enter") {
|
|
93
|
-
e.currentTarget.form?.requestSubmit();
|
|
94
|
-
}
|
|
95
|
-
}}
|
|
96
|
-
placeholder="Leave your feedback..."
|
|
97
|
-
required
|
|
98
|
-
value={message}
|
|
99
|
-
/>
|
|
100
|
-
</div>
|
|
101
|
-
<div className="flex items-center justify-end gap-1 px-2 text-muted-foreground">
|
|
102
|
-
<SiMarkdown className="inline size-3" />
|
|
103
|
-
<p className="text-xs"> supported</p>
|
|
104
|
-
</div>
|
|
105
|
-
<div className="mt-2 flex items-center justify-between border-t bg-sidebar p-2">
|
|
106
|
-
<div className="flex items-center gap-px">
|
|
107
|
-
{emotions.map((e) => (
|
|
108
|
-
<Button
|
|
109
|
-
className={cn(
|
|
110
|
-
"text-muted-foreground hover:text-foreground",
|
|
111
|
-
emotion === e.name ? "bg-accent text-foreground" : ""
|
|
112
|
-
)}
|
|
113
|
-
key={e.name}
|
|
114
|
-
onClick={() => setEmotion(e.name)}
|
|
115
|
-
size="sm"
|
|
116
|
-
type="button"
|
|
117
|
-
variant="ghost"
|
|
118
|
-
>
|
|
119
|
-
{e.emoji}
|
|
120
|
-
<span className="sr-only">{e.name}</span>
|
|
121
|
-
</Button>
|
|
122
|
-
))}
|
|
123
|
-
</div>
|
|
124
|
-
<Button
|
|
125
|
-
disabled={isPending || !emotion || !message}
|
|
126
|
-
size="sm"
|
|
127
|
-
type="submit"
|
|
128
|
-
variant="default"
|
|
129
|
-
>
|
|
130
|
-
Send
|
|
131
|
-
</Button>
|
|
132
|
-
</div>
|
|
133
|
-
</form>
|
|
134
|
-
)}
|
|
135
|
-
</div>
|
|
136
|
-
</PopoverContent>
|
|
137
|
-
</Popover>
|
|
138
|
-
);
|
|
139
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { SiVercel } from "@icons-pack/react-simple-icons";
|
|
2
|
-
import { GitHubButton } from "./github-button";
|
|
3
|
-
import { LanguageSelector } from "./language-selector";
|
|
4
|
-
import { RSSButton } from "./rss-button";
|
|
5
|
-
import { ThemeToggle } from "./theme-toggle";
|
|
6
|
-
|
|
7
|
-
interface FooterProps {
|
|
8
|
-
copyright?: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const Footer = ({
|
|
12
|
-
copyright = `Copyright Vercel ${new Date().getFullYear()}. All rights reserved.`,
|
|
13
|
-
}: FooterProps) => (
|
|
14
|
-
<footer className="border-t px-4 py-5 md:px-6">
|
|
15
|
-
<div className="mx-auto flex max-w-[1448px] flex-col items-center justify-between gap-4 sm:flex-row">
|
|
16
|
-
<div className="flex items-center gap-2">
|
|
17
|
-
<SiVercel className="size-4 shrink-0" />
|
|
18
|
-
<p className="text-center text-muted-foreground text-sm sm:text-left">
|
|
19
|
-
{copyright}
|
|
20
|
-
</p>
|
|
21
|
-
</div>
|
|
22
|
-
<div className="flex items-center gap-2">
|
|
23
|
-
<LanguageSelector />
|
|
24
|
-
<RSSButton />
|
|
25
|
-
<GitHubButton />
|
|
26
|
-
<ThemeToggle />
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
</footer>
|
|
30
|
-
);
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { SiGithub } from "@icons-pack/react-simple-icons";
|
|
2
|
-
import { github } from "@/geistdocs";
|
|
3
|
-
import { Button } from "../ui/button";
|
|
4
|
-
|
|
5
|
-
export const GitHubButton = () => {
|
|
6
|
-
if (!(github.owner && github.repo)) {
|
|
7
|
-
return null;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const url = `https://github.com/${github.owner}/${github.repo}`;
|
|
11
|
-
|
|
12
|
-
return (
|
|
13
|
-
<Button asChild size="icon-sm" type="button" variant="ghost">
|
|
14
|
-
<a href={url} rel="noopener" target="_blank">
|
|
15
|
-
<SiGithub className="size-4" />
|
|
16
|
-
</a>
|
|
17
|
-
</Button>
|
|
18
|
-
);
|
|
19
|
-
};
|