@vercel/geistdocs 1.15.4 → 1.16.0

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 (70) hide show
  1. package/dist/assets/icons/icon-display-small.d.ts +5 -0
  2. package/dist/assets/icons/icon-display-small.d.ts.map +1 -0
  3. package/dist/assets/icons/icon-display-small.js +4 -0
  4. package/dist/assets/icons/icon-display.d.ts +5 -0
  5. package/dist/assets/icons/icon-display.d.ts.map +1 -0
  6. package/dist/assets/icons/icon-display.js +4 -0
  7. package/dist/assets/icons/icon-moon-small.d.ts +5 -0
  8. package/dist/assets/icons/icon-moon-small.d.ts.map +1 -0
  9. package/dist/assets/icons/icon-moon-small.js +4 -0
  10. package/dist/assets/icons/icon-moon.d.ts +5 -0
  11. package/dist/assets/icons/icon-moon.d.ts.map +1 -0
  12. package/dist/assets/icons/icon-moon.js +4 -0
  13. package/dist/assets/icons/icon-sun-small.d.ts +5 -0
  14. package/dist/assets/icons/icon-sun-small.d.ts.map +1 -0
  15. package/dist/assets/icons/icon-sun-small.js +4 -0
  16. package/dist/assets/icons/icon-sun.d.ts +5 -0
  17. package/dist/assets/icons/icon-sun.d.ts.map +1 -0
  18. package/dist/assets/icons/icon-sun.js +4 -0
  19. package/dist/assets/icons/index.d.ts +6 -0
  20. package/dist/assets/icons/index.d.ts.map +1 -1
  21. package/dist/assets/icons/index.js +6 -0
  22. package/dist/cli/index.js +1 -1
  23. package/dist/components/code-block.js +1 -1
  24. package/dist/components/dialog.js +1 -1
  25. package/dist/components/theme-switcher.d.ts +8 -0
  26. package/dist/components/theme-switcher.d.ts.map +1 -0
  27. package/dist/components/theme-switcher.js +37 -0
  28. package/dist/config.d.ts +4 -0
  29. package/dist/config.d.ts.map +1 -1
  30. package/dist/controls.js +1 -1
  31. package/dist/footer.d.ts +1 -7
  32. package/dist/footer.d.ts.map +1 -1
  33. package/dist/footer.js +170 -5
  34. package/dist/internal/navbar/mobile-menu.d.ts +4 -1
  35. package/dist/internal/navbar/mobile-menu.d.ts.map +1 -1
  36. package/dist/internal/navbar/mobile-menu.js +12 -6
  37. package/dist/internal/navbar/navbar-logo.d.ts +8 -0
  38. package/dist/internal/navbar/navbar-logo.d.ts.map +1 -1
  39. package/dist/internal/navbar/navbar-logo.js +86 -14
  40. package/dist/internal/navbar/navbar-shell.d.ts +5 -0
  41. package/dist/internal/navbar/navbar-shell.d.ts.map +1 -0
  42. package/dist/internal/navbar/navbar-shell.js +17 -0
  43. package/dist/internal/page-actions-client.d.ts +7 -1
  44. package/dist/internal/page-actions-client.d.ts.map +1 -1
  45. package/dist/internal/page-actions-client.js +35 -16
  46. package/dist/internal/search.d.ts.map +1 -1
  47. package/dist/internal/search.js +1 -1
  48. package/dist/internal/sidebar.d.ts.map +1 -1
  49. package/dist/internal/sidebar.js +1 -1
  50. package/dist/internal/ui/drawer.js +1 -1
  51. package/dist/internal/ui/sheet.d.ts +4 -1
  52. package/dist/internal/ui/sheet.d.ts.map +1 -1
  53. package/dist/internal/ui/sheet.js +2 -2
  54. package/dist/mobile-docs-bar.d.ts.map +1 -1
  55. package/dist/mobile-docs-bar.js +22 -3
  56. package/dist/navbar.d.ts +1 -1
  57. package/dist/navbar.d.ts.map +1 -1
  58. package/dist/navbar.js +8 -5
  59. package/dist/pages/docs.d.ts.map +1 -1
  60. package/dist/pages/docs.js +6 -2
  61. package/docs/agents.md +1 -1
  62. package/docs/llms.txt +1 -1
  63. package/docs/manifest.json +1 -1
  64. package/package.json +8 -3
  65. package/template/app/[lang]/layout.tsx +1 -1
  66. package/template/app/styles/geistdocs.css +7 -0
  67. package/template/lib/geistdocs/fonts.ts +7 -10
  68. package/template/next.config.ts +13 -0
  69. package/template/package.json +3 -2
  70. package/theme.css +22 -31
@@ -2,11 +2,12 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { useEffect, useState } from "react";
4
4
  import { IconChevronDownSmall } from "../../assets/icons/icon-chevron-down-small";
5
+ import { ThemeSwitcher } from "../../components/theme-switcher";
5
6
  import { SearchButton } from "../../controls";
6
7
  import { cn } from "../cn";
7
8
  import { ExternalArrow } from "../external-arrow";
8
9
  import { LocalizedLink } from "../localized-link";
9
- import { DEFAULT_OSS_SECTION } from "./navbar-logo";
10
+ import { DEFAULT_OSS_SECTION, resolveOssProducts } from "./navbar-logo";
10
11
  import { useNavActive } from "./use-nav-active";
