fumadocs-ui 15.5.3 → 15.5.4

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
@@ -12,7 +12,7 @@
12
12
  --color-fd-primary-foreground: hsl(0, 0%, 98%);
13
13
  --color-fd-secondary: hsl(0, 0%, 93.1%);
14
14
  --color-fd-secondary-foreground: hsl(0, 0%, 9%);
15
- --color-fd-accent: hsl(0, 0%, 90.1%);
15
+ --color-fd-accent: hsla(0, 0%, 82%, 50%);
16
16
  --color-fd-accent-foreground: hsl(0, 0%, 9%);
17
17
  --color-fd-ring: hsl(0, 0%, 63.9%);
18
18
  }
@@ -22,8 +22,8 @@
22
22
  --color-fd-foreground: hsl(0, 0%, 92%);
23
23
  --color-fd-muted: hsl(0, 0%, 12.9%);
24
24
  --color-fd-muted-foreground: hsl(0, 0%, 60.9%);
25
- --color-fd-popover: hsl(0, 0%, 9.8%);
26
- --color-fd-popover-foreground: hsl(0, 0%, 88%);
25
+ --color-fd-popover: hsl(0, 0%, 10.6%);
26
+ --color-fd-popover-foreground: hsl(0, 0%, 86.9%);
27
27
  --color-fd-card: hsl(0, 0%, 9.8%);
28
28
  --color-fd-card-foreground: hsl(0, 0%, 98%);
29
29
  --color-fd-border: hsla(0, 0%, 40%, 20%);
package/css/shiki.css CHANGED
@@ -4,8 +4,7 @@
4
4
  }
5
5
 
6
6
  code .line {
7
- line-height: 1.45em;
8
- min-height: 1.45em;
7
+ min-height: 1lh;
9
8
  @apply relative;
10
9
  }
11
10
 
@@ -1 +1 @@
1
- {"version":3,"file":"codeblock.d.ts","sourceRoot":"","sources":["../../src/components/codeblock.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AAKf,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG;IACzD;;;;OAIG;IACH,IAAI,CAAC,EAAE,SA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AC,WAAW,CAAC;IAE3C;;OAEG;0BACmB,OAAO;IAE7B;;OAEG;gCACyB,MAAM;+CAyGnC,CAAC"}
@@ -17,7 +17,7 @@ export const CodeBlock = forwardRef(({ title, allowCopy = true, keepBackground =
17
17
  return;
18
18
  const clone = pre.cloneNode(true);
19
19
  clone.querySelectorAll('.nd-copy-ignore').forEach((node) => {
20
- node.remove();
20
+ node.replaceWith('\n');
21
21
  });
22
22
  void navigator.clipboard.writeText(clone.textContent ?? '');
23
23
  };
@@ -25,7 +25,7 @@ export const CodeBlock = forwardRef(({ title, allowCopy = true, keepBackground =
25
25
  ? {
26
26
  __html: icon,
27
27
  }
28
- : undefined, children: typeof icon !== 'string' ? icon : null })) : null, _jsx("figcaption", { className: "flex-1 truncate text-fd-muted-foreground", children: title }), allowCopy ? (_jsx(CopyButton, { className: "-me-2", onCopy: onCopy })) : null] })) : (allowCopy && (_jsx(CopyButton, { className: "absolute right-2 top-2 z-[2] backdrop-blur-md", onCopy: onCopy }))), _jsx("div", { ref: areaRef, ...viewportProps, className: cn('text-[13px] py-3.5 overflow-auto [&_.line]:px-4 max-h-[600px] fd-scroll-container', props['data-line-numbers'] && '[&_.line]:pl-3', viewportProps?.className), style: {
28
+ : undefined, children: typeof icon !== 'string' ? icon : null })) : null, _jsx("figcaption", { className: "flex-1 truncate text-fd-muted-foreground", children: title }), allowCopy && _jsx(CopyButton, { className: "-me-2", onCopy: onCopy })] })) : (allowCopy && (_jsx(CopyButton, { className: "absolute right-2 top-2 z-[2] backdrop-blur-md", onCopy: onCopy }))), _jsx("div", { ref: areaRef, ...viewportProps, className: cn('text-[13px] py-3.5 overflow-auto [&_.line]:px-4 max-h-[600px] fd-scroll-container', props['data-line-numbers'] && '[&_.line]:pl-3', viewportProps?.className), style: {
29
29
  counterSet: props['data-line-numbers']
30
30
  ? `line ${Number(props['data-line-numbers-start'] ?? 1) - 1}`
31
31
  : undefined,
@@ -1 +1 @@
1
- {"version":3,"file":"search.d.ts","sourceRoot":"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KAAK,CAAC;IAC1D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAC/C,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAaD,wBAAgB,QAAQ,CAAC,EACvB,GAAG,EACH,WAAW,EACX,UAAkB,EAClB,GAAG,KAAK,EACT,EAAE,aAAa,2CAoBf;AAED,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,QAAQ,CAAC,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;CACf,2CAkBA;AAED,wBAAgB,SAAS;UAjajB,OAAO;kBACC,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI;YAC7B,MAAM;oBACE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;eAExB,OAAO;EAganB;AAED,wBAAgB,WAAW;YAzZjB,MAAM;mBACC,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI;gBACtC,OAAO;EA2ZpB;AAED,wBAAgB,aAAa;YApanB,MAAM,GAAG,IAAI;eACV,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI;EAuatC"}
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { FileText, Hash, Search as SearchIcon, Text, X } from '../../icons.js';
3
+ import { FileText, Hash, Search as SearchIcon } from '../../icons.js';
4
4
  import { createContext, Fragment, useCallback, useContext, useEffect, useMemo, useRef, useState, } from 'react';
5
5
  import { I18nLabel, useI18n } from '../../contexts/i18n.js';
6
6
  import { cn } from '../../utils/cn.js';
@@ -10,6 +10,7 @@ import { cva } from 'class-variance-authority';
10
10
  import { useEffectEvent } from 'fumadocs-core/utils/use-effect-event';
11
11
  import { useRouter } from 'fumadocs-core/framework';
12
12
  import { useOnChange } from 'fumadocs-core/utils/use-on-change';
13
+ import scrollIntoView from 'scroll-into-view-if-needed';
13
14
  const Context = createContext(null);
14
15
  const ListContext = createContext(null);
15
16
  const TagsListContext = createContext(null);
@@ -26,30 +27,30 @@ export function SearchDialog({ open, onOpenChange, search, onSearchChange, isLoa
26
27
  }), [active, isLoading, onOpenChange, onSearchChange, open, search]), children: children }) }));
27
28
  }
28
29
  export function SearchDialogHeader(props) {
29
- return (_jsx("div", { ...props, className: cn('flex flex-row items-center gap-2 px-3', props.className) }));
30
+ return (_jsx("div", { ...props, className: cn('flex flex-row items-center gap-2 p-3 pb-2', props.className) }));
30
31
  }
