fumadocs-ui 16.17.0 → 16.17.2

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.
@@ -1 +1 @@
1
- @source inline("!header !showItem *:col-start-1 *:my-auto *:pointer-events-auto *:rounded-md *:row-start-1 *:w-(--fd-sidebar-width) --fd-docs-height --fd-docs-row-1 --fd-docs-row-2 --fd-docs-row-3 --fd-header-height --fd-layout-width --fd-sidebar-col --fd-sidebar-width --fd-toc-popover-height --fd-toc-width -mx-1 -translate-x-(--fd-sidebar-width) -translate-y-full [&_svg]:shrink-0 [--fd-docs-height:100dvh] [--fd-header-height:0px] [--fd-sidebar-width:0px] [--fd-toc-popover-height:0px] [--fd-toc-width:0px] [grid-area:header] [grid-area:main] [grid-area:sidebar] [grid-area:toc-popover] [grid-area:toc] aiChat aria-valuemax aria-valuemin aria-valuenow article available backdrop-blur-sm before before:absolute before:bg-fd-border before:content-[''] before:inset-s-2.5 before:inset-y-1 before:w-px bg-fd-background/80 border-b-2 border-e border-e-0 border-fd-primary border-y-0 breadcrumb breadcrumbEnabled circleProps circumference clerk click containerProps createLinkItemRenderer data-[active=true]:before:absolute data-[active=true]:before:bg-fd-primary data-[active=true]:before:content-[''] data-[active=true]:before:inset-s-2.5 data-[active=true]:before:inset-y-2.5 data-[active=true]:before:w-px data-[active=true]:bg-fd-primary/10 data-[active=true]:hover:transition-colors data-[state=closed]:animate-fd-sidebar-out data-[state=open]:animate-fd-sidebar-in data-[transparent=false]:bg-fd-background/80 data-full data-hovered data-layout-content data-layout-main data-sidebar-collapsed data-sidebar-panel data-sidebar-placeholder data-toc-popover data-toc-popover-content data-toc-popover-trigger data-transparent defaultSlots duration-250 edit empty:mb-0 first:mt-0 flex-row-reverse font-semibold footer footerEnabled footerList fumadocs-core/breadcrumb gap-2.5 gap-6 getBreadcrumbItemsFromPath grid-cols-1 gridTemplate h-(--fd-header-height) h-(--fd-toc-popover-height) h-10 h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] hideIfDisabled hover:bg-fd-accent/50 hover:opacity-80 hover:text-fd-accent-foreground/80 hover:transition-none iconLinks including inert information inset-e-0 inset-s-4 inset-y-2 isNavTransparent isTop items-end justify-items-center justify-self-end justify-start layout-level layoutTabs linkItems max max-h-[50vh] max-md:hidden max-md:layout:[--fd-header-height:--spacing(14)] max-w-[1168px] max-w-[380px] max-w-[900px] max-xl:hidden max-xl:layout:[--fd-toc-popover-height:--spacing(10)] mb-4 mb-8 mb-auto md:in-data-[sidebar-collapsed=true]:pt-16 md:layout:[--fd-sidebar-width:268px] md:pt-8 md:px-6 min min-h-(--fd-docs-height) mt-6 mx-0.5 navEnabled navTransparentMode nd-docs-layout nd-page nd-subnav nd-toc nd-toc-placeholder no normalizedValue onClickItem onClickOutside overflow-x-clip p-0 pagination pb-1.5 pe-0 pe-4 pointer-events-none popover progress progressbar provided pt-0.5 pt-12 pt-2 pt-3 px-6 py-0 py-6 radius restSvgProps rotate-180 rounded-none rtl:-translate-x-2 rtl:translate-x-full selectedIdx setDate showItem sidebarEnabled sidebarProps size-4.5 stroke-current/25 strokeDasharray strokeDashoffset tabMode tableOfContent tableOfContentPopover takes text-[1.75em] text-end text-fd-foreground timezone toc-popover toc-title tocEnabled tocPopover tocPopoverEnabled tocPopoverProps tocProps top-(--fd-docs-row-1) top-(--fd-docs-row-2) top-[calc(--spacing(4)+var(--fd-docs-row-3))] transition-[--fd-sidebar-col] transition-[opacity,translate,color] transition-[opacity,translate] transition-[opacity,visibility] transition-[width,inset-block,translate,background-color] translate-x-2 translate-y-full transparentMode typography under unlisted updated useBaseSlots useDocsLayout useDocsPage useFooterItems useIsScrollTop useTreeContext w-(--fd-sidebar-width) w-(--fd-toc-width) w-4 w-[85%] xl:border-s xl:h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] xl:hidden xl:in-data-[sidebar-collapsed=true]:pt-14 xl:layout:[--fd-toc-width:268px] xl:pt-14 xl:px-8 xl:sticky xl:top-(--fd-docs-row-1) z-10 z-20 z-30");
1
+ @source inline("!header !showItem *:col-start-1 *:my-auto *:pointer-events-auto *:rounded-md *:row-start-1 *:w-(--fd-sidebar-width) --fd-docs-height --fd-docs-row-1 --fd-docs-row-2 --fd-docs-row-3 --fd-header-height --fd-layout-width --fd-sidebar-col --fd-sidebar-width --fd-toc-popover-height --fd-toc-width -mx-1 -translate-x-(--fd-sidebar-width) -translate-y-full [&_svg]:shrink-0 [--fd-docs-height:100dvh] [--fd-header-height:0px] [--fd-sidebar-width:0px] [--fd-toc-popover-height:0px] [--fd-toc-width:0px] [grid-area:header] [grid-area:main] [grid-area:sidebar] [grid-area:tabs] [grid-area:toc-popover] [grid-area:toc] aiChat aria-valuemax aria-valuemin aria-valuenow article available backdrop-blur-sm before before:absolute before:bg-fd-border before:content-[''] before:inset-s-2.5 before:inset-y-1 before:w-px bg-fd-background/80 border-b-2 border-e border-e-0 border-fd-primary border-y-0 breadcrumb breadcrumbEnabled circleProps circumference clerk click containerProps createLinkItemRenderer data-[active=true]:before:absolute data-[active=true]:before:bg-fd-primary data-[active=true]:before:content-[''] data-[active=true]:before:inset-s-2.5 data-[active=true]:before:inset-y-2.5 data-[active=true]:before:w-px data-[active=true]:bg-fd-primary/10 data-[active=true]:hover:transition-colors data-[state=closed]:animate-fd-sidebar-out data-[state=open]:animate-fd-sidebar-in data-[transparent=false]:bg-fd-background/80 data-full data-hovered data-layout-content data-layout-main data-sidebar-collapsed data-sidebar-panel data-sidebar-placeholder data-toc-popover data-toc-popover-content data-toc-popover-trigger data-transparent defaultSlots duration-250 edit empty:mb-0 first:mt-0 flex-row-reverse font-semibold footer footerEnabled footerList fumadocs-core/breadcrumb gap-2.5 gap-6 getBreadcrumbItemsFromPath grid-cols-1 gridTemplate h-(--fd-header-height) h-(--fd-toc-popover-height) h-10 h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] hideIfDisabled hover:bg-fd-accent/50 hover:opacity-80 hover:text-fd-accent-foreground/80 hover:transition-none iconLinks including inert information inset-e-0 inset-s-4 inset-y-2 isNavTransparent isTop items-end justify-items-center justify-self-end justify-start layout-level layoutTabs linkItems max max-h-[50vh] max-md:hidden max-md:layout:[--fd-header-height:--spacing(14)] max-w-[1168px] max-w-[380px] max-w-[900px] max-xl:hidden max-xl:layout:[--fd-toc-popover-height:--spacing(10)] mb-4 mb-8 mb-auto md:in-data-[sidebar-collapsed=true]:pt-16 md:layout:[--fd-sidebar-width:268px] md:pt-8 md:px-6 min min-h-(--fd-docs-height) mt-6 mx-0.5 navEnabled navTransparentMode nd-docs-layout nd-page nd-subnav nd-toc nd-toc-placeholder no normalizedValue onClickItem onClickOutside overflow-x-clip p-0 pagination pb-1.5 pe-0 pe-4 pointer-events-none popover progress progressbar provided pt-0.5 pt-12 pt-2 pt-3 px-6 py-0 py-6 radius restSvgProps rotate-180 rounded-none rtl:-translate-x-2 rtl:translate-x-full selectedIdx setDate showItem sidebarEnabled sidebarProps size-4.5 stroke-current/25 strokeDasharray strokeDashoffset tabMode tableOfContent tableOfContentPopover takes text-[1.75em] text-end text-fd-foreground timezone toc-popover toc-title tocEnabled tocPopover tocPopoverEnabled tocPopoverProps tocProps top-(--fd-docs-row-1) top-(--fd-docs-row-2) top-[calc(--spacing(4)+var(--fd-docs-row-3))] transition-[--fd-sidebar-col] transition-[opacity,translate,color] transition-[opacity,translate] transition-[opacity,visibility] transition-[width,inset-block,translate,background-color] translate-x-2 translate-y-full transparentMode typography under unlisted updated useBaseSlots useDocsLayout useDocsPage useFooterItems useIsScrollTop useTreeContext w-(--fd-sidebar-width) w-(--fd-toc-width) w-4 w-[85%] xl:border-s xl:h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] xl:hidden xl:in-data-[sidebar-collapsed=true]:pt-14 xl:layout:[--fd-toc-width:268px] xl:pt-14 xl:px-8 xl:sticky xl:top-(--fd-docs-row-1) z-10 z-20 z-30");
@@ -89,7 +89,7 @@ function LayoutTabs({ tabs: allTabs, ...props }) {
89
89
  if (!group) return;
90
90
  return /* @__PURE__ */ jsx("div", {
91
91
  ...props,
92
- className: cn("flex flex-row items-end gap-6 overflow-auto [grid-area:main]", props.className),
92
+ className: cn("flex flex-row items-end gap-6 overflow-auto [grid-area:tabs]", props.className),
93
93
  children: group.options.map((tab, i) => /* @__PURE__ */ jsx(Link, {
94
94
  href: tab.url,
95
95
  className: cn("inline-flex border-b-2 border-transparent transition-colors items-center pb-1.5 font-medium gap-2 text-fd-muted-foreground text-sm text-nowrap hover:text-fd-accent-foreground", tab.unlisted && selected !== tab && "hidden", selected === tab && "border-fd-primary text-fd-primary"),
@@ -13,6 +13,7 @@ function Container(props) {
13
13
  style: {
14
14
  gridTemplate: `"sidebar sidebar header toc toc"
15
15
  "sidebar sidebar toc-popover toc toc"
16
+ "sidebar sidebar tabs toc toc"
16
17
  "sidebar sidebar main toc toc" 1fr / minmax(min-content, 1fr) var(--fd-sidebar-col) minmax(0, calc(var(--fd-layout-width,97rem) - var(--fd-sidebar-width) - var(--fd-toc-width))) var(--fd-toc-width) minmax(min-content, 1fr)`,
17
18
  "--fd-docs-row-1": "var(--fd-banner-height, 0px)",
18
19
  "--fd-docs-row-2": "calc(var(--fd-docs-row-1) + var(--fd-header-height))",
@@ -22,9 +22,11 @@ function DocsLayout(props) {
22
22
  const { baseSlots, baseProps } = useBaseSlots(props);
23
23
  const tabs = useMemo(() => {
24
24
  if (Array.isArray(defaultTabs)) return defaultTabs;
25
- if (typeof defaultTabs === "object") return getLayoutTabs(tree, defaultTabs);
26
- if (defaultTabs !== false) return getLayoutTabs(tree);
27
- return [];
25
+ if (defaultTabs === false) return [];
26
+ return getLayoutTabs(tree, {
27
+ transform: (option) => option,
28
+ ...defaultTabs
29
+ });
28
30
  }, [tree, defaultTabs]);
29
31
  const slots = {
30
32
  ...baseSlots,
@@ -20,7 +20,7 @@ function LayoutTabsDropdown({ tabs: allTabs, className, size = "default", ...pro
20
20
  open,
21
21
  onOpenChange: setOpen,
22
22
  children: [/* @__PURE__ */ jsxs(PopoverTrigger, {
23
- className: cn("inline-flex items-center gap-2 text-sm font-medium rounded-full transition-colors hover:bg-fd-accent data-[state=open]:bg-fd-accent", size === "lg" && "text-[0.9375rem]", className),
23
+ className: cn("inline-flex items-center gap-2 text-sm font-medium rounded-full transition-colors [&_svg]:size-4 hover:bg-fd-accent data-[state=open]:bg-fd-accent", size === "lg" && "text-[0.9375rem]", className),
24
24
  ...props,
25
25
  children: [selected ? /* @__PURE__ */ jsxs(Fragment, { children: [selected.icon, /* @__PURE__ */ jsx("span", {
26
26
  className: "truncate",
@@ -272,7 +272,7 @@ function SidebarFolder({ folder }) {
272
272
  });
273
273
  }
274
274
  function isNodeInPath(node, path) {
275
- return path.some((other) => other.$id === node.$id || other === node);
275
+ return path.some((other) => other === node || node.$id !== void 0 && other.$id === node.$id);
276
276
  }
277
277
  //#endregion
278
278
  export { Sidebar, SidebarDrawer, SidebarProvider, useSidebar };
package/dist/style.css CHANGED
@@ -2239,6 +2239,9 @@
2239
2239
  .\[grid-area\:sidebar\] {
2240
2240
  grid-area: sidebar;
2241
2241
  }
2242
+ .\[grid-area\:tabs\] {
2243
+ grid-area: tabs;
2244
+ }
2242
2245
  .\[grid-area\:toc-popover\] {
2243
2246
  grid-area: toc-popover;
2244
2247
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-ui",
3
- "version": "16.17.0",
3
+ "version": "16.17.2",
4
4
  "description": "The Radix UI version of Fumadocs UI",
5
5
  "keywords": [
6
6
  "Docs",
@@ -161,8 +161,8 @@
161
161
  "shiki": "^4.5.0"
162
162
  },
163
163
  "devDependencies": {
164
- "@fumadocs/base-ui": "16.17.0",
165
- "@fumadocs/cli": "1.7.4",
164
+ "@fumadocs/base-ui": "16.17.2",
165
+ "@fumadocs/cli": "1.7.5",
166
166
  "@tailwindcss/cli": "^4.3.3",
167
167
  "@tailwindcss/oxide": "^4.3.3",
168
168
  "@tsdown/css": "^0.23.0",
@@ -171,7 +171,7 @@
171
171
  "@types/react": "^19.3.0",
172
172
  "@types/react-dom": "^19.3.0",
173
173
  "fuma-cli": "^0.3.1",
174
- "fumadocs-core": "16.17.0",
174
+ "fumadocs-core": "16.17.2",
175
175
  "react-medium-image-zoom": "^5.4.9",
176
176
  "tailwindcss": "^4.3.3",
177
177
  "tsconfig": "0.0.0",
@@ -180,7 +180,7 @@
180
180
  "peerDependencies": {
181
181
  "@types/mdx": "*",
182
182
  "@types/react": "*",
183
- "fumadocs-core": "16.17.0",
183
+ "fumadocs-core": "16.17.2",
184
184
  "next": "16.x.x",
185
185
  "react": "^19.2.0",
186
186
  "react-dom": "^19.2.0",