fumadocs-ui 13.4.10 → 14.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/dist/{chunk-774JT2B6.js → chunk-5KVEK5A7.js} +11 -8
  2. package/dist/chunk-5QPVK7QM.js +542 -0
  3. package/dist/chunk-BN7HGCQ4.js +212 -0
  4. package/dist/chunk-CDPVENXR.js +8 -0
  5. package/dist/{chunk-KWZZNVSY.js → chunk-CPGKWLLV.js} +7 -3
  6. package/dist/chunk-DN6Z5VW6.js +61 -0
  7. package/dist/{chunk-HOIRMHZT.js → chunk-E3VO2QQT.js} +10 -2
  8. package/dist/chunk-GHOAONNQ.js +48 -0
  9. package/dist/{chunk-ERUVE5R6.js → chunk-IHIFNFRB.js} +4 -2
  10. package/dist/{chunk-CP67AHDD.js → chunk-IVBHRX3O.js} +1 -1
  11. package/dist/{chunk-NSEJBI4V.js → chunk-KZTWSBYY.js} +28 -16
  12. package/dist/chunk-MCX7E6ZW.js +57 -0
  13. package/dist/chunk-PZTQPB4U.js +125 -0
  14. package/dist/{chunk-EDNTYBXS.js → chunk-QKOA6KEZ.js} +2 -17
  15. package/dist/{chunk-YIOV4KEY.js → chunk-TYZZJ335.js} +26 -16
  16. package/dist/chunk-V6RONFCQ.js +69 -0
  17. package/dist/chunk-WRBUXI2A.js +82 -0
  18. package/dist/chunk-YL3MZH7N.js +66 -0
  19. package/dist/components/accordion.js +7 -3
  20. package/dist/components/api.d.ts +2 -5
  21. package/dist/components/api.js +2 -4
  22. package/dist/components/banner.js +5 -6
  23. package/dist/components/callout.js +2 -1
  24. package/dist/components/card.d.ts +6 -5
  25. package/dist/components/card.js +1 -1
  26. package/dist/components/codeblock.js +4 -3
  27. package/dist/components/dialog/search-algolia.d.ts +10 -4
  28. package/dist/components/dialog/search-algolia.js +25 -15
  29. package/dist/components/dialog/search-default.d.ts +10 -6
  30. package/dist/components/dialog/search-default.js +27 -5
  31. package/dist/components/dialog/search.d.ts +7 -7
  32. package/dist/components/dialog/search.js +4 -3
  33. package/dist/components/files.js +15 -11
  34. package/dist/components/heading.js +2 -1
  35. package/dist/components/image-zoom.js +8 -5
  36. package/dist/components/inline-toc.js +3 -1
  37. package/dist/components/layout/language-toggle.d.ts +4 -3
  38. package/dist/components/layout/language-toggle.js +8 -6
  39. package/dist/components/layout/root-toggle.d.ts +3 -3
  40. package/dist/components/layout/root-toggle.js +7 -73
  41. package/dist/components/tabs.js +30 -13
  42. package/dist/components/type-table.d.ts +7 -5
  43. package/dist/components/type-table.js +11 -11
  44. package/dist/dynamic-sidebar-QWGMOUMS.js +129 -0
  45. package/dist/{edit-on-github-YFVYCMB7.js → edit-on-github-PCTRDRD6.js} +10 -8
  46. package/dist/layouts/docs.client.d.ts +27 -0
  47. package/dist/layouts/docs.client.js +200 -0
  48. package/dist/layouts/docs.d.ts +30 -0
  49. package/dist/layouts/docs.js +207 -0
  50. package/dist/layouts/home.client.d.ts +11 -0
  51. package/dist/layouts/home.client.js +274 -0
  52. package/dist/layouts/home.d.ts +7 -0
  53. package/dist/layouts/home.js +61 -0
  54. package/dist/layouts/shared.d.ts +2 -0
  55. package/dist/layouts/shared.js +9 -0
  56. package/dist/mdx.client.js +4 -3
  57. package/dist/mdx.d.ts +1 -2
  58. package/dist/mdx.js +8 -10
  59. package/dist/og.d.ts +1 -7
  60. package/dist/og.js +5 -15
  61. package/dist/page.client.d.ts +2 -1
  62. package/dist/page.client.js +91 -63
  63. package/dist/page.d.ts +7 -6
  64. package/dist/page.js +78 -62
  65. package/dist/provider.d.ts +1 -2
  66. package/dist/provider.js +3 -4
  67. package/dist/shared-SScCiV7b.d.ts +152 -0
  68. package/dist/{sidebar-DwBSl7jC.d.ts → sidebar-CQ4HmzQl.d.ts} +8 -9
  69. package/dist/style.css +1 -1
  70. package/dist/tailwind-plugin.js +86 -39
  71. package/dist/{toc-clerk-CAID2WGC.js → toc-clerk-SKE4LBT7.js} +40 -50
  72. package/dist/{tree-CrKzI9Nz.d.ts → tree-06ley65N.d.ts} +9 -3
  73. package/package.json +32 -68
  74. package/dist/chunk-KCZRDPB4.js +0 -308
  75. package/dist/chunk-LSTPTAZ5.js +0 -58
  76. package/dist/chunk-P4HLRHHV.js +0 -36
  77. package/dist/chunk-UOD2T27N.js +0 -27
  78. package/dist/chunk-WLTWFYQA.js +0 -44
  79. package/dist/docs-layout.client.d.ts +0 -18
  80. package/dist/docs-layout.client.js +0 -406
  81. package/dist/home-layout.client.d.ts +0 -9
  82. package/dist/home-layout.client.js +0 -88
  83. package/dist/home-layout.d.ts +0 -7
  84. package/dist/home-layout.js +0 -30
  85. package/dist/layout.d.ts +0 -19
  86. package/dist/layout.js +0 -127
  87. package/dist/layout.shared-DEQFTB9M.d.ts +0 -117
  88. package/dist/twoslash/popup.d.ts +0 -11
  89. package/dist/twoslash/popup.js +0 -97
  90. package/dist/twoslash.css +0 -1
  91. /package/dist/{image-zoom.css → components/image-zoom.css} +0 -0
