@vercel/geistdocs 1.2.3-canary.48fea3c → 1.2.3-canary.fd2c9a6

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 (261) hide show
  1. package/dist/assets/icons/icon-arrow-up-right-small.d.ts +8 -0
  2. package/dist/assets/icons/icon-arrow-up-right-small.d.ts.map +1 -0
  3. package/dist/assets/icons/icon-arrow-up-right-small.js +4 -0
  4. package/dist/assets/icons/icon-arrow-up-right.d.ts +5 -0
  5. package/dist/assets/icons/icon-arrow-up-right.d.ts.map +1 -0
  6. package/dist/assets/icons/icon-arrow-up-right.js +4 -0
  7. package/dist/assets/icons/icon-check.d.ts +5 -0
  8. package/dist/assets/icons/icon-check.d.ts.map +1 -0
  9. package/dist/assets/icons/icon-check.js +4 -0
  10. package/dist/assets/icons/icon-chevron-down-small.d.ts +8 -0
  11. package/dist/assets/icons/icon-chevron-down-small.d.ts.map +1 -0
  12. package/dist/assets/icons/icon-chevron-down-small.js +7 -0
  13. package/dist/assets/icons/icon-chevron-right.d.ts +5 -0
  14. package/dist/assets/icons/icon-chevron-right.d.ts.map +1 -0
  15. package/dist/assets/icons/icon-chevron-right.js +4 -0
  16. package/dist/assets/icons/icon-copy.d.ts +5 -0
  17. package/dist/assets/icons/icon-copy.d.ts.map +1 -0
  18. package/dist/assets/icons/icon-copy.js +4 -0
  19. package/dist/assets/icons/icon-file-text.d.ts +5 -0
  20. package/dist/assets/icons/icon-file-text.d.ts.map +1 -0
  21. package/dist/assets/icons/icon-file-text.js +4 -0
  22. package/dist/assets/icons/icon-menu-alt.d.ts +5 -0
  23. package/dist/assets/icons/icon-menu-alt.d.ts.map +1 -0
  24. package/dist/assets/icons/icon-menu-alt.js +4 -0
  25. package/dist/assets/icons/icon-slash-forward.d.ts +8 -0
  26. package/dist/assets/icons/icon-slash-forward.d.ts.map +1 -0
  27. package/dist/assets/icons/icon-slash-forward.js +4 -0
  28. package/dist/assets/icons/index.d.ts +10 -0
  29. package/dist/assets/icons/index.d.ts.map +1 -0
  30. package/{template/components/geistcn-fallbacks/geistcn-assets/icons/index.tsx → dist/assets/icons/index.js} +0 -1
  31. package/dist/assets/logos/index.d.ts +13 -0
  32. package/dist/assets/logos/index.d.ts.map +1 -0
  33. package/{template/components/geistcn-fallbacks/geistcn-assets/logos/index.tsx → dist/assets/logos/index.js} +0 -1
  34. package/dist/assets/logos/logo-ai-elements.d.ts +8 -0
  35. package/dist/assets/logos/logo-ai-elements.d.ts.map +1 -0
  36. package/dist/assets/logos/logo-ai-elements.js +8 -0
  37. package/dist/assets/logos/logo-ai-sdk.d.ts +8 -0
  38. package/dist/assets/logos/logo-ai-sdk.d.ts.map +1 -0
  39. package/dist/assets/logos/logo-ai-sdk.js +8 -0
  40. package/dist/assets/logos/logo-chat-sdk.d.ts +8 -0
  41. package/dist/assets/logos/logo-chat-sdk.d.ts.map +1 -0
  42. package/dist/assets/logos/logo-chat-sdk.js +8 -0
  43. package/dist/assets/logos/logo-flags-sdk.d.ts +8 -0
  44. package/dist/assets/logos/logo-flags-sdk.d.ts.map +1 -0
  45. package/dist/assets/logos/logo-flags-sdk.js +8 -0
  46. package/dist/assets/logos/logo-icon-vercel.d.ts +9 -0
  47. package/dist/assets/logos/logo-icon-vercel.d.ts.map +1 -0
  48. package/dist/assets/logos/logo-icon-vercel.js +8 -0
  49. package/dist/assets/logos/logo-streamdown.d.ts +8 -0
  50. package/dist/assets/logos/logo-streamdown.d.ts.map +1 -0
  51. package/dist/assets/logos/logo-streamdown.js +8 -0
  52. package/dist/assets/logos/logo-vercel-oss.d.ts +8 -0
  53. package/dist/assets/logos/logo-vercel-oss.d.ts.map +1 -0
  54. package/dist/assets/logos/logo-vercel-oss.js +7 -0
  55. package/dist/assets/logos/logo-workflow-sdk.d.ts +8 -0
  56. package/dist/assets/logos/logo-workflow-sdk.d.ts.map +1 -0
  57. package/dist/assets/logos/logo-workflow-sdk.js +8 -0
  58. package/dist/cli/index.js +1 -1
  59. package/dist/components/code-block-tabs.js +3 -3
  60. package/dist/components/code-block.js +3 -3
  61. package/dist/components/copy-prompt.js +3 -3
  62. package/dist/config.d.ts +46 -1
  63. package/dist/config.d.ts.map +1 -1
  64. package/dist/controls.js +4 -4
  65. package/dist/footer.d.ts +8 -0
  66. package/dist/footer.d.ts.map +1 -0
  67. package/dist/footer.js +6 -0
  68. package/dist/home-layout.d.ts +11 -0
  69. package/dist/home-layout.d.ts.map +1 -0
  70. package/dist/home-layout.js +31 -0
  71. package/dist/internal/chat/conversation.js +1 -1
  72. package/dist/internal/chat/message.js +1 -1
  73. package/dist/internal/chat/prompt-input.js +1 -1
  74. package/dist/internal/chat/shell.js +4 -4
  75. package/dist/internal/chat/sources.js +1 -1
  76. package/dist/internal/config-context.d.ts +10 -0
  77. package/dist/internal/config-context.d.ts.map +1 -0
  78. package/dist/internal/config-context.js +15 -0
  79. package/dist/internal/footer/github-button.d.ts +7 -0
  80. package/dist/internal/footer/github-button.d.ts.map +1 -0
  81. package/dist/internal/footer/github-button.js +10 -0
  82. package/dist/internal/footer/rss-button.d.ts +2 -0
  83. package/dist/internal/footer/rss-button.d.ts.map +1 -0
  84. package/dist/internal/footer/rss-button.js +4 -0
  85. package/dist/internal/navbar/desktop-menu.d.ts +10 -0
  86. package/dist/internal/navbar/desktop-menu.d.ts.map +1 -0
  87. package/dist/internal/navbar/desktop-menu.js +11 -0
  88. package/dist/internal/navbar/mobile-menu.d.ts +7 -0
  89. package/dist/internal/navbar/mobile-menu.d.ts.map +1 -0
  90. package/dist/internal/navbar/mobile-menu.js +40 -0
  91. package/dist/internal/navbar/navbar-logo.d.ts +16 -0
  92. package/dist/internal/navbar/navbar-logo.d.ts.map +1 -0
  93. package/dist/internal/navbar/navbar-logo.js +30 -0
  94. package/dist/internal/page-actions-client.d.ts.map +1 -1
  95. package/dist/internal/page-actions-client.js +17 -6
  96. package/dist/internal/page-visibility.d.ts +18 -0
  97. package/dist/internal/page-visibility.d.ts.map +1 -0
  98. package/dist/internal/page-visibility.js +24 -0
  99. package/dist/internal/provider-client.d.ts +1 -1
  100. package/dist/internal/provider-client.d.ts.map +1 -1
  101. package/dist/internal/provider-client.js +2 -1
  102. package/dist/internal/sidebar.js +3 -3
  103. package/dist/internal/ui/button-group.js +2 -2
  104. package/dist/internal/ui/button.d.ts +1 -1
  105. package/dist/internal/ui/button.d.ts.map +1 -1
  106. package/dist/internal/ui/button.js +7 -7
  107. package/dist/internal/ui/card.js +1 -1
  108. package/dist/internal/ui/drawer.js +1 -1
  109. package/dist/internal/ui/dropdown-menu.js +7 -7
  110. package/dist/internal/ui/input-group.js +2 -2
  111. package/dist/internal/ui/input.js +1 -1
  112. package/dist/internal/ui/kbd.js +1 -1
  113. package/dist/internal/ui/navigation-menu.d.ts +17 -0
  114. package/dist/internal/ui/navigation-menu.d.ts.map +1 -0
  115. package/dist/internal/ui/navigation-menu.js +38 -0
  116. package/dist/internal/ui/popover.js +1 -1
  117. package/dist/internal/ui/scroll-area.js +2 -2
  118. package/dist/internal/ui/separator.js +1 -1
  119. package/dist/internal/ui/sheet.js +4 -4
  120. package/dist/internal/ui/sonner.js +3 -3
  121. package/dist/internal/ui/textarea.js +1 -1
  122. package/dist/internal/ui/tooltip.js +1 -1
  123. package/dist/mdx.d.ts +13 -2
  124. package/dist/mdx.d.ts.map +1 -1
  125. package/dist/mdx.js +15 -1
  126. package/dist/mobile-docs-bar.d.ts +7 -0
  127. package/dist/mobile-docs-bar.d.ts.map +1 -0
  128. package/dist/mobile-docs-bar.js +13 -0
  129. package/dist/navbar.d.ts +7 -0
  130. package/dist/navbar.d.ts.map +1 -0
  131. package/dist/navbar.js +10 -0
  132. package/dist/pages/docs.d.ts +2 -1
  133. package/dist/pages/docs.d.ts.map +1 -1
  134. package/dist/pages/docs.js +8 -3
  135. package/dist/proxy.d.ts +1 -1
  136. package/dist/proxy.d.ts.map +1 -1
  137. package/dist/proxy.js +28 -2
  138. package/dist/routes/agents.d.ts +21 -0
  139. package/dist/routes/agents.d.ts.map +1 -0
  140. package/dist/routes/agents.js +201 -0
  141. package/dist/routes/chat.d.ts.map +1 -1
  142. package/dist/routes/chat.js +12 -3
  143. package/dist/routes/llms.d.ts +6 -5
  144. package/dist/routes/llms.d.ts.map +1 -1
  145. package/dist/routes/llms.js +63 -12
  146. package/dist/routes/search.d.ts +6 -4
  147. package/dist/routes/search.d.ts.map +1 -1
  148. package/dist/routes/search.js +8 -1
  149. package/dist/routes/sitemap.d.ts +6 -3
  150. package/dist/routes/sitemap.d.ts.map +1 -1
  151. package/dist/routes/sitemap.js +10 -2
  152. package/dist/shiki-theme.d.ts +20 -0
  153. package/dist/shiki-theme.d.ts.map +1 -0
  154. package/dist/shiki-theme.js +110 -0
  155. package/dist/source.d.ts +8 -1
  156. package/dist/source.d.ts.map +1 -1
  157. package/dist/source.js +14 -1
  158. package/dist/versions.d.ts.map +1 -1
  159. package/dist/versions.js +34 -16
  160. package/package.json +43 -3
  161. package/styles.css +465 -102
  162. package/template/AGENTS.md +69 -0
  163. package/template/app/[lang]/(home)/components/centered-section.tsx +1 -3
  164. package/template/app/[lang]/(home)/components/hero.tsx +2 -2
  165. package/template/app/[lang]/(home)/components/one-two-section.tsx +1 -3
  166. package/template/app/[lang]/(home)/components/templates.tsx +3 -5
  167. package/template/app/[lang]/(home)/components/text-grid-section.tsx +1 -1
  168. package/template/app/[lang]/(home)/layout.tsx +4 -3
  169. package/template/app/[lang]/(home)/page.tsx +2 -2
  170. package/template/app/[lang]/agents.md/route.ts +6 -0
  171. package/template/app/[lang]/docs/[[...slug]]/page.tsx +1 -1
  172. package/template/app/[lang]/layout.tsx +6 -6
  173. package/template/app/[lang]/llms.mdx/[[...slug]]/route.ts +1 -1
  174. package/template/app/[lang]/sitemap.md/route.ts +2 -2
  175. package/template/app/api/search/route.ts +2 -2
  176. package/template/app/styles/geistdocs.css +150 -109
  177. package/template/components/ui/badge.tsx +5 -5
  178. package/template/components/ui/button.tsx +7 -7
  179. package/template/components/ui/command-prompt.tsx +2 -2
  180. package/template/content/docs/agent-readiness.mdx +103 -0
  181. package/template/content/docs/configuration.mdx +40 -1
  182. package/template/content/docs/index.mdx +1 -0
  183. package/template/content/docs/llms-txt.mdx +1 -0
  184. package/template/content/docs/md.mdx +2 -1
  185. package/template/content/docs/meta.json +1 -0
  186. package/template/content/docs/proxy.mdx +10 -1
  187. package/template/content/docs/theme-aware-image.mdx +1 -1
  188. package/template/geistdocs.tsx +26 -0
  189. package/template/lib/geistdocs/config.tsx +3 -0
  190. package/template/package.json +3 -3
  191. package/template/proxy.ts +0 -1
  192. package/template/source.config.ts +125 -0
  193. package/template/app/actions/feedback/emotions.ts +0 -18
  194. package/template/app/actions/feedback/index.ts +0 -45
  195. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right-small.tsx +0 -35
  196. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right.tsx +0 -27
  197. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-check.tsx +0 -27
  198. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-down-small.tsx +0 -30
  199. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-right.tsx +0 -27
  200. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-copy.tsx +0 -27
  201. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-file-text.tsx +0 -25
  202. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-menu-alt.tsx +0 -27
  203. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-slash-forward.tsx +0 -36
  204. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-elements.tsx +0 -29
  205. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-sdk.tsx +0 -38
  206. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-chat-sdk.tsx +0 -42
  207. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-flags-sdk.tsx +0 -42
  208. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-icon-vercel.tsx +0 -31
  209. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-streamdown.tsx +0 -29
  210. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-vercel-oss.tsx +0 -24
  211. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-workflow-sdk.tsx +0 -73
  212. package/template/components/geistdocs/callout.tsx +0 -40
  213. package/template/components/geistdocs/chat.tsx +0 -24
  214. package/template/components/geistdocs/code-block-tabs.tsx +0 -61
  215. package/template/components/geistdocs/code-block.tsx +0 -134
  216. package/template/components/geistdocs/copy-page.tsx +0 -27
  217. package/template/components/geistdocs/desktop-menu.tsx +0 -52
  218. package/template/components/geistdocs/docs-page.tsx +0 -35
  219. package/template/components/geistdocs/edit-source.tsx +0 -30
  220. package/template/components/geistdocs/feedback.tsx +0 -139
  221. package/template/components/geistdocs/footer.tsx +0 -30
  222. package/template/components/geistdocs/github-button.tsx +0 -19
  223. package/template/components/geistdocs/home-layout.tsx +0 -46
  224. package/template/components/geistdocs/icons.tsx +0 -13
  225. package/template/components/geistdocs/installer.tsx +0 -58
  226. package/template/components/geistdocs/language-selector.tsx +0 -3
  227. package/template/components/geistdocs/mermaid.tsx +0 -68
  228. package/template/components/geistdocs/mobile-docs-bar.tsx +0 -77
  229. package/template/components/geistdocs/mobile-menu.tsx +0 -150
  230. package/template/components/geistdocs/navbar-logo.tsx +0 -124
  231. package/template/components/geistdocs/navbar.tsx +0 -22
  232. package/template/components/geistdocs/rss-button.tsx +0 -10
  233. package/template/components/geistdocs/scroll-top.tsx +0 -21
  234. package/template/components/geistdocs/search.tsx +0 -17
  235. package/template/components/geistdocs/sidebar.tsx +0 -128
  236. package/template/components/geistdocs/theme-aware-image.tsx +0 -22
  237. package/template/components/geistdocs/theme-toggle.tsx +0 -3
  238. package/template/components/geistdocs/video.tsx +0 -16
  239. package/template/components/ui/button-group.tsx +0 -83
  240. package/template/components/ui/card.tsx +0 -92
  241. package/template/components/ui/collapsible.tsx +0 -33
  242. package/template/components/ui/command.tsx +0 -184
  243. package/template/components/ui/dialog.tsx +0 -143
  244. package/template/components/ui/drawer.tsx +0 -135
  245. package/template/components/ui/dropdown-menu.tsx +0 -257
  246. package/template/components/ui/hover-card.tsx +0 -44
  247. package/template/components/ui/input-group.tsx +0 -170
  248. package/template/components/ui/input.tsx +0 -21
  249. package/template/components/ui/kbd.tsx +0 -28
  250. package/template/components/ui/navigation-menu.tsx +0 -192
  251. package/template/components/ui/popover.tsx +0 -48
  252. package/template/components/ui/scroll-area.tsx +0 -58
  253. package/template/components/ui/select.tsx +0 -187
  254. package/template/components/ui/separator.tsx +0 -28
  255. package/template/components/ui/sheet.tsx +0 -139
  256. package/template/components/ui/sonner.tsx +0 -40
  257. package/template/components/ui/spinner.tsx +0 -16
  258. package/template/components/ui/textarea.tsx +0 -18
  259. package/template/components/ui/tooltip.tsx +0 -61
  260. package/template/hooks/geistdocs/use-sidebar.ts +0 -13
  261. package/template/hooks/use-mobile.ts +0 -19
