@vercel/geistdocs 1.25.1-canary.9556d32 → 1.25.1-canary.984aaa9

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 (49) hide show
  1. package/dist/cli/index.js +1 -1
  2. package/dist/components/blockquote.d.ts +3 -0
  3. package/dist/components/blockquote.d.ts.map +1 -0
  4. package/dist/components/blockquote.js +3 -0
  5. package/dist/components/callout.d.ts +13 -10
  6. package/dist/components/callout.d.ts.map +1 -1
  7. package/dist/components/callout.js +6 -6
  8. package/dist/components/code-block-tabs.d.ts +5 -2
  9. package/dist/components/code-block-tabs.d.ts.map +1 -1
  10. package/dist/components/code-block-tabs.js +29 -4
  11. package/dist/components/code-block.d.ts +1 -1
  12. package/dist/components/code-block.d.ts.map +1 -1
  13. package/dist/components/code-block.js +27 -2
  14. package/dist/components/copy-prompt.d.ts +2 -1
  15. package/dist/components/copy-prompt.d.ts.map +1 -1
  16. package/dist/components/copy-prompt.js +2 -2
  17. package/dist/components/heading.d.ts +7 -0
  18. package/dist/components/heading.d.ts.map +1 -0
  19. package/dist/components/heading.js +14 -0
  20. package/dist/components/table.d.ts +3 -0
  21. package/dist/components/table.d.ts.map +1 -0
  22. package/dist/components/table.js +3 -0
  23. package/dist/controls.js +1 -1
  24. package/dist/internal/chat/prompt-input.d.ts.map +1 -1
  25. package/dist/internal/chat/prompt-input.js +2 -1
  26. package/dist/internal/page-actions-client.d.ts.map +1 -1
  27. package/dist/internal/page-actions-client.js +32 -12
  28. package/dist/internal/search.d.ts.map +1 -1
  29. package/dist/internal/search.js +2 -2
  30. package/dist/internal/sidebar.d.ts.map +1 -1
  31. package/dist/internal/sidebar.js +17 -14
  32. package/dist/internal/table-of-contents.d.ts.map +1 -1
  33. package/dist/internal/table-of-contents.js +1 -1
  34. package/dist/internal/ui/dropdown-menu.js +6 -6
  35. package/dist/mdx.d.ts.map +1 -1
  36. package/dist/mdx.js +18 -3
  37. package/dist/pages/docs.d.ts.map +1 -1
  38. package/dist/pages/docs.js +7 -2
  39. package/docs/agents.md +1 -1
  40. package/docs/llms.txt +169 -13
  41. package/docs/manifest.json +1 -1
  42. package/docs/pages/migration.md +1 -1
  43. package/docs/pages/syntax.md +167 -11
  44. package/package.json +3 -3
  45. package/template/app/styles/geistdocs.css +1 -1
  46. package/template/content/docs/migration.mdx +1 -1
  47. package/template/content/docs/syntax.mdx +172 -11
  48. package/template/package.json +2 -2
  49. package/theme.css +44 -43
@@ -126,16 +126,16 @@ const useOpenedFolders = (nodes, activeUrl, openFirstLevel, scope) => {
126
126
  };
127
127
  return { manualToggleRef, opened, toggleFolder };
128
128
  };
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 })] }));
129
+ 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
130
  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
131
  const getSidebarRowTone = (isSelected, isGroup) => {
132
132
  if (isSelected) {
133
- return "bg-gray-200 text-gray-1000 active:bg-gray-300";
133
+ return "bg-gray-200 text-gray-1000";
134
134
  }
135
135
  if (isGroup) {
136
- return "text-gray-1000 hover:bg-gray-alpha-100 focus-visible:bg-gray-alpha-100 active:bg-gray-alpha-300";
136
+ return "text-gray-1000 hover:bg-gray-100 focus-visible:bg-gray-100";
137
137
  }
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";
138
+ return "text-gray-900 hover:bg-gray-100 hover:text-gray-1000 focus-visible:bg-gray-100 focus-visible:text-gray-1000";
139
139
  };
