fumadocs-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.
Files changed (68) hide show
  1. package/dist/components/accordion.d.ts +3 -3
  2. package/dist/components/accordion.d.ts.map +1 -1
  3. package/dist/components/banner.d.ts +2 -2
  4. package/dist/components/banner.d.ts.map +1 -1
  5. package/dist/components/callout.d.ts +5 -5
  6. package/dist/components/card.d.ts +3 -3
  7. package/dist/components/card.d.ts.map +1 -1
  8. package/dist/components/codeblock.d.ts +7 -7
  9. package/dist/components/dialog/search-algolia.d.ts +2 -2
  10. package/dist/components/dialog/search-default.d.ts +2 -2
  11. package/dist/components/dialog/search-orama.d.ts +2 -2
  12. package/dist/components/dialog/search.d.ts +13 -13
  13. package/dist/components/dynamic-codeblock.d.ts +2 -2
  14. package/dist/components/github-info.d.ts +2 -2
  15. package/dist/components/image-zoom.d.ts +2 -2
  16. package/dist/components/image-zoom.d.ts.map +1 -1
  17. package/dist/components/inline-toc.d.ts +2 -2
  18. package/dist/components/sidebar/base.d.ts +17 -19
  19. package/dist/components/sidebar/base.d.ts.map +1 -1
  20. package/dist/components/sidebar/base.js +1 -1
  21. package/dist/components/sidebar/base.js.map +1 -1
  22. package/dist/components/sidebar/link-item.d.ts +2 -2
  23. package/dist/components/sidebar/link-item.d.ts.map +1 -1
  24. package/dist/components/sidebar/page-tree.d.ts +2 -2
  25. package/dist/components/sidebar/tabs/dropdown.d.ts +2 -2
  26. package/dist/components/sidebar/tabs/dropdown.d.ts.map +1 -1
  27. package/dist/components/steps.d.ts +3 -3
  28. package/dist/components/tabs.d.ts +4 -4
  29. package/dist/components/type-table.d.ts +2 -2
  30. package/dist/components/ui/accordion.d.ts +6 -6
  31. package/dist/components/ui/accordion.d.ts.map +1 -1
  32. package/dist/components/ui/tabs.d.ts +3 -3
  33. package/dist/layouts/docs/client.d.ts +7 -7
  34. package/dist/layouts/docs/client.d.ts.map +1 -1
  35. package/dist/layouts/docs/index.d.ts +2 -2
  36. package/dist/layouts/docs/index.d.ts.map +1 -1
  37. package/dist/layouts/docs/page/client.d.ts +7 -7
  38. package/dist/layouts/docs/page/client.d.ts.map +1 -1
  39. package/dist/layouts/docs/page/index.d.ts +5 -5
  40. package/dist/layouts/docs/sidebar.d.ts +12 -12
  41. package/dist/layouts/home/client.d.ts +2 -2
  42. package/dist/layouts/home/client.d.ts.map +1 -1
  43. package/dist/layouts/home/index.d.ts +2 -2
  44. package/dist/layouts/home/index.d.ts.map +1 -1
  45. package/dist/layouts/home/navbar.d.ts +6 -6
  46. package/dist/layouts/home/navbar.d.ts.map +1 -1
  47. package/dist/layouts/notebook/client.d.ts +8 -8
  48. package/dist/layouts/notebook/client.d.ts.map +1 -1
  49. package/dist/layouts/notebook/index.d.ts +2 -2
  50. package/dist/layouts/notebook/page/client.d.ts +7 -7
  51. package/dist/layouts/notebook/page/index.d.ts +5 -5
  52. package/dist/layouts/notebook/page/index.d.ts.map +1 -1
  53. package/dist/layouts/notebook/sidebar.d.ts +17 -17
  54. package/dist/layouts/shared/index.d.ts +3 -3
  55. package/dist/layouts/shared/index.d.ts.map +1 -1
  56. package/dist/layouts/shared/language-toggle.d.ts +2 -2
  57. package/dist/layouts/shared/language-toggle.d.ts.map +1 -1
  58. package/dist/layouts/shared/search-toggle.d.ts +3 -3
  59. package/dist/layouts/shared/theme-toggle.d.ts +2 -2
  60. package/dist/layouts/shared/theme-toggle.d.ts.map +1 -1
  61. package/dist/mdx.d.ts +10 -10
  62. package/dist/page.d.ts +3 -3
  63. package/dist/provider/base.d.ts +2 -2
  64. package/dist/provider/next.d.ts +2 -2
  65. package/dist/provider/react-router.d.ts +2 -2
  66. package/dist/provider/tanstack.d.ts +2 -2
  67. package/dist/provider/waku.d.ts +2 -2
  68. package/package.json +4 -4