@@ -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: SitemapSource;
22
+ source: SitemapSourceInput;
20
23
  title?: string;
21
24
  }
22
25
  interface CreateSitemapMarkdownRouteOptions {
23
26
  config: Pick<GeistdocsConfig, "defaultLanguage" | "translations">;
24
- source?: SitemapSource;
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;AAKjD,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,CAAC;IACF,GAAG,EAAE,MAAM,CAAC;CACb;AAED,UAAU,aAAa;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,EAAE,CAAC;CACvC;AAED,UAAU,cAAc;IACtB,MAAM,EAAE,aAAa,CAAC;IACtB,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,aAAa,CAAC;IACvB,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;AAsKD,eAAO,MAAM,0BAA0B,GAAI,gDAMxC,iCAAiC;gBAK1B,WAAW,cACL;QAAE,MAAM,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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"}
@@ -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.getPages(lang);
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
- return [section.title && `## ${section.title}\n`, renderedTree]
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
+ };
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;
@@ -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;AAEhD,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAElD,MAAM,WAAW,kBAAkB;IACjC,gBAAgB,IAAI,aAAa,CAAC,QAAQ,CAAC,CAAC;CAC7C;AAED,MAAM,WAAW,uBAAuB;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,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;;WAAe;;;;;;;;;;6BAXrC,aAAa;;;WAAe;;;;gCAWnB,aAAa;;;WAAe;;;CAsJlE,CAAC"}
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({
@@ -1 +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"}
1
+ {"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../src/versions.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAShF,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;AA+CD,eAAO,MAAM,kBAAkB,GAAI,wCAIhC,yBAAyB,WAmB3B,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,mCAIpC,2BAA2B,mDAuF7B,CAAC"}
package/dist/versions.js CHANGED
@@ -1,6 +1,9 @@
1
1
  "use client";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { usePathname } from "next/navigation";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { ArchiveIcon, BoxIcon, CheckIcon, ChevronDownIcon } from "lucide-react";
4
+ import { usePathname, useRouter } from "next/navigation";
5
+ import { cn } from "./internal/cn";
6
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from "./internal/ui/dropdown-menu";
4
7
  const LEADING_SLASH_PATTERN = /^\//;
5
8
  const PATH_TOKEN_PATTERN = /:path\*|\*path/g;
6
9
  const TRAILING_SLASH_PATTERN = /\/$/;
@@ -13,6 +16,13 @@ const removeRoutePrefix = (pathname, version) => {
13
16
  ? pathname.slice(version.routePrefix.length) || "/"
14
17
  : pathname;
15
18
  };
19
+ const getVersionDescription = ({ current, version, }) => version.description ?? (current ? "Current version" : "Previous version");
20
+ const VersionIcon = ({ active }) => {
21
+ const Icon = active ? BoxIcon : ArchiveIcon;
22
+ return (_jsx("span", { className: cn("flex size-9 shrink-0 items-center justify-center rounded-lg border", active
23
+ ? "border-blue-500 bg-blue-100 text-blue-900"
24
+ : "border-gray-alpha-400 bg-gray-100 text-gray-800"), children: _jsx(Icon, { className: "size-5" }) }));
25
+ };
16
26
  export const resolveVersionHref = ({ currentVersion, pathname, version, }) => {
17
27
  const normalizedPathname = normalizePathname(pathname);
18
28
  const pathWithoutCurrentPrefix = removeRoutePrefix(normalizedPathname, currentVersion);
@@ -28,25 +38,33 @@ export const resolveVersionHref = ({ currentVersion, pathname, version, }) => {
28
38
  };
29
39
  export const GeistdocsVersionSelect = ({ className, current, versions, }) => {
30
40
  const pathname = usePathname();
41
+ const router = useRouter();
31
42
  const items = Array.isArray(versions) ? versions : versions.items;
32
43
  const currentId = current ?? (Array.isArray(versions) ? items[0]?.id : versions.current);
33
44
  const currentVersion = items.find((version) => version.id === currentId);
34
45
  if (!currentId || items.length === 0) {
35
46
  return null;
36
47
  }
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;
48
+ const navigateToVersion = (version) => {
49
+ const href = resolveVersionHref({
50
+ currentVersion,
51
+ pathname,
52
+ version,
53
+ });
54
+ const url = new URL(href, window.location.href);
55
+ url.search = window.location.search;
56
+ url.hash = window.location.hash;
57
+ if (url.origin !== window.location.origin) {
50
58
  window.location.href = url.toString();
51
- }, value: currentId, children: items.map((version) => (_jsx("option", { value: version.id, children: version.label }, version.id))) }));
59
+ return;
60
+ }
61
+ router.push(`${url.pathname}${url.search}${url.hash}`);
62
+ };
63
+ return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs("button", { "aria-label": "Select documentation version", className: cn("group flex w-full items-center gap-3 rounded-xl px-2 py-2 text-left outline-none transition-colors hover:bg-gray-100 focus-visible:ring-2 focus-visible:ring-blue-700", className), type: "button", children: [currentVersion ? _jsx(VersionIcon, { active: true }) : null, _jsxs("span", { className: "min-w-0 flex-1", children: [_jsx("span", { className: "block truncate font-medium text-gray-1000 text-sm leading-5", children: currentVersion?.label ?? currentId }), currentVersion ? (_jsx("span", { className: "block truncate text-gray-800 text-sm leading-5", children: getVersionDescription({
64
+ current: true,
65
+ version: currentVersion,
66
+ }) })) : null] }), _jsx(ChevronDownIcon, { className: "size-4 shrink-0 text-gray-900 transition-transform group-data-[state=open]:rotate-180" })] }) }), _jsx(DropdownMenuContent, { align: "start", className: "w-(--radix-dropdown-menu-trigger-width) min-w-64 rounded-xl border border-gray-alpha-400 bg-background-100 p-1 shadow-(--ds-shadow-menu)", children: items.map((version) => {
67
+ const active = version.id === currentId;
68
+ return (_jsxs(DropdownMenuItem, { className: "flex cursor-pointer items-center gap-3 rounded-lg px-2 py-2", onSelect: () => navigateToVersion(version), children: [_jsx(VersionIcon, { active: active }), _jsxs("span", { className: "min-w-0 flex-1", children: [_jsx("span", { className: "block truncate font-medium text-gray-1000 text-sm leading-5", children: version.label }), _jsx("span", { className: "block truncate text-gray-800 text-sm leading-5", children: getVersionDescription({ current: active, version }) })] }), active ? _jsx(CheckIcon, { className: "size-4 text-blue-900" }) : null] }, version.id));
69
+ }) })] }));
52
70
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vercel/geistdocs",
3
3
  "description": "Runtime and CLI for Geistdocs projects.",
