fumadocs-ui 11.3.2 → 12.0.1

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 (46) hide show
  1. package/dist/chunk-2BHQGWSJ.js +261 -0
  2. package/dist/{chunk-TDTHXDET.js → chunk-34Z7WODD.js} +2 -1
  3. package/dist/{chunk-IN5NHEZV.js → chunk-3F57TIUQ.js} +20 -5
  4. package/dist/{chunk-UKE65HV3.js → chunk-5CZEA2KX.js} +2 -2
  5. package/dist/{chunk-PXDQVGII.js → chunk-7EMVRXMS.js} +10 -1
  6. package/dist/{chunk-PW7TBOIJ.js → chunk-CRYPD6UZ.js} +2 -1
  7. package/dist/{chunk-XXVXIK4M.js → chunk-E5OQ6FBQ.js} +1 -1
  8. package/dist/{chunk-WNKY4RA5.js → chunk-UBVEKNRF.js} +1 -1
  9. package/dist/components/accordion.js +2 -2
  10. package/dist/components/api.js +2 -2
  11. package/dist/components/callout.d.ts +1 -1
  12. package/dist/components/codeblock.js +1 -1
  13. package/dist/components/dialog/search-algolia.js +3 -2
  14. package/dist/components/dialog/search-default.js +3 -2
  15. package/dist/components/dialog/search.js +3 -2
  16. package/dist/components/files.js +1 -1
  17. package/dist/components/heading.js +1 -1
  18. package/dist/components/layout/language-toggle.d.ts +6 -0
  19. package/dist/components/layout/language-toggle.js +58 -0
  20. package/dist/components/layout/root-toggle.d.ts +16 -0
  21. package/dist/components/layout/root-toggle.js +60 -0
  22. package/dist/components/roll-button.d.ts +1 -1
  23. package/dist/components/roll-button.js +22 -9
  24. package/dist/components/type-table.js +1 -1
  25. package/dist/docs.client.d.ts +19 -0
  26. package/dist/docs.client.js +406 -0
  27. package/dist/{i18n-K879Pt9h.d.ts → i18n-CE8z-AAs.d.ts} +1 -0
  28. package/dist/i18n.d.ts +3 -6
  29. package/dist/i18n.js +4 -102
  30. package/dist/{layout-WuS8Ab4e.d.ts → layout.client-Duq0TTke.d.ts} +23 -15
  31. package/dist/layout.client.d.ts +2 -8
  32. package/dist/layout.client.js +37 -590
  33. package/dist/layout.d.ts +1 -1
  34. package/dist/layout.js +45 -26
  35. package/dist/mdx.client.js +1 -1
  36. package/dist/mdx.js +2 -2
  37. package/dist/page.client.js +7 -7
  38. package/dist/page.js +17 -8
  39. package/dist/provider.d.ts +11 -12
  40. package/dist/provider.js +9 -10
  41. package/dist/style.css +1 -1
  42. package/dist/tailwind-plugin.cjs +21 -22
  43. package/dist/tailwind-plugin.js +21 -22
  44. package/dist/twoslash/popup.js +1 -1
  45. package/dist/twoslash.css +1 -1
  46. package/package.json +4 -5
@@ -1,5 +1,5 @@
1
- import { PageTree } from 'fumadocs-core/server';
2
1
  import { ReactNode, HTMLAttributes } from 'react';
2
+ import { PageTree } from 'fumadocs-core/server';
3
3
 
