fumadocs-ui 15.5.1 → 15.5.3

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
@@ -31,7 +31,7 @@
31
31
  --color-fd-primary-foreground: hsl(0, 0%, 9%);
32
32
  --color-fd-secondary: hsl(0, 0%, 12.9%);
33
33
  --color-fd-secondary-foreground: hsl(0, 0%, 98%);
34
- --color-fd-accent: hsl(0, 0%, 16.9%);
34
+ --color-fd-accent: hsla(0, 0%, 40.9%, 30%);
35
35
  --color-fd-accent-foreground: hsl(0, 0%, 90%);
36
36
  --color-fd-ring: hsl(0, 0%, 54.9%);
37
37
  }
package/css/preset.css CHANGED
@@ -21,11 +21,11 @@
21
21
  --animate-fd-fade-in: fd-fade-in 300ms ease;
22
22
  --animate-fd-fade-out: fd-fade-out 300ms ease;
23
23
 
24
- --animate-fd-dialog-in: fd-dialog-in 240ms cubic-bezier(0.16, 1, 0.3, 1);
25
- --animate-fd-dialog-out: fd-dialog-out 240ms cubic-bezier(0.16, 1, 0.3, 1);
24
+ --animate-fd-dialog-in: fd-dialog-in 300ms cubic-bezier(0.16, 1, 0.3, 1);
25
+ --animate-fd-dialog-out: fd-dialog-out 300ms cubic-bezier(0.16, 1, 0.3, 1);
26
26
 
27
- --animate-fd-popover-in: fd-popover-in 150ms ease;
28
- --animate-fd-popover-out: fd-popover-out 150ms ease;
27
+ --animate-fd-popover-in: fd-popover-in 130ms ease;
28
+ --animate-fd-popover-out: fd-popover-out 130ms ease;
29
29
 
30
30
  --animate-fd-collapsible-down: fd-collapsible-down 150ms
31
31
  cubic-bezier(0.45, 0, 0.55, 1);
@@ -110,22 +110,14 @@
110
110
  @keyframes fd-popover-in {
111
111
  from {
112
112
  opacity: 0;
113
- transform: translateY(-12px);
114
- }
115
- to {
116
- opacity: 1;
117
- transform: translateY(0);
113
+ transform: translateY(-12px) scale(0.9);
118
114
  }
119
115
  }
120
116
 
121
117
  @keyframes fd-popover-out {
122
- from {
123
- opacity: 1;
124
- transform: translateY(0);
125
- }
126
118
  to {
127
119
  opacity: 0;
128
- transform: translateY(-12px);
120
+ transform: translateY(-12px) scale(0.9);
129
121
  }
130
122
  }
131
123
 
@@ -7,7 +7,7 @@ const calloutVariants = cva('my-4 flex gap-2 rounded-lg border border-s-2 bg-fd-
7
7
  variants: {
8
8
  type: {
9
9
  info: 'border-s-blue-500/50',
10
- warn: 'border-s-orange-500/50',
10
+ warn: 'border-s-amber-500/50',
11
11
  error: 'border-s-red-500/50',
12
12
  success: 'border-s-green-500/50',
13
13
  },
@@ -21,7 +21,7 @@ export const Callout = forwardRef(({ className, children, title, type = 'info',
21
21
  }), className), ...props, children: [icon ??
22
22
  {
23
23
  info: _jsx(Info, { className: "size-5 fill-blue-500 text-fd-card" }),
24
- warn: (_jsx(TriangleAlert, { className: "size-5 fill-orange-500 text-fd-card" })),
24
+ warn: (_jsx(TriangleAlert, { className: "size-5 fill-amber-500 text-fd-card" })),
25
25
  error: _jsx(CircleX, { className: "size-5 fill-red-500 text-fd-card" }),
26
26
  success: (_jsx(CircleCheck, { className: "size-5 fill-green-500 text-fd-card" })),
27
27
  }[type], _jsxs("div", { className: "min-w-0 flex flex-col gap-2 flex-1", children: [title ? _jsx("p", { className: "font-medium !my-0", children: title }) : null, _jsx("div", { className: "text-fd-muted-foreground prose-no-margin empty:hidden", children: children })] })] }));
@@ -1 +1 @@
1
- {"version":3,"file":"search-algolia.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/search-algolia.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,cAAc,EAEpB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAC;AAgB1D,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG1E,MAAM,WAAW,wBAAyB,SAAQ,WAAW;IAC3D,aAAa,EAAE,cAAc,CAAC;IAC9B,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IAErB,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC;IAEjB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAC1C,aAAa,EACb,IAAS,EACT,UAAU,EACV,WAAmB,EACnB,UAAkB,EAClB,KAAU,EACV,MAAM,EACN,GAAG,KAAK,EACT,EAAE,wBAAwB,2CAgE1B"}
1
+ {"version":3,"file":"search-algolia.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/search-algolia.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,cAAc,EAEpB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAC;AAgB1D,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG1E,MAAM,WAAW,wBAAyB,SAAQ,WAAW;IAC3D,aAAa,EAAE,cAAc,CAAC;IAC9B,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IAErB,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC;IAEjB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAC1C,aAAa,EACb,IAAS,EACT,UAAU,EACV,WAAmB,EACnB,UAAkB,EAClB,KAAU,EACV,MAAM,EACN,GAAG,KAAK,EACT,EAAE,wBAAwB,2CA4D1B"}
@@ -14,17 +14,21 @@ export default function AlgoliaSearchDialog({ searchOptions, tags = [], defaultT
14
14
  locale,
15
15
  ...searchOptions,
16
16
  });
17
- const defaultItems = useMemo(() => links.map(([name, link]) => ({
18
- type: 'page',
19
- id: name,
20
- content: name,
21
- url: link,
22
- })), [links]);
17
+ const defaultItems = useMemo(() => {
18
+ if (links.length === 0)
19
+ return null;
20
+ return links.map(([name, link]) => ({
21
+ type: 'page',
22
+ id: name,
23
+ content: name,
24
+ url: link,
25
+ }));
26
+ }, [links]);
23
27
  useOnChange(defaultTag, (v) => {
24
28
  setTag(v);
25
29
  });
26
30
  const label = showAlgolia && _jsx(AlgoliaTitle, {});
