fumadocs-ui 15.5.4 → 15.5.5

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.
package/css/neutral.css CHANGED
@@ -21,7 +21,7 @@
21
21
  --color-fd-background: hsl(0, 0%, 7.04%);
22
22
  --color-fd-foreground: hsl(0, 0%, 92%);
23
23
  --color-fd-muted: hsl(0, 0%, 12.9%);
24
- --color-fd-muted-foreground: hsl(0, 0%, 60.9%);
24
+ --color-fd-muted-foreground: hsla(0, 0%, 70%, 0.8);
25
25
  --color-fd-popover: hsl(0, 0%, 10.6%);
26
26
  --color-fd-popover-foreground: hsl(0, 0%, 86.9%);
27
27
  --color-fd-card: hsl(0, 0%, 9.8%);
@@ -1,5 +1,6 @@
1
1
  import { type HTMLAttributes } from 'react';
2
- export declare function Banner({ id, variant, changeLayout, height, ...props }: HTMLAttributes<HTMLDivElement> & {
2
+ type BannerVariant = 'rainbow' | 'normal';
3
+ export declare function Banner({ id, variant, changeLayout, height, rainbowColors, ...props }: HTMLAttributes<HTMLDivElement> & {
3
4
  /**
4
5
  * @defaultValue 3rem
5
6
  */
@@ -7,7 +8,11 @@ export declare function Banner({ id, variant, changeLayout, height, ...props }:
7
8
  /**
8
9
  * @defaultValue 'normal'
9
10
  */
10
- variant?: 'rainbow' | 'normal';
11
+ variant?: BannerVariant;
12
+ /**
13
+ * For rainbow variant only, customise the colors
14
+ */
15
+ rainbowColors?: string[];
11
16
  /**
12
17
  * Change Fumadocs layout styles
13
18
  *
@@ -15,4 +20,5 @@ export declare function Banner({ id, variant, changeLayout, height, ...props }:
15
20
  */
16
21
  changeLayout?: boolean;
17
22
  }): import("react/jsx-runtime").JSX.Element | null;
23
+ export {};
18
24
  //# sourceMappingURL=banner.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../src/components/banner.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAuB,MAAM,OAAO,CAAC;AAKjE,wBAAgB,MAAM,CAAC,EACrB,EAAE,EACF,OAAkB,EAClB,YAAmB,EACnB,MAAe,EACf,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG;IAClC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAE/B;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,kDAkEA"}
1
+ {"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../src/components/banner.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAuB,MAAM,OAAO,CAAC;AAKjE,KAAK,aAAa,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE1C,wBAAgB,MAAM,CAAC,EACrB,EAAE,EACF,OAAkB,EAClB,YAAmB,EACnB,MAAe,EACf,aAKC,EACD,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG;IAClC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IAExB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IAEzB;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,kDAuEA"}
@@ -4,7 +4,12 @@ import { useEffect, useState } from 'react';
4
4
  import { X } from '../icons.js';
5
5
  import { cn } from '../utils/cn.js';
6
6
  import { buttonVariants } from '../components/ui/button.js';
7
- export function Banner({ id, variant = 'normal', changeLayout = true, height = '3rem', ...props }) {
7
+ export function Banner({ id, variant = 'normal', changeLayout = true, height = '3rem', rainbowColors = [
8
+ 'rgba(0,149,255,0.56)',
9
+ 'rgba(231,77,255,0.77)',
10
+ 'rgba(255,0,0,0.73)',
11
+ 'rgba(131,255,166,0.66)',
12
+ ], ...props }) {
8
13
  const [open, setOpen] = useState(true);
9
14
  const globalKey = id ? `nd-banner-${id}` : null;
10
15
  useEffect(() => {
@@ -13,47 +18,37 @@ export function Banner({ id, variant = 'normal', changeLayout = true, height = '
13
18
  }, [globalKey]);
14
19
  if (!open)
15
20
  return null;
16
- return (_jsxs("div", { id: id, ...props, className: cn('sticky top-0 z-40 flex flex-row items-center justify-center bg-fd-secondary px-4 text-center text-sm font-medium', variant === 'rainbow' && 'bg-fd-background', !open && 'hidden', props.className), style: {
21
+ return (_jsxs("div", { id: id, ...props, className: cn('sticky top-0 z-40 flex flex-row items-center justify-center px-4 text-center text-sm font-medium', variant === 'normal' && 'bg-fd-secondary', variant === 'rainbow' && 'bg-fd-background', !open && 'hidden', props.className), style: {
17
22
  height,
18
23
  }, children: [changeLayout && open ? (_jsx("style", { children: globalKey
19
24
  ? `:root:not(.${globalKey}) { --fd-banner-height: ${height}; }`
20
25
  : `:root { --fd-banner-height: ${height}; }` })) : null, globalKey ? (_jsx("style", { children: `.${globalKey} #${id} { display: none; }` })) : null, globalKey ? (_jsx("script", { dangerouslySetInnerHTML: {
21
26
  __html: `if (localStorage.getItem('${globalKey}') === 'true') document.documentElement.classList.add('${globalKey}');`,
22
- } })) : null, variant === 'rainbow' ? rainbowLayer : null, props.children, id ? (_jsx("button", { type: "button", "aria-label": "Close Banner", onClick: () => {
27
+ } })) : null, variant === 'rainbow'
28
+ ? flow({
29
+ colors: rainbowColors,
30
+ })
31
+ : null, props.children, id ? (_jsx("button", { type: "button", "aria-label": "Close Banner", onClick: () => {
23
32
  setOpen(false);
24
33
  if (globalKey)
25
34
  localStorage.setItem(globalKey, 'true');
26
35
  }, className: cn(buttonVariants({
27
36
  color: 'ghost',
28
- className: 'absolute end-2 top-1/2 -translate-y-1/2 text-fd-muted-foreground',
29
- size: 'icon',
37
+ className: 'absolute end-2 top-1/2 -translate-y-1/2 text-fd-muted-foreground/50',
38
+ size: 'icon-sm',
30
39
  })), children: _jsx(X, {}) })) : null] }));
31
40
  }
32
41
  const maskImage = 'linear-gradient(to bottom,white,transparent), radial-gradient(circle at top center, white, transparent)';
33
- const rainbowLayer = (_jsxs(_Fragment, { children: [_jsx("div", { className: "absolute inset-0 z-[-1]", style: {
34
- maskImage,
35
- maskComposite: 'intersect',
36
- animation: 'fd-moving-banner 16s linear infinite',
37
- '--start': 'rgba(0,87,255,0.5)',
38
- '--mid': 'rgba(255,0,166,0.77)',
39
- '--end': 'rgba(255,77,0,0.4)',
40
- '--via': 'rgba(164,255,68,0.4)',
41
- animationDirection: 'reverse',
42
- backgroundImage: 'repeating-linear-gradient(60deg, var(--end), var(--start) 2%, var(--start) 5%, transparent 8%, transparent 14%, var(--via) 18%, var(--via) 22%, var(--mid) 28%, var(--mid) 30%, var(--via) 34%, var(--via) 36%, transparent, var(--end) calc(50% - 12px))',
43
- backgroundSize: '200% 100%',
44
- mixBlendMode: 'difference',
45
- } }), _jsx("div", { className: "absolute inset-0 z-[-1]", style: {
46
- maskImage,
47
- maskComposite: 'intersect',
48
- animation: 'fd-moving-banner 20s linear infinite',
49
- '--start': 'rgba(255,120,120,0.5)',
50
- '--mid': 'rgba(36,188,255,0.4)',
51
- '--end': 'rgba(64,0,255,0.51)',
52
- '--via': 'rgba(255,89,0,0.56)',
53
- backgroundImage: 'repeating-linear-gradient(45deg, var(--end), var(--start) 4%, var(--start) 8%, transparent 9%, transparent 14%, var(--mid) 16%, var(--mid) 20%, transparent, var(--via) 36%, var(--via) 40%, transparent 42%, var(--end) 46%, var(--end) calc(50% - 16.8px))',
54
- backgroundSize: '200% 100%',
55
- mixBlendMode: 'color-dodge',
56
- } }), _jsx("style", { children: `@keyframes fd-moving-banner {
42
+ function flow({ colors }) {
43
+ return (_jsxs(_Fragment, { children: [_jsx("div", { className: "absolute inset-0 z-[-1]", style: {
44
+ maskImage,
45
+ maskComposite: 'intersect',
46
+ animation: 'fd-moving-banner 20s linear infinite',
47
+ backgroundImage: `repeating-linear-gradient(70deg, ${[...colors, colors[0]].map((color, i) => `${color} ${(i * 50) / colors.length}%`).join(', ')})`,
48
+ backgroundSize: '200% 100%',
49
+ filter: 'saturate(2)',
50
+ } }), _jsx("style", { children: `@keyframes fd-moving-banner {
57
51
  from { background-position: 0% 0; }
58
52
  to { background-position: 100% 0; }
59
53
  }` })] }));
54
+ }
@@ -150,7 +150,7 @@ export function PageBreadcrumb({ includeRoot = false, includeSeparator, includeP
150
150
  }, [includePage, includeRoot, includeSeparator, path, root]);
151
151
  if (items.length === 0)
152
152
  return null;
153
- return (_jsx("div", { ...props, className: cn('flex items-center gap-1.5 text-[15px] text-fd-muted-foreground', props.className), children: items.map((item, i) => {
153
+ return (_jsx("div", { ...props, className: cn('flex items-center gap-1.5 text-sm text-fd-muted-foreground', props.className), children: items.map((item, i) => {
154
154
  const className = cn('truncate', i === items.length - 1 && 'text-fd-primary font-medium');
155
155
  return (_jsxs(Fragment, { children: [i !== 0 && _jsx("span", { className: "text-fd-foreground/30", children: "/" }), item.url ? (_jsx(Link, { href: item.url, className: cn(className, 'transition-opacity hover:opacity-80'), children: item.name })) : (_jsx("span", { className: className, children: item.name }))] }, i));
156
156
  }) }));
@@ -21,6 +21,6 @@ export function PageTOCPopoverItems({ variant = 'normal', ...props }) {
21
21
  return (_jsx(TOCScrollArea, { ...props, children: variant === 'clerk' ? _jsx(ClerkTOCItems, {}) : _jsx(TOCItems, {}) }));
22
22
  }
23
23
  export function PageArticle(props) {
24
- return (_jsx("article", { ...props, className: cn('flex min-w-0 w-full flex-col gap-6 px-4 pt-8 md:px-6 md:mx-auto xl:pt-12 xl:px-12', props.className), children: props.children }));
24
+ return (_jsx("article", { ...props, className: cn('flex min-w-0 w-full flex-col gap-4 px-4 pt-8 md:px-6 md:mx-auto xl:pt-12 xl:px-12', props.className), children: props.children }));
25
25
  }
26
26
  export { PageRoot, PageBreadcrumb, PageFooter, PageLastUpdate, PageTOC, PageTOCPopover, PageTOCPopoverTrigger, PageTOCPopoverContent, };
@@ -1 +1 @@
1
- {"version":3,"file":"navbar.d.ts","sourceRoot":"","sources":["../../../src/layouts/home/navbar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAY,MAAM,OAAO,CAAC;AACtD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAa,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAW/C,OAAO,KAAK,EACV,0BAA0B,EAC1B,0BAA0B,EAC3B,MAAM,iCAAiC,CAAC;AAOzC,wBAAgB,MAAM,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,2CA0BlD;AAED,eAAO,MAAM,UAAU,yNAAqB,CAAC;AAE7C,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,0BAA0B,2CAYlE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,0BAA0B,2CASlE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,2CAc9C;AAED,QAAA,MAAM,YAAY;;8EAiBhB,CAAC;AAEH,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,OAAO,EACP,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,YAAY,CAAC,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,2CAczE"}
1
+ {"version":3,"file":"navbar.d.ts","sourceRoot":"","sources":["../../../src/layouts/home/navbar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAY,MAAM,OAAO,CAAC;AACtD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAa,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAW/C,OAAO,KAAK,EACV,0BAA0B,EAC1B,0BAA0B,EAC3B,MAAM,iCAAiC,CAAC;AAOzC,wBAAgB,MAAM,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,2CA8BlD;AAED,eAAO,MAAM,UAAU,yNAAqB,CAAC;AAE7C,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,0BAA0B,2CAYlE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,0BAA0B,2CASlE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,2CAc9C;AAED,QAAA,MAAM,YAAY;;8EAiBhB,CAAC;AAEH,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,OAAO,EACP,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,YAAY,CAAC,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,2CAczE"}
@@ -12,7 +12,9 @@ const navItemVariants = cva('inline-flex items-center gap-1 p-2 text-fd-muted-fo
12
12
  export function Navbar(props) {
13
13
  const [value, setValue] = useState('');
14
14
  const { isTransparent } = useNav();
15
- return (_jsx(NavigationMenu, { value: value, onValueChange: setValue, asChild: true, children: _jsxs("header", { id: "nd-nav", ...props, className: cn('fixed top-(--fd-banner-height) z-40 inset-x-0 backdrop-blur-lg border-b transition-colors *:mx-auto *:max-w-fd-container', value.length > 0 ? 'shadow-lg' : 'shadow-sm', (!isTransparent || value.length > 0) && 'bg-fd-background/80', props.className), children: [_jsx(NavigationMenuList, { className: "flex h-14 w-full items-center px-4", asChild: true, children: _jsx("nav", { children: props.children }) }), _jsx(NavigationMenuViewport, { className: "text-fd-popover-foreground" })] }) }));
15
+ return (_jsx(NavigationMenu, { value: value, onValueChange: setValue, asChild: true, children: _jsxs("header", { id: "nd-nav", ...props, className: cn('fixed top-(--fd-banner-height) z-40 left-0 backdrop-blur-lg border-b transition-colors *:mx-auto *:max-w-fd-container', value.length > 0 && 'max-lg:shadow-lg max-lg:rounded-b-2xl', (!isTransparent || value.length > 0) && 'bg-fd-background/80', props.className), style: {
16
+ right: 'var(--removed-body-scroll-bar-size, 0px)',
17
+ }, children: [_jsx(NavigationMenuList, { className: "flex h-14 w-full items-center px-4", asChild: true, children: _jsx("nav", { children: props.children }) }), _jsx(NavigationMenuViewport, {})] }) }));
16
18
  }
17
19
  export const NavbarMenu = NavigationMenuItem;
18
20
  export function NavbarMenuContent(props) {
@@ -5,6 +5,7 @@ export declare function Navbar({ mode, ...props }: ComponentProps<'header'> & {
5
5
  }): import("react/jsx-runtime").JSX.Element;
6
6
  export declare function LayoutBody(props: ComponentProps<'main'>): import("react/jsx-runtime").JSX.Element;
7
7
  export declare function NavbarSidebarTrigger({ className, ...props }: ComponentProps<'button'>): import("react/jsx-runtime").JSX.Element;
8
- export declare function LayoutTabs(props: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
9
- export declare function LayoutTab(item: Option): import("react/jsx-runtime").JSX.Element;
8
+ export declare function LayoutTabs({ options, ...props }: ComponentProps<'div'> & {
9
+ options: Option[];
10
+ }): import("react/jsx-runtime").JSX.Element;
10
11
  //# sourceMappingURL=notebook-client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"notebook-client.d.ts","sourceRoot":"","sources":["../../src/layouts/notebook-client.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAQ5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAE9D,wBAAgB,MAAM,CAAC,EACrB,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,QAAQ,CAAC,GAAG;IAAE,IAAI,EAAE,KAAK,GAAG,MAAM,CAAA;CAAE,2CAoBrD;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,CAAC,MAAM,CAAC,2CAqBvD;AAED,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,QAAQ,CAAC,2CAkB1B;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,2CAYtD;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,2CAqBrC"}
1
+ {"version":3,"file":"notebook-client.d.ts","sourceRoot":"","sources":["../../src/layouts/notebook-client.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAW,MAAM,OAAO,CAAC;AAQrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAE9D,wBAAgB,MAAM,CAAC,EACrB,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,QAAQ,CAAC,GAAG;IAAE,IAAI,EAAE,KAAK,GAAG,MAAM,CAAA;CAAE,2CAoBrD;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,CAAC,MAAM,CAAC,2CAqBvD;AAED,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,QAAQ,CAAC,2CAkB1B;AAED,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,KAAK,CAAC,GAAG;IACzB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,2CA+BA"}
@@ -1,6 +1,7 @@
1
1
  'use client';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { cn } from '../utils/cn.js';
4
+ import { useMemo } from 'react';
4
5
  import { useSidebar } from '../contexts/sidebar.js';
5
6
  import { useNav } from '../contexts/layout.js';
6
7
  import { buttonVariants } from '../components/ui/button.js';
@@ -32,16 +33,19 @@ export function NavbarSidebarTrigger({ className, ...props }) {
32
33
  className,
33
34
  })), onClick: () => setOpen((prev) => !prev), children: _jsx(SidebarIcon, {}) }));
34
35
  }
35
- export function LayoutTabs(props) {
36
- return (_jsx("div", { ...props, className: cn('flex flex-row items-end gap-6 overflow-auto', props.className), children: props.children }));
37
- }
38
- export function LayoutTab(item) {
39
- const { closeOnRedirect } = useSidebar();
36
+ export function LayoutTabs({ options, ...props }) {
40
37
  const pathname = usePathname();
41
- const selected = item.urls
42
- ? item.urls.has(pathname.endsWith('/') ? pathname.slice(0, -1) : pathname)
43
- : isActive(item.url, pathname, true);
44
- return (_jsx(Link, { className: cn('inline-flex items-center py-2.5 border-b border-transparent gap-2 text-fd-muted-foreground text-sm text-nowrap', selected && 'text-fd-foreground font-medium border-fd-primary'), href: item.url, onClick: () => {
45
- closeOnRedirect.current = false;
46
- }, children: item.title }));
38
+ const selected = useMemo(() => {
39
+ const url = pathname.endsWith('/') ? pathname.slice(0, -1) : pathname;
40
+ return options.findLast((option) => {
41
+ if (option.urls) {
42
+ return option.urls.has(url);
43
+ }
44
+ return isActive(option.url, pathname, true);
45
+ });
46
+ }, [options, pathname]);
47
+ return (_jsx("div", { ...props, className: cn('flex flex-row items-end gap-6 overflow-auto', props.className), children: options.map((option) => (_jsx(LayoutTab, { selected: selected === option, option: option }, option.url))) }));
48
+ }
49
+ function LayoutTab({ option, selected = false, }) {
50
+ return (_jsx(Link, { className: cn('inline-flex items-center py-2.5 border-b border-transparent gap-2 text-fd-muted-foreground text-sm text-nowrap', selected && 'text-fd-foreground font-medium border-fd-primary'), href: option.url, children: option.title }));
47
51
  }
@@ -1 +1 @@
1
- {"version":3,"file":"notebook.d.ts","sourceRoot":"","sources":["../../src/layouts/notebook.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,cAAc,EAAW,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,KAAK,eAAe,EAAY,MAAM,kBAAkB,CAAC;AAqBlE,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAIL,MAAM,EACN,oBAAoB,EACrB,MAAM,mBAAmB,CAAC;AAU3B,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAE/B,GAAG,CAAC,EAAE,eAAe,CAAC,KAAK,CAAC,GAAG;QAC7B,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;KACvB,CAAC;IAEF,OAAO,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IAElC,cAAc,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;CACjD;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,2CAiJhD;AAsLD,OAAO,EAAE,MAAM,EAAE,oBAAoB,EAAE,CAAC"}
1
+ {"version":3,"file":"notebook.d.ts","sourceRoot":"","sources":["../../src/layouts/notebook.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,cAAc,EAAW,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,KAAK,eAAe,EAAY,MAAM,kBAAkB,CAAC;AAqBlE,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAGL,MAAM,EACN,oBAAoB,EACrB,MAAM,mBAAmB,CAAC;AAU3B,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAE/B,GAAG,CAAC,EAAE,eAAe,CAAC,KAAK,CAAC,GAAG;QAC7B,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;KACvB,CAAC;IAEF,OAAO,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IAElC,cAAc,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;CACjD;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,2CAiJhD;AA8LD,OAAO,EAAE,MAAM,EAAE,oBAAoB,EAAE,CAAC"}
@@ -11,7 +11,7 @@ import { LanguageToggle } from '../components/layout/language-toggle.js';
11
11
  import { ThemeToggle } from '../components/layout/theme-toggle.js';
12
12
  import { Popover, PopoverContent, PopoverTrigger, } from '../components/ui/popover.js';
13
13
  import { getSidebarTabsFromOptions, SidebarLinkItem, } from '../layouts/docs/shared.js';
14
- import { LayoutBody, LayoutTab, LayoutTabs, Navbar, NavbarSidebarTrigger, } from './notebook-client.js';
14
+ import { LayoutBody, LayoutTabs, Navbar, NavbarSidebarTrigger, } from './notebook-client.js';
15
15
  import { NavProvider } from '../contexts/layout.js';
16
16
  import { RootToggle } from '../components/layout/root-toggle.js';
17
17
  import Link from 'fumadocs-core/link';
@@ -29,7 +29,7 @@ export function DocsLayout(props) {
29
29
  className: 'mt-px mb-auto text-fd-muted-foreground',
30
30
  })), children: _jsx(SidebarIcon, {}) }))] }));
31
31
  return (_jsx(TreeContextProvider, { tree: props.tree, children: _jsx(NavProvider, { transparentMode: transparentMode, children: _jsxs(LayoutBody, { ...props.containerProps, className: cn(variables, props.containerProps?.className), children: [_jsxs(Sidebar, { ...sidebar, className: cn(navMode === 'top'
32
- ? 'md:bg-transparent'
32
+ ? 'border-e-0 md:bg-transparent'
33
33
  : 'md:[--fd-nav-height:0px]', sidebar.className), children: [_jsx(HideIfEmpty, { children: _jsxs(SidebarHeader, { children: [navMode === 'auto' && sidebarHeader, nav.children, sidebarBanner, tabMode === 'sidebar' && tabs.length > 0 ? (_jsx(RootToggle, { className: "mb-2", options: tabs })) : null, tabMode === 'navbar' && tabs.length > 0 && (_jsx(RootToggle, { options: tabs, className: "lg:hidden" }))] }) }), _jsxs(SidebarViewport, { children: [links
34
34
  .filter((item) => item.type !== 'icon')
35
35
  .map((item, i) => (_jsx(SidebarLinkItem, { item: item, className: cn('lg:hidden', i === links.length - 1 && 'mb-4') }, i))), _jsx(SidebarPageTree, { components: sidebarComponents })] }), _jsx(HideIfEmpty, { children: _jsxs(SidebarFooter, { className: "flex flex-row items-center justify-end", children: [_jsx("div", { className: "flex items-center flex-1 empty:hidden lg:hidden", children: links
@@ -49,7 +49,7 @@ function DocsNavbar({ links, tabs, searchToggle = {}, themeSwitch = {}, ...props
49
49
  color: 'ghost',
50
50
  size: 'icon-sm',
51
51
  }), 'text-fd-muted-foreground -ms-1.5 me-2 data-[collapsed=false]:hidden max-md:hidden'), children: _jsx(SidebarIcon, {}) })) : null, nav] }), searchToggle.enabled !== false &&
52
- (searchToggle.components?.lg ?? (_jsx(LargeSearchToggle, { hideIfDisabled: true, className: cn('w-full my-auto max-md:hidden', navMode === 'top'
52
+ (searchToggle.components?.lg ? (_jsx("div", { className: cn('w-full my-auto max-md:hidden', navMode === 'top' ? 'rounded-xl max-w-sm' : 'max-w-[240px]'), children: searchToggle.components?.lg })) : (_jsx(LargeSearchToggle, { hideIfDisabled: true, className: cn('w-full my-auto max-md:hidden', navMode === 'top'
53
53
  ? 'rounded-xl max-w-sm ps-2.5'
54
54
  : 'max-w-[240px]') }))), _jsxs("div", { className: "flex flex-1 flex-row items-center justify-end", children: [_jsx("div", { className: "flex flex-row items-center gap-6 px-4 empty:hidden max-lg:hidden", children: links
55
55
  .filter((item) => item.type !== 'icon')
@@ -60,7 +60,7 @@ function DocsNavbar({ links, tabs, searchToggle = {}, themeSwitch = {}, ...props
60
60
  (themeSwitch.component ?? (_jsx(ThemeToggle, { className: "ms-2 max-md:hidden", mode: themeSwitch.mode ?? 'light-dark-system' }))), sidebarCollapsible && navMode === 'top' ? (_jsx(SidebarCollapseTrigger, { className: cn(buttonVariants({
61
61
  color: 'secondary',
62
62
  size: 'icon-sm',
63
- }), 'ms-2 text-fd-muted-foreground rounded-full max-md:hidden'), children: _jsx(SidebarIcon, {}) })) : null] })] }), tabs.length > 0 ? (_jsx(LayoutTabs, { className: "px-6 border-b h-10 max-lg:hidden", children: tabs.map((tab) => (_jsx(LayoutTab, { ...tab }, tab.url))) })) : null] }));
63
+ }), 'ms-2 text-fd-muted-foreground rounded-full max-md:hidden'), children: _jsx(SidebarIcon, {}) })) : null] })] }), tabs.length > 0 && (_jsx(LayoutTabs, { className: "px-6 border-b h-10 max-lg:hidden", options: tabs }))] }));
64
64
  }
65
65
  function NavbarLinkItem({ item, ...props }) {
66
66
  if (item.type === 'menu') {
package/dist/style.css CHANGED
@@ -373,6 +373,9 @@
373
373
  .bottom-1\.5 {
374
374
  bottom: calc(var(--spacing) * 1.5);
375
375
  }
376
+ .left-0 {
377
+ left: calc(var(--spacing) * 0);
378
+ }
376
379
  .left-1\/2 {
377
380
  left: calc(1/2 * 100%);
378
381
  }
@@ -1278,6 +1281,10 @@
1278
1281
  border-inline-end-style: var(--tw-border-style);
1279
1282
  border-inline-end-width: 1px;
1280
1283
  }
1284
+ .border-e-0 {
1285
+ border-inline-end-style: var(--tw-border-style);
1286
+ border-inline-end-width: 0px;
1287
+ }
1281
1288
  .border-t {
1282
1289
  border-top-style: var(--tw-border-style);
1283
1290
  border-top-width: 1px;
@@ -1600,6 +1607,12 @@
1600
1607
  .text-fd-muted-foreground {
1601
1608
  color: var(--color-fd-muted-foreground);
1602
1609
  }
1610
+ .text-fd-muted-foreground\/50 {
1611
+ color: color-mix(in srgb, hsl(0, 0%, 45.1%) 50%, transparent);
1612
+ @supports (color: color-mix(in lab, red, red)) {
1613
+ color: color-mix(in oklab, var(--color-fd-muted-foreground) 50%, transparent);
1614
+ }
1615
+ }
1603
1616
  .text-fd-popover-foreground {
1604
1617
  color: var(--color-fd-popover-foreground);
1605
1618
  }
@@ -2112,6 +2125,18 @@
2112
2125
  display: none;
2113
2126
  }
2114
2127
  }
2128
+ .max-lg\:rounded-b-2xl {
2129
+ @media (width < 64rem) {
2130
+ border-bottom-right-radius: var(--radius-2xl);
2131
+ border-bottom-left-radius: var(--radius-2xl);
2132
+ }
2133
+ }
2134
+ .max-lg\:shadow-lg {
2135
+ @media (width < 64rem) {
2136
+ --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
2137
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
2138
+ }
2139
+ }
2115
2140
  .max-md\:invisible {
2116
2141
  @media (width < 48rem) {
2117
2142
  visibility: hidden;
@@ -2437,7 +2462,7 @@
2437
2462
  --color-fd-background: hsl(0, 0%, 7.04%);
2438
2463
  --color-fd-foreground: hsl(0, 0%, 92%);
2439
2464
  --color-fd-muted: hsl(0, 0%, 12.9%);
2440
- --color-fd-muted-foreground: hsl(0, 0%, 60.9%);
2465
+ --color-fd-muted-foreground: hsla(0, 0%, 70%, 0.8);
2441
2466
  --color-fd-popover: hsl(0, 0%, 10.6%);
2442
2467
  --color-fd-popover-foreground: hsl(0, 0%, 86.9%);
2443
2468
  --color-fd-card: hsl(0, 0%, 9.8%);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-ui",
3
- "version": "15.5.4",
3
+ "version": "15.5.5",
4
4
  "description": "The framework for building a documentation website in Next.js",
5
5
  "keywords": [
6
6
  "NextJs",
@@ -89,7 +89,7 @@
89
89
  "react-medium-image-zoom": "^5.2.14",
90
90
  "scroll-into-view-if-needed": "^3.1.0",
91
91
  "tailwind-merge": "^3.3.1",
92
- "fumadocs-core": "15.5.4"
92
+ "fumadocs-core": "15.5.5"
93
93
  },
94
94
  "devDependencies": {
95
95
  "@next/eslint-plugin-next": "^15.3.4",
@@ -100,9 +100,9 @@
100
100
  "next": "15.3.4",
101
101
  "tailwindcss": "^4.1.10",
102
102
  "tsc-alias": "^1.8.16",
103
- "eslint-config-custom": "0.0.0",
104
103
  "@fumadocs/cli": "0.2.1",
105
- "fumadocs-core": "15.5.4",
104
+ "fumadocs-core": "15.5.5",
105
+ "eslint-config-custom": "0.0.0",
106
106
  "tsconfig": "0.0.0"
107
107
  },
108
108
  "peerDependencies": {