@vercel/geistdocs 1.25.1-canary.c58830e → 1.25.1-canary.eec231d

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 (84) hide show
  1. package/dist/cli/index.js +1 -1
  2. package/dist/components/blockquote.js +1 -1
  3. package/dist/components/callout.d.ts +13 -10
  4. package/dist/components/callout.d.ts.map +1 -1
  5. package/dist/components/callout.js +6 -6
  6. package/dist/components/code-block-tabs.d.ts.map +1 -1
  7. package/dist/components/code-block-tabs.js +3 -1
  8. package/dist/components/code-block.d.ts.map +1 -1
  9. package/dist/components/code-block.js +1 -1
  10. package/dist/components/command-prompt.d.ts.map +1 -1
  11. package/dist/components/command-prompt.js +15 -22
  12. package/dist/components/copy-prompt.d.ts +2 -1
  13. package/dist/components/copy-prompt.d.ts.map +1 -1
  14. package/dist/components/copy-prompt.js +2 -2
  15. package/dist/components/heading.d.ts +7 -0
  16. package/dist/components/heading.d.ts.map +1 -0
  17. package/dist/components/heading.js +14 -0
  18. package/dist/components/table.d.ts +3 -0
  19. package/dist/components/table.d.ts.map +1 -0
  20. package/dist/components/table.js +3 -0
  21. package/dist/controls.d.ts.map +1 -1
  22. package/dist/controls.js +4 -3
  23. package/dist/internal/chat/context.d.ts +2 -0
  24. package/dist/internal/chat/context.d.ts.map +1 -1
  25. package/dist/internal/chat/context.js +24 -3
  26. package/dist/internal/chat/dots-spinner.d.ts.map +1 -1
  27. package/dist/internal/chat/dots-spinner.js +15 -9
  28. package/dist/internal/chat/loading-skeleton.d.ts +7 -0
  29. package/dist/internal/chat/loading-skeleton.d.ts.map +1 -0
  30. package/dist/internal/chat/loading-skeleton.js +46 -0
  31. package/dist/internal/chat/message.d.ts.map +1 -1
  32. package/dist/internal/chat/message.js +23 -3
  33. package/dist/internal/chat/shell.d.ts.map +1 -1
  34. package/dist/internal/chat/shell.js +10 -15
  35. package/dist/internal/chat/sources.d.ts.map +1 -1
  36. package/dist/internal/chat/sources.js +4 -1
  37. package/dist/internal/navbar/desktop-menu.js +1 -1
  38. package/dist/internal/navbar/mobile-menu.d.ts.map +1 -1
  39. package/dist/internal/navbar/mobile-menu.js +8 -13
  40. package/dist/internal/page-actions-client.d.ts.map +1 -1
  41. package/dist/internal/page-actions-client.js +36 -32
  42. package/dist/internal/provider-client.d.ts.map +1 -1
  43. package/dist/internal/provider-client.js +39 -5
  44. package/dist/internal/search.d.ts.map +1 -1
  45. package/dist/internal/search.js +1 -1
  46. package/dist/internal/sidebar-responsive.d.ts +0 -1
  47. package/dist/internal/sidebar-responsive.d.ts.map +1 -1
  48. package/dist/internal/sidebar-responsive.js +0 -9
  49. package/dist/internal/sidebar.d.ts.map +1 -1
  50. package/dist/internal/sidebar.js +63 -35
  51. package/dist/internal/table-of-contents.d.ts.map +1 -1
  52. package/dist/internal/table-of-contents.js +1 -1
  53. package/dist/internal/toc-items.d.ts.map +1 -1
  54. package/dist/internal/toc-items.js +16 -6
  55. package/dist/internal/ui/dropdown-menu.js +6 -6
  56. package/dist/internal/ui/navigation-menu.js +2 -2
  57. package/dist/internal/use-mobile.d.ts.map +1 -1
  58. package/dist/internal/use-mobile.js +2 -12
  59. package/dist/layout.d.ts +1 -0
  60. package/dist/layout.d.ts.map +1 -1
  61. package/dist/layout.js +2 -0
  62. package/dist/mdx.d.ts.map +1 -1
  63. package/dist/mdx.js +11 -4
  64. package/dist/pages/docs.d.ts.map +1 -1
  65. package/dist/pages/docs.js +6 -4
  66. package/dist/routes/chat.d.ts +1 -1
  67. package/dist/routes/chat.js +1 -1
  68. package/dist/versions.js +2 -2
  69. package/docs/agents.md +1 -1
  70. package/docs/llms.txt +110 -12
  71. package/docs/manifest.json +1 -1
  72. package/docs/pages/ask-ai.md +2 -2
  73. package/docs/pages/md.md +1 -1
  74. package/docs/pages/syntax.md +106 -8
  75. package/package.json +2 -1
  76. package/template/app/[lang]/layout.tsx +4 -0
  77. package/template/app/styles/geistdocs.css +1 -1
  78. package/template/components/ui/button.tsx +1 -1
  79. package/template/content/docs/ask-ai.cn.mdx +2 -2
  80. package/template/content/docs/ask-ai.mdx +2 -2
  81. package/template/content/docs/md.mdx +1 -1
  82. package/template/content/docs/syntax.mdx +112 -8
  83. package/template/package.json +1 -1
  84. package/theme.css +39 -101
@@ -2,14 +2,15 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle, } from "@vercel/geistcn/components/sheet";
4
4
  import { cn } from "@vercel/geistcn/utils";
5
- import { IconArrowUpRight, IconChevronDownSmall, IconChevronRight, } from "@vercel/geistcn-assets/icons";
5
+ import { IconArrowUpRightSmall, IconChevronRightSmall, } from "@vercel/geistcn-assets/icons";
6
6
  import Link from "fumadocs-core/link";
7
7
  import { useTreeContext } from "fumadocs-ui/contexts/tree";
8
8
  import { useParams, usePathname } from "next/navigation";
9
+ import { useSize } from "phase/react";
9
10
  import { useEffect, useId, useLayoutEffect, useMemo, useRef, useState, } from "react";
10
11
  import { SearchButton } from "../controls";
11
12
  import { useGeistdocsSidebar } from "../sidebar";
12
- import { observeSidebarContainer } from "./sidebar-responsive";
13
+ import { SIDEBAR_DESKTOP_MIN_WIDTH } from "./sidebar-responsive";
13
14
  import { findActiveRootSection, getDescendantFolderIds, getInitialOpenFolderIds, getSidebarBadgeTone, getSidebarItemBadge, getSidebarNodeId, getSidebarRootGroups, getSidebarSectionItems, hasSeparateRootDisclosure, isExternalSidebarItem, isExternalSidebarUrl, } from "./sidebar-tree";
14
15
  const UNSAFE_ID_CHARACTERS = /[^a-zA-Z0-9_-]/g;
