@vercel/geistdocs 1.2.3 → 1.3.0-canary.41d37f1

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.
Files changed (320) hide show
  1. package/dist/cli/index.js +3 -0
  2. package/dist/components/callout.d.ts +12 -0
  3. package/dist/components/callout.d.ts.map +1 -0
  4. package/dist/components/callout.js +7 -0
  5. package/dist/components/code-block-tabs.d.ts +7 -0
  6. package/dist/components/code-block-tabs.d.ts.map +1 -0
  7. package/dist/components/code-block-tabs.js +7 -0
  8. package/dist/components/code-block.d.ts +14 -0
  9. package/dist/components/code-block.d.ts.map +1 -0
  10. package/dist/components/code-block.js +41 -0
  11. package/dist/components/mermaid.d.ts +4 -0
  12. package/dist/components/mermaid.d.ts.map +1 -0
  13. package/dist/components/mermaid.js +44 -0
  14. package/dist/components/theme-aware-image.d.ts +12 -0
  15. package/dist/components/theme-aware-image.d.ts.map +1 -0
  16. package/dist/components/theme-aware-image.js +8 -0
  17. package/dist/components/video.d.ts +6 -0
  18. package/dist/components/video.d.ts.map +1 -0
  19. package/dist/components/video.js +3 -0
  20. package/dist/config.d.ts +52 -0
  21. package/dist/config.d.ts.map +1 -0
  22. package/dist/config.js +1 -0
  23. package/dist/controls.d.ts +15 -0
  24. package/dist/controls.d.ts.map +1 -0
  25. package/dist/controls.js +52 -0
  26. package/dist/internal/chat/context.d.ts +19 -0
  27. package/dist/internal/chat/context.d.ts.map +1 -0
  28. package/dist/internal/chat/context.js +36 -0
  29. package/dist/internal/chat/conversation.d.ts +10 -0
  30. package/dist/internal/chat/conversation.d.ts.map +1 -0
  31. package/dist/internal/chat/conversation.js +16 -0
  32. package/dist/internal/chat/copy-chat.d.ts +5 -0
  33. package/dist/internal/chat/copy-chat.d.ts.map +1 -0
  34. package/dist/internal/chat/copy-chat.js +35 -0
  35. package/dist/internal/chat/db.d.ts +13 -0
  36. package/dist/internal/chat/db.d.ts.map +1 -0
  37. package/dist/internal/chat/db.js +19 -0
  38. package/dist/internal/chat/message-metadata.d.ts +8 -0
  39. package/dist/internal/chat/message-metadata.d.ts.map +1 -0
  40. package/dist/internal/chat/message-metadata.js +29 -0
  41. package/dist/internal/chat/message.d.ts +11 -0
  42. package/dist/internal/chat/message.d.ts.map +1 -0
  43. package/dist/internal/chat/message.js +11 -0
  44. package/dist/internal/chat/prompt-input.d.ts +13 -0
  45. package/dist/internal/chat/prompt-input.d.ts.map +1 -0
  46. package/dist/internal/chat/prompt-input.js +39 -0
  47. package/dist/internal/chat/shell.d.ts +2 -0
  48. package/dist/internal/chat/shell.d.ts.map +1 -0
  49. package/dist/internal/chat/shell.js +194 -0
  50. package/dist/internal/chat/shimmer.d.ts +11 -0
  51. package/dist/internal/chat/shimmer.d.ts.map +1 -0
  52. package/dist/internal/chat/shimmer.js +18 -0
  53. package/dist/internal/chat/sources.d.ts +13 -0
  54. package/dist/internal/chat/sources.d.ts.map +1 -0
  55. package/dist/internal/chat/sources.js +9 -0
  56. package/dist/internal/chat/suggestion.d.ts +11 -0
  57. package/dist/internal/chat/suggestion.d.ts.map +1 -0
  58. package/dist/internal/chat/suggestion.js +12 -0
  59. package/dist/internal/cn.d.ts +3 -0
  60. package/dist/internal/cn.d.ts.map +1 -0
  61. package/dist/internal/cn.js +3 -0
  62. package/dist/internal/feedback-action.d.ts +14 -0
  63. package/dist/internal/feedback-action.d.ts.map +1 -0
  64. package/dist/internal/feedback-action.js +34 -0
  65. package/dist/internal/i18n.d.ts +6 -0
  66. package/dist/internal/i18n.d.ts.map +1 -0
  67. package/dist/internal/i18n.js +18 -0
  68. package/dist/internal/languages.d.ts +7 -0
  69. package/dist/internal/languages.d.ts.map +1 -0
  70. package/dist/internal/languages.js +18 -0
  71. package/dist/internal/not-implemented.d.ts +2 -0
  72. package/dist/internal/not-implemented.d.ts.map +1 -0
  73. package/dist/internal/not-implemented.js +4 -0
  74. package/dist/internal/page-actions-client.d.ts +14 -0
  75. package/dist/internal/page-actions-client.d.ts.map +1 -0
  76. package/dist/internal/page-actions-client.js +154 -0
  77. package/dist/internal/page-actions.d.ts +18 -0
  78. package/dist/internal/page-actions.d.ts.map +1 -0
  79. package/dist/internal/page-actions.js +4 -0
  80. package/dist/internal/search.d.ts +5 -0
  81. package/dist/internal/search.d.ts.map +1 -0
  82. package/dist/internal/search.js +14 -0
  83. package/dist/internal/sidebar.d.ts +6 -0
  84. package/dist/internal/sidebar.d.ts.map +1 -0
  85. package/dist/internal/sidebar.js +37 -0
  86. package/dist/internal/ui/button-group.d.ts +13 -0
  87. package/dist/internal/ui/button-group.d.ts.map +1 -0
  88. package/dist/internal/ui/button-group.js +26 -0
  89. package/dist/internal/ui/button.d.ts +12 -0
  90. package/dist/internal/ui/button.d.ts.map +1 -0
  91. package/dist/internal/ui/button.js +33 -0
  92. package/dist/internal/ui/card.d.ts +6 -0
  93. package/dist/internal/ui/card.d.ts.map +1 -0
  94. package/dist/internal/ui/card.js +14 -0
  95. package/dist/internal/ui/collapsible.d.ts +6 -0
  96. package/dist/internal/ui/collapsible.d.ts.map +1 -0
  97. package/dist/internal/ui/collapsible.js +12 -0
  98. package/dist/internal/ui/drawer.d.ts +6 -0
  99. package/dist/internal/ui/drawer.d.ts.map +1 -0
  100. package/dist/internal/ui/drawer.js +13 -0
  101. package/dist/internal/ui/dropdown-menu.d.ts +22 -0
  102. package/dist/internal/ui/dropdown-menu.d.ts.map +1 -0
  103. package/dist/internal/ui/dropdown-menu.js +41 -0
  104. package/dist/internal/ui/input-group.d.ts +15 -0
  105. package/dist/internal/ui/input-group.d.ts.map +1 -0
  106. package/dist/internal/ui/input-group.js +44 -0
  107. package/dist/internal/ui/input.d.ts +3 -0
  108. package/dist/internal/ui/input.d.ts.map +1 -0
  109. package/dist/internal/ui/input.js +5 -0
  110. package/dist/internal/ui/kbd.d.ts +4 -0
  111. package/dist/internal/ui/kbd.d.ts.map +1 -0
  112. package/dist/internal/ui/kbd.js +8 -0
  113. package/dist/internal/ui/popover.d.ts +6 -0
  114. package/dist/internal/ui/popover.d.ts.map +1 -0
  115. package/dist/internal/ui/popover.js +13 -0
  116. package/dist/internal/ui/scroll-area.d.ts +5 -0
  117. package/dist/internal/ui/scroll-area.d.ts.map +1 -0
  118. package/dist/internal/ui/scroll-area.js +12 -0
  119. package/dist/internal/ui/separator.d.ts +4 -0
  120. package/dist/internal/ui/separator.d.ts.map +1 -0
  121. package/dist/internal/ui/separator.js +7 -0
  122. package/dist/internal/ui/sheet.d.ts +10 -0
  123. package/dist/internal/ui/sheet.d.ts.map +1 -0
  124. package/dist/internal/ui/sheet.js +24 -0
  125. package/dist/internal/ui/sonner.d.ts +3 -0
  126. package/dist/internal/ui/sonner.d.ts.map +1 -0
  127. package/dist/internal/ui/sonner.js +20 -0
  128. package/dist/internal/ui/spinner.d.ts +3 -0
  129. package/dist/internal/ui/spinner.d.ts.map +1 -0
  130. package/dist/internal/ui/spinner.js +6 -0
  131. package/dist/internal/ui/textarea.d.ts +3 -0
  132. package/dist/internal/ui/textarea.d.ts.map +1 -0
  133. package/dist/internal/ui/textarea.js +5 -0
  134. package/dist/internal/ui/tooltip.d.ts +7 -0
  135. package/dist/internal/ui/tooltip.d.ts.map +1 -0
  136. package/dist/internal/ui/tooltip.js +16 -0
  137. package/dist/internal/use-mobile.d.ts +2 -0
  138. package/dist/internal/use-mobile.d.ts.map +1 -0
  139. package/dist/internal/use-mobile.js +16 -0
  140. package/dist/layout.d.ts +18 -0
  141. package/dist/layout.d.ts.map +1 -0
  142. package/dist/layout.js +49 -0
  143. package/dist/mdx.d.ts +36 -0
  144. package/dist/mdx.d.ts.map +1 -0
  145. package/dist/mdx.js +72 -0
  146. package/dist/pages/docs.d.ts +55 -0
  147. package/dist/pages/docs.d.ts.map +1 -0
  148. package/dist/pages/docs.js +63 -0
  149. package/dist/proxy.d.ts +21 -0
  150. package/dist/proxy.d.ts.map +1 -0
  151. package/dist/proxy.js +109 -0
  152. package/dist/routes/chat.d.ts +13 -0
  153. package/dist/routes/chat.d.ts.map +1 -0
  154. package/dist/routes/chat.js +229 -0
  155. package/dist/routes/llms.d.ts +33 -0
  156. package/dist/routes/llms.d.ts.map +1 -0
  157. package/dist/routes/llms.js +39 -0
  158. package/dist/routes/search.d.ts +10 -0
  159. package/dist/routes/search.d.ts.map +1 -0
  160. package/dist/routes/search.js +33 -0
  161. package/dist/routes/sitemap.d.ts +35 -0
  162. package/dist/routes/sitemap.d.ts.map +1 -0
  163. package/dist/routes/sitemap.js +150 -0
  164. package/dist/source.d.ts +30 -0
  165. package/dist/source.d.ts.map +1 -0
  166. package/dist/source.js +72 -0
  167. package/package.json +129 -9
  168. package/styles.css +193 -0
  169. package/template/_gitignore +1 -0
  170. package/template/app/[lang]/(home)/components/centered-section.tsx +26 -0
  171. package/template/app/[lang]/(home)/components/cta.tsx +19 -0
  172. package/template/app/[lang]/(home)/components/hero.tsx +27 -0
  173. package/template/app/[lang]/(home)/components/one-two-section.tsx +25 -0
  174. package/template/app/[lang]/(home)/components/templates.tsx +50 -0
  175. package/template/app/[lang]/(home)/components/text-grid-section.tsx +20 -0
  176. package/template/app/[lang]/(home)/layout.tsx +14 -0
  177. package/template/app/[lang]/(home)/page.tsx +126 -0
  178. package/template/app/[lang]/docs/[[...slug]]/page.tsx +19 -0
  179. package/template/app/[lang]/docs/layout.tsx +14 -0
  180. package/template/app/[lang]/layout.tsx +29 -0
  181. package/template/app/[lang]/llms.mdx/[[...slug]]/route.ts +7 -0
  182. package/template/app/[lang]/llms.txt/route.ts +6 -0
  183. package/template/app/[lang]/og/[...slug]/background.png +0 -0
  184. package/template/app/[lang]/og/[...slug]/geist-sans-regular.ttf +0 -0
  185. package/template/app/[lang]/og/[...slug]/geist-sans-semibold.ttf +0 -0
  186. package/template/app/[lang]/og/[...slug]/route.tsx +95 -0
  187. package/template/app/[lang]/rss.xml/route.ts +52 -0
  188. package/template/app/[lang]/sitemap.md/route.ts +9 -0
  189. package/template/app/actions/feedback/emotions.ts +18 -0
  190. package/template/app/actions/feedback/index.ts +45 -0
  191. package/template/app/api/chat/route.ts +8 -0
  192. package/template/app/api/search/route.ts +5 -0
  193. package/template/app/favicon.ico +0 -0
  194. package/template/app/global.css +2 -0
  195. package/template/app/robots.ts +14 -0
  196. package/template/app/sitemap.ts +36 -0
  197. package/template/app/styles/geistdocs.css +553 -0
  198. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right-small.tsx +35 -0
  199. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right.tsx +27 -0
  200. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-check.tsx +27 -0
  201. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-down-small.tsx +30 -0
  202. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-right.tsx +27 -0
  203. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-copy.tsx +27 -0
  204. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-file-text.tsx +25 -0
  205. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-menu-alt.tsx +27 -0
  206. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-slash-forward.tsx +36 -0
  207. package/template/components/geistcn-fallbacks/geistcn-assets/icons/index.tsx +11 -0
  208. package/template/components/geistcn-fallbacks/geistcn-assets/logos/index.tsx +14 -0
  209. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-elements.tsx +29 -0
  210. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-sdk.tsx +38 -0
  211. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-chat-sdk.tsx +42 -0
  212. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-flags-sdk.tsx +42 -0
  213. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-icon-vercel.tsx +31 -0
  214. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-streamdown.tsx +29 -0
  215. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-vercel-oss.tsx +24 -0
  216. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-workflow-sdk.tsx +73 -0
  217. package/template/components/geistdocs/callout.tsx +40 -0
  218. package/template/components/geistdocs/chat.tsx +24 -0
  219. package/template/components/geistdocs/code-block-tabs.tsx +61 -0
  220. package/template/components/geistdocs/code-block.tsx +134 -0
  221. package/template/components/geistdocs/copy-page.tsx +27 -0
  222. package/template/components/geistdocs/desktop-menu.tsx +52 -0
  223. package/template/components/geistdocs/docs-layout.tsx +20 -0
  224. package/template/components/geistdocs/docs-page.tsx +35 -0
  225. package/template/components/geistdocs/edit-source.tsx +30 -0
  226. package/template/components/geistdocs/feedback.tsx +139 -0
  227. package/template/components/geistdocs/footer.tsx +30 -0
  228. package/template/components/geistdocs/github-button.tsx +19 -0
  229. package/template/components/geistdocs/home-layout.tsx +46 -0
  230. package/template/components/geistdocs/icons.tsx +13 -0
  231. package/template/components/geistdocs/installer.tsx +58 -0
  232. package/template/components/geistdocs/language-selector.tsx +3 -0
  233. package/template/components/geistdocs/mdx-components.tsx +5 -0
  234. package/template/components/geistdocs/mermaid.tsx +68 -0
  235. package/template/components/geistdocs/mobile-docs-bar.tsx +81 -0
  236. package/template/components/geistdocs/mobile-menu.tsx +150 -0
  237. package/template/components/geistdocs/navbar-logo.tsx +124 -0
  238. package/template/components/geistdocs/navbar.tsx +22 -0
  239. package/template/components/geistdocs/provider.tsx +31 -0
  240. package/template/components/geistdocs/rss-button.tsx +10 -0
  241. package/template/components/geistdocs/scroll-top.tsx +21 -0
  242. package/template/components/geistdocs/search.tsx +17 -0
  243. package/template/components/geistdocs/sidebar.tsx +128 -0
  244. package/template/components/geistdocs/theme-aware-image.tsx +22 -0
  245. package/template/components/geistdocs/theme-toggle.tsx +3 -0
  246. package/template/components/geistdocs/video.tsx +16 -0
  247. package/template/components/ui/badge.tsx +46 -0
  248. package/template/components/ui/button-group.tsx +83 -0
  249. package/template/components/ui/button.tsx +60 -0
  250. package/template/components/ui/card.tsx +92 -0
  251. package/template/components/ui/collapsible.tsx +33 -0
  252. package/template/components/ui/command-prompt.tsx +488 -0
  253. package/template/components/ui/command.tsx +184 -0
  254. package/template/components/ui/dialog.tsx +143 -0
  255. package/template/components/ui/drawer.tsx +135 -0
  256. package/template/components/ui/dropdown-menu.tsx +257 -0
  257. package/template/components/ui/hover-card.tsx +44 -0
  258. package/template/components/ui/input-group.tsx +170 -0
  259. package/template/components/ui/input.tsx +21 -0
  260. package/template/components/ui/kbd.tsx +28 -0
  261. package/template/components/ui/navigation-menu.tsx +192 -0
  262. package/template/components/ui/popover.tsx +48 -0
  263. package/template/components/ui/scroll-area.tsx +58 -0
  264. package/template/components/ui/select.tsx +187 -0
  265. package/template/components/ui/separator.tsx +28 -0
  266. package/template/components/ui/sheet.tsx +139 -0
  267. package/template/components/ui/sonner.tsx +40 -0
  268. package/template/components/ui/spinner.tsx +16 -0
  269. package/template/components/ui/textarea.tsx +18 -0
  270. package/template/components/ui/tooltip.tsx +61 -0
  271. package/template/components.json +22 -0
  272. package/template/content/docs/ask-ai.cn.mdx +85 -0
  273. package/template/content/docs/ask-ai.mdx +85 -0
  274. package/template/content/docs/configuration.cn.mdx +115 -0
  275. package/template/content/docs/configuration.mdx +115 -0
  276. package/template/content/docs/deployment.cn.mdx +34 -0
  277. package/template/content/docs/deployment.mdx +34 -0
  278. package/template/content/docs/edit-on-github.cn.mdx +47 -0
  279. package/template/content/docs/edit-on-github.mdx +47 -0
  280. package/template/content/docs/env.cn.mdx +25 -0
  281. package/template/content/docs/env.mdx +25 -0
  282. package/template/content/docs/feedback.cn.mdx +85 -0
  283. package/template/content/docs/feedback.mdx +85 -0
  284. package/template/content/docs/getting-started.cn.mdx +86 -0
  285. package/template/content/docs/getting-started.mdx +86 -0
  286. package/template/content/docs/index.cn.mdx +54 -0
  287. package/template/content/docs/index.mdx +87 -0
  288. package/template/content/docs/internationalization.cn.mdx +113 -0
  289. package/template/content/docs/internationalization.mdx +117 -0
  290. package/template/content/docs/llms-txt.cn.mdx +50 -0
  291. package/template/content/docs/llms-txt.mdx +50 -0
  292. package/template/content/docs/md.cn.mdx +68 -0
  293. package/template/content/docs/md.mdx +68 -0
  294. package/template/content/docs/meta.json +21 -0
  295. package/template/content/docs/open-in-chat.cn.mdx +78 -0
  296. package/template/content/docs/open-in-chat.mdx +78 -0
  297. package/template/content/docs/provider.cn.mdx +69 -0
  298. package/template/content/docs/provider.mdx +69 -0
  299. package/template/content/docs/rss.cn.mdx +104 -0
  300. package/template/content/docs/rss.mdx +104 -0
  301. package/template/content/docs/syntax.cn.mdx +416 -0
  302. package/template/content/docs/syntax.mdx +407 -0
  303. package/template/content/docs/theme-aware-image.mdx +53 -0
  304. package/template/geistdocs.tsx +51 -0
  305. package/template/hooks/geistdocs/use-sidebar.ts +13 -0
  306. package/template/hooks/use-mobile.ts +19 -0
  307. package/template/lib/geistdocs/config.tsx +27 -0
  308. package/template/lib/geistdocs/fonts.ts +18 -0
  309. package/template/lib/geistdocs/i18n.ts +13 -0
  310. package/template/lib/geistdocs/md-tracking.ts +56 -0
  311. package/template/lib/geistdocs/source.ts +12 -0
  312. package/template/lib/utils.ts +6 -0
  313. package/template/next.config.ts +22 -0
  314. package/template/package.json +63 -0
  315. package/template/postcss.config.mjs +5 -0
  316. package/template/proxy.ts +16 -0
  317. package/template/source.config.ts +62 -0
  318. package/template/tsconfig.json +37 -0
  319. package/dist/index.js +0 -2
  320. /package/dist/{index.d.ts → cli/index.d.ts} +0 -0
