fumadocs-ui 15.2.8 → 15.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/preset.css +2 -7
- package/css/shadcn.css +18 -0
- package/dist/components/callout.js +1 -1
- package/dist/components/codeblock.d.ts.map +1 -1
- package/dist/components/codeblock.js +1 -1
- package/dist/components/layout/root-toggle.js +1 -1
- package/dist/components/layout/sidebar.js +1 -1
- package/dist/layouts/docs.d.ts +2 -2
- package/dist/layouts/docs.d.ts.map +1 -1
- package/dist/layouts/docs.js +5 -5
- package/dist/layouts/notebook.js +4 -4
- package/dist/mdx.server.d.ts.map +1 -1
- package/dist/mdx.server.js +5 -2
- package/dist/style.css +29 -16
- package/package.json +3 -3
package/css/preset.css
CHANGED
|
@@ -40,10 +40,8 @@
|
|
|
40
40
|
|
|
41
41
|
@utility fd-steps {
|
|
42
42
|
counter-reset: step;
|
|
43
|
-
border-left-width: 1px;
|
|
44
|
-
margin-left: 1rem;
|
|
45
|
-
padding-left: 1.75rem;
|
|
46
43
|
position: relative;
|
|
44
|
+
@apply pl-6 ml-2 border-l sm:ml-4 sm:pl-7;
|
|
47
45
|
}
|
|
48
46
|
|
|
49
47
|
@utility fd-step {
|
|
@@ -52,16 +50,13 @@
|
|
|
52
50
|
color: var(--color-fd-secondary-foreground);
|
|
53
51
|
content: counter(step);
|
|
54
52
|
counter-increment: step;
|
|
55
|
-
border-radius: 9999px;
|
|
56
53
|
justify-content: center;
|
|
57
54
|
align-items: center;
|
|
58
|
-
width: 2rem;
|
|
59
|
-
height: 2rem;
|
|
60
55
|
font-size: 0.875rem;
|
|
61
56
|
line-height: 1.25rem;
|
|
62
57
|
display: flex;
|
|
63
58
|
position: absolute;
|
|
64
|
-
|
|
59
|
+
@apply size-8 -start-4 rounded-full;
|
|
65
60
|
}
|
|
66
61
|
}
|
|
67
62
|
|
package/css/shadcn.css
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
@theme {
|
|
2
|
+
--color-fd-background: var(--background);
|
|
3
|
+
--color-fd-foreground: var(--foreground);
|
|
4
|
+
--color-fd-muted: var(--muted);
|
|
5
|
+
--color-fd-muted-foreground: var(--muted-foreground);
|
|
6
|
+
--color-fd-popover: var(--popover);
|
|
7
|
+
--color-fd-popover-foreground: var(--popover-foreground);
|
|
8
|
+
--color-fd-card: var(--card);
|
|
9
|
+
--color-fd-card-foreground: var(--card-foreground);
|
|
10
|
+
--color-fd-border: var(--border);
|
|
11
|
+
--color-fd-primary: var(--primary);
|
|
12
|
+
--color-fd-primary-foreground: var(--primary-foreground);
|
|
13
|
+
--color-fd-secondary: var(--secondary);
|
|
14
|
+
--color-fd-secondary-foreground: var(--secondary-foreground);
|
|
15
|
+
--color-fd-accent: var(--accent);
|
|
16
|
+
--color-fd-accent-foreground: var(--accent-foreground);
|
|
17
|
+
--color-fd-ring: var(--ring);
|
|
18
|
+
}
|
|
@@ -20,6 +20,6 @@ export const Callout = forwardRef(({ className, children, title, type = 'info',
|
|
|
20
20
|
info: _jsx(Info, { className: "size-5 fill-blue-500 text-fd-card" }),
|
|
21
21
|
warn: (_jsx(AlertTriangle, { className: "size-5 fill-orange-500 text-fd-card" })),
|
|
22
22
|
error: _jsx(CircleX, { className: "size-5 fill-red-500 text-fd-card" }),
|
|
23
|
-
}[type], _jsxs("div", { className: "min-w-0 flex-1", children: [title ? _jsx("p", { className: "
|
|
23
|
+
}[type], _jsxs("div", { className: "min-w-0 flex-1", children: [title ? _jsx("p", { className: "font-medium !my-0", children: title }) : null, _jsx("div", { className: "text-fd-muted-foreground prose-no-margin mt-2 empty:hidden", children: children })] })] }));
|
|
24
24
|
});
|
|
25
25
|
Callout.displayName = 'Callout';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codeblock.d.ts","sourceRoot":"","sources":["../../src/components/codeblock.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"codeblock.d.ts","sourceRoot":"","sources":["../../src/components/codeblock.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,SAAS,EAGf,MAAM,OAAO,CAAC;AASf,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAE3E,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG;IACzD;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,aAAa,CAAC,EAAE,uBAAuB,CAAC;CACzC,CAAC;AAEF,eAAO,MAAM,GAAG,2HAYf,CAAC;AAIF,eAAO,MAAM,SAAS;IAxCpB;;;;OAIG;WACI,SAAS;IAEhB;;;;OAIG;gBACS,OAAO;IAEnB;;;;OAIG;qBACc,OAAO;oBAER,uBAAuB;+CAkGxC,CAAC"}
|
|
@@ -22,7 +22,7 @@ export const CodeBlock = forwardRef(({ title, allowCopy = true, keepBackground =
|
|
|
22
22
|
});
|
|
23
23
|
void navigator.clipboard.writeText(clone.textContent ?? '');
|
|
24
24
|
}, []);
|
|
25
|
-
return (_jsxs("figure", { ref: ref, ...props, className: cn('not-prose group fd-codeblock relative my-
|
|
25
|
+
return (_jsxs("figure", { ref: ref, ...props, className: cn('not-prose group fd-codeblock relative my-4 overflow-hidden rounded-lg border bg-fd-secondary/50 text-sm', keepBackground && 'bg-(--shiki-light-bg) dark:bg-(--shiki-dark-bg)', props.className), children: [title ? (_jsxs("div", { className: "flex items-center gap-2 border-b bg-fd-muted px-4 py-1.5", children: [icon ? (_jsx("div", { className: "text-fd-muted-foreground [&_svg]:size-3.5", dangerouslySetInnerHTML: typeof icon === 'string'
|
|
26
26
|
? {
|
|
27
27
|
__html: icon,
|
|
28
28
|
}
|
|
@@ -22,7 +22,7 @@ export function RootToggle({ options, placeholder, ...props }) {
|
|
|
22
22
|
setOpen(false);
|
|
23
23
|
};
|
|
24
24
|
const item = selected ? _jsx(Item, { ...selected }) : placeholder;
|
|
25
|
-
return (_jsxs(Popover, { open: open, onOpenChange: setOpen, children: [item ? (_jsxs(PopoverTrigger, { ...props, className: cn('flex
|
|
25
|
+
return (_jsxs(Popover, { open: open, onOpenChange: setOpen, children: [item ? (_jsxs(PopoverTrigger, { ...props, className: cn('flex items-center gap-2.5 rounded-lg pe-2 hover:text-fd-accent-foreground', props.className), children: [item, _jsx(ChevronsUpDown, { className: "size-4 text-fd-muted-foreground" })] })) : null, _jsx(PopoverContent, { className: "w-(--radix-popover-trigger-width) overflow-hidden p-0", children: options.map((item) => (_jsx(Link, { href: item.url, onClick: onClick, ...item.props, className: cn('flex w-full flex-row items-center gap-2 px-2 py-1.5', selected === item
|
|
26
26
|
? 'bg-fd-accent text-fd-accent-foreground'
|
|
27
27
|
: 'hover:bg-fd-accent/50', item.props?.className), children: _jsx(Item, { ...item }) }, item.url))) })] }));
|
|
28
28
|
}
|
|
@@ -70,7 +70,7 @@ export function Sidebar({ defaultOpenLevel = 0, prefetch = true, inner, ...props
|
|
|
70
70
|
}, children: _jsx("div", { ...inner, className: cn('flex size-full max-w-full flex-col pt-2 md:ms-auto md:w-(--fd-sidebar-width) md:border-e md:pt-4', inner?.className), children: props.children }) }) }));
|
|
71
71
|
}
|
|
72
72
|
export function SidebarHeader(props) {
|
|
73
|
-
return (_jsx("div", { ...props, className: cn('flex flex-col gap-
|
|
73
|
+
return (_jsx("div", { ...props, className: cn('flex flex-col gap-3 px-4 empty:hidden', props.className), children: props.children }));
|
|
74
74
|
}
|
|
75
75
|
export function SidebarFooter(props) {
|
|
76
76
|
return (_jsx("div", { ...props, className: cn('flex flex-col border-t px-4 py-3 empty:hidden', props.className), children: props.children }));
|
package/dist/layouts/docs.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PageTree } from 'fumadocs-core/server';
|
|
2
|
-
import { type
|
|
3
|
-
import { type
|
|
2
|
+
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
3
|
+
import { type IconItemType, type LinkItemType } from '../layouts/links.js';
|
|
4
4
|
import { type BaseLayoutProps } from './shared.js';
|
|
5
5
|
import { CollapsibleControl, Navbar, NavbarSidebarTrigger } from '../layouts/docs-client.js';
|
|
6
6
|
import { type SidebarOptions } from '../layouts/docs/shared.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/layouts/docs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/layouts/docs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;AAcrE,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,YAAY,EAClB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,KAAK,eAAe,EAAY,MAAM,UAAU,CAAC;AAK1D,OAAO,EACL,kBAAkB,EAClB,MAAM,EACN,oBAAoB,EACrB,MAAM,uBAAuB,CAAC;AAO/B,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAQ/B,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC;IAEpB,OAAO,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG;QAClC,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,SAAS,CAAC,EAAE,SAAS,CAAC;KACvB,CAAC;IAEF;;OAEG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;CACjD;AAED,wBAAgB,UAAU,CAAC,EACzB,GAAG,EAAE,EAAE,eAAe,EAAE,GAAG,GAAG,EAAO,EACrC,YAAY,EACZ,kBAA0B,EAC1B,WAA8C,EAC9C,OAAO,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,OAAO,EAAO,EAC9C,IAAY,EACZ,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,eAAe,GAAG,SAAS,CAkG7B;AAED,wBAAgB,iBAAiB,CAAC,EAChC,WAAkB,EAClB,UAAU,EACV,GAAG,EACH,KAAU,EACV,MAAM,EACN,MAAM,EACN,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,GAAG;IAChC,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;IACvB,GAAG,CAAC,EAAE,SAAS,CAAC;CACjB,2CA2CA;AAED,wBAAgB,uBAAuB,CAAC,EACtC,IAAI,EACJ,WAAW,EACX,KAAU,GACX,EAAE;IACD,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IAC/B,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;IACvB,WAAW,CAAC,EAAE,eAAe,CAAC,aAAa,CAAC,CAAC;CAC9C,kDAiCA;AAED,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAE,oBAAoB,EAAE,KAAK,YAAY,EAAE,CAAC;AAC/E,OAAO,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/layouts/docs.js
CHANGED
|
@@ -3,7 +3,7 @@ import { useMemo } from 'react';
|
|
|
3
3
|
import { Languages, SidebarIcon } from 'lucide-react';
|
|
4
4
|
import { cn } from '../utils/cn.js';
|
|
5
5
|
import { buttonVariants } from '../components/ui/button.js';
|
|
6
|
-
import { CollapsibleSidebar, Sidebar, SidebarFooter, SidebarHeader,
|
|
6
|
+
import { CollapsibleSidebar, Sidebar, SidebarCollapseTrigger, SidebarFooter, SidebarHeader, SidebarPageTree, SidebarViewport, } from '../components/layout/sidebar.js';
|
|
7
7
|
import { slot, slots } from '../layouts/shared.js';
|
|
8
8
|
import { BaseLinkItem, } from '../layouts/links.js';
|
|
9
9
|
import { RootToggle } from '../components/layout/root-toggle.js';
|
|
@@ -14,7 +14,7 @@ import { TreeContextProvider } from '../contexts/tree.js';
|
|
|
14
14
|
import { ThemeToggle } from '../components/layout/theme-toggle.js';
|
|
15
15
|
import { LargeSearchToggle, SearchToggle, } from '../components/layout/search-toggle.js';
|
|
16
16
|
import { getSidebarTabsFromOptions, layoutVariables, SidebarLinkItem, } from '../layouts/docs/shared.js';
|
|
17
|
-
import {
|
|
17
|
+
import { NavProvider, StylesProvider, } from '../contexts/layout.js';
|
|
18
18
|
import Link from 'fumadocs-core/link';
|
|
19
19
|
export function DocsLayout({ nav: { transparentMode, ...nav } = {}, searchToggle, disableThemeSwitch = false, themeSwitch = { enabled: !disableThemeSwitch }, sidebar: { tabs: tabOptions, ...sidebar } = {}, i18n = false, children, ...props }) {
|
|
20
20
|
const tabs = useMemo(() => getSidebarTabsFromOptions(tabOptions, props.tree) ?? [], [tabOptions, props.tree]);
|
|
@@ -29,14 +29,14 @@ export function DocsLayout({ nav: { transparentMode, ...nav } = {}, searchToggle
|
|
|
29
29
|
return (_jsx(TreeContextProvider, { tree: props.tree, children: _jsxs(NavProvider, { transparentMode: transparentMode, children: [slot(nav, _jsxs(Navbar, { className: "md:hidden", children: [_jsx(Link, { href: nav.url ?? '/', className: "inline-flex items-center gap-2.5 font-semibold", children: nav.title }), _jsx("div", { className: "flex flex-1 flex-row items-center gap-1", children: nav.children }), slots('sm', searchToggle, _jsx(SearchToggle, { hideIfDisabled: true })), _jsx(NavbarSidebarTrigger, { className: "-me-2 md:hidden" })] })), _jsxs("main", { id: "nd-docs-layout", ...props.containerProps, className: cn('flex flex-1 flex-row pe-(--fd-layout-offset)', variables, props.containerProps?.className), style: {
|
|
30
30
|
...layoutVariables,
|
|
31
31
|
...props.containerProps?.style,
|
|
32
|
-
}, children: [slot(sidebar, _jsx(DocsLayoutSidebar, { ...sidebar, links: links, nav: _jsxs(_Fragment, { children: [_jsx(Link, { href: nav.url ?? '/', className: "inline-flex text-[15px] items-center gap-2.5 font-medium", children: nav.title }), nav.children] }), banner: _jsxs(_Fragment, { children: [tabs.length > 0 ?
|
|
32
|
+
}, children: [slot(sidebar, _jsx(DocsLayoutSidebar, { ...sidebar, links: links, nav: _jsxs(_Fragment, { children: [_jsx(Link, { href: nav.url ?? '/', className: "inline-flex text-[15px] items-center gap-2.5 font-medium", children: nav.title }), nav.children] }), banner: _jsxs(_Fragment, { children: [tabs.length > 0 ? _jsx(RootToggle, { options: tabs }) : null, slots('lg', searchToggle, _jsx(LargeSearchToggle, { hideIfDisabled: true, className: "rounded-lg max-md:hidden" })), sidebar.banner] }), footer: _jsxs(_Fragment, { children: [_jsx(DocsLayoutSidebarFooter, { links: links.filter((item) => item.type === 'icon'), i18n: i18n, themeSwitch: themeSwitch }), sidebar.footer] }) })), _jsx(StylesProvider, { ...pageStyles, children: children })] })] }) }));
|
|
33
33
|
}
|
|
34
34
|
export function DocsLayoutSidebar({ collapsible = true, components, nav, links = [], footer, banner, ...props }) {
|
|
35
35
|
const Aside = collapsible ? CollapsibleSidebar : Sidebar;
|
|
36
|
-
return (_jsxs(_Fragment, { children: [collapsible ? _jsx(CollapsibleControl, {}) : null, _jsxs(Aside, { ...props, className: cn('md:ps-(--fd-layout-offset)', props.className), children: [_jsxs(SidebarHeader, { children: [_jsxs("div", { className: "flex flex-row
|
|
36
|
+
return (_jsxs(_Fragment, { children: [collapsible ? _jsx(CollapsibleControl, {}) : null, _jsxs(Aside, { ...props, className: cn('md:ps-(--fd-layout-offset)', props.className), children: [_jsxs(SidebarHeader, { children: [_jsxs("div", { className: "flex flex-row py-1.5 max-md:hidden", children: [nav, collapsible && (_jsx(SidebarCollapseTrigger, { className: cn(buttonVariants({
|
|
37
37
|
color: 'ghost',
|
|
38
38
|
size: 'icon-sm',
|
|
39
|
-
}), 'ms-auto mb-auto text-fd-muted-foreground max-md:hidden'), children: _jsx(SidebarIcon, {}) }))] }), banner] }), _jsxs(SidebarViewport, { children: [_jsx("div", { className: "mb-4 empty:hidden", children: links
|
|
39
|
+
}), 'ms-auto mb-auto -my-1.5 text-fd-muted-foreground max-md:hidden'), children: _jsx(SidebarIcon, {}) }))] }), banner] }), _jsxs(SidebarViewport, { children: [_jsx("div", { className: "mb-4 empty:hidden", children: links
|
|
40
40
|
.filter((v) => v.type !== 'icon')
|
|
41
41
|
.map((item, i) => (_jsx(SidebarLinkItem, { item: item }, i))) }), _jsx(SidebarPageTree, { components: components })] }), _jsx(SidebarFooter, { children: footer })] })] }));
|
|
42
42
|
}
|
package/dist/layouts/notebook.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Fragment, useMemo } from 'react';
|
|
3
3
|
import { getLinks, slot, slots } from '../layouts/shared.js';
|
|
4
|
-
import { CollapsibleSidebar, Sidebar, SidebarCollapseTrigger, SidebarFooter, SidebarHeader,
|
|
4
|
+
import { CollapsibleSidebar, Sidebar, SidebarCollapseTrigger, SidebarFooter, SidebarHeader, SidebarPageTree, SidebarViewport, } from '../components/layout/sidebar.js';
|
|
5
5
|
import { TreeContextProvider } from '../contexts/tree.js';
|
|
6
6
|
import { cn } from '../utils/cn.js';
|
|
7
7
|
import { buttonVariants } from '../components/ui/button.js';
|
|
@@ -12,7 +12,7 @@ import { ThemeToggle } from '../components/layout/theme-toggle.js';
|
|
|
12
12
|
import { Popover, PopoverContent, PopoverTrigger, } from '../components/ui/popover.js';
|
|
13
13
|
import { getSidebarTabsFromOptions, layoutVariables, SidebarLinkItem, } from '../layouts/docs/shared.js';
|
|
14
14
|
import { LayoutTab, LayoutTabs, Navbar, NavbarSidebarTrigger, SidebarLayoutTab, } from './notebook-client.js';
|
|
15
|
-
import {
|
|
15
|
+
import { NavProvider, StylesProvider, } from '../contexts/layout.js';
|
|
16
16
|
import { RootToggle } from '../components/layout/root-toggle.js';
|
|
17
17
|
import Link from 'fumadocs-core/link';
|
|
18
18
|
import { LargeSearchToggle, SearchToggle, } from '../components/layout/search-toggle.js';
|
|
@@ -37,7 +37,7 @@ export function DocsLayout({ tabMode = 'sidebar', nav: { transparentMode, ...nav
|
|
|
37
37
|
}, children: [_jsxs(SidebarHeader, { children: [navMode === 'auto' && (_jsxs("div", { className: "flex flex-row justify-between max-md:hidden", children: [_jsx(Link, { href: nav.url ?? '/', className: "inline-flex items-center gap-2.5 font-medium", children: nav.title }), _jsx(SidebarCollapseTrigger, { className: cn(buttonVariants({
|
|
38
38
|
color: 'ghost',
|
|
39
39
|
size: 'icon-sm',
|
|
40
|
-
}), 'text-fd-muted-foreground mb-auto'), children: _jsx(SidebarIcon, {}) })] })), nav.children, sidebarBanner, tabMode === 'sidebar' && tabs.length > 0 ? (_jsx(RootToggle, { options: tabs
|
|
40
|
+
}), 'text-fd-muted-foreground mb-auto'), children: _jsx(SidebarIcon, {}) })] })), nav.children, sidebarBanner, tabMode === 'sidebar' && tabs.length > 0 ? (_jsx(RootToggle, { options: tabs })) : null] }), _jsxs(SidebarViewport, { children: [tabMode === 'navbar' &&
|
|
41
41
|
tabs.map((tab, i) => (_jsx(SidebarLayoutTab, { item: tab, className: cn('lg:hidden', i === tabs.length - 1 && 'mb-4') }, tab.url))), links.map((item, i) => (_jsx(SidebarLinkItem, { item: item, className: cn('lg:hidden', i === links.length - 1 && 'mb-4') }, i))), _jsx(SidebarPageTree, { components: sidebarComponents })] }), _jsxs(SidebarFooter, { className: cn('flex flex-row items-center', !sidebarFooter && 'md:hidden'), children: [i18n ? (_jsx(LanguageToggle, { className: "me-auto md:hidden", children: _jsx(Languages, { className: "size-5 text-fd-muted-foreground" }) })) : null, slot(themeSwitch, _jsx(ThemeToggle, { className: "md:hidden", mode: themeSwitch?.mode ?? 'light-dark-system' })), sidebarFooter] })] }), _jsx(DocsNavbar, { mode: nav.mode, nav: _jsx(Link, { href: nav.url ?? '/', className: cn('inline-flex items-center gap-2.5 font-semibold', navMode === 'auto' && 'md:hidden'), children: nav.title }), links: links, i18n: i18n, sidebarCollapsible: sidebarCollapsible, searchToggle: searchToggle, tabs: tabMode == 'navbar' ? tabs : [], children: nav.children }), _jsx(StylesProvider, { ...pageStyles, children: props.children })] }) }) }));
|
|
42
42
|
}
|
|
43
43
|
function DocsNavbar({ mode: navMode = 'auto', nav, sidebarCollapsible = false, links, themeSwitch, searchToggle, i18n = false, tabs, children, }) {
|
|
@@ -46,7 +46,7 @@ function DocsNavbar({ mode: navMode = 'auto', nav, sidebarCollapsible = false, l
|
|
|
46
46
|
size: 'icon-sm',
|
|
47
47
|
}), 'text-fd-muted-foreground -ms-1.5 me-2 data-[collapsed=false]:hidden max-md:hidden'), children: _jsx(SidebarIcon, {}) })) : null, nav] }), slots('lg', searchToggle, _jsx(LargeSearchToggle, { hideIfDisabled: true, className: cn('w-full my-auto rounded-xl max-md:hidden', navMode === 'top' ? 'max-w-sm px-2' : 'max-w-[240px]') })), _jsxs("div", { className: "flex flex-1 flex-row items-center justify-end", children: [_jsx("div", { className: "flex flex-row items-center gap-6 px-4 empty:hidden max-lg:hidden", children: links
|
|
48
48
|
.filter((item) => item.type !== 'icon')
|
|
49
|
-
.map((item, i) => (_jsx(NavbarLinkItem, { item: item, className: "text-sm text-fd-muted-foreground transition-colors hover:text-fd-accent-foreground" }, i))) }), children, slots('sm', searchToggle, _jsx(SearchToggle, { hideIfDisabled: true, className: "md:hidden" })), _jsx(NavbarSidebarTrigger, { className: "md:hidden" }), links
|
|
49
|
+
.map((item, i) => (_jsx(NavbarLinkItem, { item: item, className: "text-sm text-fd-muted-foreground transition-colors hover:text-fd-accent-foreground" }, i))) }), children, slots('sm', searchToggle, _jsx(SearchToggle, { hideIfDisabled: true, className: "md:hidden" })), _jsx(NavbarSidebarTrigger, { className: "-me-1.5 md:hidden" }), links
|
|
50
50
|
.filter((item) => item.type === 'icon')
|
|
51
51
|
.map((item, i) => (_jsx(BaseLinkItem, { item: item, className: cn(buttonVariants({ size: 'icon-sm', color: 'ghost' }), 'text-fd-muted-foreground max-lg:hidden'), "aria-label": item.label, children: item.icon }, i))), i18n ? (_jsx(LanguageToggle, { className: "max-md:hidden", children: _jsx(Languages, { className: "size-4.5 text-fd-muted-foreground" }) })) : null, slot(themeSwitch, _jsx(ThemeToggle, { className: "ms-2 max-md:hidden", mode: themeSwitch?.mode ?? 'light-dark-system' })), sidebarCollapsible && navMode === 'top' ? (_jsx(SidebarCollapseTrigger, { className: cn(buttonVariants({
|
|
52
52
|
color: 'secondary',
|
package/dist/mdx.server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mdx.server.d.ts","sourceRoot":"","sources":["../src/mdx.server.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,KAAK,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,oBAAoB,MAAM,OAAO,CAAC;AAEzC;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,YAAY,CAAC,YAAY,CAAC,EAClC,IAAI,EAAE,IAAI,EACV,YAAY,GAAE,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,CAA0B,GAC7D,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"mdx.server.d.ts","sourceRoot":"","sources":["../src/mdx.server.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,KAAK,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,oBAAoB,MAAM,OAAO,CAAC;AAEzC;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,YAAY,CAAC,YAAY,CAAC,EAClC,IAAI,EAAE,IAAI,EACV,YAAY,GAAE,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,CAA0B,GAC7D,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAezB;AAED,OAAO,EAAE,oBAAoB,IAAI,OAAO,EAAE,CAAC"}
|
package/dist/mdx.server.js
CHANGED
|
@@ -12,8 +12,11 @@ export function createRelativeLink(source, page, OverrideLink = defaultMdxCompon
|
|
|
12
12
|
// resolve relative href
|
|
13
13
|
if (href && href.startsWith('.')) {
|
|
14
14
|
const target = source.getPageByHref(href, { dir: page.file.dirname });
|
|
15
|
-
if (target)
|
|
16
|
-
href = target.
|
|
15
|
+
if (target) {
|
|
16
|
+
href = target.hash
|
|
17
|
+
? `${target.page.url}#${target.hash}`
|
|
18
|
+
: target.page.url;
|
|
19
|
+
}
|
|
17
20
|
}
|
|
18
21
|
return _jsx(OverrideLink, { href: href, ...props });
|
|
19
22
|
};
|
package/dist/style.css
CHANGED
|
@@ -244,24 +244,31 @@
|
|
|
244
244
|
color: var(--color-fd-secondary-foreground);
|
|
245
245
|
content: counter(step);
|
|
246
246
|
counter-increment: step;
|
|
247
|
-
border-radius: 9999px;
|
|
248
247
|
justify-content: center;
|
|
249
248
|
align-items: center;
|
|
250
|
-
width: 2rem;
|
|
251
|
-
height: 2rem;
|
|
252
249
|
font-size: 0.875rem;
|
|
253
250
|
line-height: 1.25rem;
|
|
254
251
|
display: flex;
|
|
255
252
|
position: absolute;
|
|
256
|
-
|
|
253
|
+
inset-inline-start: calc(var(--spacing) * -4);
|
|
254
|
+
width: calc(var(--spacing) * 8);
|
|
255
|
+
height: calc(var(--spacing) * 8);
|
|
256
|
+
border-radius: calc(infinity * 1px);
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
259
|
.fd-steps {
|
|
260
260
|
counter-reset: step;
|
|
261
|
-
border-left-width: 1px;
|
|
262
|
-
margin-left: 1rem;
|
|
263
|
-
padding-left: 1.75rem;
|
|
264
261
|
position: relative;
|
|
262
|
+
margin-left: calc(var(--spacing) * 2);
|
|
263
|
+
border-left-style: var(--tw-border-style);
|
|
264
|
+
border-left-width: 1px;
|
|
265
|
+
padding-left: calc(var(--spacing) * 6);
|
|
266
|
+
@media (width >= 40rem) {
|
|
267
|
+
margin-left: calc(var(--spacing) * 4);
|
|
268
|
+
}
|
|
269
|
+
@media (width >= 40rem) {
|
|
270
|
+
padding-left: calc(var(--spacing) * 7);
|
|
271
|
+
}
|
|
265
272
|
}
|
|
266
273
|
.absolute {
|
|
267
274
|
position: absolute;
|
|
@@ -396,6 +403,9 @@
|
|
|
396
403
|
.\!my-0 {
|
|
397
404
|
margin-block: calc(var(--spacing) * 0) !important;
|
|
398
405
|
}
|
|
406
|
+
.-my-1\.5 {
|
|
407
|
+
margin-block: calc(var(--spacing) * -1.5);
|
|
408
|
+
}
|
|
399
409
|
.my-0 {
|
|
400
410
|
margin-block: calc(var(--spacing) * 0);
|
|
401
411
|
}
|
|
@@ -816,6 +826,9 @@
|
|
|
816
826
|
.mt-\(--fd-top\) {
|
|
817
827
|
margin-top: var(--fd-top);
|
|
818
828
|
}
|
|
829
|
+
.mt-2 {
|
|
830
|
+
margin-top: calc(var(--spacing) * 2);
|
|
831
|
+
}
|
|
819
832
|
.mt-6 {
|
|
820
833
|
margin-top: calc(var(--spacing) * 6);
|
|
821
834
|
}
|
|
@@ -1398,15 +1411,15 @@
|
|
|
1398
1411
|
.pe-\(--fd-layout-offset\) {
|
|
1399
1412
|
padding-inline-end: var(--fd-layout-offset);
|
|
1400
1413
|
}
|
|
1414
|
+
.pe-2 {
|
|
1415
|
+
padding-inline-end: calc(var(--spacing) * 2);
|
|
1416
|
+
}
|
|
1401
1417
|
.pe-4 {
|
|
1402
1418
|
padding-inline-end: calc(var(--spacing) * 4);
|
|
1403
1419
|
}
|
|
1404
1420
|
.pt-0 {
|
|
1405
1421
|
padding-top: calc(var(--spacing) * 0);
|
|
1406
1422
|
}
|
|
1407
|
-
.pt-1 {
|
|
1408
|
-
padding-top: calc(var(--spacing) * 1);
|
|
1409
|
-
}
|
|
1410
1423
|
.pt-2 {
|
|
1411
1424
|
padding-top: calc(var(--spacing) * 2);
|
|
1412
1425
|
}
|
|
@@ -2411,6 +2424,11 @@
|
|
|
2411
2424
|
flex-direction: column;
|
|
2412
2425
|
}
|
|
2413
2426
|
}
|
|
2427
|
+
@property --tw-border-style {
|
|
2428
|
+
syntax: "*";
|
|
2429
|
+
inherits: false;
|
|
2430
|
+
initial-value: solid;
|
|
2431
|
+
}
|
|
2414
2432
|
@property --tw-translate-x {
|
|
2415
2433
|
syntax: "*";
|
|
2416
2434
|
inherits: false;
|
|
@@ -2466,11 +2484,6 @@
|
|
|
2466
2484
|
inherits: false;
|
|
2467
2485
|
initial-value: 0;
|
|
2468
2486
|
}
|
|
2469
|
-
@property --tw-border-style {
|
|
2470
|
-
syntax: "*";
|
|
2471
|
-
inherits: false;
|
|
2472
|
-
initial-value: solid;
|
|
2473
|
-
}
|
|
2474
2487
|
@property --tw-font-weight {
|
|
2475
2488
|
syntax: "*";
|
|
2476
2489
|
inherits: false;
|
|
@@ -2796,6 +2809,7 @@
|
|
|
2796
2809
|
@layer properties {
|
|
2797
2810
|
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
|
|
2798
2811
|
*, ::before, ::after, ::backdrop {
|
|
2812
|
+
--tw-border-style: solid;
|
|
2799
2813
|
--tw-translate-x: 0;
|
|
2800
2814
|
--tw-translate-y: 0;
|
|
2801
2815
|
--tw-translate-z: 0;
|
|
@@ -2808,7 +2822,6 @@
|
|
|
2808
2822
|
--tw-skew-x: initial;
|
|
2809
2823
|
--tw-skew-y: initial;
|
|
2810
2824
|
--tw-divide-y-reverse: 0;
|
|
2811
|
-
--tw-border-style: solid;
|
|
2812
2825
|
--tw-font-weight: initial;
|
|
2813
2826
|
--tw-shadow: 0 0 #0000;
|
|
2814
2827
|
--tw-shadow-color: initial;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-ui",
|
|
3
|
-
"version": "15.2.
|
|
3
|
+
"version": "15.2.9",
|
|
4
4
|
"description": "The framework for building a documentation website in Next.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NextJs",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"postcss-selector-parser": "^7.1.0",
|
|
85
85
|
"react-medium-image-zoom": "^5.2.14",
|
|
86
86
|
"tailwind-merge": "^3.2.0",
|
|
87
|
-
"fumadocs-core": "15.2.
|
|
87
|
+
"fumadocs-core": "15.2.9"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
90
|
"@next/eslint-plugin-next": "^15.3.1",
|
|
@@ -96,8 +96,8 @@
|
|
|
96
96
|
"tailwindcss": "^4.1.4",
|
|
97
97
|
"tsc-alias": "^1.8.15",
|
|
98
98
|
"@fumadocs/cli": "0.1.1",
|
|
99
|
-
"fumadocs-core": "15.2.8",
|
|
100
99
|
"eslint-config-custom": "0.0.0",
|
|
100
|
+
"fumadocs-core": "15.2.9",
|
|
101
101
|
"tsconfig": "0.0.0"
|
|
102
102
|
},
|
|
103
103
|
"peerDependencies": {
|