27
- return (_jsxs(SearchDialog, { search: search, onSearchChange: setSearch, isLoading: query.isLoading, ...props, children: [_jsx(SearchDialogOverlay, {}), _jsxs(SearchDialogContent, { children: [_jsxs(SearchDialogHeader, { children: [_jsx(SearchDialogIcon, {}), _jsx(SearchDialogInput, {}), _jsx(SearchDialogClose, {})] }), query.data !== 'empty' && query.data && (_jsx(SearchDialogList, { items: query.data })), query.data === 'empty' && defaultItems.length > 0 && (_jsx(SearchDialogList, { items: defaultItems }))] }), _jsxs(SearchDialogFooter, { children: [tags.length > 0 ? (_jsxs(TagsList, { tag: tag, onTagChange: setTag, allowClear: allowClear, children: [tags.map((tag) => (_jsx(TagsListItem, { value: tag.value, children: tag.name }, tag.value))), label] })) : (label), footer] })] }));
31
+ return (_jsxs(SearchDialog, { search: search, onSearchChange: setSearch, isLoading: query.isLoading, ...props, children: [_jsx(SearchDialogOverlay, {}), _jsxs(SearchDialogContent, { children: [_jsxs(SearchDialogHeader, { children: [_jsx(SearchDialogIcon, {}), _jsx(SearchDialogInput, {}), _jsx(SearchDialogClose, {})] }), _jsx(SearchDialogList, { items: query.data !== 'empty' ? query.data : defaultItems })] }), _jsxs(SearchDialogFooter, { children: [tags.length > 0 ? (_jsxs(TagsList, { tag: tag, onTagChange: setTag, allowClear: allowClear, children: [tags.map((tag) => (_jsx(TagsListItem, { value: tag.value, children: tag.name }, tag.value))), label] })) : (label), footer] })] }));
28
32
  }
29
33
  function AlgoliaTitle() {
30
34
  return (_jsx("a", { href: "https://algolia.com", rel: "noreferrer noopener", className: "ms-auto text-xs text-fd-muted-foreground", children: "Search powered by Algolia" }));
@@ -1 +1 @@
1
- {"version":3,"file":"search-default.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/search-default.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAC;AAiB1D,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE1E,MAAM,WAAW,wBAAyB,SAAQ,WAAW;IAC3D,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IAErB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAE1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC;IAEjB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAC1C,UAAU,EACV,IAAS,EACT,GAAG,EACH,OAAO,EACP,IAAc,EACd,UAAkB,EAClB,KAAU,EACV,MAAM,EACN,GAAG,KAAK,EACT,EAAE,wBAAwB,2CAsE1B"}
1
+ {"version":3,"file":"search-default.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/search-default.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAC;AAiB1D,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE1E,MAAM,WAAW,wBAAyB,SAAQ,WAAW;IAC3D,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IAErB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAE1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC;IAEjB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAC1C,UAAU,EACV,IAAS,EACT,GAAG,EACH,OAAO,EACP,IAAc,EACd,UAAkB,EAClB,KAAU,EACV,MAAM,EACN,GAAG,KAAK,EACT,EAAE,wBAAwB,2CAkE1B"}
@@ -23,14 +23,18 @@ export default function DefaultSearchDialog({ defaultTag, tags = [], api, delayM
23
23
  tag,
24
24
  delayMs,
25
25
  });
26
- const defaultItems = useMemo(() => links.map(([name, link]) => ({
27
- type: 'page',
28
- id: name,
29
- content: name,
30
- url: link,
31
- })), [links]);
26
+ const defaultItems = useMemo(() => {
27
+ if (links.length === 0)
28
+ return null;
29
+ return links.map(([name, link]) => ({
30
+ type: 'page',
31
+ id: name,
32
+ content: name,
33
+ url: link,
34
+ }));
35
+ }, [links]);
32
36
  useOnChange(defaultTag, (v) => {
33
37
  setTag(v);
34
38
  });
35
- return (_jsxs(SearchDialog, { search: search, onSearchChange: setSearch, isLoading: query.isLoading, ...props, children: [_jsx(SearchDialogOverlay, {}), _jsxs(SearchDialogContent, { children: [_jsxs(SearchDialogHeader, { children: [_jsx(SearchDialogIcon, {}), _jsx(SearchDialogInput, {}), _jsx(SearchDialogClose, {})] }), query.data !== 'empty' && query.data && (_jsx(SearchDialogList, { items: query.data })), query.data === 'empty' && defaultItems.length > 0 && (_jsx(SearchDialogList, { items: defaultItems }))] }), _jsxs(SearchDialogFooter, { children: [tags.length > 0 && (_jsx(TagsList, { tag: tag, onTagChange: setTag, allowClear: allowClear, children: tags.map((tag) => (_jsx(TagsListItem, { value: tag.value, children: tag.name }, tag.value))) })), footer] })] }));
39
+ return (_jsxs(SearchDialog, { search: search, onSearchChange: setSearch, isLoading: query.isLoading, ...props, children: [_jsx(SearchDialogOverlay, {}), _jsxs(SearchDialogContent, { children: [_jsxs(SearchDialogHeader, { children: [_jsx(SearchDialogIcon, {}), _jsx(SearchDialogInput, {}), _jsx(SearchDialogClose, {})] }), _jsx(SearchDialogList, { items: query.data !== 'empty' ? query.data : defaultItems })] }), _jsxs(SearchDialogFooter, { children: [tags.length > 0 && (_jsx(TagsList, { tag: tag, onTagChange: setTag, allowClear: allowClear, children: tags.map((tag) => (_jsx(TagsListItem, { value: tag.value, children: tag.name }, tag.value))) })), footer] })] }));
36
40
  }
@@ -1 +1 @@
1
- {"version":3,"file":"search-orama.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/search-orama.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAC;AAgB1D,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG1E,MAAM,WAAW,sBAAuB,SAAQ,WAAW;IACzD,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IACrB,MAAM,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IACpC,aAAa,CAAC,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IAC5C,KAAK,CAAC,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAEnC,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC;IAEjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,MAAM,EACN,aAAa,EACb,IAAS,EACT,UAAU,EACV,SAAiB,EACjB,UAAkB,EAClB,KAAK,EACL,MAAM,EACN,KAAU,EACV,GAAG,KAAK,EACT,EAAE,sBAAsB,2CAmExB"}
1
+ {"version":3,"file":"search-orama.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/search-orama.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAC;AAgB1D,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG1E,MAAM,WAAW,sBAAuB,SAAQ,WAAW;IACzD,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IACrB,MAAM,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IACpC,aAAa,CAAC,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IAC5C,KAAK,CAAC,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAEnC,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC;IAEjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,MAAM,EACN,aAAa,EACb,IAAS,EACT,UAAU,EACV,SAAiB,EACjB,UAAkB,EAClB,KAAK,EACL,MAAM,EACN,KAAU,EACV,GAAG,KAAK,EACT,EAAE,sBAAsB,2CAgExB"}
@@ -19,17 +19,21 @@ export default function OramaSearchDialog({ client, searchOptions, tags = [], de
19
19
  locale,
20
20
  tag,
21
21
  });
