fumadocs-ui 16.4.3 → 16.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/emerald.css +1 -0
- package/dist/components/accordion.d.ts +3 -3
- package/dist/components/accordion.d.ts.map +1 -1
- package/dist/components/banner.d.ts +2 -2
- package/dist/components/banner.d.ts.map +1 -1
- package/dist/components/callout.d.ts +5 -5
- package/dist/components/card.d.ts +3 -3
- package/dist/components/card.d.ts.map +1 -1
- 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 +6 -2
- package/dist/components/sidebar/base.d.ts.map +1 -1
- package/dist/components/sidebar/base.js +4 -1
- package/dist/components/sidebar/base.js.map +1 -1
- package/dist/components/sidebar/link-item.d.ts +2 -2
- package/dist/components/sidebar/link-item.d.ts.map +1 -1
- package/dist/components/sidebar/page-tree.d.ts +2 -2
- package/dist/components/steps.d.ts +3 -3
- package/dist/components/tabs.d.ts +4 -4
- package/dist/components/tabs.d.ts.map +1 -1
- package/dist/components/type-table.d.ts +2 -2
- package/dist/components/ui/accordion.d.ts +6 -6
- package/dist/components/ui/collapsible.d.ts +4 -4
- package/dist/components/ui/tabs.d.ts +6 -6
- 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/page/client.d.ts +7 -7
- package/dist/layouts/docs/page/index.d.ts +11 -6
- package/dist/layouts/docs/page/index.d.ts.map +1 -1
- package/dist/layouts/docs/page/index.js +2 -2
- package/dist/layouts/docs/page/index.js.map +1 -1
- package/dist/layouts/docs/sidebar.d.ts +12 -12
- package/dist/layouts/docs/sidebar.d.ts.map +1 -1
- package/dist/layouts/home/client.d.ts +3 -3
- package/dist/layouts/home/index.d.ts +2 -2
- package/dist/layouts/home/navbar.d.ts +6 -6
- package/dist/layouts/home/navbar.d.ts.map +1 -1
- package/dist/layouts/notebook/client.d.ts +8 -8
- package/dist/layouts/notebook/client.d.ts.map +1 -1
- package/dist/layouts/notebook/index.d.ts +2 -2
- package/dist/layouts/notebook/index.d.ts.map +1 -1
- package/dist/layouts/notebook/page/client.d.ts +7 -7
- package/dist/layouts/notebook/page/index.d.ts +11 -6
- package/dist/layouts/notebook/page/index.d.ts.map +1 -1
- package/dist/layouts/notebook/page/index.js +2 -2
- package/dist/layouts/notebook/page/index.js.map +1 -1
- package/dist/layouts/notebook/sidebar.d.ts +17 -17
- package/dist/layouts/shared/index.d.ts +3 -3
- 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/tanstack.d.ts +2 -2
- package/dist/provider/waku.d.ts +2 -2
- package/package.json +4 -4
package/css/emerald.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '@fumadocs/ui/css/colors/emerald.css';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Accordion as Accordion$1, AccordionItem } from "./ui/accordion.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime12 from "react/jsx-runtime";
|
|
3
3
|
import { ComponentProps, ReactNode } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/accordion.d.ts
|
|
@@ -9,7 +9,7 @@ declare function Accordions({
|
|
|
9
9
|
className,
|
|
10
10
|
defaultValue,
|
|
11
11
|
...props
|
|
12
|
-
}: ComponentProps<typeof Accordion$1>):
|
|
12
|
+
}: ComponentProps<typeof Accordion$1>): react_jsx_runtime12.JSX.Element;
|
|
13
13
|
declare function Accordion({
|
|
14
14
|
title,
|
|
15
15
|
id,
|
|
@@ -19,7 +19,7 @@ declare function Accordion({
|
|
|
19
19
|
}: Omit<ComponentProps<typeof AccordionItem>, 'value' | 'title'> & {
|
|
20
20
|
title: string | ReactNode;
|
|
21
21
|
value?: string;
|
|
22
|
-
}):
|
|
22
|
+
}): react_jsx_runtime12.JSX.Element;
|
|
23
23
|
//#endregion
|
|
24
24
|
export { Accordion, Accordions };
|
|
25
25
|
//# sourceMappingURL=accordion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.d.ts","names":[],"sources":["../../src/components/accordion.tsx"],"sourcesContent":[],"mappings":";;;;;iBAgBgB,UAAA;;;;;;GAMb,sBAAsB,eAAK,
|
|
1
|
+
{"version":3,"file":"accordion.d.ts","names":[],"sources":["../../src/components/accordion.tsx"],"sourcesContent":[],"mappings":";;;;;iBAgBgB,UAAA;;;;;;GAMb,sBAAsB,eAAK,mBAAA,CAAA,GAAA,CAAA;iBAoCd,SAAA;;;;;;GAMb,KAAK,sBAAsB;kBACZ;EAjDF,KAAA,CAAA,EAAA,MAAU;CACxB,CAAA,EAkDD,mBAAA,CAAA,GAAA,CAAA,OAlDC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime14 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_runtime14.JSX.Element | null;
|
|
33
33
|
//#endregion
|
|
34
34
|
export { Banner };
|
|
35
35
|
//# sourceMappingURL=banner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"banner.d.ts","names":[],"sources":["../../src/components/banner.tsx"],"sourcesContent":[],"mappings":";;;;KAOK,aAAA;iBAEW,MAAA;;;;;;;GAYb,eAAe;;AAnB+C;AAOjE;EACE,MAAA,CAAA,EAAA,MAAA;EACA;;;EAGA,OAAA,CAAA,EAgBU,aAhBV;EAOgB;;;EAsBjB,aAAA,CAAA,EAAA,MAAA,EAAA;EAAA;;;;;;IAAA,
|
|
1
|
+
{"version":3,"file":"banner.d.ts","names":[],"sources":["../../src/components/banner.tsx"],"sourcesContent":[],"mappings":";;;;KAOK,aAAA;iBAEW,MAAA;;;;;;;GAYb,eAAe;;AAnB+C;AAOjE;EACE,MAAA,CAAA,EAAA,MAAA;EACA;;;EAGA,OAAA,CAAA,EAgBU,aAhBV;EAOgB;;;EAsBjB,aAAA,CAAA,EAAA,MAAA,EAAA;EAAA;;;;;;IAAA,mBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime15 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_runtime15.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_runtime15.JSX.Element;
|
|
31
31
|
declare function CalloutTitle({
|
|
32
32
|
children,
|
|
33
33
|
className,
|
|
34
34
|
...props
|
|
35
|
-
}: ComponentProps<'p'>):
|
|
35
|
+
}: ComponentProps<'p'>): react_jsx_runtime15.JSX.Element;
|
|
36
36
|
declare function CalloutDescription({
|
|
37
37
|
children,
|
|
38
38
|
className,
|
|
39
39
|
...props
|
|
40
|
-
}: ComponentProps<'p'>):
|
|
40
|
+
}: ComponentProps<'p'>): react_jsx_runtime15.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_runtime21 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_runtime21.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_runtime21.JSX.Element;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { Card, CardProps, Cards };
|
|
21
21
|
//# sourceMappingURL=card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.d.ts","names":[],"sources":["../../src/components/card.tsx"],"sourcesContent":[],"mappings":";;;;iBAIgB,KAAA,QAAa,eAAe,kBAAe,
|
|
1
|
+
{"version":3,"file":"card.d.ts","names":[],"sources":["../../src/components/card.tsx"],"sourcesContent":[],"mappings":";;;;iBAIgB,KAAA,QAAa,eAAe,kBAAe,mBAAA,CAAA,GAAA,CAAA;KAQ/C,SAAA,GAAY,KAAK,eAAe;SACnC;EATO,KAAA,EAUP,SAVY;EAAuB,WAAA,CAAA,EAW5B,SAX4B;EAAf,IAAA,CAAA,EAAA,MAAA;EAA8B,QAAA,CAAA,EAAA,OAAA;CAAA;AAQ/C,iBASI,IAAA,CATK;EAAA,IAAA;EAAA,KAAA;EAAA,WAAA;EAAA,GAAA;AAAA,CAAA,EASwC,SATxC,CAAA,EASiD,mBAAA,CAAA,GAAA,CAAA,OATjD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from "./ui/tabs.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime23 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_runtime23.JSX.Element;
|
|
40
40
|
declare function CodeBlock({
|
|
41
41
|
ref,
|
|
42
42
|
title,
|
|
@@ -47,17 +47,17 @@ declare function CodeBlock({
|
|
|
47
47
|
children,
|
|
48
48
|
Actions,
|
|
49
49
|
...props
|
|
50
|
-
}: CodeBlockProps):
|
|
50
|
+
}: CodeBlockProps): react_jsx_runtime23.JSX.Element;
|
|
51
51
|
declare function CodeBlockTabs({
|
|
52
52
|
ref,
|
|
53
53
|
...props
|
|
54
|
-
}: ComponentProps<typeof Tabs>):
|
|
55
|
-
declare function CodeBlockTabsList(props: ComponentProps<typeof TabsList>):
|
|
54
|
+
}: ComponentProps<typeof Tabs>): react_jsx_runtime23.JSX.Element;
|
|
55
|
+
declare function CodeBlockTabsList(props: ComponentProps<typeof TabsList>): react_jsx_runtime23.JSX.Element;
|
|
56
56
|
declare function CodeBlockTabsTrigger({
|
|
57
57
|
children,
|
|
58
58
|
...props
|
|
59
|
-
}: ComponentProps<typeof TabsTrigger>):
|
|
60
|
-
declare function CodeBlockTab(props: ComponentProps<typeof TabsContent>):
|
|
59
|
+
}: ComponentProps<typeof TabsTrigger>): react_jsx_runtime23.JSX.Element;
|
|
60
|
+
declare function CodeBlockTab(props: ComponentProps<typeof TabsContent>): react_jsx_runtime23.JSX.Element;
|
|
61
61
|
//#endregion
|
|
62
62
|
export { CodeBlock, CodeBlockProps, CodeBlockTab, CodeBlockTabs, CodeBlockTabsList, CodeBlockTabsTrigger, Pre };
|
|
63
63
|
//# 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_runtime35 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_runtime35.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_runtime32 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_runtime32.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_runtime34 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_runtime34.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_runtime77 from "react/jsx-runtime";
|
|
3
3
|
import { ComponentProps, ReactNode } from "react";
|
|
4
4
|
import { DialogContent, DialogOverlay } from "@radix-ui/react-dialog";
|
|
5
5
|
import { HighlightedText, ReactSortedResult } from "fumadocs-core/search";
|
|
@@ -28,20 +28,20 @@ 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_runtime77.JSX.Element;
|
|
32
|
+
declare function SearchDialogHeader(props: ComponentProps<'div'>): react_jsx_runtime77.JSX.Element;
|
|
33
|
+
declare function SearchDialogInput(props: ComponentProps<'input'>): react_jsx_runtime77.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'>):
|
|
40
|
-
declare function SearchDialogOverlay(props: ComponentProps<typeof DialogOverlay>):
|
|
38
|
+
}: ComponentProps<'button'>): react_jsx_runtime77.JSX.Element;
|
|
39
|
+
declare function SearchDialogFooter(props: ComponentProps<'div'>): react_jsx_runtime77.JSX.Element;
|
|
40
|
+
declare function SearchDialogOverlay(props: ComponentProps<typeof DialogOverlay>): react_jsx_runtime77.JSX.Element;
|
|
41
41
|
declare function SearchDialogContent({
|
|
42
42
|
children,
|
|
43
43
|
...props
|
|
44
|
-
}: ComponentProps<typeof DialogContent>):
|
|
44
|
+
}: ComponentProps<typeof DialogContent>): react_jsx_runtime77.JSX.Element;
|
|
45
45
|
declare function SearchDialogList({
|
|
46
46
|
items,
|
|
47
47
|
Empty,
|
|
@@ -60,7 +60,7 @@ declare function SearchDialogList({
|
|
|
60
60
|
item: SearchItemType;
|
|
61
61
|
onClick: () => void;
|
|
62
62
|
}) => ReactNode;
|
|
63
|
-
}):
|
|
63
|
+
}): react_jsx_runtime77.JSX.Element;
|
|
64
64
|
declare function SearchDialogListItem({
|
|
65
65
|
item,
|
|
66
66
|
className,
|
|
@@ -70,8 +70,8 @@ declare function SearchDialogListItem({
|
|
|
70
70
|
}: ComponentProps<'button'> & {
|
|
71
71
|
renderHighlights?: typeof renderHighlights;
|
|
72
72
|
item: SearchItemType;
|
|
73
|
-
}):
|
|
74
|
-
declare function SearchDialogIcon(props: ComponentProps<'svg'>):
|
|
73
|
+
}): react_jsx_runtime77.JSX.Element;
|
|
74
|
+
declare function SearchDialogIcon(props: ComponentProps<'svg'>): react_jsx_runtime77.JSX.Element;
|
|
75
75
|
interface TagsListProps extends ComponentProps<'div'> {
|
|
76
76
|
tag?: string;
|
|
77
77
|
onTagChange: (tag: string | undefined) => void;
|
|
@@ -82,14 +82,14 @@ declare function TagsList({
|
|
|
82
82
|
onTagChange,
|
|
83
83
|
allowClear,
|
|
84
84
|
...props
|
|
85
|
-
}: TagsListProps):
|
|
85
|
+
}: TagsListProps): react_jsx_runtime77.JSX.Element;
|
|
86
86
|
declare function TagsListItem({
|
|
87
87
|
value,
|
|
88
88
|
className,
|
|
89
89
|
...props
|
|
90
90
|
}: ComponentProps<'button'> & {
|
|
91
91
|
value: string;
|
|
92
|
-
}):
|
|
92
|
+
}): react_jsx_runtime77.JSX.Element;
|
|
93
93
|
declare function renderHighlights(highlights: HighlightedText<ReactNode>[]): ReactNode;
|
|
94
94
|
declare function useSearch(): {
|
|
95
95
|
open: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CodeBlockProps } from "./codeblock.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime29 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_runtime29.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_runtime19 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_runtime19.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_runtime39 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_runtime39.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_runtime20 from "react/jsx-runtime";
|
|
3
3
|
import { ComponentProps } from "react";
|
|
4
4
|
import { TOCItemType } from "fumadocs-core/toc";
|
|
5
5
|
|
|
@@ -10,7 +10,7 @@ interface InlineTocProps extends ComponentProps<typeof Collapsible> {
|
|
|
10
10
|
declare function InlineTOC({
|
|
11
11
|
items,
|
|
12
12
|
...props
|
|
13
|
-
}: InlineTocProps):
|
|
13
|
+
}: InlineTocProps): react_jsx_runtime20.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { InlineTOC, InlineTocProps };
|
|
16
16
|
//# sourceMappingURL=inline-toc.d.ts.map
|
|
@@ -7,7 +7,7 @@ import { ComponentProps, PointerEvent, ReactNode, RefObject } from "react";
|
|
|
7
7
|
|
|
8
8
|
//#region src/components/sidebar/base.d.ts
|
|
9
9
|
declare namespace base_d_exports {
|
|
10
|
-
export { SidebarCollapseTrigger, SidebarContent, SidebarDrawerContent, SidebarDrawerOverlay, SidebarFolder, SidebarFolderContent, SidebarFolderLink, SidebarFolderTrigger, SidebarItem, SidebarProvider, SidebarProviderProps, SidebarSeparator, SidebarTrigger, SidebarViewport, useFolder, useFolderDepth, useSidebar };
|
|
10
|
+
export { SidebarCollapseTrigger, SidebarContent, SidebarDrawerContent, SidebarDrawerOverlay, SidebarFolder, SidebarFolderContent, SidebarFolderLink, SidebarFolderTrigger, SidebarItem, SidebarProvider, SidebarProviderProps, SidebarSeparator, SidebarTrigger, SidebarViewport, useAutoScroll, useFolder, useFolderDepth, useSidebar };
|
|
11
11
|
}
|
|
12
12
|
interface SidebarContext {
|
|
13
13
|
open: boolean;
|
|
@@ -102,6 +102,10 @@ declare function SidebarTrigger({
|
|
|
102
102
|
...props
|
|
103
103
|
}: ComponentProps<'button'>): react_jsx_runtime41.JSX.Element;
|
|
104
104
|
declare function SidebarCollapseTrigger(props: ComponentProps<'button'>): react_jsx_runtime41.JSX.Element;
|
|
105
|
+
/**
|
|
106
|
+
* scroll to the element if `active` is true
|
|
107
|
+
*/
|
|
108
|
+
declare function useAutoScroll(active: boolean, ref: RefObject<HTMLElement | null>): void;
|
|
105
109
|
//#endregion
|
|
106
|
-
export { SidebarCollapseTrigger, SidebarContent, SidebarDrawerContent, SidebarDrawerOverlay, SidebarFolder, SidebarFolderContent, SidebarFolderLink, SidebarFolderTrigger, SidebarItem, SidebarProvider, SidebarProviderProps, SidebarSeparator, SidebarTrigger, SidebarViewport, base_d_exports, useFolder, useFolderDepth, useSidebar };
|
|
110
|
+
export { SidebarCollapseTrigger, SidebarContent, SidebarDrawerContent, SidebarDrawerOverlay, SidebarFolder, SidebarFolderContent, SidebarFolderLink, SidebarFolderTrigger, SidebarItem, SidebarProvider, SidebarProviderProps, SidebarSeparator, SidebarTrigger, SidebarViewport, base_d_exports, useAutoScroll, useFolder, useFolderDepth, useSidebar };
|
|
107
111
|
//# 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":";;;;;;;;;;;UA+BU,cAAA;;WAEC,KAAA,CAAM,SAAS,KAAA,CAAM;;gBAEhB,KAAA,CAAM,SAAS,KAAA,CAAM;;;;mBAKlB;;;QAGX;;UAGS,oBAAA;;;;;;;;;;;;EAfP,QAAA,CAAA,EA6BG,SA7BW;;KAgCnB,IAAA,GA9BY,QAAA,GAAA,MAAA;cAgCX,cA9B+B,EA8BjB,MAAA,CAAA,OA9BiB,CA8BjB,cA9BiB,GAAA,IAAA,CAAA;AAAf,iBAuCN,eAAA,CAvCM;EAAA,gBAAA;EAAA,QAAA;EAAA;AAAA,CAAA,EA2CnB,oBA3CmB,CAAA,EA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D,WA5I3D,GAAA,IAAA,CAAA,CAAA,EAAA,IAAA"}
|
|
@@ -243,6 +243,9 @@ function SidebarCollapseTrigger(props) {
|
|
|
243
243
|
children: props.children
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
|
+
/**
|
|
247
|
+
* scroll to the element if `active` is true
|
|
248
|
+
*/
|
|
246
249
|
function useAutoScroll(active, ref) {
|
|
247
250
|
const { mode } = useSidebar();
|
|
248
251
|
useEffect(() => {
|
|
@@ -258,5 +261,5 @@ function useAutoScroll(active, ref) {
|
|
|
258
261
|
}
|
|
259
262
|
|
|
260
263
|
//#endregion
|
|
261
|
-
export { SidebarCollapseTrigger, SidebarContent, SidebarDrawerContent, SidebarDrawerOverlay, SidebarFolder, SidebarFolderContent, SidebarFolderLink, SidebarFolderTrigger, SidebarItem, SidebarProvider, SidebarSeparator, SidebarTrigger, SidebarViewport, useFolder, useFolderDepth, useSidebar };
|
|
264
|
+
export { SidebarCollapseTrigger, SidebarContent, SidebarDrawerContent, SidebarDrawerOverlay, SidebarFolder, SidebarFolderContent, SidebarFolderLink, SidebarFolderTrigger, SidebarItem, SidebarProvider, SidebarSeparator, SidebarTrigger, SidebarViewport, useAutoScroll, useFolder, useFolderDepth, useSidebar };
|
|
262
265
|
//# sourceMappingURL=base.js.map
|
|
@@ -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 { Presence } from '@radix-ui/react-presence';\nimport scrollIntoView from 'scroll-into-view-if-needed';\nimport { usePathname } from 'fumadocs-core/framework';\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\n if (mode !== 'drawer') return;\n return (\n <Presence present={open}>\n <div data-state={open ? 'open' : 'closed'} onClick={() => setOpen(false)} {...props} />\n </Presence>\n );\n}\n\nexport function SidebarDrawerContent({ className, children, ...props }: ComponentProps<'aside'>) {\n const { open, mode } = useSidebar();\n const state = open ? 'open' : 'closed';\n\n if (mode !== 'drawer') return;\n return (\n <Presence present={open}>\n {({ present }) => (\n <aside\n id=\"nd-sidebar-mobile\"\n data-state={state}\n className={cn(!present && 'invisible', className)}\n {...props}\n >\n {children}\n </aside>\n )}\n </Presence>\n );\n}\n\nexport function SidebarViewport(props: ScrollAreaProps) {\n return (\n <ScrollArea {...props} className={cn('min-h-0 flex-1', props.className)}>\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":";;;;;;;;;;;;;;;;;AAiEA,MAAM,iBAAiB,cAAqC,KAAK;AAEjE,MAAM,gBAAgB,cAKZ,KAAK;AAEf,SAAgB,gBAAgB,EAC9B,mBAAmB,GACnB,UACA,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,EAAE;AAE1B,aAAY,iBAAiB;AAC3B,MAAI,UAAW,UAAS,MAAM;GAC9B;AAEF,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B,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 { Presence } from '@radix-ui/react-presence';\nimport scrollIntoView from 'scroll-into-view-if-needed';\nimport { usePathname } from 'fumadocs-core/framework';\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\n if (mode !== 'drawer') return;\n return (\n <Presence present={open}>\n <div data-state={open ? 'open' : 'closed'} onClick={() => setOpen(false)} {...props} />\n </Presence>\n );\n}\n\nexport function SidebarDrawerContent({ className, children, ...props }: ComponentProps<'aside'>) {\n const { open, mode } = useSidebar();\n const state = open ? 'open' : 'closed';\n\n if (mode !== 'drawer') return;\n return (\n <Presence present={open}>\n {({ present }) => (\n <aside\n id=\"nd-sidebar-mobile\"\n data-state={state}\n className={cn(!present && 'invisible', className)}\n {...props}\n >\n {children}\n </aside>\n )}\n </Presence>\n );\n}\n\nexport function SidebarViewport(props: ScrollAreaProps) {\n return (\n <ScrollArea {...props} className={cn('min-h-0 flex-1', props.className)}>\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\n/**\n * scroll to the element if `active` is true\n */\nexport function useAutoScroll(active: boolean, ref: RefObject<HTMLElement | 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":";;;;;;;;;;;;;;;;;AAiEA,MAAM,iBAAiB,cAAqC,KAAK;AAEjE,MAAM,gBAAgB,cAKZ,KAAK;AAEf,SAAgB,gBAAgB,EAC9B,mBAAmB,GACnB,UACA,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;GA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,GAAG,SAAmC;CAC/E,MAAM,EAAE,YAAY,YAAY;AAEhC,QACE,oBAAC;EAAO,cAAW;EAAe,eAAe,SAAS,SAAS,CAAC,KAAK;EAAE,GAAI;EAC5E;GACM;;AAIb,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;;;;;AAOb,SAAgB,cAAc,QAAiB,KAAoC;CACjF,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,5 +1,5 @@
|
|
|
1
1
|
import { base_d_exports } from "./base.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime40 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_runtime40.JSX.Element;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { createLinkItemRenderer };
|
|
24
24
|
//# sourceMappingURL=link-item.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link-item.d.ts","names":[],"sources":["../../../src/components/sidebar/link-item.tsx"],"sourcesContent":[],"mappings":";;;;;;KAIK,kBAAA,GAAqB,YACjB;iBAQO,sBAAA;;;;;;GAMb;;;GAOE,eAAe;QACV,QAAQ;IAvBb,IAAA,EAAA,MAAA;EASW,CAAA,CAAA;CACd,EAAA,GAcC,
|
|
1
|
+
{"version":3,"file":"link-item.d.ts","names":[],"sources":["../../../src/components/sidebar/link-item.tsx"],"sourcesContent":[],"mappings":";;;;;;KAIK,kBAAA,GAAqB,YACjB;iBAQO,sBAAA;;;;;;GAMb;;;GAOE,eAAe;QACV,QAAQ;IAvBb,IAAA,EAAA,MAAA;EASW,CAAA,CAAA;CACd,EAAA,GAcC,mBAAA,CAAA,GAAA,CAAA,OAdD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { base_d_exports } from "./base.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime53 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_runtime53.JSX.Element;
|
|
28
28
|
//#endregion
|
|
29
29
|
export { SidebarPageTreeComponents, createPageTreeRenderer };
|
|
30
30
|
//# sourceMappingURL=page-tree.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime10 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_runtime10.JSX.Element;
|
|
10
10
|
declare function Step({
|
|
11
11
|
children
|
|
12
12
|
}: {
|
|
13
13
|
children: ReactNode;
|
|
14
|
-
}):
|
|
14
|
+
}): react_jsx_runtime10.JSX.Element;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { Step, Steps };
|
|
17
17
|
//# sourceMappingURL=steps.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Tabs as Tabs$1, TabsContent as TabsContent$1 } from "./ui/tabs.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime138 from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { ComponentProps, ReactNode } from "react";
|
|
5
5
|
import * as _radix_ui_react_tabs0 from "@radix-ui/react-tabs";
|
|
@@ -31,7 +31,7 @@ declare function Tabs({
|
|
|
31
31
|
defaultIndex,
|
|
32
32
|
defaultValue,
|
|
33
33
|
...props
|
|
34
|
-
}: TabsProps):
|
|
34
|
+
}: TabsProps): react_jsx_runtime138.JSX.Element;
|
|
35
35
|
interface TabProps extends Omit<ComponentProps<typeof TabsContent$1>, 'value'> {
|
|
36
36
|
/**
|
|
37
37
|
* Value of tab, detect from index if unspecified.
|
|
@@ -41,12 +41,12 @@ interface TabProps extends Omit<ComponentProps<typeof TabsContent$1>, 'value'> {
|
|
|
41
41
|
declare function Tab({
|
|
42
42
|
value,
|
|
43
43
|
...props
|
|
44
|
-
}: TabProps):
|
|
44
|
+
}: TabProps): react_jsx_runtime138.JSX.Element;
|
|
45
45
|
declare function TabsContent({
|
|
46
46
|
value,
|
|
47
47
|
className,
|
|
48
48
|
...props
|
|
49
|
-
}: ComponentProps<typeof TabsContent$1>):
|
|
49
|
+
}: ComponentProps<typeof TabsContent$1>): react_jsx_runtime138.JSX.Element;
|
|
50
50
|
//#endregion
|
|
51
51
|
export { Tab, TabProps, Tabs, TabsContent, TabsList, TabsProps, TabsTrigger };
|
|
52
52
|
//# sourceMappingURL=tabs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.d.ts","names":[],"sources":["../../src/components/tabs.tsx"],"sourcesContent":[],"mappings":";;;;;;;UAkBiB,SAAA,SAAkB,KACjC,sBAAsB;;;;EADP,KAAA,CAAA,EAAA,MAAU,EAAA;EACH;;;;;EAgCX,YAYX,CAAA,EAAA,MAAA;EAAA;;;EAZmB,KAAA,CAAA,EAdX,SAcW;;AAAA,cAAR,QAAQ,EAAA,KAAA,CAAA,yBAAA,CAAA,IAAA,CAYnB,qBAAA,CAZmB,aAAA,GAAA,KAAA,CAAA,aAAA,CAAA,cAAA,CAAA,EAAA,KAAA,CAAA,GAAA,KAAA,CAAA,aAAA,CAAA,cAAA,CAAA,CAAA;AAAA,cAeR,WAfQ,EAeG,KAAA,CAAA,yBAfH,CAeG,IAfH,CA2BnB,qBAAA,CAZsB,gBAAA,GAAA,KAAA,CAAA,aAfH,CAeG,iBAfH,CAAA,EAAA,KAAA,CAAA,GAeG,KAAA,CAAA,aAfH,CAeG,iBAfH,CAAA,CAAA;AAAA,iBA8BL,IAAA,CA9BK;EAAA,GAAA;EAAA,SAAA;EAAA,KAAA;EAAA,KAAA;EAAA,YAAA;EAAA,YAAA;EAAA,GAAA;AAAA,CAAA,EAsClB,SAtCkB,CAAA,EAsCT,
|
|
1
|
+
{"version":3,"file":"tabs.d.ts","names":[],"sources":["../../src/components/tabs.tsx"],"sourcesContent":[],"mappings":";;;;;;;UAkBiB,SAAA,SAAkB,KACjC,sBAAsB;;;;EADP,KAAA,CAAA,EAAA,MAAU,EAAA;EACH;;;;;EAgCX,YAYX,CAAA,EAAA,MAAA;EAAA;;;EAZmB,KAAA,CAAA,EAdX,SAcW;;AAAA,cAAR,QAAQ,EAAA,KAAA,CAAA,yBAAA,CAAA,IAAA,CAYnB,qBAAA,CAZmB,aAAA,GAAA,KAAA,CAAA,aAAA,CAAA,cAAA,CAAA,EAAA,KAAA,CAAA,GAAA,KAAA,CAAA,aAAA,CAAA,cAAA,CAAA,CAAA;AAAA,cAeR,WAfQ,EAeG,KAAA,CAAA,yBAfH,CAeG,IAfH,CA2BnB,qBAAA,CAZsB,gBAAA,GAAA,KAAA,CAAA,aAfH,CAeG,iBAfH,CAAA,EAAA,KAAA,CAAA,GAeG,KAAA,CAAA,aAfH,CAeG,iBAfH,CAAA,CAAA;AAAA,iBA8BL,IAAA,CA9BK;EAAA,GAAA;EAAA,SAAA;EAAA,KAAA;EAAA,KAAA;EAAA,YAAA;EAAA,YAAA;EAAA,GAAA;AAAA,CAAA,EAsClB,SAtCkB,CAAA,EAsCT,oBAAA,CAAA,GAAA,CAAA,OAtCS;AAeR,UA0DI,QAAA,SAAiB,IA9ChC,CA8CqC,cA9CrC,CAAA,OA8C2D,aA9C3D,CAAA,EAAA,OAAA,CAAA,CAAA;EAAA;;;EAZsB,KAAA,CAAA,EAAA,MAAA;;AAAA,iBAiER,GAAA,CAjEQ;EAAA,KAAA;EAAA,GAAA;AAAA,CAAA,EAiEiB,QAjEjB,CAAA,EAiEyB,oBAAA,CAAA,GAAA,CAAA,OAjEzB;AAAA,iBAmFR,WAAA,CAnFQ;EAAA,KAAA;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAuFrB,cAvFqB,CAAA,OAuFC,aAvFD,CAAA,CAAA,EAuFsB,oBAAA,CAAA,GAAA,CAAA,OAvFtB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime30 from "react/jsx-runtime";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/type-table.d.ts
|
|
@@ -33,7 +33,7 @@ declare function TypeTable({
|
|
|
33
33
|
type
|
|
34
34
|
}: {
|
|
35
35
|
type: Record<string, TypeNode>;
|
|
36
|
-
}):
|
|
36
|
+
}): react_jsx_runtime30.JSX.Element;
|
|
37
37
|
//#endregion
|
|
38
38
|
export { ParameterNode, TypeNode, TypeTable };
|
|
39
39
|
//# sourceMappingURL=type-table.d.ts.map
|