140
140
  const SidebarDisclosureIcon = ({ expanded }) => (_jsx(_Fragment, { children: expanded ? (_jsx(IconChevronDownSmall, { size: 16 })) : (_jsx(IconChevronRight, { size: 16 })) }));
141
141
  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;
@@ -154,11 +154,13 @@ const SidebarTreeNode = ({ depth, node, path, state, }) => {
154
154
  const menuId = getDomId(state.idPrefix, nodeId);
155
155
  const labelId = `${menuId}-label`;
156
156
  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] })] }));
157
+ 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(IconArrowUpRight, { className: "ml-auto size-4 shrink-0 text-gray-900" })) : null] })] }));
158
158
  const handleLinkClick = (event) => {
159
159
  state.onNavigate?.();
160
- if (opensOutsideCurrentPage(event, item?.external, item?.url ?? "") ||
161
- !(folder && hasChildren && (isSelected || !isExpanded))) {
160
+ if (opensOutsideCurrentPage(event, item?.external, item?.url ?? "")) {
161
+ return;
162
+ }
163
+ if (!(folder && hasChildren && (isSelected || !isExpanded))) {
162
164
  return;
163
165
  }
164
166
  state.toggleFolder(folder, path);
@@ -173,7 +175,7 @@ const SidebarTreeNode = ({ depth, node, path, state, }) => {
173
175
  else {
174
176
  primaryControl = (_jsx("span", { className: cn(rowClassName, "min-w-0 flex-1"), children: content }));
175
177
  }
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] }));
178
+ 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
179
  };
178
180
  const SidebarTree = ({ activeUrl, idScope, nodes, onNavigate, openFirstLevel = false, scrollActive = false, visible = true, }) => {
179
181
  const generatedId = useId().replace(UNSAFE_ID_CHARACTERS, "");
@@ -194,7 +196,7 @@ const SidebarTree = ({ activeUrl, idScope, nodes, onNavigate, openFirstLevel = f
194
196
  const SidebarRootList = ({ activeSection, activeUrl, groups, onSelect, visible, }) => {
195
197
  const contentRef = useRef(null);
196
198
  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))) }));
199
+ 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
200
  };
199
201
  const SidebarRootItem = ({ activeSection, activeUrl, item, onSelect, }) => {
200
202
  const folder = item.type === "folder" ? item : null;
@@ -204,10 +206,11 @@ const SidebarRootItem = ({ activeSection, activeUrl, item, onSelect, }) => {
204
206
  const separateDisclosure = hasSeparateRootDisclosure(item);
205
207
  const isCurrentPage = linkItem?.url === activeUrl;
206
208
  const isActive = item === activeSection || isCurrentPage;
209
+ const labelWeight = { folder: "font-medium", page: "font-normal" }[item.type];
207
210
  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] }));
211
+ ? "bg-gray-200 text-gray-1000"
212
+ : "text-gray-900 hover:bg-gray-100 hover:text-gray-1000 focus-visible:bg-gray-100");
213
+ 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(IconArrowUpRight, { className: "size-4 shrink-0 text-gray-900" })) : null, opensSection && !separateDisclosure ? (_jsx(IconChevronRight, { className: "shrink-0 text-gray-900", size: 16 })) : null] }));
211
214
  let renderedItem;
212
215
  if (linkItem) {
213
216
  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 +227,9 @@ const SidebarRootItem = ({ activeSection, activeUrl, item, onSelect, }) => {
224
227
  else {
225
228
  renderedItem = _jsx("span", { className: className, children: content });
226
229
  }
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] }));
230
+ 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(IconChevronRight, { size: 16 }) })) : null] }));
228
231
  };
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" })] }) }));
232
+ 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(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" })] }) }));
230
233
  const DesktopSectionsSidebar = ({ activeUrl, nodes, rootScope, top, }) => {
231
234
  const groups = useMemo(() => getSidebarRootGroups(nodes), [nodes]);
232
235
  const currentSection = useMemo(() => findActiveRootSection(nodes, activeUrl), [activeUrl, nodes]);
@@ -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] }) }));
@@ -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
  }
