@fumadocs/base-ui 16.4.4 → 16.4.6

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 (89) hide show
  1. package/css/aspen.css +1 -0
  2. package/css/ruby.css +1 -0
  3. package/dist/components/accordion.d.ts +3 -3
  4. package/dist/components/accordion.d.ts.map +1 -1
  5. package/dist/components/banner.d.ts +2 -2
  6. package/dist/components/banner.d.ts.map +1 -1
  7. package/dist/components/callout.d.ts +5 -5
  8. package/dist/components/callout.d.ts.map +1 -1
  9. package/dist/components/card.d.ts +3 -3
  10. package/dist/components/codeblock.d.ts +7 -7
  11. package/dist/components/codeblock.d.ts.map +1 -1
  12. package/dist/components/dialog/search-algolia.d.ts +2 -2
  13. package/dist/components/dialog/search-default.d.ts +2 -2
  14. package/dist/components/dialog/search-orama.d.ts +2 -2
  15. package/dist/components/dialog/search.d.ts +13 -13
  16. package/dist/components/dynamic-codeblock.d.ts +2 -2
  17. package/dist/components/dynamic-codeblock.d.ts.map +1 -1
  18. package/dist/components/github-info.d.ts +2 -2
  19. package/dist/components/github-info.d.ts.map +1 -1
  20. package/dist/components/image-zoom.d.ts +2 -2
  21. package/dist/components/image-zoom.d.ts.map +1 -1
  22. package/dist/components/inline-toc.d.ts +2 -2
  23. package/dist/components/inline-toc.d.ts.map +1 -1
  24. package/dist/components/sidebar/base.d.ts +13 -13
  25. package/dist/components/sidebar/link-item.d.ts +2 -2
  26. package/dist/components/sidebar/page-tree.d.ts +2 -2
  27. package/dist/components/sidebar/tabs/dropdown.d.ts +2 -2
  28. package/dist/components/steps.d.ts +3 -3
  29. package/dist/components/steps.d.ts.map +1 -1
  30. package/dist/components/tabs.d.ts +7 -7
  31. package/dist/components/tabs.d.ts.map +1 -1
  32. package/dist/components/type-table.d.ts +2 -2
  33. package/dist/components/type-table.d.ts.map +1 -1
  34. package/dist/components/ui/accordion.d.ts +6 -6
  35. package/dist/components/ui/collapsible.d.ts +6 -6
  36. package/dist/components/ui/navigation-menu.d.ts +7 -7
  37. package/dist/components/ui/popover.d.ts +3 -3
  38. package/dist/components/ui/scroll-area.d.ts +4 -4
  39. package/dist/components/ui/tabs.d.ts +7 -7
  40. package/dist/components/ui/tabs.d.ts.map +1 -1
  41. package/dist/layouts/docs/client.d.ts +2 -2
  42. package/dist/layouts/docs/index.d.ts +2 -2
  43. package/dist/layouts/docs/index.d.ts.map +1 -1
  44. package/dist/layouts/docs/index.js +3 -3
  45. package/dist/layouts/docs/page/client.d.ts +9 -7
  46. package/dist/layouts/docs/page/client.d.ts.map +1 -1
  47. package/dist/layouts/docs/page/client.js +8 -8
  48. package/dist/layouts/docs/page/client.js.map +1 -1
  49. package/dist/layouts/docs/page/index.d.ts +13 -7
  50. package/dist/layouts/docs/page/index.d.ts.map +1 -1
  51. package/dist/layouts/docs/page/index.js +2 -2
  52. package/dist/layouts/docs/page/index.js.map +1 -1
  53. package/dist/layouts/docs/sidebar.d.ts +17 -17
  54. package/dist/layouts/docs/sidebar.d.ts.map +1 -1
  55. package/dist/layouts/home/client.d.ts +1 -1
  56. package/dist/layouts/home/client.js +2 -2
  57. package/dist/layouts/home/index.d.ts +2 -2
  58. package/dist/layouts/home/navbar.d.ts +7 -7
  59. package/dist/layouts/home/navbar.d.ts.map +1 -1
  60. package/dist/layouts/notebook/client.d.ts +8 -8
  61. package/dist/layouts/notebook/client.d.ts.map +1 -1
  62. package/dist/layouts/notebook/index.d.ts +2 -2
  63. package/dist/layouts/notebook/index.d.ts.map +1 -1
  64. package/dist/layouts/notebook/index.js +3 -3
  65. package/dist/layouts/notebook/page/client.d.ts +9 -7
  66. package/dist/layouts/notebook/page/client.d.ts.map +1 -1
  67. package/dist/layouts/notebook/page/client.js +8 -8
  68. package/dist/layouts/notebook/page/client.js.map +1 -1
  69. package/dist/layouts/notebook/page/index.d.ts +13 -7
  70. package/dist/layouts/notebook/page/index.d.ts.map +1 -1
  71. package/dist/layouts/notebook/page/index.js +2 -2
  72. package/dist/layouts/notebook/page/index.js.map +1 -1
  73. package/dist/layouts/notebook/sidebar.d.ts +12 -12
  74. package/dist/layouts/notebook/sidebar.d.ts.map +1 -1
  75. package/dist/layouts/shared/index.d.ts +3 -3
  76. package/dist/layouts/shared/language-toggle.d.ts +2 -2
  77. package/dist/layouts/shared/language-toggle.d.ts.map +1 -1
  78. package/dist/layouts/shared/search-toggle.d.ts +3 -3
  79. package/dist/layouts/shared/theme-toggle.d.ts +2 -2
  80. package/dist/layouts/shared/theme-toggle.d.ts.map +1 -1
  81. package/dist/mdx.d.ts +10 -10
  82. package/dist/page.d.ts +3 -3
  83. package/dist/page.d.ts.map +1 -1
  84. package/dist/provider/base.d.ts +2 -2
  85. package/dist/provider/next.d.ts +2 -2
  86. package/dist/provider/react-router.d.ts +2 -2
  87. package/dist/provider/tanstack.d.ts +2 -2
  88. package/dist/provider/waku.d.ts +2 -2
  89. package/package.json +10 -5
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime64 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime83 from "react/jsx-runtime";
2
2
  import { ComponentProps } from "react";
3
3
  import { Accordion as Accordion$1 } from "@base-ui/react/accordion";
4
4
 
@@ -6,26 +6,26 @@ import { Accordion as Accordion$1 } from "@base-ui/react/accordion";
6
6
  declare function Accordion({
7
7
  className,
8
8
  ...props
9
- }: ComponentProps<typeof Accordion$1.Root>): react_jsx_runtime64.JSX.Element;
9
+ }: ComponentProps<typeof Accordion$1.Root>): react_jsx_runtime83.JSX.Element;
10
10
  declare function AccordionItem({
11
11
  children,
12
12
  ...props
13
- }: ComponentProps<typeof Accordion$1.Item>): react_jsx_runtime64.JSX.Element;
13
+ }: ComponentProps<typeof Accordion$1.Item>): react_jsx_runtime83.JSX.Element;
14
14
  declare function AccordionHeader({
15
15
  className,
16
16
  children,
17
17
  ...props
18
- }: ComponentProps<typeof Accordion$1.Header>): react_jsx_runtime64.JSX.Element;
18
+ }: ComponentProps<typeof Accordion$1.Header>): react_jsx_runtime83.JSX.Element;
19
19
  declare function AccordionTrigger({
20
20
  className,
21
21
  children,
22
22
  ...props
23
- }: ComponentProps<typeof Accordion$1.Trigger>): react_jsx_runtime64.JSX.Element;
23
+ }: ComponentProps<typeof Accordion$1.Trigger>): react_jsx_runtime83.JSX.Element;
24
24
  declare function AccordionContent({
25
25
  className,
26
26
  children,
27
27
  ...props
28
- }: ComponentProps<typeof Accordion$1.Panel>): react_jsx_runtime64.JSX.Element;
28
+ }: ComponentProps<typeof Accordion$1.Panel>): react_jsx_runtime83.JSX.Element;
29
29
  //#endregion
30
30
  export { Accordion, AccordionContent, AccordionHeader, AccordionItem, AccordionTrigger };
31
31
  //# sourceMappingURL=accordion.d.ts.map
@@ -1,17 +1,17 @@
1
- import * as react_jsx_runtime69 from "react/jsx-runtime";
2
- import * as react0 from "react";
1
+ import * as react_jsx_runtime88 from "react/jsx-runtime";
2
+ import * as react9 from "react";
3
3
  import { ComponentProps } from "react";
4
4
  import { Collapsible as Collapsible$1 } from "@base-ui/react/collapsible";
5
- import * as _base_ui_react1 from "@base-ui/react";
5
+ import * as _base_ui_react0 from "@base-ui/react";
6
6
 
7
7
  //#region src/components/ui/collapsible.d.ts
8
- declare const Collapsible: react0.ForwardRefExoticComponent<_base_ui_react1.CollapsibleRootProps & react0.RefAttributes<HTMLDivElement>>;
9
- declare const CollapsibleTrigger: react0.ForwardRefExoticComponent<_base_ui_react1.CollapsibleTriggerProps & react0.RefAttributes<HTMLButtonElement>>;
8
+ declare const Collapsible: react9.ForwardRefExoticComponent<_base_ui_react0.CollapsibleRootProps & react9.RefAttributes<HTMLDivElement>>;
9
+ declare const CollapsibleTrigger: react9.ForwardRefExoticComponent<_base_ui_react0.CollapsibleTriggerProps & react9.RefAttributes<HTMLButtonElement>>;
10
10
  declare function CollapsibleContent({
11
11
  children,
12
12
  className,
13
13
  ...props
14
- }: ComponentProps<typeof Collapsible$1.Panel>): react_jsx_runtime69.JSX.Element;
14
+ }: ComponentProps<typeof Collapsible$1.Panel>): react_jsx_runtime88.JSX.Element;
15
15
  type CollapsibleProps = Collapsible$1.Root.Props;
16
16
  type CollapsibleContentProps = Collapsible$1.Panel.Props;
17
17
  type CollapsibleTriggerProps = Collapsible$1.Trigger.Props;
@@ -1,16 +1,16 @@
1
1
  import * as React from "react";
2
2
  import { NavigationMenu } from "@base-ui/react/navigation-menu";
3
- import * as _base_ui_react3 from "@base-ui/react";
3
+ import * as _base_ui_react2 from "@base-ui/react";
4
4
 
5
5
  //#region src/components/ui/navigation-menu.d.ts
6
6
  type NavigationMenuContentProps = NavigationMenu.Content.Props;