31
32
  export function SearchDialogInput(props) {
32
33
  const { text } = useI18n();
33
34
  const { search, onSearchChange } = useSearch();
34
- return (_jsx("input", { ...props, value: search, onChange: (e) => onSearchChange(e.target.value), placeholder: text.search, className: "w-0 flex-1 bg-transparent py-3 text-base placeholder:text-fd-muted-foreground focus-visible:outline-none" }));
35
+ return (_jsx("input", { ...props, value: search, onChange: (e) => onSearchChange(e.target.value), placeholder: text.search, className: "w-0 flex-1 bg-transparent text-lg placeholder:text-fd-muted-foreground focus-visible:outline-none" }));
35
36
  }
36
- export function SearchDialogClose({ children = _jsx(X, {}), className, ...props }) {
37
+ export function SearchDialogClose({ children = 'ESC', className, ...props }) {
37
38
  const { onOpenChange } = useSearch();
38
- return (_jsx("button", { type: "button", "aria-label": "Close", onClick: () => onOpenChange(false), className: cn(buttonVariants({
39
- color: 'ghost',
40
- size: 'icon-sm',
41
- className: 'text-fd-muted-foreground -me-1.5',
39
+ return (_jsx("button", { type: "button", onClick: () => onOpenChange(false), className: cn(buttonVariants({
40
+ color: 'outline',
41
+ size: 'sm',
42
+ className: 'font-mono text-fd-muted-foreground',
42
43
  }), className), ...props, children: children }));
43
44
  }
44
45
  export function SearchDialogFooter(props) {
45
- return (_jsx("div", { ...props, className: cn('border-t bg-fd-secondary/50 p-3 empty:hidden', props.className) }));
46
+ return (_jsx("div", { ...props, className: cn('bg-fd-secondary/50 p-3 empty:hidden', props.className) }));
46
47
  }
47
48
  export function SearchDialogOverlay(props) {
48
- return (_jsx(DialogOverlay, { ...props, className: cn('fixed inset-0 z-50 max-md:backdrop-blur-sm data-[state=open]:animate-fd-fade-in data-[state=closed]:animate-fd-fade-out', props.className) }));
49
+ return (_jsx(DialogOverlay, { ...props, className: cn('fixed inset-0 z-50 max-md:backdrop-blur-xs data-[state=open]:animate-fd-fade-in data-[state=closed]:animate-fd-fade-out', props.className) }));
49
50
  }
50
51
  export function SearchDialogContent({ children, ...props }) {
51
52
  const { text } = useI18n();
52
- return (_jsxs(DialogContent, { "aria-describedby": undefined, ...props, className: cn('fixed left-1/2 top-[10vh] z-50 w-[calc(100vw-2*var(--spacing))] max-w-screen-sm -translate-x-1/2 rounded-2xl border bg-fd-popover/50 backdrop-blur-lg text-fd-popover-foreground shadow-2xl overflow-hidden shadow-black/30 data-[state=closed]:animate-fd-dialog-out data-[state=open]:animate-fd-dialog-in', props.className), children: [_jsx(DialogTitle, { className: "hidden", children: text.search }), children] }));
53
+ return (_jsxs(DialogContent, { "aria-describedby": undefined, ...props, className: cn('fixed divide-y divide-fd-border left-1/2 top-4 md:top-[calc(50%-250px)] z-50 w-[calc(100%-2*var(--spacing))] max-w-screen-sm -translate-x-1/2 rounded-2xl border bg-fd-popover/60 backdrop-blur-xl text-fd-popover-foreground shadow-2xl shadow-black/40 overflow-hidden data-[state=closed]:animate-fd-dialog-out data-[state=open]:animate-fd-dialog-in', props.className), children: [_jsx(DialogTitle, { className: "hidden", children: text.search }), children] }));
53
54
  }
54
55
  export function SearchDialogList({ items = null, Empty = () => (_jsx("div", { className: "py-12 text-center text-sm text-fd-muted-foreground", children: _jsx(I18nLabel, { label: "searchNoResult" }) })), Item = (props) => _jsx(SearchDialogListItem, { ...props }), ...props }) {
55
56
  const ref = useRef(null);
@@ -106,30 +107,34 @@ export function SearchDialogList({ items = null, Empty = () => (_jsx("div", { cl
106
107
  setActive(items[0].id);
107
108
  }
108
109
  });
109
- return (_jsx("div", { ...props, ref: ref, className: cn('overflow-hidden h-(--fd-animated-height) transition-[height]', items && 'border-t', props.className), children: _jsx("div", { className: cn('w-full flex flex-col overflow-y-auto max-h-[460px]', !items && 'hidden'), children: _jsxs(ListContext.Provider, { value: useMemo(() => ({
110
+ return (_jsx("div", { ...props, ref: ref, className: cn('overflow-hidden h-(--fd-animated-height) transition-[height]', !items && 'border-b-0', props.className), children: _jsx("div", { className: cn('w-full flex flex-col overflow-y-auto max-h-[460px] p-1', !items && 'hidden'), children: _jsxs(ListContext.Provider, { value: useMemo(() => ({
110
111
  active,
111
112
  setActive,
112
113
  }), [active]), children: [items?.length === 0 && Empty(), items?.map((item) => (_jsx(Fragment, { children: Item({ item, onClick: () => onOpen(item) }) }, item.id)))] }) }) }));
113
114
  }
114
115
  const icons = {
115
- text: _jsx(Text, { className: "size-4 shrink-0 text-fd-muted-foreground" }),
116
+ text: null,
116
117
  heading: _jsx(Hash, { className: "size-4 shrink-0 text-fd-muted-foreground" }),
117
- page: _jsx(FileText, { className: "size-4 shrink-0" }),
118
+ page: (_jsx(FileText, { className: "size-6 text-fd-muted-foreground bg-fd-muted border p-0.5 rounded-sm shadow-sm shrink-0" })),
118
119
  };
119
120
  export function SearchDialogListItem({ item, className, children, ...props }) {
120
121
  const { active: activeId, setActive } = useSearchList();
121
122
  const active = item.id === activeId;
122
123
  return (_jsx("button", { type: "button", ref: useCallback((element) => {
123
124
  if (active && element) {
124
- element.scrollIntoView({
125
+ scrollIntoView(element, {
126
+ scrollMode: 'if-needed',
125
127
  block: 'nearest',
128
+ boundary: element.parentElement,
126
129
  });
127
130
  }
128
- }, [active]), "aria-selected": active, className: cn('relative flex select-none flex-row items-center gap-2.5 px-3 py-2 text-start text-sm', active && 'bg-fd-accent text-fd-accent-foreground', item.type !== 'page' && 'ps-8', className), onPointerMove: () => setActive(item.id), ...props, children: children ?? (_jsxs(_Fragment, { children: [item.type !== 'page' && (_jsx("div", { role: "none", className: "absolute start-5 inset-y-0 w-px bg-fd-border" })), icons[item.type], _jsx("p", { className: "min-w-0 truncate", children: item.content })] })) }));
131
+ }, [active]), "aria-selected": active, className: cn('relative flex select-none flex-row items-center gap-2 p-2 text-start text-sm rounded-lg', item.type !== 'page' && 'ps-8', item.type === 'page' || item.type === 'heading'
132
+ ? 'font-medium'
133
+ : 'text-fd-popover-foreground/80', active && 'bg-fd-accent text-fd-accent-foreground', className), onPointerMove: () => setActive(item.id), ...props, children: children ?? (_jsxs(_Fragment, { children: [item.type !== 'page' && (_jsx("div", { role: "none", className: "absolute start-4.5 inset-y-0 w-px bg-fd-border" })), icons[item.type], _jsx("p", { className: "min-w-0 truncate", children: item.content })] })) }));
129
134
  }
130
135
  export function SearchDialogIcon(props) {
131
136
  const { isLoading } = useSearch();
132
- return (_jsx(SearchIcon, { ...props, className: cn('size-4.5 text-fd-muted-foreground', isLoading && 'animate-pulse duration-400', props.className) }));
137
+ return (_jsx(SearchIcon, { ...props, className: cn('size-5 text-fd-muted-foreground', isLoading && 'animate-pulse duration-400', props.className) }));
133
138
  }
134
139
  const itemVariants = cva('rounded-md border px-2 py-0.5 text-xs font-medium text-fd-muted-foreground transition-colors', {
135
140
  variants: {
@@ -1 +1 @@
1
- {"version":3,"file":"root-toggle.d.ts","sourceRoot":"","sources":["../../../src/components/layout/root-toggle.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAC;AAQ/E,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB;;OAEG;IACH,IAAI,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAEnB,KAAK,CAAC,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC;CAC7B;AAED,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,WAAW,EACX,GAAG,KAAK,EACT,EAAE;IACD,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,GAAG,cAAc,CAAC,QAAQ,CAAC,2CAyD3B"}
1
+ {"version":3,"file":"root-toggle.d.ts","sourceRoot":"","sources":["../../../src/components/layout/root-toggle.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAC;AAQ/E,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB;;OAEG;IACH,IAAI,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAEnB,KAAK,CAAC,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC;CAC7B;AAED,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,WAAW,EACX,GAAG,KAAK,EACT,EAAE;IACD,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,GAAG,cAAc,CAAC,QAAQ,CAAC,2CAqF3B"}
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { ChevronsUpDown } from '../../icons.js';
3
+ import { Check, ChevronsUpDown } from '../../icons.js';
4
4
  import { useMemo, useState } from 'react';
5
5
  import Link from 'fumadocs-core/link';
6
6
  import { usePathname } from 'fumadocs-core/framework';
@@ -13,19 +13,20 @@ export function RootToggle({ options, placeholder, ...props }) {
13
13
  const { closeOnRedirect } = useSidebar();
14
14
  const pathname = usePathname();
15
15
  const selected = useMemo(() => {
16
- return options.findLast((item) => item.urls
17
- ? item.urls.has(pathname.endsWith('/') ? pathname.slice(0, -1) : pathname)
18
- : isActive(item.url, pathname, true));
16
+ const lookup = pathname.endsWith('/') ? pathname.slice(0, -1) : pathname;
17
+ return options.findLast((item) => {
18
+ if (item.urls)
19
+ return item.urls.has(lookup);
20
+ return isActive(item.url, pathname, true);
21
+ });
19
22
  }, [options, pathname]);
20
23
  const onClick = () => {
21
24
  closeOnRedirect.current = false;
22
25
  setOpen(false);
23
26
  };
24
- const item = selected ? _jsx(Item, { ...selected }) : placeholder;
25
- return (_jsxs(Popover, { open: open, onOpenChange: setOpen, children: [item ? (_jsxs(PopoverTrigger, { ...props, className: cn('flex items-center gap-2 rounded-lg pe-2 hover:text-fd-accent-foreground', props.className), children: [item, _jsx(ChevronsUpDown, { className: "size-4 text-fd-muted-foreground" })] })) : null, _jsx(PopoverContent, { className: "w-(--radix-popover-trigger-width) overflow-hidden p-0", children: options.map((item) => (_jsx(Link, { href: item.url, onClick: onClick, ...item.props, className: cn('flex w-full flex-row items-center gap-2 px-2 py-1.5', selected === item
26
- ? 'bg-fd-accent text-fd-accent-foreground'
27
- : 'hover:bg-fd-accent/50', item.props?.className), children: _jsx(Item, { ...item }) }, item.url))) })] }));
28
- }
29
- function Item(props) {
30
- return (_jsxs(_Fragment, { children: [_jsx(_Fragment, { children: props.icon }), _jsxs("div", { className: "flex-1 text-start", children: [_jsx("p", { className: "text-[15px] font-medium md:text-sm", children: props.title }), props.description ? (_jsx("p", { className: "text-sm text-fd-muted-foreground md:text-xs", children: props.description })) : null] })] }));
27
+ const item = selected ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "size-9 md:size-5", children: selected.icon }), _jsxs("div", { children: [_jsx("p", { className: "text-sm font-medium", children: selected.title }), _jsx("p", { className: "text-[13px] text-fd-muted-foreground empty:hidden md:hidden", children: selected.description })] })] })) : (placeholder);
28
+ return (_jsxs(Popover, { open: open, onOpenChange: setOpen, children: [item && (_jsxs(PopoverTrigger, { ...props, className: cn('flex items-center gap-2 rounded-lg p-2 border bg-fd-secondary/50 text-start text-fd-secondary-foreground transition-colors hover:bg-fd-accent data-[state=open]:bg-fd-accent data-[state=open]:text-fd-accent-foreground', props.className), children: [item, _jsx(ChevronsUpDown, { className: "ms-auto size-4 text-fd-muted-foreground" })] })), _jsx(PopoverContent, { className: "flex flex-col gap-1 min-w-(--radix-popover-trigger-width) overflow-hidden p-1", children: options.map((item) => {
29
+ const isActive = item === selected;
30
+ return (_jsxs(Link, { href: item.url, onClick: onClick, ...item.props, className: cn('flex items-center gap-2 rounded-lg p-1.5 hover:bg-fd-accent hover:text-fd-accent-foreground', item.props?.className), children: [_jsx("div", { className: "size-9 md:size-5 md:mt-1 md:mb-auto", children: item.icon }), _jsxs("div", { children: [_jsx("p", { className: "text-sm font-medium", children: item.title }), _jsx("p", { className: "text-[13px] text-fd-muted-foreground empty:hidden", children: item.description })] }), _jsx(Check, { className: cn('ms-auto size-3.5 text-fd-primary', !isActive && 'invisible') })] }, item.url));
31
+ }) })] }));
31
32
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../../src/components/layout/sidebar.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,EAAE,EAEP,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AACf,OAAa,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAU1D,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAGnE,OAAO,KAAK,EACV,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAMrD,MAAM,WAAW,YAAa,SAAQ,cAAc,CAAC,OAAO,CAAC;IAC3D;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;OAIG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AkB1D;AAED,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,SAAS,GAAG;IACb,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,2CAsBA;AAED,wBAAgB,aAAa,CAAC,EAC5B,WAAmB,EACnB,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,KAAK,CAAC,GAAG;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,2CAgBA;AAED,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,uBAAuB,2CAqBzB;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS,2CAsCjD;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,uBAAuB,2CAqBlE;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,cAAc,CAAC,QAAQ,CAAC,2CAgBrE;AAgBD,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,EAAE,CAAC;QAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAA;KAAE,CAAC,CAAC;IAClC,MAAM,EAAE,EAAE,CAAC;QAAE,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,SAAS,CAAA;KAAE,CAAC,CAAC;IAC1E,SAAS,EAAE,EAAE,CAAC;QAAE,IAAI,EAAE,QAAQ,CAAC,SAAS,CAAA;KAAE,CAAC,CAAC;CAC7C;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;CACzC,2CAuDA"}
@@ -13,9 +13,8 @@ import { useSidebar } from '../../contexts/sidebar.js';
13
13
  import { cva } from 'class-variance-authority';
14
14
  import { useTreeContext, useTreePath } from '../../contexts/tree.js';
15
15
  import { useMediaQuery } from 'fumadocs-core/utils/use-media-query';
16
- import { RemoveScroll } from 'react-remove-scroll';
17
16
  import { Presence } from '@radix-ui/react-presence';
18
- const itemVariants = cva('relative flex flex-row items-center gap-2 rounded-lg p-2 text-start text-fd-muted-foreground [overflow-wrap:anywhere] md:py-1.5 [&_svg]:size-4 [&_svg]:shrink-0', {
17
+ const itemVariants = cva('relative flex flex-row items-center gap-2 rounded-xl p-2 text-start text-fd-muted-foreground [overflow-wrap:anywhere] [&_svg]:size-4 [&_svg]:shrink-0', {
19
18
  variants: {
20
19
  active: {
21
20
  true: 'bg-fd-primary/10 text-fd-primary',
@@ -45,7 +44,7 @@ export function Sidebar({ defaultOpenLevel = 0, prefetch = true, collapsible = t
45
44
  });
46
45
  if (isMobile) {
47
46
  const state = open ? 'open' : 'closed';
48
- return (_jsxs(Context.Provider, { value: context, children: [_jsx(Presence, { present: open, children: _jsx("div", { "data-state": state, className: "fixed z-40 inset-0 bg-black/30 backdrop-blur-sm data-[state=open]:animate-fd-fade-in data-[state=closed]:animate-fd-fade-out", onClick: () => setOpen(false) }) }), _jsx(Presence, { present: open, children: ({ present }) => (_jsx(RemoveScroll, { as: "aside", enabled: present, id: "nd-sidebar-mobile", ...props, "data-state": state, className: cn('fixed text-[15px] flex flex-col py-2 rounded-e-2xl border-e start-0 inset-y-0 w-[85%] max-w-[380px] z-40 bg-fd-background data-[state=open]:animate-fd-sidebar-in data-[state=closed]:animate-fd-sidebar-out', !present && 'invisible', props.className), children: props.children })) })] }));
47
+ return (_jsxs(Context.Provider, { value: context, children: [_jsx(Presence, { present: open, children: _jsx("div", { "data-state": state, className: "fixed z-40 inset-0 backdrop-blur-xs data-[state=open]:animate-fd-fade-in data-[state=closed]:animate-fd-fade-out", onClick: () => setOpen(false) }) }), _jsx(Presence, { present: open, children: ({ present }) => (_jsx("aside", { id: "nd-sidebar-mobile", ...props, "data-state": state, className: cn('fixed text-[15px] flex flex-col shadow-lg rounded-2xl border start-2 inset-y-2 w-[85%] max-w-[380px] z-40 bg-fd-background data-[state=open]:animate-fd-sidebar-in data-[state=closed]:animate-fd-sidebar-out', !present && 'invisible', props.className), children: props.children })) })] }));
49
48
  }
50
49
  return (_jsx("aside", { id: "nd-sidebar", ...props, "data-collapsed": collapsed, className: cn('fixed start-0 flex flex-col items-end top-(--fd-sidebar-top) bottom-(--fd-sidebar-margin) z-20 bg-fd-card text-sm border-e max-md:hidden *:w-(--fd-sidebar-width)', collapsed && [
51
50
  'rounded-xl border',
@@ -96,7 +95,7 @@ export function SidebarViewport(props) {
96
95
  }
97
96
  export function SidebarSeparator(props) {
98
97
  const { level } = useInternalContext();
99
- return (_jsx("p", { ...props, className: cn('inline-flex items-center gap-2 mb-1.5 px-2 font-medium empty:mb-0 [&_svg]:size-4 [&_svg]:shrink-0', props.className), style: {
98
+ return (_jsx("p", { ...props, className: cn('inline-flex items-center gap-2 mb-1.5 px-2 empty:mb-0 [&_svg]:size-4 [&_svg]:shrink-0', props.className), style: {
100
99
  paddingInlineStart: getOffset(level),
101
100
  ...props.style,
102
101
  }, children: props.children }));
@@ -5,7 +5,7 @@ import * as React from 'react';
5
5
  import { cn } from '../../utils/cn.js';
6
6
  const Popover = PopoverPrimitive.Root;
7
7
  const PopoverTrigger = PopoverPrimitive.Trigger;
8
- const PopoverContent = React.forwardRef(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { ref: ref, align: align, sideOffset: sideOffset, side: "bottom", className: cn('z-50 origin-(--radix-popover-content-transform-origin) min-w-[240px] max-w-[98vw] rounded-xl border bg-fd-popover/50 backdrop-blur-lg p-2 text-sm text-fd-popover-foreground shadow-lg focus-visible:outline-none data-[state=closed]:animate-fd-popover-out data-[state=open]:animate-fd-popover-in', className), ...props }) })));
8
+ const PopoverContent = React.forwardRef(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { ref: ref, align: align, sideOffset: sideOffset, side: "bottom", className: cn('z-50 origin-(--radix-popover-content-transform-origin) min-w-[240px] max-w-[98vw] rounded-xl border bg-fd-popover/60 backdrop-blur-lg p-2 text-sm text-fd-popover-foreground shadow-lg focus-visible:outline-none data-[state=closed]:animate-fd-popover-out data-[state=open]:animate-fd-popover-in', className), ...props }) })));
9
9
  PopoverContent.displayName = PopoverPrimitive.Content.displayName;
10
10
  const PopoverClose = PopoverPrimitive.PopoverClose;
11
11
  export { Popover, PopoverTrigger, PopoverContent, PopoverClose };
@@ -1 +1 @@
1
- {"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/layouts/docs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;AAYrE,OAAO,EAAgB,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAElE,OAAO,EAAE,KAAK,eAAe,EAAY,MAAM,UAAU,CAAC;AAK1D,OAAO,EACL,kBAAkB,EAElB,MAAM,EACN,oBAAoB,EACrB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAS/B,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC;IAEpB,OAAO,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG;QAClC,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,SAAS,CAAC,EAAE,SAAS,CAAC;KACvB,CAAC;IAEF;;OAEG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;CACjD;AAED,wBAAgB,UAAU,CAAC,EACzB,GAAG,EAAE,EAAE,eAAe,EAAE,GAAG,GAAG,EAAO,EACrC,OAAO,EAAE,EACP,IAAI,EAAE,WAAW,EACjB,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,aAAa,EACrB,OAAO,EA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B,OAAO,EAAE,cAAqB,EAC9B,WAAW,EAAE,kBAAyB,EACtC,SAAS,EAAE,gBAAgB,EAC3B,UAAU,EAAE,iBAAiB,EAC7B,GAAG,YAAY,EACX,EACN,YAAiB,EACjB,kBAA0B,EAC1B,WAA8C,EAC9C,IAAY,EACZ,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,eAAe,2CAmIjB;AAED,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAE,oBAAoB,EAAE,KAAK,YAAY,EAAE,CAAC"}
@@ -22,16 +22,16 @@ export function DocsLayout({ nav: { transparentMode, ...nav } = {}, sidebar: { t
22
22
  const variables = cn('md:[--fd-sidebar-width:268px] lg:[--fd-sidebar-width:286px] xl:[--fd-toc-width:286px]', !nav.component && nav.enabled !== false
23
23
  ? '[--fd-nav-height:56px] md:[--fd-nav-height:0px]'
24
24
  : undefined);
25
- const sidebar = sidebarComponent ?? (_jsxs(_Fragment, { children: [sidebarCollapsible ? _jsx(CollapsibleControl, {}) : null, _jsxs(Sidebar, { ...sidebarProps, collapsible: sidebarCollapsible, children: [_jsx(HideIfEmpty, { children: _jsxs(SidebarHeader, { children: [_jsxs("div", { className: "flex max-md:hidden", children: [_jsx(Link, { href: nav.url ?? '/', className: "inline-flex text-[15px] items-center gap-2.5 font-medium", children: nav.title }), nav.children, sidebarCollapsible && (_jsx(SidebarCollapseTrigger, { className: cn(buttonVariants({
25
+ const sidebar = sidebarComponent ?? (_jsxs(_Fragment, { children: [sidebarCollapsible ? _jsx(CollapsibleControl, {}) : null, _jsxs(Sidebar, { ...sidebarProps, collapsible: sidebarCollapsible, children: [_jsx(HideIfEmpty, { children: _jsxs(SidebarHeader, { children: [_jsxs("div", { className: "flex max-md:hidden", children: [_jsx(Link, { href: nav.url ?? '/', className: "inline-flex text-[15px] items-center gap-2.5 font-medium me-auto", children: nav.title }), nav.children, sidebarCollapsible && (_jsx(SidebarCollapseTrigger, { className: cn(buttonVariants({
26
26
  color: 'ghost',
27
27
  size: 'icon-sm',
28
- className: 'ms-auto mb-auto text-fd-muted-foreground max-md:hidden',
29
- })), children: _jsx(SidebarIcon, {}) }))] }), tabs.length > 0 && _jsx(RootToggle, { options: tabs }), searchToggle.enabled !== false &&
30
- (searchToggle.components?.lg ?? (_jsx(LargeSearchToggle, { hideIfDisabled: true, className: "max-md:hidden" }))), sidebarBanner] }) }), _jsxs(SidebarViewport, { children: [links
28
+ className: 'mb-auto text-fd-muted-foreground max-md:hidden',
29
+ })), children: _jsx(SidebarIcon, {}) }))] }), searchToggle.enabled !== false &&
30
+ (searchToggle.components?.lg ?? (_jsx(LargeSearchToggle, { hideIfDisabled: true, className: "max-md:hidden" }))), tabs.length > 0 && _jsx(RootToggle, { options: tabs }), sidebarBanner] }) }), _jsxs(SidebarViewport, { children: [links
31
31
  .filter((v) => v.type !== 'icon')
32
32
  .map((item, i, list) => (_jsx(SidebarLinkItem, { item: item, className: cn(i === list.length - 1 && 'mb-4') }, i))), _jsx(SidebarPageTree, { components: sidebarComponents })] }), _jsxs(SidebarFooter, { className: "empty:hidden", children: [_jsx(HideIfEmpty, { children: _jsxs("div", { className: "flex items-center justify-end", children: [links
33
33
  .filter((item) => item.type === 'icon')
34
- .map((item, i) => (_jsx(BaseLinkItem, { item: item, className: cn(buttonVariants({ size: 'icon', color: 'ghost' }), 'text-fd-muted-foreground md:[&_svg]:size-4.5', i === links.length - 1 && 'me-auto'), "aria-label": item.label, children: item.icon }, i))), i18n ? (_jsxs(LanguageToggle, { className: "me-1.5", children: [_jsx(Languages, { className: "size-4.5" }), _jsx(LanguageToggleText, { className: "md:hidden" })] })) : null, themeSwitch.enabled !== false &&
34
+ .map((item, i, arr) => (_jsx(BaseLinkItem, { item: item, className: cn(buttonVariants({ size: 'icon', color: 'ghost' }), 'text-fd-muted-foreground md:[&_svg]:size-4.5', i === arr.length - 1 && 'me-auto'), "aria-label": item.label, children: item.icon }, i))), i18n ? (_jsxs(LanguageToggle, { className: "me-1.5", children: [_jsx(Languages, { className: "size-4.5" }), _jsx(LanguageToggleText, { className: "md:hidden" })] })) : null, themeSwitch.enabled !== false &&
35
35
  (themeSwitch.component ?? (_jsx(ThemeToggle, { className: "p-0", mode: themeSwitch.mode })))] }) }), sidebarFooter] })] })] }));
36
36
  return (_jsx(TreeContextProvider, { tree: props.tree, children: _jsxs(NavProvider, { transparentMode: transparentMode, children: [nav.enabled !== false &&
37
37
  (nav.component ?? (_jsxs(Navbar, { className: "h-14 md:hidden", children: [_jsx(Link, { href: nav.url ?? '/', className: "inline-flex items-center gap-2.5 font-semibold", children: nav.title }), _jsx("div", { className: "flex-1", children: nav.children }), searchToggle?.enabled !== false &&
package/dist/style.css CHANGED
@@ -19,8 +19,6 @@
19
19
  --text-xs--line-height: calc(1 / 0.75);
20
20
  --text-sm: 0.875rem;
21
21
  --text-sm--line-height: calc(1.25 / 0.875);
22
- --text-base: 1rem;
23
- --text-base--line-height: calc(1.5 / 1);
24
22
  --text-lg: 1.125rem;
25
23
  --text-lg--line-height: calc(1.75 / 1.125);
26
24
  --text-2xl: 1.5rem;
@@ -28,14 +26,17 @@
28
26
  --text-3xl--line-height: calc(2.25 / 1.875);
29
27
  --font-weight-medium: 500;
30
28
  --font-weight-semibold: 600;
29
+ --radius-sm: 0.25rem;
31
30
  --radius-md: 0.375rem;
32
31
  --radius-lg: 0.5rem;
33
32
  --radius-xl: 0.75rem;
34
33
  --radius-2xl: 1rem;
35
34
  --animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
35
+ --blur-xs: 4px;
36
36
  --blur-sm: 8px;
37
37
  --blur-md: 12px;
38
38
  --blur-lg: 16px;
39
+ --blur-xl: 24px;
39
40
  --default-transition-duration: 150ms;
40
41
  --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
41
42
  --default-font-family: var(--font-sans);
@@ -53,7 +54,7 @@
53
54
  --color-fd-primary-foreground: hsl(0, 0%, 98%);
54
55
  --color-fd-secondary: hsl(0, 0%, 93.1%);
55
56
  --color-fd-secondary-foreground: hsl(0, 0%, 9%);
56
- --color-fd-accent: hsl(0, 0%, 90.1%);
57
+ --color-fd-accent: hsla(0, 0%, 82%, 50%);
57
58
  --color-fd-accent-foreground: hsl(0, 0%, 9%);
58
59
  --spacing-fd-container: 1400px;
59
60
  --fd-page-width: 1200px;
@@ -309,17 +310,23 @@
309
310
  .inset-y-1 {
310
311
  inset-block: calc(var(--spacing) * 1);
311
312
  }
313
+ .inset-y-2 {
314
+ inset-block: calc(var(--spacing) * 2);
315
+ }
312
316
  .inset-y-3 {
313
317
  inset-block: calc(var(--spacing) * 3);
314
318
  }
315
319
  .start-0 {
316
320
  inset-inline-start: calc(var(--spacing) * 0);
317
321
  }
322
+ .start-2 {
323
+ inset-inline-start: calc(var(--spacing) * 2);
324
+ }
318
325
  .start-2\.5 {
319
326
  inset-inline-start: calc(var(--spacing) * 2.5);
320
327
  }
321
- .start-5 {
322
- inset-inline-start: calc(var(--spacing) * 5);
328
+ .start-4\.5 {
329
+ inset-inline-start: calc(var(--spacing) * 4.5);
323
330
  }
324
331
  .end-2 {
325
332
  inset-inline-end: calc(var(--spacing) * 2);
@@ -351,12 +358,12 @@
351
358
  .top-2 {
352
359
  top: calc(var(--spacing) * 2);
353
360
  }
361
+ .top-4 {
362
+ top: calc(var(--spacing) * 4);
363
+ }
354
364
  .top-14 {
355
365
  top: calc(var(--spacing) * 14);
356
366
  }
357
- .top-\[10vh\] {
358
- top: 10vh;
359
- }
360
367
  .right-2 {
361
368
  right: calc(var(--spacing) * 2);
362
369
  }
@@ -929,10 +936,18 @@
929
936
  width: calc(var(--spacing) * 5);
930
937
  height: calc(var(--spacing) * 5);
931
938
  }
939
+ .size-6 {
940
+ width: calc(var(--spacing) * 6);
941
+ height: calc(var(--spacing) * 6);
942
+ }
932
943
  .size-6\.5 {
933
944
  width: calc(var(--spacing) * 6.5);
934
945
  height: calc(var(--spacing) * 6.5);
935
946
  }
947
+ .size-9 {
948
+ width: calc(var(--spacing) * 9);
949
+ height: calc(var(--spacing) * 9);
950
+ }
936
951
  .size-full {
937
952
  width: 100%;
938
953
  height: 100%;
@@ -991,9 +1006,6 @@
991
1006
  .w-\(--fd-toc-width\) {
992
1007
  width: var(--fd-toc-width);
993
1008
  }
994
- .w-\(--radix-popover-trigger-width\) {
995
- width: var(--radix-popover-trigger-width);
996
- }
997
1009
  .w-0 {
998
1010
  width: calc(var(--spacing) * 0);
999
1011
  }
@@ -1015,8 +1027,8 @@
1015
1027
  .w-\[286px\] {
1016
1028
  width: 286px;
1017
1029
  }
1018
- .w-\[calc\(100vw-2\*var\(--spacing\)\)\] {
1019
- width: calc(100vw - 2 * var(--spacing));
1030
+ .w-\[calc\(100\%-2\*var\(--spacing\)\)\] {
1031
+ width: calc(100% - 2 * var(--spacing));
1020
1032
  }
1021
1033
  .w-fit {
1022
1034
  width: fit-content;
@@ -1054,6 +1066,9 @@
1054
1066
  .max-w-sm {
1055
1067
  max-width: var(--container-sm);
1056
1068
  }
1069
+ .min-w-\(--radix-popover-trigger-width\) {
1070
+ min-width: var(--radix-popover-trigger-width);
1071
+ }
1057
1072
  .min-w-0 {
1058
1073
  min-width: calc(var(--spacing) * 0);
1059
1074
  }
@@ -1241,13 +1256,12 @@
1241
1256
  .rounded-md {
1242
1257
  border-radius: var(--radius-md);
1243
1258
  }
1259
+ .rounded-sm {
1260
+ border-radius: var(--radius-sm);
1261
+ }
1244
1262
  .rounded-xl {
1245
1263
  border-radius: var(--radius-xl);
1246
1264
  }
1247
- .rounded-e-2xl {
1248
- border-start-end-radius: var(--radius-2xl);
1249
- border-end-end-radius: var(--radius-2xl);
1250
- }
1251
1265
  .border {
1252
1266
  border-style: var(--tw-border-style);
1253
1267
  border-width: 1px;
@@ -1272,6 +1286,10 @@
1272
1286
  border-bottom-style: var(--tw-border-style);
1273
1287
  border-bottom-width: 1px;
1274
1288
  }
1289
+ .border-b-0 {
1290
+ border-bottom-style: var(--tw-border-style);
1291
+ border-bottom-width: 0px;
1292
+ }
1275
1293
  .border-l {
1276
1294
  border-left-style: var(--tw-border-style);
1277
1295
  border-left-width: 1px;
@@ -1315,12 +1333,6 @@
1315
1333
  .bg-\(--shiki-light-bg\) {
1316
1334
  background-color: var(--shiki-light-bg);
1317
1335
  }
1318
- .bg-black\/30 {
1319
- background-color: color-mix(in srgb, #000 30%, transparent);
1320
- @supports (color: color-mix(in lab, red, red)) {
1321
- background-color: color-mix(in oklab, var(--color-black) 30%, transparent);
1322
- }
1323
- }
1324
1336
  .bg-fd-accent {
1325
1337
  background-color: var(--color-fd-accent);
1326
1338
  }
@@ -1348,10 +1360,10 @@
1348
1360
  .bg-fd-muted {
1349
1361
  background-color: var(--color-fd-muted);
1350
1362
  }
1351
- .bg-fd-popover\/50 {
1352
- background-color: color-mix(in srgb, hsl(0, 0%, 98%) 50%, transparent);
1363
+ .bg-fd-popover\/60 {
1364
+ background-color: color-mix(in srgb, hsl(0, 0%, 98%) 60%, transparent);
1353
1365
  @supports (color: color-mix(in lab, red, red)) {
1354
- background-color: color-mix(in oklab, var(--color-fd-popover) 50%, transparent);
1366
+ background-color: color-mix(in oklab, var(--color-fd-popover) 60%, transparent);
1355
1367
  }
1356
1368
  }
1357
1369
  .bg-fd-primary {
@@ -1486,9 +1498,6 @@
1486
1498
  .ps-\[calc\(var\(--fd-layout-offset\)\+var\(--fd-sidebar-width\)\)\] {
1487
1499
  padding-inline-start: calc(var(--fd-layout-offset) + var(--fd-sidebar-width));
1488
1500
  }
1489
- .pe-2 {
1490
- padding-inline-end: calc(var(--spacing) * 2);
1491
- }
1492
1501
  .pe-4 {
1493
1502
  padding-inline-end: calc(var(--spacing) * 4);
1494
1503
  }
@@ -1522,14 +1531,13 @@
1522
1531
  .text-start {
1523
1532
  text-align: start;
1524
1533
  }
1534
+ .font-mono {
1535
+ font-family: var(--font-mono);
1536
+ }
1525
1537
  .text-3xl {
1526
1538
  font-size: var(--text-3xl);
1527
1539
  line-height: var(--tw-leading, var(--text-3xl--line-height));
1528
1540
  }
1529
- .text-base {
1530
- font-size: var(--text-base);
1531
- line-height: var(--tw-leading, var(--text-base--line-height));
1532
- }
1533
1541
  .text-lg {
1534
1542
  font-size: var(--text-lg);
1535
1543
  line-height: var(--tw-leading, var(--text-lg--line-height));
@@ -1595,6 +1603,12 @@
1595
1603
  .text-fd-popover-foreground {
1596
1604
  color: var(--color-fd-popover-foreground);
1597
1605
  }
1606
+ .text-fd-popover-foreground\/80 {
1607
+ color: color-mix(in srgb, hsl(0, 0%, 15.1%) 80%, transparent);
1608
+ @supports (color: color-mix(in lab, red, red)) {
1609
+ color: color-mix(in oklab, var(--color-fd-popover-foreground) 80%, transparent);
1610
+ }
1611
+ }
1598
1612
  .text-fd-primary {
1599
1613
  color: var(--color-fd-primary);
1600
1614
  }
@@ -1638,10 +1652,10 @@
1638
1652
  --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
1639
1653
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
1640
1654
  }
1641
- .shadow-black\/30 {
1642
- --tw-shadow-color: color-mix(in srgb, #000 30%, transparent);
1655
+ .shadow-black\/40 {
1656
+ --tw-shadow-color: color-mix(in srgb, #000 40%, transparent);
1643
1657
  @supports (color: color-mix(in lab, red, red)) {
1644
- --tw-shadow-color: color-mix(in oklab, color-mix(in oklab, var(--color-black) 30%, transparent) var(--tw-shadow-alpha), transparent);
1658
+ --tw-shadow-color: color-mix(in oklab, color-mix(in oklab, var(--color-black) 40%, transparent) var(--tw-shadow-alpha), transparent);
1645
1659
  }
1646
1660
  }
1647
1661
  .outline {
@@ -1666,6 +1680,16 @@
1666
1680
  -webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
1667
1681
  backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
1668
1682
  }
1683
+ .backdrop-blur-xl {
1684
+ --tw-backdrop-blur: blur(var(--blur-xl));
1685
+ -webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
1686
+ backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
1687
+ }
1688
+ .backdrop-blur-xs {
1689
+ --tw-backdrop-blur: blur(var(--blur-xs));
1690
+ -webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
1691
+ backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
1692
+ }
1669
1693
  .transition {
1670
1694
  transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, visibility, content-visibility, overlay, pointer-events;
1671
1695
  transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
@@ -1840,7 +1864,7 @@
1840
1864
  .hover\:bg-fd-accent\/50 {
1841
1865
  &:hover {
1842
1866
  @media (hover: hover) {
1843
- background-color: color-mix(in srgb, hsl(0, 0%, 90.1%) 50%, transparent);
1867
+ background-color: color-mix(in srgb, hsla(0, 0%, 82%, 50%) 50%, transparent);
1844
1868
  @supports (color: color-mix(in lab, red, red)) {
1845
1869
  background-color: color-mix(in oklab, var(--color-fd-accent) 50%, transparent);
1846
1870
  }
@@ -1850,7 +1874,7 @@
1850
1874
  .hover\:bg-fd-accent\/80 {
1851
1875
  &:hover {
1852
1876
  @media (hover: hover) {
1853
- background-color: color-mix(in srgb, hsl(0, 0%, 90.1%) 80%, transparent);
1877
+ background-color: color-mix(in srgb, hsla(0, 0%, 82%, 50%) 80%, transparent);
1854
1878
  @supports (color: color-mix(in lab, red, red)) {
1855
1879
  background-color: color-mix(in oklab, var(--color-fd-accent) 80%, transparent);
1856
1880
  }
@@ -2055,14 +2079,24 @@
2055
2079
  animation: var(--animate-fd-sidebar-in);
2056
2080
  }
2057
2081
  }
2082
+ .data-\[state\=open\]\:bg-fd-accent {
2083
+ &[data-state="open"] {
2084
+ background-color: var(--color-fd-accent);
2085
+ }
2086
+ }
2058
2087
  .data-\[state\=open\]\:bg-fd-accent\/50 {
2059
2088
  &[data-state="open"] {
2060
- background-color: color-mix(in srgb, hsl(0, 0%, 90.1%) 50%, transparent);
2089
+ background-color: color-mix(in srgb, hsla(0, 0%, 82%, 50%) 50%, transparent);
2061
2090
  @supports (color: color-mix(in lab, red, red)) {
2062
2091
  background-color: color-mix(in oklab, var(--color-fd-accent) 50%, transparent);
2063
2092
  }
2064
2093
  }
2065
2094
  }
2095
+ .data-\[state\=open\]\:text-fd-accent-foreground {
2096
+ &[data-state="open"] {
2097
+ color: var(--color-fd-accent-foreground);
2098
+ }
2099
+ }
2066
2100
  .max-xl\:end-4 {
2067
2101
  @media (width < 80rem) {
2068
2102
  inset-inline-end: calc(var(--spacing) * 4);
@@ -2098,14 +2132,35 @@
2098
2132
  display: none;
2099
2133
  }
2100
2134
  }
2135
+ .max-md\:rounded-md {
2136
+ @media (width < 48rem) {
2137
+ border-radius: var(--radius-md);
2138
+ }
2139
+ }
2140
+ .max-md\:border {
2141
+ @media (width < 48rem) {
2142
+ border-style: var(--tw-border-style);
2143
+ border-width: 1px;
2144
+ }
2145
+ }
2101
2146
  .max-md\:bg-fd-background {
2102
2147
  @media (width < 48rem) {
2103
2148
  background-color: var(--color-fd-background);
2104
2149
  }
2105
2150
  }
2106
- .max-md\:backdrop-blur-sm {
2151
+ .max-md\:bg-fd-secondary {
2152
+ @media (width < 48rem) {
2153
+ background-color: var(--color-fd-secondary);
2154
+ }
2155
+ }
2156
+ .max-md\:p-1\.5 {
2107
2157
  @media (width < 48rem) {
2108
- --tw-backdrop-blur: blur(var(--blur-sm));
2158
+ padding: calc(var(--spacing) * 1.5);
2159
+ }
2160
+ }
2161
+ .max-md\:backdrop-blur-xs {
2162
+ @media (width < 48rem) {
2163
+ --tw-backdrop-blur: blur(var(--blur-xs));
2109
2164
  -webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
2110
2165
  backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
2111
2166
  }
@@ -2150,16 +2205,37 @@
2150
2205
  inset-block: calc(var(--spacing) * 2);
2151
2206
  }
2152
2207
  }
2208
+ .md\:top-\[calc\(50\%-250px\)\] {
2209
+ @media (width >= 48rem) {
2210
+ top: calc(50% - 250px);
2211
+ }
2212
+ }
2153
2213
  .md\:mx-auto {
2154
2214
  @media (width >= 48rem) {
2155
2215
  margin-inline: auto;
2156
2216
  }
2157
2217
  }
2218
+ .md\:mt-1 {
2219
+ @media (width >= 48rem) {
2220
+ margin-top: calc(var(--spacing) * 1);
2221
+ }
2222
+ }
2223
+ .md\:mb-auto {
2224
+ @media (width >= 48rem) {
2225
+ margin-bottom: auto;
2226
+ }
2227
+ }
2158
2228
  .md\:hidden {
2159
2229
  @media (width >= 48rem) {
2160
2230
  display: none;
2161
2231
  }
2162
2232
  }
2233
+ .md\:size-5 {
2234
+ @media (width >= 48rem) {
2235
+ width: calc(var(--spacing) * 5);
2236
+ height: calc(var(--spacing) * 5);
2237
+ }
2238
+ }
2163
2239
  .md\:h-\[calc\(100dvh-56px\)\] {
2164
2240
  @media (width >= 48rem) {
2165
2241
  height: calc(100dvh - 56px);
@@ -2185,23 +2261,6 @@
2185
2261
  padding-inline: calc(var(--spacing) * 6);
2186
2262
  }
2187
2263
  }
2188
- .md\:py-1\.5 {
2189
- @media (width >= 48rem) {
2190
- padding-block: calc(var(--spacing) * 1.5);
2191
- }
2192
- }
2193
- .md\:text-sm {
2194
- @media (width >= 48rem) {
2195
- font-size: var(--text-sm);
2196
- line-height: var(--tw-leading, var(--text-sm--line-height));
2197
- }
2198
- }
2199
- .md\:text-xs {
2200
- @media (width >= 48rem) {
2201
- font-size: var(--text-xs);
2202
- line-height: var(--tw-leading, var(--text-xs--line-height));
2203
- }
2204
- }
2205
2264
  .md\:\[--fd-nav-height\:0px\] {
2206
2265
  @media (width >= 48rem) {
2207
2266
  --fd-nav-height: 0px;
@@ -2338,6 +2397,12 @@
2338
2397
  height: calc(var(--spacing) * 5);
2339
2398
  }
2340
2399
  }
2400
+ .\[\&_svg\]\:size-full {
2401
+ & svg {
2402
+ width: 100%;
2403
+ height: 100%;
2404
+ }
2405
+ }
2341
2406
  .\[\&_svg\]\:shrink-0 {
2342
2407
  & svg {
2343
2408
  flex-shrink: 0;
@@ -2373,8 +2438,8 @@
2373
2438
  --color-fd-foreground: hsl(0, 0%, 92%);
2374
2439
  --color-fd-muted: hsl(0, 0%, 12.9%);
2375
2440
  --color-fd-muted-foreground: hsl(0, 0%, 60.9%);
2376
- --color-fd-popover: hsl(0, 0%, 9.8%);
2377
- --color-fd-popover-foreground: hsl(0, 0%, 88%);
2441
+ --color-fd-popover: hsl(0, 0%, 10.6%);
2442
+ --color-fd-popover-foreground: hsl(0, 0%, 86.9%);
2378
2443
  --color-fd-card: hsl(0, 0%, 9.8%);
2379
2444
  --color-fd-card-foreground: hsl(0, 0%, 98%);
2380
2445
  --color-fd-border: hsla(0, 0%, 40%, 20%);
@@ -2396,8 +2461,7 @@
2396
2461
  color: var(--shiki-light);
2397
2462
  }
2398
2463
  code .line {
2399
- line-height: 1.45em;
2400
- min-height: 1.45em;
2464
+ min-height: 1lh;
2401
2465
  position: relative;
2402
2466
  }
2403
2467
  &.has-focused code .line:not(.focused) {
@@ -4,7 +4,7 @@ const defaultTransform = (option, node) => {
4
4
  return option;
5
5
  return {
6
6
  ...option,
7
- icon: (_jsx("div", { className: "rounded-md border bg-fd-secondary p-1 shadow-md [&_svg]:size-5", children: node.icon })),
7
+ icon: (_jsx("div", { className: "size-full [&_svg]:size-full max-md:p-1.5 max-md:rounded-md max-md:border max-md:bg-fd-secondary", children: node.icon })),
8
8
  };
9
9
  };
10
10
  export function getSidebarTabs(pageTree, { transform = defaultTransform } = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-ui",
3
- "version": "15.5.3",
3
+ "version": "15.5.4",
4
4
  "description": "The framework for building a documentation website in Next.js",
5
5
  "keywords": [
6
6
  "NextJs",
@@ -87,30 +87,30 @@
87
87
  "next-themes": "^0.4.6",
88
88
  "postcss-selector-parser": "^7.1.0",
89
89
  "react-medium-image-zoom": "^5.2.14",
90
- "react-remove-scroll": "^2.7.1",
90
+ "scroll-into-view-if-needed": "^3.1.0",
91
91
  "tailwind-merge": "^3.3.1",
92
- "fumadocs-core": "15.5.3"
92
+ "fumadocs-core": "15.5.4"
93
93
  },
94
94
  "devDependencies": {
95
- "@next/eslint-plugin-next": "^15.3.3",
95
+ "@next/eslint-plugin-next": "^15.3.4",
96
96
  "@tailwindcss/cli": "^4.1.10",
97
97
  "@types/lodash.merge": "^4.6.9",
98
98
  "@types/react": "^19.1.8",
99
99
  "@types/react-dom": "^19.1.6",
100
- "next": "15.3.3",
100
+ "next": "15.3.4",
101
101
  "tailwindcss": "^4.1.10",
102
102
  "tsc-alias": "^1.8.16",
103
- "@fumadocs/cli": "0.2.1",
104
103
  "eslint-config-custom": "0.0.0",
105
- "fumadocs-core": "15.5.3",
104
+ "@fumadocs/cli": "0.2.1",
105
+ "fumadocs-core": "15.5.4",
106
106
  "tsconfig": "0.0.0"
107
107
  },
108
108
  "peerDependencies": {
109
+ "@types/react": "*",
109
110
  "next": "14.x.x || 15.x.x",
110
111
  "react": "18.x.x || 19.x.x",
111
112
  "react-dom": "18.x.x || 19.x.x",
112
- "tailwindcss": "^3.4.14 || ^4.0.0",
113
- "@types/react": "*"
113
+ "tailwindcss": "^3.4.14 || ^4.0.0"
114
114
  },
115
115
  "peerDependenciesMeta": {
116
116
  "next": {