@@ -1,5 +1,5 @@
1
1
  import { Accordion as Accordion$1, AccordionItem } from "./ui/accordion.js";
2
- import * as react_jsx_runtime20 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime130 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>): react_jsx_runtime20.JSX.Element;
12
+ }: ComponentProps<typeof Accordion$1>): react_jsx_runtime130.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
- }): react_jsx_runtime20.JSX.Element;
22
+ }): react_jsx_runtime130.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,mBAAA,CAAA,GAAA,CAAA;iBAoCd,SAAA;;;;;;GAMb,KAAK,sBAAsB;kBACZ;EAjDF,KAAA,CAAA,EAAA,MAAU;CACxB,CAAA,EAkDD,mBAAA,CAAA,GAAA,CAAA,OAlDC"}
1
+ {"version":3,"file":"accordion.d.ts","names":[],"sources":["../../src/components/accordion.tsx"],"sourcesContent":[],"mappings":";;;;;iBAgBgB,UAAA;;;;;;GAMb,sBAAsB,eAAK,oBAAA,CAAA,GAAA,CAAA;iBAoCd,SAAA;;;;;;GAMb,KAAK,sBAAsB;kBACZ;EAjDF,KAAA,CAAA,EAAA,MAAU;CACxB,CAAA,EAkDD,oBAAA,CAAA,GAAA,CAAA,OAlDC"}
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime23 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime121 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
- }): react_jsx_runtime23.JSX.Element | null;
32
+ }): react_jsx_runtime121.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,mBAAA,CAAA,GAAA,CAAA,OAAA"}
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,oBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime24 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime19 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'>): react_jsx_runtime24.JSX.Element;
12
+ } & Omit<CalloutContainerProps, 'title'>): react_jsx_runtime19.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): react_jsx_runtime24.JSX.Element;
30
+ }: CalloutContainerProps): react_jsx_runtime19.JSX.Element;
31
31
  declare function CalloutTitle({
32
32
  children,
33
33
  className,
34
34
  ...props
35
- }: ComponentProps<'p'>): react_jsx_runtime24.JSX.Element;
35
+ }: ComponentProps<'p'>): react_jsx_runtime19.JSX.Element;
36
36
  declare function CalloutDescription({
37
37
  children,
38
38
  className,
39
39
  ...props
40
- }: ComponentProps<'p'>): react_jsx_runtime24.JSX.Element;
40
+ }: ComponentProps<'p'>): react_jsx_runtime19.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 react_jsx_runtime28 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime9 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>): react_jsx_runtime28.JSX.Element;
5
+ declare function Cards(props: HTMLAttributes<HTMLDivElement>): react_jsx_runtime9.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): react_jsx_runtime28.JSX.Element;
18
+ }: CardProps): react_jsx_runtime9.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,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
+ {"version":3,"file":"card.d.ts","names":[],"sources":["../../src/components/card.tsx"],"sourcesContent":[],"mappings":";;;;iBAIgB,KAAA,QAAa,eAAe,kBAAe,kBAAA,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,kBAAA,CAAA,GAAA,CAAA,OATjD"}
@@ -1,5 +1,5 @@
1
1
  import { Tabs, TabsContent, TabsList, TabsTrigger } from "./ui/tabs.js";