7
7
  type NavigationMenuTriggerProps = NavigationMenu.Trigger.Props;
8
- declare const NavigationMenuRoot: React.ForwardRefExoticComponent<_base_ui_react3.NavigationMenuRootProps & React.RefAttributes<HTMLElement>>;
9
- declare const NavigationMenuList: React.ForwardRefExoticComponent<_base_ui_react3.NavigationMenuListProps & React.RefAttributes<HTMLDivElement>>;
10
- declare const NavigationMenuItem: React.ForwardRefExoticComponent<Omit<_base_ui_react3.NavigationMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
11
- declare const NavigationMenuTrigger: React.ForwardRefExoticComponent<Omit<_base_ui_react3.NavigationMenuTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
12
- declare const NavigationMenuContent: React.ForwardRefExoticComponent<Omit<_base_ui_react3.NavigationMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
- declare const NavigationMenuLink: React.ForwardRefExoticComponent<_base_ui_react3.NavigationMenuLinkProps & React.RefAttributes<HTMLAnchorElement>>;
8
+ declare const NavigationMenuRoot: React.ForwardRefExoticComponent<_base_ui_react2.NavigationMenuRootProps & React.RefAttributes<HTMLElement>>;
9
+ declare const NavigationMenuList: React.ForwardRefExoticComponent<_base_ui_react2.NavigationMenuListProps & React.RefAttributes<HTMLDivElement>>;
10
+ declare const NavigationMenuItem: React.ForwardRefExoticComponent<Omit<_base_ui_react2.NavigationMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
11
+ declare const NavigationMenuTrigger: React.ForwardRefExoticComponent<Omit<_base_ui_react2.NavigationMenuTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
12
+ declare const NavigationMenuContent: React.ForwardRefExoticComponent<Omit<_base_ui_react2.NavigationMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ declare const NavigationMenuLink: React.ForwardRefExoticComponent<_base_ui_react2.NavigationMenuLinkProps & React.RefAttributes<HTMLAnchorElement>>;
14
14
  //#endregion
15
15
  export { NavigationMenuContent, NavigationMenuContentProps, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuRoot, NavigationMenuTrigger, NavigationMenuTriggerProps };
16
16
  //# sourceMappingURL=navigation-menu.d.ts.map
@@ -1,12 +1,12 @@
1
1
  import * as React from "react";
2
2
  import { Popover as Popover$1 } from "@base-ui/react/popover";
3
- import * as _base_ui_react9 from "@base-ui/react";
3
+ import * as _base_ui_react8 from "@base-ui/react";
4
4
 
5
5
  //#region src/components/ui/popover.d.ts
6
6
  declare const Popover: typeof Popover$1.Root;
7
7
  declare const PopoverTrigger: Popover$1.Trigger;
8
- declare const PopoverContent: React.ForwardRefExoticComponent<Omit<_base_ui_react9.PopoverPopupProps & React.RefAttributes<HTMLDivElement>, "ref"> & Pick<_base_ui_react9.PopoverPositionerProps, "sideOffset" | "align"> & React.RefAttributes<HTMLDivElement>>;
9
- declare const PopoverClose: React.ForwardRefExoticComponent<_base_ui_react9.PopoverCloseProps & React.RefAttributes<HTMLButtonElement>>;
8
+ declare const PopoverContent: React.ForwardRefExoticComponent<Omit<_base_ui_react8.PopoverPopupProps & React.RefAttributes<HTMLDivElement>, "ref"> & Pick<_base_ui_react8.PopoverPositionerProps, "sideOffset" | "align"> & React.RefAttributes<HTMLDivElement>>;
9
+ declare const PopoverClose: React.ForwardRefExoticComponent<_base_ui_react8.PopoverCloseProps & React.RefAttributes<HTMLButtonElement>>;
10
10
  //#endregion
11
11
  export { Popover, PopoverClose, PopoverContent, PopoverTrigger };
12
12
  //# sourceMappingURL=popover.d.ts.map
@@ -1,11 +1,11 @@
1
1
  import * as React from "react";
2
2
  import { ScrollArea as ScrollArea$1 } from "@base-ui/react/scroll-area";
3
- import * as _base_ui_react12 from "@base-ui/react";
3
+ import * as _base_ui_react11 from "@base-ui/react";
4
4
 
5
5
  //#region src/components/ui/scroll-area.d.ts
6
- declare const ScrollArea: React.ForwardRefExoticComponent<Omit<_base_ui_react12.ScrollAreaRootProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
- declare const ScrollViewport: React.ForwardRefExoticComponent<Omit<_base_ui_react12.ScrollAreaViewportProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
- declare const ScrollBar: React.ForwardRefExoticComponent<Omit<_base_ui_react12.ScrollAreaScrollbarProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
6
+ declare const ScrollArea: React.ForwardRefExoticComponent<Omit<_base_ui_react11.ScrollAreaRootProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
+ declare const ScrollViewport: React.ForwardRefExoticComponent<Omit<_base_ui_react11.ScrollAreaViewportProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+ declare const ScrollBar: React.ForwardRefExoticComponent<Omit<_base_ui_react11.ScrollAreaScrollbarProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
9
  type ScrollAreaProps = ScrollArea$1.Root.Props;
10
10
  //#endregion
11
11
  export { ScrollArea, ScrollAreaProps, ScrollBar, ScrollViewport };
@@ -1,8 +1,8 @@
1
- import * as react_jsx_runtime74 from "react/jsx-runtime";
2
- import * as react5 from "react";
1
+ import * as react_jsx_runtime89 from "react/jsx-runtime";
2
+ import * as react13 from "react";
3
3
  import { ComponentProps } from "react";
4
4
  import { Tabs as Tabs$1 } from "@base-ui/react/tabs";
5
- import * as _base_ui_react15 from "@base-ui/react";
5
+ import * as _base_ui_react14 from "@base-ui/react";
6
6
 
7
7
  //#region src/components/ui/tabs.d.ts
8
8
  interface TabsProps extends ComponentProps<typeof Tabs$1.Root> {
@@ -20,8 +20,8 @@ interface TabsProps extends ComponentProps<typeof Tabs$1.Root> {
20
20
  updateAnchor?: boolean;
21
21
  onValueChange?: (value: string) => void;
22
22
  }
23
- declare const TabsList: react5.ForwardRefExoticComponent<_base_ui_react15.TabsListProps & react5.RefAttributes<HTMLDivElement>>;
24
- declare const TabsTrigger: react5.ForwardRefExoticComponent<_base_ui_react15.TabsTabProps & react5.RefAttributes<Element>>;
23
+ declare const TabsList: react13.ForwardRefExoticComponent<_base_ui_react14.TabsListProps & react13.RefAttributes<HTMLDivElement>>;
24
+ declare const TabsTrigger: react13.ForwardRefExoticComponent<_base_ui_react14.TabsTabProps & react13.RefAttributes<Element>>;
25
25
  declare function Tabs({
26
26
  ref,
27
27
  groupId,
@@ -31,11 +31,11 @@ declare function Tabs({
31
31
  value: _value,
32
32
  onValueChange: _onValueChange,
33
33
  ...props
34
- }: TabsProps): react_jsx_runtime74.JSX.Element;
34
+ }: TabsProps): react_jsx_runtime89.JSX.Element;
35
35
  declare function TabsContent({
36
36
  value,
37
37
  ...props
38
- }: ComponentProps<typeof Tabs$1.Panel>): react_jsx_runtime74.JSX.Element;
38
+ }: ComponentProps<typeof Tabs$1.Panel>): react_jsx_runtime89.JSX.Element;
39
39
  //#endregion
40
40
  export { Tabs, TabsContent, TabsList, TabsProps, TabsTrigger };
41
41
  //# sourceMappingURL=tabs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tabs.d.ts","names":[],"sources":["../../../src/components/ui/tabs.tsx"],"sourcesContent":[],"mappings":";;;;;;;UAkBiB,SAAA,SAAkB,sBAAsB,MAAA,CAAU;;;;;EAAlD;AA6BjB;;EAAqB,OAAA,CAAA,EAAA,OAAA;EAAA;;;EAER,YAAA,CAAA,EAA2B,OAAA;EAAA,aAAA,CAAhB,EAAA,CAAA,KAAA,EAAA,MAAA,EAAA,GAAA,IAAA;;AAAA,cAFX,QAEW,EAFH,MAAA,CAAA,yBAEG,CAFc,gBAAA,CAAjB,aAAA,GAAA,MAAA,CAAA,aAEG,CAFH,cAEG,CAAA,CAAA;AAAA,cAAX,WAAW,EAAA,MAAA,CAAA,yBAAA,CAAgB,gBAAA,CAAhB,YAAA,GAAA,MAAA,CAAA,aAAA,CAAA,OAAA,CAAA,CAAA;AAAA,iBAER,IAAA,CAFQ;EAAA,GAAA;EAAA,OAAA;EAAA,OAAA;EAAA,YAAA;EAAA,YAAA;EAAA,KAAA,EAQf,MARe;EAAA,aAAA,EASP,cATO;EAAA,GAAA;AAAA,CAAA,EAWrB,SAXqB,CAAA,EAWZ,mBAAA,CAAA,GAAA,CAAA,OAXY;AAER,iBAgFA,WAAA,CAhFI;EAAA,KAAA;EAAA,GAAA;AAAA,CAAA,EAgF6B,cAhF7B,CAAA,OAgFmD,MAAA,CAAU,KAhF7D,CAAA,CAAA,EAgFmE,mBAAA,CAAA,GAAA,CAAA,OAhFnE"}