22
- const defaultItems = useMemo(() => links.map(([name, link]) => ({
23
- type: 'page',
24
- id: name,
25
- content: name,
26
- url: link,
27
- })), [links]);
22
+ const defaultItems = useMemo(() => {
23
+ if (links.length === 0)
24
+ return null;
25
+ return links.map(([name, link]) => ({
26
+ type: 'page',
27
+ id: name,
28
+ content: name,
29
+ url: link,
30
+ }));
31
+ }, [links]);
28
32
  useOnChange(defaultTag, (v) => {
29
33
  setTag(v);
30
34
  });
31
35
  const label = showOrama && _jsx(Label, {});
32
- return (_jsxs(SearchDialog, { search: search, onSearchChange: setSearch, isLoading: query.isLoading, ...props, children: [_jsx(SearchDialogOverlay, {}), _jsxs(SearchDialogContent, { children: [_jsxs(SearchDialogHeader, { children: [_jsx(SearchDialogIcon, {}), _jsx(SearchDialogInput, {}), _jsx(SearchDialogClose, {})] }), query.data !== 'empty' && query.data && (_jsx(SearchDialogList, { items: query.data })), query.data === 'empty' && defaultItems.length > 0 && (_jsx(SearchDialogList, { items: defaultItems })), _jsxs(SearchDialogFooter, { children: [tags.length > 0 ? (_jsxs(TagsList, { tag: tag, onTagChange: setTag, allowClear: allowClear, children: [tags.map((tag) => (_jsx(TagsListItem, { value: tag.value, children: tag.name }, tag.value))), label] })) : (label), footer] })] })] }));
36
+ return (_jsxs(SearchDialog, { search: search, onSearchChange: setSearch, isLoading: query.isLoading, ...props, children: [_jsx(SearchDialogOverlay, {}), _jsxs(SearchDialogContent, { children: [_jsxs(SearchDialogHeader, { children: [_jsx(SearchDialogIcon, {}), _jsx(SearchDialogInput, {}), _jsx(SearchDialogClose, {})] }), _jsx(SearchDialogList, { items: query.data !== 'empty' ? query.data : defaultItems }), _jsxs(SearchDialogFooter, { children: [tags.length > 0 ? (_jsxs(TagsList, { tag: tag, onTagChange: setTag, allowClear: allowClear, children: [tags.map((tag) => (_jsx(TagsListItem, { value: tag.value, children: tag.name }, tag.value))), label] })) : (label), footer] })] })] }));
33
37
  }
