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.
- package/dist/chunk-2BHQGWSJ.js +261 -0
- package/dist/{chunk-TDTHXDET.js → chunk-34Z7WODD.js} +2 -1
- package/dist/{chunk-IN5NHEZV.js → chunk-3F57TIUQ.js} +20 -5
- package/dist/{chunk-UKE65HV3.js → chunk-5CZEA2KX.js} +2 -2
- package/dist/{chunk-PXDQVGII.js → chunk-7EMVRXMS.js} +10 -1
- package/dist/{chunk-PW7TBOIJ.js → chunk-CRYPD6UZ.js} +2 -1
- package/dist/{chunk-XXVXIK4M.js → chunk-E5OQ6FBQ.js} +1 -1
- package/dist/{chunk-WNKY4RA5.js → chunk-UBVEKNRF.js} +1 -1
- package/dist/components/accordion.js +2 -2
- package/dist/components/api.js +2 -2
- package/dist/components/callout.d.ts +1 -1
- package/dist/components/codeblock.js +1 -1
- package/dist/components/dialog/search-algolia.js +3 -2
- package/dist/components/dialog/search-default.js +3 -2
- package/dist/components/dialog/search.js +3 -2
- package/dist/components/files.js +1 -1
- package/dist/components/heading.js +1 -1
- package/dist/components/layout/language-toggle.d.ts +6 -0
- package/dist/components/layout/language-toggle.js +58 -0
- package/dist/components/layout/root-toggle.d.ts +16 -0
- package/dist/components/layout/root-toggle.js +60 -0
- package/dist/components/roll-button.d.ts +1 -1
- package/dist/components/roll-button.js +22 -9
- package/dist/components/type-table.js +1 -1
- package/dist/docs.client.d.ts +19 -0
- package/dist/docs.client.js +406 -0
- package/dist/{i18n-K879Pt9h.d.ts → i18n-CE8z-AAs.d.ts} +1 -0
- package/dist/i18n.d.ts +3 -6
- package/dist/i18n.js +4 -102
- package/dist/{layout-WuS8Ab4e.d.ts → layout.client-Duq0TTke.d.ts} +23 -15
- package/dist/layout.client.d.ts +2 -8
- package/dist/layout.client.js +37 -590
- package/dist/layout.d.ts +1 -1
- package/dist/layout.js +45 -26
- package/dist/mdx.client.js +1 -1
- package/dist/mdx.js +2 -2
- package/dist/page.client.js +7 -7
- package/dist/page.js +17 -8
- package/dist/provider.d.ts +11 -12
- package/dist/provider.js +9 -10
- package/dist/style.css +1 -1
- package/dist/tailwind-plugin.cjs +21 -22
- package/dist/tailwind-plugin.js +21 -22
- package/dist/twoslash/popup.js +1 -1
- package/dist/twoslash.css +1 -1
- 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,
|
|
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,
|
|
54
|
-
|
|
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, '
|
|
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
|
|
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,
|
|
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 };
|
package/dist/layout.client.d.ts
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
export {
|
|
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';
|