2
- import * as react_jsx_runtime34 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime11 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'>): react_jsx_runtime34.JSX.Element;
39
+ declare function Pre(props: ComponentProps<'pre'>): react_jsx_runtime11.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): react_jsx_runtime34.JSX.Element;
50
+ }: CodeBlockProps): react_jsx_runtime11.JSX.Element;
51
51
  declare function CodeBlockTabs({
52
52
  ref,
53
53
  ...props
54
- }: ComponentProps<typeof Tabs>): react_jsx_runtime34.JSX.Element;
55
- declare function CodeBlockTabsList(props: ComponentProps<typeof TabsList>): react_jsx_runtime34.JSX.Element;
54
+ }: ComponentProps<typeof Tabs>): react_jsx_runtime11.JSX.Element;
55
+ declare function CodeBlockTabsList(props: ComponentProps<typeof TabsList>): react_jsx_runtime11.JSX.Element;
56
56
  declare function CodeBlockTabsTrigger({
57
57
  children,
58
58
  ...props
59
- }: ComponentProps<typeof TabsTrigger>): react_jsx_runtime34.JSX.Element;
60
- declare function CodeBlockTab(props: ComponentProps<typeof TabsContent>): react_jsx_runtime34.JSX.Element;
59
+ }: ComponentProps<typeof TabsTrigger>): react_jsx_runtime11.JSX.Element;
60
+ declare function CodeBlockTab(props: ComponentProps<typeof TabsContent>): react_jsx_runtime11.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 react_jsx_runtime71 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime38 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): react_jsx_runtime71.JSX.Element;
36
+ }: AlgoliaSearchDialogProps): react_jsx_runtime38.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 react_jsx_runtime69 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime39 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): react_jsx_runtime69.JSX.Element;
41
+ }: DefaultSearchDialogProps): react_jsx_runtime39.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 react_jsx_runtime86 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime40 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): react_jsx_runtime86.JSX.Element;
43
+ }: OramaSearchDialogProps): react_jsx_runtime40.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 react_jsx_runtime72 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime53 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): react_jsx_runtime72.JSX.Element;
32
- declare function SearchDialogHeader(props: ComponentProps<'div'>): react_jsx_runtime72.JSX.Element;
33
- declare function SearchDialogInput(props: ComponentProps<'input'>): react_jsx_runtime72.JSX.Element;
31
+ }: SearchDialogProps): react_jsx_runtime53.JSX.Element;
32
+ declare function SearchDialogHeader(props: ComponentProps<'div'>): react_jsx_runtime53.JSX.Element;
33
+ declare function SearchDialogInput(props: ComponentProps<'input'>): react_jsx_runtime53.JSX.Element;
34
34
  declare function SearchDialogClose({
35
35
  children,
36
36
  className,
37
37
  ...props
38
- }: ComponentProps<'button'>): react_jsx_runtime72.JSX.Element;
39
- declare function SearchDialogFooter(props: ComponentProps<'div'>): react_jsx_runtime72.JSX.Element;
40
- declare function SearchDialogOverlay(props: ComponentProps<typeof DialogOverlay>): react_jsx_runtime72.JSX.Element;
38
+ }: ComponentProps<'button'>): react_jsx_runtime53.JSX.Element;
39
+ declare function SearchDialogFooter(props: ComponentProps<'div'>): react_jsx_runtime53.JSX.Element;
40
+ declare function SearchDialogOverlay(props: ComponentProps<typeof DialogOverlay>): react_jsx_runtime53.JSX.Element;
41
41
  declare function SearchDialogContent({
42
42
  children,
43
43
  ...props
44
- }: ComponentProps<typeof DialogContent>): react_jsx_runtime72.JSX.Element;
44
+ }: ComponentProps<typeof DialogContent>): react_jsx_runtime53.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
- }): react_jsx_runtime72.JSX.Element;
63
+ }): react_jsx_runtime53.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
- }): react_jsx_runtime72.JSX.Element;
74
- declare function SearchDialogIcon(props: ComponentProps<'svg'>): react_jsx_runtime72.JSX.Element;
73
+ }): react_jsx_runtime53.JSX.Element;
74
+ declare function SearchDialogIcon(props: ComponentProps<'svg'>): react_jsx_runtime53.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): react_jsx_runtime72.JSX.Element;
85
+ }: TagsListProps): react_jsx_runtime53.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
- }): react_jsx_runtime72.JSX.Element;
92
+ }): react_jsx_runtime53.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 react_jsx_runtime40 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime17 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): react_jsx_runtime40.JSX.Element;
29
+ }: DynamicCodeblockProps): react_jsx_runtime17.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 react_jsx_runtime41 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime18 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<react_jsx_runtime41.JSX.Element>;
16
+ }): Promise<react_jsx_runtime18.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 react_jsx_runtime3 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime25 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): react_jsx_runtime3.JSX.Element;
22
+ }: ImageZoomProps): react_jsx_runtime25.JSX.Element;
23
23
  //#endregion
24
24
  export { ImageZoom, ImageZoomProps };
25
25
  //# sourceMappingURL=image-zoom.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"image-zoom.d.ts","names":[],"sources":["../../src/components/image-zoom.tsx"],"sourcesContent":[],"mappings":";;;;;;KAOY,cAAA,GAAiB;;AAA7B;;EAIgB,WAAA,CAAA,EAAA,cAAA,CAAA,KAAA,CAAA;EAKP;;AAeT;EAA4B,IAAA,CAAA,EAfnB,iBAemB;CAAa;AAAU,iBAAnC,SAAA,CAAmC;EAAA,WAAA;EAAA,QAAA;EAAA,IAAA;EAAA,GAAA;AAAA,CAAA,EAAkB,cAAlB,CAAA,EAAgC,kBAAA,CAAA,GAAA,CAAA,OAAhC"}