@@ -0,0 +1,30 @@
1
+ import { type InferPageType, loader } from "fumadocs-core/source";
2
+ import type { GeistdocsConfig } from "./config";
3
+ type LoaderOptions = Parameters<typeof loader>[0];
4
+ interface FumadocsCollection {
5
+ toFumadocsSource(): LoaderOptions["source"];
6
+ }
7
+ interface CreateSourceOptions {
8
+ baseUrl?: string;
9
+ config: Pick<GeistdocsConfig, "basePath" | "defaultLanguage" | "translations">;
10
+ docs: FumadocsCollection;
11
+ }
12
+ export declare const createSource: ({ docs, config, baseUrl, }: CreateSourceOptions) => {
13
+ source: import("fumadocs-core/source").LoaderOutput<{
14
+ source: import("fumadocs-core/source").SourceConfig;
15
+ i18n: import("fumadocs-core/i18n").I18nConfig<string>;
16
+ }>;
17
+ getPageImage: (page: InferPageType<import("fumadocs-core/source").LoaderOutput<{
18
+ source: import("fumadocs-core/source").SourceConfig;
19
+ i18n: import("fumadocs-core/i18n").I18nConfig<string>;
20
+ }>>) => {
21
+ segments: string[];
22
+ url: string;
23
+ };
24
+ getPageMarkdown: (page: InferPageType<import("fumadocs-core/source").LoaderOutput<{
25
+ source: import("fumadocs-core/source").SourceConfig;
26
+ i18n: import("fumadocs-core/i18n").I18nConfig<string>;
27
+ }>>) => Promise<string>;
28
+ };
29
+ export {};
30
+ //# sourceMappingURL=source.d.ts.map
@@ -0,0 +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;AAEhD,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAElD,UAAU,kBAAkB;IAC1B,gBAAgB,IAAI,aAAa,CAAC,QAAQ,CAAC,CAAC;CAC7C;AAED,UAAU,mBAAmB;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,IAAI,CACV,eAAe,EACf,UAAU,GAAG,iBAAiB,GAAG,cAAc,CAChD,CAAC;IACF,IAAI,EAAE,kBAAkB,CAAC;CAC1B;AAyBD,eAAO,MAAM,YAAY,GAAI,4BAI1B,mBAAmB;;;;;yBAeQ,aAAa;;;OAAe;;;;4BAWnB,aAAa;;;OAAe;CAiDlE,CAAC"}
package/dist/source.js ADDED
@@ -0,0 +1,72 @@
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", }) => {
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
+ return `${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
+ };
67
+ return {
68
+ source,
69
+ getPageImage,
70
+ getPageMarkdown,
71
+ };
72
+ };
package/package.json CHANGED
@@ -1,28 +1,148 @@
1
1
  {
2
2
  "name": "@vercel/geistdocs",
3
- "description": "CLI for Geistdocs projects, including initialization and updating.",
4
- "version": "1.2.3",
3
+ "description": "Runtime and CLI for Geistdocs projects.",
4
+ "version": "1.3.0-canary.41d37f1",
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
+ "./pages/docs": {
40
+ "types": "./dist/pages/docs.d.ts",
41
+ "default": "./dist/pages/docs.js"
42
+ },
43
+ "./routes/chat": {
44
+ "types": "./dist/routes/chat.d.ts",
45
+ "default": "./dist/routes/chat.js"
46
+ },
47
+ "./routes/search": {
48
+ "types": "./dist/routes/search.d.ts",
49
+ "default": "./dist/routes/search.js"
50
+ },
51
+ "./routes/llms": {
52
+ "types": "./dist/routes/llms.d.ts",
53
+ "default": "./dist/routes/llms.js"
54
+ },
55
+ "./routes/sitemap": {
56
+ "types": "./dist/routes/sitemap.d.ts",
57
+ "default": "./dist/routes/sitemap.js"
58
+ },
59
+ "./proxy": {
60
+ "types": "./dist/proxy.d.ts",
61
+ "default": "./dist/proxy.js"
62
+ },
63
+ "./mdx": {
64
+ "types": "./dist/mdx.d.ts",
65
+ "default": "./dist/mdx.js"
66
+ },
67
+ "./components/callout": {
68
+ "types": "./dist/components/callout.d.ts",
69
+ "default": "./dist/components/callout.js"
70
+ },
71
+ "./components/code-block": {
72
+ "types": "./dist/components/code-block.d.ts",
73
+ "default": "./dist/components/code-block.js"
74
+ },
75
+ "./components/code-block-tabs": {
76
+ "types": "./dist/components/code-block-tabs.d.ts",
77
+ "default": "./dist/components/code-block-tabs.js"
78
+ },
79
+ "./components/theme-aware-image": {
80
+ "types": "./dist/components/theme-aware-image.d.ts",
81
+ "default": "./dist/components/theme-aware-image.js"
82
+ },
83
+ "./components/mermaid": {
84
+ "types": "./dist/components/mermaid.d.ts",
85
+ "default": "./dist/components/mermaid.js"
86
+ },
87
+ "./components/video": {
88
+ "types": "./dist/components/video.d.ts",
89
+ "default": "./dist/components/video.js"
90
+ },
91
+ "./styles.css": "./styles.css",
92
+ "./package.json": "./package.json"
93
+ },
94
+ "scripts": {
95
+ "build": "rm -rf dist template && node ./scripts/bundle-template.mjs && tsc -p tsconfig.runtime.json && tsup --config tsup.config.cli.ts"
96
+ },
12
97
  "dependencies": {
98
+ "@ai-sdk/react": "^2.0.115",
13
99
  "@clack/prompts": "^0.11.0",
100
+ "@icons-pack/react-simple-icons": "^13.8.0",
101
+ "@orama/tokenizers": "^3.1.16",
102
+ "@streamdown/cjk": "^1.0.1",
103
+ "@streamdown/code": "^1.0.1",
104
+ "@vercel/agent-readability": "^0.2.1",
105
+ "ai": "^5.0.106",
106
+ "class-variance-authority": "^0.7.1",
107
+ "clsx": "^2.1.1",
14
108
  "commander": "^14.0.2",
109
+ "dexie": "^4.2.1",
110
+ "dexie-react-hooks": "^4.2.0",
111
+ "fumadocs-core": "16.2.2",
112
+ "fumadocs-mdx": "14.0.4",
113
+ "fumadocs-ui": "16.2.2",
15
114
  "glob": "^11.0.0",
16
- "ts-morph": "^27.0.2"
115
+ "lucide-react": "^0.555.0",
116
+ "mermaid": "^11.12.2",
117
+ "motion": "^12.23.25",
118
+ "next-themes": "^0.4.6",
119
+ "radix-ui": "latest",
120
+ "react-player": "^3.4.0",
121
+ "sonner": "^2.0.7",
122
+ "streamdown": "^2.1.0",
123
+ "tailwind-merge": "^3.4.0",
124
+ "ts-morph": "^27.0.2",
125
+ "tw-animate-css": "^1.4.0",
126
+ "use-stick-to-bottom": "^1.1.1",
127
+ "vaul": "^1.1.2",
128
+ "zod": "^4.1.13"
129
+ },
130
+ "peerDependencies": {
131
+ "next": "16.0.10",
132
+ "react": "^19.2.3",
133
+ "react-dom": "^19.2.3"
17
134
  },
18
135
  "devDependencies": {
19
136
  "@biomejs/biome": "^2.3.8",
20
137
  "@types/glob": "^9.0.0",
138
+ "@types/mdx": "^2.0.13",
21
139
  "@types/node": "^24.10.1",
140
+ "@types/react": "^19.2.7",
141
+ "@types/react-dom": "^19.2.3",
142
+ "next": "16.0.10",
143
+ "react": "^19.2.3",
144
+ "react-dom": "^19.2.3",
22
145
  "tsup": "^8.5.1",
23
146
  "typescript": "^5.9.3"
24
- },
25
- "scripts": {
26
- "build": "tsup"
27
147
  }
28
- }
148
+ }
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 @@
1
+ .vercel
@@ -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
+ );
@@ -0,0 +1,25 @@
1
+ import type { ReactNode } from "react";
2
+
3
+ interface OneTwoSectionProps {
4
+ children?: ReactNode;
5
+ description: string;
6
+ title: string;
7
+ }
8
+
9
+ export const OneTwoSection = ({
10
+ title,
11
+ description,
12
+ children,
13
+ }: OneTwoSectionProps) => (
14
+ <div className="grid gap-12 p-8 sm:grid-cols-3 sm:gap-0 sm:divide-x sm:p-0">
15
+ <div className="flex flex-col gap-2 text-balance sm:p-12">
16
+ <h2 className="font-semibold text-xl tracking-tight sm:text-2xl md:text-3xl">
17
+ {title}
18
+ </h2>
19
+ <p className="mt-2 text-balance text-lg text-muted-foreground">
20
+ {description}
21
+ </p>
22
+ </div>
23
+ <div className="sm:col-span-2 sm:p-12">{children}</div>
24
+ </div>
25
+ );
@@ -0,0 +1,50 @@
1
+ import Image from "next/image";
2
+ import { cn } from "@/lib/utils";
3
+
4
+ interface TemplatesProps {
5
+ data: {
6
+ title: string;
7
+ description: string;
8
+ link: string;
9
+ image: string;
10
+ }[];
11
+ description: string;
12
+ title: string;
13
+ }
14
+
15
+ export const Templates = ({ title, description, data }: TemplatesProps) => (
16
+ <div className="grid gap-12 p-8 px-4 py-8 sm:p-12 sm:px-12 sm:py-12">
17
+ <div className="grid max-w-3xl gap-2 text-balance">
18
+ <h2 className="font-semibold text-xl tracking-tight sm:text-2xl md:text-3xl lg:text-[40px]">
19
+ {title}
20
+ </h2>
21
+ <p className="text-balance text-lg text-muted-foreground">
22
+ {description}
23
+ </p>
24
+ </div>
25
+ <div className="grid gap-8 md:grid-cols-3">
26
+ {data.map((item) => (
27
+ <a
28
+ className="group flex-col overflow-hidden rounded-lg border bg-background p-4"
29
+ href={item.link}
30
+ key={item.title}
31
+ >
32
+ <h3 className="font-medium tracking-tight">{item.title}</h3>
33
+ <p className="line-clamp-2 text-muted-foreground text-sm">
34
+ {item.description}
35
+ </p>
36
+ <Image
37
+ alt={item.title}
38
+ className={cn(
39
+ "mt-8 -mb-12 ml-7 aspect-video -rotate-3 overflow-hidden rounded-md border object-cover object-top",
40
+ "transition-transform duration-300 group-hover:-rotate-1 group-hover:scale-105"
41
+ )}
42
+ height={336}
43
+ src={item.image}
44
+ width={640}
45
+ />
46
+ </a>
47
+ ))}
48
+ </div>
49
+ </div>
50
+ );
@@ -0,0 +1,20 @@
1
+ interface TextGridSectionProps {
2
+ data: {
3
+ id: string;
4
+ title: string;
5
+ description: string;
6
+ }[];
7
+ }
8
+
9
+ export const TextGridSection = ({ data }: TextGridSectionProps) => (
10
+ <div className="grid gap-8 px-4 py-8 sm:px-12 sm:py-12 md:grid-cols-3">
11
+ {data.map((item) => (
12
+ <div key={item.id}>
13
+ <h3 className="mb-2 font-semibold text-lg tracking-tight">
14
+ {item.title}
15
+ </h3>
16
+ <p className="text-muted-foreground">{item.description}</p>
17
+ </div>
18
+ ))}
19
+ </div>
20
+ );
@@ -0,0 +1,14 @@
1
+ import { HomeLayout } from "@/components/geistdocs/home-layout";
2
+ import { source } from "@/lib/geistdocs/source";
3
+
4
+ const Layout = async ({ children, params }: LayoutProps<"/[lang]">) => {
5
+ const { lang } = await params;
6
+
7
+ return (
8
+ <HomeLayout tree={source.pageTree[lang]}>
9
+ <div className="pt-0 pb-32">{children}</div>
10
+ </HomeLayout>
11
+ );
12
+ };
13
+
14
+ export default Layout;