@vercel/geistdocs 1.2.3-canary.48fea3c → 1.2.3-canary.53ff3db

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (341) 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 +15 -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} +2 -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-nextjs.d.ts +8 -0
  50. package/dist/assets/logos/logo-nextjs.d.ts.map +1 -0
  51. package/dist/assets/logos/logo-nextjs.js +7 -0
  52. package/dist/assets/logos/logo-streamdown.d.ts +8 -0
  53. package/dist/assets/logos/logo-streamdown.d.ts.map +1 -0
  54. package/dist/assets/logos/logo-streamdown.js +8 -0
  55. package/dist/assets/logos/logo-svelte-kit.d.ts +8 -0
  56. package/dist/assets/logos/logo-svelte-kit.d.ts.map +1 -0
  57. package/dist/assets/logos/logo-svelte-kit.js +7 -0
  58. package/dist/assets/logos/logo-vercel-oss.d.ts +8 -0
  59. package/dist/assets/logos/logo-vercel-oss.d.ts.map +1 -0
  60. package/dist/assets/logos/logo-vercel-oss.js +7 -0
  61. package/dist/assets/logos/logo-workflow-sdk.d.ts +8 -0
  62. package/dist/assets/logos/logo-workflow-sdk.d.ts.map +1 -0
  63. package/dist/assets/logos/logo-workflow-sdk.js +8 -0
  64. package/dist/cli/index.js +1 -1
  65. package/dist/components/button-group.d.ts +2 -0
  66. package/dist/components/button-group.d.ts.map +1 -0
  67. package/dist/components/button-group.js +2 -0
  68. package/dist/components/button.d.ts +2 -0
  69. package/dist/components/button.d.ts.map +1 -0
  70. package/dist/components/button.js +2 -0
  71. package/dist/components/card.d.ts +2 -0
  72. package/dist/components/card.d.ts.map +1 -0
  73. package/dist/components/card.js +2 -0
  74. package/dist/components/code-block-tabs.js +3 -3
  75. package/dist/components/code-block.js +3 -3
  76. package/dist/components/collapsible.d.ts +2 -0
  77. package/dist/components/collapsible.d.ts.map +1 -0
  78. package/dist/components/collapsible.js +3 -0
  79. package/dist/components/copy-prompt.js +3 -3
  80. package/dist/components/dialog.d.ts +13 -0
  81. package/dist/components/dialog.d.ts.map +1 -0
  82. package/dist/components/dialog.js +35 -0
  83. package/dist/components/drawer.d.ts +2 -0
  84. package/dist/components/drawer.d.ts.map +1 -0
  85. package/dist/components/drawer.js +3 -0
  86. package/dist/components/dropdown-menu.d.ts +2 -0
  87. package/dist/components/dropdown-menu.d.ts.map +1 -0
  88. package/dist/components/dropdown-menu.js +3 -0
  89. package/dist/components/input-group.d.ts +2 -0
  90. package/dist/components/input-group.d.ts.map +1 -0
  91. package/dist/components/input-group.js +3 -0
  92. package/dist/components/input.d.ts +2 -0
  93. package/dist/components/input.d.ts.map +1 -0
  94. package/dist/components/input.js +2 -0
  95. package/dist/components/kbd.d.ts +2 -0
  96. package/dist/components/kbd.d.ts.map +1 -0
  97. package/dist/components/kbd.js +2 -0
  98. package/dist/components/navigation-menu.d.ts +2 -0
  99. package/dist/components/navigation-menu.d.ts.map +1 -0
  100. package/dist/components/navigation-menu.js +3 -0
  101. package/dist/components/popover.d.ts +2 -0
  102. package/dist/components/popover.d.ts.map +1 -0
  103. package/dist/components/popover.js +3 -0
  104. package/dist/components/scroll-area.d.ts +2 -0
  105. package/dist/components/scroll-area.d.ts.map +1 -0
  106. package/dist/components/scroll-area.js +3 -0
  107. package/dist/components/separator.d.ts +2 -0
  108. package/dist/components/separator.d.ts.map +1 -0
  109. package/dist/components/separator.js +3 -0
  110. package/dist/components/sheet.d.ts +2 -0
  111. package/dist/components/sheet.d.ts.map +1 -0
  112. package/dist/components/sheet.js +3 -0
  113. package/dist/components/sonner.d.ts +2 -0
  114. package/dist/components/sonner.d.ts.map +1 -0
  115. package/dist/components/sonner.js +3 -0
  116. package/dist/components/spinner.d.ts +2 -0
  117. package/dist/components/spinner.d.ts.map +1 -0
  118. package/dist/components/spinner.js +2 -0
  119. package/dist/components/textarea.d.ts +2 -0
  120. package/dist/components/textarea.d.ts.map +1 -0
  121. package/dist/components/textarea.js +2 -0
  122. package/dist/components/tooltip.d.ts +2 -0
  123. package/dist/components/tooltip.d.ts.map +1 -0
  124. package/dist/components/tooltip.js +3 -0
  125. package/dist/config.d.ts +47 -1
  126. package/dist/config.d.ts.map +1 -1
  127. package/dist/controls.js +4 -4
  128. package/dist/footer.d.ts +8 -0
  129. package/dist/footer.d.ts.map +1 -0
  130. package/dist/footer.js +6 -0
  131. package/dist/home-layout.d.ts +11 -0
  132. package/dist/home-layout.d.ts.map +1 -0
  133. package/dist/home-layout.js +31 -0
  134. package/dist/internal/chat/conversation.js +1 -1
  135. package/dist/internal/chat/message.js +1 -1
  136. package/dist/internal/chat/prompt-input.js +1 -1
  137. package/dist/internal/chat/shell.js +4 -4
  138. package/dist/internal/chat/sources.js +1 -1
  139. package/dist/internal/config-context.d.ts +10 -0
  140. package/dist/internal/config-context.d.ts.map +1 -0
  141. package/dist/internal/config-context.js +15 -0
  142. package/dist/internal/footer/github-button.d.ts +7 -0
  143. package/dist/internal/footer/github-button.d.ts.map +1 -0
  144. package/dist/internal/footer/github-button.js +10 -0
  145. package/dist/internal/footer/rss-button.d.ts +2 -0
  146. package/dist/internal/footer/rss-button.d.ts.map +1 -0
  147. package/dist/internal/footer/rss-button.js +4 -0
  148. package/dist/internal/localized-link.d.ts +8 -0
  149. package/dist/internal/localized-link.d.ts.map +1 -0
  150. package/dist/internal/localized-link.js +13 -0
  151. package/dist/internal/navbar/desktop-menu.d.ts +10 -0
  152. package/dist/internal/navbar/desktop-menu.d.ts.map +1 -0
  153. package/dist/internal/navbar/desktop-menu.js +11 -0
  154. package/dist/internal/navbar/mobile-menu.d.ts +7 -0
  155. package/dist/internal/navbar/mobile-menu.d.ts.map +1 -0
  156. package/dist/internal/navbar/mobile-menu.js +44 -0
  157. package/dist/internal/navbar/navbar-logo.d.ts +16 -0
  158. package/dist/internal/navbar/navbar-logo.d.ts.map +1 -0
  159. package/dist/internal/navbar/navbar-logo.js +30 -0
  160. package/dist/internal/page-actions-client.d.ts.map +1 -1
  161. package/dist/internal/page-actions-client.js +17 -6
  162. package/dist/internal/page-visibility.d.ts +18 -0
  163. package/dist/internal/page-visibility.d.ts.map +1 -0
  164. package/dist/internal/page-visibility.js +24 -0
  165. package/dist/internal/provider-client.d.ts +1 -1
  166. package/dist/internal/provider-client.d.ts.map +1 -1
  167. package/dist/internal/provider-client.js +2 -1
  168. package/dist/internal/sidebar.js +3 -3
  169. package/dist/internal/ui/button-group.js +2 -2
  170. package/dist/internal/ui/button.d.ts +1 -1
  171. package/dist/internal/ui/button.d.ts.map +1 -1
  172. package/dist/internal/ui/button.js +7 -7
  173. package/dist/internal/ui/card.js +1 -1
  174. package/dist/internal/ui/drawer.js +1 -1
  175. package/dist/internal/ui/dropdown-menu.js +7 -7
  176. package/dist/internal/ui/input-group.js +2 -2
  177. package/dist/internal/ui/input.js +1 -1
  178. package/dist/internal/ui/kbd.js +1 -1
  179. package/dist/internal/ui/navigation-menu.d.ts +17 -0
  180. package/dist/internal/ui/navigation-menu.d.ts.map +1 -0
  181. package/dist/internal/ui/navigation-menu.js +38 -0
  182. package/dist/internal/ui/popover.js +1 -1
  183. package/dist/internal/ui/scroll-area.js +2 -2
  184. package/dist/internal/ui/separator.js +1 -1
  185. package/dist/internal/ui/sheet.js +4 -4
  186. package/dist/internal/ui/sonner.js +3 -3
  187. package/dist/internal/ui/textarea.js +1 -1
  188. package/dist/internal/ui/tooltip.js +1 -1
  189. package/dist/mdx.d.ts +55 -24
  190. package/dist/mdx.d.ts.map +1 -1
  191. package/dist/mdx.js +7 -46
  192. package/dist/mobile-docs-bar.d.ts +7 -0
  193. package/dist/mobile-docs-bar.d.ts.map +1 -0
  194. package/dist/mobile-docs-bar.js +13 -0
  195. package/dist/navbar.d.ts +7 -0
  196. package/dist/navbar.d.ts.map +1 -0
  197. package/dist/navbar.js +10 -0
  198. package/dist/pages/docs.d.ts +8 -2
  199. package/dist/pages/docs.d.ts.map +1 -1
  200. package/dist/pages/docs.js +13 -7
  201. package/dist/proxy.d.ts +1 -1
  202. package/dist/proxy.d.ts.map +1 -1
  203. package/dist/proxy.js +29 -2
  204. package/dist/routes/agents.d.ts +21 -0
  205. package/dist/routes/agents.d.ts.map +1 -0
  206. package/dist/routes/agents.js +201 -0
  207. package/dist/routes/chat.d.ts +7 -2
  208. package/dist/routes/chat.d.ts.map +1 -1
  209. package/dist/routes/chat.js +357 -62
  210. package/dist/routes/llms.d.ts +6 -5
  211. package/dist/routes/llms.d.ts.map +1 -1
  212. package/dist/routes/llms.js +63 -12
  213. package/dist/routes/search.d.ts +6 -4
  214. package/dist/routes/search.d.ts.map +1 -1
  215. package/dist/routes/search.js +8 -1
  216. package/dist/routes/sitemap.d.ts +6 -3
  217. package/dist/routes/sitemap.d.ts.map +1 -1
  218. package/dist/routes/sitemap.js +10 -2
  219. package/dist/shiki-theme.d.ts +20 -0
  220. package/dist/shiki-theme.d.ts.map +1 -0
  221. package/dist/shiki-theme.js +110 -0
  222. package/dist/source-config.d.ts +68 -0
  223. package/dist/source-config.d.ts.map +1 -0
  224. package/dist/source-config.js +161 -0
  225. package/dist/source.d.ts +8 -1
  226. package/dist/source.d.ts.map +1 -1
  227. package/dist/source.js +14 -1
  228. package/dist/versions.d.ts +31 -1
  229. package/dist/versions.d.ts.map +1 -1
  230. package/dist/versions.js +56 -29
  231. package/package.json +124 -3
  232. package/source-config.js +174 -0
  233. package/styles.css +465 -102
  234. package/template/AGENTS.md +90 -0
  235. package/template/app/[lang]/(home)/components/centered-section.tsx +1 -3
  236. package/template/app/[lang]/(home)/components/hero.tsx +2 -2
  237. package/template/app/[lang]/(home)/components/one-two-section.tsx +1 -3
  238. package/template/app/[lang]/(home)/components/templates.tsx +3 -5
  239. package/template/app/[lang]/(home)/components/text-grid-section.tsx +1 -1
  240. package/template/app/[lang]/(home)/layout.tsx +4 -3
  241. package/template/app/[lang]/(home)/page.tsx +2 -2
  242. package/template/app/[lang]/agents.md/route.ts +6 -0
  243. package/template/app/[lang]/docs/[[...slug]]/page.tsx +4 -1
  244. package/template/app/[lang]/layout.tsx +6 -6
  245. package/template/app/[lang]/llms.mdx/[[...slug]]/route.ts +1 -1
  246. package/template/app/[lang]/sitemap.md/route.ts +2 -2
  247. package/template/app/api/chat/route.ts +11 -0
  248. package/template/app/api/search/route.ts +2 -2
  249. package/template/app/styles/geistdocs.css +150 -109
  250. package/template/components/ui/badge.tsx +5 -5
  251. package/template/components/ui/button.tsx +7 -7
  252. package/template/components/ui/command-prompt.tsx +2 -2
  253. package/template/content/docs/agent-readiness.mdx +103 -0
  254. package/template/content/docs/ask-ai.mdx +37 -3
  255. package/template/content/docs/configuration.mdx +77 -2
  256. package/template/content/docs/deployment.mdx +11 -0
  257. package/template/content/docs/env.mdx +36 -5
  258. package/template/content/docs/getting-started.mdx +2 -1
  259. package/template/content/docs/index.mdx +3 -0
  260. package/template/content/docs/llms-txt.mdx +1 -0
  261. package/template/content/docs/md.mdx +2 -1
  262. package/template/content/docs/meta.json +2 -0
  263. package/template/content/docs/migration.mdx +321 -0
  264. package/template/content/docs/proxy.cn.mdx +1 -1
  265. package/template/content/docs/proxy.mdx +56 -2
  266. package/template/content/docs/theme-aware-image.mdx +1 -1
  267. package/template/content/docs/versioned-docs.mdx +49 -2
  268. package/template/geistdocs.tsx +26 -0
  269. package/template/lib/geistdocs/config.tsx +3 -0
  270. package/template/package.json +3 -3
  271. package/template/proxy.ts +1 -2
  272. package/template/source.config.ts +8 -47
  273. package/template/app/actions/feedback/emotions.ts +0 -18
  274. package/template/app/actions/feedback/index.ts +0 -45
  275. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right-small.tsx +0 -35
  276. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right.tsx +0 -27
  277. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-check.tsx +0 -27
  278. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-down-small.tsx +0 -30
  279. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-right.tsx +0 -27
  280. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-copy.tsx +0 -27
  281. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-file-text.tsx +0 -25
  282. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-menu-alt.tsx +0 -27
  283. package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-slash-forward.tsx +0 -36
  284. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-elements.tsx +0 -29
  285. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-sdk.tsx +0 -38
  286. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-chat-sdk.tsx +0 -42
  287. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-flags-sdk.tsx +0 -42
  288. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-icon-vercel.tsx +0 -31
  289. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-streamdown.tsx +0 -29
  290. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-vercel-oss.tsx +0 -24
  291. package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-workflow-sdk.tsx +0 -73
  292. package/template/components/geistdocs/callout.tsx +0 -40
  293. package/template/components/geistdocs/chat.tsx +0 -24
  294. package/template/components/geistdocs/code-block-tabs.tsx +0 -61
  295. package/template/components/geistdocs/code-block.tsx +0 -134
  296. package/template/components/geistdocs/copy-page.tsx +0 -27
  297. package/template/components/geistdocs/desktop-menu.tsx +0 -52
  298. package/template/components/geistdocs/docs-page.tsx +0 -35
  299. package/template/components/geistdocs/edit-source.tsx +0 -30
  300. package/template/components/geistdocs/feedback.tsx +0 -139
  301. package/template/components/geistdocs/footer.tsx +0 -30
  302. package/template/components/geistdocs/github-button.tsx +0 -19
  303. package/template/components/geistdocs/home-layout.tsx +0 -46
  304. package/template/components/geistdocs/icons.tsx +0 -13
  305. package/template/components/geistdocs/installer.tsx +0 -58
  306. package/template/components/geistdocs/language-selector.tsx +0 -3
  307. package/template/components/geistdocs/mermaid.tsx +0 -68
  308. package/template/components/geistdocs/mobile-docs-bar.tsx +0 -77
  309. package/template/components/geistdocs/mobile-menu.tsx +0 -150
  310. package/template/components/geistdocs/navbar-logo.tsx +0 -124
  311. package/template/components/geistdocs/navbar.tsx +0 -22
  312. package/template/components/geistdocs/rss-button.tsx +0 -10
  313. package/template/components/geistdocs/scroll-top.tsx +0 -21
  314. package/template/components/geistdocs/search.tsx +0 -17
  315. package/template/components/geistdocs/sidebar.tsx +0 -128
  316. package/template/components/geistdocs/theme-aware-image.tsx +0 -22
  317. package/template/components/geistdocs/theme-toggle.tsx +0 -3
  318. package/template/components/geistdocs/video.tsx +0 -16
  319. package/template/components/ui/button-group.tsx +0 -83
  320. package/template/components/ui/card.tsx +0 -92
  321. package/template/components/ui/collapsible.tsx +0 -33
  322. package/template/components/ui/command.tsx +0 -184
  323. package/template/components/ui/dialog.tsx +0 -143
  324. package/template/components/ui/drawer.tsx +0 -135
  325. package/template/components/ui/dropdown-menu.tsx +0 -257
  326. package/template/components/ui/hover-card.tsx +0 -44
  327. package/template/components/ui/input-group.tsx +0 -170
  328. package/template/components/ui/input.tsx +0 -21
  329. package/template/components/ui/kbd.tsx +0 -28
  330. package/template/components/ui/navigation-menu.tsx +0 -192
  331. package/template/components/ui/popover.tsx +0 -48
  332. package/template/components/ui/scroll-area.tsx +0 -58
  333. package/template/components/ui/select.tsx +0 -187
  334. package/template/components/ui/separator.tsx +0 -28
  335. package/template/components/ui/sheet.tsx +0 -139
  336. package/template/components/ui/sonner.tsx +0 -40
  337. package/template/components/ui/spinner.tsx +0 -16
  338. package/template/components/ui/textarea.tsx +0 -18
  339. package/template/components/ui/tooltip.tsx +0 -61
  340. package/template/hooks/geistdocs/use-sidebar.ts +0 -13
  341. package/template/hooks/use-mobile.ts +0 -19
