@fumadocs/base-ui 16.4.2 → 16.4.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/dist/components/accordion.d.ts +3 -3
- package/dist/components/banner.d.ts +2 -2
- package/dist/components/callout.d.ts +5 -5
- package/dist/components/card.d.ts +3 -3
- package/dist/components/codeblock.d.ts +7 -7
- package/dist/components/dialog/search-algolia.d.ts +2 -2
- package/dist/components/dialog/search-default.d.ts +2 -2
- package/dist/components/dialog/search-orama.d.ts +2 -2
- package/dist/components/dialog/search.d.ts +13 -13
- package/dist/components/dynamic-codeblock.d.ts +2 -2
- package/dist/components/github-info.d.ts +2 -2
- package/dist/components/image-zoom.d.ts +2 -2
- package/dist/components/inline-toc.d.ts +2 -2
- package/dist/components/sidebar/base.d.ts +17 -19
- package/dist/components/sidebar/base.d.ts.map +1 -1
- package/dist/components/sidebar/base.js +1 -1
- package/dist/components/sidebar/base.js.map +1 -1
- package/dist/components/sidebar/link-item.d.ts +2 -2
- package/dist/components/sidebar/page-tree.d.ts +2 -2
- package/dist/components/sidebar/page-tree.d.ts.map +1 -1
- package/dist/components/sidebar/tabs/dropdown.d.ts +2 -2
- package/dist/components/sidebar/tabs/dropdown.d.ts.map +1 -1
- package/dist/components/steps.d.ts +3 -3
- package/dist/components/tabs.d.ts +4 -4
- package/dist/components/type-table.d.ts +2 -2
- package/dist/components/ui/accordion.d.ts +6 -6
- package/dist/components/ui/accordion.d.ts.map +1 -1
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/collapsible.d.ts +6 -6
- package/dist/components/ui/collapsible.d.ts.map +1 -1
- package/dist/components/ui/navigation-menu.d.ts +7 -7
- package/dist/components/ui/popover.d.ts +3 -3
- package/dist/components/ui/popover.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.d.ts +4 -4
- package/dist/components/ui/tabs.d.ts +7 -7
- package/dist/components/ui/tabs.d.ts.map +1 -1
- package/dist/layouts/docs/client.d.ts +7 -7
- package/dist/layouts/docs/index.d.ts +2 -2
- package/dist/layouts/docs/index.js +3 -3
- package/dist/layouts/docs/page/client.d.ts +7 -7
- package/dist/layouts/docs/page/client.d.ts.map +1 -1
- package/dist/layouts/docs/page/index.d.ts +5 -5
- package/dist/layouts/docs/sidebar.d.ts +17 -17
- package/dist/layouts/docs/sidebar.d.ts.map +1 -1
- package/dist/layouts/home/client.d.ts +3 -3
- package/dist/layouts/home/client.js +2 -2
- package/dist/layouts/home/index.d.ts +2 -2
- package/dist/layouts/home/navbar.d.ts +7 -7
- package/dist/layouts/home/navbar.d.ts.map +1 -1
- package/dist/layouts/notebook/client.d.ts +8 -8
- package/dist/layouts/notebook/index.d.ts +2 -2
- package/dist/layouts/notebook/index.d.ts.map +1 -1
- package/dist/layouts/notebook/index.js +3 -3
- package/dist/layouts/notebook/page/client.d.ts +7 -7
- package/dist/layouts/notebook/page/index.d.ts +5 -5
- package/dist/layouts/notebook/page/index.d.ts.map +1 -1
- package/dist/layouts/notebook/sidebar.d.ts +12 -12
- package/dist/layouts/shared/index.d.ts +3 -3
- package/dist/layouts/shared/index.d.ts.map +1 -1
- package/dist/layouts/shared/language-toggle.d.ts +2 -2
- package/dist/layouts/shared/language-toggle.d.ts.map +1 -1
- package/dist/layouts/shared/search-toggle.d.ts +3 -3
- package/dist/layouts/shared/search-toggle.d.ts.map +1 -1
- package/dist/layouts/shared/theme-toggle.d.ts +2 -2
- package/dist/layouts/shared/theme-toggle.d.ts.map +1 -1
- package/dist/page.d.ts +3 -3
- package/dist/page.d.ts.map +1 -1
- package/dist/provider/base.d.ts +2 -2
- package/dist/provider/next.d.ts +2 -2
- package/dist/provider/react-router.d.ts +2 -2
- package/dist/provider/react-router.d.ts.map +1 -1
- package/dist/provider/tanstack.d.ts +2 -2
- package/dist/provider/waku.d.ts +2 -2
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Accordion as Accordion$1, AccordionItem } from "./ui/accordion.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime10 from "react/jsx-runtime";
|
|
3
3
|
import { ComponentProps, ReactNode } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/accordion.d.ts
|
|
@@ -8,7 +8,7 @@ declare function Accordions({
|
|
|
8
8
|
className,
|
|
9
9
|
defaultValue,
|
|
10
10
|
...props
|
|
11
|
-
}: ComponentProps<typeof Accordion$1>):
|
|
11
|
+
}: ComponentProps<typeof Accordion$1>): react_jsx_runtime10.JSX.Element;
|
|
12
12
|
declare function Accordion({
|
|
13
13
|
title,
|
|
14
14
|
id,
|
|
@@ -18,7 +18,7 @@ declare function Accordion({
|
|
|
18
18
|
}: Omit<ComponentProps<typeof AccordionItem>, 'value' | 'title'> & {
|
|
19
19
|
title: string | ReactNode;
|
|
20
20
|
value?: string;
|
|
21
|
-
}):
|
|
21
|
+
}): react_jsx_runtime10.JSX.Element;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { Accordion, Accordions };
|
|
24
24
|
//# sourceMappingURL=accordion.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime12 from "react/jsx-runtime";
|
|
2
2
|
import { HTMLAttributes } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/banner.d.ts
|
|
@@ -29,7 +29,7 @@ declare function Banner({
|
|
|
29
29
|
* @defaultValue true
|
|
30
30
|
*/
|
|
31
31
|
changeLayout?: boolean;
|
|
32
|
-
}):
|
|
32
|
+
}): react_jsx_runtime12.JSX.Element | null;
|
|
33
33
|
//#endregion
|
|
34
34
|
export { Banner };
|
|
35
35
|
//# sourceMappingURL=banner.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime13 from "react/jsx-runtime";
|
|
2
2
|
import { ComponentProps, ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/callout.d.ts
|
|
@@ -9,7 +9,7 @@ declare function Callout({
|
|
|
9
9
|
...props
|
|
10
10
|
}: {
|
|
11
11
|
title?: ReactNode;
|
|
12
|
-
} & Omit<CalloutContainerProps, 'title'>):
|
|
12
|
+
} & Omit<CalloutContainerProps, 'title'>): react_jsx_runtime13.JSX.Element;
|
|
13
13
|
interface CalloutContainerProps extends ComponentProps<'div'> {
|
|
14
14
|
/**
|
|
15
15
|
* @defaultValue info
|
|
@@ -27,17 +27,17 @@ declare function CalloutContainer({
|
|
|
27
27
|
className,
|
|
28
28
|
style,
|
|
29
29
|
...props
|
|
30
|
-
}: CalloutContainerProps):
|
|
30
|
+
}: CalloutContainerProps): react_jsx_runtime13.JSX.Element;
|
|
31
31
|
declare function CalloutTitle({
|
|
32
32
|
children,
|
|
33
33
|
className,
|
|
34
34
|
...props
|
|
35
|
-
}: ComponentProps<'p'>):
|
|
35
|
+
}: ComponentProps<'p'>): react_jsx_runtime13.JSX.Element;
|
|
36
36
|
declare function CalloutDescription({
|
|
37
37
|
children,
|
|
38
38
|
className,
|
|
39
39
|
...props
|
|
40
|
-
}: ComponentProps<'p'>):
|
|
40
|
+
}: ComponentProps<'p'>): react_jsx_runtime13.JSX.Element;
|
|
41
41
|
//#endregion
|
|
42
42
|
export { Callout, CalloutContainer, CalloutContainerProps, CalloutDescription, CalloutTitle, CalloutType };
|
|
43
43
|
//# sourceMappingURL=callout.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime17 from "react/jsx-runtime";
|
|
2
2
|
import { HTMLAttributes, ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/card.d.ts
|
|
5
|
-
declare function Cards(props: HTMLAttributes<HTMLDivElement>):
|
|
5
|
+
declare function Cards(props: HTMLAttributes<HTMLDivElement>): react_jsx_runtime17.JSX.Element;
|
|
6
6
|
type CardProps = Omit<HTMLAttributes<HTMLElement>, 'title'> & {
|
|
7
7
|
icon?: ReactNode;
|
|
8
8
|
title: ReactNode;
|
|
@@ -15,7 +15,7 @@ declare function Card({
|
|
|
15
15
|
title,
|
|
16
16
|
description,
|
|
17
17
|
...props
|
|
18
|
-
}: CardProps):
|
|
18
|
+
}: CardProps): react_jsx_runtime17.JSX.Element;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { Card, CardProps, Cards };
|
|
21
21
|
//# sourceMappingURL=card.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from "./ui/tabs.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime20 from "react/jsx-runtime";
|
|
3
3
|
import { ComponentProps, HTMLAttributes, ReactNode } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/codeblock.d.ts
|
|
@@ -36,7 +36,7 @@ interface CodeBlockProps extends ComponentProps<'figure'> {
|
|
|
36
36
|
children?: ReactNode;
|
|
37
37
|
}) => ReactNode;
|
|
38
38
|
}
|
|
39
|
-
declare function Pre(props: ComponentProps<'pre'>):
|
|
39
|
+
declare function Pre(props: ComponentProps<'pre'>): react_jsx_runtime20.JSX.Element;
|
|
40
40
|
declare function CodeBlock({
|
|
41
41
|
ref,
|
|
42
42
|
title,
|
|
@@ -47,22 +47,22 @@ declare function CodeBlock({
|
|
|
47
47
|
children,
|
|
48
48
|
Actions,
|
|
49
49
|
...props
|
|
50
|
-
}: CodeBlockProps):
|
|
50
|
+
}: CodeBlockProps): react_jsx_runtime20.JSX.Element;
|
|
51
51
|
declare function CodeBlockTabs({
|
|
52
52
|
ref,
|
|
53
53
|
className,
|
|
54
54
|
...props
|
|
55
|
-
}: ComponentProps<typeof Tabs>):
|
|
55
|
+
}: ComponentProps<typeof Tabs>): react_jsx_runtime20.JSX.Element;
|
|
56
56
|
declare function CodeBlockTabsList({
|
|
57
57
|
className,
|
|
58
58
|
...props
|
|
59
|
-
}: ComponentProps<typeof TabsList>):
|
|
59
|
+
}: ComponentProps<typeof TabsList>): react_jsx_runtime20.JSX.Element;
|
|
60
60
|
declare function CodeBlockTabsTrigger({
|
|
61
61
|
children,
|
|
62
62
|
className,
|
|
63
63
|
...props
|
|
64
|
-
}: ComponentProps<typeof TabsTrigger>):
|
|
65
|
-
declare function CodeBlockTab(props: ComponentProps<typeof TabsContent>):
|
|
64
|
+
}: ComponentProps<typeof TabsTrigger>): react_jsx_runtime20.JSX.Element;
|
|
65
|
+
declare function CodeBlockTab(props: ComponentProps<typeof TabsContent>): react_jsx_runtime20.JSX.Element;
|
|
66
66
|
//#endregion
|
|
67
67
|
export { CodeBlock, CodeBlockProps, CodeBlockTab, CodeBlockTabs, CodeBlockTabsList, CodeBlockTabsTrigger, Pre };
|
|
68
68
|
//# sourceMappingURL=codeblock.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { search_d_exports } from "../../contexts/search.js";
|
|
2
2
|
import "./search.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime43 from "react/jsx-runtime";
|
|
4
4
|
import { ReactNode } from "react";
|
|
5
5
|
import { AlgoliaOptions } from "fumadocs-core/search/client";
|
|
6
6
|
|
|
@@ -33,7 +33,7 @@ declare function AlgoliaSearchDialog({
|
|
|
33
33
|
links,
|
|
34
34
|
footer,
|
|
35
35
|
...props
|
|
36
|
-
}: AlgoliaSearchDialogProps):
|
|
36
|
+
}: AlgoliaSearchDialogProps): react_jsx_runtime43.JSX.Element;
|
|
37
37
|
//#endregion
|
|
38
38
|
export { AlgoliaSearchDialogProps, AlgoliaSearchDialog as default };
|
|
39
39
|
//# sourceMappingURL=search-algolia.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { search_d_exports } from "../../contexts/search.js";
|
|
2
2
|
import "./search.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime45 from "react/jsx-runtime";
|
|
4
4
|
import { ReactNode } from "react";
|
|
5
5
|
|
|
6
6
|
//#region src/components/dialog/search-default.d.ts
|
|
@@ -38,7 +38,7 @@ declare function DefaultSearchDialog({
|
|
|
38
38
|
links,
|
|
39
39
|
footer,
|
|
40
40
|
...props
|
|
41
|
-
}: DefaultSearchDialogProps):
|
|
41
|
+
}: DefaultSearchDialogProps): react_jsx_runtime45.JSX.Element;
|
|
42
42
|
//#endregion
|
|
43
43
|
export { DefaultSearchDialogProps, DefaultSearchDialog as default };
|
|
44
44
|
//# sourceMappingURL=search-default.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { search_d_exports } from "../../contexts/search.js";
|
|
2
2
|
import "./search.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime49 from "react/jsx-runtime";
|
|
4
4
|
import { ReactNode } from "react";
|
|
5
5
|
import { OramaCloudOptions } from "fumadocs-core/search/client";
|
|
6
6
|
|
|
@@ -40,7 +40,7 @@ declare function OramaSearchDialog({
|
|
|
40
40
|
footer,
|
|
41
41
|
links,
|
|
42
42
|
...props
|
|
43
|
-
}: OramaSearchDialogProps):
|
|
43
|
+
}: OramaSearchDialogProps): react_jsx_runtime49.JSX.Element;
|
|
44
44
|
//#endregion
|
|
45
45
|
export { OramaSearchDialogProps, OramaSearchDialog as default };
|
|
46
46
|
//# sourceMappingURL=search-orama.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { search_d_exports } from "../../contexts/search.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime51 from "react/jsx-runtime";
|
|
3
3
|
import { ComponentProps, ReactNode } from "react";
|
|
4
4
|
import { Dialog } from "@base-ui/react/dialog";
|
|
5
5
|
import { HighlightedText, ReactSortedResult } from "fumadocs-core/search";
|
|
@@ -28,24 +28,24 @@ declare function SearchDialog({
|
|
|
28
28
|
isLoading,
|
|
29
29
|
onSelect: onSelectProp,
|
|
30
30
|
children
|
|
31
|
-
}: SearchDialogProps):
|
|
32
|
-
declare function SearchDialogHeader(props: ComponentProps<'div'>):
|
|
33
|
-
declare function SearchDialogInput(props: ComponentProps<'input'>):
|
|
31
|
+
}: SearchDialogProps): react_jsx_runtime51.JSX.Element;
|
|
32
|
+
declare function SearchDialogHeader(props: ComponentProps<'div'>): react_jsx_runtime51.JSX.Element;
|
|
33
|
+
declare function SearchDialogInput(props: ComponentProps<'input'>): react_jsx_runtime51.JSX.Element;
|
|
34
34
|
declare function SearchDialogClose({
|
|
35
35
|
children,
|
|
36
36
|
className,
|
|
37
37
|
...props
|
|
38
|
-
}: ComponentProps<'button'>):
|
|
39
|
-
declare function SearchDialogFooter(props: ComponentProps<'div'>):
|
|
38
|
+
}: ComponentProps<'button'>): react_jsx_runtime51.JSX.Element;
|
|
39
|
+
declare function SearchDialogFooter(props: ComponentProps<'div'>): react_jsx_runtime51.JSX.Element;
|
|
40
40
|
declare function SearchDialogOverlay({
|
|
41
41
|
className,
|
|
42
42
|
...props
|
|
43
|
-
}: ComponentProps<typeof Dialog.Backdrop>):
|
|
43
|
+
}: ComponentProps<typeof Dialog.Backdrop>): react_jsx_runtime51.JSX.Element;
|
|
44
44
|
declare function SearchDialogContent({
|
|
45
45
|
children,
|
|
46
46
|
className,
|
|
47
47
|
...props
|
|
48
|
-
}: ComponentProps<typeof Dialog.Popup>):
|
|
48
|
+
}: ComponentProps<typeof Dialog.Popup>): react_jsx_runtime51.JSX.Element;
|
|
49
49
|
declare function SearchDialogList({
|
|
50
50
|
items,
|
|
51
51
|
Empty,
|
|
@@ -64,7 +64,7 @@ declare function SearchDialogList({
|
|
|
64
64
|
item: SearchItemType;
|
|
65
65
|
onClick: () => void;
|
|
66
66
|
}) => ReactNode;
|
|
67
|
-
}):
|
|
67
|
+
}): react_jsx_runtime51.JSX.Element;
|
|
68
68
|
declare function SearchDialogListItem({
|
|
69
69
|
item,
|
|
70
70
|
className,
|
|
@@ -74,8 +74,8 @@ declare function SearchDialogListItem({
|
|
|
74
74
|
}: ComponentProps<'button'> & {
|
|
75
75
|
renderHighlights?: typeof renderHighlights;
|
|
76
76
|
item: SearchItemType;
|
|
77
|
-
}):
|
|
78
|
-
declare function SearchDialogIcon(props: ComponentProps<'svg'>):
|
|
77
|
+
}): react_jsx_runtime51.JSX.Element;
|
|
78
|
+
declare function SearchDialogIcon(props: ComponentProps<'svg'>): react_jsx_runtime51.JSX.Element;
|
|
79
79
|
interface TagsListProps extends ComponentProps<'div'> {
|
|
80
80
|
tag?: string;
|
|
81
81
|
onTagChange: (tag: string | undefined) => void;
|
|
@@ -86,14 +86,14 @@ declare function TagsList({
|
|
|
86
86
|
onTagChange,
|
|
87
87
|
allowClear,
|
|
88
88
|
...props
|
|
89
|
-
}: TagsListProps):
|
|
89
|
+
}: TagsListProps): react_jsx_runtime51.JSX.Element;
|
|
90
90
|
declare function TagsListItem({
|
|
91
91
|
value,
|
|
92
92
|
className,
|
|
93
93
|
...props
|
|
94
94
|
}: ComponentProps<'button'> & {
|
|
95
95
|
value: string;
|
|
96
|
-
}):
|
|
96
|
+
}): react_jsx_runtime51.JSX.Element;
|
|
97
97
|
declare function renderHighlights(highlights: HighlightedText<ReactNode>[]): ReactNode;
|
|
98
98
|
declare function useSearch(): {
|
|
99
99
|
open: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CodeBlockProps } from "./codeblock.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime26 from "react/jsx-runtime";
|
|
3
3
|
import { HighlightOptionsCommon, HighlightOptionsThemes } from "fumadocs-core/highlight";
|
|
4
4
|
|
|
5
5
|
//#region src/components/dynamic-codeblock.d.ts
|
|
@@ -26,7 +26,7 @@ declare function DynamicCodeBlock({
|
|
|
26
26
|
codeblock,
|
|
27
27
|
options,
|
|
28
28
|
wrapInSuspense
|
|
29
|
-
}: DynamicCodeblockProps):
|
|
29
|
+
}: DynamicCodeblockProps): react_jsx_runtime26.JSX.Element;
|
|
30
30
|
//#endregion
|
|
31
31
|
export { DynamicCodeBlock, DynamicCodeblockProps };
|
|
32
32
|
//# sourceMappingURL=dynamic-codeblock.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime28 from "react/jsx-runtime";
|
|
2
2
|
import { AnchorHTMLAttributes } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/github-info.d.ts
|
|
@@ -13,7 +13,7 @@ declare function GithubInfo({
|
|
|
13
13
|
repo: string;
|
|
14
14
|
token?: string;
|
|
15
15
|
baseUrl?: string;
|
|
16
|
-
}): Promise<
|
|
16
|
+
}): Promise<react_jsx_runtime28.JSX.Element>;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { GithubInfo };
|
|
19
19
|
//# sourceMappingURL=github-info.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ImageProps } from "fumadocs-core/framework";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime31 from "react/jsx-runtime";
|
|
3
3
|
import { ComponentProps } from "react";
|
|
4
4
|
import { UncontrolledProps } from "react-medium-image-zoom";
|
|
5
5
|
|
|
@@ -19,7 +19,7 @@ declare function ImageZoom({
|
|
|
19
19
|
children,
|
|
20
20
|
rmiz,
|
|
21
21
|
...props
|
|
22
|
-
}: ImageZoomProps):
|
|
22
|
+
}: ImageZoomProps): react_jsx_runtime31.JSX.Element;
|
|
23
23
|
//#endregion
|
|
24
24
|
export { ImageZoom, ImageZoomProps };
|
|
25
25
|
//# sourceMappingURL=image-zoom.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Collapsible } from "./ui/collapsible.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime33 from "react/jsx-runtime";
|
|
3
3
|
import { ComponentProps } from "react";
|
|
4
4
|
import { TOCItemType } from "fumadocs-core/toc";
|
|
5
5
|
|
|
@@ -11,7 +11,7 @@ declare function InlineTOC({
|
|
|
11
11
|
items,
|
|
12
12
|
className,
|
|
13
13
|
...props
|
|
14
|
-
}: InlineTocProps):
|
|
14
|
+
}: InlineTocProps): react_jsx_runtime33.JSX.Element;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { InlineTOC, InlineTocProps };
|
|
17
17
|
//# sourceMappingURL=inline-toc.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CollapsibleContentProps, CollapsibleTriggerProps } from "../ui/collapsible.js";
|
|
2
2
|
import { ScrollAreaProps } from "../ui/scroll-area.js";
|
|
3
3
|
import { LinkProps } from "fumadocs-core/link";
|
|
4
|
-
import * as
|
|
5
|
-
import * as
|
|
4
|
+
import * as react_jsx_runtime130 from "react/jsx-runtime";
|
|
5
|
+
import * as react20 from "react";
|
|
6
6
|
import { ComponentProps, PointerEvent, ReactNode, RefObject } from "react";
|
|
7
7
|
|
|
8
8
|
//#region src/components/sidebar/base.d.ts
|
|
@@ -19,7 +19,7 @@ interface SidebarContext {
|
|
|
19
19
|
*/
|
|
20
20
|
closeOnRedirect: RefObject<boolean>;
|
|
21
21
|
defaultOpenLevel: number;
|
|
22
|
-
prefetch
|
|
22
|
+
prefetch?: boolean;
|
|
23
23
|
mode: Mode;
|
|
24
24
|
}
|
|
25
25
|
interface SidebarProviderProps {
|
|
@@ -31,20 +31,18 @@ interface SidebarProviderProps {
|
|
|
31
31
|
*/
|
|
32
32
|
defaultOpenLevel?: number;
|
|
33
33
|
/**
|
|
34
|
-
* Prefetch links
|
|
35
|
-
*
|
|
36
|
-
* @defaultValue true
|
|
34
|
+
* Prefetch links, default behaviour depends on your React.js framework.
|
|
37
35
|
*/
|
|
38
36
|
prefetch?: boolean;
|
|
39
37
|
children?: ReactNode;
|
|
40
38
|
}
|
|
41
39
|
type Mode = 'drawer' | 'full';
|
|
42
|
-
declare const SidebarContext:
|
|
40
|
+
declare const SidebarContext: react20.Context<SidebarContext | null>;
|
|
43
41
|
declare function SidebarProvider({
|
|
44
42
|
defaultOpenLevel,
|
|
45
43
|
prefetch,
|
|
46
44
|
children
|
|
47
|
-
}: SidebarProviderProps):
|
|
45
|
+
}: SidebarProviderProps): react_jsx_runtime130.JSX.Element;
|
|
48
46
|
declare function useSidebar(): SidebarContext;
|
|
49
47
|
declare function useFolder(): {
|
|
50
48
|
open: boolean;
|
|
@@ -64,24 +62,24 @@ declare function SidebarContent({
|
|
|
64
62
|
onPointerLeave: (event: PointerEvent) => void;
|
|
65
63
|
}) => ReactNode;
|
|
66
64
|
}): ReactNode;
|
|
67
|
-
declare function SidebarDrawerOverlay(props: ComponentProps<'div'>):
|
|
65
|
+
declare function SidebarDrawerOverlay(props: ComponentProps<'div'>): react_jsx_runtime130.JSX.Element | undefined;
|
|
68
66
|
declare function SidebarDrawerContent({
|
|
69
67
|
className,
|
|
70
68
|
children,
|
|
71
69
|
...props
|
|
72
|
-
}: ComponentProps<'aside'>):
|
|
70
|
+
}: ComponentProps<'aside'>): react_jsx_runtime130.JSX.Element | undefined;
|
|
73
71
|
declare function SidebarViewport({
|
|
74
72
|
className,
|
|
75
73
|
...props
|
|
76
|
-
}: ScrollAreaProps):
|
|
77
|
-
declare function SidebarSeparator(props: ComponentProps<'p'>):
|
|
74
|
+
}: ScrollAreaProps): react_jsx_runtime130.JSX.Element;
|
|
75
|
+
declare function SidebarSeparator(props: ComponentProps<'p'>): react_jsx_runtime130.JSX.Element;
|
|
78
76
|
declare function SidebarItem({
|
|
79
77
|
icon,
|
|
80
78
|
children,
|
|
81
79
|
...props
|
|
82
80
|
}: LinkProps & {
|
|
83
81
|
icon?: ReactNode;
|
|
84
|
-
}):
|
|
82
|
+
}): react_jsx_runtime130.JSX.Element;
|
|
85
83
|
declare function SidebarFolder({
|
|
86
84
|
defaultOpen: defaultOpenProp,
|
|
87
85
|
collapsible,
|
|
@@ -92,21 +90,21 @@ declare function SidebarFolder({
|
|
|
92
90
|
active?: boolean;
|
|
93
91
|
defaultOpen?: boolean;
|
|
94
92
|
collapsible?: boolean;
|
|
95
|
-
}):
|
|
93
|
+
}): react_jsx_runtime130.JSX.Element;
|
|
96
94
|
declare function SidebarFolderTrigger({
|
|
97
95
|
children,
|
|
98
96
|
...props
|
|
99
|
-
}: CollapsibleTriggerProps):
|
|
97
|
+
}: CollapsibleTriggerProps): react_jsx_runtime130.JSX.Element;
|
|
100
98
|
declare function SidebarFolderLink({
|
|
101
99
|
children,
|
|
102
100
|
...props
|
|
103
|
-
}: LinkProps):
|
|
104
|
-
declare function SidebarFolderContent(props: CollapsibleContentProps):
|
|
101
|
+
}: LinkProps): react_jsx_runtime130.JSX.Element;
|
|
102
|
+
declare function SidebarFolderContent(props: CollapsibleContentProps): react_jsx_runtime130.JSX.Element;
|
|
105
103
|
declare function SidebarTrigger({
|
|
106
104
|
children,
|
|
107
105
|
...props
|
|
108
|
-
}: ComponentProps<'button'>):
|
|
109
|
-
declare function SidebarCollapseTrigger(props: ComponentProps<'button'>):
|
|
106
|
+
}: ComponentProps<'button'>): react_jsx_runtime130.JSX.Element;
|
|
107
|
+
declare function SidebarCollapseTrigger(props: ComponentProps<'button'>): react_jsx_runtime130.JSX.Element;
|
|
110
108
|
//#endregion
|
|
111
109
|
export { SidebarCollapseTrigger, SidebarContent, SidebarDrawerContent, SidebarDrawerOverlay, SidebarFolder, SidebarFolderContent, SidebarFolderLink, SidebarFolderTrigger, SidebarItem, SidebarProvider, SidebarProviderProps, SidebarSeparator, SidebarTrigger, SidebarViewport, base_d_exports, useFolder, useFolderDepth, useSidebar };
|
|
112
110
|
//# sourceMappingURL=base.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","names":[],"sources":["../../../src/components/sidebar/base.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;;UA+BU,cAAA;;WAEC,KAAA,CAAM,SAAS,KAAA,CAAM;;gBAEhB,KAAA,CAAM,SAAS,KAAA,CAAM;;;;mBAKlB;;;QAGX;;UAGS,oBAAA;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"base.d.ts","names":[],"sources":["../../../src/components/sidebar/base.tsx"],"sourcesContent":[],"mappings":";;;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EAoJa,uBApJb,CAAA,EAoJoC,oBAAA,CAAA,GAAA,CAAA,OApJpC;AAAG,iBAwJlB,cAAA,CAxJkB;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAwJqB,cAxJrB,CAAA,QAAA,CAAA,CAAA,EAwJ6C,oBAAA,CAAA,GAAA,CAAA,OAxJ7C;AAAuB,iBAkKzC,sBAAA,CAlKyC,KAAA,EAkKX,cAlKW,CAAA,QAAA,CAAA,CAAA,EAkKa,oBAAA,CAAA,GAAA,CAAA,OAlKb"}
|
|
@@ -36,7 +36,7 @@ var base_exports = /* @__PURE__ */ __exportAll({
|
|
|
36
36
|
});
|
|
37
37
|
const SidebarContext = createContext(null);
|
|
38
38
|
const FolderContext = createContext(null);
|
|
39
|
-
function SidebarProvider({ defaultOpenLevel = 0, prefetch
|
|
39
|
+
function SidebarProvider({ defaultOpenLevel = 0, prefetch, children }) {
|
|
40
40
|
const closeOnRedirect = useRef(true);
|
|
41
41
|
const [open, setOpen] = useState(false);
|
|
42
42
|
const [collapsed, setCollapsed] = useState(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","names":["mode: Mode"],"sources":["../../../src/components/sidebar/base.tsx"],"sourcesContent":["'use client';\nimport { ChevronDown, ExternalLink } from 'lucide-react';\nimport {\n type ComponentProps,\n createContext,\n type PointerEvent,\n type ReactNode,\n type RefObject,\n use,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport Link, { type LinkProps } from 'fumadocs-core/link';\nimport { useOnChange } from 'fumadocs-core/utils/use-on-change';\nimport { cn } from '@fumadocs/ui/cn';\nimport { ScrollArea, type ScrollAreaProps, ScrollViewport } from '@/components/ui/scroll-area';\nimport { isActive } from '@fumadocs/ui/urls';\nimport {\n Collapsible,\n CollapsibleContent,\n type CollapsibleContentProps,\n CollapsibleTrigger,\n type CollapsibleTriggerProps,\n} from '@/components/ui/collapsible';\nimport { useMediaQuery } from 'fumadocs-core/utils/use-media-query';\nimport scrollIntoView from 'scroll-into-view-if-needed';\nimport { usePathname } from 'fumadocs-core/framework';\nimport ReactDOM from 'react-dom';\n\ninterface SidebarContext {\n open: boolean;\n setOpen: React.Dispatch<React.SetStateAction<boolean>>;\n collapsed: boolean;\n setCollapsed: React.Dispatch<React.SetStateAction<boolean>>;\n\n /**\n * When set to false, don't close the sidebar when navigate to another page\n */\n closeOnRedirect: RefObject<boolean>;\n defaultOpenLevel: number;\n prefetch: boolean;\n mode: Mode;\n}\n\nexport interface SidebarProviderProps {\n /**\n * Open folders by default if their level is lower or equal to a specific level\n * (Starting from 1)\n *\n * @defaultValue 0\n */\n defaultOpenLevel?: number;\n\n /**\n * Prefetch links\n *\n * @defaultValue true\n */\n prefetch?: boolean;\n\n children?: ReactNode;\n}\n\ntype Mode = 'drawer' | 'full';\n\nconst SidebarContext = createContext<SidebarContext | null>(null);\n\nconst FolderContext = createContext<{\n open: boolean;\n setOpen: React.Dispatch<React.SetStateAction<boolean>>;\n depth: number;\n collapsible: boolean;\n} | null>(null);\n\nexport function SidebarProvider({\n defaultOpenLevel = 0,\n prefetch = true,\n children,\n}: SidebarProviderProps) {\n const closeOnRedirect = useRef(true);\n const [open, setOpen] = useState(false);\n const [collapsed, setCollapsed] = useState(false);\n const pathname = usePathname();\n const mode: Mode = useMediaQuery('(width < 768px)') ? 'drawer' : 'full';\n\n useOnChange(pathname, () => {\n if (closeOnRedirect.current) {\n setOpen(false);\n }\n closeOnRedirect.current = true;\n });\n\n return (\n <SidebarContext\n value={useMemo(\n () => ({\n open,\n setOpen,\n collapsed,\n setCollapsed,\n closeOnRedirect,\n defaultOpenLevel,\n prefetch,\n mode,\n }),\n [open, collapsed, defaultOpenLevel, prefetch, mode],\n )}\n >\n {children}\n </SidebarContext>\n );\n}\n\nexport function useSidebar(): SidebarContext {\n const ctx = use(SidebarContext);\n if (!ctx)\n throw new Error(\n 'Missing SidebarContext, make sure you have wrapped the component in <DocsLayout /> and the context is available.',\n );\n\n return ctx;\n}\n\nexport function useFolder() {\n return use(FolderContext);\n}\n\nexport function useFolderDepth() {\n return use(FolderContext)?.depth ?? 0;\n}\n\nexport function SidebarContent({\n children,\n}: {\n children: (state: {\n ref: RefObject<HTMLElement | null>;\n collapsed: boolean;\n hovered: boolean;\n onPointerEnter: (event: PointerEvent) => void;\n onPointerLeave: (event: PointerEvent) => void;\n }) => ReactNode;\n}) {\n const { collapsed, mode } = useSidebar();\n const [hover, setHover] = useState(false);\n const ref = useRef<HTMLElement>(null);\n const timerRef = useRef(0);\n\n useOnChange(collapsed, () => {\n if (collapsed) setHover(false);\n });\n\n if (mode !== 'full') return;\n\n function shouldIgnoreHover(e: PointerEvent): boolean {\n const element = ref.current;\n if (!element) return true;\n\n return !collapsed || e.pointerType === 'touch' || element.getAnimations().length > 0;\n }\n\n return children({\n ref,\n collapsed,\n hovered: hover,\n onPointerEnter(e) {\n if (shouldIgnoreHover(e)) return;\n window.clearTimeout(timerRef.current);\n setHover(true);\n },\n onPointerLeave(e) {\n if (shouldIgnoreHover(e)) return;\n window.clearTimeout(timerRef.current);\n\n timerRef.current = window.setTimeout(\n () => setHover(false),\n // if mouse is leaving the viewport, add a close delay\n Math.min(e.clientX, document.body.clientWidth - e.clientX) > 100 ? 0 : 500,\n );\n },\n });\n}\n\nexport function SidebarDrawerOverlay(props: ComponentProps<'div'>) {\n const { open, setOpen, mode } = useSidebar();\n const [hidden, setHidden] = useState(!open);\n\n if (open && hidden) setHidden(false);\n if (mode !== 'drawer' || hidden) return;\n return (\n <div\n data-state={open ? 'open' : 'closed'}\n onClick={() => setOpen(false)}\n onAnimationEnd={() => {\n if (!open) ReactDOM.flushSync(() => setHidden(true));\n }}\n {...props}\n />\n );\n}\n\nexport function SidebarDrawerContent({ className, children, ...props }: ComponentProps<'aside'>) {\n const { open, mode } = useSidebar();\n const [hidden, setHidden] = useState(!open);\n\n if (open && hidden) setHidden(false);\n if (mode !== 'drawer') return;\n return (\n <aside\n id=\"nd-sidebar-mobile\"\n data-state={open ? 'open' : 'closed'}\n className={cn(hidden && 'invisible', className)}\n onAnimationEnd={() => {\n if (!open) ReactDOM.flushSync(() => setHidden(true));\n }}\n {...props}\n >\n {children}\n </aside>\n );\n}\n\nexport function SidebarViewport({ className, ...props }: ScrollAreaProps) {\n return (\n <ScrollArea\n className={(s) =>\n cn('min-h-0 flex-1', typeof className === 'function' ? className(s) : className)\n }\n {...props}\n >\n <ScrollViewport\n className=\"p-4 overscroll-contain\"\n style={\n {\n maskImage:\n 'linear-gradient(to bottom, transparent, white 12px, white calc(100% - 12px), transparent)',\n } as object\n }\n >\n {props.children}\n </ScrollViewport>\n </ScrollArea>\n );\n}\n\nexport function SidebarSeparator(props: ComponentProps<'p'>) {\n const depth = useFolderDepth();\n return (\n <p\n {...props}\n className={cn(\n 'inline-flex items-center gap-2 mb-1.5 px-2 mt-6 empty:mb-0',\n depth === 0 && 'first:mt-0',\n props.className,\n )}\n >\n {props.children}\n </p>\n );\n}\n\nexport function SidebarItem({\n icon,\n children,\n ...props\n}: LinkProps & {\n icon?: ReactNode;\n}) {\n const pathname = usePathname();\n const ref = useRef<HTMLAnchorElement>(null);\n const { prefetch } = useSidebar();\n const active = props.href !== undefined && isActive(props.href, pathname, false);\n\n useAutoScroll(active, ref);\n\n return (\n <Link ref={ref} data-active={active} prefetch={prefetch} {...props}>\n {icon ?? (props.external ? <ExternalLink /> : null)}\n {children}\n </Link>\n );\n}\n\nexport function SidebarFolder({\n defaultOpen: defaultOpenProp,\n collapsible = true,\n active = false,\n children,\n ...props\n}: ComponentProps<'div'> & {\n active?: boolean;\n defaultOpen?: boolean;\n collapsible?: boolean;\n}) {\n const { defaultOpenLevel } = useSidebar();\n const depth = useFolderDepth() + 1;\n const defaultOpen =\n collapsible === false || active || (defaultOpenProp ?? defaultOpenLevel >= depth);\n const [open, setOpen] = useState(defaultOpen);\n\n useOnChange(defaultOpen, (v) => {\n if (v) setOpen(v);\n });\n\n return (\n <Collapsible open={open} onOpenChange={setOpen} disabled={!collapsible} {...props}>\n <FolderContext\n value={useMemo(() => ({ open, setOpen, depth, collapsible }), [collapsible, depth, open])}\n >\n {children}\n </FolderContext>\n </Collapsible>\n );\n}\n\nexport function SidebarFolderTrigger({ children, ...props }: CollapsibleTriggerProps) {\n const { open, collapsible } = use(FolderContext)!;\n\n if (collapsible) {\n return (\n <CollapsibleTrigger {...props}>\n {children}\n <ChevronDown\n data-icon\n className={cn('ms-auto transition-transform', !open && '-rotate-90')}\n />\n </CollapsibleTrigger>\n );\n }\n\n return <div {...(props as ComponentProps<'div'>)}>{children}</div>;\n}\n\nexport function SidebarFolderLink({ children, ...props }: LinkProps) {\n const ref = useRef<HTMLAnchorElement>(null);\n const { open, setOpen, collapsible } = use(FolderContext)!;\n const { prefetch } = useSidebar();\n const pathname = usePathname();\n const active = props.href !== undefined && isActive(props.href, pathname, false);\n\n useAutoScroll(active, ref);\n\n return (\n <Link\n ref={ref}\n data-active={active}\n onClick={(e) => {\n if (!collapsible) return;\n\n if (e.target instanceof Element && e.target.matches('[data-icon], [data-icon] *')) {\n setOpen(!open);\n e.preventDefault();\n } else {\n setOpen(active ? !open : true);\n }\n }}\n prefetch={prefetch}\n {...props}\n >\n {children}\n {collapsible && (\n <ChevronDown\n data-icon\n className={cn('ms-auto transition-transform', !open && '-rotate-90')}\n />\n )}\n </Link>\n );\n}\n\nexport function SidebarFolderContent(props: CollapsibleContentProps) {\n return <CollapsibleContent {...props}>{props.children}</CollapsibleContent>;\n}\n\nexport function SidebarTrigger({ children, ...props }: ComponentProps<'button'>) {\n const { setOpen } = useSidebar();\n\n return (\n <button aria-label=\"Open Sidebar\" onClick={() => setOpen((prev) => !prev)} {...props}>\n {children}\n </button>\n );\n}\n\nexport function SidebarCollapseTrigger(props: ComponentProps<'button'>) {\n const { collapsed, setCollapsed } = useSidebar();\n\n return (\n <button\n type=\"button\"\n aria-label=\"Collapse Sidebar\"\n data-collapsed={collapsed}\n onClick={() => {\n setCollapsed((prev) => !prev);\n }}\n {...props}\n >\n {props.children}\n </button>\n );\n}\n\nfunction useAutoScroll(active: boolean, ref: RefObject<HTMLAnchorElement | null>) {\n const { mode } = useSidebar();\n\n useEffect(() => {\n if (active && ref.current) {\n scrollIntoView(ref.current, {\n boundary: document.getElementById(mode === 'drawer' ? 'nd-sidebar-mobile' : 'nd-sidebar'),\n scrollMode: 'if-needed',\n });\n }\n }, [active, mode, ref]);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmEA,MAAM,iBAAiB,cAAqC,KAAK;AAEjE,MAAM,gBAAgB,cAKZ,KAAK;AAEf,SAAgB,gBAAgB,EAC9B,mBAAmB,GACnB,WAAW,MACX,YACuB;CACvB,MAAM,kBAAkB,OAAO,KAAK;CACpC,MAAM,CAAC,MAAM,WAAW,SAAS,MAAM;CACvC,MAAM,CAAC,WAAW,gBAAgB,SAAS,MAAM;CACjD,MAAM,WAAW,aAAa;CAC9B,MAAMA,OAAa,cAAc,kBAAkB,GAAG,WAAW;AAEjE,aAAY,gBAAgB;AAC1B,MAAI,gBAAgB,QAClB,SAAQ,MAAM;AAEhB,kBAAgB,UAAU;GAC1B;AAEF,QACE,oBAAC;EACC,OAAO,eACE;GACL;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,GACD;GAAC;GAAM;GAAW;GAAkB;GAAU;GAAK,CACpD;EAEA;GACc;;AAIrB,SAAgB,aAA6B;CAC3C,MAAM,MAAM,IAAI,eAAe;AAC/B,KAAI,CAAC,IACH,OAAM,IAAI,MACR,mHACD;AAEH,QAAO;;AAGT,SAAgB,YAAY;AAC1B,QAAO,IAAI,cAAc;;AAG3B,SAAgB,iBAAiB;AAC/B,QAAO,IAAI,cAAc,EAAE,SAAS;;AAGtC,SAAgB,eAAe,EAC7B,YASC;CACD,MAAM,EAAE,WAAW,SAAS,YAAY;CACxC,MAAM,CAAC,OAAO,YAAY,SAAS,MAAM;CACzC,MAAM,MAAM,OAAoB,KAAK;CACrC,MAAM,WAAW,OAAO,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Ib,SAAgB,uBAAuB,OAAiC;CACtE,MAAM,EAAE,WAAW,iBAAiB,YAAY;AAEhD,QACE,oBAAC;EACC,MAAK;EACL,cAAW;EACX,kBAAgB;EAChB,eAAe;AACb,iBAAc,SAAS,CAAC,KAAK;;EAE/B,GAAI;YAEH,MAAM;GACA;;AAIb,SAAS,cAAc,QAAiB,KAA0C;CAChF,MAAM,EAAE,SAAS,YAAY;AAE7B,iBAAgB;AACd,MAAI,UAAU,IAAI,QAChB,gBAAe,IAAI,SAAS;GAC1B,UAAU,SAAS,eAAe,SAAS,WAAW,sBAAsB,aAAa;GACzF,YAAY;GACb,CAAC;IAEH;EAAC;EAAQ;EAAM;EAAI,CAAC"}
|
|
1
|
+
{"version":3,"file":"base.js","names":["mode: Mode"],"sources":["../../../src/components/sidebar/base.tsx"],"sourcesContent":["'use client';\nimport { ChevronDown, ExternalLink } from 'lucide-react';\nimport {\n type ComponentProps,\n createContext,\n type PointerEvent,\n type ReactNode,\n type RefObject,\n use,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport Link, { type LinkProps } from 'fumadocs-core/link';\nimport { useOnChange } from 'fumadocs-core/utils/use-on-change';\nimport { cn } from '@fumadocs/ui/cn';\nimport { ScrollArea, type ScrollAreaProps, ScrollViewport } from '@/components/ui/scroll-area';\nimport { isActive } from '@fumadocs/ui/urls';\nimport {\n Collapsible,\n CollapsibleContent,\n type CollapsibleContentProps,\n CollapsibleTrigger,\n type CollapsibleTriggerProps,\n} from '@/components/ui/collapsible';\nimport { useMediaQuery } from 'fumadocs-core/utils/use-media-query';\nimport scrollIntoView from 'scroll-into-view-if-needed';\nimport { usePathname } from 'fumadocs-core/framework';\nimport ReactDOM from 'react-dom';\n\ninterface SidebarContext {\n open: boolean;\n setOpen: React.Dispatch<React.SetStateAction<boolean>>;\n collapsed: boolean;\n setCollapsed: React.Dispatch<React.SetStateAction<boolean>>;\n\n /**\n * When set to false, don't close the sidebar when navigate to another page\n */\n closeOnRedirect: RefObject<boolean>;\n defaultOpenLevel: number;\n prefetch?: boolean;\n mode: Mode;\n}\n\nexport interface SidebarProviderProps {\n /**\n * Open folders by default if their level is lower or equal to a specific level\n * (Starting from 1)\n *\n * @defaultValue 0\n */\n defaultOpenLevel?: number;\n\n /**\n * Prefetch links, default behaviour depends on your React.js framework.\n */\n prefetch?: boolean;\n\n children?: ReactNode;\n}\n\ntype Mode = 'drawer' | 'full';\n\nconst SidebarContext = createContext<SidebarContext | null>(null);\n\nconst FolderContext = createContext<{\n open: boolean;\n setOpen: React.Dispatch<React.SetStateAction<boolean>>;\n depth: number;\n collapsible: boolean;\n} | null>(null);\n\nexport function SidebarProvider({\n defaultOpenLevel = 0,\n prefetch,\n children,\n}: SidebarProviderProps) {\n const closeOnRedirect = useRef(true);\n const [open, setOpen] = useState(false);\n const [collapsed, setCollapsed] = useState(false);\n const pathname = usePathname();\n const mode: Mode = useMediaQuery('(width < 768px)') ? 'drawer' : 'full';\n\n useOnChange(pathname, () => {\n if (closeOnRedirect.current) {\n setOpen(false);\n }\n closeOnRedirect.current = true;\n });\n\n return (\n <SidebarContext\n value={useMemo(\n () => ({\n open,\n setOpen,\n collapsed,\n setCollapsed,\n closeOnRedirect,\n defaultOpenLevel,\n prefetch,\n mode,\n }),\n [open, collapsed, defaultOpenLevel, prefetch, mode],\n )}\n >\n {children}\n </SidebarContext>\n );\n}\n\nexport function useSidebar(): SidebarContext {\n const ctx = use(SidebarContext);\n if (!ctx)\n throw new Error(\n 'Missing SidebarContext, make sure you have wrapped the component in <DocsLayout /> and the context is available.',\n );\n\n return ctx;\n}\n\nexport function useFolder() {\n return use(FolderContext);\n}\n\nexport function useFolderDepth() {\n return use(FolderContext)?.depth ?? 0;\n}\n\nexport function SidebarContent({\n children,\n}: {\n children: (state: {\n ref: RefObject<HTMLElement | null>;\n collapsed: boolean;\n hovered: boolean;\n onPointerEnter: (event: PointerEvent) => void;\n onPointerLeave: (event: PointerEvent) => void;\n }) => ReactNode;\n}) {\n const { collapsed, mode } = useSidebar();\n const [hover, setHover] = useState(false);\n const ref = useRef<HTMLElement>(null);\n const timerRef = useRef(0);\n\n useOnChange(collapsed, () => {\n if (collapsed) setHover(false);\n });\n\n if (mode !== 'full') return;\n\n function shouldIgnoreHover(e: PointerEvent): boolean {\n const element = ref.current;\n if (!element) return true;\n\n return !collapsed || e.pointerType === 'touch' || element.getAnimations().length > 0;\n }\n\n return children({\n ref,\n collapsed,\n hovered: hover,\n onPointerEnter(e) {\n if (shouldIgnoreHover(e)) return;\n window.clearTimeout(timerRef.current);\n setHover(true);\n },\n onPointerLeave(e) {\n if (shouldIgnoreHover(e)) return;\n window.clearTimeout(timerRef.current);\n\n timerRef.current = window.setTimeout(\n () => setHover(false),\n // if mouse is leaving the viewport, add a close delay\n Math.min(e.clientX, document.body.clientWidth - e.clientX) > 100 ? 0 : 500,\n );\n },\n });\n}\n\nexport function SidebarDrawerOverlay(props: ComponentProps<'div'>) {\n const { open, setOpen, mode } = useSidebar();\n const [hidden, setHidden] = useState(!open);\n\n if (open && hidden) setHidden(false);\n if (mode !== 'drawer' || hidden) return;\n return (\n <div\n data-state={open ? 'open' : 'closed'}\n onClick={() => setOpen(false)}\n onAnimationEnd={() => {\n if (!open) ReactDOM.flushSync(() => setHidden(true));\n }}\n {...props}\n />\n );\n}\n\nexport function SidebarDrawerContent({ className, children, ...props }: ComponentProps<'aside'>) {\n const { open, mode } = useSidebar();\n const [hidden, setHidden] = useState(!open);\n\n if (open && hidden) setHidden(false);\n if (mode !== 'drawer') return;\n return (\n <aside\n id=\"nd-sidebar-mobile\"\n data-state={open ? 'open' : 'closed'}\n className={cn(hidden && 'invisible', className)}\n onAnimationEnd={() => {\n if (!open) ReactDOM.flushSync(() => setHidden(true));\n }}\n {...props}\n >\n {children}\n </aside>\n );\n}\n\nexport function SidebarViewport({ className, ...props }: ScrollAreaProps) {\n return (\n <ScrollArea\n className={(s) =>\n cn('min-h-0 flex-1', typeof className === 'function' ? className(s) : className)\n }\n {...props}\n >\n <ScrollViewport\n className=\"p-4 overscroll-contain\"\n style={\n {\n maskImage:\n 'linear-gradient(to bottom, transparent, white 12px, white calc(100% - 12px), transparent)',\n } as object\n }\n >\n {props.children}\n </ScrollViewport>\n </ScrollArea>\n );\n}\n\nexport function SidebarSeparator(props: ComponentProps<'p'>) {\n const depth = useFolderDepth();\n return (\n <p\n {...props}\n className={cn(\n 'inline-flex items-center gap-2 mb-1.5 px-2 mt-6 empty:mb-0',\n depth === 0 && 'first:mt-0',\n props.className,\n )}\n >\n {props.children}\n </p>\n );\n}\n\nexport function SidebarItem({\n icon,\n children,\n ...props\n}: LinkProps & {\n icon?: ReactNode;\n}) {\n const pathname = usePathname();\n const ref = useRef<HTMLAnchorElement>(null);\n const { prefetch } = useSidebar();\n const active = props.href !== undefined && isActive(props.href, pathname, false);\n\n useAutoScroll(active, ref);\n\n return (\n <Link ref={ref} data-active={active} prefetch={prefetch} {...props}>\n {icon ?? (props.external ? <ExternalLink /> : null)}\n {children}\n </Link>\n );\n}\n\nexport function SidebarFolder({\n defaultOpen: defaultOpenProp,\n collapsible = true,\n active = false,\n children,\n ...props\n}: ComponentProps<'div'> & {\n active?: boolean;\n defaultOpen?: boolean;\n collapsible?: boolean;\n}) {\n const { defaultOpenLevel } = useSidebar();\n const depth = useFolderDepth() + 1;\n const defaultOpen =\n collapsible === false || active || (defaultOpenProp ?? defaultOpenLevel >= depth);\n const [open, setOpen] = useState(defaultOpen);\n\n useOnChange(defaultOpen, (v) => {\n if (v) setOpen(v);\n });\n\n return (\n <Collapsible open={open} onOpenChange={setOpen} disabled={!collapsible} {...props}>\n <FolderContext\n value={useMemo(() => ({ open, setOpen, depth, collapsible }), [collapsible, depth, open])}\n >\n {children}\n </FolderContext>\n </Collapsible>\n );\n}\n\nexport function SidebarFolderTrigger({ children, ...props }: CollapsibleTriggerProps) {\n const { open, collapsible } = use(FolderContext)!;\n\n if (collapsible) {\n return (\n <CollapsibleTrigger {...props}>\n {children}\n <ChevronDown\n data-icon\n className={cn('ms-auto transition-transform', !open && '-rotate-90')}\n />\n </CollapsibleTrigger>\n );\n }\n\n return <div {...(props as ComponentProps<'div'>)}>{children}</div>;\n}\n\nexport function SidebarFolderLink({ children, ...props }: LinkProps) {\n const ref = useRef<HTMLAnchorElement>(null);\n const { open, setOpen, collapsible } = use(FolderContext)!;\n const { prefetch } = useSidebar();\n const pathname = usePathname();\n const active = props.href !== undefined && isActive(props.href, pathname, false);\n\n useAutoScroll(active, ref);\n\n return (\n <Link\n ref={ref}\n data-active={active}\n onClick={(e) => {\n if (!collapsible) return;\n\n if (e.target instanceof Element && e.target.matches('[data-icon], [data-icon] *')) {\n setOpen(!open);\n e.preventDefault();\n } else {\n setOpen(active ? !open : true);\n }\n }}\n prefetch={prefetch}\n {...props}\n >\n {children}\n {collapsible && (\n <ChevronDown\n data-icon\n className={cn('ms-auto transition-transform', !open && '-rotate-90')}\n />\n )}\n </Link>\n );\n}\n\nexport function SidebarFolderContent(props: CollapsibleContentProps) {\n return <CollapsibleContent {...props}>{props.children}</CollapsibleContent>;\n}\n\nexport function SidebarTrigger({ children, ...props }: ComponentProps<'button'>) {\n const { setOpen } = useSidebar();\n\n return (\n <button aria-label=\"Open Sidebar\" onClick={() => setOpen((prev) => !prev)} {...props}>\n {children}\n </button>\n );\n}\n\nexport function SidebarCollapseTrigger(props: ComponentProps<'button'>) {\n const { collapsed, setCollapsed } = useSidebar();\n\n return (\n <button\n type=\"button\"\n aria-label=\"Collapse Sidebar\"\n data-collapsed={collapsed}\n onClick={() => {\n setCollapsed((prev) => !prev);\n }}\n {...props}\n >\n {props.children}\n </button>\n );\n}\n\nfunction useAutoScroll(active: boolean, ref: RefObject<HTMLAnchorElement | null>) {\n const { mode } = useSidebar();\n\n useEffect(() => {\n if (active && ref.current) {\n scrollIntoView(ref.current, {\n boundary: document.getElementById(mode === 'drawer' ? 'nd-sidebar-mobile' : 'nd-sidebar'),\n scrollMode: 'if-needed',\n });\n }\n }, [active, mode, ref]);\n}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YAAY;AAE7B,iBAAgB;AACd,MAAI,UAAU,IAAI,QAChB,gBAAe,IAAI,SAAS;GAC1B,UAAU,SAAS,eAAe,SAAS,WAAW,sBAAsB,aAAa;GACzF,YAAY;GACb,CAAC;IAEH;EAAC;EAAQ;EAAM;EAAI,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { base_d_exports } from "./base.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime80 from "react/jsx-runtime";
|
|
3
3
|
import { HTMLAttributes } from "react";
|
|
4
4
|
import { LinkItemType } from "@fumadocs/ui/link-item";
|
|
5
5
|
|
|
@@ -18,7 +18,7 @@ declare function createLinkItemRenderer({
|
|
|
18
18
|
item: Exclude<LinkItemType, {
|
|
19
19
|
type: "icon";
|
|
20
20
|
}>;
|
|
21
|
-
}) =>
|
|
21
|
+
}) => react_jsx_runtime80.JSX.Element;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { createLinkItemRenderer };
|
|
24
24
|
//# sourceMappingURL=link-item.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { base_d_exports } from "./base.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime79 from "react/jsx-runtime";
|
|
3
3
|
import { FC, ReactNode } from "react";
|
|
4
4
|
import * as PageTree from "fumadocs-core/page-tree";
|
|
5
5
|
|
|
@@ -24,7 +24,7 @@ declare function createPageTreeRenderer({
|
|
|
24
24
|
SidebarFolderTrigger,
|
|
25
25
|
SidebarSeparator,
|
|
26
26
|
SidebarItem
|
|
27
|
-
}: InternalComponents): (components: Partial<SidebarPageTreeComponents>) =>
|
|
27
|
+
}: InternalComponents): (components: Partial<SidebarPageTreeComponents>) => react_jsx_runtime79.JSX.Element;
|
|
28
28
|
//#endregion
|
|
29
29
|
export { SidebarPageTreeComponents, createPageTreeRenderer };
|
|
30
30
|
//# sourceMappingURL=page-tree.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-tree.d.ts","names":[],"sources":["../../../src/components/sidebar/page-tree.tsx"],"sourcesContent":[],"mappings":";;;;;;UAKiB,yBAAA;QACT;UAAW,QAAA,CAAS;EADX,CAAA,CAAA;EACE,MAAS,EAClB,EADkB,CAAA;IAApB,IAAA,EACa,QAAA,CAAS,MADtB;IACa,QAAS,EAAkB,SAAlB;EAAkB,CAAA,CAAA;EAAtC,SAAA,EACG,EADH,CAAA;IACc,IAAS,EAAT,QAAA,CAAS,SAAA;EAApB,CAAA,CAAA;;AACZ,KAEI,kBAAA,GAAqB,IAAH,CAAA,OACd,cAAA,EAAA,kBADqB,GAAA,eAAA,GAAA,mBAAA,GAAA,sBAAA,GAAA,sBAAA,GAAA,aAAA,CAAA;AAUd,iBAAA,sBAAA,CAAsB;EAAA,aAAA;EAAA,oBAAA;EAAA,iBAAA;EAAA,oBAAA;EAAA,gBAAA;EAAA;AAAA,CAAA,EAOnC,kBAPmC,CAAA,EAAA,CAAA,UAAA,EAoCQ,OApCR,CAoCgB,yBApChB,CAAA,EAAA,GAoC0C,
|
|
1
|
+
{"version":3,"file":"page-tree.d.ts","names":[],"sources":["../../../src/components/sidebar/page-tree.tsx"],"sourcesContent":[],"mappings":";;;;;;UAKiB,yBAAA;QACT;UAAW,QAAA,CAAS;EADX,CAAA,CAAA;EACE,MAAS,EAClB,EADkB,CAAA;IAApB,IAAA,EACa,QAAA,CAAS,MADtB;IACa,QAAS,EAAkB,SAAlB;EAAkB,CAAA,CAAA;EAAtC,SAAA,EACG,EADH,CAAA;IACc,IAAS,EAAT,QAAA,CAAS,SAAA;EAApB,CAAA,CAAA;;AACZ,KAEI,kBAAA,GAAqB,IAAH,CAAA,OACd,cAAA,EAAA,kBADqB,GAAA,eAAA,GAAA,mBAAA,GAAA,sBAAA,GAAA,sBAAA,GAAA,aAAA,CAAA;AAUd,iBAAA,sBAAA,CAAsB;EAAA,aAAA;EAAA,oBAAA;EAAA,iBAAA;EAAA,oBAAA;EAAA,gBAAA;EAAA;AAAA,CAAA,EAOnC,kBAPmC,CAAA,EAAA,CAAA,UAAA,EAoCQ,OApCR,CAoCgB,yBApChB,CAAA,EAAA,GAoC0C,mBAAA,CAAA,GAAA,CAAA,OApC1C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SidebarTab } from "./index.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime85 from "react/jsx-runtime";
|
|
3
3
|
import { ComponentProps, ReactNode } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/sidebar/tabs/dropdown.d.ts
|
|
@@ -13,7 +13,7 @@ declare function SidebarTabsDropdown({
|
|
|
13
13
|
}: {
|
|
14
14
|
placeholder?: ReactNode;
|
|
15
15
|
options: SidebarTabWithProps[];
|
|
16
|
-
} & ComponentProps<'button'>):
|
|
16
|
+
} & ComponentProps<'button'>): react_jsx_runtime85.JSX.Element;
|
|
17
17
|
declare function isTabActive(tab: SidebarTab, pathname: string): boolean;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { SidebarTabWithProps, SidebarTabsDropdown, isTabActive };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown.d.ts","names":[],"sources":["../../../../src/components/sidebar/tabs/dropdown.tsx"],"sourcesContent":[],"mappings":";;;;;UAWiB,mBAAA,SAA4B;UACnC;;AADO,iBAID,mBAAA,CAHN;EAAA,OAAA;EADmC,WAAU;EAAA,GAAA;AAMrD,CANqD,EAAA;EAIvC,WAAA,CAAA,EAKA,SALmB;EACjC,OAAA,EAKS,mBALT,EAAA;CACA,GAKE,cALF,CAAA,QAAA,CAAA,CAAA,EAK0B,
|
|
1
|
+
{"version":3,"file":"dropdown.d.ts","names":[],"sources":["../../../../src/components/sidebar/tabs/dropdown.tsx"],"sourcesContent":[],"mappings":";;;;;UAWiB,mBAAA,SAA4B;UACnC;;AADO,iBAID,mBAAA,CAHN;EAAA,OAAA;EADmC,WAAU;EAAA,GAAA;AAMrD,CANqD,EAAA;EAIvC,WAAA,CAAA,EAKA,SALmB;EACjC,OAAA,EAKS,mBALT,EAAA;CACA,GAKE,cALF,CAAA,QAAA,CAAA,CAAA,EAK0B,mBAAA,CAAA,GAAA,CAAA,OAL1B;AAGc,iBAkFA,WAAA,CAlFA,GAAA,EAkFiB,UAlFjB,EAAA,QAAA,EAAA,MAAA,CAAA,EAAA,OAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime35 from "react/jsx-runtime";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/steps.d.ts
|
|
@@ -6,12 +6,12 @@ declare function Steps({
|
|
|
6
6
|
children
|
|
7
7
|
}: {
|
|
8
8
|
children: ReactNode;
|
|
9
|
-
}):
|
|
9
|
+
}): react_jsx_runtime35.JSX.Element;
|
|
10
10
|
declare function Step({
|
|
11
11
|
children
|
|
12
12
|
}: {
|
|
13
13
|
children: ReactNode;
|
|
14
|
-
}):
|
|
14
|
+
}): react_jsx_runtime35.JSX.Element;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { Step, Steps };
|
|
17
17
|
//# sourceMappingURL=steps.d.ts.map
|