11
12
  function NavLink({ href, external, active, onClick, children, }) {
12
13
  const className = cn("flex min-h-11 items-center gap-1 rounded-md px-3 font-normal text-2xl text-gray-900 no-underline outline-none transition-colors hover:bg-gray-alpha-100 hover:text-gray-1000", active && "text-gray-1000");
@@ -35,17 +36,22 @@ function OssCollapsible({ sections, onLinkClick, }) {
35
36
  function MobileMenuButton({ expanded, onClick, }) {
36
37
  return (_jsx("button", { "aria-expanded": expanded, "aria-label": expanded ? "Close menu" : "Open menu", className: "relative flex @min-[1024px]:hidden size-8 items-center justify-center rounded-full border border-gray-200 transition-colors hover:bg-gray-100", "data-slot": "mobile-menu-toggle", onClick: onClick, type: "button", children: _jsxs("span", { className: "flex flex-col items-center justify-center gap-[5px]", children: [_jsx("span", { className: cn("block h-[1.5px] w-3.5 bg-gray-1000 transition-all duration-150", expanded && "translate-y-[3.25px] rotate-45") }), _jsx("span", { className: cn("block h-[1.5px] w-3.5 bg-gray-1000 transition-all duration-150", expanded && "-translate-y-[3.25px] -rotate-45") })] }) }));
37
38
  }
38
- export const MobileMenu = ({ githubUrl, nav, ossProducts = [], }) => {
39
+ export const MobileMenu = ({ activeProduct, githubUrl, nav, ossProducts, showOss = false, }) => {
39
40
  const [show, setShow] = useState(false);
40
41
  const isActive = useNavActive();
42
+ // Resolve the default/custom list and drop the active product here on the
43
+ // client, where `DEFAULT_OSS_PRODUCTS` is a real array (see resolveOssProducts).
44
+ const products = showOss
45
+ ? resolveOssProducts(ossProducts, activeProduct)
46
+ : [];
41
47
  // Featured products (eve) go under "Latest"; the rest group by `section`,
42
48
  // preserving first-seen order (Frameworks / SDKs / Other).
43
49
  const ossSections = [];
44
- const featured = ossProducts.filter((p) => p.featured);
50
+ const featured = products.filter((p) => p.featured);
45
51
  if (featured.length > 0) {
46
52
  ossSections.push({ heading: "Latest", items: featured });
47
53
  }
48
- for (const product of ossProducts) {
54
+ for (const product of products) {
49
55
  if (product.featured) {
50
56
  continue;
51
57
  }
@@ -89,9 +95,9 @@ export const MobileMenu = ({ githubUrl, nav, ossProducts = [], }) => {
89
95
  };
90
96
  }, [show]);
91
97
  const close = () => setShow(false);
92
- return (_jsxs(_Fragment, { children: [_jsx(MobileMenuButton, { expanded: show, onClick: () => setShow(!show) }), _jsx("div", { className: cn("fixed inset-0 top-16 z-40 @min-[1024px]:hidden bg-background-200 backdrop-blur-sm transition-opacity duration-200", show
98
+ return (_jsxs(_Fragment, { children: [_jsx(MobileMenuButton, { expanded: show, onClick: () => setShow(!show) }), _jsx("div", { className: cn("fixed inset-0 top-16 z-40 @min-[1024px]:hidden bg-background-200 transition-opacity duration-200", show
93
99
  ? "pointer-events-auto opacity-100"
94
100
  : "pointer-events-none opacity-0"), onClick: close }), _jsxs("div", { className: cn("fixed inset-x-0 top-16 bottom-0 z-40 @min-[1024px]:hidden overflow-y-auto bg-background-200 px-2 transition-all duration-200", show
95
101
  ? "translate-y-0 opacity-100"
96
- : "pointer-events-none -translate-y-2 opacity-0"), children: [_jsx("div", { className: "p-4", children: _jsx(SearchButton, { className: "w-full", onClick: close }) }), _jsxs("nav", { className: "flex flex-col px-1", children: [nav.map(({ label, href }) => (_jsx(NavLink, { active: isActive(href), external: href.startsWith("http"), href: href, onClick: close, children: label }, href))), githubUrl ? (_jsx(NavLink, { external: true, href: githubUrl, onClick: close, children: "GitHub" })) : null, _jsx(OssCollapsible, { onLinkClick: close, sections: ossSections })] })] })] }));
102
+ : "pointer-events-none -translate-y-2 opacity-0"), children: [_jsx("div", { className: "p-4", children: _jsx(SearchButton, { className: "w-full py-4.5", onClick: close }) }), _jsxs("nav", { className: "flex flex-col px-1", children: [nav.map(({ label, href }) => (_jsx(NavLink, { active: isActive(href), external: href.startsWith("http"), href: href, onClick: close, children: label }, href))), githubUrl ? (_jsx(NavLink, { external: true, href: githubUrl, onClick: close, children: "GitHub" })) : null, _jsx(OssCollapsible, { onLinkClick: close, sections: ossSections })] }), _jsx("div", { className: "mt-2 flex justify-end px-4 py-4", children: _jsx(ThemeSwitcher, { small: true }) })] })] }));
97
103
  };
@@ -2,10 +2,18 @@ import { type ReactNode } from "react";
2
2
  import type { GeistdocsNavbarOssProduct } from "../../config";
3
3
  export declare const DEFAULT_OSS_SECTION = "Open Source";
4
4
  export declare const DEFAULT_OSS_PRODUCTS: GeistdocsNavbarOssProduct[];
5
+ /**
6
+ * Resolve the OSS flyout list (custom or default) and drop the active product.
7
+ * Lives here (a "use client" module) because `DEFAULT_OSS_PRODUCTS` holds JSX
8
+ * and is a client-only value — resolving it on the server yields a client
9
+ * reference, not the array.
10
+ */
11
+ export declare function resolveOssProducts(products: GeistdocsNavbarOssProduct[] | undefined, activeProduct: string | undefined): GeistdocsNavbarOssProduct[];
5
12
  type NavbarLogoProps = {
6
13
  className?: string;
7
14
  href?: string;
8
15
  } & ({
16
+ activeProduct?: string;
9
17
  variant: "oss";
10
18
  logo: ReactNode;
11
19
  ossProducts?: GeistdocsNavbarOssProduct[];
@@ -1 +1 @@
1
- {"version":3,"file":"navbar-logo.d.ts","sourceRoot":"","sources":["../../../src/internal/navbar/navbar-logo.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,SAAS,EAAuB,MAAM,OAAO,CAAC;AAK5D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAY9D,eAAO,MAAM,mBAAmB,gBAAgB,CAAC;AAEjD,eAAO,MAAM,oBAAoB,EAAE,yBAAyB,EAoB3D,CAAC;AAgGF,KAAK,eAAe,GAAG;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,CACA;IACE,OAAO,EAAE,KAAK,CAAC;IACf,IAAI,EAAE,SAAS,CAAC;IAChB,WAAW,CAAC,EAAE,yBAAyB,EAAE,CAAC;CAC3C,GACD;IACE,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,IAAI,EAAE,SAAS,CAAC;CACjB,CACJ,CAAC;AAEF,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,IAAU,EACV,GAAG,KAAK,EACT,EAAE,eAAe,2CAkJjB"}
1
+ {"version":3,"file":"navbar-logo.d.ts","sourceRoot":"","sources":["../../../src/internal/navbar/navbar-logo.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,SAAS,EAAuB,MAAM,OAAO,CAAC;AAK5D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAY9D,eAAO,MAAM,mBAAmB,gBAAgB,CAAC;AAEjD,eAAO,MAAM,oBAAoB,EAAE,yBAAyB,EAiF3D,CAAC;AAgGF;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,yBAAyB,EAAE,GAAG,SAAS,EACjD,aAAa,EAAE,MAAM,GAAG,SAAS,GAChC,yBAAyB,EAAE,CAI7B;AAED,KAAK,eAAe,GAAG;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,CACA;IACE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,KAAK,CAAC;IACf,IAAI,EAAE,SAAS,CAAC;IAChB,WAAW,CAAC,EAAE,yBAAyB,EAAE,CAAC;CAC3C,GACD;IACE,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,IAAI,EAAE,SAAS,CAAC;CACjB,CACJ,CAAC;AAEF,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,IAAU,EACV,GAAG,KAAK,EACT,EAAE,eAAe,2CAoJjB"}
@@ -18,21 +18,82 @@ export const DEFAULT_OSS_PRODUCTS = [
18
18
  description: "The framework for building agents",
19
19
  featured: true,
20
20
  href: "https://eve.dev/",
21
+ id: "eve",
21
22
  label: "eve",
22
23
  logo: _jsx(LogoEve, { height: 16 }),
23
24
  },
24
- { href: "https://nextjs.org/", label: "Next.js", section: "Frameworks" },
25
- { href: "https://svelte.dev/", label: "Svelte", section: "Frameworks" },
26
- { href: "https://nuxt.com/", label: "Nuxt", section: "Frameworks" },
27
- { href: "https://nitro.build/", label: "Nitro", section: "Frameworks" },
28
- { href: "https://ai-sdk.dev/", label: "AI SDK", section: "SDKs" },
29
- { href: "https://chat-sdk.dev/", label: "Chat SDK", section: "SDKs" },
30
- { href: "https://flags-sdk.dev/", label: "Flags SDK", section: "SDKs" },
31
- { href: "https://workflow-sdk.dev/", label: "Workflow SDK", section: "SDKs" },
32
- { href: "https://turborepo.dev/", label: "Turborepo", section: "Other" },
33
- { href: "https://ui.shadcn.com/", label: "Shadcn", section: "Other" },
34
- { href: "https://swr.vercel.app/", label: "SWR", section: "Other" },
35
- { href: "https://justbash.dev/", label: "just-bash", section: "Other" },
25
+ {
26
+ href: "https://nextjs.org/",
27
+ id: "nextjs",
28
+ label: "Next.js",
29
+ section: "Frameworks",
30
+ },
31
+ {
32
+ href: "https://svelte.dev/",
33
+ id: "svelte",
34
+ label: "Svelte",
35
+ section: "Frameworks",
36
+ },
37
+ {
38
+ href: "https://nuxt.com/",
39
+ id: "nuxt",
40
+ label: "Nuxt",
41
+ section: "Frameworks",
42
+ },
43
+ {
44
+ href: "https://nitro.build/",
45
+ id: "nitro",
46
+ label: "Nitro",
47
+ section: "Frameworks",
48
+ },
49
+ {
50
+ href: "https://ai-sdk.dev/",
51
+ id: "ai-sdk",
52
+ label: "AI SDK",
53
+ section: "SDKs",
54
+ },
55
+ {
56
+ href: "https://chat-sdk.dev/",
57
+ id: "chat-sdk",
58
+ label: "Chat SDK",
59
+ section: "SDKs",
60
+ },
61
+ {
62
+ href: "https://flags-sdk.dev/",
63
+ id: "flags-sdk",
64
+ label: "Flags SDK",
65
+ section: "SDKs",
66
+ },
67
+ {
68
+ href: "https://workflow-sdk.dev/",
69
+ id: "workflow-sdk",
70
+ label: "Workflow SDK",
71
+ section: "SDKs",
72
+ },
73
+ {
74
+ href: "https://turborepo.dev/",
75
+ id: "turborepo",
76
+ label: "Turborepo",
77
+ section: "Other",
78
+ },
79
+ {
80
+ href: "https://ui.shadcn.com/",
81
+ id: "shadcn",
82
+ label: "Shadcn",
83
+ section: "Other",
84
+ },
85
+ {
86
+ href: "https://swr.vercel.app/",
87
+ id: "swr",
88
+ label: "SWR",
89
+ section: "Other",
90
+ },
91
+ {
92
+ href: "https://justbash.dev/",
93
+ id: "just-bash",
94
+ label: "just-bash",
95
+ section: "Other",
96
+ },
36
97
  ];
37
98
  /** Group products into columns by `section`, preserving first-seen order. */
38
99
  function groupOssProducts(products) {
@@ -59,9 +120,20 @@ function OssFeaturedCard({ product }) {
59
120
  const card = (_jsxs("span", { className: "flex h-full w-[220px] flex-col gap-3 rounded-lg border border-gray-alpha-400 bg-background-100 p-4 no-underline transition-colors hover:border-gray-alpha-500", children: [_jsx("span", { className: "flex flex-1 items-center justify-center rounded-md bg-gray-100", children: product.logo }), product.description ? (_jsxs("span", { className: "text-copy-14 text-gray-900", children: [product.description, external ? _jsx(ExternalArrow, {}) : null] })) : null] }));
60
121
  return (_jsx(NavigationMenuLink, { asChild: true, children: external ? (_jsx("a", { className: "w-fit! rounded-lg no-underline outline-none focus-visible:ring-2 focus-visible:ring-blue-700 focus-visible:ring-offset-2 focus-visible:ring-offset-background-200", href: product.href, rel: "noopener noreferrer", target: "_blank", children: card })) : (_jsx(LocalizedLink, { className: "w-fit! rounded-lg no-underline outline-none focus-visible:ring-2 focus-visible:ring-blue-700 focus-visible:ring-offset-2 focus-visible:ring-offset-background-200", href: product.href, children: card })) }));
61
122
  }
123
+ /**
124
+ * Resolve the OSS flyout list (custom or default) and drop the active product.
125
+ * Lives here (a "use client" module) because `DEFAULT_OSS_PRODUCTS` holds JSX
126
+ * and is a client-only value — resolving it on the server yields a client
127
+ * reference, not the array.
128
+ */
129
+ export function resolveOssProducts(products, activeProduct) {
130
+ return (products ?? DEFAULT_OSS_PRODUCTS).filter((product) => product.id !== activeProduct && product.href !== activeProduct);
131
+ }
62
132
  export function NavbarLogo({ className, href = "/", ...props }) {
63
133
  const isOss = props.variant === "oss";
64
- const ossProducts = isOss ? (props.ossProducts ?? DEFAULT_OSS_PRODUCTS) : [];
134
+ const ossProducts = isOss
135
+ ? resolveOssProducts(props.ossProducts, props.activeProduct)
136
+ : [];
65
137
  const featuredProducts = ossProducts.filter((product) => product.featured);
66
138
  const ossSections = groupOssProducts(ossProducts.filter((product) => !product.featured));
67
139
  const [navOpen, setNavOpen] = useState(false);
@@ -75,7 +147,7 @@ export function NavbarLogo({ className, href = "/", ...props }) {
75
147
  router.prefetch(href);
76
148
  }
77
149
  }, [isOss, router, href]);
78
- return (_jsxs("span", { className: cn("flex items-center gap-2.5", className), children: [_jsx(Link, { className: "relative flex items-center text-gray-1000 outline-none before:absolute before:-inset-x-1 before:top-1/2 before:h-9 before:-translate-y-1/2 before:rounded-md before:content-[''] focus-visible:before:ring-2 focus-visible:before:ring-blue-700 focus-visible:before:ring-inset", href: isOss ? "https://vercel.com/oss" : "https://vercel.com/", rel: "noopener", target: "_blank", children: isOss ? (_jsxs(_Fragment, { children: [_jsx(LogoIconVercel, { className: "@min-[640px]:hidden", size: 20 }), _jsx(LogoVercelOss, { className: "@min-[640px]:block hidden", size: 18 })] })) : (_jsx(LogoIconVercel, { size: 20 })) }), _jsx("div", { className: "w-4 text-center text-gray-alpha-400 text-lg dark:text-gray-600", children: _jsx(IconSlashForward, {}) }), isOss ? (_jsxs(_Fragment, { children: [_jsx(Link, { className: "flex @min-[1024px]:hidden items-center text-gray-1000", href: href, children: props.logo }), _jsxs("div", { className: "@min-[1024px]:contents hidden", children: [_jsx(NavigationMenu, { delayDuration: 0, onValueChange: (value) => setNavOpen(Boolean(value)), skipDelayDuration: 0, viewport: false, children: _jsx(NavigationMenuList, { className: "h-16 items-stretch", children: _jsxs(NavigationMenuItem, { className: "flex h-full items-center", children: [_jsx(NavigationMenuTrigger, { className: "relative -mx-3 flex h-full items-center gap-1.5 px-3 text-gray-1000 outline-none before:absolute before:inset-x-0 before:top-1/2 before:h-9 before:-translate-y-1/2 before:rounded-md before:content-[''] focus-visible:before:ring-2 focus-visible:before:ring-blue-700 focus-visible:before:ring-inset", onClick: (e) => {
150
+ return (_jsxs("span", { className: cn("flex items-center gap-2.5", className), children: [_jsx(Link, { className: "-mx-2 flex items-center rounded-md p-2 text-gray-1000 outline-none focus-visible:ring-2 focus-visible:ring-blue-700 focus-visible:ring-inset", href: isOss ? "https://vercel.com/oss" : "https://vercel.com/", rel: "noopener", target: "_blank", children: isOss ? (_jsxs(_Fragment, { children: [_jsx(LogoIconVercel, { className: "@min-[640px]:hidden", size: 18 }), _jsx(LogoVercelOss, { className: "@min-[640px]:block hidden", size: 18 })] })) : (_jsx(LogoIconVercel, { size: 18 })) }), _jsx("div", { className: "w-4 text-center text-gray-alpha-400 text-lg dark:text-gray-600", children: _jsx(IconSlashForward, {}) }), isOss ? (_jsxs(_Fragment, { children: [_jsx(Link, { className: "flex @min-[1024px]:hidden items-center text-gray-1000", href: href, children: props.logo }), _jsxs("div", { className: "@min-[1024px]:contents hidden", children: [_jsx(NavigationMenu, { delayDuration: 0, onValueChange: (value) => setNavOpen(Boolean(value)), skipDelayDuration: 0, viewport: false, children: _jsx(NavigationMenuList, { className: "h-16 items-stretch", children: _jsxs(NavigationMenuItem, { className: "flex h-full items-center", children: [_jsx(NavigationMenuTrigger, { className: "relative -mx-3 flex h-full items-center gap-1.5 px-3 text-gray-1000 outline-none before:absolute before:inset-x-0 before:top-1/2 before:h-9 before:-translate-y-1/2 before:rounded-md before:content-[''] focus-visible:before:ring-2 focus-visible:before:ring-blue-700 focus-visible:before:ring-inset", onClick: (e) => {
79
151
  if (e.detail !== 0) {
80
152
  router.push(href);
81
153
  }
@@ -0,0 +1,5 @@
1
+ import { type ReactNode } from "react";
2
+ export declare const NavbarShell: ({ children }: {
3
+ children: ReactNode;
4
+ }) => import("react/jsx-runtime").JSX.Element;
5
+ //# sourceMappingURL=navbar-shell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navbar-shell.d.ts","sourceRoot":"","sources":["../../../src/internal/navbar/navbar-shell.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAuB,MAAM,OAAO,CAAC;AAM5D,eAAO,MAAM,WAAW,GAAI,cAAc;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,4CAqBhE,CAAC"}
@@ -0,0 +1,17 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useEffect, useState } from "react";
4
+ import { cn } from "../cn";
5
+ // Sticky navbar shell that reveals its bottom divider (a box-shadow, so it
6
+ // doesn't consume the 64px content row) only once the page is scrolled —
7
+ // matching the vercel.com header.
8
+ export const NavbarShell = ({ children }) => {
9
+ const [scrolled, setScrolled] = useState(false);
10
+ useEffect(() => {
11
+ const onScroll = () => setScrolled(window.scrollY > 0);
12
+ onScroll();
13
+ window.addEventListener("scroll", onScroll, { passive: true });
14
+ return () => window.removeEventListener("scroll", onScroll);
15
+ }, []);
16
+ return (_jsx("header", { className: cn("sticky top-0 z-40 flex h-16 justify-center bg-background-200 transition-shadow motion-reduce:transition-none", scrolled && "shadow-[0_1px_0_0_var(--ds-gray-alpha-400)]"), "data-scrolled": scrolled ? "" : undefined, children: children }));
17
+ };
@@ -2,6 +2,12 @@ import { type ReactNode } from "react";
2
2
  import type { GeistdocsConfig } from "../config";
3
3
  interface PageActionsProps {
4
4
  config: Pick<GeistdocsConfig, "ai" | "feedback" | "github" | "pageActions" | "siteId">;
5
+ /**
6
+ * Which variant to render. Defaults to both. Use "desktop" to render only
7
+ * the dropdown (beside the title) and "mobile" to render only the inline
8
+ * action row (below the description).
9
+ */
10
+ only?: "desktop" | "mobile";
5
11
  page: {
6
12
  markdownUrl: string;
7
13
  path?: string;
@@ -12,7 +18,7 @@ interface GeistdocsTableOfContentsActionsProps {
12
18
  config: Pick<GeistdocsConfig, "feedback" | "pageActions" | "siteId">;
13
19
  extraActions: ReactNode[];
14
20
  }
15
- export declare const GeistdocsPageActions: ({ config, page }: PageActionsProps) => import("react/jsx-runtime").JSX.Element | null;
21
+ export declare const GeistdocsPageActions: ({ config, page, only, }: PageActionsProps) => import("react/jsx-runtime").JSX.Element | null;
16
22
  export declare const GeistdocsTableOfContentsActions: ({ config, extraActions, }: GeistdocsTableOfContentsActionsProps) => import("react/jsx-runtime").JSX.Element;
17
23
  export {};
18
24
  //# sourceMappingURL=page-actions-client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"page-actions-client.d.ts","sourceRoot":"","sources":["../../src/internal/page-actions-client.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAGL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAmBjD,UAAU,gBAAgB;IACxB,MAAM,EAAE,IAAI,CACV,eAAe,EACf,IAAI,GAAG,UAAU,GAAG,QAAQ,GAAG,aAAa,GAAG,QAAQ,CACxD,CAAC;IACF,IAAI,EAAE;QACJ,WAAW,EAAE,MAAM,CAAC;QACpB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;CACH;AAED,UAAU,oCAAoC;IAC5C,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,aAAa,GAAG,QAAQ,CAAC,CAAC;IACrE,YAAY,EAAE,SAAS,EAAE,CAAC;CAC3B;AAwaD,eAAO,MAAM,oBAAoB,GAAI,kBAAkB,gBAAgB,mDAmItE,CAAC;AAEF,eAAO,MAAM,+BAA+B,GAAI,2BAG7C,oCAAoC,4CAiBtC,CAAC"}
1
+ {"version":3,"file":"page-actions-client.d.ts","sourceRoot":"","sources":["../../src/internal/page-actions-client.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAGL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAmBjD,UAAU,gBAAgB;IACxB,MAAM,EAAE,IAAI,CACV,eAAe,EACf,IAAI,GAAG,UAAU,GAAG,QAAQ,GAAG,aAAa,GAAG,QAAQ,CACxD,CAAC;IACF;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC5B,IAAI,EAAE;QACJ,WAAW,EAAE,MAAM,CAAC;QACpB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;CACH;AAED,UAAU,oCAAoC;IAC5C,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,aAAa,GAAG,QAAQ,CAAC,CAAC;IACrE,YAAY,EAAE,SAAS,EAAE,CAAC;CAC3B;AA2mBD,eAAO,MAAM,oBAAoB,GAAI,yBAIlC,gBAAgB,mDA2FlB,CAAC;AAEF,eAAO,MAAM,+BAA+B,GAAI,2BAG7C,oCAAoC,4CAiBtC,CAAC"}
@@ -14,6 +14,8 @@ import { Popover, PopoverContent, PopoverTrigger } from "./ui/popover";
14
14
  import { Textarea } from "./ui/textarea";
15
15
  import { useIsMobile } from "./use-mobile";
16
16
  const actionClassName = "group flex min-h-8 w-full min-w-0 touch-manipulation items-center gap-2 rounded-md text-left text-gray-900 text-label-14 transition-colors hover:text-gray-1000 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-700 focus-visible:ring-offset-2 focus-visible:ring-offset-background-100 motion-reduce:transition-none [&_svg]:size-4 [&_svg]:shrink-0 [&_span]:min-w-0 [&_span]:truncate";
17
+ // Inline page-action link (icon + label) used in the mobile action row.
18
+ const inlineActionClassName = "group flex touch-manipulation items-center gap-1.5 whitespace-nowrap text-gray-900 text-label-12 font-medium transition-colors hover:text-gray-1000 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-700 focus-visible:ring-offset-2 focus-visible:ring-offset-background-100 motion-reduce:transition-none [&_svg]:size-3.5 [&_svg]:shrink-0";
17
19
  const DEFAULT_EDIT_PATH = "content/docs/{path}";
18
20
  const trimSlashes = (value) => value.replace(/^\/+|\/+$/g, "");
19
21
  const resolveEditPath = ({ editPath = DEFAULT_EDIT_PATH, path, }) => {
@@ -126,7 +128,29 @@ const FeedbackAction = ({ siteId }) => {
126
128
  ? "bg-gray-100 text-gray-1000"
127
129
  : "text-gray-900 hover:text-gray-1000", onClick: () => setEmotion(entry.name), size: "sm", type: "button", variant: "ghost", children: [entry.emoji, _jsx("span", { className: "sr-only", children: entry.name })] }, entry.name))) }), _jsx(Button, { disabled: isPending || !emotion || !message, size: "sm", type: "submit", variant: "default", children: "Send" })] })] })) }) })] }));
128
130
  };
129
- export const GeistdocsPageActions = ({ config, page }) => {
131
+ // The mobile action row: three primary actions rendered inline below the
132
+ // page description.
133
+ const InlinePageActions = ({ askAIEnabled, checked, copyEnabled, markdownUrl, onAskAI, onCopy, }) => {
134
+ const CopyStateIcon = checked ? CheckIcon : CopyIcon;
135
+ return (_jsxs("div", { className: "flex items-center gap-3 border-b pb-3 text-label-12", children: [copyEnabled ? (_jsxs(_Fragment, { children: [_jsxs("button", { className: inlineActionClassName, onClick: onCopy, type: "button", children: [_jsx(CopyStateIcon, {}), _jsx("span", { children: checked ? "Copied" : "Copy for LLM" })] }), _jsx("span", { "aria-hidden": "true", className: "h-4 w-px shrink-0 bg-gray-alpha-400 max-sm:hidden" }), _jsxs("a", { className: `${inlineActionClassName} max-sm:hidden`, href: markdownUrl, rel: "noopener noreferrer", target: "_blank", children: [_jsx(SiMarkdown, { "aria-hidden": "true" }), _jsx("span", { children: "View Markdown" })] })] })) : null, copyEnabled && askAIEnabled ? (_jsx("span", { "aria-hidden": "true", className: "h-4 w-px shrink-0 bg-gray-alpha-400" })) : null, askAIEnabled ? (_jsxs("button", { className: inlineActionClassName, onClick: onAskAI, type: "button", children: [_jsx(MessageCircleIcon, {}), _jsx("span", { children: "Ask AI about this page" })] })) : null] }));
136
+ };
137
+ // The desktop action control: a compact copy button plus an actions dropdown,
138
+ // aligned beside the page title.
139
+ const DesktopPageActions = ({ askAIEnabled, checked, copyEnabled, editSourceEnabled, editSourceUrl, isMobile, markdownUrl, menuView, onAskAI, onCopy, openInChatEnabled, openInChatRef, otherProviders, providersBackRef, query, setMenuView, v0Provider, }) => {
140
+ const CopyStateIcon = checked ? CheckIcon : CopyIcon;
141
+ return (_jsxs(ButtonGroup, { children: [copyEnabled ? (_jsxs(Button, { "aria-label": "Copy page", className: "touch-manipulation", onClick: onCopy, size: "sm", type: "button", variant: "outline", children: [_jsx(CopyStateIcon, { className: "size-4" }), _jsxs("span", { className: "relative hidden md:inline-block", children: [_jsx("span", { className: "invisible", children: "Copy page" }), _jsx("span", { className: "absolute inset-0", children: checked ? "Copied" : "Copy page" })] })] })) : null, _jsxs(DropdownMenu, { onOpenChange: (open) => {
142
+ if (!open) {
143
+ setMenuView("main");
144
+ }
145
+ }, children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(Button, { "aria-label": copyEnabled ? "Open page actions" : "Page actions", className: copyEnabled ? "touch-manipulation px-2" : undefined, size: "sm", type: "button", variant: "outline", children: [copyEnabled ? null : _jsx("span", { children: "Page actions" }), _jsx(ChevronDownIcon, { className: "size-4" })] }) }), _jsx(DropdownMenuContent, { align: "end", className: "w-80 max-w-[calc(100vw-1rem)]", sideOffset: 8, children: isMobile && menuView === "providers" ? (_jsx(ProviderMenuView, { backRef: providersBackRef, onBack: () => {
146
+ setMenuView("main");
147
+ requestAnimationFrame(() => openInChatRef.current?.focus());
148
+ }, providers: otherProviders, query: query })) : (_jsx(PageActionsMainMenu, { askAIEnabled: askAIEnabled, checked: checked, copyEnabled: copyEnabled, copyIcon: _jsx(CopyStateIcon, { className: "size-4" }), editSourceEnabled: editSourceEnabled, editSourceUrl: editSourceUrl, handleCopy: onCopy, isMobile: isMobile, markdownUrl: markdownUrl, onAskAI: onAskAI, onShowProviders: () => {
149
+ setMenuView("providers");
150
+ requestAnimationFrame(() => providersBackRef.current?.focus());
151
+ }, openInChatEnabled: openInChatEnabled, openInChatRef: openInChatRef, otherProviders: otherProviders, query: query, v0Provider: v0Provider })) })] })] }));
152
+ };
153
+ export const GeistdocsPageActions = ({ config, page, only, }) => {
130
154
  const isMobile = useIsMobile();
131
155
  const { enabled: chatEnabled, setIsOpen, setPrompt } = useGeistdocsChat();
132
156
  const [menuView, setMenuView] = useState("main");
@@ -156,21 +180,16 @@ export const GeistdocsPageActions = ({ config, page }) => {
156
180
  }
157
181
  const v0Provider = openInProviders[0];
158
182
  const otherProviders = openInProviders.slice(1);
159
- const CopyStateIcon = checked ? CheckIcon : CopyIcon;
160
- return (_jsxs("div", { className: "self-end", children: [_jsxs(ButtonGroup, { children: [copyEnabled ? (_jsxs(Button, { "aria-label": "Copy page", className: "touch-manipulation", onClick: handleCopy, size: "sm", type: "button", variant: "outline", children: [_jsx(CopyStateIcon, { className: "size-4" }), _jsxs("span", { className: "relative hidden md:inline-block", children: [_jsx("span", { className: "invisible", children: "Copy page" }), _jsx("span", { className: "absolute inset-0", children: checked ? "Copied" : "Copy page" })] })] })) : null, _jsxs(DropdownMenu, { onOpenChange: (open) => {
161
- if (!open) {
162
- setMenuView("main");
163
- }
164
- }, children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(Button, { "aria-label": copyEnabled ? "Open page actions" : "Page actions", className: copyEnabled ? "touch-manipulation px-2" : undefined, size: "sm", type: "button", variant: "outline", children: [copyEnabled ? null : _jsx("span", { children: "Page actions" }), _jsx(ChevronDownIcon, { className: "size-4" })] }) }), _jsx(DropdownMenuContent, { align: "end", className: "w-80 max-w-[calc(100vw-1rem)]", sideOffset: 8, children: isMobile && menuView === "providers" ? (_jsx(ProviderMenuView, { backRef: providersBackRef, onBack: () => {
165
- setMenuView("main");
166
- requestAnimationFrame(() => openInChatRef.current?.focus());
167
- }, providers: otherProviders, query: query })) : (_jsx(PageActionsMainMenu, { askAIEnabled: askAIEnabled, checked: checked, copyEnabled: copyEnabled, copyIcon: _jsx(CopyStateIcon, { className: "size-4" }), editSourceEnabled: editSourceEnabled, editSourceUrl: editSourceUrl, handleCopy: handleCopy, isMobile: isMobile, markdownUrl: markdownUrl, onAskAI: () => {
168
- setPrompt(getPageQuery(page.url, window.location.origin));
169
- setIsOpen(true);
170
- }, onShowProviders: () => {
171
- setMenuView("providers");
172
- requestAnimationFrame(() => providersBackRef.current?.focus());
173
- }, openInChatEnabled: openInChatEnabled, openInChatRef: openInChatRef, otherProviders: otherProviders, query: query, v0Provider: v0Provider })) })] })] }), _jsx("span", { "aria-live": "polite", className: "sr-only", children: checked ? "Page copied" : "" })] }));
183
+ const showDesktop = only !== "mobile";
184
+ const showMobile = only !== "desktop";
185
+ const onAskAI = () => {
186
+ setPrompt(getPageQuery(page.url, window.location.origin));
187
+ setIsOpen(true);
188
+ };
189
+ // Desktop variant aligns beside the title (self-end); the mobile variant is
190
+ // rendered below the description and left-aligned.
191
+ const rootClassName = only === "mobile" ? "@min-[961px]:hidden" : "self-end @max-[960px]:hidden";
192
+ return (_jsxs("div", { className: rootClassName, children: [showDesktop ? (_jsx(DesktopPageActions, { askAIEnabled: askAIEnabled, checked: checked, copyEnabled: copyEnabled, editSourceEnabled: editSourceEnabled, editSourceUrl: editSourceUrl, isMobile: isMobile, markdownUrl: markdownUrl, menuView: menuView, onAskAI: onAskAI, onCopy: handleCopy, openInChatEnabled: openInChatEnabled, openInChatRef: openInChatRef, otherProviders: otherProviders, providersBackRef: providersBackRef, query: query, setMenuView: setMenuView, v0Provider: v0Provider })) : null, showMobile && (copyEnabled || askAIEnabled) ? (_jsx(InlinePageActions, { askAIEnabled: askAIEnabled, checked: checked, copyEnabled: copyEnabled, markdownUrl: markdownUrl, onAskAI: onAskAI, onCopy: handleCopy })) : null, _jsx("span", { "aria-live": "polite", className: "sr-only", children: checked ? "Page copied" : "" })] }));
174
193
  };
175
194
  export const GeistdocsTableOfContentsActions = ({ config, extraActions, }) => {
176
195
  const actions = [];
@@ -1 +1 @@
1
- {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/internal/search.tsx"],"names":[],"mappings":"AAGA,OAAO,EASL,KAAK,WAAW,EACjB,MAAM,sCAAsC,CAAC;AAI9C,eAAO,MAAM,qBAAqB,GAAI,wBAGnC,WAAW,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,4CA0BrC,CAAC"}
1
+ {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/internal/search.tsx"],"names":[],"mappings":"AAGA,OAAO,EASL,KAAK,WAAW,EACjB,MAAM,sCAAsC,CAAC;AAI9C,eAAO,MAAM,qBAAqB,GAAI,wBAGnC,WAAW,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,4CA8BrC,CAAC"}
@@ -11,5 +11,5 @@ export const GeistdocsSearchDialog = ({ basePath, ...props }) => {
11
11
  locale,
12
12
  api: getPublicPath("/api/search", basePath),
13
13
  });
14
- return (_jsxs(FumadocsSearchDialog, { isLoading: query.isLoading, onSearchChange: setSearch, search: search, ...props, children: [_jsx(SearchDialogOverlay, {}), _jsxs(SearchDialogContent, { children: [_jsxs(SearchDialogHeader, { children: [_jsx(SearchDialogIcon, {}), _jsx(SearchDialogInput, {}), _jsx(SearchDialogClose, {})] }), _jsx(SearchDialogList, { items: query.data === "empty" ? null : query.data })] })] }));
14
+ return (_jsxs(FumadocsSearchDialog, { isLoading: query.isLoading, onSearchChange: setSearch, search: search, ...props, children: [_jsx(SearchDialogOverlay, { className: "bg-background-100/80 backdrop-blur-none" }), _jsxs(SearchDialogContent, { className: "border-none", "data-geistdocs-command-modal": true, children: [_jsxs(SearchDialogHeader, { children: [_jsx(SearchDialogIcon, {}), _jsx(SearchDialogInput, {}), _jsx(SearchDialogClose, {})] }), _jsx(SearchDialogList, { items: query.data === "empty" ? null : query.data })] })] }));
15
15
  };
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../src/internal/sidebar.tsx"],"names":[],"mappings":"AAOA,OAAO,EAEL,KAAK,SAAS,EAQf,MAAM,OAAO,CAAC;AA82Bf,eAAO,MAAM,gBAAgB,GAAI,uBAG9B;IACD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,GAAG,CAAC,EAAE,SAAS,CAAC;CACjB,4CA8DA,CAAC"}
1
+ {"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../src/internal/sidebar.tsx"],"names":[],"mappings":"AAOA,OAAO,EAEL,KAAK,SAAS,EAQf,MAAM,OAAO,CAAC;AA+2Bf,eAAO,MAAM,gBAAgB,GAAI,uBAG9B;IACD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,GAAG,CAAC,EAAE,SAAS,CAAC;CACjB,4CA8DA,CAAC"}
@@ -300,7 +300,7 @@ const DesktopSidebar = ({ activeUrl, nodes, rootScope, top, }) => {
300
300
  setView("root");
301
301
  }, section: activeSection }), _jsx("div", { className: "px-2", children: _jsx(SidebarTree, { activeUrl: activeUrl, idScope: sectionScope, nodes: sectionItems, openFirstLevel: true, scrollActive: true, visible: !sectionHidden }) })] })) : null] })] }) }) }));
302
302
  };
303
- const MobileSidebar = ({ activeUrl, idScope, nodes, onOpenChange, open, top, }) => (_jsx(Sheet, { onOpenChange: onOpenChange, open: open, children: _jsxs(SheetContent, { className: "gap-0 p-0", "data-geistdocs-mobile-sidebar": true, side: "left", children: [_jsxs(SheetHeader, { className: "h-16 shrink-0 justify-center border-b px-4 py-0", children: [_jsx(SheetTitle, { className: "text-label-16", children: "Browse" }), _jsx(SheetDescription, { className: "sr-only", children: "Navigation for the documentation." })] }), _jsxs("nav", { "aria-label": "Documentation", className: "flex-1 overflow-y-auto overflow-x-hidden overscroll-contain px-2 py-3 text-gray-900", "data-geistdocs-sidebar-scroll": true, children: [_jsx("div", { className: "pb-4 [&>button]:w-full", children: _jsx(SearchButton, { onClick: () => onOpenChange(false) }) }), top ? _jsx("div", { className: "pb-4", children: top }) : null, _jsx(SidebarTree, { activeUrl: activeUrl, idScope: idScope, nodes: nodes, onNavigate: () => onOpenChange(false), scrollActive: true, visible: open })] })] }) }));
303
+ const MobileSidebar = ({ activeUrl, idScope, nodes, onOpenChange, open, top, }) => (_jsx(Sheet, { onOpenChange: onOpenChange, open: open, children: _jsxs(SheetContent, { className: "w-full gap-0 bg-background-200 p-0 sm:max-w-none", "data-geistdocs-mobile-sidebar": true, overlay: false, side: "left", children: [_jsxs(SheetHeader, { className: "h-16 shrink-0 justify-center border-b px-4 py-0", children: [_jsx(SheetTitle, { className: "text-label-16", children: "Browse" }), _jsx(SheetDescription, { className: "sr-only", children: "Navigation for the documentation." })] }), _jsxs("nav", { "aria-label": "Documentation", className: "flex-1 overflow-y-auto overflow-x-hidden overscroll-contain px-2 py-3 text-gray-900", "data-geistdocs-sidebar-scroll": true, children: [_jsx("div", { className: "pb-4 [&>button]:w-full", children: _jsx(SearchButton, { onClick: () => onOpenChange(false) }) }), top ? _jsx("div", { className: "pb-4", children: top }) : null, _jsx(SidebarTree, { activeUrl: activeUrl, idScope: idScope, nodes: nodes, onNavigate: () => onOpenChange(false), scrollActive: true, visible: open })] })] }) }));
304
304
  export const GeistdocsSidebar = ({ showDesktop = true, top, }) => {
305
305
  const { root, full } = useTreeContext();
306
306
  const { isOpen, setIsOpen } = useGeistdocsSidebar();
@@ -15,5 +15,5 @@ export function DrawerDescription({ className, ...props }) {
15
15
  return (_jsx(DrawerPrimitive.Description, { className: cn("text-gray-800 text-sm", className), "data-slot": "drawer-description", ...props }));
16
16
  }
17
17
  export function DrawerContent({ className, children, ...props }) {
18
- return (_jsxs(DrawerPrimitive.Portal, { "data-slot": "drawer-portal", children: [_jsx(DrawerPrimitive.Overlay, { className: "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in", "data-slot": "drawer-overlay" }), _jsxs(DrawerPrimitive.Content, { className: cn("group/drawer-content fixed z-50 flex h-auto flex-col bg-background-100", "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b", "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t", "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm", "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm", className), "data-slot": "drawer-content", ...props, children: [_jsx("div", { className: "mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full bg-gray-100 group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }), children] })] }));
18
+ return (_jsxs(DrawerPrimitive.Portal, { "data-slot": "drawer-portal", children: [_jsx(DrawerPrimitive.Overlay, { className: "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-background-100/80 data-[state=closed]:animate-out data-[state=open]:animate-in", "data-slot": "drawer-overlay" }), _jsxs(DrawerPrimitive.Content, { className: cn("group/drawer-content fixed z-50 flex h-auto flex-col bg-background-100", "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b", "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t", "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm", "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm", className), "data-slot": "drawer-content", ...props, children: [_jsx("div", { className: "mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full bg-gray-100 group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }), children] })] }));
19
19
  }
@@ -1,8 +1,11 @@
1
1
  import { Dialog as SheetPrimitive } from "radix-ui";
2
2
  import type { ComponentProps } from "react";
3
3
  export declare function Sheet(props: ComponentProps<typeof SheetPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
- export declare function SheetContent({ className, children, side, ...props }: ComponentProps<typeof SheetPrimitive.Content> & {
4
+ export declare function SheetContent({ className, children, side, overlay, ...props }: ComponentProps<typeof SheetPrimitive.Content> & {
5
5
  side?: "top" | "right" | "bottom" | "left";
6
+ /** Render the dimmed backdrop. Disable for full-width sheets that already
7
+ cover the page (nothing shows behind them). */
8
+ overlay?: boolean;
6
9
  }): import("react/jsx-runtime").JSX.Element;
7
10
  export declare function SheetHeader({ className, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
8
11
  export declare function SheetTitle({ className, ...props }: ComponentProps<typeof SheetPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../../../src/internal/ui/sheet.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,wBAAgB,KAAK,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,2CAEtE;AAED,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,QAAQ,EACR,IAAc,EACd,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,cAAc,CAAC,OAAO,CAAC,GAAG;IACjD,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;CAC5C,2CAkCA;AAED,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,2CAQzE;AAED,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,cAAc,CAAC,KAAK,CAAC,2CAQ7C;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,cAAc,CAAC,WAAW,CAAC,2CAQnD"}
1
+ {"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../../../src/internal/ui/sheet.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,wBAAgB,KAAK,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,2CAEtE;AAED,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,QAAQ,EACR,IAAc,EACd,OAAc,EACd,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,cAAc,CAAC,OAAO,CAAC,GAAG;IACjD,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC3C;sDACkD;IAClD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,2CAoCA;AAED,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,2CAQzE;AAED,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,cAAc,CAAC,KAAK,CAAC,2CAQ7C;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,cAAc,CAAC,WAAW,CAAC,2CAQnD"}
@@ -6,8 +6,8 @@ import { cn } from "../cn";
6
6
  export function Sheet(props) {
7
7
  return _jsx(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
8
8
  }
9
- export function SheetContent({ className, children, side = "right", ...props }) {
10
- return (_jsxs(SheetPrimitive.Portal, { "data-slot": "sheet-portal", children: [_jsx(SheetPrimitive.Overlay, { className: "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-gray-alpha-800 duration-300 ease-[cubic-bezier(0.175,0.885,0.32,1.1)] data-[state=closed]:animate-out data-[state=open]:animate-in motion-reduce:animate-none", "data-slot": "sheet-overlay" }), _jsxs(SheetPrimitive.Content, { className: cn("fixed z-50 flex flex-col gap-4 bg-background-100 shadow-[var(--ds-shadow-modal)] duration-300 ease-[cubic-bezier(0.175,0.885,0.32,1.1)] data-[state=closed]:animate-out data-[state=open]:animate-in motion-reduce:animate-none", side === "right" &&
9
+ export function SheetContent({ className, children, side = "right", overlay = true, ...props }) {
10
+ return (_jsxs(SheetPrimitive.Portal, { "data-slot": "sheet-portal", children: [overlay ? (_jsx(SheetPrimitive.Overlay, { className: "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-background-100/80 duration-300 ease-[cubic-bezier(0.32,0.72,0,1)] data-[state=closed]:animate-out data-[state=open]:animate-in motion-reduce:animate-none", "data-slot": "sheet-overlay" })) : null, _jsxs(SheetPrimitive.Content, { className: cn("fixed z-50 flex flex-col gap-4 bg-background-100 shadow-[var(--ds-shadow-modal)] duration-300 ease-[cubic-bezier(0.32,0.72,0,1)] data-[state=closed]:animate-out data-[state=open]:animate-in motion-reduce:animate-none", side === "right" &&
11
11
  "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm", side === "left" &&
12
12
  "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm", side === "top" &&
13
13
  "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b", side === "bottom" &&
@@ -1 +1 @@
1
- {"version":3,"file":"mobile-docs-bar.d.ts","sourceRoot":"","sources":["../src/mobile-docs-bar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAczD,UAAU,kBAAkB;IAC1B,GAAG,CAAC,EAAE,eAAe,CAAC;CACvB;AAED,eAAO,MAAM,aAAa,GAAI,SAAS,kBAAkB,4CAuExD,CAAC"}
1
+ {"version":3,"file":"mobile-docs-bar.d.ts","sourceRoot":"","sources":["../src/mobile-docs-bar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAQzD,UAAU,kBAAkB;IAC1B,GAAG,CAAC,EAAE,eAAe,CAAC;CACvB;AAcD,eAAO,MAAM,aAAa,GAAI,SAAS,kBAAkB,4CA0ExD,CAAC"}
@@ -1,13 +1,32 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { useActiveAnchors } from "fumadocs-core/toc";
3
4
  import { useState } from "react";
4
5
  import { IconFileText } from "./assets/icons/icon-file-text";
5
6
  import { IconMenuAlt } from "./assets/icons/icon-menu-alt";
6
- import { cn } from "./internal/cn";
7
- import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle, } from "./internal/ui/sheet";
7
+ import { Popover, PopoverContent, PopoverTrigger } from "./internal/ui/popover";
8
8
  import { useGeistdocsSidebar } from "./sidebar";
9
+ // Text indentation per heading depth. Top-level items sit flush with the
10
+ // header; deeper headings indent to show nesting.
11
+ const getItemOffset = (depth) => {
12
+ if (depth <= 2) {
13
+ return 0;
14
+ }
15
+ if (depth === 3) {
16
+ return 12;
17
+ }
18
+ return 24;
19
+ };
9
20
  export const MobileDocsBar = ({ toc }) => {
10
21
  const { isOpen: sidebarOpen, setIsOpen: setSidebarOpen } = useGeistdocsSidebar();
11
22
  const [tocOpen, setTocOpen] = useState(false);
12
- return (_jsxs("div", { className: "sticky top-16 z-30 -mx-6 -mt-6 mb-6 flex @min-[961px]:hidden h-[54px] items-center justify-between border-b bg-background-100 px-6", "data-mobile-docs-bar": true, children: [_jsxs("button", { "aria-expanded": sidebarOpen, "aria-haspopup": "dialog", className: "-ml-2 flex min-h-8 touch-manipulation items-center gap-3 rounded-md px-2 text-gray-1000 text-label-16 transition-colors hover:bg-gray-alpha-100 focus-visible:shadow-[var(--ds-focus-ring)] focus-visible:outline-none active:bg-gray-alpha-300 motion-reduce:transition-none", onClick: () => setSidebarOpen(true), type: "button", children: [_jsx(IconMenuAlt, { size: 16 }), "Menu"] }), toc && toc.length > 0 && (_jsxs(_Fragment, { children: [_jsx("button", { "aria-expanded": tocOpen, "aria-haspopup": "dialog", "aria-label": "Table of contents", className: "flex size-8 touch-manipulation items-center justify-center rounded-md border border-gray-alpha-400 text-gray-900 transition-colors hover:border-gray-alpha-500 hover:bg-gray-alpha-100 hover:text-gray-1000 focus-visible:shadow-[var(--ds-focus-ring)] focus-visible:outline-none active:border-gray-alpha-600 active:bg-gray-alpha-300 motion-reduce:transition-none", "data-mobile-toc-trigger": true, onClick: () => setTocOpen(true), type: "button", children: _jsx(IconFileText, { size: 16 }) }), _jsx(Sheet, { onOpenChange: setTocOpen, open: tocOpen, children: _jsxs(SheetContent, { className: "w-72 gap-0", "data-geistdocs-mobile-toc": true, side: "right", children: [_jsxs(SheetHeader, { children: [_jsx(SheetTitle, { className: "sr-only", children: "On This Page" }), _jsx(SheetDescription, { className: "sr-only", children: "Table of contents for the current page." })] }), _jsx("nav", { className: "flex-1 overflow-y-auto overflow-x-hidden overscroll-contain px-4 pb-4", children: _jsx("ul", { className: "space-y-1", children: toc.map((item) => (_jsx("li", { children: _jsx("a", { className: cn("block break-words rounded-md py-1.5 text-gray-900 text-sm transition-colors hover:text-gray-1000 focus-visible:shadow-[var(--ds-focus-ring)] focus-visible:outline-none motion-reduce:transition-none", item.depth > 2 && "pl-4"), href: item.url, onClick: () => setTocOpen(false), children: item.title }) }, item.url))) }) })] }) })] }))] }));
23
+ const activeAnchors = useActiveAnchors();
24
+ const hasToc = Boolean(toc && toc.length > 0);
25
+ return (_jsxs(_Fragment, { children: [_jsx("div", { className: "sticky top-16 z-30 -mx-6 -mt-6 mb-6 flex @min-[961px]:hidden h-[54px] items-center border-b bg-background-200 px-6", "data-mobile-docs-bar": true, children: _jsxs("button", { "aria-expanded": sidebarOpen, "aria-haspopup": "dialog", className: "-ml-2 flex min-h-8 touch-manipulation items-center gap-3 rounded-md px-2 text-gray-1000 text-label-16 transition-colors hover:bg-gray-alpha-100 focus-visible:shadow-[var(--ds-focus-ring)] focus-visible:outline-none active:bg-gray-alpha-300 motion-reduce:transition-none", onClick: () => setSidebarOpen(true), type: "button", children: [_jsx(IconMenuAlt, { size: 16 }), "Menu"] }) }), hasToc ? (_jsx("div", { className: "pointer-events-none sticky top-[calc(4rem+70px)] z-30 -mb-12 flex @min-[961px]:hidden justify-end", children: _jsxs(Popover, { onOpenChange: setTocOpen, open: tocOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsx("button", { "aria-label": "Table of contents", className: "pointer-events-auto flex size-8 touch-manipulation items-center justify-center rounded-md bg-background-100 text-gray-900 shadow-[var(--ds-shadow-border)] transition-colors hover:border-gray-alpha-500 hover:text-gray-1000 focus-visible:shadow-[var(--ds-focus-ring)] focus-visible:outline-none active:border-gray-alpha-600 data-[state=open]:border-gray-alpha-600 data-[state=open]:text-gray-1000 motion-reduce:transition-none", "data-mobile-toc-trigger": true, type: "button", children: _jsx(IconFileText, { size: 16 }) }) }), _jsx(PopoverContent, { align: "end", className: "w-64 overflow-hidden p-0", "data-geistdocs-mobile-toc": true, sideOffset: 8, children: _jsxs("div", { className: "max-h-[min(50vh,20rem)] overflow-y-auto overscroll-contain p-4", children: [_jsx("p", { className: "mb-2 font-medium text-gray-1000 text-xs uppercase tracking-wider", children: "On this page" }), _jsx("nav", { className: "flex flex-col", children: toc?.map((item) => {
26
+ const id = item.url.slice(1);
27
+ const active = activeAnchors.includes(id);
28
+ return (_jsx("a", { className: "wrap-anywhere block py-1.5 text-fd-muted-foreground text-sm transition-colors first:pt-0 last:pb-0 hover:text-fd-accent-foreground focus-visible:shadow-[var(--ds-focus-ring)] focus-visible:outline-none data-[active=true]:text-fd-primary motion-reduce:transition-none", "data-active": active ? "true" : undefined, href: item.url, onClick: () => setTocOpen(false), style: {
29
+ paddingInlineStart: getItemOffset(item.depth),
30
+ }, children: item.title }, item.url));
31
+ }) })] }) })] }) })) : null] }));
13
32
  };
package/dist/navbar.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { GeistdocsConfig } from "./config";
2
2
  interface NavbarProps {
3
- config: Pick<GeistdocsConfig, "github" | "logo" | "nav" | "navbarGithub" | "navbarOssProducts" | "navbarVariant">;
3
+ config: Pick<GeistdocsConfig, "github" | "logo" | "nav" | "navbarActiveProduct" | "navbarGithub" | "navbarOssProducts" | "navbarVariant">;
4
4
  }
5
5
  export declare const Navbar: ({ config }: NavbarProps) => import("react/jsx-runtime").JSX.Element;
6
6
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"navbar.d.ts","sourceRoot":"","sources":["../src/navbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAUhD,UAAU,WAAW;IACnB,MAAM,EAAE,IAAI,CACV,eAAe,EACb,QAAQ,GACR,MAAM,GACN,KAAK,GACL,cAAc,GACd,mBAAmB,GACnB,eAAe,CAClB,CAAC;CACH;AAKD,eAAO,MAAM,MAAM,GAAI,YAAY,WAAW,4CA8D7C,CAAC"}
1
+ {"version":3,"file":"navbar.d.ts","sourceRoot":"","sources":["../src/navbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAQhD,UAAU,WAAW;IACnB,MAAM,EAAE,IAAI,CACV,eAAe,EACb,QAAQ,GACR,MAAM,GACN,KAAK,GACL,qBAAqB,GACrB,cAAc,GACd,mBAAmB,GACnB,eAAe,CAClB,CAAC;CACH;AAKD,eAAO,MAAM,MAAM,GAAI,YAAY,WAAW,4CAkE7C,CAAC"}
package/dist/navbar.js CHANGED
@@ -3,15 +3,18 @@ import { AskAIButton, SearchButton } from "./controls";
3
3
  import { GitHubButton, getGithubRepoUrl } from "./internal/github-button";
4
4
  import { DesktopMenu } from "./internal/navbar/desktop-menu";
5
5
  import { MobileMenu } from "./internal/navbar/mobile-menu";
6
- import { DEFAULT_OSS_PRODUCTS, NavbarLogo, } from "./internal/navbar/navbar-logo";
6
+ import { NavbarLogo } from "./internal/navbar/navbar-logo";
7
+ import { NavbarShell } from "./internal/navbar/navbar-shell";
7
8
  const SEARCH_BUTTON_CLASSES = "group hidden h-10 justify-between pr-1.5 text-gray-900 shadow-none @min-[1024px]:flex @min-[1024px]:h-8 @min-[1024px]:w-[150px] [&_[data-slot=kbd]]:transition-colors group-hover:[&_[data-slot=kbd]]:text-gray-1000";
8
9
  export const Navbar = ({ config }) => {
9
10
  const nav = config.nav ?? [];
10
11
  const variant = config.navbarVariant ?? "oss";
12
+ const isOss = variant === "oss";
11
13
  const showGithub = config.navbarGithub?.enabled !== false;
12
14
  const githubUrl = showGithub ? getGithubRepoUrl(config.github) : null;
13
- const ossProducts = variant === "oss"
14
- ? (config.navbarOssProducts ?? DEFAULT_OSS_PRODUCTS)
15
- : undefined;
16
- return (_jsx("header", { className: "sticky top-0 z-40 flex h-16 justify-center border-b bg-background-200", children: _jsxs("div", { className: "@container mx-auto flex w-full max-w-[1448px] justify-between px-2", children: [_jsxs("div", { className: "flex select-none flex-row items-center", children: [variant === "oss" ? (_jsx(NavbarLogo, { className: "ml-4", logo: config.logo, ossProducts: config.navbarOssProducts, variant: "oss" })) : (_jsx(NavbarLogo, { className: "ml-4", logo: config.logo, variant: "standard" })), _jsx(DesktopMenu, { className: "@min-[1024px]:flex hidden", items: nav })] }), _jsxs("div", { className: "mr-4 flex flex-row items-center justify-end gap-2", children: [_jsx(SearchButton, { className: SEARCH_BUTTON_CLASSES }), _jsx(AskAIButton, { className: "@min-[768px]:flex hidden shrink-0 shadow-none", size: "sm", variant: "outline" }), _jsx(AskAIButton, { className: "@min-[768px]:hidden shadow-none", size: "sm", variant: "outline" }), showGithub ? (_jsx(GitHubButton, { className: "@min-[768px]:inline-flex hidden shrink-0", github: config.github })) : null, _jsx(MobileMenu, { githubUrl: githubUrl, nav: nav, ossProducts: ossProducts })] })] }) }));
15
+ // The default product list lives in a "use client" module, so it can only be
16
+ // resolved and filtered inside the client menus below. Pass the raw custom
17
+ // list (if any) and the active product down; each menu drops the active one.
18
+ const activeProduct = config.navbarActiveProduct;
19
+ return (_jsx(NavbarShell, { children: _jsxs("div", { className: "@container mx-auto flex w-full max-w-[1448px] justify-between px-2", children: [_jsxs("div", { className: "flex select-none flex-row items-center", children: [isOss ? (_jsx(NavbarLogo, { activeProduct: activeProduct, className: "ml-4", logo: config.logo, ossProducts: config.navbarOssProducts, variant: "oss" })) : (_jsx(NavbarLogo, { className: "ml-4", logo: config.logo, variant: "standard" })), _jsx(DesktopMenu, { className: "@min-[1024px]:flex hidden", items: nav })] }), _jsxs("div", { className: "mr-4 flex flex-row items-center justify-end gap-2", children: [_jsx(SearchButton, { className: SEARCH_BUTTON_CLASSES }), _jsx(AskAIButton, { className: "@min-[768px]:flex hidden shrink-0 shadow-none", size: "sm", variant: "outline" }), _jsx(AskAIButton, { className: "@min-[768px]:hidden shadow-none", size: "sm", variant: "outline" }), showGithub ? (_jsx(GitHubButton, { className: "@min-[768px]:inline-flex hidden shrink-0", github: config.github })) : null, _jsx(MobileMenu, { activeProduct: activeProduct, githubUrl: githubUrl, nav: nav, ossProducts: config.navbarOssProducts, showOss: isOss })] })] }) }));
17
20
  };
@@ -1 +1 @@
1
- {"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/pages/docs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,QAAQ,IAAI,gBAAgB,EAE7B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAErC,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,EAAE,KAAK,eAAe,EAA+B,MAAM,WAAW,CAAC;AAU9E,OAAO,EACL,KAAK,2BAA2B,EAEjC,MAAM,6BAA6B,CAAC;AAGrC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAEvD,KAAK,YAAY,GAAG,qBAAqB,CAAC;AAE1C,KAAK,aAAa,GAAG,WAAW,CAAC,UAAU,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC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ACvB,KAAK,SAAS,CAAC;IAChB,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE;QACtB,IAAI,EAAE,YAAY,CAAC;QACnB,IAAI,EAAE,aAAa,CAAC;QACpB,MAAM,EAAE,YAAY,CAAC;KACtB,KAAK,YAAY,CAAC;IACnB,MAAM,EAAE,YAAY,CAAC;IACrB,cAAc,CAAC,EAAE,qBAAqB,CAAC;IACvC,qBAAqB,CAAC,EAAE,cAAc,CACpC,OAAO,gBAAgB,CACxB,CAAC,uBAAuB,CAAC,CAAC;CAC5B;AA+BD,eAAO,MAAM,cAAc,GAAI,6LAe5B,qBAAqB;wBAoBnB;QACD,MAAM,EAAE,OAAO,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;SAAE,CAAC,CAAC;KACpD;;oCA2KE;QACD,MAAM,EAAE,OAAO,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;SAAE,CAAC,CAAC;KACpD,KAAG,OAAO,CAAC,QAAQ,CAAC;CAiDtB,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;CAA4B,CAAC"}
@@ -108,11 +108,15 @@ export const createDocsPage = ({ config, source, mdx, pageActions = createIntern
108
108
  page,
109
109
  pageUrl,
110
110
  publicPageUrl,
111
- }), _jsxs("div", { className: "flex flex-col-reverse gap-4 md:flex-row md:items-end md:justify-between", children: [_jsx(DocsTitle, { className: "mb-0 min-w-0", children: data.title }), _jsx(GeistdocsPageActions, { config: pageActions.config, page: {
111
+ }), _jsxs("div", { className: "flex flex-col-reverse gap-4 md:flex-row md:items-end md:justify-between", children: [_jsx(DocsTitle, { className: "mb-0 min-w-0", children: data.title }), _jsx(GeistdocsPageActions, { config: pageActions.config, only: "desktop", page: {
112
112
  markdownUrl,
113
113
  path: page.path,
114
114
  url: publicPageUrl,
115
- } })] }), _jsx(DocsDescription, { children: data.description }), _jsx(DocsBody, { children: _jsx(MDX, { components: {
115
+ } })] }), _jsx(DocsDescription, { children: data.description }), _jsx("div", { className: "-mt-6 mb-4 @min-[961px]:hidden", children: _jsx(GeistdocsPageActions, { config: pageActions.config, only: "mobile", page: {
116
+ markdownUrl,
117
+ path: page.path,
118
+ url: publicPageUrl,
119
+ } }) }), _jsx(DocsBody, { children: _jsx(MDX, { components: {
116
120
  ...createMdxComponents({ a: link }),
117
121
  ...resolvedMdx,
118
122
  } }) })] }));
package/docs/agents.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Geistdocs Package Docs
2
2
 
3
- These docs are bundled with `@vercel/geistdocs` 1.15.4 so agents can understand the installed package without web access.
3
+ These docs are bundled with `@vercel/geistdocs` 1.16.0 so agents can understand the installed package without web access.
4
4
  They are generated from `apps/template/content/docs` during the package build.
5
5
 
6
6
  ## How to use these files