34
38
  function Label() {
35
39
  return (_jsx("a", { href: "https://orama.com", rel: "noreferrer noopener", className: "ms-auto text-xs text-fd-muted-foreground", children: "Search powered by Orama" }));
@@ -21,7 +21,7 @@ export declare function SearchDialogFooter(props: ComponentProps<'div'>): import
21
21
  export declare function SearchDialogOverlay(props: ComponentProps<typeof DialogOverlay>): import("react/jsx-runtime").JSX.Element;
22
22
  export declare function SearchDialogContent({ children, ...props }: ComponentProps<typeof DialogContent>): import("react/jsx-runtime").JSX.Element;
23
23
  export declare function SearchDialogList({ items, Empty, Item, ...props }: Omit<ComponentProps<'div'>, 'children'> & {
24
- items: ReactSortedResult[];
24
+ items: ReactSortedResult[] | null | undefined;
25
25
  /**
26
26
  * Renderer for empty list UI
27
27
  */
@@ -37,7 +37,7 @@ export declare function SearchDialogList({ items, Empty, Item, ...props }: Omit<
37
37
  export declare function SearchDialogListItem({ item, className, children, ...props }: ComponentProps<'button'> & {
38
38
  item: ReactSortedResult;
39
39
  }): import("react/jsx-runtime").JSX.Element;
40
- export declare function SearchDialogIcon(props: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
40
+ export declare function SearchDialogIcon(props: ComponentProps<'svg'>): import("react/jsx-runtime").JSX.Element;
41
41
  export interface TagsListProps extends ComponentProps<'div'> {
42
42
  tag?: string;
43
43
  onTagChange: (tag: string | undefined) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/search.tsx"],"names":[],"mappings":"AASA,OAAO,EACL,KAAK,cAAc,EAGnB,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAIf,OAAO,EAEL,aAAa,EACb,aAAa,EAEd,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;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a,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;UA3ZjB,OAAO;kBACC,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI;YAC7B,MAAM;oBACE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;eAExB,OAAO;EA0ZnB;AAED,wBAAgB,WAAW;YAnZjB,MAAM;mBACC,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI;gBACtC,OAAO;EAqZpB;AAED,wBAAgB,aAAa;YA9ZnB,MAAM,GAAG,IAAI;eACV,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI;EAiatC"}
@@ -1,7 +1,7 @@
1
1
  'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { FileText, Hash, LoaderCircle, Search as SearchIcon, Text, } from '../../icons.js';
4
- import { createContext, Fragment, useCallback, useContext, useEffect, useMemo, useState, } from 'react';
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';
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';
7
7
  import { buttonVariants } from '../../components/ui/button.js';
@@ -33,30 +33,27 @@ export function SearchDialogInput(props) {
33
33
  const { search, onSearchChange } = useSearch();
34
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
35
  }
36
- export function SearchDialogClose({ children = 'Esc', className, ...props }) {
36
+ export function SearchDialogClose({ children = _jsx(X, {}), className, ...props }) {
37
37
  const { onOpenChange } = useSearch();
38
- return (_jsx("button", { type: "button", onClick: () => onOpenChange(false), className: cn(buttonVariants({
39
- color: 'outline',
40
- className: 'text-xs p-1.5',
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',
41
42
  }), className), ...props, children: children }));
42
43
  }
43
44
  export function SearchDialogFooter(props) {
44
- return (_jsx("div", { ...props, className: cn('mt-auto border-t p-3 empty:hidden', props.className) }));
45
+ return (_jsx("div", { ...props, className: cn('border-t bg-fd-secondary/50 p-3 empty:hidden', props.className) }));
45
46
  }
46
47
  export function SearchDialogOverlay(props) {
47
- return (_jsx(DialogOverlay, { ...props, className: cn('fixed inset-0 z-50 bg-black/30 backdrop-blur-sm data-[state=closed]:animate-fd-fade-out data-[state=open]:animate-fd-fade-in', props.className) }));
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) }));
48
49
  }
49
50
  export function SearchDialogContent({ children, ...props }) {
50
51
  const { text } = useI18n();
51
- return (_jsxs(DialogContent, { "aria-describedby": undefined, ...props, className: cn('fixed left-1/2 top-[10vh] z-50 w-[98vw] max-w-screen-sm -translate-x-1/2 rounded-lg border bg-fd-popover text-fd-popover-foreground shadow-lg 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] }));
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] }));
52
53
  }
53
- const icons = {
54
- text: _jsx(Text, { className: "size-4 text-fd-muted-foreground" }),
55
- heading: _jsx(Hash, { className: "size-4 text-fd-muted-foreground" }),
56
- page: _jsx(FileText, { className: "size-4 text-fd-muted-foreground" }),
57
- };
58
- export function SearchDialogList({ items, Empty = () => (_jsx("div", { className: "py-12 text-center text-sm", children: _jsx(I18nLabel, { label: "searchNoResult" }) })), Item = (props) => _jsx(SearchDialogListItem, { ...props }), ...props }) {
59
- const [active, setActive] = useState(items.at(0)?.id ?? null);
54
+ 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
+ const ref = useRef(null);
56
+ const [active, setActive] = useState(() => items && items.length > 0 ? items[0].id : null);
60
57
  const { onOpenChange } = useSearch();
61
58
  const router = useRouter();
62
59
  const onOpen = ({ external, url }) => {
@@ -67,6 +64,8 @@ export function SearchDialogList({ items, Empty = () => (_jsx("div", { className
67
64
  onOpenChange(false);
68
65
  };
69
66
  const onKey = useEffectEvent((e) => {
67
+ if (!items)
68
+ return;
70
69
  if (e.key === 'ArrowDown' || e.key == 'ArrowUp') {
71
70
  let idx = items.findIndex((item) => item.id === active);
72
71
  if (idx === -1)
@@ -86,34 +85,51 @@ export function SearchDialogList({ items, Empty = () => (_jsx("div", { className
86
85
  }
87
86
  });
88
87
  useEffect(() => {
88
+ const element = ref.current;
89
+ if (!element)
90
+ return;
91
+ const observer = new ResizeObserver(() => {
92
+ const viewport = element.firstElementChild;
93
+ element.style.setProperty('--fd-animated-height', `${viewport.clientHeight}px`);
94
+ });
95
+ const viewport = element.firstElementChild;
96
+ if (viewport)
97
+ observer.observe(viewport);
89
98
  window.addEventListener('keydown', onKey);
90
99
  return () => {
100
+ observer.disconnect();
91
101
  window.removeEventListener('keydown', onKey);
92
102
  };
93
103
  }, [onKey]);
94
104
  useOnChange(items, () => {
95
- if (items.length > 0)
105
+ if (items && items.length > 0) {
96
106
  setActive(items[0].id);
107
+ }
97
108
  });
98
- return (_jsx("div", { ...props, className: cn('flex max-h-[460px] flex-col overflow-y-auto border-t p-2', props.className), children: _jsxs(ListContext.Provider, { value: useMemo(() => ({
99
- active,
100
- setActive,
101
- }), [active]), children: [items.length === 0 && Empty(), items.map((item) => (_jsx(Fragment, { children: Item({ item, onClick: () => onOpen(item) }) }, item.id)))] }) }));
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
+ active,
111
+ setActive,
112
+ }), [active]), children: [items?.length === 0 && Empty(), items?.map((item) => (_jsx(Fragment, { children: Item({ item, onClick: () => onOpen(item) }) }, item.id)))] }) }) }));
102
113
  }
114
+ const icons = {
115
+ text: _jsx(Text, { className: "size-4 shrink-0 text-fd-muted-foreground" }),
116
+ heading: _jsx(Hash, { className: "size-4 shrink-0 text-fd-muted-foreground" }),
117
+ page: _jsx(FileText, { className: "size-4 shrink-0" }),
118
+ };
103
119
  export function SearchDialogListItem({ item, className, children, ...props }) {
104
120
  const { active: activeId, setActive } = useSearchList();
105
121
  const active = item.id === activeId;
106
- return (_jsxs("button", { type: "button", ref: useCallback((element) => {
122
+ return (_jsx("button", { type: "button", ref: useCallback((element) => {
107
123
  if (active && element) {
108
124
  element.scrollIntoView({
109
125
  block: 'nearest',
110
126
  });
111
127
  }
112
- }, [active]), "aria-selected": active, className: cn('flex min-h-10 select-none flex-row items-center gap-2.5 rounded-lg px-2 text-start text-sm', active && 'bg-fd-accent text-fd-accent-foreground', className), onPointerMove: () => setActive(item.id), ...props, children: [item.type !== 'page' && (_jsx("div", { role: "none", className: "ms-2 h-full min-h-10 w-px bg-fd-border" })), icons[item.type], _jsx("p", { className: "w-0 flex-1 truncate", children: children ?? item.content })] }));
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 })] })) }));
113
129
  }
114
130
  export function SearchDialogIcon(props) {
115
131
  const { isLoading } = useSearch();
116
- return (_jsxs("div", { ...props, className: cn('relative size-4', props.className), children: [_jsx(LoaderCircle, { className: cn('absolute size-full animate-spin text-fd-primary transition-opacity', !isLoading && 'opacity-0') }), _jsx(SearchIcon, { className: cn('absolute size-full text-fd-muted-foreground transition-opacity', isLoading && 'opacity-0') })] }));
132
+ return (_jsx(SearchIcon, { ...props, className: cn('size-4.5 text-fd-muted-foreground', isLoading && 'animate-pulse duration-400', props.className) }));
117
133
  }
118
134
  const itemVariants = cva('rounded-md border px-2 py-0.5 text-xs font-medium text-fd-muted-foreground transition-colors', {
119
135
  variants: {
@@ -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 min-w-[220px] max-w-[98vw] rounded-lg border bg-fd-popover 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/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 }) })));
9
9
  PopoverContent.displayName = PopoverPrimitive.Content.displayName;
10
10
  const PopoverClose = PopoverPrimitive.PopoverClose;
