@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
package/dist/routes/search.js
CHANGED
|
@@ -2,6 +2,8 @@ import { createTokenizer as createTokenizerJapanese } from "@orama/tokenizers/ja
|
|
|
2
2
|
import { createTokenizer as createTokenizerMandarin } from "@orama/tokenizers/mandarin";
|
|
3
3
|
import { defineI18n } from "fumadocs-core/i18n";
|
|
4
4
|
import { createI18nSearchAPI, } from "fumadocs-core/search/server";
|
|
5
|
+
import { isPageVisibleForSurface } from "../internal/page-visibility";
|
|
6
|
+
import { isGeistdocsSourceBundle } from "../source";
|
|
5
7
|
const getLanguages = (config) => {
|
|
6
8
|
const defaultLanguage = config.defaultLanguage ?? "en";
|
|
7
9
|
const languages = Object.keys(config.translations ?? {});
|
|
@@ -17,6 +19,9 @@ const resolveSources = (source, sources) => {
|
|
|
17
19
|
}
|
|
18
20
|
return resolvedSources;
|
|
19
21
|
};
|
|
22
|
+
const getPages = (source, locale) => isGeistdocsSourceBundle(source)
|
|
23
|
+
? source.source.getPages(locale)
|
|
24
|
+
: source.getPages(locale);
|
|
20
25
|
export const createSearchRoute = ({ config, source, sources, }) => {
|
|
21
26
|
const translations = config.translations ?? {};
|
|
22
27
|
const routeSources = resolveSources(source, sources);
|
|
@@ -52,7 +57,9 @@ export const createSearchRoute = ({ config, source, sources, }) => {
|
|
|
52
57
|
},
|
|
53
58
|
};
|
|
54
59
|
}
|
|
55
|
-
const getIndexes = () => languages.flatMap((locale) => routeSources.flatMap((source) =>
|
|
60
|
+
const getIndexes = () => languages.flatMap((locale) => routeSources.flatMap((source) => getPages(source, locale)
|
|
61
|
+
.filter((page) => isPageVisibleForSurface(page, "search"))
|
|
62
|
+
.map((page) => {
|
|
56
63
|
const data = page.data;
|
|
57
64
|
return {
|
|
58
65
|
id: page.url,
|
package/dist/routes/sitemap.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { NextRequest } from "next/server";
|
|
2
2
|
import type { GeistdocsConfig } from "../config";
|
|
3
|
+
import { type GeistdocsPageVisibilityData } from "../internal/page-visibility";
|
|
4
|
+
import { type GeistdocsSourceBundle } from "../source";
|
|
3
5
|
interface SitemapPage {
|
|
4
6
|
data: {
|
|
5
7
|
title?: string;
|
|
@@ -9,19 +11,20 @@ interface SitemapPage {
|
|
|
9
11
|
prerequisites?: string[];
|
|
10
12
|
product?: string;
|
|
11
13
|
lastModified?: Date;
|
|
12
|
-
};
|
|
14
|
+
} & GeistdocsPageVisibilityData;
|
|
13
15
|
url: string;
|
|
14
16
|
}
|
|
15
17
|
interface SitemapSource {
|
|
16
18
|
getPages(lang: string): SitemapPage[];
|
|
17
19
|
}
|
|
20
|
+
type SitemapSourceInput = GeistdocsSourceBundle | SitemapSource;
|
|
18
21
|
interface SitemapSection {
|
|
19
|
-
source:
|
|
22
|
+
source: SitemapSourceInput;
|
|
20
23
|
title?: string;
|
|
21
24
|
}
|
|
22
25
|
interface CreateSitemapMarkdownRouteOptions {
|
|
23
26
|
config: Pick<GeistdocsConfig, "defaultLanguage" | "translations">;
|
|
24
|
-
source?:
|
|
27
|
+
source?: SitemapSourceInput;
|
|
25
28
|
sources?: SitemapSection[];
|
|
26
29
|
title?: string;
|
|
27
30
|
transform?: (markdown: string, context: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sitemap.d.ts","sourceRoot":"","sources":["../../src/routes/sitemap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"sitemap.d.ts","sourceRoot":"","sources":["../../src/routes/sitemap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EACL,KAAK,2BAA2B,EAEjC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,KAAK,qBAAqB,EAA2B,MAAM,WAAW,CAAC;AAKhF,UAAU,WAAW;IACnB,IAAI,EAAE;QACJ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;QACzB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,YAAY,CAAC,EAAE,IAAI,CAAC;KACrB,GAAG,2BAA2B,CAAC;IAChC,GAAG,EAAE,MAAM,CAAC;CACb;AAED,UAAU,aAAa;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,EAAE,CAAC;CACvC;AAED,KAAK,kBAAkB,GAAG,qBAAqB,GAAG,aAAa,CAAC;AAEhE,UAAU,cAAc;IACtB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,iCAAiC;IACzC,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,iBAAiB,GAAG,cAAc,CAAC,CAAC;IAClE,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,CACV,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KACtB,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;CAC/B;AA+KD,eAAO,MAAM,0BAA0B,GAAI,gDAMxC,iCAAiC;gBAK1B,WAAW,cACL;QAAE,MAAM,EAAE,OAAO,CAAC;YAAE,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE;;;;;;CA0DpD,CAAC"}
|
package/dist/routes/sitemap.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { isPageVisibleForSurface, } from "../internal/page-visibility";
|
|
2
|
+
import { isGeistdocsSourceBundle } from "../source";
|
|
1
3
|
const DOCS_PREFIX_PATTERN = /^\/docs\/?/;
|
|
2
4
|
const WHITESPACE_PATTERN = /\s+/;
|
|
3
5
|
const getLanguages = (config) => {
|
|
@@ -118,6 +120,11 @@ const resolveSitemapSections = (source, sources) => {
|
|
|
118
120
|
}
|
|
119
121
|
return sections;
|
|
120
122
|
};
|
|
123
|
+
const getSectionPages = (source, lang) => isGeistdocsSourceBundle(source)
|
|
124
|
+
? source.source.getPages(lang)
|
|
125
|
+
: source.getPages(lang);
|
|
126
|
+
const getSectionTitle = (section) => section.title ??
|
|
127
|
+
(isGeistdocsSourceBundle(section.source) ? section.source.label : undefined);
|
|
121
128
|
export const createSitemapMarkdownRoute = ({ config, source, sources, title = "Documentation Sitemap", transform, }) => {
|
|
122
129
|
const languages = getLanguages(config);
|
|
123
130
|
const sections = resolveSitemapSections(source, sources);
|
|
@@ -141,12 +148,13 @@ It is not intended to replace individual docs.
|
|
|
141
148
|
`;
|
|
142
149
|
const body = sections
|
|
143
150
|
.map((section) => {
|
|
144
|
-
const pages = section.source.
|
|
151
|
+
const pages = getSectionPages(section.source, lang).filter((page) => isPageVisibleForSurface(page, "sitemap"));
|
|
145
152
|
const tree = buildTree(pages);
|
|
146
153
|
const renderedTree = tree
|
|
147
154
|
.map((node) => renderNode(node, 0))
|
|
148
155
|
.join("\n\n");
|
|
149
|
-
|
|
156
|
+
const sectionTitle = getSectionTitle(section);
|
|
157
|
+
return [sectionTitle && `## ${sectionTitle}\n`, renderedTree]
|
|
150
158
|
.filter(Boolean)
|
|
151
159
|
.join("\n");
|
|
152
160
|
})
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const geistShikiTheme: {
|
|
2
|
+
name: string;
|
|
3
|
+
type: "dark";
|
|
4
|
+
colors: {
|
|
5
|
+
"editor.foreground": string;
|
|
6
|
+
"editor.background": string;
|
|
7
|
+
};
|
|
8
|
+
tokenColors: ({
|
|
9
|
+
scope: string[];
|
|
10
|
+
settings: {
|
|
11
|
+
foreground: string;
|
|
12
|
+
};
|
|
13
|
+
} | {
|
|
14
|
+
scope: string;
|
|
15
|
+
settings: {
|
|
16
|
+
foreground: string;
|
|
17
|
+
};
|
|
18
|
+
})[];
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=shiki-theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shiki-theme.d.ts","sourceRoot":"","sources":["../src/shiki-theme.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;CA0G3B,CAAC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
// Inline shiki css-variables theme to avoid pulling shiki as a direct dependency.
|
|
2
|
+
// Output mirrors `createCssVariablesTheme({ variablePrefix: "--shiki-" })` from shiki@3.x.
|
|
3
|
+
// CSS variables are wired in geistdocs.css under :root.
|
|
4
|
+
export const geistShikiTheme = {
|
|
5
|
+
name: "geist",
|
|
6
|
+
type: "dark",
|
|
7
|
+
colors: {
|
|
8
|
+
"editor.foreground": "var(--shiki-color-text, inherit)",
|
|
9
|
+
"editor.background": "var(--shiki-color-background, transparent)",
|
|
10
|
+
},
|
|
11
|
+
tokenColors: [
|
|
12
|
+
{
|
|
13
|
+
scope: ["comment", "punctuation.definition.comment", "string.comment"],
|
|
14
|
+
settings: { foreground: "var(--shiki-token-comment)" },
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
scope: [
|
|
18
|
+
"constant",
|
|
19
|
+
"entity.name.constant",
|
|
20
|
+
"variable.other.constant",
|
|
21
|
+
"variable.other.enummember",
|
|
22
|
+
"variable.language",
|
|
23
|
+
"entity",
|
|
24
|
+
],
|
|
25
|
+
settings: { foreground: "var(--shiki-token-constant)" },
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
scope: ["entity.name", "meta.export.default", "meta.definition.variable"],
|
|
29
|
+
settings: { foreground: "var(--shiki-token-function)" },
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
scope: [
|
|
33
|
+
"variable.parameter.function",
|
|
34
|
+
"meta.jsx.children",
|
|
35
|
+
"meta.block",
|
|
36
|
+
"meta.tag.attributes",
|
|
37
|
+
"entity.name.section",
|
|
38
|
+
"text",
|
|
39
|
+
"punctuation.definition.tag",
|
|
40
|
+
"punctuation.separator.inheritance.php",
|
|
41
|
+
"punctuation.definition.tag.html",
|
|
42
|
+
"punctuation.definition.tag.begin.html",
|
|
43
|
+
"punctuation.definition.tag.end.html",
|
|
44
|
+
"punctuation.section.embedded",
|
|
45
|
+
"variable.parameter",
|
|
46
|
+
],
|
|
47
|
+
settings: { foreground: "var(--shiki-token-parameter)" },
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
scope: ["entity.name.tag", "support.class.component"],
|
|
51
|
+
settings: { foreground: "var(--shiki-token-function)" },
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
scope: "keyword",
|
|
55
|
+
settings: { foreground: "var(--shiki-token-keyword)" },
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
scope: ["storage", "storage.type", "storage.modifier"],
|
|
59
|
+
settings: { foreground: "var(--shiki-token-keyword)" },
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
scope: [
|
|
63
|
+
"string",
|
|
64
|
+
"string punctuation.section.embedded source",
|
|
65
|
+
"attribute.value",
|
|
66
|
+
],
|
|
67
|
+
settings: { foreground: "var(--shiki-token-string)" },
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
scope: [
|
|
71
|
+
"punctuation",
|
|
72
|
+
"punctuation.definition.string",
|
|
73
|
+
"punctuation.definition.variable",
|
|
74
|
+
"punctuation.definition.string.begin",
|
|
75
|
+
"punctuation.definition.string.end",
|
|
76
|
+
"punctuation.section.embedded.begin",
|
|
77
|
+
"punctuation.section.embedded.end",
|
|
78
|
+
],
|
|
79
|
+
settings: { foreground: "var(--shiki-token-punctuation)" },
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
scope: "string.regexp",
|
|
83
|
+
settings: { foreground: "var(--shiki-token-string-expression)" },
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
scope: [
|
|
87
|
+
"support.function",
|
|
88
|
+
"entity.name.function",
|
|
89
|
+
"meta.function-call.generic",
|
|
90
|
+
],
|
|
91
|
+
settings: { foreground: "var(--shiki-token-function)" },
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
scope: "markup.underline.link",
|
|
95
|
+
settings: { foreground: "var(--shiki-token-link)" },
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
// Markdown list/task content. Shiki's markdown grammar tokenizes
|
|
99
|
+
// bracketed text (including the "x" in "[x]" task markers) as
|
|
100
|
+
// `string.other.link.title.markdown`; pin those to the surrounding
|
|
101
|
+
// list-item color so markdown blocks look uniform.
|
|
102
|
+
scope: [
|
|
103
|
+
"markup.list",
|
|
104
|
+
"string.other.link.title.markdown",
|
|
105
|
+
"string.other.link.description.markdown",
|
|
106
|
+
],
|
|
107
|
+
settings: { foreground: "var(--shiki-token-parameter)" },
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { type DefaultMDXOptions, defineConfig as defineFumadocsConfig } from "fumadocs-mdx/config";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
type FumadocsConfigInput = NonNullable<Parameters<typeof defineFumadocsConfig>[0]>;
|
|
4
|
+
export interface GeistdocsSourceConfigOptions {
|
|
5
|
+
mdxOptions?: DefaultMDXOptions;
|
|
6
|
+
plugins?: FumadocsConfigInput["plugins"];
|
|
7
|
+
}
|
|
8
|
+
export declare const geistShikiTheme: {
|
|
9
|
+
name: string;
|
|
10
|
+
type: "dark";
|
|
11
|
+
colors: {
|
|
12
|
+
"editor.foreground": string;
|
|
13
|
+
"editor.background": string;
|
|
14
|
+
};
|
|
15
|
+
tokenColors: ({
|
|
16
|
+
scope: string[];
|
|
17
|
+
settings: {
|
|
18
|
+
foreground: string;
|
|
19
|
+
};
|
|
20
|
+
} | {
|
|
21
|
+
scope: string;
|
|
22
|
+
settings: {
|
|
23
|
+
foreground: string;
|
|
24
|
+
};
|
|
25
|
+
})[];
|
|
26
|
+
};
|
|
27
|
+
export declare const geistdocsFrontmatterSchema: z.ZodObject<{
|
|
28
|
+
title: z.ZodString;
|
|
29
|
+
description: z.ZodOptional<z.ZodString>;
|
|
30
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
31
|
+
full: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
+
_openapi: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
33
|
+
product: z.ZodOptional<z.ZodString>;
|
|
34
|
+
url: z.ZodOptional<z.ZodString>;
|
|
35
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
36
|
+
conceptual: "conceptual";
|
|
37
|
+
guide: "guide";
|
|
38
|
+
reference: "reference";
|
|
39
|
+
troubleshooting: "troubleshooting";
|
|
40
|
+
integration: "integration";
|
|
41
|
+
overview: "overview";
|
|
42
|
+
}>>;
|
|
43
|
+
prerequisites: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
44
|
+
related: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
45
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
46
|
+
internal: z.ZodOptional<z.ZodBoolean>;
|
|
47
|
+
noindex: z.ZodOptional<z.ZodBoolean>;
|
|
48
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
49
|
+
keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
50
|
+
canonical: z.ZodOptional<z.ZodString>;
|
|
51
|
+
excludeFrom: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
52
|
+
chat: "chat";
|
|
53
|
+
llms: "llms";
|
|
54
|
+
search: "search";
|
|
55
|
+
sitemap: "sitemap";
|
|
56
|
+
}>>>;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
export declare const geistdocsMetaSchema: z.ZodObject<{
|
|
59
|
+
title: z.ZodOptional<z.ZodString>;
|
|
60
|
+
pages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
61
|
+
description: z.ZodOptional<z.ZodString>;
|
|
62
|
+
root: z.ZodOptional<z.ZodBoolean>;
|
|
63
|
+
defaultOpen: z.ZodOptional<z.ZodBoolean>;
|
|
64
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
65
|
+
}, z.core.$strip>;
|
|
66
|
+
export declare const defineGeistdocsSourceConfig: (config?: GeistdocsSourceConfigOptions) => import("fumadocs-mdx/config").GlobalConfig;
|
|
67
|
+
export {};
|
|
68
|
+
//# sourceMappingURL=source-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-config.d.ts","sourceRoot":"","sources":["../src/source-config.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,iBAAiB,EACtB,YAAY,IAAI,oBAAoB,EAGrC,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,KAAK,mBAAmB,GAAG,WAAW,CACpC,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAC3C,CAAC;AAEF,MAAM,WAAW,4BAA4B;IAC3C,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,OAAO,CAAC,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;CAC1C;AAED,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;CAsG3B,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqCrC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;iBAAa,CAAC;AAE9C,eAAO,MAAM,2BAA2B,GACtC,SAAQ,4BAAiC,+CAoB1C,CAAC"}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { remarkMdxMermaid } from "fumadocs-core/mdx-plugins";
|
|
2
|
+
import { defineConfig as defineFumadocsConfig, frontmatterSchema, metaSchema, } from "fumadocs-mdx/config";
|
|
3
|
+
import lastModified from "fumadocs-mdx/plugins/last-modified";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
export const geistShikiTheme = {
|
|
6
|
+
name: "geist",
|
|
7
|
+
type: "dark",
|
|
8
|
+
colors: {
|
|
9
|
+
"editor.foreground": "var(--shiki-color-text, inherit)",
|
|
10
|
+
"editor.background": "var(--shiki-color-background, transparent)",
|
|
11
|
+
},
|
|
12
|
+
tokenColors: [
|
|
13
|
+
{
|
|
14
|
+
scope: ["comment", "punctuation.definition.comment", "string.comment"],
|
|
15
|
+
settings: { foreground: "var(--shiki-token-comment)" },
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
scope: [
|
|
19
|
+
"constant",
|
|
20
|
+
"entity.name.constant",
|
|
21
|
+
"variable.other.constant",
|
|
22
|
+
"variable.other.enummember",
|
|
23
|
+
"variable.language",
|
|
24
|
+
"entity",
|
|
25
|
+
],
|
|
26
|
+
settings: { foreground: "var(--shiki-token-constant)" },
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
scope: ["entity.name", "meta.export.default", "meta.definition.variable"],
|
|
30
|
+
settings: { foreground: "var(--shiki-token-function)" },
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
scope: [
|
|
34
|
+
"variable.parameter.function",
|
|
35
|
+
"meta.jsx.children",
|
|
36
|
+
"meta.block",
|
|
37
|
+
"meta.tag.attributes",
|
|
38
|
+
"entity.name.section",
|
|
39
|
+
"text",
|
|
40
|
+
"punctuation.definition.tag",
|
|
41
|
+
"punctuation.separator.inheritance.php",
|
|
42
|
+
"punctuation.definition.tag.html",
|
|
43
|
+
"punctuation.definition.tag.begin.html",
|
|
44
|
+
"punctuation.definition.tag.end.html",
|
|
45
|
+
"punctuation.section.embedded",
|
|
46
|
+
"variable.parameter",
|
|
47
|
+
],
|
|
48
|
+
settings: { foreground: "var(--shiki-token-parameter)" },
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
scope: ["entity.name.tag", "support.class.component"],
|
|
52
|
+
settings: { foreground: "var(--shiki-token-function)" },
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
scope: "keyword",
|
|
56
|
+
settings: { foreground: "var(--shiki-token-keyword)" },
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
scope: ["storage", "storage.type", "storage.modifier"],
|
|
60
|
+
settings: { foreground: "var(--shiki-token-keyword)" },
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
scope: [
|
|
64
|
+
"string",
|
|
65
|
+
"string punctuation.section.embedded source",
|
|
66
|
+
"attribute.value",
|
|
67
|
+
],
|
|
68
|
+
settings: { foreground: "var(--shiki-token-string)" },
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
scope: [
|
|
72
|
+
"punctuation",
|
|
73
|
+
"punctuation.definition.string",
|
|
74
|
+
"punctuation.definition.variable",
|
|
75
|
+
"punctuation.definition.string.begin",
|
|
76
|
+
"punctuation.definition.string.end",
|
|
77
|
+
"punctuation.section.embedded.begin",
|
|
78
|
+
"punctuation.section.embedded.end",
|
|
79
|
+
],
|
|
80
|
+
settings: { foreground: "var(--shiki-token-punctuation)" },
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
scope: "string.regexp",
|
|
84
|
+
settings: { foreground: "var(--shiki-token-string-expression)" },
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
scope: [
|
|
88
|
+
"support.function",
|
|
89
|
+
"entity.name.function",
|
|
90
|
+
"meta.function-call.generic",
|
|
91
|
+
],
|
|
92
|
+
settings: { foreground: "var(--shiki-token-function)" },
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
scope: "markup.underline.link",
|
|
96
|
+
settings: { foreground: "var(--shiki-token-link)" },
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
scope: [
|
|
100
|
+
"markup.list",
|
|
101
|
+
"string.other.link.title.markdown",
|
|
102
|
+
"string.other.link.description.markdown",
|
|
103
|
+
],
|
|
104
|
+
settings: { foreground: "var(--shiki-token-parameter)" },
|
|
105
|
+
},
|
|
106
|
+
],
|
|
107
|
+
};
|
|
108
|
+
export const geistdocsFrontmatterSchema = frontmatterSchema.extend({
|
|
109
|
+
product: z.string().optional(),
|
|
110
|
+
url: z
|
|
111
|
+
.string()
|
|
112
|
+
.regex(/^\/.*/, { message: "url must start with a slash" })
|
|
113
|
+
.optional(),
|
|
114
|
+
type: z
|
|
115
|
+
.enum([
|
|
116
|
+
"conceptual",
|
|
117
|
+
"guide",
|
|
118
|
+
"reference",
|
|
119
|
+
"troubleshooting",
|
|
120
|
+
"integration",
|
|
121
|
+
"overview",
|
|
122
|
+
])
|
|
123
|
+
.optional(),
|
|
124
|
+
prerequisites: z
|
|
125
|
+
.array(z.string().regex(/^\/.*/, {
|
|
126
|
+
message: "prerequisites must start with a slash",
|
|
127
|
+
}))
|
|
128
|
+
.optional(),
|
|
129
|
+
related: z
|
|
130
|
+
.array(z.string().regex(/^\/.*/, { message: "related must start with a slash" }))
|
|
131
|
+
.optional(),
|
|
132
|
+
summary: z.string().optional(),
|
|
133
|
+
internal: z.boolean().optional(),
|
|
134
|
+
noindex: z.boolean().optional(),
|
|
135
|
+
tags: z.array(z.string()).optional(),
|
|
136
|
+
keywords: z.array(z.string()).optional(),
|
|
137
|
+
canonical: z.string().optional(),
|
|
138
|
+
excludeFrom: z
|
|
139
|
+
.array(z.enum(["chat", "llms", "search", "sitemap"]))
|
|
140
|
+
.optional(),
|
|
141
|
+
});
|
|
142
|
+
export const geistdocsMetaSchema = metaSchema;
|
|
143
|
+
export const defineGeistdocsSourceConfig = (config = {}) => {
|
|
144
|
+
const existingRemarkPlugins = Array.isArray(config.mdxOptions?.remarkPlugins)
|
|
145
|
+
? config.mdxOptions.remarkPlugins
|
|
146
|
+
: [];
|
|
147
|
+
const existingPlugins = Array.isArray(config.plugins) ? config.plugins : [];
|
|
148
|
+
return defineFumadocsConfig({
|
|
149
|
+
...config,
|
|
150
|
+
mdxOptions: {
|
|
151
|
+
...config.mdxOptions,
|
|
152
|
+
remarkPlugins: [remarkMdxMermaid, ...existingRemarkPlugins],
|
|
153
|
+
rehypeCodeOptions: {
|
|
154
|
+
...config.mdxOptions?.rehypeCodeOptions,
|
|
155
|
+
themes: { light: geistShikiTheme, dark: geistShikiTheme },
|
|
156
|
+
defaultColor: "light",
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
plugins: [lastModified(), ...existingPlugins],
|
|
160
|
+
});
|
|
161
|
+
};
|
package/dist/source.d.ts
CHANGED
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
import { type InferPageType, loader } from "fumadocs-core/source";
|
|
2
|
-
import type { GeistdocsConfig } from "./config";
|
|
2
|
+
import type { GeistdocsConfig, GeistdocsPageSurface } from "./config";
|
|
3
3
|
type LoaderOptions = Parameters<typeof loader>[0];
|
|
4
4
|
export interface FumadocsCollection {
|
|
5
5
|
toFumadocsSource(): LoaderOptions["source"];
|
|
6
6
|
}
|
|
7
7
|
export interface GeistdocsSourcePageData {
|
|
8
|
+
canonical?: string;
|
|
8
9
|
description?: string;
|
|
10
|
+
excludeFrom?: GeistdocsPageSurface[];
|
|
9
11
|
getText(kind: "processed"): Promise<string>;
|
|
12
|
+
internal?: boolean;
|
|
13
|
+
keywords?: string[];
|
|
10
14
|
lastModified?: Date;
|
|
15
|
+
noindex?: boolean;
|
|
11
16
|
prerequisites?: string[];
|
|
12
17
|
product?: string;
|
|
13
18
|
related?: string[];
|
|
14
19
|
summary?: string;
|
|
20
|
+
tags?: string[];
|
|
15
21
|
title: string;
|
|
16
22
|
type?: string;
|
|
17
23
|
}
|
|
@@ -73,6 +79,7 @@ export declare const createSource: ({ docs, config, baseUrl, id, label, markdown
|
|
|
73
79
|
}>>) => Promise<string>;
|
|
74
80
|
};
|
|
75
81
|
export type GeistdocsSourceBundle = ReturnType<typeof createSource>;
|
|
82
|
+
export declare const isGeistdocsSourceBundle: (source: unknown) => source is GeistdocsSourceBundle;
|
|
76
83
|
export declare const createSources: ({ config, sources }: CreateSourcesOptions) => {
|
|
77
84
|
all: {
|
|
78
85
|
id: string;
|
package/dist/source.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../src/source.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAElE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../src/source.ts"],"names":[],"mappings":"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"}
|
package/dist/source.js
CHANGED
|
@@ -34,7 +34,7 @@ export const createSource = ({ docs, config, baseUrl = "/docs", id, label, markd
|
|
|
34
34
|
const getPageMarkdown = async (page) => {
|
|
35
35
|
const data = page.data;
|
|
36
36
|
const processed = await data.getText("processed");
|
|
37
|
-
const { title, description, product, type, summary, prerequisites, related, } = data;
|
|
37
|
+
const { title, description, product, type, summary, prerequisites, related, internal, noindex, canonical, tags, keywords, excludeFrom, } = data;
|
|
38
38
|
const frontmatter = [
|
|
39
39
|
"---",
|
|
40
40
|
`title: ${title}`,
|
|
@@ -42,6 +42,14 @@ export const createSource = ({ docs, config, baseUrl = "/docs", id, label, markd
|
|
|
42
42
|
product && `product: ${product}`,
|
|
43
43
|
type && `type: ${type}`,
|
|
44
44
|
summary && `summary: ${summary}`,
|
|
45
|
+
internal && "internal: true",
|
|
46
|
+
noindex && "noindex: true",
|
|
47
|
+
canonical && `canonical: ${canonical}`,
|
|
48
|
+
tags?.length && `tags:\n${tags.map((tag) => ` - ${tag}`).join("\n")}`,
|
|
49
|
+
keywords?.length &&
|
|
50
|
+
`keywords:\n${keywords.map((keyword) => ` - ${keyword}`).join("\n")}`,
|
|
51
|
+
excludeFrom?.length &&
|
|
52
|
+
`excludeFrom:\n${excludeFrom.map((surface) => ` - ${surface}`).join("\n")}`,
|
|
45
53
|
prerequisites?.length &&
|
|
46
54
|
`prerequisites:\n${prerequisites
|
|
47
55
|
.map((prerequisite) => ` - ${prerequisite}`)
|
|
@@ -79,6 +87,11 @@ For an index of all available documentation, see [/llms.txt](/llms.txt)`;
|
|
|
79
87
|
getPageMarkdown,
|
|
80
88
|
};
|
|
81
89
|
};
|
|
90
|
+
export const isGeistdocsSourceBundle = (source) => typeof source === "object" &&
|
|
91
|
+
source !== null &&
|
|
92
|
+
"source" in source &&
|
|
93
|
+
typeof source.getPageMarkdown ===
|
|
94
|
+
"function";
|
|
82
95
|
export const createSources = ({ config, sources }) => {
|
|
83
96
|
const all = sources.map(({ id, label, ...sourceOptions }) => {
|
|
84
97
|
const bundle = createSource({
|
package/dist/versions.d.ts
CHANGED
|
@@ -1,15 +1,45 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
1
2
|
import type { GeistdocsVersionConfig, GeistdocsVersionsConfig } from "./config";
|
|
3
|
+
export interface GeistdocsRouteSelectItem {
|
|
4
|
+
description?: string;
|
|
5
|
+
href?: string;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
id: string;
|
|
8
|
+
label: string;
|
|
9
|
+
routePrefix?: string;
|
|
10
|
+
}
|
|
11
|
+
interface ResolveRouteHrefOptions<Item extends GeistdocsRouteSelectItem> {
|
|
12
|
+
currentItem?: Item;
|
|
13
|
+
item: Item;
|
|
14
|
+
pathname: string;
|
|
15
|
+
}
|
|
2
16
|
interface ResolveVersionHrefOptions {
|
|
3
17
|
currentVersion?: GeistdocsVersionConfig;
|
|
4
18
|
pathname: string;
|
|
5
19
|
version: GeistdocsVersionConfig;
|
|
6
20
|
}
|
|
21
|
+
interface GeistdocsRouteSelectProps<Item extends GeistdocsRouteSelectItem> {
|
|
22
|
+
ariaLabel?: string;
|
|
23
|
+
className?: string;
|
|
24
|
+
current?: string;
|
|
25
|
+
getDescription?: (context: {
|
|
26
|
+
active: boolean;
|
|
27
|
+
item: Item;
|
|
28
|
+
}) => ReactNode;
|
|
29
|
+
items: Item[];
|
|
30
|
+
renderIcon?: (context: {
|
|
31
|
+
active: boolean;
|
|
32
|
+
item: Item;
|
|
33
|
+
}) => ReactNode;
|
|
34
|
+
}
|
|
7
35
|
interface GeistdocsVersionSelectProps {
|
|
8
36
|
className?: string;
|
|
9
37
|
current?: string;
|
|
10
38
|
versions: GeistdocsVersionConfig[] | GeistdocsVersionsConfig;
|
|
11
39
|
}
|
|
40
|
+
export declare const resolveRouteHref: <Item extends GeistdocsRouteSelectItem>({ currentItem, item, pathname, }: ResolveRouteHrefOptions<Item>) => string;
|
|
12
41
|
export declare const resolveVersionHref: ({ currentVersion, pathname, version, }: ResolveVersionHrefOptions) => string;
|
|
13
|
-
export declare const
|
|
42
|
+
export declare const GeistdocsRouteSelect: <Item extends GeistdocsRouteSelectItem>({ ariaLabel, className, current, getDescription, items, renderIcon, }: GeistdocsRouteSelectProps<Item>) => import("react/jsx-runtime").JSX.Element | null;
|
|
43
|
+
export declare const GeistdocsVersionSelect: ({ className, current, versions, }: GeistdocsVersionSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
44
|
export {};
|
|
15
45
|
//# sourceMappingURL=versions.d.ts.map
|
package/dist/versions.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../src/versions.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../src/versions.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAShF,MAAM,WAAW,wBAAwB;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,UAAU,uBAAuB,CAAC,IAAI,SAAS,wBAAwB;IACrE,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,yBAAyB;IACjC,cAAc,CAAC,EAAE,sBAAsB,CAAC;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,sBAAsB,CAAC;CACjC;AAED,UAAU,yBAAyB,CAAC,IAAI,SAAS,wBAAwB;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,IAAI,CAAA;KAAE,KAAK,SAAS,CAAC;IACzE,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,IAAI,CAAA;KAAE,KAAK,SAAS,CAAC;CACtE;AAED,UAAU,2BAA2B;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,sBAAsB,EAAE,GAAG,uBAAuB,CAAC;CAC9D;AA0ED,eAAO,MAAM,gBAAgB,GAAI,IAAI,SAAS,wBAAwB,EAAE,kCAIrE,uBAAuB,CAAC,IAAI,CAAC,WAmB/B,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,wCAIhC,yBAAyB,WACgD,CAAC;AAE7E,eAAO,MAAM,oBAAoB,GAAI,IAAI,SAAS,wBAAwB,EAAE,uEAOzE,yBAAyB,CAAC,IAAI,CAAC,mDAyFjC,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,mCAIpC,2BAA2B,4CAuB7B,CAAC"}
|