@@ -1,18 +1,20 @@
1
1
  "use client";
2
- import {
3
- useI18n
4
- } from "./chunk-EFMHXXHW.js";
5
2
  import {
6
3
  buttonVariants
7
- } from "./chunk-EDNTYBXS.js";
4
+ } from "./chunk-QKOA6KEZ.js";
5
+ import {
6
+ SquarePen
7
+ } from "./chunk-5QPVK7QM.js";
8
8
  import {
9
9
  twMerge
10
10
  } from "./chunk-TK3TM3MR.js";
11
+ import {
12
+ useI18n
13
+ } from "./chunk-EFMHXXHW.js";
11
14
  import "./chunk-MLKGABMK.js";
12
15
 
13
16
  // src/components/layout/edit-on-github.tsx
14
17
  import { forwardRef } from "react";
15
- import { Edit } from "lucide-react";
16
18
  import { jsx, jsxs } from "react/jsx-runtime";
17
19
  var EditOnGitHub = forwardRef(
18
20
  ({ owner, repo, sha = "main", path, ...props }, ref) => {
@@ -27,13 +29,13 @@ var EditOnGitHub = forwardRef(
27
29
  ...props,
28
30
  className: twMerge(
29
31
  buttonVariants({
30
- color: "outline",
31
- className: "text-fd-muted-foreground text-xs p-1.5 gap-2"
32
+ color: "secondary",
33
+ className: "gap-1.5 py-1 text-fd-muted-foreground"
32
34
  }),
33
35
  props.className
34
36
  ),
35
37
  children: [
36
- /* @__PURE__ */ jsx(Edit, { className: "size-3.5" }),
38
+ /* @__PURE__ */ jsx(SquarePen, { className: "size-3.5" }),
37
39
  text.editOnGithub
38
40
  ]
39
41
  }
@@ -0,0 +1,27 @@
1
+ import { ReactNode, ButtonHTMLAttributes } from 'react';
2
+ import { L as LinkItemType, S as SharedNavProps } from '../shared-SScCiV7b.js';
3
+ export { I as IconItem, N as NavProvider } from '../shared-SScCiV7b.js';
4
+ export { RootToggle } from '../components/layout/root-toggle.js';
5
+ export { a as Sidebar } from '../sidebar-CQ4HmzQl.js';
6
+ export { T as TreeContextProvider } from '../tree-06ley65N.js';
7
+ export { LanguageToggle, LanguageToggleText } from '../components/layout/language-toggle.js';
8
+ import 'react/jsx-runtime';
9
+ import 'fumadocs-core/server';
10
+
11
+ interface MenuItemProps extends React.HTMLAttributes<HTMLElement> {
12
+ item: LinkItemType;
13
+ }
14
+ declare function MenuItem({ item, ...props }: MenuItemProps): ReactNode;
15
+
16
+ declare function ThemeToggle({ className, ...props }: ButtonHTMLAttributes<HTMLButtonElement>): React.ReactElement;
17
+
18
+ declare function SubNav({ title, url, enableSearch, ...props }: Omit<SharedNavProps, 'transparentMode'> & {
19
+ className?: string;
20
+ }): React.ReactElement;
21
+ declare function SidebarCollapseTrigger(props: ButtonHTMLAttributes<HTMLButtonElement>): React.ReactElement;
22
+ interface LinksMenuProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
23
+ items?: ReactNode;
24
+ }
25
+ declare function LinksMenu({ items, ...props }: LinksMenuProps): ReactNode;
26
+
27
+ export { LinksMenu, MenuItem, SidebarCollapseTrigger, SubNav, ThemeToggle };
@@ -0,0 +1,200 @@
1
+ "use client";
2
+ import {
3
+ Sidebar,
4
+ itemVariants
5
+ } from "../chunk-BN7HGCQ4.js";
6
+ import {
7
+ BaseLinkItem,
8
+ ButtonItem,
9
+ IconItem,
10
+ ThemeToggle
11
+ } from "../chunk-PZTQPB4U.js";
12
+ import {
13
+ SearchToggle
14
+ } from "../chunk-V6RONFCQ.js";
15
+ import {
16
+ LanguageToggle,
17
+ LanguageToggleText
18
+ } from "../chunk-KZTWSBYY.js";
19
+ import {
20
+ RootToggle
21
+ } from "../chunk-WRBUXI2A.js";
22
+ import "../chunk-CDPVENXR.js";
23
+ import {
24
+ Collapsible,
25
+ CollapsibleContent,
26
+ CollapsibleTrigger
27
+ } from "../chunk-TQJ6YPJ3.js";
28
+ import {
29
+ buttonVariants
30
+ } from "../chunk-QKOA6KEZ.js";
31
+ import {
32
+ NavContext,
33
+ NavProvider,
34
+ Title
35
+ } from "../chunk-MCX7E6ZW.js";
36
+ import {
37
+ Popover,
38
+ PopoverContent,
39
+ PopoverTrigger
40
+ } from "../chunk-IVBHRX3O.js";
41
+ import "../chunk-2FLZOPQN.js";
42
+ import {
43
+ ChevronDown,
44
+ Menu,
45
+ PanelLeft,
46
+ X
47
+ } from "../chunk-5QPVK7QM.js";
48
+ import {
49
+ twMerge
50
+ } from "../chunk-TK3TM3MR.js";
51
+ import {
52
+ useSearchContext
53
+ } from "../chunk-ET4TW6M5.js";
54
+ import {
55
+ TreeContextProvider
56
+ } from "../chunk-YL3MZH7N.js";
57
+ import {
58
+ useSidebar
59
+ } from "../chunk-27HFSL7N.js";
60
+ import "../chunk-EFMHXXHW.js";
61
+ import "../chunk-MLKGABMK.js";
62
+
63
+ // src/layouts/docs.client.tsx
64
+ import { SidebarTrigger } from "fumadocs-core/sidebar";
65
+ import {
66
+ useContext,
67
+ useState
68
+ } from "react";
69
+ import { usePathname } from "next/navigation";
70
+ import { useOnChange } from "fumadocs-core/utils/use-on-change";
71
+
72
+ // src/layouts/menu-item.tsx
73
+ import { jsx, jsxs } from "react/jsx-runtime";
74
+ function MenuItem({ item, ...props }) {
75
+ if (item.type === "custom")
76
+ return /* @__PURE__ */ jsx("div", { ...props, className: twMerge("grid", props.className), children: item.children });
77
+ if (item.type === "menu") {
78
+ return /* @__PURE__ */ jsxs(Collapsible, { className: "flex flex-col", children: [
79
+ /* @__PURE__ */ jsxs(
80
+ CollapsibleTrigger,
81
+ {
82
+ ...props,
83
+ "data-active": false,
84
+ className: twMerge(itemVariants(), "group/link", props.className),
85
+ children: [
86
+ item.icon,
87
+ item.text,
88
+ /* @__PURE__ */ jsx(ChevronDown, { className: "ms-auto transition-transform group-data-[state=closed]/link:-rotate-90" })
89
+ ]
90
+ }
91
+ ),
92
+ /* @__PURE__ */ jsx(CollapsibleContent, { children: /* @__PURE__ */ jsx("div", { className: "ms-2 flex flex-col border-s py-2 ps-2", children: item.items.map((child, i) => /* @__PURE__ */ jsx(MenuItem, { item: child }, i)) }) })
93
+ ] });
94
+ }
95
+ if (item.type === "button") {
96
+ return /* @__PURE__ */ jsx(ButtonItem, { item, ...props });
97
+ }
98
+ return /* @__PURE__ */ jsxs(
99
+ BaseLinkItem,
100
+ {
101
+ item,
102
+ ...props,
103
+ className: twMerge(itemVariants(), props.className),
104
+ children: [
105
+ item.icon,
106
+ item.text
107
+ ]
108
+ }
109
+ );
110
+ }
111
+
112
+ // src/layouts/docs.client.tsx
113
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
114
+ function SubNav({
115
+ title,
116
+ url,
117
+ enableSearch = true,
118
+ ...props
119
+ }) {
120
+ const { open } = useSidebar();
121
+ const { isTransparent } = useContext(NavContext);
122
+ const search = useSearchContext();
123
+ return /* @__PURE__ */ jsxs2(
124
+ "header",
125
+ {
126
+ id: "nd-subnav",
127
+ ...props,
128
+ className: twMerge(
129
+ "sticky top-[var(--fd-banner-height)] z-40 flex flex-row items-center border-b border-fd-foreground/10 px-4 transition-colors",
130
+ (!isTransparent || open) && "bg-fd-background/80 backdrop-blur-lg",
131
+ props.className
132
+ ),
133
+ children: [
134
+ /* @__PURE__ */ jsx2(Title, { url, title }),
135
+ /* @__PURE__ */ jsx2("div", { className: "flex flex-1 flex-row items-center gap-1", children: props.children }),
136
+ search.enabled && enableSearch ? /* @__PURE__ */ jsx2(SearchToggle, {}) : null,
137
+ /* @__PURE__ */ jsx2(
138
+ SidebarTrigger,
139
+ {
140
+ className: twMerge(
141
+ buttonVariants({
142
+ color: "ghost",
143
+ size: "icon",
144
+ className: "-me-2 md:hidden"
145
+ })
146
+ ),
147
+ children: open ? /* @__PURE__ */ jsx2(X, {}) : /* @__PURE__ */ jsx2(Menu, {})
148
+ }
149
+ )
150
+ ]
151
+ }
152
+ );
153
+ }
154
+ function SidebarCollapseTrigger(props) {
155
+ const { setCollapsed } = useSidebar();
156
+ return /* @__PURE__ */ jsx2(
157
+ "button",
158
+ {
159
+ type: "button",
160
+ "aria-label": "Collapse Sidebar",
161
+ ...props,
162
+ className: twMerge(
163
+ buttonVariants({
164
+ color: "ghost",
165
+ size: "icon"
166
+ }),
167
+ props.className
168
+ ),
169
+ onClick: () => {
170
+ setCollapsed((prev) => !prev);
171
+ },
172
+ children: /* @__PURE__ */ jsx2(PanelLeft, {})
173
+ }
174
+ );
175
+ }
176
+ function LinksMenu({ items, ...props }) {
177
+ const [open, setOpen] = useState(false);
178
+ const pathname = usePathname();
179
+ useOnChange(pathname, () => {
180
+ setOpen(false);
181
+ });
182
+ return /* @__PURE__ */ jsxs2(Popover, { open, onOpenChange: setOpen, children: [
183
+ /* @__PURE__ */ jsx2(PopoverTrigger, { ...props }),
184
+ /* @__PURE__ */ jsx2(PopoverContent, { className: "flex flex-col p-1", children: items })
185
+ ] });
186
+ }
187
+ export {
188
+ IconItem,
189
+ LanguageToggle,
190
+ LanguageToggleText,
191
+ LinksMenu,
192
+ MenuItem,
193
+ NavProvider,
194
+ RootToggle,
195
+ Sidebar,
196
+ SidebarCollapseTrigger,
197
+ SubNav,
198
+ ThemeToggle,
199
+ TreeContextProvider
200
+ };
@@ -0,0 +1,30 @@
1
+ import { PageTree } from 'fumadocs-core/server';
2
+ import { HTMLAttributes, ReactNode } from 'react';
3
+ import { S as SidebarProps } from '../sidebar-CQ4HmzQl.js';
4
+ import { B as BaseLayoutProps } from '../shared-SScCiV7b.js';
5
+ export { L as LinkItemType } from '../shared-SScCiV7b.js';
6
+ import { Option } from '../components/layout/root-toggle.js';
7
+ import 'react/jsx-runtime';
8
+
9
+ interface TabOptions {
10
+ transform?: (option: Option, node: PageTree.Folder) => Option | null;
11
+ }
12
+ declare function getSidebarTabs(pageTree: PageTree.Root, { transform }?: TabOptions): Option[];
13
+
14
+ interface SidebarOptions extends Omit<SidebarProps, 'children'> {
15
+ enabled: boolean;
16
+ component: ReactNode;
17
+ collapsible: boolean;
18
+ /**
19
+ * Root Toggle options
20
+ */
21
+ tabs?: Option[] | TabOptions | false;
22
+ }
23
+ interface DocsLayoutProps extends BaseLayoutProps {
24
+ tree: PageTree.Root;
25
+ sidebar?: Partial<SidebarOptions>;
26
+ containerProps?: HTMLAttributes<HTMLDivElement>;
27
+ }
28
+ declare function DocsLayout({ nav: { enabled: navEnabled, component: navReplace, transparentMode, ...nav }, sidebar: { enabled: sidebarEnabled, collapsible, component: sidebarReplace, tabs: tabOptions, ...sidebar }, i18n, ...props }: DocsLayoutProps): ReactNode;
29
+
30
+ export { DocsLayout, type DocsLayoutProps, type TabOptions, getSidebarTabs };
@@ -0,0 +1,207 @@
1
+ import {
2
+ TreeContextProvider,
3
+ SidebarCollapseTrigger,
4
+ ThemeToggle,
5
+ SubNav,
6
+ LanguageToggle,
7
+ LanguageToggleText,
8
+ LinksMenu,
9
+ RootToggle,
10
+ Sidebar,
11
+ IconItem,
12
+ MenuItem,
13
+ NavProvider,
14
+ } from "./docs.client"
15
+ import {
16
+ buttonVariants
17
+ } from "../chunk-QKOA6KEZ.js";
18
+ import {
19
+ Ellipsis,
20
+ Languages
21
+ } from "../chunk-5QPVK7QM.js";
22
+ import {
23
+ getLinks,
24
+ replaceOrDefault
25
+ } from "../chunk-E3VO2QQT.js";
26
+ import {
27
+ twMerge
28
+ } from "../chunk-TK3TM3MR.js";
29
+ import "../chunk-MLKGABMK.js";
30
+
31
+ // src/layouts/docs.tsx
32
+ import Link from "next/link";
33
+ import { notFound } from "next/navigation";
34
+ import dynamic from "next/dynamic";
35
+
36
+ // src/utils/get-sidebar-tabs.tsx
37
+ function getSidebarTabs(pageTree, { transform } = {}) {
38
+ const options = [];
39
+ function traverse(node) {
40
+ if (node.type === "folder" && node.root && node.index) {
41
+ const option = {
42
+ url: node.index.url,
43
+ title: node.name,
44
+ icon: node.icon,
45
+ description: node.description
46
+ };
47
+ const mapped = transform ? transform(option, node) : option;
48
+ if (mapped) options.push(mapped);
49
+ }
50
+ if (node.type === "folder") node.children.forEach(traverse);
51
+ }
52
+ pageTree.children.forEach(traverse);
53
+ return options;
54
+ }
55
+
56
+ // src/layouts/docs.tsx
57
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
58
+ var DynamicSidebar = dynamic(
59
+ () => import("../dynamic-sidebar-QWGMOUMS.js")
60
+ );
61
+ function DocsLayout({
62
+ nav: {
63
+ enabled: navEnabled = true,
64
+ component: navReplace,
65
+ transparentMode,
66
+ ...nav
67
+ } = {},
68
+ sidebar: {
69
+ enabled: sidebarEnabled = true,
70
+ collapsible = true,
71
+ component: sidebarReplace,
72
+ tabs: tabOptions,
73
+ ...sidebar
74
+ } = {},
75
+ i18n = false,
76
+ ...props
77
+ }) {
78
+ const links = getLinks(props.links ?? [], props.githubUrl);
79
+ const Aside = collapsible ? DynamicSidebar : Sidebar;
80
+ if (props.tree === void 0) notFound();
81
+ let tabs = [];
82
+ if (Array.isArray(tabOptions)) {
83
+ tabs = tabOptions;
84
+ } else if (typeof tabOptions === "object") {
85
+ tabs = getSidebarTabs(props.tree, tabOptions);
86
+ } else if (tabOptions !== false) {
87
+ tabs = getSidebarTabs(props.tree);
88
+ }
89
+ const banner = /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1 px-4 empty:hidden md:px-3 md:pb-2", children: [
90
+ /* @__PURE__ */ jsx(SidebarHeader, { ...nav, links }),
91
+ tabs.length > 0 ? /* @__PURE__ */ jsx(RootToggle, { className: "-mx-1", options: tabs }) : null,
92
+ sidebar.banner
93
+ ] });
94
+ const footer = /* @__PURE__ */ jsxs(Fragment, { children: [
95
+ /* @__PURE__ */ jsx("div", { className: "flex flex-row items-center border-t py-1 empty:hidden max-md:gap-1.5 max-md:px-3 md:mx-3", children: /* @__PURE__ */ jsx(
96
+ SidebarFooter,
97
+ {
98
+ sidebarCollapsible: collapsible,
99
+ i18n,
100
+ disableThemeSwitch: props.disableThemeSwitch ?? false,
101
+ iconItems: links.filter((v) => v.type === "icon")
102
+ }
103
+ ) }),
104
+ sidebar.footer
105
+ ] });
106
+ return /* @__PURE__ */ jsx(TreeContextProvider, { tree: props.tree, children: /* @__PURE__ */ jsxs(NavProvider, { transparentMode, children: [
107
+ replaceOrDefault(
108
+ { enabled: navEnabled, component: navReplace },
109
+ /* @__PURE__ */ jsx(SubNav, { className: "h-14 md:hidden", ...nav }),
110
+ nav
111
+ ),
112
+ /* @__PURE__ */ jsxs(
113
+ "main",
114
+ {
115
+ id: "nd-docs-layout",
116
+ ...props.containerProps,
117
+ className: twMerge(
118
+ "flex flex-1 flex-row",
119
+ !navReplace && navEnabled ? "[--fd-nav-height:3.5rem] md:[--fd-nav-height:0px]" : null,
120
+ props.containerProps?.className
121
+ ),
122
+ children: [
123
+ replaceOrDefault(
124
+ { enabled: sidebarEnabled, component: sidebarReplace },
125
+ /* @__PURE__ */ jsx(Aside, { ...sidebar, banner, footer, children: /* @__PURE__ */ jsx("div", { className: "flex flex-col px-2 pt-4 empty:hidden md:hidden", children: links.filter((v) => v.type !== "icon").map((item, i) => /* @__PURE__ */ jsx(MenuItem, { item }, i)) }) }),
126
+ {
127
+ ...sidebar,
128
+ banner,
129
+ footer
130
+ }
131
+ ),
132
+ props.children
133
+ ]
134
+ }
135
+ )
136
+ ] }) });
137
+ }
138
+ function SidebarHeader({
139
+ links,
140
+ ...props
141
+ }) {
142
+ if (!props.title || !props.children || links.length === 0) return null;
143
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-row items-center border-b pb-2 max-md:hidden", children: [
144
+ props.title ? /* @__PURE__ */ jsx(
145
+ Link,
146
+ {
147
+ href: props.url ?? "/",
148
+ className: "inline-flex items-center gap-2.5 py-1 font-medium",
149
+ children: props.title
150
+ }
151
+ ) : null,
152
+ props.children,
153
+ links.length > 0 ? /* @__PURE__ */ jsx(
154
+ LinksMenu,
155
+ {
156
+ items: links.map((item, i) => /* @__PURE__ */ jsx(MenuItem, { item }, i)),
157
+ className: twMerge(
158
+ buttonVariants({
159
+ size: "icon",
160
+ color: "ghost"
161
+ }),
162
+ "ms-auto"
163
+ ),
164
+ children: /* @__PURE__ */ jsx(Ellipsis, {})
165
+ }
166
+ ) : null
167
+ ] });
168
+ }
169
+ function SidebarFooter({
170
+ iconItems,
171
+ ...props
172
+ }) {
173
+ if (props.i18n) {
174
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
175
+ iconItems.length > 0 ? /* @__PURE__ */ jsx("div", { className: "flex flex-row items-center md:hidden", children: iconItems.map((item, i) => /* @__PURE__ */ jsx(
176
+ IconItem,
177
+ {
178
+ item,
179
+ className: "text-fd-muted-foreground"
180
+ },
181
+ i
182
+ )) }) : null,
183
+ !props.disableThemeSwitch ? /* @__PURE__ */ jsx(ThemeToggle, {}) : null,
184
+ /* @__PURE__ */ jsxs(LanguageToggle, { className: "max-md:order-first max-md:me-auto md:ms-auto", children: [
185
+ /* @__PURE__ */ jsx(Languages, { className: "size-5" }),
186
+ /* @__PURE__ */ jsx(LanguageToggleText, { className: "md:hidden" })
187
+ ] }),
188
+ props.sidebarCollapsible ? /* @__PURE__ */ jsx(SidebarCollapseTrigger, { className: "max-md:hidden" }) : null
189
+ ] });
190
+ }
191
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
192
+ iconItems.length > 0 ? /* @__PURE__ */ jsx("div", { className: "flex flex-row items-center md:hidden", children: iconItems.map((item, i) => /* @__PURE__ */ jsx(
193
+ IconItem,
194
+ {
195
+ item,
196
+ className: "text-fd-muted-foreground"
197
+ },
198
+ i
199
+ )) }) : null,
200
+ !props.disableThemeSwitch ? /* @__PURE__ */ jsx(ThemeToggle, { className: "max-md:ms-auto" }) : null,
201
+ props.sidebarCollapsible ? /* @__PURE__ */ jsx(SidebarCollapseTrigger, { className: "ms-auto max-md:hidden" }) : null
202
+ ] });
203
+ }
204
+ export {
205
+ DocsLayout,
206
+ getSidebarTabs
207
+ };
@@ -0,0 +1,11 @@
1
+ import { ReactNode } from 'react';
2
+ import { S as SharedNavProps, L as LinkItemType } from '../shared-SScCiV7b.js';
3
+ export { N as NavProvider } from '../shared-SScCiV7b.js';
4
+
5
+ declare function Nav({ items, enableSearch, ...props }: Omit<SharedNavProps, 'transparentMode'> & {
6
+ disableThemeSwitch?: boolean;
7
+ i18n?: boolean;
8
+ items: LinkItemType[];
9
+ }): ReactNode;
10
+
11
+ export { Nav };