11
11
  export { Popover, PopoverTrigger, PopoverContent, PopoverClose };
@@ -15,6 +15,6 @@ export interface DocsLayoutProps extends BaseLayoutProps {
15
15
  */
16
16
  containerProps?: HTMLAttributes<HTMLDivElement>;
17
17
  }
18
- export declare function DocsLayout({ nav: { transparentMode, ...nav }, sidebar: { tabs: sidebarTabs, enabled: sidebarEnabled, collapsible: sidebarCollapsible, component: sidebarComponent, components: sidebarComponents, ...sidebar }, searchToggle, disableThemeSwitch, themeSwitch, i18n, children, ...props }: DocsLayoutProps): import("react/jsx-runtime").JSX.Element;
18
+ export declare function DocsLayout({ nav: { transparentMode, ...nav }, sidebar: { tabs: sidebarTabs, footer: sidebarFooter, banner: sidebarBanner, enabled: sidebarEnabled, collapsible: sidebarCollapsible, component: sidebarComponent, components: sidebarComponents, ...sidebarProps }, searchToggle, disableThemeSwitch, themeSwitch, i18n, children, ...props }: DocsLayoutProps): import("react/jsx-runtime").JSX.Element;
19
19
  export { CollapsibleControl, Navbar, NavbarSidebarTrigger, type LinkItemType };
20
20
  //# sourceMappingURL=docs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/layouts/docs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAA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c,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,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,2CAkIjB;AAED,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAE,oBAAoB,EAAE,KAAK,YAAY,EAAE,CAAC"}
@@ -16,26 +16,25 @@ import { NavProvider } from '../contexts/layout.js';
16
16
  import Link from 'fumadocs-core/link';
17
17
  import { LargeSearchToggle, SearchToggle, } from '../components/layout/search-toggle.js';
18
18
  import { HideIfEmpty } from 'fumadocs-core/hide-if-empty';
19
- export function DocsLayout({ nav: { transparentMode, ...nav } = {}, sidebar: { tabs: sidebarTabs, enabled: sidebarEnabled = true, collapsible: sidebarCollapsible = true, component: sidebarComponent, components: sidebarComponents, ...sidebar } = {}, searchToggle = {}, disableThemeSwitch = false, themeSwitch = { enabled: !disableThemeSwitch }, i18n = false, children, ...props }) {
19
+ export function DocsLayout({ nav: { transparentMode, ...nav } = {}, sidebar: { tabs: sidebarTabs, footer: sidebarFooter, banner: sidebarBanner, enabled: sidebarEnabled = true, collapsible: sidebarCollapsible = true, component: sidebarComponent, components: sidebarComponents, ...sidebarProps } = {}, searchToggle = {}, disableThemeSwitch = false, themeSwitch = { enabled: !disableThemeSwitch }, i18n = false, children, ...props }) {
20
20
  const tabs = useMemo(() => getSidebarTabsFromOptions(sidebarTabs, props.tree) ?? [], [sidebarTabs, props.tree]);
21
21
  const links = getLinks(props.links ?? [], props.githubUrl);
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 sidebarFooter = (_jsx(HideIfEmpty, { children: _jsxs("div", { className: "flex items-center justify-end", children: [_jsx("div", { className: "flex items-center flex-1 empty:hidden", children: links
26
- .filter((item) => item.type === 'icon')
27
- .map((item, i) => (_jsx(BaseLinkItem, { item: item, className: cn(buttonVariants({ size: 'icon', color: 'ghost' }), 'text-fd-muted-foreground md:[&_svg]:size-4.5'), "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 &&
28
- (themeSwitch.component ?? (_jsx(ThemeToggle, { className: "p-0", mode: themeSwitch.mode })))] }) }));
29
- sidebarComponent ?? (sidebarComponent = _jsxs(_Fragment, { children: [sidebarCollapsible ? _jsx(CollapsibleControl, {}) : null, _jsxs(Sidebar, { ...sidebar, 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", children: nav.title }), nav.children, sidebarCollapsible && (_jsx(SidebarCollapseTrigger, { className: cn(buttonVariants({
30
26
  color: 'ghost',
31
27
  size: 'icon-sm',
32
28
  className: 'ms-auto mb-auto text-fd-muted-foreground max-md:hidden',
33
29
  })), children: _jsx(SidebarIcon, {}) }))] }), tabs.length > 0 && _jsx(RootToggle, { options: tabs }), searchToggle.enabled !== false &&
34
- (searchToggle.components?.lg ?? (_jsx(LargeSearchToggle, { hideIfDisabled: true, className: "max-md:hidden" }))), sidebar.banner] }) }), _jsxs(SidebarViewport, { children: [links
30
+ (searchToggle.components?.lg ?? (_jsx(LargeSearchToggle, { hideIfDisabled: true, className: "max-md:hidden" }))), sidebarBanner] }) }), _jsxs(SidebarViewport, { children: [links
35
31
  .filter((v) => v.type !== 'icon')
36
- .map((item, i, list) => (_jsx(SidebarLinkItem, { item: item, className: cn(i === list.length - 1 && 'mb-4') }, i))), _jsx(SidebarPageTree, { components: sidebarComponents })] }), _jsx(HideIfEmpty, { children: _jsxs(SidebarFooter, { children: [sidebarFooter, sidebar.footer] }) })] })] }));
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
+ .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 &&
35
+ (themeSwitch.component ?? (_jsx(ThemeToggle, { className: "p-0", mode: themeSwitch.mode })))] }) }), sidebarFooter] })] })] }));
37
36
  return (_jsx(TreeContextProvider, { tree: props.tree, children: _jsxs(NavProvider, { transparentMode: transparentMode, children: [nav.enabled !== false &&
38
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 &&
39
- (searchToggle.components?.sm ?? (_jsx(SearchToggle, { className: "p-2", hideIfDisabled: true }))), _jsx(NavbarSidebarTrigger, { className: "p-2 -me-1.5 md:hidden" })] }))), _jsxs(LayoutBody, { ...props.containerProps, className: cn(variables, props.containerProps?.className), children: [sidebarEnabled && sidebarComponent, children] })] }) }));
38
+ (searchToggle.components?.sm ?? (_jsx(SearchToggle, { className: "p-2", hideIfDisabled: true }))), _jsx(NavbarSidebarTrigger, { className: "p-2 -me-1.5 md:hidden" })] }))), _jsxs(LayoutBody, { ...props.containerProps, className: cn(variables, props.containerProps?.className), children: [sidebarEnabled && sidebar, children] })] }) }));
40
39
  }