package/dist/mdx.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"mdx.d.ts","sourceRoot":"","sources":["../src/mdx.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAkB/C,OAAO,EAGL,KAAK,4BAA4B,IAAI,mBAAmB,EAGzD,MAAM,iBAAiB,CAAC;AAEzB,eAAO,MAAM,2BAA2B,8EAAe,CAAC;AACxD,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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dist/mdx.js CHANGED
@@ -1,11 +1,16 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from "@vercel/geistcn/utils";
3
+ import { IconArrowUpRightSmall } from "@vercel/geistcn-assets/icons";
2
4
  import { TypeTable } from "fumadocs-ui/components/type-table";
3
5
  import defaultMdxComponents from "fumadocs-ui/mdx";
6
+ import { Blockquote } from "./components/blockquote";
4
7
  import { Callout, CalloutContainer, CalloutDescription, CalloutTitle, } from "./components/callout";
5
8
  import { CodeBlock } from "./components/code-block";
6
- import { CodeBlockTab, CodeBlockTabs, CodeBlockTabsList, CodeBlockTabsTrigger, } from "./components/code-block-tabs";
9
+ import { CodeBlockTab, CodeBlockTabs, CodeBlockTabsList, CodeBlockTabsTrigger, CompactCodeBlockTabs, } from "./components/code-block-tabs";
7
10
  import { CopyPrompt } from "./components/copy-prompt";
11
+ import { Heading } from "./components/heading";
8
12
  import { Mermaid } from "./components/mermaid";
13
+ import { Table } from "./components/table";
9
14
  import { Video } from "./components/video";
10
15
  import { LocalizedLink } from "./internal/localized-link";
11
16
  import { geistdocsFrontmatterSchema as frontmatterSchema, geistdocsMetaSchema as metaSchema, geistShikiTheme as shikiTheme, defineGeistdocsSourceConfig as sourceConfig, } from "./source-config";
@@ -13,11 +18,21 @@ export const defineGeistdocsSourceConfig = sourceConfig;
13
18
  export const geistdocsFrontmatterSchema = frontmatterSchema;
14
19
  export const geistdocsMetaSchema = metaSchema;
15
20
  export const geistShikiTheme = shikiTheme;
21
+ const HTTP_URL = /^https?:\/\//;
16
22
  export const getGeistdocsMDXComponents = (components) => ({
17
23
  ...defaultMdxComponents,
24
+ h1: (props) => _jsx(Heading, { as: "h1", ...props }),
25
+ h2: (props) => _jsx(Heading, { as: "h2", ...props }),
26
+ h3: (props) => _jsx(Heading, { as: "h3", ...props }),
27
+ h4: (props) => _jsx(Heading, { as: "h4", ...props }),
28
+ h5: (props) => _jsx(Heading, { as: "h5", ...props }),
29
+ h6: (props) => _jsx(Heading, { as: "h6", ...props }),
18
30
  pre: CodeBlock,
19
- a: ({ href, ...props }) => typeof href === "string" && href.startsWith("/") ? (_jsx(LocalizedLink, { className: "font-normal text-gray-1000 no-underline", href: href, ...props })) : (_jsx("a", { href: href, ...props, className: "font-normal text-gray-1000 no-underline" })),
31
+ blockquote: Blockquote,
32
+ table: Table,
33
+ 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) ? (_jsxs("span", { className: "whitespace-nowrap", children: ["\u00a0", _jsx("span", { className: "inline-flex -translate-y-1 align-text-bottom", children: _jsx(IconArrowUpRightSmall, { size: 16 }) })] })) : null] })),
20
34
  CodeBlockTabs,