4
- "version": "1.2.3-canary.48fea3c",
4
+ "version": "1.2.3-canary.fd2c9a6",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/vercel/geistdocs",
@@ -28,6 +28,22 @@
28
28
  "types": "./dist/layout.d.ts",
29
29
  "default": "./dist/layout.js"
30
30
  },
31
+ "./navbar": {
32
+ "types": "./dist/navbar.d.ts",
33
+ "default": "./dist/navbar.js"
34
+ },
35
+ "./footer": {
36
+ "types": "./dist/footer.d.ts",
37
+ "default": "./dist/footer.js"
38
+ },
39
+ "./home-layout": {
40
+ "types": "./dist/home-layout.d.ts",
41
+ "default": "./dist/home-layout.js"
42
+ },
43
+ "./mobile-docs-bar": {
44
+ "types": "./dist/mobile-docs-bar.d.ts",
45
+ "default": "./dist/mobile-docs-bar.js"
46
+ },
31
47
  "./controls": {
32
48
  "types": "./dist/controls.d.ts",
33
49
  "default": "./dist/controls.js"
@@ -64,6 +80,10 @@
64
80
  "types": "./dist/routes/sitemap.d.ts",
65
81
  "default": "./dist/routes/sitemap.js"
66
82
  },
83
+ "./routes/agents": {
84
+ "types": "./dist/routes/agents.d.ts",
85
+ "default": "./dist/routes/agents.js"
86
+ },
67
87
  "./proxy": {
68
88
  "types": "./dist/proxy.d.ts",
69
89
  "default": "./dist/proxy.js"
@@ -72,6 +92,10 @@
72
92
  "types": "./dist/mdx.d.ts",
73
93
  "default": "./dist/mdx.js"
74
94
  },