@@ -1,128 +0,0 @@
1
- "use client";
2
-
3
- import type { Node } from "fumadocs-core/page-tree";
4
- import {
5
- SidebarFolder,
6
- SidebarFolderContent,
7
- SidebarFolderLink,
8
- SidebarFolderTrigger,
9
- SidebarItem,
10
- SidebarSeparator,
11
- } from "fumadocs-ui/components/sidebar/base";
12
- import type { SidebarPageTreeComponents } from "fumadocs-ui/components/sidebar/page-tree";
13
- import { useTreeContext, useTreePath } from "fumadocs-ui/contexts/tree";
14
- import { usePathname } from "next/navigation";
15
- import { Fragment, useEffect, useRef } from "react";
16
- import {
17
- Sheet,
18
- SheetContent,
19
- SheetDescription,
20
- SheetHeader,
21
- SheetTitle,
22
- } from "@/components/ui/sheet";
23
- import { useSidebarContext } from "@/hooks/geistdocs/use-sidebar";
24
- import { SearchButton } from "./search";
25
-
26
- export const Sidebar = () => {
27
- const { root } = useTreeContext();
28
- const { isOpen, setIsOpen } = useSidebarContext();
29
- const pathname = usePathname();
30
- const previousPathname = useRef(pathname);
31
-
32
- useEffect(() => {
33
- if (pathname !== previousPathname.current) {
34
- setIsOpen(false);
35
- previousPathname.current = pathname;
36
- }
37
- }, [pathname, setIsOpen]);
38
-
39
- const renderSidebarList = (items: Node[]) =>
40
- items.map((item) => {
41
- if (item.type === "separator") {
42
- return <Separator item={item} key={item.$id} />;
43
- }
44
-
45
- if (item.type === "folder") {
46
- const children = renderSidebarList(item.children);
47
- return (
48
- <Folder item={item} key={item.$id}>
49
- {children}
50
- </Folder>
51
- );
52
- }
53
-
54
- return <Item item={item} key={item.$id} />;
55
- });
56
-
57
- return (
58
- <div
59
- className="pointer-events-none sticky top-(--fd-docs-row-1) z-20 h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] [grid-area:sidebar] *:pointer-events-auto max-md:hidden md:layout:[--fd-sidebar-width:268px]"
60
- data-sidebar-placeholder
61
- >
62
- <div className="h-full overflow-y-auto px-4 pt-12 pb-4">
63
- <Fragment key={root.$id}>{renderSidebarList(root.children)}</Fragment>
64
- </div>
65
- <Sheet onOpenChange={setIsOpen} open={isOpen}>
66
- <SheetContent className="gap-0" side="left">
67
- <SheetHeader className="mt-8">
68
- <SheetTitle className="sr-only">Mobile Menu</SheetTitle>
69
- <SheetDescription className="sr-only">
70
- Navigation for the documentation.
71
- </SheetDescription>
72
- <SearchButton onClick={() => setIsOpen(false)} />
73
- </SheetHeader>
74
- <div className="flex-1 overflow-y-auto px-4 pb-4">
75
- {renderSidebarList(root.children)}
76
- </div>
77
- </SheetContent>
78
- </Sheet>
79
- </div>
80
- );
81
- };
82
-
83
- export const Folder: SidebarPageTreeComponents["Folder"] = ({
84
- children,
85
- item,
86
- }) => {
87
- const path = useTreePath();
88
- const defaultOpen = item.defaultOpen ?? path.includes(item);
89
-
90
- return (
91
- <SidebarFolder defaultOpen={defaultOpen}>
92
- {item.index ? (
93
- <SidebarFolderLink
94
- className="flex items-center gap-2 text-pretty py-1.5 text-muted-foreground text-sm transition-colors hover:text-foreground data-[active=true]:text-foreground [&_svg]:size-3.5"
95
- external={item.index.external}
96
- href={item.index.url}
97
- >
98
- {item.icon}
99
- {item.name}
100
- </SidebarFolderLink>
101
- ) : (
102
- <SidebarFolderTrigger className="flex items-center gap-2 text-pretty py-1.5 text-muted-foreground text-sm transition-colors hover:text-foreground [&_svg]:size-3.5">
103
- {item.icon}
104
- {item.name}
105
- </SidebarFolderTrigger>
106
- )}
107
- <SidebarFolderContent className="ml-2">{children}</SidebarFolderContent>
108
- </SidebarFolder>
109
- );
110
- };
111
-
112
- export const Item: SidebarPageTreeComponents["Item"] = ({ item }) => (
113
- <SidebarItem
114
- className="block w-full truncate text-pretty py-1.5 text-muted-foreground text-sm transition-colors hover:text-foreground data-[active=true]:text-foreground"
115
- external={item.external}
116
- href={item.url}
117
- icon={item.icon}
118
- >
119
- {item.name}
120
- </SidebarItem>
121
- );
122
-
123
- export const Separator: SidebarPageTreeComponents["Separator"] = ({ item }) => (
124
- <SidebarSeparator className="mt-4 mb-2 flex items-center gap-2 px-0 font-medium text-sm first-child:mt-0">
125
- {item.icon}
126
- {item.name}
127
- </SidebarSeparator>
128
- );
@@ -1,22 +0,0 @@
1
- "use client";
2
-
3
- import Image from "next/image";
4
- import { useTheme } from "next-themes";
5
- import type { ComponentProps } from "react";
6
-
7
- type ImageProps = ComponentProps<typeof Image>;
8
-
9
- type ThemeAwareImageProps = Omit<ImageProps, "src"> & {
10
- src: {
11
- light: ImageProps["src"];
12
- dark: ImageProps["src"];
13
- };
14
- };
15
-
16
- export const ThemeAwareImage = ({ src, ...props }: ThemeAwareImageProps) => {
17
- const { resolvedTheme } = useTheme();
18
-
19
- return (
20
- <Image {...props} src={resolvedTheme === "dark" ? src.dark : src.light} />
21
- );
22
- };
@@ -1,3 +0,0 @@
1
- import { ThemeToggle as PackageThemeToggle } from "@vercel/geistdocs/controls";
2
-
3
- export const ThemeToggle = PackageThemeToggle;
@@ -1,16 +0,0 @@
1
- import type { ComponentProps } from "react";
2
- import ReactPlayer from "react-player";
3
-
4
- type VideoProps = ComponentProps<typeof ReactPlayer>;
5
-
6
- export const Video = (props: VideoProps) => (
7
- <div className="not-prose relative mb-6 aspect-video w-full overflow-hidden rounded-lg bg-black">
8
- <ReactPlayer
9
- {...props}
10
- className="absolute inset-0"
11
- controls
12
- height="100%"
13
- width="100%"
14
- />
15
- </div>
16
- );
@@ -1,83 +0,0 @@
1
- import { Slot as SlotPrimitive } from "radix-ui"
2
- import { cva, type VariantProps } from "class-variance-authority"
3
-
4
- import { cn } from "@/lib/utils"
5
- import { Separator } from "@/components/ui/separator"
6
-
7
- const buttonGroupVariants = cva(
8
- "flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md has-[>[data-slot=button-group]]:gap-2",
9
- {
10
- variants: {
11
- orientation: {
12
- horizontal:
13
- "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",
14
- vertical:
15
- "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none",
16
- },
17
- },
18
- defaultVariants: {
19
- orientation: "horizontal",
20
- },
21
- }
22
- )
23
-
24
- function ButtonGroup({
25
- className,
26
- orientation,
27
- ...props
28
- }: React.ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants>) {
29
- return (
30
- <div
31
- role="group"
32
- data-slot="button-group"
33
- data-orientation={orientation}
34
- className={cn(buttonGroupVariants({ orientation }), className)}
35
- {...props}
36
- />
37
- )
38
- }
39
-
40
- function ButtonGroupText({
41
- className,
42
- asChild = false,
43
- ...props
44
- }: React.ComponentProps<"div"> & {
45
- asChild?: boolean
46
- }) {
47
- const Comp = asChild ? SlotPrimitive.Slot : "div"
48
-
49
- return (
50
- <Comp
51
- className={cn(
52
- "bg-muted flex items-center gap-2 rounded-md border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
53
- className
54
- )}
55
- {...props}
56
- />
57
- )
58
- }
59
-
60
- function ButtonGroupSeparator({
61
- className,
62
- orientation = "vertical",
63
- ...props
64
- }: React.ComponentProps<typeof Separator>) {
65
- return (
66
- <Separator
67
- data-slot="button-group-separator"
68
- orientation={orientation}
69
- className={cn(
70
- "bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto",
71
- className
72
- )}
73
- {...props}
74
- />
75
- )
76
- }
77
-
78
- export {
79
- ButtonGroup,
80
- ButtonGroupSeparator,
81
- ButtonGroupText,
82
- buttonGroupVariants,
83
- }
@@ -1,92 +0,0 @@
1
- import * as React from "react"
2
-
3
- import { cn } from "@/lib/utils"
4
-
5
- function Card({ className, ...props }: React.ComponentProps<"div">) {
6
- return (
7
- <div
8
- data-slot="card"
9
- className={cn(
10
- "bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
11
- className
12
- )}
13
- {...props}
14
- />
15
- )
16
- }
17
-
18
- function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
19
- return (
20
- <div
21
- data-slot="card-header"
22
- className={cn(
23
- "@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
24
- className
25
- )}
26
- {...props}
27
- />
28
- )
29
- }
30
-
31
- function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
32
- return (
33
- <div
34
- data-slot="card-title"
35
- className={cn("leading-none font-semibold", className)}
36
- {...props}
37
- />
38
- )
39
- }
40
-
41
- function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
42
- return (
43
- <div
44
- data-slot="card-description"
45
- className={cn("text-muted-foreground text-sm", className)}
46
- {...props}
47
- />
48
- )
49
- }
50
-
51
- function CardAction({ className, ...props }: React.ComponentProps<"div">) {
52
- return (
53
- <div
54
- data-slot="card-action"
55
- className={cn(
56
- "col-start-2 row-span-2 row-start-1 self-start justify-self-end",
57
- className
58
- )}
59
- {...props}
60
- />
61
- )
62
- }
63
-
64
- function CardContent({ className, ...props }: React.ComponentProps<"div">) {
65
- return (
66
- <div
67
- data-slot="card-content"
68
- className={cn("px-6", className)}
69
- {...props}
70
- />
71
- )
72
- }
73
-
74
- function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
75
- return (
76
- <div
77
- data-slot="card-footer"
78
- className={cn("flex items-center px-6 [.border-t]:pt-6", className)}
79
- {...props}
80
- />
81
- )
82
- }
83
-
84
- export {
85
- Card,
86
- CardHeader,
87
- CardFooter,
88
- CardTitle,
89
- CardAction,
90
- CardDescription,
91
- CardContent,
92
- }
@@ -1,33 +0,0 @@
1
- "use client"
2
-
3
- import { Collapsible as CollapsiblePrimitive } from "radix-ui"
4
-
5
- function Collapsible({
6
- ...props
7
- }: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {
8
- return <CollapsiblePrimitive.Root data-slot="collapsible" {...props} />
9
- }
10
-
11
- function CollapsibleTrigger({
12
- ...props
13
- }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {
14
- return (
15
- <CollapsiblePrimitive.CollapsibleTrigger
16
- data-slot="collapsible-trigger"
17
- {...props}
18
- />
19
- )
20
- }
21
-
22
- function CollapsibleContent({
23
- ...props
24
- }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) {
25
- return (
26
- <CollapsiblePrimitive.CollapsibleContent
27
- data-slot="collapsible-content"
28
- {...props}
29
- />
30
- )
31
- }
32
-
33
- export { Collapsible, CollapsibleTrigger, CollapsibleContent }
@@ -1,184 +0,0 @@
1
- "use client"
2
-
3
- import * as React from "react"
4
- import { Command as CommandPrimitive } from "cmdk"
5
- import { SearchIcon } from "lucide-react"
6
-
7
- import { cn } from "@/lib/utils"
8
- import {
9
- Dialog,
10
- DialogContent,
11
- DialogDescription,
12
- DialogHeader,
13
- DialogTitle,
14
- } from "@/components/ui/dialog"
15
-
16
- function Command({
17
- className,
18
- ...props
19
- }: React.ComponentProps<typeof CommandPrimitive>) {
20
- return (
21
- <CommandPrimitive
22
- data-slot="command"
23
- className={cn(
24
- "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
25
- className
26
- )}
27
- {...props}
28
- />
29
- )
30
- }
31
-
32
- function CommandDialog({
33
- title = "Command Palette",
34
- description = "Search for a command to run...",
35
- children,
36
- className,
37
- showCloseButton = true,
38
- ...props
39
- }: React.ComponentProps<typeof Dialog> & {
40
- title?: string
41
- description?: string
42
- className?: string
43
- showCloseButton?: boolean
44
- }) {
45
- return (
46
- <Dialog {...props}>
47
- <DialogHeader className="sr-only">
48
- <DialogTitle>{title}</DialogTitle>
49
- <DialogDescription>{description}</DialogDescription>
50
- </DialogHeader>
51
- <DialogContent
52
- className={cn("overflow-hidden p-0", className)}
53
- showCloseButton={showCloseButton}
54
- >
55
- <Command className="[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
56
- {children}
57
- </Command>
58
- </DialogContent>
59
- </Dialog>
60
- )
61
- }
62
-
63
- function CommandInput({
64
- className,
65
- ...props
66
- }: React.ComponentProps<typeof CommandPrimitive.Input>) {
67
- return (
68
- <div
69
- data-slot="command-input-wrapper"
70
- className="flex h-9 items-center gap-2 border-b px-3"
71
- >
72
- <SearchIcon className="size-4 shrink-0 opacity-50" />
73
- <CommandPrimitive.Input
74
- data-slot="command-input"
75
- className={cn(
76
- "placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
77
- className
78
- )}
79
- {...props}
80
- />
81
- </div>
82
- )
83
- }
84
-
85
- function CommandList({
86
- className,
87
- ...props
88
- }: React.ComponentProps<typeof CommandPrimitive.List>) {
89
- return (
90
- <CommandPrimitive.List
91
- data-slot="command-list"
92
- className={cn(
93
- "max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
94
- className
95
- )}
96
- {...props}
97
- />
98
- )
99
- }
100
-
101
- function CommandEmpty({
102
- ...props
103
- }: React.ComponentProps<typeof CommandPrimitive.Empty>) {
104
- return (
105
- <CommandPrimitive.Empty
106
- data-slot="command-empty"
107
- className="py-6 text-center text-sm"
108
- {...props}
109
- />
110
- )
111
- }
112
-
113
- function CommandGroup({
114
- className,
115
- ...props
116
- }: React.ComponentProps<typeof CommandPrimitive.Group>) {
117
- return (
118
- <CommandPrimitive.Group
119
- data-slot="command-group"
120
- className={cn(
121
- "text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",
122
- className
123
- )}
124
- {...props}
125
- />
126
- )
127
- }
128
-
129
- function CommandSeparator({
130
- className,
131
- ...props
132
- }: React.ComponentProps<typeof CommandPrimitive.Separator>) {
133
- return (
134
- <CommandPrimitive.Separator
135
- data-slot="command-separator"
136
- className={cn("bg-border -mx-1 h-px", className)}
137
- {...props}
138
- />
139
- )
140
- }
141
-
142
- function CommandItem({
143
- className,
144
- ...props
145
- }: React.ComponentProps<typeof CommandPrimitive.Item>) {
146
- return (
147
- <CommandPrimitive.Item
148
- data-slot="command-item"
149
- className={cn(
150
- "data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
151
- className
152
- )}
153
- {...props}
154
- />
155
- )
156
- }
157
-
158
- function CommandShortcut({
159
- className,
160
- ...props
161
- }: React.ComponentProps<"span">) {
162
- return (
163
- <span
164
- data-slot="command-shortcut"
165
- className={cn(
166
- "text-muted-foreground ml-auto text-xs tracking-widest",
167
- className
168
- )}
169
- {...props}
170
- />
171
- )
172
- }
173
-
174
- export {
175
- Command,
176
- CommandDialog,
177
- CommandInput,
178
- CommandList,
179
- CommandEmpty,
180
- CommandGroup,
181
- CommandItem,
182
- CommandShortcut,
183
- CommandSeparator,
184
- }