35
+ CompactCodeBlockTabs,
21
36
  CodeBlockTabsList,
22
37
  CodeBlockTabsTrigger,
23
38
  CodeBlockTab,
@@ -1 +1 @@
1
- {"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/pages/docs.tsx"],"names":[],"mappings":"AAEA,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;AAa9E,OAAO,EACL,KA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AAiB,CAAC;IAChC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE;QACpB,IAAI,EAAE,YAAY,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,EAAE,MAAM,CAAC;QACpB,IAAI,EAAE,aAAa,CAAC;QACpB,OAAO,EAAE,MAAM,CAAC;QAChB,aAAa,EAAE,MAAM,CAAC;KACvB,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;AAyCD,eAAO,MAAM,cAAc,GAAI,6LAe5B,qBAAqB;wBAiMnB;QACD,MAAM,EAAE,OAAO,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;SAAE,CAAC,CAAC;KACpD;;oCAcE;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;CAwDtB,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;CAA4B,CAAC"}
@@ -1,5 +1,6 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { cn } from "@vercel/geistcn/utils";
3
+ import { IconArrowUpRightSmall } from "@vercel/geistcn-assets/icons";
3
4
  import Link from "fumadocs-core/link";
4
5
  import { DocsBody as FumadocsDocsBody, DocsDescription as FumadocsDocsDescription, DocsPage as FumadocsDocsPage, DocsTitle as FumadocsDocsTitle, } from "fumadocs-ui/layouts/docs/page";
5
6
  import { createRelativeLink } from "fumadocs-ui/mdx";
@@ -15,7 +16,11 @@ import { getPageFooterItems, PageFooter } from "../internal/page-footer";
15
16
  import { GeistdocsTableOfContents } from "../internal/table-of-contents";
16
17
  import { createMdxComponents } from "../mdx";
17
18
  import { getPageRobots, } from "../page-visibility";
18
- const PrefetchedDocsLink = (props) => (_jsx(Link, { ...props, prefetch: true }));
19
+ const HTTP_URL = /^https?:\/\//;
20
+ const PrefetchedDocsLink = ({ children, className, href, ...props }) => {
21
+ 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 ? (_jsxs("span", { className: "whitespace-nowrap", children: ["\u00a0", _jsx("span", { className: "inline-flex -translate-y-1 align-text-bottom", children: _jsx(IconArrowUpRightSmall, { size: 16 }) })] })) : null] }));
23
+ };
19
24
  export const resolvePageMarkdownUrl = (options) => resolveInternalPageMarkdownUrl(options);
20
25
  const DocsTitle = ({ className, ...props }) => (_jsx(FumadocsDocsTitle, { className: cn("mb-4 text-balance", className), ...props }));
21
26
  const DocsDescription = ({ className, ...props }) => (_jsx(FumadocsDocsDescription, { className: cn("text-gray-900", className), ...props }));
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.9556d32 so agents can understand the installed package without web access.
3
+ These docs are bundled with `@vercel/geistdocs` 1.25.1-canary.984aaa9 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
package/docs/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # Geistdocs Package Documentation
2
2
 
3
- These docs are bundled with `@vercel/geistdocs` 1.25.1-canary.9556d32.
3
+ These docs are bundled with `@vercel/geistdocs` 1.25.1-canary.984aaa9.
4
4
  They describe how to build package-backed Geistdocs sites and how to use the package APIs from generated project adapters.
5
5
 
6
6
  ## Documentation Index
@@ -423,7 +423,7 @@ Fix unrelated build failures first. A migration is safer when the starting point
423
423
 
424
424
  ## Install Geistdocs
425
425
 
426
- Add `@vercel/geistdocs` and align the supported Fumadocs and Next.js dependencies for the package version you are adopting.
426
+ Add `@vercel/geistdocs` and align the supported Fumadocs and Next.js dependencies for the package version you are adopting. Geistdocs requires Next.js 16.3.3 or later within 16.x. Earlier 16.3 releases can retain an optional catch-all route's index content after a client navigation to a child page when Cache Components and Partial Prefetching are enabled.
427
427
 