1
+ {"version":3,"file":"image-zoom.d.ts","names":[],"sources":["../../src/components/image-zoom.tsx"],"sourcesContent":[],"mappings":";;;;;;KAOY,cAAA,GAAiB;;AAA7B;;EAIgB,WAAA,CAAA,EAAA,cAAA,CAAA,KAAA,CAAA;EAKP;;AAeT;EAA4B,IAAA,CAAA,EAfnB,iBAemB;CAAa;AAAU,iBAAnC,SAAA,CAAmC;EAAA,WAAA;EAAA,QAAA;EAAA,IAAA;EAAA,GAAA;AAAA,CAAA,EAAkB,cAAlB,CAAA,EAAgC,mBAAA,CAAA,GAAA,CAAA,OAAhC"}
@@ -1,5 +1,5 @@
1
1
  import { Collapsible } from "./ui/collapsible.js";
2
- import * as react_jsx_runtime44 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime28 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): react_jsx_runtime44.JSX.Element;
13
+ }: InlineTocProps): react_jsx_runtime28.JSX.Element;
14
14
  //#endregion
15
15
  export { InlineTOC, InlineTocProps };
16
16
  //# 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 react_jsx_runtime87 from "react/jsx-runtime";
5
- import * as react15 from "react";
4
+ import * as react_jsx_runtime41 from "react/jsx-runtime";
5
+ import * as react0 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: boolean;
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: react15.Context<SidebarContext | null>;
40
+ declare const SidebarContext: react0.Context<SidebarContext | null>;
43
41
  declare function SidebarProvider({
44
42
  defaultOpenLevel,
45
43
  prefetch,
46
44
  children
47
- }: SidebarProviderProps): react_jsx_runtime87.JSX.Element;
45
+ }: SidebarProviderProps): react_jsx_runtime41.JSX.Element;
48
46
  declare function useSidebar(): SidebarContext;
49
47
  declare function useFolder(): {
50
48
  open: boolean;
@@ -64,21 +62,21 @@ declare function SidebarContent({
64
62
  onPointerLeave: (event: PointerEvent) => void;
65
63
  }) => ReactNode;
66
64
  }): ReactNode;
67
- declare function SidebarDrawerOverlay(props: ComponentProps<'div'>): react_jsx_runtime87.JSX.Element | undefined;
65
+ declare function SidebarDrawerOverlay(props: ComponentProps<'div'>): react_jsx_runtime41.JSX.Element | undefined;
68
66
  declare function SidebarDrawerContent({
69
67
  className,
70
68
  children,
71
69
  ...props
72
- }: ComponentProps<'aside'>): react_jsx_runtime87.JSX.Element | undefined;
73
- declare function SidebarViewport(props: ScrollAreaProps): react_jsx_runtime87.JSX.Element;
74
- declare function SidebarSeparator(props: ComponentProps<'p'>): react_jsx_runtime87.JSX.Element;
70
+ }: ComponentProps<'aside'>): react_jsx_runtime41.JSX.Element | undefined;
71
+ declare function SidebarViewport(props: ScrollAreaProps): react_jsx_runtime41.JSX.Element;
72
+ declare function SidebarSeparator(props: ComponentProps<'p'>): react_jsx_runtime41.JSX.Element;
75
73
  declare function SidebarItem({
76
74
  icon,
77
75
  children,
78
76
  ...props
79
77
  }: LinkProps & {
80
78
  icon?: ReactNode;
81
- }): react_jsx_runtime87.JSX.Element;
79
+ }): react_jsx_runtime41.JSX.Element;
82
80
  declare function SidebarFolder({
83
81
  defaultOpen: defaultOpenProp,
84
82
  collapsible,
@@ -89,21 +87,21 @@ declare function SidebarFolder({
89
87
  active?: boolean;
90
88
  defaultOpen?: boolean;
91
89
  collapsible?: boolean;
92
- }): react_jsx_runtime87.JSX.Element;
90
+ }): react_jsx_runtime41.JSX.Element;
93
91
  declare function SidebarFolderTrigger({
94
92
  children,
95
93
  ...props
96
- }: CollapsibleTriggerProps): react_jsx_runtime87.JSX.Element;
94
+ }: CollapsibleTriggerProps): react_jsx_runtime41.JSX.Element;
97
95
  declare function SidebarFolderLink({
98
96
  children,
99
97
  ...props
100
- }: LinkProps): react_jsx_runtime87.JSX.Element;
101
- declare function SidebarFolderContent(props: CollapsibleContentProps): react_jsx_runtime87.JSX.Element;
98
+ }: LinkProps): react_jsx_runtime41.JSX.Element;
99
+ declare function SidebarFolderContent(props: CollapsibleContentProps): react_jsx_runtime41.JSX.Element;
102
100
  declare function SidebarTrigger({
103
101
  children,
104
102
  ...props
105
- }: ComponentProps<'button'>): react_jsx_runtime87.JSX.Element;
106
- declare function SidebarCollapseTrigger(props: ComponentProps<'button'>): react_jsx_runtime87.JSX.Element;
103
+ }: ComponentProps<'button'>): react_jsx_runtime41.JSX.Element;
104
+ declare function SidebarCollapseTrigger(props: ComponentProps<'button'>): react_jsx_runtime41.JSX.Element;
107
105
  //#endregion