41
40
  export { CollapsibleControl, Navbar, NavbarSidebarTrigger };
@@ -1 +1 @@
1
- {"version":3,"file":"mdx.server.d.ts","sourceRoot":"","sources":["../src/mdx.server.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,KAAK,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,oBAAoB,MAAM,OAAO,CAAC;AAEzC;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,YAAY,CAAC,YAAY,CAAC,EAClC,IAAI,EAAE,IAAI,EACV,YAAY,GAAE,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,CAA0B,GAC7D,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAkBzB;AAED,OAAO,EAAE,oBAAoB,IAAI,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"mdx.server.d.ts","sourceRoot":"","sources":["../src/mdx.server.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,KAAK,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,oBAAoB,MAAM,OAAO,CAAC;AAGzC;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,YAAY,CAAC,YAAY,CAAC,EAClC,IAAI,EAAE,IAAI,EACV,YAAY,GAAE,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,CAA0B,GAC7D,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAkBzB;AAED,OAAO,EAAE,oBAAoB,IAAI,OAAO,EAAE,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import defaultMdxComponents from './mdx.js';
3
+ import * as path from 'node:path';
3
4
  /**
4
5
  * Extend the default Link component to resolve relative file paths in `href`.
5
6
  *
@@ -12,7 +13,7 @@ export function createRelativeLink(source, page, OverrideLink = defaultMdxCompon
12
13
  // resolve relative href
13
14
  if (href && href.startsWith('.')) {
14
15
  const target = source.getPageByHref(href, {
15
- dir: page.file.dirname,
16
+ dir: path.dirname(page.path),
16
17
  language: page.locale,
17
18
  });
18
19
  if (target) {
@@ -1 +1 @@
1
- {"version":3,"file":"page.server.d.ts","sourceRoot":"","sources":["../src/page.server.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAoB,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGvE;;GAEG;AACH,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,IAAI,EACJ,IAAI,EAAE,UAAU,EAChB,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG;IAClC,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,YAAY,CAAC,YAAY,CAAC,CAAC;IACjC,IAAI,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC;CACtB,kDA+CA;AAED,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"page.server.d.ts","sourceRoot":"","sources":["../src/page.server.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAoB,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAIvE;;GAEG;AACH,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,IAAI,EACJ,IAAI,EAAE,UAAU,EAChB,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG;IAClC,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,YAAY,CAAC,YAAY,CAAC,CAAC;IACjC,IAAI,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC;CACtB,kDA+CA;AAED,cAAc,QAAQ,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { getPageTreePeers } from 'fumadocs-core/server';
3
3
  import { Card, Cards } from './components/card.js';
4
+ import * as path from 'node:path';
4
5
  /**
5
6
  * @deprecated use https://fumadocs.vercel.app/docs/ui/markdown#further-reading-section instead
6
7
  */
@@ -20,8 +21,8 @@ export function DocsCategory({ page, from, tree: forcedTree, ...props }) {
20
21
  if (items.length === 0) {
21
22
  const pages = from.getPages(page.locale);
22
23
  items = pages
23
- .filter((item) => item.file.dirname === page.file.dirname &&
24
- item.file.path !== page.file.path)
24
+ .filter((item) => path.dirname(item.path) === path.dirname(page.path) &&
25
+ item.path !== page.path)
25
26
  .map((page) => ({
26
27
  type: 'page',
27
28
  name: page.data.title,
package/dist/style.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! tailwindcss v4.1.8 | MIT License | https://tailwindcss.com */
1
+ /*! tailwindcss v4.1.10 | MIT License | https://tailwindcss.com */
2
2
  @layer properties;
3
3
  @layer theme, base, components, utilities;
4
4
  @layer theme {
@@ -8,7 +8,7 @@
8
8
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
9
9
  "Courier New", monospace;
10
10
  --color-red-500: oklch(63.7% 0.237 25.331);
11
- --color-orange-500: oklch(70.5% 0.213 47.604);
11
+ --color-amber-500: oklch(76.9% 0.188 70.08);
12
12
  --color-green-500: oklch(72.3% 0.219 149.579);
13
13
  --color-blue-500: oklch(62.3% 0.214 259.815);
14
14
  --color-black: #000;
@@ -32,7 +32,7 @@
32
32
  --radius-lg: 0.5rem;
33
33
  --radius-xl: 0.75rem;
34
34
  --radius-2xl: 1rem;
35
- --animate-spin: spin 1s linear infinite;
35
+ --animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
36
36
  --blur-sm: 8px;
37
37
  --blur-md: 12px;
38
38
  --blur-lg: 16px;
@@ -69,10 +69,10 @@
69
69
  --color-fd-diff-add-symbol: rgb(10, 200, 100);
70
70
  --animate-fd-fade-in: fd-fade-in 300ms ease;
71
71
  --animate-fd-fade-out: fd-fade-out 300ms ease;
72
- --animate-fd-dialog-in: fd-dialog-in 240ms cubic-bezier(0.16, 1, 0.3, 1);
73
- --animate-fd-dialog-out: fd-dialog-out 240ms cubic-bezier(0.16, 1, 0.3, 1);
74
- --animate-fd-popover-in: fd-popover-in 150ms ease;
75
- --animate-fd-popover-out: fd-popover-out 150ms ease;
72
+ --animate-fd-dialog-in: fd-dialog-in 300ms cubic-bezier(0.16, 1, 0.3, 1);
73
+ --animate-fd-dialog-out: fd-dialog-out 300ms cubic-bezier(0.16, 1, 0.3, 1);
74
+ --animate-fd-popover-in: fd-popover-in 130ms ease;
75
+ --animate-fd-popover-out: fd-popover-out 130ms ease;
76
76
  --animate-fd-collapsible-down: fd-collapsible-down 150ms
77
77
  cubic-bezier(0.45, 0, 0.55, 1);
78
78
  --animate-fd-collapsible-up: fd-collapsible-up 150ms
@@ -318,6 +318,9 @@
318
318
  .start-2\.5 {
319
319
  inset-inline-start: calc(var(--spacing) * 2.5);
320
320
  }
321
+ .start-5 {
322
+ inset-inline-start: calc(var(--spacing) * 5);
323
+ }
321
324
  .end-2 {
322
325
  inset-inline-end: calc(var(--spacing) * 2);
323
326
  }
@@ -841,9 +844,6 @@
841
844
  .mt-6 {
842
845
  margin-top: calc(var(--spacing) * 6);
843
846
  }
844
- .mt-auto {
845
- margin-top: auto;
846
- }
847
847
  .mt-px {
848
848
  margin-top: 1px;
849
849
  }
@@ -937,6 +937,9 @@
937
937
  width: 100%;
938
938
  height: 100%;
939
939
  }
940
+ .h-\(--fd-animated-height\) {
941
+ height: var(--fd-animated-height);
942
+ }
940
943
  .h-\(--fd-height\) {
941
944
  height: var(--fd-height);
942
945
  }
@@ -985,9 +988,6 @@
985
988
  .min-h-0 {
986
989
  min-height: calc(var(--spacing) * 0);
987
990
  }
988
- .min-h-10 {
989
- min-height: calc(var(--spacing) * 10);
990
- }
991
991
  .w-\(--fd-toc-width\) {
992
992
  width: var(--fd-toc-width);
993
993
  }
@@ -1012,12 +1012,12 @@
1012
1012
  .w-\[85\%\] {
1013
1013
  width: 85%;
1014
1014
  }
1015
- .w-\[98vw\] {
1016
- width: 98vw;
1017
- }
1018
1015
  .w-\[286px\] {
1019
1016
  width: 286px;
1020
1017
  }
1018
+ .w-\[calc\(100vw-2\*var\(--spacing\)\)\] {
1019
+ width: calc(100vw - 2 * var(--spacing));
1020
+ }
1021
1021
  .w-fit {
1022
1022
  width: fit-content;
1023
1023
  }
@@ -1060,6 +1060,9 @@
1060
1060
  .min-w-\[220px\] {
1061
1061
  min-width: 220px;
1062
1062
  }
1063
+ .min-w-\[240px\] {
1064
+ min-width: 240px;
1065
+ }
1063
1066
  .min-w-full {
1064
1067
  min-width: 100%;
1065
1068
  }
@@ -1072,6 +1075,9 @@
1072
1075
  .shrink-0 {
1073
1076
  flex-shrink: 0;
1074
1077
  }
1078
+ .origin-\(--radix-popover-content-transform-origin\) {
1079
+ transform-origin: var(--radix-popover-content-transform-origin);
1080
+ }
1075
1081
  .origin-\[top_center\] {
1076
1082
  transform-origin: top center;
1077
1083
  }
@@ -1117,8 +1123,8 @@
1117
1123
  .animate-fd-fade-in {
1118
1124
  animation: var(--animate-fd-fade-in);
1119
1125
  }
1120
- .animate-spin {
1121
- animation: var(--animate-spin);
1126
+ .animate-pulse {
1127
+ animation: var(--animate-pulse);
1122
1128
  }
1123
1129
  .scroll-m-24 {
1124
1130
  scroll-margin: calc(var(--spacing) * 24);
@@ -1220,6 +1226,9 @@
1220
1226
  .overflow-y-auto {
1221
1227
  overflow-y: auto;
1222
1228
  }
1229
+ .rounded-2xl {
1230
+ border-radius: var(--radius-2xl);
1231
+ }
1223
1232
  .rounded-\[inherit\] {
1224
1233
  border-radius: inherit;
1225
1234
  }
@@ -1279,6 +1288,12 @@
1279
1288
  .border-transparent {
1280
1289
  border-color: transparent;
1281
1290
  }
1291
+ .border-s-amber-500\/50 {
1292
+ border-inline-start-color: color-mix(in srgb, oklch(76.9% 0.188 70.08) 50%, transparent);
1293
+ @supports (color: color-mix(in lab, red, red)) {
1294
+ border-inline-start-color: color-mix(in oklab, var(--color-amber-500) 50%, transparent);
1295
+ }
1296
+ }
1282
1297
  .border-s-blue-500\/50 {
1283
1298
  border-inline-start-color: color-mix(in srgb, oklch(62.3% 0.214 259.815) 50%, transparent);
1284
1299
  @supports (color: color-mix(in lab, red, red)) {
@@ -1291,12 +1306,6 @@
1291
1306
  border-inline-start-color: color-mix(in oklab, var(--color-green-500) 50%, transparent);
1292
1307
  }
1293
1308
  }
1294
- .border-s-orange-500\/50 {
1295
- border-inline-start-color: color-mix(in srgb, oklch(70.5% 0.213 47.604) 50%, transparent);
1296
- @supports (color: color-mix(in lab, red, red)) {
1297
- border-inline-start-color: color-mix(in oklab, var(--color-orange-500) 50%, transparent);
1298
- }
1299
- }
1300
1309
  .border-s-red-500\/50 {
1301
1310
  border-inline-start-color: color-mix(in srgb, oklch(63.7% 0.237 25.331) 50%, transparent);
1302
1311
  @supports (color: color-mix(in lab, red, red)) {
@@ -1339,8 +1348,11 @@
1339
1348
  .bg-fd-muted {
1340
1349
  background-color: var(--color-fd-muted);
1341
1350
  }
1342
- .bg-fd-popover {
1343
- background-color: var(--color-fd-popover);
1351
+ .bg-fd-popover\/50 {
1352
+ background-color: color-mix(in srgb, hsl(0, 0%, 98%) 50%, transparent);
1353
+ @supports (color: color-mix(in lab, red, red)) {
1354
+ background-color: color-mix(in oklab, var(--color-fd-popover) 50%, transparent);
1355
+ }
1344
1356
  }
1345
1357
  .bg-fd-primary {
1346
1358
  background-color: var(--color-fd-primary);
@@ -1366,15 +1378,15 @@
1366
1378
  .\[mask-image\:linear-gradient\(to_bottom\,transparent\,white_16px\,white_calc\(100\%-16px\)\,transparent\)\] {
1367
1379
  mask-image: linear-gradient(to bottom,transparent,white 16px,white calc(100% - 16px),transparent);
1368
1380
  }
1381
+ .fill-amber-500 {
1382
+ fill: var(--color-amber-500);
1383
+ }
1369
1384
  .fill-blue-500 {
1370
1385
  fill: var(--color-blue-500);
1371
1386
  }
1372
1387
  .fill-green-500 {
1373
1388
  fill: var(--color-green-500);
1374
1389
  }
1375
- .fill-orange-500 {
1376
- fill: var(--color-orange-500);
1377
- }
1378
1390
  .fill-red-500 {
1379
1391
  fill: var(--color-red-500);
1380
1392
  }
@@ -1610,6 +1622,10 @@
1610
1622
  .opacity-0 {
1611
1623
  opacity: 0%;
1612
1624
  }
1625
+ .shadow-2xl {
1626
+ --tw-shadow: 0 25px 50px -12px var(--tw-shadow-color, rgb(0 0 0 / 0.25));
1627
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
1628
+ }
1613
1629
  .shadow-lg {
1614
1630
  --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));
1615
1631
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
@@ -1622,6 +1638,12 @@
1622
1638
  --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));
1623
1639
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
1624
1640
  }
1641
+ .shadow-black\/30 {
1642
+ --tw-shadow-color: color-mix(in srgb, #000 30%, transparent);
1643
+ @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);
1645
+ }
1646
+ }
1625
1647
  .outline {
1626
1648
  outline-style: var(--tw-outline-style);
1627
1649
  outline-width: 1px;
@@ -1649,6 +1671,11 @@
1649
1671
  transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
1650
1672
  transition-duration: var(--tw-duration, var(--default-transition-duration));
1651
1673
  }
1674
+ .transition-\[height\] {
1675
+ transition-property: height;
1676
+ transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
1677
+ transition-duration: var(--tw-duration, var(--default-transition-duration));
1678
+ }
1652
1679
  .transition-\[margin\] {
1653
1680
  transition-property: margin;
1654
1681
  transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
@@ -1691,6 +1718,10 @@
1691
1718
  --tw-duration: 300ms;
1692
1719
  transition-duration: 300ms;
1693
1720
  }
1721
+ .duration-400 {
1722
+ --tw-duration: 400ms;
1723
+ transition-duration: 400ms;
1724
+ }
1694
1725
  .outline-none {
1695
1726
  --tw-outline-style: none;
1696
1727
  outline-style: none;
@@ -2072,6 +2103,13 @@
2072
2103
  background-color: var(--color-fd-background);
2073
2104
  }
2074
2105
  }
2106
+ .max-md\:backdrop-blur-sm {
2107
+ @media (width < 48rem) {
2108
+ --tw-backdrop-blur: blur(var(--blur-sm));
2109
+ -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
+ 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
+ }
2112
+ }
2075
2113
  .max-sm\:mt-2 {
2076
2114
  @media (width < 40rem) {
2077
2115
  margin-top: calc(var(--spacing) * 2);
@@ -2344,7 +2382,7 @@
2344
2382
  --color-fd-primary-foreground: hsl(0, 0%, 9%);
2345
2383
  --color-fd-secondary: hsl(0, 0%, 12.9%);
2346
2384
  --color-fd-secondary-foreground: hsl(0, 0%, 98%);
2347
- --color-fd-accent: hsl(0, 0%, 16.9%);
2385
+ --color-fd-accent: hsla(0, 0%, 40.9%, 30%);
2348
2386
  --color-fd-accent-foreground: hsl(0, 0%, 90%);
2349
2387
  --color-fd-ring: hsl(0, 0%, 54.9%);
2350
2388
  }
@@ -2694,9 +2732,9 @@
2694
2732
  syntax: "*";
2695
2733
  inherits: false;
2696
2734
  }
2697
- @keyframes spin {
2698
- to {
2699
- transform: rotate(360deg);
2735
+ @keyframes pulse {
2736
+ 50% {
2737
+ opacity: 0.5;
2700
2738
  }
2701
2739
  }
2702
2740
  @keyframes fd-collapsible-down {
@@ -2756,21 +2794,13 @@
2756
2794
  @keyframes fd-popover-in {
2757
2795
  from {
2758
2796
  opacity: 0;
2759
- transform: translateY(-12px);
2760
- }
2761
- to {
2762
- opacity: 1;
2763
- transform: translateY(0);
2797
+ transform: translateY(-12px) scale(0.9);
2764
2798
  }
2765
2799
  }
2766
2800
  @keyframes fd-popover-out {
2767
- from {
2768
- opacity: 1;
2769
- transform: translateY(0);
2770
- }
2771
2801
  to {
2772
2802
  opacity: 0;
2773
- transform: translateY(-12px);
2803
+ transform: translateY(-12px) scale(0.9);
2774
2804
  }
2775
2805
  }
2776
2806
  @keyframes fd-fade-in {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-ui",
3
- "version": "15.5.1",
3
+ "version": "15.5.3",
4
4
  "description": "The framework for building a documentation website in Next.js",
5
5
  "keywords": [
6
6
  "NextJs",
@@ -87,31 +87,38 @@
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.6.3",
91
- "tailwind-merge": "^3.3.0",
92
- "fumadocs-core": "15.5.1"
90
+ "react-remove-scroll": "^2.7.1",
91
+ "tailwind-merge": "^3.3.1",
92
+ "fumadocs-core": "15.5.3"
93
93
  },
94
94
  "devDependencies": {
95
95
  "@next/eslint-plugin-next": "^15.3.3",
96
- "@tailwindcss/cli": "^4.1.8",
96
+ "@tailwindcss/cli": "^4.1.10",
97
97
  "@types/lodash.merge": "^4.6.9",
98
- "@types/react": "^19.1.6",
99
- "@types/react-dom": "^19.1.5",
98
+ "@types/react": "^19.1.8",
99
+ "@types/react-dom": "^19.1.6",
100
100
  "next": "15.3.3",
101
- "tailwindcss": "^4.1.8",
101
+ "tailwindcss": "^4.1.10",
102
102
  "tsc-alias": "^1.8.16",
103
- "@fumadocs/cli": "0.2.0",
103
+ "@fumadocs/cli": "0.2.1",
104
104
  "eslint-config-custom": "0.0.0",
105
- "fumadocs-core": "15.5.1",
105
+ "fumadocs-core": "15.5.3",
106
106
  "tsconfig": "0.0.0"
107
107
  },
108
108
  "peerDependencies": {
109
109
  "next": "14.x.x || 15.x.x",
110
110
  "react": "18.x.x || 19.x.x",
111
111
  "react-dom": "18.x.x || 19.x.x",
112
- "tailwindcss": "^3.4.14 || ^4.0.0"
112
+ "tailwindcss": "^3.4.14 || ^4.0.0",
113
+ "@types/react": "*"
113
114
  },
114
115
  "peerDependenciesMeta": {
116
+ "next": {
117
+ "optional": true
118
+ },
119
+ "@types/react": {
120
+ "optional": true
121
+ },
115
122
  "tailwindcss": {
116
123
  "optional": true
117
124
  }