428
428
  For an existing project, use your package manager directly:
429
429
 
@@ -1202,7 +1202,9 @@ related:
1202
1202
 
1203
1203
  Geistdocs supports MDX, a superset of Markdown that allows you to use JSX components within your documentation. This guide covers all the formatting options available.
1204
1204
 
1205
- Help me write a Geistdocs MDX page. Use this page as a syntax reference and create an example page with frontmatter, headings, links, a code block, a `Callout`, and a `CopyPrompt` component.
1205
+ Help me write a Geistdocs MDX page. Use this page as a syntax reference and
1206
+ create an example page with frontmatter, headings, links, a code block, a
1207
+ `Callout`, and a `CopyPrompt` component.
1206
1208
 
1207
1209
  ## Frontmatter
1208
1210
 
@@ -1254,11 +1256,17 @@ Headings automatically generate anchor links for navigation and deep linking.
1254
1256
 
1255
1257
  Create unordered lists with `-`, `*`, or `+`:
1256
1258
 
1257
- - First item
1258
- - Second item
1259
- - Nested item
1260
- - Another nested item
1261
- - Third item
1259
+ ```md
1260
+ - Install the required packages
1261
+ - Configure your project
1262
+ - Start the development server
1263
+ ```
1264
+
1265
+ This renders as:
1266
+
1267
+ - Install the required packages
1268
+ - Configure your project
1269
+ - Start the development server
1262
1270
 
1263
1271
  Create ordered lists with numbers:
1264
1272
 
@@ -1270,7 +1278,64 @@ Create ordered lists with numbers:
1270
1278
 
1271
1279
  Use `>` to create blockquotes:
1272
1280
 