95
+ "./shiki-theme": {
96
+ "types": "./dist/shiki-theme.d.ts",
97
+ "default": "./dist/shiki-theme.js"
98
+ },
75
99
  "./components/callout": {
76
100
  "types": "./dist/components/callout.d.ts",
77
101
  "default": "./dist/components/callout.js"
@@ -100,6 +124,22 @@
100
124
  "types": "./dist/components/video.d.ts",
101
125
  "default": "./dist/components/video.js"
102
126
  },
127
+ "./assets/icons": {
128
+ "types": "./dist/assets/icons/index.d.ts",
129
+ "default": "./dist/assets/icons/index.js"
130
+ },
131
+ "./assets/icons/*": {
132
+ "types": "./dist/assets/icons/*.d.ts",
133
+ "default": "./dist/assets/icons/*.js"
134
+ },
135
+ "./assets/logos": {
136
+ "types": "./dist/assets/logos/index.d.ts",
137
+ "default": "./dist/assets/logos/index.js"
138
+ },
139
+ "./assets/logos/*": {
140
+ "types": "./dist/assets/logos/*.d.ts",
141
+ "default": "./dist/assets/logos/*.js"
142
+ },
103
143
  "./styles.css": "./styles.css",
104
144
  "./package.json": "./package.json"
105
145
  },
@@ -140,7 +180,7 @@
140
180
  "zod": "^4.1.13"
141
181
  },
142
182
  "peerDependencies": {
143
- "next": "16.0.10",
183
+ "next": "16.2.6",
144
184
  "react": "^19.2.3",
145
185
  "react-dom": "^19.2.3"
146
186
  },
@@ -151,7 +191,7 @@
151
191
  "@types/node": "^24.10.1",
152
192
  "@types/react": "^19.2.7",
153
193
  "@types/react-dom": "^19.2.3",
154
- "next": "16.0.10",
194
+ "next": "16.2.6",
155
195
  "react": "^19.2.3",
156
196
  "react-dom": "^19.2.3",
157
197
  "tsup": "^8.5.1",