4
4
  interface NavProps {
5
5
  title?: ReactNode;
@@ -8,8 +8,6 @@ interface NavProps {
8
8
  * @defaultValue '/'
9
9
  */
10
10
  url?: string;
11
- items: LinkItemType[];
12
- enableSidebar: boolean;
13
11
  /**
14
12
  * Show/hide search toggle
15
13
  *
@@ -23,7 +21,9 @@ interface NavProps {
23
21
  transparentMode?: 'always' | 'top' | 'none';
24
22
  children?: ReactNode;
25
23
  }
26
- declare function Nav({ title, url, items, transparentMode, enableSidebar, enableSearch, children, }: NavProps): React.ReactElement;
24
+ declare function Nav({ title, url, items, transparentMode, enableSearch, children, }: NavProps & {
25
+ items: LinkItemType[];
26
+ }): React.ReactElement;
27
27
 
28
28
  interface SidebarProps {
29
29
  items: LinkItemType[];
@@ -36,7 +36,9 @@ interface SidebarProps {
36
36
  defaultOpenLevel?: number;
37
37
  components?: Partial<Components>;
38
38
  banner?: React.ReactNode;
39
+ bannerProps?: HTMLAttributes<HTMLDivElement>;
39
40
  footer?: React.ReactNode;
41
+ footerProps?: HTMLAttributes<HTMLDivElement>;
40
42
  }
41
43
  interface Components {
42
44
  Item: React.FC<{
@@ -50,8 +52,8 @@ interface Components {
50
52
  item: PageTree.Separator;
51
53
  }>;
52
54
  }
53
- declare function Sidebar({ footer, components, defaultOpenLevel, banner, items, ...props }: SidebarProps & {
54
- className?: string;
55
+ declare function Sidebar({ footer, components, defaultOpenLevel, banner, items, aside, bannerProps, footerProps, }: SidebarProps & {
56
+ aside?: HTMLAttributes<HTMLElement> & Record<string, unknown>;
55
57
  }): React.ReactElement;
56
58
 
57
59
  type ActiveType = 'none' | 'url' | 'nested-url';
@@ -85,13 +87,9 @@ type LinkItemType = {
85
87
  text: string;
86
88
  external?: boolean;
87
89
  };
88
- interface NavOptions extends Omit<NavProps, 'enableSidebar' | 'collapsibleSidebar' | 'items'> {
90
+ interface NavOptions extends Omit<NavProps, 'items'> {
89
91
  enabled: boolean;
90
92
  component: ReactNode;
91
- /**
92
- * GitHub url displayed on the navbar
93
- */
94
- githubUrl: string;
95
93
  }
96
94
  interface SidebarOptions extends Omit<SidebarProps, 'items'> {
97
95
  enabled: boolean;
@@ -99,19 +97,29 @@ interface SidebarOptions extends Omit<SidebarProps, 'items'> {
99
97
  collapsible: boolean;
100
98
  }
101
99
  interface BaseLayoutProps {
100
+ /**
101
+ * GitHub url
102
+ */
103
+ githubUrl?: string;
102
104
  links?: LinkItemType[];
103
105
  /**
104
106
  * Replace or disable navbar
105
107
  */
106
108
  nav?: Partial<NavOptions>;
107
- children: ReactNode;
109
+ children?: ReactNode;
108
110
  }
109
111
  interface DocsLayoutProps extends BaseLayoutProps {
110
112
  tree: PageTree.Root;
111
113
  sidebar?: Partial<SidebarOptions>;
112
114
  containerProps?: HTMLAttributes<HTMLDivElement>;
115
+ /**
116
+ * Enable Language Switch
117
+ *
118
+ * @defaultValue false
119
+ */
120
+ i18n?: boolean;
113
121
  }
114
- declare function Layout({ nav, links, children, }: BaseLayoutProps): React.ReactElement;
115
- declare function DocsLayout({ nav, sidebar, links, containerProps, tree, children, }: DocsLayoutProps): React.ReactElement;
122
+ declare function Layout({ nav, links, githubUrl, children, }: BaseLayoutProps): React.ReactElement;
123
+ declare function DocsLayout({ nav, githubUrl, sidebar, links, containerProps, tree, i18n, children, }: DocsLayoutProps): React.ReactElement;
116
124
 
117
- export { type BaseLayoutProps as B, type DocsLayoutProps as D, type LinkItemType as L, Nav as N, type SidebarProps as S, Sidebar as a, Layout as b, DocsLayout as c };
125
+ export { type BaseLayoutProps as B, type DocsLayoutProps as D, type LinkItemType as L, type NavProps as N, type SidebarProps as S, Sidebar as a, Layout as b, DocsLayout as c, Nav as d };
@@ -1,9 +1,3 @@
1
- export { T as TreeContextProvider } from './tree-CrKzI9Nz.js';
2
- import { S as SidebarProps } from './layout-WuS8Ab4e.js';
3
- export { N as Nav, a as Sidebar } from './layout-WuS8Ab4e.js';
4
- import 'fumadocs-core/server';
1
+ export { d as Nav } from './layout.client-Duq0TTke.js';
5
2
  import 'react';
6
-
7
- declare function DynamicSidebar(props: SidebarProps): React.ReactElement;
8
-
9
- export { DynamicSidebar };
3
+ import 'fumadocs-core/server';