1273
- > This is a blockquote. You can use it to highlight important information or quotes from external sources.
1281
+ > **Watch:** Learn more about how to use `next/image` → [YouTube (9 minutes)](https://youtu.be/IU_qq_c_lKA).
1282
+
1283
+ ### Callouts
1284
+
1285
+ Use `<Callout>` for a highlighted informational note:
1286
+
1287
+ ```mdx
1288
+ <Callout>This is automatically set when deploying to Vercel.</Callout>
1289
+ ```
1290
+
1291
+ This renders as:
1292
+
1293
+ > This is automatically set when deploying to Vercel.
1294
+
1295
+ Callouts can also contain a title and lists:
1296
+
1297
+ > Note:
1298
+ - The `App Router` uses [React canary
1299
+ releases](https://react.dev/blog/2023/05/03/react-canaries) built-in, which
1300
+ include all the stable React 19 changes, as well as newer features being
1301
+ validated in frameworks, but you should still declare react and react-dom in
1302
+ package.json for tooling and ecosystem compatibility.
1303
+ - The `Pages Router` uses the React version from your `package.json`.
1304
+
1305
+ ### Copy Prompts
1306
+
1307
+ Short prompts render in full without an expansion control:
1308
+
1309
+ ```mdx
1310
+ <CopyPrompt text="Summarize this documentation page and list the key concepts.">
1311
+ Summarize this documentation page and list the key concepts.
1312
+ </CopyPrompt>
1313
+ ```
1314
+
1315
+ This renders as:
1316
+
1317
+ Summarize this documentation page and list the key concepts.
1318
+
1319
+ Long prompts initially show a preview with a **Show more** control:
1320
+
1321
+ ```mdx
1322
+ <CopyPrompt collapsible text="Write a detailed migration plan for this project.">
1323
+ Write a detailed migration plan for this project. Include prerequisites,
1324
+ implementation steps, validation, rollback guidance, and common pitfalls.
1325
+ </CopyPrompt>
1326
+ ```
1327
+
1328
+ Set the boolean `collapsible` prop when the prompt should initially render as a
1329
+ two-line preview. This renders as:
1330
+
1331
+ Review this Geistdocs project in detail. Explain how the `@vercel/geistdocs`
1332
+ package, application layouts, local adapter files, source configuration,
1333
+ `content/docs` directory, navigation metadata, MDX components, syntax
1334
+ highlighting, search routes, and deployment configuration work together.
1335
+ Then identify the safest first files to edit, describe the effect of each
1336
+ change, call out common mistakes, and propose a step-by-step plan for
1337
+ customizing the documentation site without breaking routing, generated
1338
+ Markdown, or accessibility behavior.
1274
1339
 
1275
1340
  ### Links
1276
1341
 
@@ -1279,6 +1344,15 @@ Create links with `[text](url)`:
1279
1344
  - [External link](https://vercel.com)
1280
1345
  - [Internal link](/docs/getting-started)
1281
1346
 
1347
+ Use an absolute `https://` or `http://` URL to mark a link as external. External
1348
+ links open outside the docs site and display an arrow icon. Use a root-relative
1349
+ path beginning with `/` for internal links:
1350
+
1351
+ ```md
1352
+ [External link](https://vercel.com)
1353
+ [Internal link](/docs/getting-started)
1354
+ ```
1355
+
1282
1356
  ### Images
1283
1357
 
1284
1358
  Add images with `![alt text](url)`:
@@ -1311,6 +1385,16 @@ This renders as:
1311
1385
  | GFM | GitHub extensions | Supported |
1312
1386
  | MDX | JSX in Markdown | Supported |
1313
1387
 
1388
+ Tables can also include inline code, as commonly used for file references:
1389
+
1390
+ | File | Description |
1391
+ | -------------------- | ------------------------------------------------ |
1392
+ | `next.config.js` | Configuration file for Next.js |
1393
+ | `package.json` | Project dependencies and scripts |
1394
+ | `instrumentation.ts` | OpenTelemetry and instrumentation file |
1395
+ | `.env.local` | Local environment variables |
1396
+ | `tsconfig.json` | Configuration file for TypeScript |
1397
+
1314
1398
  ### Task Lists
1315
1399
 
1316
1400
  Create interactive task lists:
@@ -1383,6 +1467,78 @@ export const Button = ({ children }) => {
1383
1467
  };
1384
1468
  ```
1385
1469
 
1470
+ ### Tabs and switchers
1471
+
1472
+ Use consecutive fences with `tab` metadata for code tabs that expose every
1473
+ option at once:
1474
+
1475
+ ````md
1476
+ ```ts tab="TypeScript" title="example.ts"
1477
+ export const greeting: string = "Hello from TypeScript";
1478
+ ```
1479
+
1480
+ ```js tab="JavaScript" title="example.js"
1481
+ export const greeting = "Hello from JavaScript";
1482
+ ```
1483
+ ````
1484
+
1485
+ This renders as:
1486
+
1487
+ ```ts tab="TypeScript" title="example.ts"
1488
+ export const greeting: string = "Hello from TypeScript";
1489
+ ```
1490
+
1491
+ ```js tab="JavaScript" title="example.js"
1492
+ export const greeting = "Hello from JavaScript";
1493
+ ```
1494
+
1495
+ Wrap the same fences in `<CodeBlockTabs compact>` to move the selector into the
1496
+ code-block header:
1497
+
1498
+ ````mdx
1499
+ <CompactCodeBlockTabs defaultValue="TypeScript">
1500
+ <CodeBlockTabsList>
1501
+ <CodeBlockTabsTrigger value="TypeScript">TypeScript</CodeBlockTabsTrigger>
1502
+ <CodeBlockTabsTrigger value="JavaScript">JavaScript</CodeBlockTabsTrigger>
1503
+ </CodeBlockTabsList>
1504
+ <CodeBlockTab value="TypeScript">
1505
+ ```ts title="example.ts"
1506
+ export const greeting: string = "Hello from TypeScript";
1507
+ ```
1508
+ </CodeBlockTab>
1509
+ <CodeBlockTab value="JavaScript">
1510
+ ```js title="example.js"
1511
+ export const greeting = "Hello from JavaScript";
1512
+ ```
1513
+ </CodeBlockTab>
1514
+ </CompactCodeBlockTabs>
1515
+ ````
1516
+
1517
+ This renders as:
1518
+
1519
+ <CompactCodeBlockTabs defaultValue="TypeScript">
1520
+ <CodeBlockTabsList>
1521
+ <CodeBlockTabsTrigger value="TypeScript">TypeScript</CodeBlockTabsTrigger>
1522
+ <CodeBlockTabsTrigger value="JavaScript">JavaScript</CodeBlockTabsTrigger>
1523
+ </CodeBlockTabsList>
1524
+ <CodeBlockTab value="TypeScript">
1525
+ ```ts title="example.ts"
1526
+ export const greeting: string = "Hello from TypeScript";
1527
+ ```
1528
+ </CodeBlockTab>
1529
+ <CodeBlockTab value="JavaScript">
1530
+ ```js title="example.js"
1531
+ export const greeting = "Hello from JavaScript";
1532
+ ```
1533
+ </CodeBlockTab>
1534
+ </CompactCodeBlockTabs>
1535
+
1536
+ When migrating an existing site such as next-site, translate adjacent
1537
+ `switcher` fences to `tab="TypeScript"` and `tab="JavaScript"`, then wrap the
1538
+ pair with `<CodeBlockTabs compact>`. Import `@vercel/geistdocs/styles.css` (or
1539
+ `theme.css` with the documented Geist dependencies) so Tailwind scans the
1540
+ package's compiled components and emits the tab layout utilities.
1541
+
1386
1542
  ### Framework icons
1387
1543
 
1388
1544
  Append `#<framework>` to the title to show a framework logo instead of the
@@ -1391,22 +1547,22 @@ values are `#next` / `#nextjs` and `#svelte` / `#sveltekit`:
1391
1547
 
1392
1548
  ````md
1393
1549
  ```ts title="flags.ts#next"
1394
- import { flag } from 'flags/next';
1550
+ import { flag } from "flags/next";
1395
1551
  ```
1396
1552
 
1397
1553
  ```ts title="flags.ts#svelte"
1398
- import { flag } from 'flags/sveltekit';
1554
+ import { flag } from "flags/sveltekit";
1399
1555
  ```
1400
1556
  ````
1401
1557
 
1402
1558
  This renders as:
1403
1559
 
1404
1560
  ```ts title="flags.ts#next"
1405
- import { flag } from 'flags/next';
1561
+ import { flag } from "flags/next";
1406
1562
  ```
1407
1563
 
1408
1564
  ```ts title="flags.ts#svelte"
1409
- import { flag } from 'flags/sveltekit';
1565
+ import { flag } from "flags/sveltekit";
1410
1566
  ```
1411
1567
 
1412
1568
  ### Line Numbers
@@ -199,5 +199,5 @@
199
199
  }
200
200
  ],
201
201
  "source": "apps/template/content/docs",
202
- "version": "1.25.1-canary.9556d32"
202
+ "version": "1.25.1-canary.984aaa9"
203
203
  }
@@ -44,7 +44,7 @@ Fix unrelated build failures first. A migration is safer when the starting point
44
44
 
45
45
  ## Install Geistdocs
46
46
 
47
- Add `@vercel/geistdocs` and align the supported Fumadocs and Next.js dependencies for the package version you are adopting.
47
+ Add `@vercel/geistdocs` and align the supported Fumadocs and Next.js dependencies for the package version you are adopting. Geistdocs requires Next.js 16.3.3 or later within 16.x. Earlier 16.3 releases can retain an optional catch-all route's index content after a client navigation to a child page when Cache Components and Partial Prefetching are enabled.
48
48
 
49
49
  For an existing project, use your package manager directly:
50
50