1
+ {"version":3,"file":"tabs.d.ts","names":[],"sources":["../../../src/components/ui/tabs.tsx"],"sourcesContent":[],"mappings":";;;;;;;UAkBiB,SAAA,SAAkB,sBAAsB,MAAA,CAAU;;;;;EAAlD;AA6BjB;;EAAqB,OAAA,CAAA,EAAA,OAAA;EAAA;;;EAER,YAAA,CAAA,EAA2B,OAAA;EAAA,aAAA,CAAhB,EAAA,CAAA,KAAA,EAAA,MAAA,EAAA,GAAA,IAAA;;AAAA,cAFX,QAEW,EAFH,OAAA,CAAA,yBAEG,CAFc,gBAAA,CAAjB,aAAA,GAAA,OAAA,CAAA,aAEG,CAFH,cAEG,CAAA,CAAA;AAAA,cAAX,WAAW,EAAA,OAAA,CAAA,yBAAA,CAAgB,gBAAA,CAAhB,YAAA,GAAA,OAAA,CAAA,aAAA,CAAA,OAAA,CAAA,CAAA;AAAA,iBAER,IAAA,CAFQ;EAAA,GAAA;EAAA,OAAA;EAAA,OAAA;EAAA,YAAA;EAAA,YAAA;EAAA,KAAA,EAQf,MARe;EAAA,aAAA,EASP,cATO;EAAA,GAAA;AAAA,CAAA,EAWrB,SAXqB,CAAA,EAWZ,mBAAA,CAAA,GAAA,CAAA,OAXY;AAER,iBAgFA,WAAA,CAhFI;EAAA,KAAA;EAAA,GAAA;AAAA,CAAA,EAgF6B,cAhF7B,CAAA,OAgFmD,MAAA,CAAU,KAhF7D,CAAA,CAAA,EAgFmE,mBAAA,CAAA,GAAA,CAAA,OAhFnE"}
@@ -1,10 +1,10 @@
1
1
  import { SidebarTab } from "../../components/sidebar/tabs/index.js";
2
2
  import * as react_jsx_runtime70 from "react/jsx-runtime";
3
- import * as react4 from "react";
3
+ import * as react7 from "react";
4
4
  import { ComponentProps, ReactNode } from "react";
5
5
 
6
6
  //#region src/layouts/docs/client.d.ts
7
- declare const LayoutContext: react4.Context<{
7
+ declare const LayoutContext: react7.Context<{
8
8
  isNavTransparent: boolean;
9
9
  } | null>;
10
10
  declare function LayoutContextProvider({
@@ -3,7 +3,7 @@ import { GetSidebarTabsOptions } from "../../components/sidebar/tabs/index.js";
3
3
  import { SidebarTabWithProps } from "../../components/sidebar/tabs/dropdown.js";
4
4
  import { Sidebar } from "./sidebar.js";
5
5
  import { BaseLayoutProps } from "../shared/index.js";
6
- import * as react_jsx_runtime76 from "react/jsx-runtime";
6
+ import * as react_jsx_runtime116 from "react/jsx-runtime";
7
7
  import { ComponentProps, HTMLAttributes, ReactNode } from "react";
8
8
  import * as PageTree from "fumadocs-core/page-tree";
9
9
 
@@ -53,7 +53,7 @@ declare function DocsLayout({
53
53
  children,
54
54
  tree,
55
55
  ...props
56
- }: DocsLayoutProps): react_jsx_runtime76.JSX.Element;
56
+ }: DocsLayoutProps): react_jsx_runtime116.JSX.Element;
57
57
  //#endregion
58
58
  export { DocsLayout, DocsLayoutProps };
59
59
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/layouts/docs/index.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;UA0BiB,eAAA,SAAwB;QACjC,QAAA,CAAS;YAEL;EAHK,OAAA,CAAA,EAAA,KAAA,GAAgB,MAAA;EACzB;;;EASW,cAAA,CAAA,EAAA,cAAA,CAAe,cAAf,CAAA;;UAGT,cAAA,SAEN,cAfoD,CAAA,OAAA,CAAA,EAgBpD,IAhBoD,CAgB/C,cAhB+C,CAAA,OAgBzB,OAhByB,CAAA,EAAA,kBAAA,GAAA,UAAA,CAAA,CAAA;EAa9C,OAAA,CAAA,EAAA,OACR;EAE6B,SAAA,CAAA,EAEjB,SAFiB;EAAtB,UAAA,CAAA,EAGM,OAHN,CAGc,yBAHd,CAAA;EAEK;;;EAML,IAAA,CAAA,EAAA,mBAAA,EAAA,GAAwB,qBAAxB,GAAA,KAAA;EAAwB,MAAA,CAAA,EAEtB,SAFsB;EAEtB,MAAA,CAAA,EACA,SADA;EACA;;;;AAUX;EACS,WAAA,CAAA,EAAA,OAAA;;AAGI,iBAJG,UAAA,CAIH;EAAA,GAAA,EAAA;IAAA,eAAA;IAAA,GAAA;EAAA,CAAA;EAAA,OAAA,EAAA;IAAA,IAAA,EADH,WACG;IAAA,OAAA,EAAA,cAAA;IAAA,gBAAA;IAAA,QAAA;IAAA,GAAA;EAAA,CAAA;EAAA,YAAA;EAAA,WAAA;EAAA,OAAA;EAAA,IAAA;EAAA,QAAA;EAAA,IAAA;EAAA,GAAA;AAAA,CAAA,EAYV,eAZU,CAAA,EAYK,mBAAA,CAAA,GAAA,CAAA,OAZL"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/layouts/docs/index.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;UA0BiB,eAAA,SAAwB;QACjC,QAAA,CAAS;YAEL;EAHK,OAAA,CAAA,EAAA,KAAA,GAAgB,MAAA;EACzB;;;EASW,cAAA,CAAA,EAAA,cAAA,CAAe,cAAf,CAAA;;UAGT,cAAA,SAEN,cAfoD,CAAA,OAAA,CAAA,EAgBpD,IAhBoD,CAgB/C,cAhB+C,CAAA,OAgBzB,OAhByB,CAAA,EAAA,kBAAA,GAAA,UAAA,CAAA,CAAA;EAa9C,OAAA,CAAA,EAAA,OACR;EAE6B,SAAA,CAAA,EAEjB,SAFiB;EAAtB,UAAA,CAAA,EAGM,OAHN,CAGc,yBAHd,CAAA;EAEK;;;EAML,IAAA,CAAA,EAAA,mBAAA,EAAA,GAAwB,qBAAxB,GAAA,KAAA;EAAwB,MAAA,CAAA,EAEtB,SAFsB;EAEtB,MAAA,CAAA,EACA,SADA;EACA;;;;AAUX;EACS,WAAA,CAAA,EAAA,OAAA;;AAGI,iBAJG,UAAA,CAIH;EAAA,GAAA,EAAA;IAAA,eAAA;IAAA,GAAA;EAAA,CAAA;EAAA,OAAA,EAAA;IAAA,IAAA,EADH,WACG;IAAA,OAAA,EAAA,cAAA;IAAA,gBAAA;IAAA,QAAA;IAAA,GAAA;EAAA,CAAA;EAAA,YAAA;EAAA,WAAA;EAAA,OAAA;EAAA,IAAA;EAAA,QAAA;EAAA,IAAA;EAAA,GAAA;AAAA,CAAA,EAYV,eAZU,CAAA,EAYK,oBAAA,CAAA,GAAA,CAAA,OAZL"}
@@ -2,12 +2,12 @@ import { buttonVariants } from "../../components/ui/button.js";
2
2
  import { tree_exports } from "../../contexts/tree.js";
3
3
  import { SidebarTabsDropdown } from "../../components/sidebar/tabs/dropdown.js";
4
4
  import { LayoutBody, LayoutContextProvider, LayoutHeader, LayoutTabs } from "./client.js";
5
- import { LargeSearchToggle, SearchToggle } from "../shared/search-toggle.js";
6
- import { Sidebar as Sidebar$1, SidebarCollapseTrigger, SidebarContent, SidebarDrawer, SidebarLinkItem, SidebarPageTree, SidebarTrigger, SidebarViewport } from "./sidebar.js";
7
5
  import { renderTitleNav, resolveLinkItems } from "../shared/index.js";
8
- import { LanguageToggle, LanguageToggleText } from "../shared/language-toggle.js";
6
+ import { LargeSearchToggle, SearchToggle } from "../shared/search-toggle.js";
9
7
  import { ThemeToggle } from "../shared/theme-toggle.js";
8
+ import { LanguageToggle, LanguageToggleText } from "../shared/language-toggle.js";
10
9
  import { getSidebarTabs } from "../../components/sidebar/tabs/index.js";
10
+ import { Sidebar as Sidebar$1, SidebarCollapseTrigger, SidebarContent, SidebarDrawer, SidebarLinkItem, SidebarPageTree, SidebarTrigger, SidebarViewport } from "./sidebar.js";
11
11
  import { cn } from "@fumadocs/ui/cn";
12
12
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
13
13
  import { Languages, Sidebar } from "lucide-react";
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime106 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime117 from "react/jsx-runtime";
2
2
  import { ComponentProps } from "react";
3
3
  import { BreadcrumbOptions } from "fumadocs-core/breadcrumb";
4
4
  import * as PageTree from "fumadocs-core/page-tree";
@@ -8,18 +8,18 @@ declare function PageTOCPopover({
8
8
  className,
9
9
  children,
10
10
  ...rest
11
- }: ComponentProps<'div'>): react_jsx_runtime106.JSX.Element;
11
+ }: ComponentProps<'div'>): react_jsx_runtime117.JSX.Element;
12
12
  declare function PageTOCPopoverTrigger({
13
13
  className,
14
14
  ...props
15
- }: ComponentProps<'button'>): react_jsx_runtime106.JSX.Element;
16
- declare function PageTOCPopoverContent(props: ComponentProps<'div'>): react_jsx_runtime106.JSX.Element;
15
+ }: ComponentProps<'button'>): react_jsx_runtime117.JSX.Element;
16
+ declare function PageTOCPopoverContent(props: ComponentProps<'div'>): react_jsx_runtime117.JSX.Element;
17
17
  declare function PageLastUpdate({
18
18
  date: value,
19
19
  ...props
20
20
  }: Omit<ComponentProps<'p'>, 'children'> & {
21
21
  date: Date;
22
- }): react_jsx_runtime106.JSX.Element;
22
+ }): react_jsx_runtime117.JSX.Element;
23
23
  type Item = Pick<PageTree.Item, 'name' | 'description' | 'url'>;