108
106
  export { SidebarCollapseTrigger, SidebarContent, SidebarDrawerContent, SidebarDrawerOverlay, SidebarFolder, SidebarFolderContent, SidebarFolderLink, SidebarFolderTrigger, SidebarItem, SidebarProvider, SidebarProviderProps, SidebarSeparator, SidebarTrigger, SidebarViewport, base_d_exports, useFolder, useFolderDepth, useSidebar };
109
107
  //# 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,oB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GAAA;AAAA,CAAA,EA6GlC,uBA7GkC,CAAA,EA6GX,mBAAA,CAAA,GAAA,CAAA,OA7GW;AAAA,iBA+H/E,iBAAA,CA/H+E;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EA+HrC,SA/HqC,CAAA,EA+H5B,mBAAA,CAAA,GAAA,CAAA,OA/H4B;AAqB/E,iBA+IA,oBAAA,CA/IuB,KAAA,EA+IK,uBA/IU,CAAA,EA+Ia,mBAAA,CAAA,GAAA,CAAA,OA/Ib;AAkBtC,iBAiIA,cAAA,CAjIwB;EAAA,QAAA;EAAmB,GAAA;AAAA,CAAA,EAiIJ,cAjII,CAAA,QAAA,CAAA,CAAA,EAiIoB,mBAAA,CAAA,GAAA,CAAA,OAjIpB;AAgB3C,iBA2HA,sBAAA,CA3HW,KAAA,EA2HmB,cA3HnB,CAAA,QAAA,CAAA,CAAA,EA2H2C,mBAAA,CAAA,GAAA,CAAA,OA3H3C"}
@@ -17,7 +17,7 @@ import scrollIntoView from "scroll-into-view-if-needed";
17
17
  //#region src/components/sidebar/base.tsx
18
18
  const SidebarContext = createContext(null);
19
19
  const FolderContext = createContext(null);
20
- function SidebarProvider({ defaultOpenLevel = 0, prefetch = true, children }) {
20
+ function SidebarProvider({ defaultOpenLevel = 0, prefetch, children }) {
21
21
  const closeOnRedirect = useRef(true);
22
22
  const [open, setOpen] = useState(false);
23
23
  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 { 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\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\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":";;;;;;;;;;;;;;;;;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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AAI,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 { 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;GAC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AAM;GAA8B;;AAG7E,SAAgB,eAAe,EAAE,UAAU,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;;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,5 +1,5 @@
1
1
  import { base_d_exports } from "./base.js";
2
- import * as react_jsx_runtime85 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime106 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
- }) => react_jsx_runtime85.JSX.Element;
21
+ }) => react_jsx_runtime106.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,mBAAA,CAAA,GAAA,CAAA,OAdD"}
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,oBAAA,CAAA,GAAA,CAAA,OAdD"}
@@ -1,5 +1,5 @@
1
1
  import { base_d_exports } from "./base.js";
2
- import * as react_jsx_runtime84 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime66 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>) => react_jsx_runtime84.JSX.Element;
27
+ }: InternalComponents): (components: Partial<SidebarPageTreeComponents>) => react_jsx_runtime66.JSX.Element;
28
28
  //#endregion
29
29
  export { SidebarPageTreeComponents, createPageTreeRenderer };
30
30
  //# sourceMappingURL=page-tree.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { SidebarTab } from "./index.js";
2
- import * as react_jsx_runtime45 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime120 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'>): react_jsx_runtime45.JSX.Element;
16
+ } & ComponentProps<'button'>): react_jsx_runtime120.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,mBAAA,CAAA,GAAA,CAAA,OAL1B;AAGc,iBAkFA,WAAA,CAlFA,GAAA,EAkFiB,UAlFjB,EAAA,QAAA,EAAA,MAAA,CAAA,EAAA,OAAA"}
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,oBAAA,CAAA,GAAA,CAAA,OAL1B;AAGc,iBAkFA,WAAA,CAlFA,GAAA,EAkFiB,UAlFjB,EAAA,QAAA,EAAA,MAAA,CAAA,EAAA,OAAA"}