@vercel/geistdocs 1.2.1 → 1.2.3-canary.48fea3c
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 +3 -0
- package/dist/components/callout.d.ts +12 -0
- package/dist/components/callout.d.ts.map +1 -0
- package/dist/components/callout.js +7 -0
- package/dist/components/code-block-tabs.d.ts +7 -0
- package/dist/components/code-block-tabs.d.ts.map +1 -0
- package/dist/components/code-block-tabs.js +7 -0
- package/dist/components/code-block.d.ts +14 -0
- package/dist/components/code-block.d.ts.map +1 -0
- package/dist/components/code-block.js +45 -0
- package/dist/components/copy-prompt.d.ts +11 -0
- package/dist/components/copy-prompt.d.ts.map +1 -0
- package/dist/components/copy-prompt.js +58 -0
- package/dist/components/mermaid.d.ts +4 -0
- package/dist/components/mermaid.d.ts.map +1 -0
- package/dist/components/mermaid.js +44 -0
- package/dist/components/theme-aware-image.d.ts +12 -0
- package/dist/components/theme-aware-image.d.ts.map +1 -0
- package/dist/components/theme-aware-image.js +8 -0
- package/dist/components/video.d.ts +6 -0
- package/dist/components/video.d.ts.map +1 -0
- package/dist/components/video.js +3 -0
- package/dist/config.d.ts +71 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +1 -0
- package/dist/controls.d.ts +15 -0
- package/dist/controls.d.ts.map +1 -0
- package/dist/controls.js +52 -0
- package/dist/internal/chat/context.d.ts +19 -0
- package/dist/internal/chat/context.d.ts.map +1 -0
- package/dist/internal/chat/context.js +36 -0
- package/dist/internal/chat/conversation.d.ts +10 -0
- package/dist/internal/chat/conversation.d.ts.map +1 -0
- package/dist/internal/chat/conversation.js +16 -0
- package/dist/internal/chat/copy-chat.d.ts +5 -0
- package/dist/internal/chat/copy-chat.d.ts.map +1 -0
- package/dist/internal/chat/copy-chat.js +35 -0
- package/dist/internal/chat/db.d.ts +13 -0
- package/dist/internal/chat/db.d.ts.map +1 -0
- package/dist/internal/chat/db.js +19 -0
- package/dist/internal/chat/message-metadata.d.ts +8 -0
- package/dist/internal/chat/message-metadata.d.ts.map +1 -0
- package/dist/internal/chat/message-metadata.js +29 -0
- package/dist/internal/chat/message.d.ts +11 -0
- package/dist/internal/chat/message.d.ts.map +1 -0
- package/dist/internal/chat/message.js +11 -0
- package/dist/internal/chat/prompt-input.d.ts +13 -0
- package/dist/internal/chat/prompt-input.d.ts.map +1 -0
- package/dist/internal/chat/prompt-input.js +39 -0
- package/dist/internal/chat/shell.d.ts +2 -0
- package/dist/internal/chat/shell.d.ts.map +1 -0
- package/dist/internal/chat/shell.js +194 -0
- package/dist/internal/chat/shimmer.d.ts +11 -0
- package/dist/internal/chat/shimmer.d.ts.map +1 -0
- package/dist/internal/chat/shimmer.js +18 -0
- package/dist/internal/chat/sources.d.ts +13 -0
- package/dist/internal/chat/sources.d.ts.map +1 -0
- package/dist/internal/chat/sources.js +9 -0
- package/dist/internal/chat/suggestion.d.ts +11 -0
- package/dist/internal/chat/suggestion.d.ts.map +1 -0
- package/dist/internal/chat/suggestion.js +12 -0
- package/dist/internal/cn.d.ts +3 -0
- package/dist/internal/cn.d.ts.map +1 -0
- package/dist/internal/cn.js +3 -0
- package/dist/internal/feedback-action.d.ts +14 -0
- package/dist/internal/feedback-action.d.ts.map +1 -0
- package/dist/internal/feedback-action.js +34 -0
- package/dist/internal/i18n.d.ts +6 -0
- package/dist/internal/i18n.d.ts.map +1 -0
- package/dist/internal/i18n.js +18 -0
- package/dist/internal/languages.d.ts +7 -0
- package/dist/internal/languages.d.ts.map +1 -0
- package/dist/internal/languages.js +18 -0
- package/dist/internal/not-implemented.d.ts +2 -0
- package/dist/internal/not-implemented.d.ts.map +1 -0
- package/dist/internal/not-implemented.js +4 -0
- package/dist/internal/page-actions-client.d.ts +13 -0
- package/dist/internal/page-actions-client.d.ts.map +1 -0
- package/dist/internal/page-actions-client.js +160 -0
- package/dist/internal/page-actions.d.ts +18 -0
- package/dist/internal/page-actions.d.ts.map +1 -0
- package/dist/internal/page-actions.js +4 -0
- package/dist/internal/provider-client.d.ts +9 -0
- package/dist/internal/provider-client.d.ts.map +1 -0
- package/dist/internal/provider-client.js +23 -0
- package/dist/internal/search.d.ts +5 -0
- package/dist/internal/search.d.ts.map +1 -0
- package/dist/internal/search.js +14 -0
- package/dist/internal/sidebar.d.ts +9 -0
- package/dist/internal/sidebar.d.ts.map +1 -0
- package/dist/internal/sidebar.js +38 -0
- package/dist/internal/table-of-contents.d.ts +9 -0
- package/dist/internal/table-of-contents.d.ts.map +1 -0
- package/dist/internal/table-of-contents.js +5 -0
- package/dist/internal/ui/button-group.d.ts +13 -0
- package/dist/internal/ui/button-group.d.ts.map +1 -0
- package/dist/internal/ui/button-group.js +26 -0
- package/dist/internal/ui/button.d.ts +12 -0
- package/dist/internal/ui/button.d.ts.map +1 -0
- package/dist/internal/ui/button.js +33 -0
- package/dist/internal/ui/card.d.ts +6 -0
- package/dist/internal/ui/card.d.ts.map +1 -0
- package/dist/internal/ui/card.js +14 -0
- package/dist/internal/ui/collapsible.d.ts +6 -0
- package/dist/internal/ui/collapsible.d.ts.map +1 -0
- package/dist/internal/ui/collapsible.js +12 -0
- package/dist/internal/ui/drawer.d.ts +6 -0
- package/dist/internal/ui/drawer.d.ts.map +1 -0
- package/dist/internal/ui/drawer.js +13 -0
- package/dist/internal/ui/dropdown-menu.d.ts +22 -0
- package/dist/internal/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/internal/ui/dropdown-menu.js +41 -0
- package/dist/internal/ui/input-group.d.ts +15 -0
- package/dist/internal/ui/input-group.d.ts.map +1 -0
- package/dist/internal/ui/input-group.js +44 -0
- package/dist/internal/ui/input.d.ts +3 -0
- package/dist/internal/ui/input.d.ts.map +1 -0
- package/dist/internal/ui/input.js +5 -0
- package/dist/internal/ui/kbd.d.ts +4 -0
- package/dist/internal/ui/kbd.d.ts.map +1 -0
- package/dist/internal/ui/kbd.js +8 -0
- package/dist/internal/ui/popover.d.ts +6 -0
- package/dist/internal/ui/popover.d.ts.map +1 -0
- package/dist/internal/ui/popover.js +13 -0
- package/dist/internal/ui/scroll-area.d.ts +5 -0
- package/dist/internal/ui/scroll-area.d.ts.map +1 -0
- package/dist/internal/ui/scroll-area.js +12 -0
- package/dist/internal/ui/separator.d.ts +4 -0
- package/dist/internal/ui/separator.d.ts.map +1 -0
- package/dist/internal/ui/separator.js +7 -0
- package/dist/internal/ui/sheet.d.ts +10 -0
- package/dist/internal/ui/sheet.d.ts.map +1 -0
- package/dist/internal/ui/sheet.js +24 -0
- package/dist/internal/ui/sonner.d.ts +3 -0
- package/dist/internal/ui/sonner.d.ts.map +1 -0
- package/dist/internal/ui/sonner.js +20 -0
- package/dist/internal/ui/spinner.d.ts +3 -0
- package/dist/internal/ui/spinner.d.ts.map +1 -0
- package/dist/internal/ui/spinner.js +6 -0
- package/dist/internal/ui/textarea.d.ts +3 -0
- package/dist/internal/ui/textarea.d.ts.map +1 -0
- package/dist/internal/ui/textarea.js +5 -0
- package/dist/internal/ui/tooltip.d.ts +7 -0
- package/dist/internal/ui/tooltip.d.ts.map +1 -0
- package/dist/internal/ui/tooltip.js +16 -0
- package/dist/internal/use-mobile.d.ts +2 -0
- package/dist/internal/use-mobile.d.ts.map +1 -0
- package/dist/internal/use-mobile.js +16 -0
- package/dist/layout.d.ts +14 -0
- package/dist/layout.d.ts.map +1 -0
- package/dist/layout.js +31 -0
- package/dist/mdx.d.ts +36 -0
- package/dist/mdx.d.ts.map +1 -0
- package/dist/mdx.js +74 -0
- package/dist/pages/docs.d.ts +77 -0
- package/dist/pages/docs.d.ts.map +1 -0
- package/dist/pages/docs.js +92 -0
- package/dist/proxy.d.ts +37 -0
- package/dist/proxy.d.ts.map +1 -0
- package/dist/proxy.js +162 -0
- package/dist/routes/chat.d.ts +14 -0
- package/dist/routes/chat.d.ts.map +1 -0
- package/dist/routes/chat.js +242 -0
- package/dist/routes/llms.d.ts +51 -0
- package/dist/routes/llms.d.ts.map +1 -0
- package/dist/routes/llms.js +59 -0
- package/dist/routes/search.d.ts +11 -0
- package/dist/routes/search.d.ts.map +1 -0
- package/dist/routes/search.js +74 -0
- package/dist/routes/sitemap.d.ts +44 -0
- package/dist/routes/sitemap.d.ts.map +1 -0
- package/dist/routes/sitemap.js +168 -0
- package/dist/sidebar.d.ts +11 -0
- package/dist/sidebar.d.ts.map +1 -0
- package/dist/sidebar.js +16 -0
- package/dist/source.d.ts +174 -0
- package/dist/source.d.ts.map +1 -0
- package/dist/source.js +129 -0
- package/dist/versions.d.ts +15 -0
- package/dist/versions.d.ts.map +1 -0
- package/dist/versions.js +52 -0
- package/package.json +141 -9
- package/styles.css +193 -0
- package/template/_gitignore +29 -0
- package/template/app/[lang]/(home)/components/centered-section.tsx +26 -0
- package/template/app/[lang]/(home)/components/cta.tsx +19 -0
- package/template/app/[lang]/(home)/components/hero.tsx +27 -0
- package/template/app/[lang]/(home)/components/one-two-section.tsx +25 -0
- package/template/app/[lang]/(home)/components/templates.tsx +50 -0
- package/template/app/[lang]/(home)/components/text-grid-section.tsx +20 -0
- package/template/app/[lang]/(home)/layout.tsx +14 -0
- package/template/app/[lang]/(home)/page.tsx +126 -0
- package/template/app/[lang]/docs/[[...slug]]/page.tsx +19 -0
- package/template/app/[lang]/docs/layout.tsx +14 -0
- package/template/app/[lang]/layout.tsx +29 -0
- package/template/app/[lang]/llms.mdx/[[...slug]]/route.ts +7 -0
- package/template/app/[lang]/llms.txt/route.ts +6 -0
- package/template/app/[lang]/og/[...slug]/background.png +0 -0
- package/template/app/[lang]/og/[...slug]/geist-sans-regular.ttf +0 -0
- package/template/app/[lang]/og/[...slug]/geist-sans-semibold.ttf +0 -0
- package/template/app/[lang]/og/[...slug]/route.tsx +95 -0
- package/template/app/[lang]/rss.xml/route.ts +52 -0
- package/template/app/[lang]/sitemap.md/route.ts +9 -0
- package/template/app/actions/feedback/emotions.ts +18 -0
- package/template/app/actions/feedback/index.ts +45 -0
- package/template/app/api/chat/route.ts +8 -0
- package/template/app/api/search/route.ts +5 -0
- package/template/app/favicon.ico +0 -0
- package/template/app/global.css +2 -0
- package/template/app/robots.ts +14 -0
- package/template/app/sitemap.ts +36 -0
- package/template/app/styles/geistdocs.css +554 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right-small.tsx +35 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right.tsx +27 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-check.tsx +27 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-down-small.tsx +30 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-right.tsx +27 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-copy.tsx +27 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-file-text.tsx +25 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-menu-alt.tsx +27 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-slash-forward.tsx +36 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/index.tsx +11 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/index.tsx +14 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-elements.tsx +29 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-sdk.tsx +38 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-chat-sdk.tsx +42 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-flags-sdk.tsx +42 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-icon-vercel.tsx +31 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-streamdown.tsx +29 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-vercel-oss.tsx +24 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-workflow-sdk.tsx +73 -0
- package/template/components/geistdocs/callout.tsx +40 -0
- package/template/components/geistdocs/chat.tsx +24 -0
- package/template/components/geistdocs/code-block-tabs.tsx +61 -0
- package/template/components/geistdocs/code-block.tsx +134 -0
- package/template/components/geistdocs/copy-page.tsx +27 -0
- package/template/components/geistdocs/desktop-menu.tsx +52 -0
- package/template/components/geistdocs/docs-layout.tsx +20 -0
- package/template/components/geistdocs/docs-page.tsx +35 -0
- package/template/components/geistdocs/edit-source.tsx +30 -0
- package/template/components/geistdocs/feedback.tsx +139 -0
- package/template/components/geistdocs/footer.tsx +30 -0
- package/template/components/geistdocs/github-button.tsx +19 -0
- package/template/components/geistdocs/home-layout.tsx +46 -0
- package/template/components/geistdocs/icons.tsx +13 -0
- package/template/components/geistdocs/installer.tsx +58 -0
- package/template/components/geistdocs/language-selector.tsx +3 -0
- package/template/components/geistdocs/mdx-components.tsx +5 -0
- package/template/components/geistdocs/mermaid.tsx +68 -0
- package/template/components/geistdocs/mobile-docs-bar.tsx +77 -0
- package/template/components/geistdocs/mobile-menu.tsx +150 -0
- package/template/components/geistdocs/navbar-logo.tsx +124 -0
- package/template/components/geistdocs/navbar.tsx +22 -0
- package/template/components/geistdocs/provider.tsx +31 -0
- package/template/components/geistdocs/rss-button.tsx +10 -0
- package/template/components/geistdocs/scroll-top.tsx +21 -0
- package/template/components/geistdocs/search.tsx +17 -0
- package/template/components/geistdocs/sidebar.tsx +128 -0
- package/template/components/geistdocs/theme-aware-image.tsx +22 -0
- package/template/components/geistdocs/theme-toggle.tsx +3 -0
- package/template/components/geistdocs/video.tsx +16 -0
- package/template/components/ui/badge.tsx +46 -0
- package/template/components/ui/button-group.tsx +83 -0
- package/template/components/ui/button.tsx +60 -0
- package/template/components/ui/card.tsx +92 -0
- package/template/components/ui/collapsible.tsx +33 -0
- package/template/components/ui/command-prompt.tsx +488 -0
- package/template/components/ui/command.tsx +184 -0
- package/template/components/ui/dialog.tsx +143 -0
- package/template/components/ui/drawer.tsx +135 -0
- package/template/components/ui/dropdown-menu.tsx +257 -0
- package/template/components/ui/hover-card.tsx +44 -0
- package/template/components/ui/input-group.tsx +170 -0
- package/template/components/ui/input.tsx +21 -0
- package/template/components/ui/kbd.tsx +28 -0
- package/template/components/ui/navigation-menu.tsx +192 -0
- package/template/components/ui/popover.tsx +48 -0
- package/template/components/ui/scroll-area.tsx +58 -0
- package/template/components/ui/select.tsx +187 -0
- package/template/components/ui/separator.tsx +28 -0
- package/template/components/ui/sheet.tsx +139 -0
- package/template/components/ui/sonner.tsx +40 -0
- package/template/components/ui/spinner.tsx +16 -0
- package/template/components/ui/textarea.tsx +18 -0
- package/template/components/ui/tooltip.tsx +61 -0
- package/template/components.json +22 -0
- package/template/content/docs/ask-ai.cn.mdx +85 -0
- package/template/content/docs/ask-ai.mdx +89 -0
- package/template/content/docs/configuration.cn.mdx +155 -0
- package/template/content/docs/configuration.mdx +200 -0
- package/template/content/docs/deployment.cn.mdx +34 -0
- package/template/content/docs/deployment.mdx +40 -0
- package/template/content/docs/edit-on-github.cn.mdx +47 -0
- package/template/content/docs/edit-on-github.mdx +51 -0
- package/template/content/docs/env.cn.mdx +25 -0
- package/template/content/docs/env.mdx +29 -0
- package/template/content/docs/feedback.cn.mdx +85 -0
- package/template/content/docs/feedback.mdx +89 -0
- package/template/content/docs/getting-started.cn.mdx +86 -0
- package/template/content/docs/getting-started.mdx +107 -0
- package/template/content/docs/index.cn.mdx +57 -0
- package/template/content/docs/index.mdx +92 -0
- package/template/content/docs/internationalization.cn.mdx +111 -0
- package/template/content/docs/internationalization.mdx +122 -0
- package/template/content/docs/llms-txt.cn.mdx +72 -0
- package/template/content/docs/llms-txt.mdx +85 -0
- package/template/content/docs/md.cn.mdx +65 -0
- package/template/content/docs/md.mdx +81 -0
- package/template/content/docs/meta.json +23 -0
- package/template/content/docs/open-in-chat.cn.mdx +78 -0
- package/template/content/docs/open-in-chat.mdx +80 -0
- package/template/content/docs/provider.cn.mdx +70 -0
- package/template/content/docs/provider.mdx +74 -0
- package/template/content/docs/proxy.cn.mdx +96 -0
- package/template/content/docs/proxy.mdx +124 -0
- package/template/content/docs/rss.cn.mdx +104 -0
- package/template/content/docs/rss.mdx +108 -0
- package/template/content/docs/syntax.cn.mdx +416 -0
- package/template/content/docs/syntax.mdx +411 -0
- package/template/content/docs/theme-aware-image.mdx +57 -0
- package/template/content/docs/versioned-docs.cn.mdx +117 -0
- package/template/content/docs/versioned-docs.mdx +181 -0
- package/template/geistdocs.tsx +51 -0
- package/template/hooks/geistdocs/use-sidebar.ts +13 -0
- package/template/hooks/use-mobile.ts +19 -0
- package/template/lib/geistdocs/config.tsx +27 -0
- package/template/lib/geistdocs/fonts.ts +18 -0
- package/template/lib/geistdocs/i18n.ts +13 -0
- package/template/lib/geistdocs/md-tracking.ts +56 -0
- package/template/lib/geistdocs/source.ts +12 -0
- package/template/lib/utils.ts +6 -0
- package/template/next.config.ts +22 -0
- package/template/package.json +63 -0
- package/template/postcss.config.mjs +5 -0
- package/template/proxy.ts +18 -0
- package/template/source.config.ts +62 -0
- package/template/tsconfig.json +37 -0
- package/dist/index.js +0 -2
- /package/dist/{index.d.ts → cli/index.d.ts} +0 -0
package/dist/source.js
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { defineI18n } from "fumadocs-core/i18n";
|
|
2
|
+
import { loader } from "fumadocs-core/source";
|
|
3
|
+
import { lucideIconsPlugin } from "fumadocs-core/source/lucide-icons";
|
|
4
|
+
const getLanguages = (config) => {
|
|
5
|
+
const defaultLanguage = config.defaultLanguage ?? "en";
|
|
6
|
+
const languages = Object.keys(config.translations ?? {});
|
|
7
|
+
return {
|
|
8
|
+
defaultLanguage,
|
|
9
|
+
languages: Array.from(new Set([defaultLanguage, ...languages])),
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export const createSource = ({ docs, config, baseUrl = "/docs", id, label, markdown, }) => {
|
|
13
|
+
const { defaultLanguage, languages } = getLanguages(config);
|
|
14
|
+
const i18n = defineI18n({
|
|
15
|
+
defaultLanguage,
|
|
16
|
+
languages,
|
|
17
|
+
hideLocale: "default-locale",
|
|
18
|
+
});
|
|
19
|
+
const source = loader({
|
|
20
|
+
i18n,
|
|
21
|
+
baseUrl,
|
|
22
|
+
source: docs.toFumadocsSource(),
|
|
23
|
+
plugins: [lucideIconsPlugin()],
|
|
24
|
+
});
|
|
25
|
+
const getPageImage = (page) => {
|
|
26
|
+
const segments = [...page.slugs, "image.png"];
|
|
27
|
+
return {
|
|
28
|
+
segments,
|
|
29
|
+
url: config.basePath
|
|
30
|
+
? `${config.basePath}/og/${segments.join("/")}`
|
|
31
|
+
: `/og/${segments.join("/")}`,
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
const getPageMarkdown = async (page) => {
|
|
35
|
+
const data = page.data;
|
|
36
|
+
const processed = await data.getText("processed");
|
|
37
|
+
const { title, description, product, type, summary, prerequisites, related, } = data;
|
|
38
|
+
const frontmatter = [
|
|
39
|
+
"---",
|
|
40
|
+
`title: ${title}`,
|
|
41
|
+
description && `description: ${description}`,
|
|
42
|
+
product && `product: ${product}`,
|
|
43
|
+
type && `type: ${type}`,
|
|
44
|
+
summary && `summary: ${summary}`,
|
|
45
|
+
prerequisites?.length &&
|
|
46
|
+
`prerequisites:\n${prerequisites
|
|
47
|
+
.map((prerequisite) => ` - ${prerequisite}`)
|
|
48
|
+
.join("\n")}`,
|
|
49
|
+
related?.length &&
|
|
50
|
+
`related:\n${related.map((entry) => ` - ${entry}`).join("\n")}`,
|
|
51
|
+
"---",
|
|
52
|
+
]
|
|
53
|
+
.filter(Boolean)
|
|
54
|
+
.join("\n");
|
|
55
|
+
const rendered = `${frontmatter}
|
|
56
|
+
|
|
57
|
+
# ${title}
|
|
58
|
+
|
|
59
|
+
${processed}
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
For a semantic overview of all documentation, see [/sitemap.md](/sitemap.md)
|
|
64
|
+
|
|
65
|
+
For an index of all available documentation, see [/llms.txt](/llms.txt)`;
|
|
66
|
+
if (!markdown?.transform) {
|
|
67
|
+
return rendered;
|
|
68
|
+
}
|
|
69
|
+
return await markdown.transform(rendered, {
|
|
70
|
+
page: page,
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
return {
|
|
74
|
+
baseUrl,
|
|
75
|
+
source,
|
|
76
|
+
id,
|
|
77
|
+
label,
|
|
78
|
+
getPageImage,
|
|
79
|
+
getPageMarkdown,
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
export const createSources = ({ config, sources }) => {
|
|
83
|
+
const all = sources.map(({ id, label, ...sourceOptions }) => {
|
|
84
|
+
const bundle = createSource({
|
|
85
|
+
...sourceOptions,
|
|
86
|
+
config,
|
|
87
|
+
id,
|
|
88
|
+
label,
|
|
89
|
+
});
|
|
90
|
+
return {
|
|
91
|
+
id,
|
|
92
|
+
label,
|
|
93
|
+
source: bundle,
|
|
94
|
+
};
|
|
95
|
+
});
|
|
96
|
+
return {
|
|
97
|
+
all,
|
|
98
|
+
byId: Object.fromEntries(all.map((entry) => [entry.id, entry.source])),
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
export const createVersionedSources = ({ config, current, versions, }) => {
|
|
102
|
+
const all = versions.map(({ description, href, id, label, routePrefix, ...sourceOptions }) => {
|
|
103
|
+
const bundle = createSource({
|
|
104
|
+
...sourceOptions,
|
|
105
|
+
config,
|
|
106
|
+
id,
|
|
107
|
+
label,
|
|
108
|
+
});
|
|
109
|
+
return {
|
|
110
|
+
description,
|
|
111
|
+
href,
|
|
112
|
+
id,
|
|
113
|
+
label,
|
|
114
|
+
routePrefix,
|
|
115
|
+
source: bundle,
|
|
116
|
+
};
|
|
117
|
+
});
|
|
118
|
+
const byId = Object.fromEntries(all.map((entry) => [entry.id, entry.source]));
|
|
119
|
+
const currentSource = byId[current];
|
|
120
|
+
if (!currentSource) {
|
|
121
|
+
throw new Error(`Unknown Geistdocs version: ${current}`);
|
|
122
|
+
}
|
|
123
|
+
return {
|
|
124
|
+
all,
|
|
125
|
+
byId,
|
|
126
|
+
current: currentSource,
|
|
127
|
+
currentVersion: current,
|
|
128
|
+
};
|
|
129
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { GeistdocsVersionConfig, GeistdocsVersionsConfig } from "./config";
|
|
2
|
+
interface ResolveVersionHrefOptions {
|
|
3
|
+
currentVersion?: GeistdocsVersionConfig;
|
|
4
|
+
pathname: string;
|
|
5
|
+
version: GeistdocsVersionConfig;
|
|
6
|
+
}
|
|
7
|
+
interface GeistdocsVersionSelectProps {
|
|
8
|
+
className?: string;
|
|
9
|
+
current?: string;
|
|
10
|
+
versions: GeistdocsVersionConfig[] | GeistdocsVersionsConfig;
|
|
11
|
+
}
|
|
12
|
+
export declare const resolveVersionHref: ({ currentVersion, pathname, version, }: ResolveVersionHrefOptions) => string;
|
|
13
|
+
export declare const GeistdocsVersionSelect: ({ className, current, versions, }: GeistdocsVersionSelectProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=versions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../src/versions.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAEhF,UAAU,yBAAyB;IACjC,cAAc,CAAC,EAAE,sBAAsB,CAAC;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,sBAAsB,CAAC;CACjC;AAED,UAAU,2BAA2B;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,sBAAsB,EAAE,GAAG,uBAAuB,CAAC;CAC9D;AAsBD,eAAO,MAAM,kBAAkB,GAAI,wCAIhC,yBAAyB,WAmB3B,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,mCAIpC,2BAA2B,mDA2C7B,CAAC"}
|
package/dist/versions.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { usePathname } from "next/navigation";
|
|
4
|
+
const LEADING_SLASH_PATTERN = /^\//;
|
|
5
|
+
const PATH_TOKEN_PATTERN = /:path\*|\*path/g;
|
|
6
|
+
const TRAILING_SLASH_PATTERN = /\/$/;
|
|
7
|
+
const normalizePathname = (pathname) => pathname.startsWith("/") ? pathname : `/${pathname}`;
|
|
8
|
+
const removeRoutePrefix = (pathname, version) => {
|
|
9
|
+
if (!version?.routePrefix || version.routePrefix === "/") {
|
|
10
|
+
return pathname;
|
|
11
|
+
}
|
|
12
|
+
return pathname.startsWith(version.routePrefix)
|
|
13
|
+
? pathname.slice(version.routePrefix.length) || "/"
|
|
14
|
+
: pathname;
|
|
15
|
+
};
|
|
16
|
+
export const resolveVersionHref = ({ currentVersion, pathname, version, }) => {
|
|
17
|
+
const normalizedPathname = normalizePathname(pathname);
|
|
18
|
+
const pathWithoutCurrentPrefix = removeRoutePrefix(normalizedPathname, currentVersion);
|
|
19
|
+
const pathValue = pathWithoutCurrentPrefix.replace(LEADING_SLASH_PATTERN, "");
|
|
20
|
+
if (version.href) {
|
|
21
|
+
return version.href
|
|
22
|
+
.replace(PATH_TOKEN_PATTERN, pathValue)
|
|
23
|
+
.replace(TRAILING_SLASH_PATTERN, "");
|
|
24
|
+
}
|
|
25
|
+
const routePrefix = version.routePrefix?.replace(TRAILING_SLASH_PATTERN, "") ?? "";
|
|
26
|
+
const href = `${routePrefix}${pathWithoutCurrentPrefix}`;
|
|
27
|
+
return href || "/";
|
|
28
|
+
};
|
|
29
|
+
export const GeistdocsVersionSelect = ({ className, current, versions, }) => {
|
|
30
|
+
const pathname = usePathname();
|
|
31
|
+
const items = Array.isArray(versions) ? versions : versions.items;
|
|
32
|
+
const currentId = current ?? (Array.isArray(versions) ? items[0]?.id : versions.current);
|
|
33
|
+
const currentVersion = items.find((version) => version.id === currentId);
|
|
34
|
+
if (!currentId || items.length === 0) {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
return (_jsx("select", { "aria-label": "Select documentation version", className: className, onChange: (event) => {
|
|
38
|
+
const nextVersion = items.find((version) => version.id === event.currentTarget.value);
|
|
39
|
+
if (!nextVersion) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
const href = resolveVersionHref({
|
|
43
|
+
currentVersion,
|
|
44
|
+
pathname,
|
|
45
|
+
version: nextVersion,
|
|
46
|
+
});
|
|
47
|
+
const url = new URL(href, window.location.href);
|
|
48
|
+
url.search = window.location.search;
|
|
49
|
+
url.hash = window.location.hash;
|
|
50
|
+
window.location.href = url.toString();
|
|
51
|
+
}, value: currentId, children: items.map((version) => (_jsx("option", { value: version.id, children: version.label }, version.id))) }));
|
|
52
|
+
};
|
package/package.json
CHANGED
|
@@ -1,28 +1,160 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/geistdocs",
|
|
3
|
-
"description": "CLI for Geistdocs projects
|
|
4
|
-
"version": "1.2.
|
|
3
|
+
"description": "Runtime and CLI for Geistdocs projects.",
|
|
4
|
+
"version": "1.2.3-canary.48fea3c",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/vercel/geistdocs",
|
|
8
|
+
"directory": "packages/geistdocs"
|
|
9
|
+
},
|
|
5
10
|
"type": "module",
|
|
6
11
|
"bin": {
|
|
7
|
-
"geistdocs": "dist/index.js"
|
|
12
|
+
"geistdocs": "dist/cli/index.js"
|
|
8
13
|
},
|
|
14
|
+
"sideEffects": [
|
|
15
|
+
"./styles.css"
|
|
16
|
+
],
|
|
9
17
|
"files": [
|
|
10
|
-
"dist"
|
|
18
|
+
"dist",
|
|
19
|
+
"template",
|
|
20
|
+
"styles.css"
|
|
11
21
|
],
|
|
22
|
+
"exports": {
|
|
23
|
+
"./config": {
|
|
24
|
+
"types": "./dist/config.d.ts",
|
|
25
|
+
"default": "./dist/config.js"
|
|
26
|
+
},
|
|
27
|
+
"./layout": {
|
|
28
|
+
"types": "./dist/layout.d.ts",
|
|
29
|
+
"default": "./dist/layout.js"
|
|
30
|
+
},
|
|
31
|
+
"./controls": {
|
|
32
|
+
"types": "./dist/controls.d.ts",
|
|
33
|
+
"default": "./dist/controls.js"
|
|
34
|
+
},
|
|
35
|
+
"./source": {
|
|
36
|
+
"types": "./dist/source.d.ts",
|
|
37
|
+
"default": "./dist/source.js"
|
|
38
|
+
},
|
|
39
|
+
"./sidebar": {
|
|
40
|
+
"types": "./dist/sidebar.d.ts",
|
|
41
|
+
"default": "./dist/sidebar.js"
|
|
42
|
+
},
|
|
43
|
+
"./versions": {
|
|
44
|
+
"types": "./dist/versions.d.ts",
|
|
45
|
+
"default": "./dist/versions.js"
|
|
46
|
+
},
|
|
47
|
+
"./pages/docs": {
|
|
48
|
+
"types": "./dist/pages/docs.d.ts",
|
|
49
|
+
"default": "./dist/pages/docs.js"
|
|
50
|
+
},
|
|
51
|
+
"./routes/chat": {
|
|
52
|
+
"types": "./dist/routes/chat.d.ts",
|
|
53
|
+
"default": "./dist/routes/chat.js"
|
|
54
|
+
},
|
|
55
|
+
"./routes/search": {
|
|
56
|
+
"types": "./dist/routes/search.d.ts",
|
|
57
|
+
"default": "./dist/routes/search.js"
|
|
58
|
+
},
|
|
59
|
+
"./routes/llms": {
|
|
60
|
+
"types": "./dist/routes/llms.d.ts",
|
|
61
|
+
"default": "./dist/routes/llms.js"
|
|
62
|
+
},
|
|
63
|
+
"./routes/sitemap": {
|
|
64
|
+
"types": "./dist/routes/sitemap.d.ts",
|
|
65
|
+
"default": "./dist/routes/sitemap.js"
|
|
66
|
+
},
|
|
67
|
+
"./proxy": {
|
|
68
|
+
"types": "./dist/proxy.d.ts",
|
|
69
|
+
"default": "./dist/proxy.js"
|
|
70
|
+
},
|
|
71
|
+
"./mdx": {
|
|
72
|
+
"types": "./dist/mdx.d.ts",
|
|
73
|
+
"default": "./dist/mdx.js"
|
|
74
|
+
},
|
|
75
|
+
"./components/callout": {
|
|
76
|
+
"types": "./dist/components/callout.d.ts",
|
|
77
|
+
"default": "./dist/components/callout.js"
|
|
78
|
+
},
|
|
79
|
+
"./components/code-block": {
|
|
80
|
+
"types": "./dist/components/code-block.d.ts",
|
|
81
|
+
"default": "./dist/components/code-block.js"
|
|
82
|
+
},
|
|
83
|
+
"./components/code-block-tabs": {
|
|
84
|
+
"types": "./dist/components/code-block-tabs.d.ts",
|
|
85
|
+
"default": "./dist/components/code-block-tabs.js"
|
|
86
|
+
},
|
|
87
|
+
"./components/copy-prompt": {
|
|
88
|
+
"types": "./dist/components/copy-prompt.d.ts",
|
|
89
|
+
"default": "./dist/components/copy-prompt.js"
|
|
90
|
+
},
|
|
91
|
+
"./components/theme-aware-image": {
|
|
92
|
+
"types": "./dist/components/theme-aware-image.d.ts",
|
|
93
|
+
"default": "./dist/components/theme-aware-image.js"
|
|
94
|
+
},
|
|
95
|
+
"./components/mermaid": {
|
|
96
|
+
"types": "./dist/components/mermaid.d.ts",
|
|
97
|
+
"default": "./dist/components/mermaid.js"
|
|
98
|
+
},
|
|
99
|
+
"./components/video": {
|
|
100
|
+
"types": "./dist/components/video.d.ts",
|
|
101
|
+
"default": "./dist/components/video.js"
|
|
102
|
+
},
|
|
103
|
+
"./styles.css": "./styles.css",
|
|
104
|
+
"./package.json": "./package.json"
|
|
105
|
+
},
|
|
106
|
+
"scripts": {
|
|
107
|
+
"build": "rm -rf dist template && node ./scripts/bundle-template.mjs && tsc -p tsconfig.runtime.json && tsup --config tsup.config.cli.ts"
|
|
108
|
+
},
|
|
12
109
|
"dependencies": {
|
|
110
|
+
"@ai-sdk/react": "^2.0.115",
|
|
13
111
|
"@clack/prompts": "^0.11.0",
|
|
112
|
+
"@icons-pack/react-simple-icons": "^13.8.0",
|
|
113
|
+
"@orama/tokenizers": "^3.1.16",
|
|
114
|
+
"@streamdown/cjk": "^1.0.1",
|
|
115
|
+
"@streamdown/code": "^1.0.1",
|
|
116
|
+
"@vercel/agent-readability": "^0.2.1",
|
|
117
|
+
"ai": "^5.0.106",
|
|
118
|
+
"class-variance-authority": "^0.7.1",
|
|
119
|
+
"clsx": "^2.1.1",
|
|
14
120
|
"commander": "^14.0.2",
|
|
121
|
+
"dexie": "^4.2.1",
|
|
122
|
+
"dexie-react-hooks": "^4.2.0",
|
|
123
|
+
"fumadocs-core": "16.2.2",
|
|
124
|
+
"fumadocs-mdx": "14.0.4",
|
|
125
|
+
"fumadocs-ui": "16.2.2",
|
|
15
126
|
"glob": "^11.0.0",
|
|
16
|
-
"
|
|
127
|
+
"lucide-react": "^0.555.0",
|
|
128
|
+
"mermaid": "^11.12.2",
|
|
129
|
+
"motion": "^12.23.25",
|
|
130
|
+
"next-themes": "^0.4.6",
|
|
131
|
+
"radix-ui": "latest",
|
|
132
|
+
"react-player": "^3.4.0",
|
|
133
|
+
"sonner": "^2.0.7",
|
|
134
|
+
"streamdown": "^2.1.0",
|
|
135
|
+
"tailwind-merge": "^3.4.0",
|
|
136
|
+
"ts-morph": "^27.0.2",
|
|
137
|
+
"tw-animate-css": "^1.4.0",
|
|
138
|
+
"use-stick-to-bottom": "^1.1.1",
|
|
139
|
+
"vaul": "^1.1.2",
|
|
140
|
+
"zod": "^4.1.13"
|
|
141
|
+
},
|
|
142
|
+
"peerDependencies": {
|
|
143
|
+
"next": "16.0.10",
|
|
144
|
+
"react": "^19.2.3",
|
|
145
|
+
"react-dom": "^19.2.3"
|
|
17
146
|
},
|
|
18
147
|
"devDependencies": {
|
|
19
148
|
"@biomejs/biome": "^2.3.8",
|
|
20
149
|
"@types/glob": "^9.0.0",
|
|
150
|
+
"@types/mdx": "^2.0.13",
|
|
21
151
|
"@types/node": "^24.10.1",
|
|
152
|
+
"@types/react": "^19.2.7",
|
|
153
|
+
"@types/react-dom": "^19.2.3",
|
|
154
|
+
"next": "16.0.10",
|
|
155
|
+
"react": "^19.2.3",
|
|
156
|
+
"react-dom": "^19.2.3",
|
|
22
157
|
"tsup": "^8.5.1",
|
|
23
158
|
"typescript": "^5.9.3"
|
|
24
|
-
},
|
|
25
|
-
"scripts": {
|
|
26
|
-
"build": "tsup"
|
|
27
159
|
}
|
|
28
|
-
}
|
|
160
|
+
}
|
package/styles.css
ADDED
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@import "fumadocs-ui/css/shadcn.css";
|
|
3
|
+
@import "fumadocs-ui/css/preset.css";
|
|
4
|
+
@import "tw-animate-css";
|
|
5
|
+
|
|
6
|
+
@custom-variant dark (&:is(.dark *));
|
|
7
|
+
|
|
8
|
+
@theme inline {
|
|
9
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
10
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
11
|
+
--radius-lg: var(--radius);
|
|
12
|
+
--radius-xl: calc(var(--radius) + 4px);
|
|
13
|
+
--color-background: var(--background);
|
|
14
|
+
--color-foreground: var(--foreground);
|
|
15
|
+
--color-card: var(--card);
|
|
16
|
+
--color-card-foreground: var(--card-foreground);
|
|
17
|
+
--color-popover: var(--popover);
|
|
18
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
19
|
+
--color-primary: var(--primary);
|
|
20
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
21
|
+
--color-secondary: var(--secondary);
|
|
22
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
23
|
+
--color-muted: var(--muted);
|
|
24
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
25
|
+
--color-accent: var(--accent);
|
|
26
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
27
|
+
--color-destructive: var(--destructive);
|
|
28
|
+
--color-border: var(--border);
|
|
29
|
+
--color-input: var(--input);
|
|
30
|
+
--color-ring: var(--ring);
|
|
31
|
+
--color-chart-1: var(--chart-1);
|
|
32
|
+
--color-chart-2: var(--chart-2);
|
|
33
|
+
--color-chart-3: var(--chart-3);
|
|
34
|
+
--color-chart-4: var(--chart-4);
|
|
35
|
+
--color-chart-5: var(--chart-5);
|
|
36
|
+
--color-sidebar: var(--sidebar);
|
|
37
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
38
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
39
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
40
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
41
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
42
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
43
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:root {
|
|
47
|
+
--radius: 0.625rem;
|
|
48
|
+
--background: oklch(1 0 0);
|
|
49
|
+
--foreground: oklch(0.145 0 0);
|
|
50
|
+
--card: oklch(1 0 0);
|
|
51
|
+
--card-foreground: oklch(0.145 0 0);
|
|
52
|
+
--popover: oklch(1 0 0);
|
|
53
|
+
--popover-foreground: oklch(0.145 0 0);
|
|
54
|
+
--primary: oklch(57.61% 0.2508 258.23);
|
|
55
|
+
--primary-foreground: oklch(1 0 0);
|
|
56
|
+
--secondary: oklch(0.97 0 0);
|
|
57
|
+
--secondary-foreground: oklch(0.205 0 0);
|
|
58
|
+
--muted: oklch(0.97 0 0);
|
|
59
|
+
--muted-foreground: oklch(0.556 0 0);
|
|
60
|
+
--accent: oklch(0.97 0 0);
|
|
61
|
+
--accent-foreground: oklch(0.205 0 0);
|
|
62
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
63
|
+
--border: oklch(0.922 0 0);
|
|
64
|
+
--input: oklch(0.922 0 0);
|
|
65
|
+
--ring: oklch(0.708 0 0);
|
|
66
|
+
--chart-1: oklch(0.646 0.222 41.116);
|
|
67
|
+
--chart-2: oklch(0.6 0.118 184.704);
|
|
68
|
+
--chart-3: oklch(0.398 0.07 227.392);
|
|
69
|
+
--chart-4: oklch(0.828 0.189 84.429);
|
|
70
|
+
--chart-5: oklch(0.769 0.188 70.08);
|
|
71
|
+
--sidebar: oklch(0.985 0 0);
|
|
72
|
+
--sidebar-foreground: oklch(0.145 0 0);
|
|
73
|
+
--sidebar-primary: oklch(0.205 0 0);
|
|
74
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
75
|
+
--sidebar-accent: oklch(0.97 0 0);
|
|
76
|
+
--sidebar-accent-foreground: oklch(0.205 0 0);
|
|
77
|
+
--sidebar-border: oklch(0.922 0 0);
|
|
78
|
+
--sidebar-ring: oklch(0.708 0 0);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.dark {
|
|
82
|
+
--background: oklch(0.145 0 0);
|
|
83
|
+
--foreground: oklch(0.985 0 0);
|
|
84
|
+
--card: oklch(0.205 0 0);
|
|
85
|
+
--card-foreground: oklch(0.985 0 0);
|
|
86
|
+
--popover: oklch(0.205 0 0);
|
|
87
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
88
|
+
--primary: oklch(57.61% 0.2508 258.23);
|
|
89
|
+
--primary-foreground: oklch(1 0 0);
|
|
90
|
+
--secondary: oklch(0.269 0 0);
|
|
91
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
92
|
+
--muted: oklch(0.269 0 0);
|
|
93
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
94
|
+
--accent: oklch(0.269 0 0);
|
|
95
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
96
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
97
|
+
--border: oklch(1 0 0 / 10%);
|
|
98
|
+
--input: oklch(1 0 0 / 15%);
|
|
99
|
+
--ring: oklch(0.556 0 0);
|
|
100
|
+
--chart-1: oklch(0.488 0.243 264.376);
|
|
101
|
+
--chart-2: oklch(0.696 0.17 162.48);
|
|
102
|
+
--chart-3: oklch(0.769 0.188 70.08);
|
|
103
|
+
--chart-4: oklch(0.627 0.265 303.9);
|
|
104
|
+
--chart-5: oklch(0.645 0.246 16.439);
|
|
105
|
+
--sidebar: oklch(0.205 0 0);
|
|
106
|
+
--sidebar-foreground: oklch(0.985 0 0);
|
|
107
|
+
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
108
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
109
|
+
--sidebar-accent: oklch(0.269 0 0);
|
|
110
|
+
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
111
|
+
--sidebar-border: oklch(1 0 0 / 10%);
|
|
112
|
+
--sidebar-ring: oklch(0.556 0 0);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@layer base {
|
|
116
|
+
* {
|
|
117
|
+
@apply border-border outline-ring/50;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
body {
|
|
121
|
+
@apply bg-background text-foreground;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@layer base {
|
|
126
|
+
::after,
|
|
127
|
+
::before,
|
|
128
|
+
::backdrop,
|
|
129
|
+
::file-selector-button {
|
|
130
|
+
@apply border-border;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
* {
|
|
134
|
+
@apply min-w-0;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
html {
|
|
138
|
+
text-rendering: optimizelegibility;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
body {
|
|
142
|
+
@apply min-h-dvh;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
input::placeholder,
|
|
146
|
+
textarea::placeholder {
|
|
147
|
+
@apply text-muted-foreground;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
button:not(:disabled),
|
|
151
|
+
[role="button"]:not(:disabled) {
|
|
152
|
+
@apply cursor-pointer;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.prose h1,
|
|
157
|
+
.prose h2,
|
|
158
|
+
.prose h3,
|
|
159
|
+
.prose h4,
|
|
160
|
+
.prose h5,
|
|
161
|
+
.prose h6 {
|
|
162
|
+
@apply tracking-tight;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
@layer utilities {
|
|
166
|
+
.line-numbers code {
|
|
167
|
+
counter-reset: step;
|
|
168
|
+
counter-increment: step 0;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.line-numbers code .line::before {
|
|
172
|
+
content: counter(step);
|
|
173
|
+
counter-increment: step;
|
|
174
|
+
@apply mr-6 inline-block w-6 text-right tabular-nums text-muted-foreground;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
:root {
|
|
179
|
+
--fd-layout-width: 100%;
|
|
180
|
+
--fd-page-width: 100%;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
#nd-docs-layout > div[data-state] {
|
|
184
|
+
@apply top-16;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
#nd-sidebar-mobile {
|
|
188
|
+
@apply mt-16;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
#nd-sidebar-mobile > div:first-child > div:first-child {
|
|
192
|
+
@apply hidden;
|
|
193
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# dependencies
|
|
2
|
+
node_modules
|
|
3
|
+
|
|
4
|
+
# generated content
|
|
5
|
+
.source
|
|
6
|
+
|
|
7
|
+
# test and build output
|
|
8
|
+
coverage
|
|
9
|
+
.next
|
|
10
|
+
out
|
|
11
|
+
build
|
|
12
|
+
dist
|
|
13
|
+
*.tsbuildinfo
|
|
14
|
+
|
|
15
|
+
# local environment
|
|
16
|
+
.env*.local
|
|
17
|
+
.vercel
|
|
18
|
+
|
|
19
|
+
# logs
|
|
20
|
+
npm-debug.log*
|
|
21
|
+
yarn-debug.log*
|
|
22
|
+
yarn-error.log*
|
|
23
|
+
pnpm-debug.log*
|
|
24
|
+
|
|
25
|
+
# system files
|
|
26
|
+
.DS_Store
|
|
27
|
+
|
|
28
|
+
# Turborepo
|
|
29
|
+
.turbo
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
interface CenteredSectionProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
description: string;
|
|
6
|
+
title: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const CenteredSection = ({
|
|
10
|
+
title,
|
|
11
|
+
description,
|
|
12
|
+
children,
|
|
13
|
+
}: CenteredSectionProps) => (
|
|
14
|
+
<div className="grid items-center gap-10 overflow-hidden px-4 py-8 sm:px-12 sm:py-12">
|
|
15
|
+
<div className="mx-auto grid max-w-lg gap-4 text-center">
|
|
16
|
+
<h2 className="font-semibold text-xl tracking-tight sm:text-2xl md:text-3xl lg:text-[40px]">
|
|
17
|
+
{title}
|
|
18
|
+
</h2>
|
|
19
|
+
<p className="text-balance text-lg text-muted-foreground">
|
|
20
|
+
{description}
|
|
21
|
+
</p>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
{children}
|
|
25
|
+
</div>
|
|
26
|
+
);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import DynamicLink from "fumadocs-core/dynamic-link";
|
|
2
|
+
import { Button } from "@/components/ui/button";
|
|
3
|
+
|
|
4
|
+
interface CTAProps {
|
|
5
|
+
cta: string;
|
|
6
|
+
href: string;
|
|
7
|
+
title: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const CTA = ({ title, href, cta }: CTAProps) => (
|
|
11
|
+
<section className="flex flex-col gap-4 px-8 py-10 sm:px-12 md:flex-row md:items-center md:justify-between">
|
|
12
|
+
<h2 className="font-semibold text-xl tracking-tight sm:text-2xl md:text-3xl lg:text-[40px]">
|
|
13
|
+
{title}
|
|
14
|
+
</h2>
|
|
15
|
+
<Button asChild size="lg">
|
|
16
|
+
<DynamicLink href={`/[lang]${href}`}>{cta}</DynamicLink>
|
|
17
|
+
</Button>
|
|
18
|
+
</section>
|
|
19
|
+
);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { Badge } from "@/components/ui/badge";
|
|
3
|
+
|
|
4
|
+
interface HeroProps {
|
|
5
|
+
badge: string;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
description: string;
|
|
8
|
+
title: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const Hero = ({ badge, title, description, children }: HeroProps) => (
|
|
12
|
+
<section className="mt-(--fd-nav-height) space-y-6 px-4 pt-16 pb-16 text-center sm:pt-24">
|
|
13
|
+
<div className="mx-auto w-full max-w-4xl space-y-5">
|
|
14
|
+
<Badge className="rounded-full" variant="secondary">
|
|
15
|
+
<div className="size-2 rounded-full bg-muted-foreground" />
|
|
16
|
+
<p>{badge}</p>
|
|
17
|
+
</Badge>
|
|
18
|
+
<h1 className="text-balance text-center font-semibold text-[40px]! leading-[1.1] tracking-tight sm:text-5xl! lg:font-semibold xl:text-6xl!">
|
|
19
|
+
{title}
|
|
20
|
+
</h1>
|
|
21
|
+
<p className="mx-auto max-w-3xl text-balance text-muted-foreground leading-relaxed sm:text-xl">
|
|
22
|
+
{description}
|
|
23
|
+
</p>
|
|
24
|
+
</div>
|
|
25
|
+
{children}
|
|
26
|
+
</section>
|
|
27
|
+
);
|