24
24
  interface FooterProps extends ComponentProps<'div'> {
25
25
  /**
@@ -32,15 +32,17 @@ interface FooterProps extends ComponentProps<'div'> {
32
32
  }
33
33
  declare function PageFooter({
34
34
  items,
35
+ children,
36
+ className,
35
37
  ...props
36
- }: FooterProps): react_jsx_runtime106.JSX.Element;
38
+ }: FooterProps): react_jsx_runtime117.JSX.Element;
37
39
  type BreadcrumbProps = BreadcrumbOptions & ComponentProps<'div'>;
38
40
  declare function PageBreadcrumb({
39
41
  includeRoot,
40
42
  includeSeparator,
41
43
  includePage,
42
44
  ...props
43
- }: BreadcrumbProps): react_jsx_runtime106.JSX.Element | null;
45
+ }: BreadcrumbProps): react_jsx_runtime117.JSX.Element | null;
44
46
  //#endregion
45
47
  export { BreadcrumbProps, FooterProps, PageBreadcrumb, PageFooter, PageLastUpdate, PageTOCPopover, PageTOCPopoverContent, PageTOCPopoverTrigger };
46
48
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","names":[],"sources":["../../../../src/layouts/docs/page/client.tsx"],"sourcesContent":[],"mappings":";;;;;;iBAiCgB,cAAA;;;;GAAiD,wBAAqB,oBAAA,CAAA,GAAA,CAAA;iBAsDtE,qBAAA;;;GAA+C,2BAAwB,oBAAA,CAAA,GAAA,CAAA;iBA2GvE,qBAAA,QAA6B,wBAAqB,oBAAA,CAAA,GAAA,CAAA;AAjKlD,iBA6KA,cAAA,CA7Kc;EAAA,IAAA,EA8KtB,KA9KsB;EAAA,GAAA;CAAA,EAgL3B,IAhL2B,CAgLtB,cAhLsB,CAAA,GAAA,CAAA,EAAA,UAAA,CAAA,GAAA;EAAG,IAAA,EAgLkB,IAhLlB;CAAW,CAAA,EAgLa,oBAAA,C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CAAS,IAhMuC,EAAA,MAAA,GAAA,aAAA,GAAA,KAAA,CAAA;AAAqB,UAiMrE,WAAA,SAAoB,cAjMiD,CAAA,KAAA,CAAA,CAAA;EAAA;AAsDtF;;EAA+D,KAAA,CAAA,EAAA;IAAwB,QAAA,CAAA,EAgJxE,IAhJwE;IAAA,IAAA,CAAA,EAiJ5E,IAjJ4E;EA2GvE,CAAA;AAYhB;AACQ,iBA6BQ,UAAA,CA7BR;EAAA,KAAA;EAAA,QAAA;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EA6B6D,WA7B7D,CAAA,EA6BwE,oBAAA,CAAA,GAAA,CAAA,OA7BxE;AAEA,KAyFI,eAAA,GAAkB,iBAzFtB,GAyF0C,cAzF1C,CAAA,KAAA,CAAA;AAAL,iBA2Fa,cAAA,CA3Fb;EAAA,WAAA;EAAA,gBAAA;EAAA,WAAA;EAAA,GAAA;AAAA,CAAA,EAgGA,eAhGA,CAAA,EAgGe,oBAAA,CAAA,GAAA,CAAA,OAAA,GAhGf,IAAA"}
@@ -8,7 +8,7 @@ import { LayoutContext } from "../client.js";
8
8
  import Link from "fumadocs-core/link";
9
9
  import { usePathname } from "fumadocs-core/framework";
10
10
  import { cn } from "@fumadocs/ui/cn";
11
- import { jsx, jsxs } from "react/jsx-runtime";
11
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
12
12
  import { ChevronDown, ChevronLeft, ChevronRight } from "lucide-react";
13
13
  import { Fragment as Fragment$1, createContext, use, useEffect, useEffectEvent, useMemo, useRef, useState } from "react";
14
14
  import { getBreadcrumbItemsFromPath } from "fumadocs-core/breadcrumb";
@@ -145,7 +145,7 @@ function PageLastUpdate({ date: value, ...props }) {
145
145
  ]
146
146
  });
147
147
  }
148
- function PageFooter({ items, ...props }) {
148
+ function PageFooter({ items, children, className, ...props }) {
149
149
  const footerList = useFooterItems();
150
150
  const pathname = usePathname();
151
151
  const { previous, next } = useMemo(() => {
@@ -161,17 +161,17 @@ function PageFooter({ items, ...props }) {
161
161
  items,
162
162
  pathname
163
163
  ]);
164
- return /* @__PURE__ */ jsxs("div", {
164
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
165
+ className: cn("@container grid gap-4", previous && next ? "grid-cols-2" : "grid-cols-1", className),
165
166
  ...props,
166
- className: cn("@container grid gap-4", previous && next ? "grid-cols-2" : "grid-cols-1", props.className),
167
- children: [previous ? /* @__PURE__ */ jsx(FooterItem, {
167
+ children: [previous && /* @__PURE__ */ jsx(FooterItem, {
168
168
  item: previous,
169
169
  index: 0
170
- }) : null, next ? /* @__PURE__ */ jsx(FooterItem, {
170
+ }), next && /* @__PURE__ */ jsx(FooterItem, {
171
171
  item: next,
172
172
  index: 1
173
- }) : null]
174
- });
173
+ })]
174
+ }), children] });
175
175
  }