15
16
  const collectPageUrls = (nodes) => {
@@ -66,6 +67,10 @@ const getDomId = (prefix, id) => `${prefix}-${id.replace(UNSAFE_ID_CHARACTERS, "
66
67
  const getRootDisclosureLabel = (name) => typeof name === "string" || typeof name === "number"
67
68
  ? `Browse ${name}`
68
69
  : "Browse Section";
70
+ const updateSidebarFades = (nav) => {
71
+ nav.dataset.fadeTop = String(nav.scrollTop > 0);
72
+ nav.dataset.fadeBottom = String(nav.scrollTop + nav.clientHeight < nav.scrollHeight - 1);
73
+ };
69
74
  const scrollItemIntoView = (scrollContainer, item) => {
70
75
  const containerRect = scrollContainer.getBoundingClientRect();
71
76
  const itemRect = item.getBoundingClientRect();
@@ -126,18 +131,19 @@ const useOpenedFolders = (nodes, activeUrl, openFirstLevel, scope) => {
126
131
  };
127
132
  return { manualToggleRef, opened, toggleFolder };
128
133
  };
129
- const SidebarSeparatorRow = ({ depth, item, }) => (_jsxs("li", { className: cn("mt-4 flex items-center gap-2 px-2 pt-2 pb-1 text-gray-900 text-label-13 first:mt-0 [&_svg]:size-4", depth > 0 && "ml-3"), children: [item.icon ? _jsx("span", { className: "shrink-0", children: item.icon }) : null, _jsx("span", { className: "min-w-0 truncate", children: item.name })] }));
134
+ const SidebarSeparatorRow = ({ depth, item, }) => (_jsxs("li", { className: cn("mt-4 flex items-center gap-2 px-2 pt-2 pb-1 font-medium text-gray-900 text-label-13 first:mt-0 [&_svg]:size-4", depth > 0 && "ml-3"), children: [item.icon ? _jsx("span", { className: "shrink-0", children: item.icon }) : null, _jsx("span", { className: "min-w-0 truncate", children: item.name })] }));
130
135
  const SidebarTreeItems = ({ depth, nodes, parentPath, state, }) => (_jsx(_Fragment, { children: nodes.map((node, index) => (_jsx(SidebarTreeNode, { depth: depth, node: node, path: [...parentPath, index], state: state }, getSidebarNodeId(node, [...parentPath, index], state.idScope)))) }));
131
136
  const getSidebarRowTone = (isSelected, isGroup) => {
132
137
  if (isSelected) {
133
- return "bg-gray-200 text-gray-1000 active:bg-gray-300";
138
+ return "bg-gray-200 text-gray-1000";
134
139
  }
135
140
  if (isGroup) {
136
- return "text-gray-1000 hover:bg-gray-alpha-100 focus-visible:bg-gray-alpha-100 active:bg-gray-alpha-300";
141
+ return "text-gray-1000 hover:bg-gray-100 focus-visible:bg-gray-100";
137
142
  }
138
- return "text-gray-900 hover:bg-gray-alpha-100 hover:text-gray-1000 focus-visible:bg-gray-alpha-100 focus-visible:text-gray-1000 active:bg-gray-alpha-300";
143
+ return "text-gray-900 hover:bg-gray-100 hover:text-gray-1000 focus-visible:bg-gray-100 focus-visible:text-gray-1000";
139
144
  };
140
- const SidebarDisclosureIcon = ({ expanded }) => (_jsx(_Fragment, { children: expanded ? (_jsx(IconChevronDownSmall, { size: 16 })) : (_jsx(IconChevronRight, { size: 16 })) }));
145
+ const SidebarDisclosureIcon = ({ expanded }) => (_jsx(IconChevronRightSmall, { className: cn(expanded && "rotate-90"), size: 16 }));
146
+ const SidebarTrailingIcon = ({ children, className, }) => (_jsx("span", { className: cn("grid h-9 w-8 flex-none place-content-center text-gray-900", className), children: children }));
141
147
  const SidebarBadge = ({ label }) => label ? (_jsx("span", { className: cn("inline-flex h-6 max-w-24 shrink-0 items-center truncate rounded-full px-2 text-button-12", getSidebarBadgeTone(label)), children: label })) : null;
142
148
  const SidebarTreeNode = ({ depth, node, path, state, }) => {
143
149
  const nodeId = getSidebarNodeId(node, path, state.idScope);
@@ -154,11 +160,13 @@ const SidebarTreeNode = ({ depth, node, path, state, }) => {
154
160
  const menuId = getDomId(state.idPrefix, nodeId);
155
161
  const labelId = `${menuId}-label`;
156
162
  const rowClassName = cn("flex h-9 origin-left touch-manipulation flex-row items-center rounded-md pr-1 pl-2.5 motion-reduce:transition-none", getSidebarRowTone(isSelected, isGroup));
157
- const content = (_jsxs(_Fragment, { children: [node.icon ? (_jsx("span", { className: "shrink-0 [&_svg]:size-4", children: node.icon })) : null, _jsxs("span", { className: "flex min-w-0 flex-1 items-center gap-1.5 truncate text-button-14", children: [_jsx(SidebarBadge, { label: badge }), _jsx("span", { className: "min-w-0 flex-1 truncate", id: labelId, children: node.name }), isExternalSidebarItem(item) ? (_jsx(IconArrowUpRight, { className: "ml-auto size-4 shrink-0 text-gray-900" })) : null] })] }));
163
+ const content = (_jsxs(_Fragment, { children: [node.icon ? (_jsx("span", { className: "shrink-0 [&_svg]:size-4", children: node.icon })) : null, _jsxs("span", { className: cn("flex min-w-0 flex-1 items-center gap-1.5 truncate text-button-14", depth > 0 && "font-normal"), children: [_jsx(SidebarBadge, { label: badge }), _jsx("span", { className: "min-w-0 flex-1 truncate", id: labelId, children: node.name }), isExternalSidebarItem(item) ? (_jsx(SidebarTrailingIcon, { children: _jsx(IconArrowUpRightSmall, { size: 16 }) })) : null] })] }));
158
164
  const handleLinkClick = (event) => {
159
165
  state.onNavigate?.();
160
- if (opensOutsideCurrentPage(event, item?.external, item?.url ?? "") ||
161
- !(folder && hasChildren && (isSelected || !isExpanded))) {
166
+ if (opensOutsideCurrentPage(event, item?.external, item?.url ?? "")) {
167
+ return;
168
+ }
169
+ if (!(folder && hasChildren && (isSelected || !isExpanded))) {
162
170
  return;
163
171
  }
164
172
  state.toggleFolder(folder, path);
@@ -168,12 +176,12 @@ const SidebarTreeNode = ({ depth, node, path, state, }) => {
168
176
  primaryControl = (_jsx(Link, { "aria-current": isSelected ? "page" : undefined, className: cn(rowClassName, "min-w-0 flex-1 no-underline outline-none focus-visible:shadow-[var(--ds-focus-ring)]"), external: item.external, href: item.url, onClick: handleLinkClick, prefetch: true, children: content }));
169
177
  }
170
178
  else if (folder && hasChildren) {
171
- primaryControl = (_jsxs("button", { "aria-controls": menuId, "aria-expanded": isExpanded, className: cn(rowClassName, "w-full min-w-0 flex-1 cursor-pointer border-0 bg-transparent text-left outline-none focus-visible:shadow-[var(--ds-focus-ring)]"), onClick: () => state.toggleFolder(folder, path), type: "button", children: [content, _jsx("span", { className: "grid size-8 flex-none place-content-center text-gray-900", children: _jsx(SidebarDisclosureIcon, { expanded: isExpanded }) })] }));
179
+ primaryControl = (_jsxs("button", { "aria-controls": menuId, "aria-expanded": isExpanded, className: cn(rowClassName, "w-full min-w-0 flex-1 cursor-pointer border-0 bg-transparent text-left outline-none focus-visible:shadow-[var(--ds-focus-ring)]"), onClick: () => state.toggleFolder(folder, path), type: "button", children: [content, _jsx(SidebarTrailingIcon, { className: "-mr-1", children: _jsx(SidebarDisclosureIcon, { expanded: isExpanded }) })] }));
172
180
  }
173
181
  else {
174
182
  primaryControl = (_jsx("span", { className: cn(rowClassName, "min-w-0 flex-1"), children: content }));
175
183
  }
176
- return (_jsxs("li", { className: cn("relative flex w-full select-none flex-col items-stretch", depth > 0 && "pl-3"), children: [_jsxs("div", { className: "relative flex w-full items-center gap-px", children: [primaryControl, item && folder && hasChildren ? (_jsx("button", { "aria-controls": menuId, "aria-expanded": isExpanded, "aria-labelledby": labelId, className: "grid size-8 flex-none cursor-pointer touch-manipulation place-content-center rounded-md bg-transparent p-0 text-gray-900 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: () => state.toggleFolder(folder, path), type: "button", children: _jsx(SidebarDisclosureIcon, { expanded: isExpanded }) })) : null] }), folder && hasChildren && isExpanded ? (_jsx("ul", { className: "relative mt-px mb-1 flex w-full list-none flex-col gap-px p-0", id: menuId, children: _jsx(SidebarTreeItems, { depth: depth + 1, nodes: folder.children, parentPath: path, state: state }) })) : null] }));
184
+ return (_jsxs("li", { className: cn("relative flex w-full select-none flex-col items-stretch", depth > 0 && "pl-3"), children: [_jsxs("div", { className: "relative flex w-full items-center gap-px", children: [primaryControl, item && folder && hasChildren ? (_jsx("button", { "aria-controls": menuId, "aria-expanded": isExpanded, "aria-labelledby": labelId, className: "grid h-9 w-8 flex-none cursor-pointer touch-manipulation place-content-center rounded-md bg-transparent p-0 text-gray-900 hover:bg-gray-100 focus-visible:bg-gray-100 focus-visible:shadow-[var(--ds-focus-ring)] focus-visible:outline-none motion-reduce:transition-none", onClick: () => state.toggleFolder(folder, path), type: "button", children: _jsx(SidebarDisclosureIcon, { expanded: isExpanded }) })) : null] }), folder && hasChildren && isExpanded ? (_jsx("ul", { className: "relative mt-px mb-1 flex w-full list-none flex-col gap-px p-0", id: menuId, children: _jsx(SidebarTreeItems, { depth: depth + 1, nodes: folder.children, parentPath: path, state: state }) })) : null] }));
177
185
  };
178
186
  const SidebarTree = ({ activeUrl, idScope, nodes, onNavigate, openFirstLevel = false, scrollActive = false, visible = true, }) => {
179
187
  const generatedId = useId().replace(UNSAFE_ID_CHARACTERS, "");
@@ -194,7 +202,7 @@ const SidebarTree = ({ activeUrl, idScope, nodes, onNavigate, openFirstLevel = f
194
202
  const SidebarRootList = ({ activeSection, activeUrl, groups, onSelect, visible, }) => {
195
203
  const contentRef = useRef(null);
196
204
  useActiveItemScroll(contentRef, activeUrl, visible, activeSection?.$id ?? "root");
197
- return (_jsx("div", { className: "flex flex-col gap-4 px-2 pt-1 pb-2", ref: contentRef, children: groups.map((group) => (_jsxs("div", { className: "flex flex-col", children: [group.label || group.icon ? (_jsxs("div", { className: "flex items-center gap-2 px-2 pt-2 pb-1 text-gray-900 text-label-13 [&_svg]:size-4", children: [group.icon ? (_jsx("span", { className: "shrink-0", children: group.icon })) : null, _jsx("span", { className: "min-w-0 truncate", children: group.label })] })) : null, _jsx("ul", { className: "m-0 flex list-none flex-col gap-px p-0", children: group.items.map((section, index) => (_jsx(SidebarRootItem, { activeSection: activeSection, activeUrl: activeUrl, item: section, onSelect: onSelect }, getSidebarNodeId(section, [index])))) })] }, group.id))) }));
205
+ return (_jsx("div", { className: "flex flex-col gap-4 px-2 pt-1 pb-2", ref: contentRef, children: groups.map((group) => (_jsxs("div", { className: "flex flex-col", children: [group.label || group.icon ? (_jsxs("div", { className: "flex items-center gap-2 px-2 pt-2 pb-1 font-medium text-gray-900 text-label-13 [&_svg]:size-4", children: [group.icon ? (_jsx("span", { className: "shrink-0", children: group.icon })) : null, _jsx("span", { className: "min-w-0 truncate", children: group.label })] })) : null, _jsx("ul", { className: "m-0 flex list-none flex-col gap-px p-0", children: group.items.map((section, index) => (_jsx(SidebarRootItem, { activeSection: activeSection, activeUrl: activeUrl, item: section, onSelect: onSelect }, getSidebarNodeId(section, [index])))) })] }, group.id))) }));
198
206
  };
199
207
  const SidebarRootItem = ({ activeSection, activeUrl, item, onSelect, }) => {
200
208
  const folder = item.type === "folder" ? item : null;
@@ -204,10 +212,11 @@ const SidebarRootItem = ({ activeSection, activeUrl, item, onSelect, }) => {
204
212
  const separateDisclosure = hasSeparateRootDisclosure(item);
205
213
  const isCurrentPage = linkItem?.url === activeUrl;
206
214
  const isActive = item === activeSection || isCurrentPage;
215
+ const labelWeight = { folder: "font-medium", page: "font-normal" }[item.type];
207
216
  const className = cn("flex h-9 touch-manipulation items-center gap-2 rounded-md pr-2 pl-2.5 no-underline outline-none focus-visible:shadow-[var(--ds-focus-ring)] motion-reduce:transition-none", isActive
208
- ? "bg-gray-200 text-gray-1000 active:bg-gray-300"
209
- : "text-gray-900 hover:bg-gray-alpha-100 hover:text-gray-1000 active:bg-gray-alpha-300");
210
- const content = (_jsxs(_Fragment, { children: [item.icon ? (_jsx("span", { className: "shrink-0 [&_svg]:size-4", children: item.icon })) : null, _jsx(SidebarBadge, { label: badge }), _jsx("span", { className: "min-w-0 flex-1 truncate text-button-14", children: item.name }), isExternalSidebarItem(linkItem) ? (_jsx(IconArrowUpRight, { className: "size-4 shrink-0 text-gray-900" })) : null, opensSection && !separateDisclosure ? (_jsx(IconChevronRight, { className: "shrink-0 text-gray-900", size: 16 })) : null] }));
217
+ ? "bg-gray-200 text-gray-1000"
218
+ : "text-gray-900 hover:bg-gray-100 hover:text-gray-1000 focus-visible:bg-gray-100");
219
+ const content = (_jsxs(_Fragment, { children: [item.icon ? (_jsx("span", { className: "shrink-0 [&_svg]:size-4", children: item.icon })) : null, _jsx(SidebarBadge, { label: badge }), _jsx("span", { className: cn("min-w-0 flex-1 truncate text-button-14", labelWeight), children: item.name }), isExternalSidebarItem(linkItem) ? (_jsx(SidebarTrailingIcon, { children: _jsx(IconArrowUpRightSmall, { size: 16 }) })) : null, opensSection && !separateDisclosure ? (_jsx(SidebarTrailingIcon, { children: _jsx(IconChevronRightSmall, { size: 16 }) })) : null] }));
211
220
  let renderedItem;
212
221
  if (linkItem) {
213
222
  renderedItem = (_jsx(Link, { "aria-current": isCurrentPage ? "page" : undefined, className: cn(className, separateDisclosure && "min-w-0 flex-1"), "data-sidebar-active": isActive, external: linkItem.external, href: linkItem.url, onClick: folder && opensSection
@@ -224,9 +233,9 @@ const SidebarRootItem = ({ activeSection, activeUrl, item, onSelect, }) => {
224
233
  else {
225
234
  renderedItem = _jsx("span", { className: className, children: content });
226
235
  }
227
- return (_jsxs("li", { className: cn(separateDisclosure && "flex items-center gap-px"), children: [renderedItem, separateDisclosure ? (_jsx("button", { "aria-label": getRootDisclosureLabel(item.name), className: "grid size-8 flex-none cursor-pointer touch-manipulation place-content-center rounded-md bg-transparent p-0 text-gray-900 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: (event) => onSelect(item, event.currentTarget), type: "button", children: _jsx(IconChevronRight, { size: 16 }) })) : null] }));
236
+ return (_jsxs("li", { className: cn(separateDisclosure && "flex items-center gap-px"), children: [renderedItem, separateDisclosure ? (_jsx("button", { "aria-label": getRootDisclosureLabel(item.name), className: "grid size-8 flex-none cursor-pointer touch-manipulation place-content-center rounded-md bg-transparent p-0 text-gray-900 hover:bg-gray-100 focus-visible:bg-gray-100 focus-visible:shadow-[var(--ds-focus-ring)] focus-visible:outline-none motion-reduce:transition-none", onClick: (event) => onSelect(item, event.currentTarget), type: "button", children: _jsx(IconChevronRightSmall, { size: 16 }) })) : null] }));
228
237
  };
229
- const SidebarSectionHeader = ({ buttonRef, onBack, section, }) => (_jsx("div", { className: "mb-2 px-2 pt-1", children: _jsxs("button", { "aria-label": "Back to all documentation sections", className: "flex w-full cursor-pointer touch-manipulation flex-row items-center justify-between gap-1 rounded-md border-0 bg-transparent p-0 text-gray-900 hover:bg-gray-alpha-100 hover:text-gray-1000 focus-visible:bg-gray-alpha-100 focus-visible:text-gray-1000 focus-visible:shadow-[var(--ds-focus-ring)] focus-visible:outline-none active:bg-gray-alpha-300 motion-reduce:transition-none", onClick: onBack, ref: buttonRef, type: "button", children: [_jsx("span", { className: "grid size-9 flex-none place-content-center", children: _jsx(IconChevronRight, { className: "rotate-180", size: 16 }) }), _jsx("span", { className: "flex min-w-0 flex-1 items-center justify-center text-button-14", children: _jsx("span", { className: "truncate", children: section.name }) }), _jsx("span", { className: "size-9 flex-none" })] }) }));
238
+ const SidebarSectionHeader = ({ buttonRef, onBack, section, }) => (_jsx("div", { className: "mb-2 px-2 pt-1", children: _jsxs("button", { "aria-label": "Back to all documentation sections", className: "flex w-full cursor-pointer touch-manipulation flex-row items-center justify-between gap-1 rounded-md border-0 bg-transparent p-0 text-gray-900 hover:bg-gray-100 hover:text-gray-1000 focus-visible:bg-gray-100 focus-visible:text-gray-1000 focus-visible:shadow-[var(--ds-focus-ring)] focus-visible:outline-none motion-reduce:transition-none", onClick: onBack, ref: buttonRef, type: "button", children: [_jsx("span", { className: "grid size-9 flex-none place-content-center", children: _jsx(IconChevronRightSmall, { className: "rotate-180", size: 16 }) }), _jsx("span", { className: "flex min-w-0 flex-1 items-center justify-center text-button-14", children: _jsx("span", { className: "truncate", children: section.name }) }), _jsx("span", { className: "size-9 flex-none" })] }) }));
230
239
  const DesktopSectionsSidebar = ({ activeUrl, nodes, rootScope, top, }) => {
231
240
  const groups = useMemo(() => getSidebarRootGroups(nodes), [nodes]);
232
241
  const currentSection = useMemo(() => findActiveRootSection(nodes, activeUrl), [activeUrl, nodes]);
@@ -235,6 +244,14 @@ const DesktopSectionsSidebar = ({ activeUrl, nodes, rootScope, top, }) => {
235
244
  const [view, setView] = useState(currentSection ? "section" : "root");
236
245
  const [sectionRevealed, setSectionRevealed] = useState(view === "section");
237
246
  const navRef = useRef(null);
247
+ useSize({
248
+ onResize: () => {
249
+ if (navRef.current) {
250
+ updateSidebarFades(navRef.current);
251
+ }
252
+ },
253
+ ref: navRef,
254
+ });
238
255
  const returnFocusRef = useRef(null);
239
256
  const sectionHeaderRef = useRef(null);
240
257
  const shouldFocusRootRef = useRef(false);
@@ -260,17 +277,24 @@ const DesktopSectionsSidebar = ({ activeUrl, nodes, rootScope, top, }) => {
260
277
  if (!nav) {
261
278
  return;
262
279
  }
263
- const updateFades = () => {
264
- nav.dataset.fadeTop = String(nav.scrollTop > 0);
265
- nav.dataset.fadeBottom = String(nav.scrollTop + nav.clientHeight < nav.scrollHeight - 1);
280
+ const updateFades = () => updateSidebarFades(nav);
281
+ let frame;
282
+ const scheduleFadeUpdate = () => {
283
+ if (frame !== undefined) {
284
+ return;
285
+ }
286
+ frame = requestAnimationFrame(() => {
287
+ frame = undefined;
288
+ updateFades();
289
+ });
266
290
  };
267
- const resizeObserver = new ResizeObserver(updateFades);
268
291
  updateFades();
269
- nav.addEventListener("scroll", updateFades, { passive: true });
270
- resizeObserver.observe(nav);
292
+ nav.addEventListener("scroll", scheduleFadeUpdate, { passive: true });
271
293
  return () => {
272
- nav.removeEventListener("scroll", updateFades);
273
- resizeObserver.disconnect();
294
+ if (frame !== undefined) {
295
+ cancelAnimationFrame(frame);
296
+ }
297
+ nav.removeEventListener("scroll", scheduleFadeUpdate);
274
298
  };
275
299
  }, []);
276
300
  const sectionShown = view === "section" && sectionRevealed;
@@ -315,7 +339,15 @@ const MobileSidebar = ({ activeUrl, idScope, nodes, onOpenChange, open, top, })
315
339
  export const GeistdocsSidebar = ({ mode = "sections", showDesktop = true, top, }) => {
316
340
  const { root, full } = useTreeContext();
317
341
  const { isOpen, setIsOpen } = useGeistdocsSidebar();
318
- const containerMarkerRef = useRef(null);
342
+ const containerRef = useRef(null);
343
+ useSize({
344
+ onResize: ({ width }) => {
345
+ if (width >= SIDEBAR_DESKTOP_MIN_WIDTH) {
346
+ setIsOpen(false);
347
+ }
348
+ },
349
+ ref: containerRef,
350
+ });
319
351
  const pathname = usePathname();
320
352
  const previousPathname = useRef(pathname);
321
353
  const params = useParams();
@@ -331,12 +363,8 @@ export const GeistdocsSidebar = ({ mode = "sections", showDesktop = true, top, }
331
363
  previousPathname.current = pathname;
332
364
  }
333
365
  }, [pathname, setIsOpen]);
334
- useEffect(() => {
335
- const container = containerMarkerRef.current?.closest("[data-geistdocs-container]");
336
- if (!container) {
337
- return;
338
- }
339
- return observeSidebarContainer(container, () => setIsOpen(false));
340
- }, [setIsOpen]);
341
- return (_jsxs(_Fragment, { children: [_jsx("span", { hidden: true, ref: containerMarkerRef }), showDesktop ? (_jsx(DesktopSidebar, { activeUrl: activeUrl, mode: mode, nodes: root.children, rootScope: rootScope, top: top }, root.$id)) : null, _jsx(MobileSidebar, { activeUrl: activeUrl, idScope: rootScope, nodes: root.children, onOpenChange: setIsOpen, open: isOpen, top: top })] }));
366
+ return (_jsxs(_Fragment, { children: [_jsx("span", { hidden: true, ref: (marker) => {
367
+ containerRef.current =
368
+ marker?.closest("[data-geistdocs-container]") ?? null;
369
+ } }), showDesktop ? (_jsx(DesktopSidebar, { activeUrl: activeUrl, mode: mode, nodes: root.children, rootScope: rootScope, top: top }, root.$id)) : null, _jsx(MobileSidebar, { activeUrl: activeUrl, idScope: rootScope, nodes: root.children, onOpenChange: setIsOpen, open: isOpen, top: top })] }));
342
370
  };
@@ -1 +1 @@
1
- {"version":3,"file":"table-of-contents.d.ts","sourceRoot":"","sources":["../../src/internal/table-of-contents.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,UAAU,6BAA6B;IACrC,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,GAAG,EAAE,eAAe,CAAC;CACtB;AAED,eAAO,MAAM,wBAAwB,GAAI,0BAItC,6BAA6B,4CAqB/B,CAAC"}
1
+ {"version":3,"file":"table-of-contents.d.ts","sourceRoot":"","sources":["../../src/internal/table-of-contents.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,UAAU,6BAA6B;IACrC,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,GAAG,EAAE,eAAe,CAAC;CACtB;AAED,eAAO,MAAM,wBAAwB,GAAI,0BAItC,6BAA6B,4CAwB/B,CAAC"}
@@ -2,4 +2,4 @@
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { TOCScrollArea } from "fumadocs-ui/components/toc/index";
4
4
  import { TOCItems } from "./toc-items";
5
- export const GeistdocsTableOfContents = ({ footer, header, toc, }) => (_jsx("aside", { "aria-label": "Page navigation", className: "sticky top-(--fd-docs-row-1) hidden h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] w-(--fd-toc-width) flex-col pt-14 pr-4 pb-2 [grid-area:toc] xl:flex", id: "nd-toc", children: _jsxs("nav", { "aria-label": "On this page", className: "flex min-h-0 flex-1 flex-col", children: [header, toc.length > 0 ? (_jsxs(_Fragment, { children: [_jsx("p", { className: "mb-2 font-medium text-gray-1000 text-sm", children: "On this page" }), _jsx(TOCScrollArea, { className: "geistdocs-toc-scroll", children: _jsx(TOCItems, {}) })] })) : null, footer] }) }));
5
+ export const GeistdocsTableOfContents = ({ footer, header, toc, }) => (_jsx("aside", { "aria-label": "Page navigation", className: "sticky top-(--fd-docs-row-1) hidden h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] w-(--fd-toc-width) flex-col pt-14 pr-4 pb-2 [grid-area:toc] xl:flex", id: "nd-toc", children: _jsxs("nav", { "aria-label": "On this page", className: "ml-0.5 flex min-h-0 flex-1 flex-col", children: [header, toc.length > 0 ? (_jsxs(_Fragment, { children: [_jsx("p", { className: "mb-2 font-medium text-gray-1000 text-sm", children: "On this page" }), _jsx(TOCScrollArea, { className: "geistdocs-toc-scroll", children: _jsx(TOCItems, {}) })] })) : null, footer] }) }));
@@ -1 +1 @@
1
- {"version":3,"file":"toc-items.d.ts","sourceRoot":"","sources":["../../src/internal/toc-items.tsx"],"names":[],"mappings":"AASA,OAAO,EACL,KAAK,cAAc,EAKpB,MAAM,OAAO,CAAC;AAsCf,eAAO,MAAM,QAAQ,GAAI,yBAAyB,cAAc,CAAC,KAAK,CAAC,4CAiFtE,CAAC"}
1
+ {"version":3,"file":"toc-items.d.ts","sourceRoot":"","sources":["../../src/internal/toc-items.tsx"],"names":[],"mappings":"AASA,OAAO,EACL,KAAK,cAAc,EAKpB,MAAM,OAAO,CAAC;AAsCf,eAAO,MAAM,QAAQ,GAAI,yBAAyB,cAAc,CAAC,KAAK,CAAC,4CA2FtE,CAAC"}
@@ -40,6 +40,7 @@ export const TOCItems = ({ className, ...props }) => {
40
40
  }, ANCHOR_SCROLL_MS);
41
41
  }, []);
42
42
  useEffect(() => {
43
+ let frame;
43
44
  const syncFromHash = () => select(window.location.hash.slice(1) || null);
44
45
  const updateAtBottom = () => {
45
46
  const doc = document.documentElement;
@@ -50,21 +51,30 @@ export const TOCItems = ({ className, ...props }) => {
50
51
  // Any real scroll — wheel, touch, keyboard, or scrollbar drag — hands the
51
52
  // indicator back to viewport-based tracking, unless it is the programmatic
52
53
  // jump from a click/deep-link.
53
- const onScroll = () => {
54
- updateAtBottom();
55
- if (!ignoreScroll.current) {
56
- setSelected(null);
54
+ const scheduleScrollUpdate = () => {
55
+ if (frame !== undefined) {
56
+ return;
57
57
  }
58
+ frame = requestAnimationFrame(() => {
59
+ frame = undefined;
60
+ updateAtBottom();
61
+ if (!ignoreScroll.current) {
62
+ setSelected(null);
63
+ }
64
+ });
58
65
  };
59
66
  syncFromHash();
60
67
  updateAtBottom();
61
68
  window.addEventListener("hashchange", syncFromHash);
62
- window.addEventListener("scroll", onScroll, { passive: true });
69
+ window.addEventListener("scroll", scheduleScrollUpdate, { passive: true });
63
70
  window.addEventListener("resize", updateAtBottom);
64
71
  return () => {
65
72
  clearTimeout(ignoreTimer.current);
73
+ if (frame !== undefined) {
74
+ cancelAnimationFrame(frame);
75
+ }
66
76
  window.removeEventListener("hashchange", syncFromHash);
67
- window.removeEventListener("scroll", onScroll);
77
+ window.removeEventListener("scroll", scheduleScrollUpdate);
68
78
  window.removeEventListener("resize", updateAtBottom);
69
79
  };
70
80
  }, [select]);
@@ -10,10 +10,10 @@ export function DropdownMenuTrigger(props) {
10
10
  return (_jsx(DropdownMenuPrimitive.Trigger, { "data-slot": "dropdown-menu-trigger", ...props }));
11
11
  }
12
12
  export function DropdownMenuContent({ className, sideOffset = 4, ...props }) {
13
- return (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { className: cn("data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 material-menu z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-y-auto overflow-x-hidden overscroll-contain p-1 text-gray-1000 data-[state=closed]:animate-out motion-reduce:animate-none", className), "data-slot": "dropdown-menu-content", sideOffset: sideOffset, ...props }) }));
13
+ return (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { className: cn("data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 material-menu z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-y-auto overflow-x-hidden overscroll-contain p-(--ds-popover-padding) text-gray-1000 data-[state=closed]:animate-out motion-reduce:animate-none", className), "data-slot": "dropdown-menu-content", sideOffset: sideOffset, ...props }) }));
14
14
  }
15
15
  export function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
16
- return (_jsx(DropdownMenuPrimitive.Item, { className: cn("data-[variant=destructive]:*:[svg]:!text-red-800 relative flex cursor-default touch-manipulation select-none items-center gap-2 rounded-sm px-2 py-1.5 text-label-14 outline-hidden focus:bg-gray-100 focus:text-gray-1000 data-[disabled]:pointer-events-none data-[inset]:pl-8 data-[variant=destructive]:text-red-800 data-[disabled]:opacity-50 data-[variant=destructive]:focus:bg-red-800/10 data-[variant=destructive]:focus:text-red-800 dark:data-[variant=destructive]:focus:bg-red-800/20 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-gray-900 [&_svg]:pointer-events-none [&_svg]:shrink-0", className), "data-inset": inset, "data-slot": "dropdown-menu-item", "data-variant": variant, ...props }));
16
+ return (_jsx(DropdownMenuPrimitive.Item, { className: cn("data-[variant=destructive]:*:[svg]:!text-red-800 relative flex cursor-default touch-manipulation select-none items-center gap-2 rounded-(--ds-popover-row-radius) px-2 py-1.5 text-label-14 outline-hidden focus:bg-gray-100 focus:text-gray-1000 data-[disabled]:pointer-events-none data-[inset]:pl-8 data-[variant=destructive]:text-red-800 data-[disabled]:opacity-50 data-[variant=destructive]:focus:bg-red-800/10 data-[variant=destructive]:focus:text-red-800 dark:data-[variant=destructive]:focus:bg-red-800/20 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-gray-900 [&_svg]:pointer-events-none [&_svg]:shrink-0", className), "data-inset": inset, "data-slot": "dropdown-menu-item", "data-variant": variant, ...props }));
17
17
  }
18
18
  export function DropdownMenuLabel({ className, inset, ...props }) {
19
19
  return (_jsx(DropdownMenuPrimitive.Label, { className: cn("px-2 py-1.5 font-medium text-sm data-[inset]:pl-8", className), "data-inset": inset, "data-slot": "dropdown-menu-label", ...props }));
@@ -22,20 +22,20 @@ export function DropdownMenuSeparator({ className, ...props }) {
22
22
  return (_jsx(DropdownMenuPrimitive.Separator, { className: cn("-mx-1 my-1 h-px bg-gray-alpha-400", className), "data-slot": "dropdown-menu-separator", ...props }));
23
23
  }
24
24
  export function DropdownMenuCheckboxItem({ className, children, checked, ...props }) {
25
- return (_jsxs(DropdownMenuPrimitive.CheckboxItem, { checked: checked, className: cn("relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden focus:bg-gray-100 focus:text-gray-1000 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", className), "data-slot": "dropdown-menu-checkbox-item", ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(IconCheck, { className: "size-4" }) }) }), children] }));
25
+ return (_jsxs(DropdownMenuPrimitive.CheckboxItem, { checked: checked, className: cn("relative flex cursor-default select-none items-center gap-2 rounded-(--ds-popover-row-radius) py-1.5 pr-2 pl-8 text-sm outline-hidden focus:bg-gray-100 focus:text-gray-1000 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", className), "data-slot": "dropdown-menu-checkbox-item", ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(IconCheck, { className: "size-4" }) }) }), children] }));
26
26
  }
27
27
  export function DropdownMenuRadioGroup(props) {
28
28
  return (_jsx(DropdownMenuPrimitive.RadioGroup, { "data-slot": "dropdown-menu-radio-group", ...props }));
29
29
  }
30
30
  export function DropdownMenuRadioItem({ className, children, ...props }) {
31
- return (_jsxs(DropdownMenuPrimitive.RadioItem, { className: cn("relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden focus:bg-gray-100 focus:text-gray-1000 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", className), "data-slot": "dropdown-menu-radio-item", ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(IconCircle, { className: "size-2 fill-current" }) }) }), children] }));
31
+ return (_jsxs(DropdownMenuPrimitive.RadioItem, { className: cn("relative flex cursor-default select-none items-center gap-2 rounded-(--ds-popover-row-radius) py-1.5 pr-2 pl-8 text-sm outline-hidden focus:bg-gray-100 focus:text-gray-1000 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", className), "data-slot": "dropdown-menu-radio-item", ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(IconCircle, { className: "size-2 fill-current" }) }) }), children] }));
32
32
  }
33
33
  export function DropdownMenuSub(props) {
34
34
  return _jsx(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
35
35
  }
36
36
  export function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
37
- return (_jsxs(DropdownMenuPrimitive.SubTrigger, { className: cn("flex cursor-default touch-manipulation select-none items-center gap-2 rounded-sm px-2 py-1.5 text-label-14 outline-hidden focus:bg-gray-100 focus:text-gray-1000 data-[state=open]:bg-gray-100 data-[inset]:pl-8 data-[state=open]:text-gray-1000 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-gray-900 [&_svg]:pointer-events-none [&_svg]:shrink-0", className), "data-inset": inset, "data-slot": "dropdown-menu-sub-trigger", ...props, children: [children, _jsx(IconChevronRight, { className: "ml-auto size-4" })] }));
37
+ return (_jsxs(DropdownMenuPrimitive.SubTrigger, { className: cn("flex cursor-default touch-manipulation select-none items-center gap-2 rounded-(--ds-popover-row-radius) px-2 py-1.5 text-label-14 outline-hidden focus:bg-gray-100 focus:text-gray-1000 data-[state=open]:bg-gray-100 data-[inset]:pl-8 data-[state=open]:text-gray-1000 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-gray-900 [&_svg]:pointer-events-none [&_svg]:shrink-0", className), "data-inset": inset, "data-slot": "dropdown-menu-sub-trigger", ...props, children: [children, _jsx(IconChevronRight, { className: "ml-auto size-4" })] }));
38
38
  }
39
39
  export function DropdownMenuSubContent({ className, ...props }) {
40
- return (_jsx(DropdownMenuPrimitive.SubContent, { className: cn("data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 material-menu z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden overscroll-contain p-1 text-gray-1000 data-[state=closed]:animate-out motion-reduce:animate-none", className), "data-slot": "dropdown-menu-sub-content", ...props }));
40
+ return (_jsx(DropdownMenuPrimitive.SubContent, { className: cn("data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 material-menu z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden overscroll-contain p-(--ds-popover-padding) text-gray-1000 data-[state=closed]:animate-out motion-reduce:animate-none", className), "data-slot": "dropdown-menu-sub-content", ...props }));
41
41
  }
@@ -15,7 +15,7 @@ export function NavigationMenuItem({ className, ...props }) {
15
15
  }
16
16
  export const navigationMenuTriggerStyle = cva("group relative inline-flex w-max items-center justify-center gap-1 px-3 text-gray-900 text-sm transition-colors hover:text-gray-1000 focus:text-gray-1000 focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:text-gray-1000 data-[state=open]:text-gray-1000");
17
17
  export function NavigationMenuTrigger({ className, children, ...props }) {
18
- return (_jsxs(NavigationMenuPrimitive.Trigger, { className: cn(navigationMenuTriggerStyle(), "group", className), "data-slot": "navigation-menu-trigger", ...props, children: [children, _jsx(IconChevronDownSmall, { "aria-hidden": "true", className: "ease relative top-px size-3.5 text-gray-900 transition-all duration-200 group-hover:text-gray-1000 group-data-[state=open]:rotate-180" }), _jsx("div", { className: "absolute inset-x-0 bottom-0 z-50 -mx-12 hidden h-[18px] group-data-[state=open]:flex" })] }));
18
+ return (_jsxs(NavigationMenuPrimitive.Trigger, { className: cn(navigationMenuTriggerStyle(), "group", className), "data-slot": "navigation-menu-trigger", ...props, children: [children, _jsx(IconChevronDownSmall, { "aria-hidden": "true", className: "ease relative top-px size-3.5 text-gray-900 transition-[transform,color] duration-200 group-hover:text-gray-1000 group-data-[state=open]:rotate-180" }), _jsx("div", { className: "absolute inset-x-0 bottom-0 z-50 -mx-12 hidden h-[18px] group-data-[state=open]:flex" })] }));
19
19
  }
20
20
  export function NavigationMenuContent({ className, ...props }) {
21
21
  return (_jsx(NavigationMenuPrimitive.Content, { className: cn("data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out top-0 left-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out md:absolute md:w-auto", "group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 **:data-[slot=navigation-menu-link]:focus:outline-none **:data-[slot=navigation-menu-link]:focus:ring-0 group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:bg-background-100 group-data-[viewport=false]/navigation-menu:text-gray-1000 group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in", className), "data-slot": "navigation-menu-content", ...props }));
@@ -27,5 +27,5 @@ export function NavigationMenuLink({ className, ...props }) {
27
27
  return (_jsx(NavigationMenuPrimitive.Link, { className: cn("block w-full text-sm outline-none transition-colors", className), "data-slot": "navigation-menu-link", ...props }));
28
28
  }
29
29
  export function NavigationMenuIndicator({ className, ...props }) {
30
- return (_jsx(NavigationMenuPrimitive.Indicator, { className: cn("data-[state=hidden]:fade-out data-[state=visible]:fade-in top-[70%] z-[1] flex items-end justify-center overflow-hidden transition-all duration-200 data-[state=hidden]:animate-out data-[state=visible]:animate-in", className), "data-slot": "navigation-menu-indicator", ...props, children: _jsx("div", { className: "relative top-[6.5px] size-4 rotate-45 rounded-tl-sm border border-gray-200 border-r-0 border-b-0 bg-white" }) }));
30
+ return (_jsx(NavigationMenuPrimitive.Indicator, { className: cn("data-[state=hidden]:fade-out data-[state=visible]:fade-in top-[70%] z-[1] flex items-end justify-center overflow-hidden transition-[transform,opacity] duration-200 data-[state=hidden]:animate-out data-[state=visible]:animate-in", className), "data-slot": "navigation-menu-indicator", ...props, children: _jsx("div", { className: "relative top-[6.5px] size-4 rotate-45 rounded-tl-sm border border-gray-200 border-r-0 border-b-0 bg-white" }) }));
31
31
  }
@@ -1 +1 @@
1
- {"version":3,"file":"use-mobile.d.ts","sourceRoot":"","sources":["../../src/internal/use-mobile.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,WAAW,eAgBvB,CAAC"}
1
+ {"version":3,"file":"use-mobile.d.ts","sourceRoot":"","sources":["../../src/internal/use-mobile.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,WAAW,eAEvB,CAAC"}
@@ -1,16 +1,6 @@
1
1
  "use client";
2
- import { useEffect, useState } from "react";
2
+ import { useMediaQuery } from "phase/react";
3
3
  const MOBILE_BREAKPOINT = 768;
4
4
  export const useIsMobile = () => {
5
- const [isMobile, setIsMobile] = useState(undefined);
6
- useEffect(() => {
7
- const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
8
- const onChange = () => {
9
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
10
- };
11
- mql.addEventListener("change", onChange);
12
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
13
- return () => mql.removeEventListener("change", onChange);
14
- }, []);
15
- return !!isMobile;
5
+ return useMediaQuery(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
16
6
  };
package/dist/layout.d.ts CHANGED
@@ -3,6 +3,7 @@ import type { ComponentProps, ReactNode } from "react";
3
3
  import type { GeistdocsConfig } from "./config";
4
4
  import { type GeistdocsSidebarMode } from "./sidebar";
5
5
  export declare const GeistdocsProvider: (props: import("./internal/provider-client").GeistdocsProviderProps) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const GeistdocsThemeScript: () => import("react/jsx-runtime").JSX.Element;
6
7
  interface GeistdocsDocsLayoutProps {
7
8
  children: ReactNode;
8
9
  config: Pick<GeistdocsConfig, "defaultLanguage" | "translations">;
@@ -1 +1 @@
1
- {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../src/layout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAIhD,OAAO,EAAE,KAAK,oBAAoB,EAA4B,MAAM,WAAW,CAAC;AAEhF,eAAO,MAAM,iBAAiB,iHAA0B,CAAC;AAEzD,UAAU,wBAAwB;IAChC,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,iBAAiB,GAAG,cAAc,CAAC,CAAC;IAClE,cAAc,CAAC,EAAE,cAAc,CAAC,OAAO,kBAAkB,CAAC,CAAC,gBAAgB,CAAC,CAAC;IAC7E,WAAW,CAAC,EAAE,oBAAoB,CAAC;IACnC,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,IAAI,EAAE,cAAc,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;CACzD;AAED,eAAO,MAAM,mBAAmB,GAAI,sEAOjC,wBAAwB,4CAkC1B,CAAC"}
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../src/layout.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAIhD,OAAO,EAAE,KAAK,oBAAoB,EAA4B,MAAM,WAAW,CAAC;AAEhF,eAAO,MAAM,iBAAiB,iHAA0B,CAAC;AAEzD,eAAO,MAAM,oBAAoB,+CAEhC,CAAC;AAEF,UAAU,wBAAwB;IAChC,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,iBAAiB,GAAG,cAAc,CAAC,CAAC;IAClE,cAAc,CAAC,EAAE,cAAc,CAAC,OAAO,kBAAkB,CAAC,CAAC,gBAAgB,CAAC,CAAC;IAC7E,WAAW,CAAC,EAAE,oBAAoB,CAAC;IACnC,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,IAAI,EAAE,cAAc,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;CACzD;AAED,eAAO,MAAM,mBAAmB,GAAI,sEAOjC,wBAAwB,4CAkC1B,CAAC"}
package/dist/layout.js CHANGED
@@ -1,10 +1,12 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { GeistThemeScript } from "@vercel/geistcn/core";
2
3
  import { DocsLayout as FumadocsDocsLayout } from "fumadocs-ui/layouts/docs";
3
4
  import { createGeistdocsI18n } from "./internal/i18n";
4
5
  import { GeistdocsProvider as GeistdocsProviderClient } from "./internal/provider-client";
5
6
  import { GeistdocsSidebar } from "./internal/sidebar";
6
7
  import { GeistdocsSidebarProvider } from "./sidebar";
7
8
  export const GeistdocsProvider = GeistdocsProviderClient;
9
+ export const GeistdocsThemeScript = () => (_jsx(GeistThemeScript, { storageKey: "geistdocs-theme" }));
8
10
  export const GeistdocsDocsLayout = ({ config, containerProps, sidebarMode, sidebarTop, tree, children, }) => {
9
11
  const { i18n } = createGeistdocsI18n(config);
10
12
  return (_jsx(GeistdocsSidebarProvider, { children: _jsx(FumadocsDocsLayout, { containerProps: {
package/dist/mdx.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"mdx.d.ts","sourceRoot":"","sources":["../src/mdx.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAoB/C,OAAO,EAGL,KAAK,4BAA4B,IAAI,mBAAmB,EAGzD,MAAM,iBAAiB,CAAC;AAEzB,eAAO,MAAM,2BAA2B,8EAAe,CAAC;AACxD,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAAoB,CAAC;AAC5D,eAAO,MAAM,mBAAmB;;;;;;;gCAAa,CAAC;AAC9C,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;CAAa,CAAC;AAC1C,MAAM,MAAM,4BAA4B,GAAG,mBAAmB,CAAC;AAI/D,MAAM,MAAM,sBAAsB,GAAG,aAAa,CAAC;AAEnD,eAAO,MAAM,yBAAyB,GACpC,aAAa,sBAAsB,KAClC,sBA+CD,CAAC;AAEH,eAAO,MAAM,mBAAmB,GAC9B,aAAa,sBAAsB,KAClC,sBAA+D,CAAC;AAEnE,eAAO,MAAM,2BAA2B,GACtC,GAAG,eAAe,KAAK,CAAC,sBAAsB,GAAG,SAAS,CAAC,KAC1D,sBACkD,CAAC"}
1
+ {"version":3,"file":"mdx.d.ts","sourceRoot":"","sources":["../src/mdx.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAsB/C,OAAO,EAGL,KAAK,4BAA4B,IAAI,mBAAmB,EAGzD,MAAM,iBAAiB,CAAC;AAEzB,eAAO,MAAM,2BAA2B,8EAAe,CAAC;AACxD,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAAoB,CAAC;AAC5D,eAAO,MAAM,mBAAmB;;;;;;;gCAAa,CAAC;AAC9C,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;CAAa,CAAC;AAC1C,MAAM,MAAM,4BAA4B,GAAG,mBAAmB,CAAC;AAE/D,MAAM,MAAM,sBAAsB,GAAG,aAAa,CAAC;AAEnD,eAAO,MAAM,yBAAyB,GACpC,aAAa,sBAAsB,KAClC,sBAiDD,CAAC;AAEH,eAAO,MAAM,mBAAmB,GAC9B,aAAa,sBAAsB,KAClC,sBAA+D,CAAC;AAEnE,eAAO,MAAM,2BAA2B,GACtC,GAAG,eAAe,KAAK,CAAC,sBAAsB,GAAG,SAAS,CAAC,KAC1D,sBACkD,CAAC"}
package/dist/mdx.js CHANGED
@@ -1,6 +1,5 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cn } from "@vercel/geistcn/utils";
3
- import { IconArrowUpRightSmall } from "@vercel/geistcn-assets/icons";
4
3
  import { TypeTable } from "fumadocs-ui/components/type-table";
5
4
  import defaultMdxComponents from "fumadocs-ui/mdx";
6
5
  import { Blockquote } from "./components/blockquote";
@@ -8,7 +7,9 @@ import { Callout, CalloutContainer, CalloutDescription, CalloutTitle, } from "./
8
7
  import { CodeBlock } from "./components/code-block";
9
8
  import { CodeBlockTab, CodeBlockTabs, CodeBlockTabsList, CodeBlockTabsTrigger, CompactCodeBlockTabs, } from "./components/code-block-tabs";
10
9
  import { CopyPrompt } from "./components/copy-prompt";
10
+ import { Heading } from "./components/heading";
11
11
  import { Mermaid } from "./components/mermaid";
12
+ import { Table } from "./components/table";
12
13
  import { Video } from "./components/video";
13
14
  import { LocalizedLink } from "./internal/localized-link";
14
15
  import { geistdocsFrontmatterSchema as frontmatterSchema, geistdocsMetaSchema as metaSchema, geistShikiTheme as shikiTheme, defineGeistdocsSourceConfig as sourceConfig, } from "./source-config";
@@ -16,12 +17,18 @@ export const defineGeistdocsSourceConfig = sourceConfig;
16
17
  export const geistdocsFrontmatterSchema = frontmatterSchema;
17
18
  export const geistdocsMetaSchema = metaSchema;
18
19
  export const geistShikiTheme = shikiTheme;
19
- const HTTP_URL = /^https?:\/\//;
20
20
  export const getGeistdocsMDXComponents = (components) => ({
21
21
  ...defaultMdxComponents,
22
+ h1: (props) => _jsx(Heading, { as: "h1", ...props }),
23
+ h2: (props) => _jsx(Heading, { as: "h2", ...props }),
24
+ h3: (props) => _jsx(Heading, { as: "h3", ...props }),
25
+ h4: (props) => _jsx(Heading, { as: "h4", ...props }),
26
+ h5: (props) => _jsx(Heading, { as: "h5", ...props }),
27
+ h6: (props) => _jsx(Heading, { as: "h6", ...props }),
22
28
  pre: CodeBlock,
23
29
  blockquote: Blockquote,
24
- a: ({ children, className, href, ...props }) => typeof href === "string" && href.startsWith("/") ? (_jsx(LocalizedLink, { className: cn("font-normal text-gray-1000! underline decoration-1 decoration-gray-700 underline-offset-4 hover:text-gray-1000! hover:decoration-gray-1000 hover:opacity-100!", className), href: href, ...props, children: children })) : (_jsxs("a", { className: cn("font-normal text-gray-1000! underline decoration-1 decoration-gray-700 underline-offset-4 hover:text-gray-1000! hover:decoration-gray-1000 hover:opacity-100!", className), href: href, ...props, children: [children, typeof href === "string" && HTTP_URL.test(href) ? (_jsx("span", { className: "inline-flex -translate-y-1 align-text-bottom", children: _jsx(IconArrowUpRightSmall, { size: 16 }) })) : null] })),
30
+ table: Table,
31
+ a: ({ children, className, href, ...props }) => typeof href === "string" && href.startsWith("/") ? (_jsx(LocalizedLink, { className: cn("font-normal text-gray-1000! underline decoration-1 decoration-gray-700 underline-offset-4 hover:text-gray-1000! hover:decoration-gray-1000 hover:opacity-100!", className), href: href, ...props, children: children })) : (_jsx("a", { className: cn("font-normal text-gray-1000! underline decoration-1 decoration-gray-700 underline-offset-4 hover:text-gray-1000! hover:decoration-gray-1000 hover:opacity-100!", className), href: href, ...props, children: children })),
25
32
  CodeBlockTabs,
26
33
  CompactCodeBlockTabs,
27
34
  CodeBlockTabsList,
@@ -1 +1 @@
1
- {"version":3,"file":"docs.d.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EAAE,MAAM,EAAE,CAAA;SAAE,CAAC,CAAC;KACpD,KAAG,OAAO,CAAC,QAAQ,CAAC;CAwDtB,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;CAA4B,CAAC"}
@@ -1,6 +1,5 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { cn } from "@vercel/geistcn/utils";
3
- import { IconArrowUpRightSmall } from "@vercel/geistcn-assets/icons";
4
3
  import Link from "fumadocs-core/link";
5
4
  import { DocsBody as FumadocsDocsBody, DocsDescription as FumadocsDocsDescription, DocsPage as FumadocsDocsPage, DocsTitle as FumadocsDocsTitle, } from "fumadocs-ui/layouts/docs/page";
6
5
  import { createRelativeLink } from "fumadocs-ui/mdx";
@@ -19,7 +18,7 @@ import { getPageRobots, } from "../page-visibility";
19
18
  const HTTP_URL = /^https?:\/\//;
20
19
  const PrefetchedDocsLink = ({ children, className, href, ...props }) => {
21
20
  const external = typeof href === "string" && HTTP_URL.test(href);
22
- return (_jsxs(Link, { ...props, className: cn("font-normal text-gray-1000! underline decoration-1 decoration-gray-700 underline-offset-4 hover:text-gray-1000! hover:decoration-gray-1000 hover:opacity-100!", className), href: href, prefetch: !external, children: [children, external ? (_jsx("span", { className: "inline-flex -translate-y-1 align-text-bottom", children: _jsx(IconArrowUpRightSmall, { size: 16 }) })) : null] }));
21
+ return (_jsx(Link, { ...props, className: cn("font-normal text-gray-1000! underline decoration-1 decoration-gray-700 underline-offset-4 hover:text-gray-1000! hover:decoration-gray-1000 hover:opacity-100!", className), href: href, prefetch: !external, children: children }));
23
22
  };
24
23
  export const resolvePageMarkdownUrl = (options) => resolveInternalPageMarkdownUrl(options);
25
24
  const DocsTitle = ({ className, ...props }) => (_jsx(FumadocsDocsTitle, { className: cn("mb-4 text-balance", className), ...props }));
@@ -107,7 +106,10 @@ export const createDocsPage = ({ config, source, mdx, pageActions = createIntern
107
106
  single: true,
108
107
  ...tableOfContent,
109
108
  component: tocComponent,
110
- }, tableOfContentPopover: tableOfContentPopover, toc: data.toc, children: [renderTop?.({
109
+ }, tableOfContentPopover: {
110
+ enabled: false,
111
+ ...tableOfContentPopover,
112
+ }, toc: data.toc, children: [renderTop?.({
111
113
  data,
112
114
  markdown: markdown ?? "",
113
115
  markdownUrl,
@@ -29,7 +29,7 @@ interface CreateChatRouteOptions {
29
29
  * Accepts any AI SDK `LanguageModel`, including AI Gateway model strings
30
30
  * such as `"xai/grok-4.5"`. Ignored in proxy and eve agent modes, where
31
31
  * the external service selects the model. Defaults to
32
- * `"openai/gpt-4.1-mini"`.
32
+ * `"openai/gpt-5.6-sol"`.
33
33
  */
34
34
  model?: LanguageModel;
35
35
  proxy?: ChatProxyConfig;
@@ -5,7 +5,7 @@ import { z } from "zod";
5
5
  import { getPublicPath } from "../config";
6
6
  import { buildEveAgentTranscript, capLastUserMessageText, getEveAgentSessionHandle, resolveEveAgentUrl, runEveAgentTurn, } from "../internal/eve-agent";
7
7
  import { isPageVisibleForSurface } from "../page-visibility";
8
- const DEFAULT_CHAT_MODEL = "openai/gpt-4.1-mini";
8
+ const DEFAULT_CHAT_MODEL = "openai/gpt-5.6-sol";
9
9
  const MAX_CONTEXT_CHARS = 1500;
10
10
  const MAX_EVE_AGENT_MESSAGE_CHARS = 4000;
11
11
  const MAX_PROXY_RELATED_PAGES = 5;
package/dist/versions.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { cn } from "@vercel/geistcn/utils";
4
- import { IconArchive, IconBox, IconCheck, IconChevronDown, } from "@vercel/geistcn-assets/icons";
4
+ import { IconArchive, IconBox, IconCheck, IconChevronDownSmall, } from "@vercel/geistcn-assets/icons";
5
5
  import { usePathname, useRouter } from "next/navigation";
6
6
  import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from "./internal/ui/dropdown-menu";
7
7
  import { resolveVersionSwitchPath, } from "./internal/version-paths.js";
@@ -73,7 +73,7 @@ export const GeistdocsRouteSelect = ({ ariaLabel = "Select route", className, cu
73
73
  const currentDescription = currentItem
74
74
  ? getDescription({ active: true, item: currentItem })
75
75
  : null;
76
- return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs("button", { "aria-label": ariaLabel, className: cn("group flex w-full items-center gap-2 rounded-md px-2 py-2 text-left outline-none transition-colors duration-150 ease-[cubic-bezier(0.175,0.885,0.32,1.1)] hover:bg-gray-alpha-100 focus-visible:shadow-[var(--ds-focus-ring)] active:bg-gray-alpha-300 data-[state=open]:bg-gray-alpha-100 motion-reduce:transition-none", className), type: "button", children: [currentItem ? renderIcon({ active: true, item: currentItem }) : null, _jsxs("span", { className: "min-w-0 flex-1", children: [_jsx("span", { className: "block truncate text-button-14 text-gray-1000", children: currentItem?.label ?? currentId }), currentDescription ? (_jsx("span", { className: "block truncate text-gray-900 text-label-13", children: currentDescription })) : null] }), _jsx(IconChevronDown, { className: "size-4 shrink-0 text-gray-900 transition-transform duration-150 ease-[cubic-bezier(0.175,0.885,0.32,1.1)] group-data-[state=open]:rotate-180 motion-reduce:transition-none" })] }) }), _jsx(DropdownMenuContent, { align: "start", className: "w-(--radix-dropdown-menu-trigger-width) min-w-64 rounded-xl bg-background-100 p-1 shadow-(--ds-shadow-menu)", children: items.map((item) => {
76
+ return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs("button", { "aria-label": ariaLabel, className: cn("group flex w-full items-center gap-2 rounded-md px-2 py-2 text-left outline-none transition-colors duration-150 ease-[cubic-bezier(0.175,0.885,0.32,1.1)] hover:bg-gray-alpha-100 focus-visible:shadow-[var(--ds-focus-ring)] active:bg-gray-alpha-300 data-[state=open]:bg-gray-alpha-100 motion-reduce:transition-none", className), type: "button", children: [currentItem ? renderIcon({ active: true, item: currentItem }) : null, _jsxs("span", { className: "min-w-0 flex-1", children: [_jsx("span", { className: "block truncate text-button-14 text-gray-1000", children: currentItem?.label ?? currentId }), currentDescription ? (_jsx("span", { className: "block truncate text-gray-900 text-label-13", children: currentDescription })) : null] }), _jsx(IconChevronDownSmall, { className: "size-4 shrink-0 text-gray-900 transition-transform duration-150 ease-[cubic-bezier(0.175,0.885,0.32,1.1)] group-data-[state=open]:rotate-180 motion-reduce:transition-none" })] }) }), _jsx(DropdownMenuContent, { align: "start", className: "w-(--radix-dropdown-menu-trigger-width) min-w-64 rounded-xl bg-background-100 p-1 shadow-(--ds-shadow-menu)", children: items.map((item) => {
77
77
  const active = item.id === currentId;
78
78
  const description = getDescription({ active, item });
79
79
  return (_jsxs(DropdownMenuItem, { "aria-current": active ? "page" : undefined, className: "flex cursor-pointer items-center gap-2 rounded-md px-2 py-2", onSelect: () => navigateToItem(item), children: [renderIcon({ active, item }), _jsxs("span", { className: "min-w-0 flex-1", children: [_jsx("span", { className: "block truncate text-button-14 text-gray-1000", children: item.label }), description ? (_jsx("span", { className: "block truncate text-gray-900 text-label-13", children: description })) : null] }), active ? _jsx(IconCheck, { className: "size-4 text-blue-900" }) : null] }, item.id));
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.25.1-canary.c58830e so agents can understand the installed package without web access.
3
+ These docs are bundled with `@vercel/geistdocs` 1.25.1-canary.eec231d 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