fumadocs-ui 12.1.2 → 12.2.0
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/dist/{chunk-MXPAPA74.js → chunk-3WVIP3N5.js} +1 -1
- package/dist/{chunk-H5USAX5W.js → chunk-CPOVVDVF.js} +0 -1
- package/dist/{chunk-45QF3XKA.js → chunk-G7WCPUM7.js} +2 -2
- package/dist/{chunk-U4G4ZLRB.js → chunk-Q3FSJZ3E.js} +1 -1
- package/dist/{chunk-YJDZJ4BG.js → chunk-XVCWFZ3A.js} +69 -23
- package/dist/components/accordion.js +2 -2
- package/dist/components/api.d.ts +3 -1
- package/dist/components/api.js +27 -39
- package/dist/components/callout.d.ts +1 -1
- package/dist/components/codeblock.js +2 -2
- package/dist/components/dialog/search-algolia.js +3 -3
- package/dist/components/dialog/search-default.js +3 -3
- package/dist/components/dialog/search.js +3 -3
- package/dist/components/layout/language-toggle.js +1 -1
- package/dist/components/layout/root-toggle.js +1 -1
- package/dist/components/roll-button.js +2 -2
- package/dist/docs.client.d.ts +3 -3
- package/dist/docs.client.js +38 -26
- package/dist/{layout.client-BzAmSQXB.d.ts → layout-C2Cxe6NB.d.ts} +24 -19
- package/dist/layout.client.d.ts +8 -2
- package/dist/layout.client.js +43 -74
- package/dist/layout.d.ts +1 -1
- package/dist/layout.js +5 -4
- package/dist/mdx.client.js +2 -2
- package/dist/page.client.d.ts +3 -3
- package/dist/page.client.js +63 -50
- package/dist/page.d.ts +7 -1
- package/dist/page.js +42 -22
- package/dist/provider.d.ts +1 -1
- package/dist/provider.js +1 -1
- package/dist/style.css +1 -1
- package/dist/tailwind-plugin.cjs +10 -12
- package/dist/tailwind-plugin.js +10 -12
- package/dist/twoslash.css +1 -1
- package/package.json +2 -2
- package/dist/{chunk-FSPYEOFC.js → chunk-ET4TW6M5.js} +4 -4
package/dist/docs.client.js
CHANGED
|
@@ -3,9 +3,11 @@ import {
|
|
|
3
3
|
LargeSearchToggle,
|
|
4
4
|
LinkItem,
|
|
5
5
|
LinksMenu,
|
|
6
|
+
NavBox,
|
|
6
7
|
SearchToggle,
|
|
7
|
-
ThemeToggle
|
|
8
|
-
|
|
8
|
+
ThemeToggle,
|
|
9
|
+
Title
|
|
10
|
+
} from "./chunk-XVCWFZ3A.js";
|
|
9
11
|
import {
|
|
10
12
|
ScrollArea,
|
|
11
13
|
ScrollViewport
|
|
@@ -24,7 +26,7 @@ import {
|
|
|
24
26
|
} from "./chunk-3F57TIUQ.js";
|
|
25
27
|
import {
|
|
26
28
|
useSearchContext
|
|
27
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-ET4TW6M5.js";
|
|
28
30
|
import "./chunk-HLGNIWUN.js";
|
|
29
31
|
import {
|
|
30
32
|
Collapsible,
|
|
@@ -33,14 +35,13 @@ import {
|
|
|
33
35
|
} from "./chunk-7XPZOMJ2.js";
|
|
34
36
|
import {
|
|
35
37
|
buttonVariants
|
|
36
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-CPOVVDVF.js";
|
|
37
39
|
import {
|
|
38
40
|
twMerge
|
|
39
41
|
} from "./chunk-TK3TM3MR.js";
|
|
40
42
|
import "./chunk-MLKGABMK.js";
|
|
41
43
|
|
|
42
44
|
// src/docs.client.tsx
|
|
43
|
-
import Link2 from "next/link";
|
|
44
45
|
import { SidebarTrigger } from "fumadocs-core/sidebar";
|
|
45
46
|
import { Menu, X } from "lucide-react";
|
|
46
47
|
|
|
@@ -104,8 +105,8 @@ function Sidebar({
|
|
|
104
105
|
blockScrollingWidth: 768,
|
|
105
106
|
...aside,
|
|
106
107
|
className: twMerge(
|
|
107
|
-
"z-30 flex
|
|
108
|
-
"max-md:
|
|
108
|
+
"fixed z-30 flex shrink-0 flex-col bg-card text-sm md:sticky md:top-0 md:h-dvh md:w-[240px] md:border-e xl:w-[260px]",
|
|
109
|
+
"max-md:inset-0 max-md:bg-background/80 max-md:pt-12 max-md:text-[15px] max-md:backdrop-blur-md max-md:data-[open=false]:hidden",
|
|
109
110
|
aside?.className
|
|
110
111
|
),
|
|
111
112
|
children: [
|
|
@@ -129,7 +130,7 @@ function Sidebar({
|
|
|
129
130
|
{
|
|
130
131
|
...footerProps,
|
|
131
132
|
className: twMerge(
|
|
132
|
-
"flex flex-row items-center border-t px-4
|
|
133
|
+
"flex flex-row items-center border-t px-4 pb-2 pt-1 md:px-3",
|
|
133
134
|
footerProps?.className
|
|
134
135
|
),
|
|
135
136
|
children: footer
|
|
@@ -268,28 +269,34 @@ function DynamicSidebar(props) {
|
|
|
268
269
|
const { collapsed, setCollapsed } = useSidebar();
|
|
269
270
|
const [hover, setHover] = useState2(false);
|
|
270
271
|
const timerRef = useRef(0);
|
|
272
|
+
const closeTimeRef = useRef(0);
|
|
271
273
|
const onCollapse = useCallback2(() => {
|
|
272
274
|
setCollapsed((v) => !v);
|
|
273
275
|
setHover(false);
|
|
276
|
+
closeTimeRef.current = Date.now() + 150;
|
|
274
277
|
}, [setCollapsed]);
|
|
275
|
-
const
|
|
276
|
-
if (e.pointerType === "touch") return;
|
|
278
|
+
const onEnter = useCallback2((e) => {
|
|
279
|
+
if (e.pointerType === "touch" || closeTimeRef.current > Date.now()) return;
|
|
277
280
|
window.clearTimeout(timerRef.current);
|
|
278
281
|
setHover(true);
|
|
279
282
|
}, []);
|
|
280
283
|
const onLeave = useCallback2((e) => {
|
|
281
284
|
if (e.pointerType === "touch") return;
|
|
282
285
|
window.clearTimeout(timerRef.current);
|
|
283
|
-
timerRef.current = window.setTimeout(
|
|
284
|
-
|
|
285
|
-
|
|
286
|
+
timerRef.current = window.setTimeout(
|
|
287
|
+
() => {
|
|
288
|
+
setHover(false);
|
|
289
|
+
closeTimeRef.current = Date.now() + 150;
|
|
290
|
+
},
|
|
291
|
+
Math.min(e.clientX, document.body.clientWidth - e.clientX) > 100 ? 0 : 500
|
|
292
|
+
);
|
|
286
293
|
}, []);
|
|
287
294
|
return /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
288
295
|
collapsed ? /* @__PURE__ */ jsx2(
|
|
289
296
|
"div",
|
|
290
297
|
{
|
|
291
|
-
className: "fixed inset-y-0 start-0 w-
|
|
292
|
-
onPointerEnter:
|
|
298
|
+
className: "fixed inset-y-0 start-0 w-6 max-md:hidden xl:w-[50px]",
|
|
299
|
+
onPointerEnter: onEnter,
|
|
293
300
|
onPointerLeave: onLeave
|
|
294
301
|
}
|
|
295
302
|
) : null,
|
|
@@ -302,7 +309,7 @@ function DynamicSidebar(props) {
|
|
|
302
309
|
buttonVariants({
|
|
303
310
|
color: "secondary",
|
|
304
311
|
size: "icon",
|
|
305
|
-
className: "fixed start-4 bottom-
|
|
312
|
+
className: "fixed start-4 bottom-2 z-10 max-md:hidden"
|
|
306
313
|
})
|
|
307
314
|
),
|
|
308
315
|
onClick: onCollapse,
|
|
@@ -316,12 +323,15 @@ function DynamicSidebar(props) {
|
|
|
316
323
|
aside: {
|
|
317
324
|
"data-collapse": collapsed,
|
|
318
325
|
"data-hover": hover,
|
|
319
|
-
onPointerEnter:
|
|
326
|
+
onPointerEnter: onEnter,
|
|
320
327
|
onPointerLeave: onLeave,
|
|
321
328
|
"aria-hidden": Boolean(collapsed && !hover),
|
|
322
329
|
className: twMerge(
|
|
323
|
-
"
|
|
324
|
-
collapsed &&
|
|
330
|
+
"md:transition-[transform,margin]",
|
|
331
|
+
collapsed && [
|
|
332
|
+
"md:top-1 md:mr-[-240px] md:h-[calc(100dvh-4px)] md:animate-sidebar-collapse md:rounded-xl md:border md:shadow-md xl:mr-[-260px]",
|
|
333
|
+
hover ? "md:translate-x-1 rtl:md:-translate-x-1" : "md:-translate-x-full rtl:md:translate-x-full"
|
|
334
|
+
]
|
|
325
335
|
)
|
|
326
336
|
},
|
|
327
337
|
footer: /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
@@ -352,21 +362,23 @@ function DynamicSidebar(props) {
|
|
|
352
362
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
353
363
|
function SubNav({
|
|
354
364
|
title,
|
|
355
|
-
url
|
|
365
|
+
url,
|
|
366
|
+
transparentMode,
|
|
356
367
|
children,
|
|
357
368
|
enableSearch = true
|
|
358
369
|
}) {
|
|
359
370
|
const { open } = useSidebar();
|
|
360
371
|
const { enabled } = useSearchContext();
|
|
361
372
|
return /* @__PURE__ */ jsxs3(
|
|
362
|
-
|
|
373
|
+
NavBox,
|
|
363
374
|
{
|
|
364
375
|
id: "nd-subnav",
|
|
365
|
-
className: "
|
|
376
|
+
className: "flex h-12 flex-row items-center px-4 md:hidden",
|
|
377
|
+
transparentMode,
|
|
366
378
|
children: [
|
|
367
|
-
/* @__PURE__ */ jsx3(
|
|
368
|
-
children,
|
|
369
|
-
enabled && enableSearch ? /* @__PURE__ */ jsx3(SearchToggle, {
|
|
379
|
+
/* @__PURE__ */ jsx3(Title, { url, title }),
|
|
380
|
+
/* @__PURE__ */ jsx3("div", { className: "flex flex-1 flex-row items-center", children }),
|
|
381
|
+
enabled && enableSearch ? /* @__PURE__ */ jsx3(SearchToggle, {}) : null,
|
|
370
382
|
/* @__PURE__ */ jsx3(
|
|
371
383
|
SidebarTrigger,
|
|
372
384
|
{
|
|
@@ -374,7 +386,7 @@ function SubNav({
|
|
|
374
386
|
buttonVariants({
|
|
375
387
|
color: "ghost",
|
|
376
388
|
size: "icon",
|
|
377
|
-
className:
|
|
389
|
+
className: "-me-2"
|
|
378
390
|
})
|
|
379
391
|
),
|
|
380
392
|
children: open ? /* @__PURE__ */ jsx3(X, {}) : /* @__PURE__ */ jsx3(Menu, {})
|
|
@@ -1,29 +1,22 @@
|
|
|
1
|
-
import { ReactNode, HTMLAttributes } from 'react';
|
|
2
1
|
import { PageTree } from 'fumadocs-core/server';
|
|
2
|
+
import { ReactNode, HTMLAttributes } from 'react';
|
|
3
3
|
|
|
4
|
-
interface
|
|
4
|
+
interface NavBoxProps {
|
|
5
|
+
/**
|
|
6
|
+
* Use transparent background
|
|
7
|
+
*
|
|
8
|
+
* @defaultValue none
|
|
9
|
+
*/
|
|
10
|
+
transparentMode?: 'always' | 'top' | 'none';
|
|
11
|
+
}
|
|
12
|
+
interface TitleProps {
|
|
5
13
|
title?: ReactNode;
|
|
6
14
|
/**
|
|
7
15
|
* Redirect url of title
|
|
8
16
|
* @defaultValue '/'
|
|
9
17
|
*/
|
|
10
18
|
url?: string;
|
|
11
|
-
/**
|
|
12
|
-
* Show/hide search toggle
|
|
13
|
-
*
|
|
14
|
-
* Note: Enable/disable search from root provider instead
|
|
15
|
-
*/
|
|
16
|
-
enableSearch?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* When to use transparent navbar
|
|
19
|
-
* @defaultValue none
|
|
20
|
-
*/
|
|
21
|
-
transparentMode?: 'always' | 'top' | 'none';
|
|
22
|
-
children?: ReactNode;
|
|
23
19
|
}
|
|
24
|
-
declare function Nav({ title, url, items, transparentMode, enableSearch, children, }: NavProps & {
|
|
25
|
-
items: LinkItemType[];
|
|
26
|
-
}): React.ReactElement;
|
|
27
20
|
|
|
28
21
|
interface SidebarProps {
|
|
29
22
|
items: LinkItemType[];
|
|
@@ -34,6 +27,9 @@ interface SidebarProps {
|
|
|
34
27
|
* @defaultValue 1
|
|
35
28
|
*/
|
|
36
29
|
defaultOpenLevel?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Customise each of the component
|
|
32
|
+
*/
|
|
37
33
|
components?: Partial<Components>;
|
|
38
34
|
banner?: React.ReactNode;
|
|
39
35
|
bannerProps?: HTMLAttributes<HTMLDivElement>;
|
|
@@ -87,10 +83,19 @@ type LinkItemType = {
|
|
|
87
83
|
text: string;
|
|
88
84
|
external?: boolean;
|
|
89
85
|
};
|
|
90
|
-
interface NavOptions extends
|
|
86
|
+
interface NavOptions extends SharedNavProps {
|
|
91
87
|
enabled: boolean;
|
|
92
88
|
component: ReactNode;
|
|
93
89
|
}
|
|
90
|
+
interface SharedNavProps extends TitleProps, NavBoxProps {
|
|
91
|
+
/**
|
|
92
|
+
* Show/hide search toggle
|
|
93
|
+
*
|
|
94
|
+
* Note: Enable/disable search from root provider instead
|
|
95
|
+
*/
|
|
96
|
+
enableSearch?: boolean;
|
|
97
|
+
children?: ReactNode;
|
|
98
|
+
}
|
|
94
99
|
interface SidebarOptions extends Omit<SidebarProps, 'items'> {
|
|
95
100
|
enabled: boolean;
|
|
96
101
|
component: ReactNode;
|
|
@@ -122,4 +127,4 @@ interface DocsLayoutProps extends BaseLayoutProps {
|
|
|
122
127
|
declare function Layout({ nav, links, githubUrl, children, }: BaseLayoutProps): React.ReactElement;
|
|
123
128
|
declare function DocsLayout({ nav, githubUrl, sidebar: { enabled: sidebarEnabled, collapsible, component: sidebarReplace, ...sidebar }, links, containerProps, tree, i18n, children, }: DocsLayoutProps): React.ReactElement;
|
|
124
129
|
|
|
125
|
-
export { type BaseLayoutProps as B, type DocsLayoutProps as D, type LinkItemType as L, type
|
|
130
|
+
export { type BaseLayoutProps as B, type DocsLayoutProps as D, type LinkItemType as L, type SidebarProps as S, type SharedNavProps as a, Sidebar as b, Layout as c, DocsLayout as d };
|
package/dist/layout.client.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import 'react';
|
|
1
|
+
import { a as SharedNavProps, L as LinkItemType } from './layout-C2Cxe6NB.js';
|
|
3
2
|
import 'fumadocs-core/server';
|
|
3
|
+
import 'react';
|
|
4
|
+
|
|
5
|
+
declare function Nav({ title, url, items, transparentMode, enableSearch, children, }: SharedNavProps & {
|
|
6
|
+
items: LinkItemType[];
|
|
7
|
+
}): React.ReactElement;
|
|
8
|
+
|
|
9
|
+
export { Nav };
|
package/dist/layout.client.js
CHANGED
|
@@ -3,100 +3,69 @@ import {
|
|
|
3
3
|
LargeSearchToggle,
|
|
4
4
|
LinkItem,
|
|
5
5
|
LinksMenu,
|
|
6
|
+
NavBox,
|
|
6
7
|
SearchToggle,
|
|
7
|
-
ThemeToggle
|
|
8
|
-
|
|
8
|
+
ThemeToggle,
|
|
9
|
+
Title
|
|
10
|
+
} from "./chunk-XVCWFZ3A.js";
|
|
9
11
|
import "./chunk-GHKJ6EFT.js";
|
|
10
12
|
import "./chunk-AN2Y6MA2.js";
|
|
11
13
|
import {
|
|
12
14
|
useSearchContext
|
|
13
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ET4TW6M5.js";
|
|
14
16
|
import {
|
|
15
17
|
useI18n
|
|
16
18
|
} from "./chunk-HLGNIWUN.js";
|
|
17
19
|
import "./chunk-7XPZOMJ2.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import
|
|
20
|
-
twMerge
|
|
21
|
-
} from "./chunk-TK3TM3MR.js";
|
|
20
|
+
import "./chunk-CPOVVDVF.js";
|
|
21
|
+
import "./chunk-TK3TM3MR.js";
|
|
22
22
|
import "./chunk-MLKGABMK.js";
|
|
23
23
|
|
|
24
|
-
// src/
|
|
25
|
-
import Link from "fumadocs-core/link";
|
|
26
|
-
import { useEffect, useState } from "react";
|
|
24
|
+
// src/layout.client.tsx
|
|
27
25
|
import { MoreVertical } from "lucide-react";
|
|
28
26
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
29
27
|
function Nav({
|
|
30
|
-
title
|
|
31
|
-
url
|
|
28
|
+
title,
|
|
29
|
+
url,
|
|
32
30
|
items,
|
|
33
|
-
transparentMode
|
|
31
|
+
transparentMode,
|
|
34
32
|
enableSearch = true,
|
|
35
33
|
children
|
|
36
34
|
}) {
|
|
37
35
|
const search = useSearchContext();
|
|
38
|
-
const [transparent, setTransparent] = useState(transparentMode !== "none");
|
|
39
36
|
const { text } = useI18n();
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
className: "
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
item,
|
|
73
|
-
className: "-mx-2 text-sm max-lg:hidden"
|
|
74
|
-
},
|
|
75
|
-
i
|
|
76
|
-
)),
|
|
77
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-row items-center justify-end md:gap-2", children: [
|
|
78
|
-
enableSearch && search.enabled ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
79
|
-
/* @__PURE__ */ jsx(SearchToggle, { className: "md:hidden" }),
|
|
80
|
-
/* @__PURE__ */ jsx(LargeSearchToggle, { className: "w-full max-w-[240px] max-md:hidden" })
|
|
81
|
-
] }) : null,
|
|
82
|
-
/* @__PURE__ */ jsx(ThemeToggle, { className: "max-lg:hidden" }),
|
|
83
|
-
/* @__PURE__ */ jsx(
|
|
84
|
-
LinksMenu,
|
|
85
|
-
{
|
|
86
|
-
items,
|
|
87
|
-
className: "lg:hidden",
|
|
88
|
-
footer: /* @__PURE__ */ jsxs("div", { className: "flex flex-row items-center justify-between px-2 py-1", children: [
|
|
89
|
-
/* @__PURE__ */ jsx("p", { className: "font-medium text-muted-foreground", children: text.chooseTheme }),
|
|
90
|
-
/* @__PURE__ */ jsx(ThemeToggle, {})
|
|
91
|
-
] }),
|
|
92
|
-
children: /* @__PURE__ */ jsx(MoreVertical, {})
|
|
93
|
-
}
|
|
94
|
-
),
|
|
95
|
-
items.filter((item) => item.type === "secondary").map((item, i) => /* @__PURE__ */ jsx(LinkItem, { item, className: "max-lg:hidden" }, i))
|
|
96
|
-
] })
|
|
97
|
-
] })
|
|
98
|
-
}
|
|
99
|
-
);
|
|
37
|
+
return /* @__PURE__ */ jsx(NavBox, { id: "nd-nav", className: "h-16", transparentMode, children: /* @__PURE__ */ jsxs("nav", { className: "mx-auto flex size-full max-w-container flex-row items-center gap-6 px-4", children: [
|
|
38
|
+
/* @__PURE__ */ jsx(Title, { title, url }),
|
|
39
|
+
children,
|
|
40
|
+
items.filter((item) => item.type !== "secondary").map((item, i) => /* @__PURE__ */ jsx(
|
|
41
|
+
LinkItem,
|
|
42
|
+
{
|
|
43
|
+
item,
|
|
44
|
+
className: "-mx-2 text-sm max-lg:hidden"
|
|
45
|
+
},
|
|
46
|
+
i
|
|
47
|
+
)),
|
|
48
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-row items-center justify-end md:gap-2", children: [
|
|
49
|
+
enableSearch && search.enabled ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
50
|
+
/* @__PURE__ */ jsx(SearchToggle, { className: "md:hidden" }),
|
|
51
|
+
/* @__PURE__ */ jsx(LargeSearchToggle, { className: "w-full max-w-[240px] max-md:hidden" })
|
|
52
|
+
] }) : null,
|
|
53
|
+
/* @__PURE__ */ jsx(ThemeToggle, { className: "max-lg:hidden" }),
|
|
54
|
+
items.filter((item) => item.type === "secondary").map((item, i) => /* @__PURE__ */ jsx(LinkItem, { item, className: "max-lg:hidden" }, i)),
|
|
55
|
+
/* @__PURE__ */ jsx(
|
|
56
|
+
LinksMenu,
|
|
57
|
+
{
|
|
58
|
+
items,
|
|
59
|
+
className: "-me-2 lg:hidden",
|
|
60
|
+
footer: /* @__PURE__ */ jsxs("div", { className: "flex flex-row items-center justify-between px-2 pt-2", children: [
|
|
61
|
+
/* @__PURE__ */ jsx("p", { className: "font-medium text-muted-foreground", children: text.chooseTheme }),
|
|
62
|
+
/* @__PURE__ */ jsx(ThemeToggle, {})
|
|
63
|
+
] }),
|
|
64
|
+
children: /* @__PURE__ */ jsx(MoreVertical, {})
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
] })
|
|
68
|
+
] }) });
|
|
100
69
|
}
|
|
101
70
|
export {
|
|
102
71
|
Nav
|
package/dist/layout.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'fumadocs-core/server';
|
|
2
2
|
import 'react';
|
|
3
|
-
export { B as BaseLayoutProps,
|
|
3
|
+
export { B as BaseLayoutProps, d as DocsLayout, D as DocsLayoutProps, c as Layout, L as LinkItemType, a as SharedNavProps } from './layout-C2Cxe6NB.js';
|
package/dist/layout.js
CHANGED
|
@@ -47,20 +47,21 @@ function DocsLayout({
|
|
|
47
47
|
...sidebar
|
|
48
48
|
} = {},
|
|
49
49
|
links = [],
|
|
50
|
-
containerProps,
|
|
50
|
+
containerProps = {},
|
|
51
51
|
tree,
|
|
52
52
|
i18n = false,
|
|
53
53
|
children
|
|
54
54
|
}) {
|
|
55
55
|
const finalLinks = getLinks(links, githubUrl);
|
|
56
|
-
const Aside =
|
|
56
|
+
const Aside = collapsible ? DynamicSidebar : Sidebar;
|
|
57
57
|
return /* @__PURE__ */ jsxs(TreeContextProvider, { tree, children: [
|
|
58
58
|
replaceOrDefault(nav, /* @__PURE__ */ jsx(SubNav, { ...nav })),
|
|
59
59
|
/* @__PURE__ */ jsxs(
|
|
60
|
-
"
|
|
60
|
+
"main",
|
|
61
61
|
{
|
|
62
|
+
id: "nd-docs-layout",
|
|
62
63
|
...containerProps,
|
|
63
|
-
className: twMerge("flex flex-1 flex-row", containerProps
|
|
64
|
+
className: twMerge("flex flex-1 flex-row", containerProps.className),
|
|
64
65
|
children: [
|
|
65
66
|
replaceOrDefault(
|
|
66
67
|
{ enabled: sidebarEnabled, component: sidebarReplace },
|
package/dist/mdx.client.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
CodeBlock,
|
|
4
4
|
Pre
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-Q3FSJZ3E.js";
|
|
6
6
|
import "./chunk-VYTHQTZE.js";
|
|
7
7
|
import "./chunk-2KMKNVSN.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-CPOVVDVF.js";
|
|
9
9
|
import "./chunk-TK3TM3MR.js";
|
|
10
10
|
import "./chunk-MLKGABMK.js";
|
|
11
11
|
|
package/dist/page.client.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TOCItemType } from 'fumadocs-core/server';
|
|
2
2
|
import * as Primitive from 'fumadocs-core/toc-internal';
|
|
3
|
-
import { ReactNode, ReactElement } from 'react';
|
|
3
|
+
import { ReactNode, ReactElement, ButtonHTMLAttributes } from 'react';
|
|
4
4
|
import { BreadcrumbOptions } from 'fumadocs-core/breadcrumb';
|
|
5
5
|
|
|
6
6
|
interface TOCProps {
|
|
@@ -16,7 +16,7 @@ interface TOCProps {
|
|
|
16
16
|
}
|
|
17
17
|
declare const TocProvider: typeof Primitive.AnchorProvider;
|
|
18
18
|
declare function Toc({ items, header, footer }: TOCProps): ReactElement;
|
|
19
|
-
declare function
|
|
19
|
+
declare function TocPopover({ items, header, footer, ...props }: TOCProps & ButtonHTMLAttributes<HTMLButtonElement>): ReactElement;
|
|
20
20
|
|
|
21
21
|
interface BreadcrumbProps extends Omit<BreadcrumbOptions, 'includePage'> {
|
|
22
22
|
/**
|
|
@@ -48,4 +48,4 @@ interface FooterProps {
|
|
|
48
48
|
}
|
|
49
49
|
declare function Footer({ items }: FooterProps): React.ReactElement;
|
|
50
50
|
|
|
51
|
-
export { Breadcrumb, type BreadcrumbProps, Footer, type FooterProps, LastUpdate,
|
|
51
|
+
export { Breadcrumb, type BreadcrumbProps, Footer, type FooterProps, LastUpdate, type TOCProps, Toc, TocPopover, TocProvider };
|