176
176
  function FooterItem({ item, index }) {
177
177
  const { text } = (0, i18n_exports.useI18n)();
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","names":["Fragment"],"sources":["../../../../src/layouts/docs/page/client.tsx"],"sourcesContent":["'use client';\n\nimport {\n type ComponentProps,\n createContext,\n Fragment,\n use,\n useEffect,\n useEffectEvent,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { ChevronDown, ChevronLeft, ChevronRight } from 'lucide-react';\nimport Link from 'fumadocs-core/link';\nimport { cn } from '@fumadocs/ui/cn';\nimport { useI18n } from '@/contexts/i18n';\nimport { useTreeContext, useTreePath } from '@/contexts/tree';\nimport type * as PageTree from 'fumadocs-core/page-tree';\nimport { usePathname } from 'fumadocs-core/framework';\nimport { type BreadcrumbOptions, getBreadcrumbItemsFromPath } from 'fumadocs-core/breadcrumb';\nimport { isActive } from '@fumadocs/ui/urls';\nimport { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/components/ui/collapsible';\nimport { useTOCItems } from '@/components/toc';\nimport { useActiveAnchor } from 'fumadocs-core/toc';\nimport { LayoutContext } from '../client';\nimport { useFooterItems } from '@fumadocs/ui/hooks/use-footer-items';\n\nconst TocPopoverContext = createContext<{\n open: boolean;\n setOpen: (open: boolean) => void;\n} | null>(null);\n\nexport function PageTOCPopover({ className, children, ...rest }: ComponentProps<'div'>) {\n const ref = useRef<HTMLElement>(null);\n const [open, setOpen] = useState(false);\n const { isNavTransparent } = use(LayoutContext)!;\n\n const onClick = useEffectEvent((e: Event) => {\n if (!open) return;\n\n if (ref.current && !ref.current.contains(e.target as HTMLElement)) setOpen(false);\n });\n\n useEffect(() => {\n window.addEventListener('click', onClick);\n\n return () => {\n window.removeEventListener('click', onClick);\n };\n }, []);\n\n return (\n <TocPopoverContext\n value={useMemo(\n () => ({\n open,\n setOpen,\n }),\n [setOpen, open],\n )}\n >\n <Collapsible\n open={open}\n onOpenChange={setOpen}\n data-toc-popover=\"\"\n className={cn(\n 'sticky top-(--fd-docs-row-2) z-10 [grid-area:toc-popover] h-(--fd-toc-popover-height) xl:hidden max-xl:layout:[--fd-toc-popover-height:--spacing(10)]',\n className,\n )}\n {...rest}\n >\n <header\n ref={ref}\n className={cn(\n 'border-b backdrop-blur-sm transition-colors',\n (!isNavTransparent || open) && 'bg-fd-background/80',\n open && 'shadow-lg',\n )}\n >\n {children}\n </header>\n </Collapsible>\n </TocPopoverContext>\n );\n}\n\nexport function PageTOCPopoverTrigger({ className, ...props }: ComponentProps<'button'>) {\n const { text } = useI18n();\n const { open } = use(TocPopoverContext)!;\n const items = useTOCItems();\n const active = useActiveAnchor();\n const selected = useMemo(\n () => items.findIndex((item) => active === item.url.slice(1)),\n [items, active],\n );\n const path = useTreePath().at(-1);\n const showItem = selected !== -1 && !open;\n\n return (\n <CollapsibleTrigger\n className={cn(\n 'flex w-full h-10 items-center text-sm text-fd-muted-foreground gap-2.5 px-4 py-2.5 text-start focus-visible:outline-none [&_svg]:size-4 md:px-6',\n className,\n )}\n data-toc-popover-trigger=\"\"\n {...props}\n >\n <ProgressCircle\n value={(selected + 1) / Math.max(1, items.length)}\n max={1}\n className={cn('shrink-0', open && 'text-fd-primary')}\n />\n <span className=\"grid flex-1 *:my-auto *:row-start-1 *:col-start-1\">\n <span\n className={cn(\n 'truncate transition-all',\n open && 'text-fd-foreground',\n showItem && 'opacity-0 -translate-y-full pointer-events-none',\n )}\n >\n {path?.name ?? text.toc}\n </span>\n <span\n className={cn(\n 'truncate transition-all',\n !showItem && 'opacity-0 translate-y-full pointer-events-none',\n )}\n >\n {items[selected]?.title}\n </span>\n </span>\n <ChevronDown className={cn('shrink-0 transition-transform mx-0.5', open && 'rotate-180')} />\n </CollapsibleTrigger>\n );\n}\n\ninterface ProgressCircleProps extends Omit<React.ComponentProps<'svg'>, 'strokeWidth'> {\n value: number;\n strokeWidth?: number;\n size?: number;\n min?: number;\n max?: number;\n}\n\nfunction clamp(input: number, min: number, max: number): number {\n if (input < min) return min;\n if (input > max) return max;\n return input;\n}\n\nfunction ProgressCircle({\n value,\n strokeWidth = 2,\n size = 24,\n min = 0,\n max = 100,\n ...restSvgProps\n}: ProgressCircleProps) {\n const normalizedValue = clamp(value, min, max);\n const radius = (size - strokeWidth) / 2;\n const circumference = 2 * Math.PI * radius;\n const progress = (normalizedValue / max) * circumference;\n const circleProps = {\n cx: size / 2,\n cy: size / 2,\n r: radius,\n fill: 'none',\n strokeWidth,\n };\n\n return (\n <svg\n role=\"progressbar\"\n viewBox={`0 0 ${size} ${size}`}\n aria-valuenow={normalizedValue}\n aria-valuemin={min}\n aria-valuemax={max}\n {...restSvgProps}\n >\n <circle {...circleProps} className=\"stroke-current/25\" />\n <circle\n {...circleProps}\n stroke=\"currentColor\"\n strokeDasharray={circumference}\n strokeDashoffset={circumference - progress}\n strokeLinecap=\"round\"\n transform={`rotate(-90 ${size / 2} ${size / 2})`}\n className=\"transition-all\"\n />\n </svg>\n );\n}\n\nexport function PageTOCPopoverContent(props: ComponentProps<'div'>) {\n return (\n <CollapsibleContent\n data-toc-popover-content=\"\"\n {...props}\n className={cn('flex flex-col px-4 max-h-[50vh] md:px-6', props.className)}\n >\n <div>{props.children}</div>\n </CollapsibleContent>\n );\n}\n\nexport function PageLastUpdate({\n date: value,\n ...props\n}: Omit<ComponentProps<'p'>, 'children'> & { date: Date }) {\n const { text } = useI18n();\n const [date, setDate] = useState('');\n\n useEffect(() => {\n // to the timezone of client\n setDate(value.toLocaleDateString());\n }, [value]);\n\n return (\n <p {...props} className={cn('text-sm text-fd-muted-foreground', props.className)}>\n {text.lastUpdate} {date}\n </p>\n );\n}\n\ntype Item = Pick<PageTree.Item, 'name' | 'description' | 'url'>;\nexport interface FooterProps extends ComponentProps<'div'> {\n /**\n * Items including information for the next and previous page\n */\n items?: {\n previous?: Item;\n next?: Item;\n };\n}\n\nexport function PageFooter({ items, ...props }: FooterProps) {\n const footerList = useFooterItems();\n const pathname = usePathname();\n\n const { previous, next } = useMemo(() => {\n if (items) return items;\n\n const idx = footerList.findIndex((item) => isActive(item.url, pathname, false));\n\n if (idx === -1) return {};\n return {\n previous: footerList[idx - 1],\n next: footerList[idx + 1],\n };\n }, [footerList, items, pathname]);\n\n return (\n <div\n {...props}\n className={cn(\n '@container grid gap-4',\n previous && next ? 'grid-cols-2' : 'grid-cols-1',\n props.className,\n )}\n >\n {previous ? <FooterItem item={previous} index={0} /> : null}\n {next ? <FooterItem item={next} index={1} /> : null}\n </div>\n );\n}\n\nfunction FooterItem({ item, index }: { item: Item; index: 0 | 1 }) {\n const { text } = useI18n();\n const Icon = index === 0 ? ChevronLeft : ChevronRight;\n\n return (\n <Link\n href={item.url}\n className={cn(\n 'flex flex-col gap-2 rounded-lg border p-4 text-sm transition-colors hover:bg-fd-accent/80 hover:text-fd-accent-foreground @max-lg:col-span-full',\n index === 1 && 'text-end',\n )}\n >\n <div\n className={cn(\n 'inline-flex items-center gap-1.5 font-medium',\n index === 1 && 'flex-row-reverse',\n )}\n >\n <Icon className=\"-mx-1 size-4 shrink-0 rtl:rotate-180\" />\n <p>{item.name}</p>\n </div>\n <p className=\"text-fd-muted-foreground truncate\">\n {item.description ?? (index === 0 ? text.previousPage : text.nextPage)}\n </p>\n </Link>\n );\n}\n\nexport type BreadcrumbProps = BreadcrumbOptions & ComponentProps<'div'>;\n\nexport function PageBreadcrumb({\n includeRoot,\n includeSeparator,\n includePage,\n ...props\n}: BreadcrumbProps) {\n const path = useTreePath();\n const { root } = useTreeContext();\n const items = useMemo(() => {\n return getBreadcrumbItemsFromPath(root, path, {\n includePage,\n includeSeparator,\n includeRoot,\n });\n }, [includePage, includeRoot, includeSeparator, path, root]);\n\n if (items.length === 0) return null;\n\n return (\n <div\n {...props}\n className={cn('flex items-center gap-1.5 text-sm text-fd-muted-foreground', props.className)}\n >\n {items.map((item, i) => {\n const className = cn('truncate', i === items.length - 1 && 'text-fd-primary font-medium');\n\n return (\n <Fragment key={i}>\n {i !== 0 && <ChevronRight className=\"size-3.5 shrink-0\" />}\n {item.url ? (\n <Link\n href={item.url}\n className={cn(className, 'transition-opacity hover:opacity-80')}\n >\n {item.name}\n </Link>\n ) : (\n <span className={className}>{item.name}</span>\n )}\n </Fragment>\n );\n })}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA4BA,MAAM,oBAAoB,cAGhB,KAAK;AAEf,SAAgB,eAAe,EAAE,WAAW,UAAU,GAAG,QAA+B;CACtF,MAAM,MAAM,OAAoB,KAAK;CACrC,MAAM,CAAC,MAAM,WAAW,SAAS,MAAM;CACvC,MAAM,EAAE,qBAAqB,IAAI,cAAc;CAE/C,MAAM,UAAU,gBAAgB,MAAa;AAC3C,MAAI,CAAC,KAAM;AAEX,MAAI,IAAI,WAAW,CAAC,IAAI,QAAQ,SAAS,EAAE,OAAsB,CAAE,SAAQ,MAAM;GACjF;AAEF,iBAAgB;AACd,SAAO,iBAAiB,SAAS,QAAQ;AAEzC,eAAa;AACX,UAAO,oBAAoB,SAAS,QAAQ;;IAE7C,EAAE,CAAC;AAEN,QACE,oBAAC;EACC,OAAO,eACE;GACL;GACA;GACD,GACD,CAAC,SAAS,KAAK,CAChB;YAED,oBAAC;GACO;GACN,cAAc;GAC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GAEP,oBAAC;IAAgB;cAAY,KAAK;KAAY,KAVnC,EAYJ;IAEb;GACE"}
1
+ {"version":3,"file":"client.js","names":["Fragment"],"sources":["../../../../src/layouts/docs/page/client.tsx"],"sourcesContent":["'use client';\n\nimport {\n type ComponentProps,\n createContext,\n Fragment,\n use,\n useEffect,\n useEffectEvent,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { ChevronDown, ChevronLeft, ChevronRight } from 'lucide-react';\nimport Link from 'fumadocs-core/link';\nimport { cn } from '@fumadocs/ui/cn';\nimport { useI18n } from '@/contexts/i18n';\nimport { useTreeContext, useTreePath } from '@/contexts/tree';\nimport type * as PageTree from 'fumadocs-core/page-tree';\nimport { usePathname } from 'fumadocs-core/framework';\nimport { type BreadcrumbOptions, getBreadcrumbItemsFromPath } from 'fumadocs-core/breadcrumb';\nimport { isActive } from '@fumadocs/ui/urls';\nimport { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/components/ui/collapsible';\nimport { useTOCItems } from '@/components/toc';\nimport { useActiveAnchor } from 'fumadocs-core/toc';\nimport { LayoutContext } from '../client';\nimport { useFooterItems } from '@fumadocs/ui/hooks/use-footer-items';\n\nconst TocPopoverContext = createContext<{\n open: boolean;\n setOpen: (open: boolean) => void;\n} | null>(null);\n\nexport function PageTOCPopover({ className, children, ...rest }: ComponentProps<'div'>) {\n const ref = useRef<HTMLElement>(null);\n const [open, setOpen] = useState(false);\n const { isNavTransparent } = use(LayoutContext)!;\n\n const onClick = useEffectEvent((e: Event) => {\n if (!open) return;\n\n if (ref.current && !ref.current.contains(e.target as HTMLElement)) setOpen(false);\n });\n\n useEffect(() => {\n window.addEventListener('click', onClick);\n\n return () => {\n window.removeEventListener('click', onClick);\n };\n }, []);\n\n return (\n <TocPopoverContext\n value={useMemo(\n () => ({\n open,\n setOpen,\n }),\n [setOpen, open],\n )}\n >\n <Collapsible\n open={open}\n onOpenChange={setOpen}\n data-toc-popover=\"\"\n className={cn(\n 'sticky top-(--fd-docs-row-2) z-10 [grid-area:toc-popover] h-(--fd-toc-popover-height) xl:hidden max-xl:layout:[--fd-toc-popover-height:--spacing(10)]',\n className,\n )}\n {...rest}\n >\n <header\n ref={ref}\n className={cn(\n 'border-b backdrop-blur-sm transition-colors',\n (!isNavTransparent || open) && 'bg-fd-background/80',\n open && 'shadow-lg',\n )}\n >\n {children}\n </header>\n </Collapsible>\n </TocPopoverContext>\n );\n}\n\nexport function PageTOCPopoverTrigger({ className, ...props }: ComponentProps<'button'>) {\n const { text } = useI18n();\n const { open } = use(TocPopoverContext)!;\n const items = useTOCItems();\n const active = useActiveAnchor();\n const selected = useMemo(\n () => items.findIndex((item) => active === item.url.slice(1)),\n [items, active],\n );\n const path = useTreePath().at(-1);\n const showItem = selected !== -1 && !open;\n\n return (\n <CollapsibleTrigger\n className={cn(\n 'flex w-full h-10 items-center text-sm text-fd-muted-foreground gap-2.5 px-4 py-2.5 text-start focus-visible:outline-none [&_svg]:size-4 md:px-6',\n className,\n )}\n data-toc-popover-trigger=\"\"\n {...props}\n >\n <ProgressCircle\n value={(selected + 1) / Math.max(1, items.length)}\n max={1}\n className={cn('shrink-0', open && 'text-fd-primary')}\n />\n <span className=\"grid flex-1 *:my-auto *:row-start-1 *:col-start-1\">\n <span\n className={cn(\n 'truncate transition-all',\n open && 'text-fd-foreground',\n showItem && 'opacity-0 -translate-y-full pointer-events-none',\n )}\n >\n {path?.name ?? text.toc}\n </span>\n <span\n className={cn(\n 'truncate transition-all',\n !showItem && 'opacity-0 translate-y-full pointer-events-none',\n )}\n >\n {items[selected]?.title}\n </span>\n </span>\n <ChevronDown className={cn('shrink-0 transition-transform mx-0.5', open && 'rotate-180')} />\n </CollapsibleTrigger>\n );\n}\n\ninterface ProgressCircleProps extends Omit<React.ComponentProps<'svg'>, 'strokeWidth'> {\n value: number;\n strokeWidth?: number;\n size?: number;\n min?: number;\n max?: number;\n}\n\nfunction clamp(input: number, min: number, max: number): number {\n if (input < min) return min;\n if (input > max) return max;\n return input;\n}\n\nfunction ProgressCircle({\n value,\n strokeWidth = 2,\n size = 24,\n min = 0,\n max = 100,\n ...restSvgProps\n}: ProgressCircleProps) {\n const normalizedValue = clamp(value, min, max);\n const radius = (size - strokeWidth) / 2;\n const circumference = 2 * Math.PI * radius;\n const progress = (normalizedValue / max) * circumference;\n const circleProps = {\n cx: size / 2,\n cy: size / 2,\n r: radius,\n fill: 'none',\n strokeWidth,\n };\n\n return (\n <svg\n role=\"progressbar\"\n viewBox={`0 0 ${size} ${size}`}\n aria-valuenow={normalizedValue}\n aria-valuemin={min}\n aria-valuemax={max}\n {...restSvgProps}\n >\n <circle {...circleProps} className=\"stroke-current/25\" />\n <circle\n {...circleProps}\n stroke=\"currentColor\"\n strokeDasharray={circumference}\n strokeDashoffset={circumference - progress}\n strokeLinecap=\"round\"\n transform={`rotate(-90 ${size / 2} ${size / 2})`}\n className=\"transition-all\"\n />\n </svg>\n );\n}\n\nexport function PageTOCPopoverContent(props: ComponentProps<'div'>) {\n return (\n <CollapsibleContent\n data-toc-popover-content=\"\"\n {...props}\n className={cn('flex flex-col px-4 max-h-[50vh] md:px-6', props.className)}\n >\n <div>{props.children}</div>\n </CollapsibleContent>\n );\n}\n\nexport function PageLastUpdate({\n date: value,\n ...props\n}: Omit<ComponentProps<'p'>, 'children'> & { date: Date }) {\n const { text } = useI18n();\n const [date, setDate] = useState('');\n\n useEffect(() => {\n // to the timezone of client\n setDate(value.toLocaleDateString());\n }, [value]);\n\n return (\n <p {...props} className={cn('text-sm text-fd-muted-foreground', props.className)}>\n {text.lastUpdate} {date}\n </p>\n );\n}\n\ntype Item = Pick<PageTree.Item, 'name' | 'description' | 'url'>;\nexport interface FooterProps extends ComponentProps<'div'> {\n /**\n * Items including information for the next and previous page\n */\n items?: {\n previous?: Item;\n next?: Item;\n };\n}\n\nexport function PageFooter({ items, children, className, ...props }: FooterProps) {\n const footerList = useFooterItems();\n const pathname = usePathname();\n\n const { previous, next } = useMemo(() => {\n if (items) return items;\n\n const idx = footerList.findIndex((item) => isActive(item.url, pathname, false));\n\n if (idx === -1) return {};\n return {\n previous: footerList[idx - 1],\n next: footerList[idx + 1],\n };\n }, [footerList, items, pathname]);\n\n return (\n <>\n <div\n className={cn(\n '@container grid gap-4',\n previous && next ? 'grid-cols-2' : 'grid-cols-1',\n className,\n )}\n {...props}\n >\n {previous && <FooterItem item={previous} index={0} />}\n {next && <FooterItem item={next} index={1} />}\n </div>\n {children}\n </>\n );\n}\n\nfunction FooterItem({ item, index }: { item: Item; index: 0 | 1 }) {\n const { text } = useI18n();\n const Icon = index === 0 ? ChevronLeft : ChevronRight;\n\n return (\n <Link\n href={item.url}\n className={cn(\n 'flex flex-col gap-2 rounded-lg border p-4 text-sm transition-colors hover:bg-fd-accent/80 hover:text-fd-accent-foreground @max-lg:col-span-full',\n index === 1 && 'text-end',\n )}\n >\n <div\n className={cn(\n 'inline-flex items-center gap-1.5 font-medium',\n index === 1 && 'flex-row-reverse',\n )}\n >\n <Icon className=\"-mx-1 size-4 shrink-0 rtl:rotate-180\" />\n <p>{item.name}</p>\n </div>\n <p className=\"text-fd-muted-foreground truncate\">\n {item.description ?? (index === 0 ? text.previousPage : text.nextPage)}\n </p>\n </Link>\n );\n}\n\nexport type BreadcrumbProps = BreadcrumbOptions & ComponentProps<'div'>;\n\nexport function PageBreadcrumb({\n includeRoot,\n includeSeparator,\n includePage,\n ...props\n}: BreadcrumbProps) {\n const path = useTreePath();\n const { root } = useTreeContext();\n const items = useMemo(() => {\n return getBreadcrumbItemsFromPath(root, path, {\n includePage,\n includeSeparator,\n includeRoot,\n });\n }, [includePage, includeRoot, includeSeparator, path, root]);\n\n if (items.length === 0) return null;\n\n return (\n <div\n {...props}\n className={cn('flex items-center gap-1.5 text-sm text-fd-muted-foreground', props.className)}\n >\n {items.map((item, i) => {\n const className = cn('truncate', i === items.length - 1 && 'text-fd-primary font-medium');\n\n return (\n <Fragment key={i}>\n {i !== 0 && <ChevronRight className=\"size-3.5 shrink-0\" />}\n {item.url ? (\n <Link\n href={item.url}\n className={cn(className, 'transition-opacity hover:opacity-80')}\n >\n {item.name}\n </Link>\n ) : (\n <span className={className}>{item.name}</span>\n )}\n </Fragment>\n );\n })}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA4BA,MAAM,oBAAoB,cAGhB,KAAK;AAEf,SAAgB,eAAe,EAAE,WAAW,UAAU,GAAG,QAA+B;CACtF,MAAM,MAAM,OAAoB,KAAK;CACrC,MAAM,CAAC,MAAM,WAAW,SAAS,MAAM;CACvC,MAAM,EAAE,qBAAqB,IAAI,cAAc;CAE/C,MAAM,UAAU,gBAAgB,MAAa;AAC3C,MAAI,CAAC,KAAM;AAEX,MAAI,IAAI,WAAW,CAAC,IAAI,QAAQ,SAAS,EAAE,OAAsB,CAAE,SAAQ,MAAM;GACjF;AAEF,iBAAgB;AACd,SAAO,iBAAiB,SAAS,QAAQ;AAEzC,eAAa;AACX,UAAO,oBAAoB,SAAS,QAAQ;;IAE7C,EAAE,CAAC;AAEN,QACE,oBAAC;EACC,OAAO,eACE;GACL;GACA;GACD,GACD,CAAC,SAAS,KAAK,CAChB;YAED,oBAAC;GACO;GACN,cAAc;GACd,oBAAiB;GACjB,WAAW,GACT,yJACA,UACD;GACD,GAAI;aAEJ,oBAAC;IACM;IACL,WAAW,GACT,gDACC,CAAC,oBAAoB,SAAS,uBAC/B,QAAQ,YACT;IAEA;KACM;IACG;GACI;;AAIxB,SAAgB,sBAAsB,EAAE,WAAW,GAAG,SAAmC;CACvF,MAAM,EAAE,oCAAkB;CAC1B,MAAM,EAAE,SAAS,IAAI,kBAAkB;CACvC,MAAM,sCAAqB;CAC3B,MAAM,SAAS,iBAAiB;CAChC,MAAM,WAAW,cACT,MAAM,WAAW,SAAS,WAAW,KAAK,IAAI,MAAM,EAAE,CAAC,EAC7D,CAAC,OAAO,OAAO,CAChB;CACD,MAAM,sCAAoB,CAAC,GAAG,GAAG;CACjC,MAAM,WAAW,aAAa,MAAM,CAAC;AA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C,QAAK,WAAU,yCAAyC,EACzD,oBAAC,iBAAG,KAAK,OAAS;IACd,EACN,oBAAC;GAAE,WAAU;aACV,KAAK,gBAAgB,UAAU,IAAI,KAAK,eAAe,KAAK;IAC3D;GACC;;AAMX,SAAgB,eAAe,EAC7B,aACA,kBACA,aACA,GAAG,SACe;CAClB,MAAM,sCAAoB;CAC1B,MAAM,EAAE,2CAAyB;CACjC,MAAM,QAAQ,cAAc;AAC1B,SAAO,2BAA2B,MAAM,MAAM;GAC5C;GACA;GACA;GACD,CAAC;IACD;EAAC;EAAa;EAAa;EAAkB;EAAM;EAAK,CAAC;AAE5D,KAAI,MAAM,WAAW,EAAG,QAAO;AAE/B,QACE,oBAAC;EACC,GAAI;EACJ,WAAW,GAAG,8DAA8D,MAAM,UAAU;YAE3F,MAAM,KAAK,MAAM,MAAM;GACtB,MAAM,YAAY,GAAG,YAAY,MAAM,MAAM,SAAS,KAAK,8BAA8B;AAEzF,UACE,qBAACA,yBACE,MAAM,KAAK,oBAAC,gBAAa,WAAU,sBAAsB,EACzD,KAAK,MACJ,oBAAC;IACC,MAAM,KAAK;IACX,WAAW,GAAG,WAAW,sCAAsC;cAE9D,KAAK;KACD,GAEP,oBAAC;IAAgB;cAAY,KAAK;KAAY,KAVnC,EAYJ;IAEb;GACE"}
@@ -1,5 +1,5 @@
1
1
  import { BreadcrumbProps, FooterProps, PageBreadcrumb, PageLastUpdate } from "./client.js";
2
- import * as react_jsx_runtime102 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime123 from "react/jsx-runtime";
3
3
  import { ComponentProps, ReactNode } from "react";
4
4
  import { AnchorProviderProps, TOCItemType } from "fumadocs-core/toc";
5
5
 
@@ -27,7 +27,9 @@ interface DocsPageProps {
27
27
  */
28
28
  breadcrumb?: Partial<BreadcrumbOptions>;
29
29
  /**
30
- * Footer navigation, you can disable it by passing `false`
30
+ * Footer navigation, located under the page body.
31
+ *
32
+ * You can specify `footer.children` to add extra components under the footer.
31
33
  */
32
34
  footer?: Partial<FooterOptions>;
33
35
  children?: ReactNode;
@@ -59,7 +61,11 @@ declare function DocsPage({
59
61
  component: breadcrumb,
60
62
  ...breadcrumbProps
61
63
  },
62
- footer,
64
+ footer: {
65
+ enabled: footerEnabled,
66
+ component: footerReplace,
67
+ ...footerProps
68
+ },
63
69
  full,
64
70
  tableOfContentPopover: {
65
71
  enabled: tocPopoverEnabled,
@@ -75,7 +81,7 @@ declare function DocsPage({
75
81
  children,
76
82
  className
77
83
  }: DocsPageProps): ReactNode;
78
- declare function EditOnGitHub(props: ComponentProps<'a'>): react_jsx_runtime102.JSX.Element;
84
+ declare function EditOnGitHub(props: ComponentProps<'a'>): react_jsx_runtime123.JSX.Element;
79
85
  /**
80
86
  * Add typography styles
81
87
  */
@@ -83,17 +89,17 @@ declare function DocsBody({
83
89
  children,
84
90
  className,
85
91
  ...props
86
- }: ComponentProps<'div'>): react_jsx_runtime102.JSX.Element;
92
+ }: ComponentProps<'div'>): react_jsx_runtime123.JSX.Element;
87
93
  declare function DocsDescription({
88
94
  children,
89
95
  className,
90
96
  ...props
91
- }: ComponentProps<'p'>): react_jsx_runtime102.JSX.Element | null;
97
+ }: ComponentProps<'p'>): react_jsx_runtime123.JSX.Element | null;
92
98
  declare function DocsTitle({
93
99
  children,
94
100
  className,
95
101
  ...props
96
- }: ComponentProps<'h1'>): react_jsx_runtime102.JSX.Element;
102
+ }: ComponentProps<'h1'>): react_jsx_runtime123.JSX.Element;
97
103
  //#endregion
98
104
  export { DocsBody, DocsDescription, DocsPage, DocsPageProps, DocsTitle, EditOnGitHub, PageBreadcrumb, PageLastUpdate };
99
105
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../../src/layouts/docs/page/index.tsx"],"sourcesContent":[],"mappings":";;;;;;UAmBU,iBAAA,SAA0B;;aAEvB;AAP6D;AAKvB,UAKzC,aAAA,SAAsB,WAEnB,CAFmB;EAKf,OAAA,EAAA,OAA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A,CAAA,CAAA,EAXyB,oBAAA,CAAA,GAAA,CAAA,OAAA,GAWzB,IAAA;AAAoB,iBAAjE,SAAA,CAAiE;EAAA,QAAA;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAApB,cAAoB,CAAA,IAAA,CAAA,CAAA,EAAA,oBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -19,7 +19,7 @@ var page_exports = /* @__PURE__ */ __exportAll({
19
19
  PageBreadcrumb: () => PageBreadcrumb,
20
20
  PageLastUpdate: () => PageLastUpdate
21
21
  });
22
- function DocsPage({ breadcrumb: { enabled: breadcrumbEnabled = true, component: breadcrumb, ...breadcrumbProps } = {}, footer = {}, full = false, tableOfContentPopover: { enabled: tocPopoverEnabled, component: tocPopover, ...tocPopoverOptions } = {}, tableOfContent: { enabled: tocEnabled, component: tocReplace, ...tocOptions } = {}, toc = [], children, className }) {
22
+ function DocsPage({ breadcrumb: { enabled: breadcrumbEnabled = true, component: breadcrumb, ...breadcrumbProps } = {}, footer: { enabled: footerEnabled, component: footerReplace, ...footerProps } = {}, full = false, tableOfContentPopover: { enabled: tocPopoverEnabled, component: tocPopover, ...tocPopoverOptions } = {}, tableOfContent: { enabled: tocEnabled, component: tocReplace, ...tocOptions } = {}, toc = [], children, className }) {
23
23
  tocEnabled ??= !full && (toc.length > 0 || tocOptions.footer !== void 0 || tocOptions.header !== void 0);
24
24
  tocPopoverEnabled ??= toc.length > 0 || tocPopoverOptions.header !== void 0 || tocPopoverOptions.footer !== void 0;
25
25
  let wrapper = (children$1) => children$1;
@@ -41,7 +41,7 @@ function DocsPage({ breadcrumb: { enabled: breadcrumbEnabled = true, component:
41
41
  children: [
42
42
  breadcrumbEnabled && (breadcrumb ?? /* @__PURE__ */ jsx(PageBreadcrumb, { ...breadcrumbProps })),
43
43
  children,
44
- footer.enabled !== false && (footer.component ?? /* @__PURE__ */ jsx(PageFooter, { items: footer.items }))
44
+ footerEnabled !== false && (footerReplace ?? /* @__PURE__ */ jsx(PageFooter, { ...footerProps }))
45
45
  ]
46
46
  }),
47
47
  tocEnabled && (tocReplace ?? /* @__PURE__ */ jsxs("div", {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["children","TOCProvider","TOCScrollArea","TocClerk","TocDefault","I18nLabel"],"sources":["../../../../src/layouts/docs/page/index.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\nimport { cn } from '@fumadocs/ui/cn';\nimport { buttonVariants } from '@/components/ui/button';\nimport { Edit, Text } from 'lucide-react';\nimport { I18nLabel } from '@/contexts/i18n';\nimport {\n type BreadcrumbProps,\n type FooterProps,\n PageBreadcrumb,\n PageFooter,\n PageTOCPopover,\n PageTOCPopoverContent,\n PageTOCPopoverTrigger,\n} from './client';\nimport type { AnchorProviderProps, TOCItemType } from 'fumadocs-core/toc';\nimport * as TocDefault from '@/components/toc/default';\nimport * as TocClerk from '@/components/toc/clerk';\nimport { TOCProvider, TOCScrollArea } from '@/components/toc';\n\ninterface BreadcrumbOptions extends BreadcrumbProps {\n enabled: boolean;\n component: ReactNode;\n}\n\ninterface FooterOptions extends FooterProps {\n enabled: boolean;\n component: ReactNode;\n}\n\nexport interface DocsPageProps {\n toc?: TOCItemType[];\n tableOfContent?: Partial<TableOfContentOptions>;\n tableOfContentPopover?: Partial<TableOfContentPopoverOptions>;\n\n /**\n * Extend the page to fill all available space\n *\n * @defaultValue false\n */\n full?: boolean;\n\n /**\n * Replace or disable breadcrumb\n */\n breadcrumb?: Partial<BreadcrumbOptions>;\n\n /**\n * Footer navigation, you can disable it by passing `false`\n */\n footer?: Partial<FooterOptions>;\n\n children?: ReactNode;\n\n /**\n * Apply class names to the `#nd-page` container.\n */\n className?: string;\n}\n\ntype TableOfContentOptions = Pick<AnchorProviderProps, 'single'> & {\n /**\n * Custom content in TOC container, before the main TOC\n */\n header?: ReactNode;\n\n /**\n * Custom content in TOC container, after the main TOC\n */\n footer?: ReactNode;\n\n enabled: boolean;\n component: ReactNode;\n\n /**\n * @defaultValue 'normal'\n */\n style?: 'normal' | 'clerk';\n};\n\ntype TableOfContentPopoverOptions = Omit<TableOfContentOptions, 'single'>;\n\nexport function DocsPage({\n breadcrumb: { enabled: breadcrumbEnabled = true, component: breadcrumb, ...breadcrumbProps } = {},\n footer = {},\n full = false,\n tableOfContentPopover: {\n enabled: tocPopoverEnabled,\n component: tocPopover,\n ...tocPopoverOptions\n } = {},\n tableOfContent: { enabled: tocEnabled, component: tocReplace, ...tocOptions } = {},\n toc = [],\n children,\n className,\n}: DocsPageProps) {\n // disable TOC on full mode, you can still enable it with `enabled` option.\n tocEnabled ??=\n !full && (toc.length > 0 || tocOptions.footer !== undefined || tocOptions.header !== undefined);\n\n tocPopoverEnabled ??=\n toc.length > 0 ||\n tocPopoverOptions.header !== undefined ||\n tocPopoverOptions.footer !== undefined;\n\n let wrapper = (children: ReactNode) => children;\n\n if (tocEnabled || tocPopoverEnabled) {\n wrapper = (children) => (\n <TOCProvider single={tocOptions.single} toc={toc}>\n {children}\n </TOCProvider>\n );\n }\n\n return wrapper(\n <>\n {tocPopoverEnabled &&\n (tocPopover ?? (\n <PageTOCPopover>\n <PageTOCPopoverTrigger />\n <PageTOCPopoverContent>\n {tocPopoverOptions.header}\n <TOCScrollArea>\n {tocPopoverOptions.style === 'clerk' ? (\n <TocClerk.TOCItems />\n ) : (\n <TocDefault.TOCItems />\n )}\n </TOCScrollArea>\n {tocPopoverOptions.footer}\n </PageTOCPopoverContent>\n </PageTOCPopover>\n ))}\n <article\n id=\"nd-page\"\n data-full={full}\n className={cn(\n 'flex flex-col w-full max-w-[900px] mx-auto [grid-area:main] px-4 py-6 gap-4 md:px-6 md:pt-8 xl:px-8 xl:pt-14',\n full ? 'max-w-[1200px]' : 'xl:layout:[--fd-toc-width:268px]',\n className,\n )}\n >\n {breadcrumbEnabled && (breadcrumb ?? <PageBreadcrumb {...breadcrumbProps} />)}\n {children}\n {footer.enabled !== false && (footer.component ?? <PageFooter items={footer.items} />)}\n </article>\n {tocEnabled &&\n (tocReplace ?? (\n <div\n id=\"nd-toc\"\n className=\"sticky top-(--fd-docs-row-1) h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] flex flex-col [grid-area:toc] w-(--fd-toc-width) pt-12 pe-4 pb-2 max-xl:hidden\"\n >\n {tocOptions.header}\n <h3\n id=\"toc-title\"\n className=\"inline-flex items-center gap-1.5 text-sm text-fd-muted-foreground\"\n >\n <Text className=\"size-4\" />\n <I18nLabel label=\"toc\" />\n </h3>\n <TOCScrollArea>\n {tocOptions.style === 'clerk' ? <TocClerk.TOCItems /> : <TocDefault.TOCItems />}\n </TOCScrollArea>\n {tocOptions.footer}\n </div>\n ))}\n </>,\n );\n}\n\nexport function EditOnGitHub(props: ComponentProps<'a'>) {\n return (\n <a\n target=\"_blank\"\n rel=\"noreferrer noopener\"\n {...props}\n className={cn(\n buttonVariants({\n color: 'secondary',\n size: 'sm',\n className: 'gap-1.5 not-prose',\n }),\n props.className,\n )}\n >\n {props.children ?? (\n <>\n <Edit className=\"size-3.5\" />\n <I18nLabel label=\"editOnGithub\" />\n </>\n )}\n </a>\n );\n}\n\n/**\n * Add typography styles\n */\nexport function DocsBody({ children, className, ...props }: ComponentProps<'div'>) {\n return (\n <div {...props} className={cn('prose flex-1', className)}>\n {children}\n </div>\n );\n}\n\nexport function DocsDescription({ children, className, ...props }: ComponentProps<'p'>) {\n // Don't render if no description provided\n if (children === undefined) return null;\n\n return (\n <p {...props} className={cn('mb-8 text-lg text-fd-muted-foreground', className)}>\n {children}\n </p>\n );\n}\n\nexport function DocsTitle({ children, className, ...props }: ComponentProps<'h1'>) {\n return (\n <h1 {...props} className={cn('text-[1.75em] font-semibold', className)}>\n {children}\n </h1>\n );\n}\n\nexport { PageLastUpdate, PageBreadcrumb } from './client';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAiFA,SAAgB,SAAS,EACvB,YAAY,EAAE,SAAS,oBAAoB,MAAM,WAAW,YAAY,GAAG,oBAAoB,EAAE,EACjG,SAAS,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AO;GACP,MAAM;GACN,WAAW;GACZ,CAAC,EACF,MAAM,UACP;YAEA,MAAM,YACL,4CACE,oBAAC,QAAK,WAAU,aAAa,EAC7B,oBAACC,0BAAU,OAAM,iBAAiB,IACjC;GAEH;;;;;AAOR,SAAgB,SAAS,EAAE,UAAU,WAAW,GAAG,SAAgC;AACjF,QACE,oBAAC;EAAI,GAAI;EAAO,WAAW,GAAG,gBAAgB,UAAU;EACrD;GACG;;AAIV,SAAgB,gBAAgB,EAAE,UAAU,WAAW,GAAG,SAA8B;AAEtF,KAAI,aAAa,OAAW,QAAO;AAEnC,QACE,oBAAC;EAAE,GAAI;EAAO,WAAW,GAAG,yCAAyC,UAAU;EAC5E;GACC;;AAIR,SAAgB,UAAU,EAAE,UAAU,WAAW,GAAG,SAA+B;AACjF,QACE,oBAAC;EAAG,GAAI;EAAO,WAAW,GAAG,+BAA+B,UAAU;EACnE;GACE"}
1
+ {"version":3,"file":"index.js","names":["children","TOCProvider","TOCScrollArea","TocClerk","TocDefault","I18nLabel"],"sources":["../../../../src/layouts/docs/page/index.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\nimport { cn } from '@fumadocs/ui/cn';\nimport { buttonVariants } from '@/components/ui/button';\nimport { Edit, Text } from 'lucide-react';\nimport { I18nLabel } from '@/contexts/i18n';\nimport {\n type BreadcrumbProps,\n type FooterProps,\n PageBreadcrumb,\n PageFooter,\n PageTOCPopover,\n PageTOCPopoverContent,\n PageTOCPopoverTrigger,\n} from './client';\nimport type { AnchorProviderProps, TOCItemType } from 'fumadocs-core/toc';\nimport * as TocDefault from '@/components/toc/default';\nimport * as TocClerk from '@/components/toc/clerk';\nimport { TOCProvider, TOCScrollArea } from '@/components/toc';\n\ninterface BreadcrumbOptions extends BreadcrumbProps {\n enabled: boolean;\n component: ReactNode;\n}\n\ninterface FooterOptions extends FooterProps {\n enabled: boolean;\n component: ReactNode;\n}\n\nexport interface DocsPageProps {\n toc?: TOCItemType[];\n tableOfContent?: Partial<TableOfContentOptions>;\n tableOfContentPopover?: Partial<TableOfContentPopoverOptions>;\n\n /**\n * Extend the page to fill all available space\n *\n * @defaultValue false\n */\n full?: boolean;\n\n /**\n * Replace or disable breadcrumb\n */\n breadcrumb?: Partial<BreadcrumbOptions>;\n\n /**\n * Footer navigation, located under the page body.\n *\n * You can specify `footer.children` to add extra components under the footer.\n */\n footer?: Partial<FooterOptions>;\n\n children?: ReactNode;\n\n /**\n * Apply class names to the `#nd-page` container.\n */\n className?: string;\n}\n\ntype TableOfContentOptions = Pick<AnchorProviderProps, 'single'> & {\n /**\n * Custom content in TOC container, before the main TOC\n */\n header?: ReactNode;\n\n /**\n * Custom content in TOC container, after the main TOC\n */\n footer?: ReactNode;\n\n enabled: boolean;\n component: ReactNode;\n\n /**\n * @defaultValue 'normal'\n */\n style?: 'normal' | 'clerk';\n};\n\ntype TableOfContentPopoverOptions = Omit<TableOfContentOptions, 'single'>;\n\nexport function DocsPage({\n breadcrumb: { enabled: breadcrumbEnabled = true, component: breadcrumb, ...breadcrumbProps } = {},\n footer: { enabled: footerEnabled, component: footerReplace, ...footerProps } = {},\n full = false,\n tableOfContentPopover: {\n enabled: tocPopoverEnabled,\n component: tocPopover,\n ...tocPopoverOptions\n } = {},\n tableOfContent: { enabled: tocEnabled, component: tocReplace, ...tocOptions } = {},\n toc = [],\n children,\n className,\n}: DocsPageProps) {\n // disable TOC on full mode, you can still enable it with `enabled` option.\n tocEnabled ??=\n !full && (toc.length > 0 || tocOptions.footer !== undefined || tocOptions.header !== undefined);\n\n tocPopoverEnabled ??=\n toc.length > 0 ||\n tocPopoverOptions.header !== undefined ||\n tocPopoverOptions.footer !== undefined;\n\n let wrapper = (children: ReactNode) => children;\n\n if (tocEnabled || tocPopoverEnabled) {\n wrapper = (children) => (\n <TOCProvider single={tocOptions.single} toc={toc}>\n {children}\n </TOCProvider>\n );\n }\n\n return wrapper(\n <>\n {tocPopoverEnabled &&\n (tocPopover ?? (\n <PageTOCPopover>\n <PageTOCPopoverTrigger />\n <PageTOCPopoverContent>\n {tocPopoverOptions.header}\n <TOCScrollArea>\n {tocPopoverOptions.style === 'clerk' ? (\n <TocClerk.TOCItems />\n ) : (\n <TocDefault.TOCItems />\n )}\n </TOCScrollArea>\n {tocPopoverOptions.footer}\n </PageTOCPopoverContent>\n </PageTOCPopover>\n ))}\n <article\n id=\"nd-page\"\n data-full={full}\n className={cn(\n 'flex flex-col w-full max-w-[900px] mx-auto [grid-area:main] px-4 py-6 gap-4 md:px-6 md:pt-8 xl:px-8 xl:pt-14',\n full ? 'max-w-[1200px]' : 'xl:layout:[--fd-toc-width:268px]',\n className,\n )}\n >\n {breadcrumbEnabled && (breadcrumb ?? <PageBreadcrumb {...breadcrumbProps} />)}\n {children}\n {footerEnabled !== false && (footerReplace ?? <PageFooter {...footerProps} />)}\n </article>\n {tocEnabled &&\n (tocReplace ?? (\n <div\n id=\"nd-toc\"\n className=\"sticky top-(--fd-docs-row-1) h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] flex flex-col [grid-area:toc] w-(--fd-toc-width) pt-12 pe-4 pb-2 max-xl:hidden\"\n >\n {tocOptions.header}\n <h3\n id=\"toc-title\"\n className=\"inline-flex items-center gap-1.5 text-sm text-fd-muted-foreground\"\n >\n <Text className=\"size-4\" />\n <I18nLabel label=\"toc\" />\n </h3>\n <TOCScrollArea>\n {tocOptions.style === 'clerk' ? <TocClerk.TOCItems /> : <TocDefault.TOCItems />}\n </TOCScrollArea>\n {tocOptions.footer}\n </div>\n ))}\n </>,\n );\n}\n\nexport function EditOnGitHub(props: ComponentProps<'a'>) {\n return (\n <a\n target=\"_blank\"\n rel=\"noreferrer noopener\"\n {...props}\n className={cn(\n buttonVariants({\n color: 'secondary',\n size: 'sm',\n className: 'gap-1.5 not-prose',\n }),\n props.className,\n )}\n >\n {props.children ?? (\n <>\n <Edit className=\"size-3.5\" />\n <I18nLabel label=\"editOnGithub\" />\n </>\n )}\n </a>\n );\n}\n\n/**\n * Add typography styles\n */\nexport function DocsBody({ children, className, ...props }: ComponentProps<'div'>) {\n return (\n <div {...props} className={cn('prose flex-1', className)}>\n {children}\n </div>\n );\n}\n\nexport function DocsDescription({ children, className, ...props }: ComponentProps<'p'>) {\n // Don't render if no description provided\n if (children === undefined) return null;\n\n return (\n <p {...props} className={cn('mb-8 text-lg text-fd-muted-foreground', className)}>\n {children}\n </p>\n );\n}\n\nexport function DocsTitle({ children, className, ...props }: ComponentProps<'h1'>) {\n return (\n <h1 {...props} className={cn('text-[1.75em] font-semibold', className)}>\n {children}\n </h1>\n );\n}\n\nexport { PageLastUpdate, PageBreadcrumb } from './client';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAmFA,SAAgB,SAAS,EACvB,YAAY,EAAE,SAAS,oBAAoB,MAAM,WAAW,YAAY,GAAG,oBAAoB,EAAE,EACjG,QAAQ,EAAE,SAAS,eAAe,WAAW,eAAe,GAAG,gBAAgB,EAAE,EACjF,OAAO,OACP,uBAAuB,EACrB,SAAS,mBACT,WAAW,YACX,GAAG,sBACD,EAAE,EACN,gBAAgB,EAAE,SAAS,YAAY,WAAW,YAAY,GAAG,eAAe,EAAE,EAClF,MAAM,EAAE,EACR,UACA,aACgB;AAEhB,gBACE,CAAC,SAAS,IAAI,SAAS,KAAK,WAAW,WAAW,UAAa,WAAW,WAAW;AAEvF,uBACE,IAAI,SAAS,KACb,kBAAkB,WAAW,UAC7B,kBAAkB,WAAW;CAE/B,IAAI,WAAW,eAAwBA;AAEvC,KAAI,cAAc,kBAChB,YAAW,eACT,oBAACC;EAAY,QAAQ,WAAW;EAAa;YAC1CD;GACW;AAIlB,QAAO,QACL;EACG,sBACE,cACC,qBAAC,6BACC,oBAAC,0BAAwB,EACzB,qBAAC;GACE,kBAAkB;GACnB,oBAACE,uCACE,kBAAkB,UAAU,UAC3B,oBAACC,cAAS,aAAW,GAErB,oBAACC,gBAAW,aAAW,GAEX;GACf,kBAAkB;MACG,IACT;EAErB,qBAAC;GACC,IAAG;GACH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