fumadocs-ui 14.6.0 → 14.6.2
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/components/dialog/search.d.ts +5 -2
- package/dist/components/dialog/search.d.ts.map +1 -1
- package/dist/components/dynamic-codeblock.d.ts.map +1 -1
- package/dist/components/dynamic-codeblock.js +2 -1
- package/dist/components/inline-toc.d.ts +4 -3
- package/dist/components/inline-toc.d.ts.map +1 -1
- package/dist/components/inline-toc.js +4 -3
- package/dist/components/layout/root-toggle.js +1 -1
- package/dist/components/layout/toc.d.ts.map +1 -1
- package/dist/components/layout/toc.js +4 -2
- package/dist/components/registry.d.ts.map +1 -1
- package/dist/components/registry.js +1 -0
- package/dist/contexts/layout.d.ts +12 -0
- package/dist/contexts/layout.d.ts.map +1 -0
- package/dist/contexts/layout.js +16 -0
- package/dist/contexts/sidebar.d.ts +2 -2
- package/dist/contexts/sidebar.d.ts.map +1 -1
- package/dist/contexts/tree.d.ts.map +1 -1
- package/dist/contexts/tree.js +2 -4
- package/dist/layouts/docs/shared.d.ts +3 -0
- package/dist/layouts/docs/shared.d.ts.map +1 -1
- package/dist/layouts/docs/shared.js +3 -0
- package/dist/layouts/docs/sidebar.d.ts.map +1 -1
- package/dist/layouts/docs/sidebar.js +9 -9
- package/dist/layouts/docs.client.d.ts +2 -5
- package/dist/layouts/docs.client.d.ts.map +1 -1
- package/dist/layouts/docs.client.js +16 -7
- package/dist/layouts/docs.d.ts.map +1 -1
- package/dist/layouts/docs.js +19 -9
- package/dist/layouts/home.d.ts +2 -2
- package/dist/layouts/home.d.ts.map +1 -1
- package/dist/layouts/home.js +25 -24
- package/dist/layouts/notebook.client.d.ts +1 -2
- package/dist/layouts/notebook.client.d.ts.map +1 -1
- package/dist/layouts/notebook.client.js +2 -10
- package/dist/layouts/notebook.d.ts.map +1 -1
- package/dist/layouts/notebook.js +14 -4
- package/dist/page.client.d.ts +3 -1
- package/dist/page.client.d.ts.map +1 -1
- package/dist/page.client.js +12 -2
- package/dist/page.d.ts.map +1 -1
- package/dist/page.js +21 -17
- package/dist/provider.d.ts +1 -0
- package/dist/provider.d.ts.map +1 -1
- package/dist/provider.js +1 -0
- package/dist/style.css +44 -104
- package/dist/tailwind-plugin.d.ts.map +1 -1
- package/dist/tailwind-plugin.js +1 -0
- package/dist/theme/colors.js +3 -3
- package/dist/utils/get-sidebar-tabs.d.ts.map +1 -1
- package/dist/utils/get-sidebar-tabs.js +10 -1
- package/package.json +15 -15
- package/dist/layouts/docs/navbar.d.ts +0 -4
- package/dist/layouts/docs/navbar.d.ts.map +0 -1
- package/dist/layouts/docs/navbar.js +0 -20
|
@@ -6,21 +6,13 @@ import { useNav } from '../components/layout/nav';
|
|
|
6
6
|
import { SidebarTrigger } from 'fumadocs-core/sidebar';
|
|
7
7
|
import { buttonVariants } from '../components/ui/button';
|
|
8
8
|
import { Menu, X } from 'lucide-react';
|
|
9
|
-
export function
|
|
10
|
-
return (_jsx("main", { id: "nd-docs-layout", ...props, className: cn('flex w-full flex-1 flex-row', props.className), style: {
|
|
11
|
-
...props.style,
|
|
12
|
-
'--fd-layout-offset': 'max(calc(50vw - var(--fd-layout-width) / 2), 0px)',
|
|
13
|
-
paddingInlineEnd: 'var(--fd-layout-offset)',
|
|
14
|
-
}, children: props.children }));
|
|
15
|
-
}
|
|
16
|
-
export function SubNavbar(props) {
|
|
9
|
+
export function Navbar(props) {
|
|
17
10
|
const { open, collapsed } = useSidebar();
|
|
18
11
|
const { isTransparent } = useNav();
|
|
19
|
-
return (_jsx("header", { id: "nd-subnav", ...props, className: cn('fixed inset-x-0 top-[var(--fd-banner-height)] z-10 h-14 backdrop-blur-lg transition-colors', (!isTransparent || open) && 'bg-fd-background/80', props.className), style: {
|
|
12
|
+
return (_jsx("header", { id: "nd-subnav", ...props, className: cn('fixed inset-x-0 top-[var(--fd-banner-height)] z-10 h-14 pe-[var(--fd-layout-offset)] backdrop-blur-lg transition-colors', (!isTransparent || open) && 'bg-fd-background/80', props.className), style: {
|
|
20
13
|
paddingInlineStart: collapsed
|
|
21
14
|
? 'calc(var(--fd-layout-offset))'
|
|
22
15
|
: 'calc(var(--fd-layout-offset) + var(--fd-sidebar-width))',
|
|
23
|
-
paddingInlineEnd: 'var(--fd-layout-offset)',
|
|
24
16
|
}, children: _jsx("div", { className: "mx-auto flex size-full flex-row items-center border-b border-fd-foreground/10 px-4 md:gap-1.5 lg:px-8", children: props.children }) }));
|
|
25
17
|
}
|
|
26
18
|
export function NavbarSidebarTrigger(props) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notebook.d.ts","sourceRoot":"","sources":["../../src/layouts/notebook.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,EACL,KAAK,eAAe,EAGrB,MAAM,kBAAkB,CAAC;AA+B1B,OAAO,
|
|
1
|
+
{"version":3,"file":"notebook.d.ts","sourceRoot":"","sources":["../../src/layouts/notebook.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,EACL,KAAK,eAAe,EAGrB,MAAM,kBAAkB,CAAC;AA+B1B,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAIrD,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC;IAEpB,OAAO,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC,CAAC;IAEjE,cAAc,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;CACjD;AAED,wBAAgB,UAAU,CAAC,EACzB,GAAG,EAAE,EAAE,eAAe,EAAE,GAAG,GAAG,EAAO,EACrC,OAAO,EAAE,EACP,WAAW,EAAE,kBAAyB,EACtC,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,aAAa,EACrB,UAAU,EAAE,iBAAiB,EAC7B,GAAG,OAAO,EACN,EACN,IAAY,EACZ,GAAG,KAAK,EACT,EAAE,eAAe,GAAG,SAAS,CA0E7B"}
|
package/dist/layouts/notebook.js
CHANGED
|
@@ -16,18 +16,28 @@ import { BaseLinkItem } from '../layouts/links';
|
|
|
16
16
|
import { LanguageToggle } from '../components/layout/language-toggle';
|
|
17
17
|
import { ThemeToggle } from '../components/layout/theme-toggle';
|
|
18
18
|
import { Popover, PopoverContent, PopoverTrigger, } from '../components/ui/popover';
|
|
19
|
-
import { getSidebarTabsFromOptions, SidebarLinkItem, } from '../layouts/docs/shared';
|
|
20
|
-
import {
|
|
19
|
+
import { getSidebarTabsFromOptions, layoutVariables, SidebarLinkItem, } from '../layouts/docs/shared';
|
|
20
|
+
import { Navbar, NavbarSidebarTrigger } from './notebook.client';
|
|
21
|
+
import { StylesProvider } from '../contexts/layout';
|
|
21
22
|
export function DocsLayout({ nav: { transparentMode, ...nav } = {}, sidebar: { collapsible: sidebarCollapsible = true, tabs: tabOptions, banner: sidebarBanner, footer: sidebarFooter, components: sidebarComponents, ...sidebar } = {}, i18n = false, ...props }) {
|
|
22
23
|
const links = getLinks(props.links ?? [], props.githubUrl);
|
|
23
24
|
const Aside = sidebarCollapsible ? CollapsibleSidebar : Sidebar;
|
|
24
25
|
if (props.tree === undefined)
|
|
25
26
|
notFound();
|
|
26
27
|
const tabs = getSidebarTabsFromOptions(tabOptions, props.tree) ?? [];
|
|
27
|
-
|
|
28
|
+
const variables = cn('[--fd-nav-height:3.5rem] [--fd-tocnav-height:36px] md:[--fd-sidebar-width:268px] xl:[--fd-toc-width:268px] xl:[--fd-tocnav-height:0px]');
|
|
29
|
+
const pageStyles = {
|
|
30
|
+
tocNav: cn('lg:px-4 xl:hidden'),
|
|
31
|
+
toc: cn('max-xl:hidden'),
|
|
32
|
+
page: cn('mt-[var(--fd-nav-height)]'),
|
|
33
|
+
};
|
|
34
|
+
return (_jsx(TreeContextProvider, { tree: props.tree, children: _jsx(NavProvider, { transparentMode: transparentMode, children: _jsxs("main", { id: "nd-docs-layout", ...props.containerProps, className: cn('flex w-full flex-1 flex-row pe-[var(--fd-layout-offset)]', variables, props.containerProps?.className), style: {
|
|
35
|
+
...layoutVariables,
|
|
36
|
+
...props.containerProps?.style,
|
|
37
|
+
}, children: [_jsxs(Aside, { ...sidebar, className: cn('md:ps-[var(--fd-layout-offset)] md:[--fd-nav-height:0px]', sidebar.className), children: [_jsxs(SidebarHeader, { children: [_jsxs(SidebarHeaderItems, { nav: nav, links: links, children: [nav.children, sidebarCollapsible ? (_jsx(SidebarCollapseTrigger, { className: "ms-auto text-fd-muted-foreground" })) : null] }), sidebarBanner, tabs.length > 0 ? (_jsx(RootToggle, { options: tabs, className: "-mx-2" })) : null] }), _jsxs(SidebarViewport, { children: [_jsx("div", { className: "pt-4 empty:hidden lg:hidden", children: links.map((item, i) => (_jsx(SidebarLinkItem, { item: item }, i))) }), _jsx("div", { className: "py-4", children: _jsx(SidebarPageTree, { components: sidebarComponents }) })] }), _jsx(SidebarFooter, { children: sidebarFooter })] }), _jsx(DocsNavbar, { nav: nav, links: links, i18n: i18n, sidebarCollapsible: sidebarCollapsible }), _jsx(StylesProvider, { ...pageStyles, children: props.children })] }) }) }));
|
|
28
38
|
}
|
|
29
39
|
function DocsNavbar({ sidebarCollapsible, links, nav = {}, i18n, }) {
|
|
30
|
-
return (_jsxs(
|
|
40
|
+
return (_jsxs(Navbar, { children: [sidebarCollapsible ? (_jsx(SidebarCollapseTrigger, { className: "-ms-1.5 text-fd-muted-foreground data-[collapsed=false]:hidden max-md:hidden" })) : null, _jsx(SearchOnly, { children: _jsx(LargeSearchToggle, { className: "w-full max-w-[240px] rounded-lg max-md:hidden" }) }), _jsx(Title, { url: nav.url, title: nav.title, className: "md:hidden" }), _jsxs("div", { className: "flex flex-1 flex-row items-center gap-6 px-2", children: [links
|
|
31
41
|
.filter((item) => item.type !== 'icon')
|
|
32
42
|
.map((item, i) => (_jsx(NavbarLinkItem, { item: item, className: "text-sm text-fd-muted-foreground transition-colors hover:text-fd-accent-foreground max-lg:hidden" }, i))), nav.children] }), _jsx(SearchOnly, { children: _jsx(SearchToggle, { className: "md:hidden" }) }), _jsx(NavbarSidebarTrigger, { className: "-me-1.5 md:hidden" }), _jsx("div", { className: "flex flex-row items-center empty:hidden max-lg:hidden", children: links
|
|
33
43
|
.filter((item) => item.type === 'icon')
|
package/dist/page.client.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { type HTMLAttributes } from 'react';
|
|
2
2
|
import { type BreadcrumbOptions } from 'fumadocs-core/breadcrumb';
|
|
3
|
-
export declare function
|
|
3
|
+
export declare function TocNav(props: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare function PageBody(props: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function PageArticle(props: HTMLAttributes<HTMLElement>): import("react/jsx-runtime").JSX.Element;
|
|
4
6
|
export declare function LastUpdate(props: {
|
|
5
7
|
date: Date;
|
|
6
8
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.client.d.ts","sourceRoot":"","sources":["../src/page.client.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,cAAc,EAIpB,MAAM,OAAO,CAAC;AAWf,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"page.client.d.ts","sourceRoot":"","sources":["../src/page.client.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,cAAc,EAIpB,MAAM,OAAO,CAAC;AAWf,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,0BAA0B,CAAC;AAGlC,wBAAgB,MAAM,CAAC,KAAK,EAAE,cAAc,CAAC,cAAc,CAAC,2CA2B3D;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC,cAAc,CAAC,2CAY7D;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,cAAc,CAAC,WAAW,CAAC,2CAe7D;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,2CAc/C;AAED,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE;QACN,QAAQ,CAAC,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,GAAG,EAAE,MAAM,CAAA;SAAE,CAAC;QACzC,IAAI,CAAC,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,GAAG,EAAE,MAAM,CAAA;SAAE,CAAC;KACtC,CAAC;CACH;AAiCD,wBAAgB,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE,WAAW,2CA8C5C;AAED,MAAM,MAAM,eAAe,GAAG,iBAAiB,CAAC;AAEhD,wBAAgB,UAAU,CAAC,OAAO,EAAE,eAAe,kDAiClD"}
|
package/dist/page.client.js
CHANGED
|
@@ -11,14 +11,24 @@ import { useSidebar } from './contexts/sidebar';
|
|
|
11
11
|
import { usePathname } from 'next/navigation';
|
|
12
12
|
import { useNav } from './components/layout/nav';
|
|
13
13
|
import { getBreadcrumbItemsFromPath, } from 'fumadocs-core/breadcrumb';
|
|
14
|
-
|
|
14
|
+
import { usePageStyles } from './contexts/layout';
|
|
15
|
+
export function TocNav(props) {
|
|
15
16
|
const { open } = useSidebar();
|
|
17
|
+
const { tocNav } = usePageStyles();
|
|
16
18
|
const { isTransparent } = useNav();
|
|
17
|
-
return (_jsx("header", { ...props, className: cn('sticky top-fd-layout-top z-10 flex flex-row items-center border-b border-fd-foreground/10 text-sm backdrop-blur-md transition-colors', !isTransparent && 'bg-fd-background/80', open && 'opacity-0', props.className), style: {
|
|
19
|
+
return (_jsx("header", { id: "nd-tocnav", ...props, className: cn('sticky top-fd-layout-top z-10 flex flex-row items-center border-b border-fd-foreground/10 text-sm backdrop-blur-md transition-colors', !isTransparent && 'bg-fd-background/80', open && 'opacity-0', tocNav, props.className), style: {
|
|
18
20
|
...props.style,
|
|
19
21
|
'--fd-toc-top-with-offset': 'calc(4px + var(--fd-banner-height) + var(--fd-nav-height))',
|
|
20
22
|
}, children: props.children }));
|
|
21
23
|
}
|
|
24
|
+
export function PageBody(props) {
|
|
25
|
+
const { page } = usePageStyles();
|
|
26
|
+
return (_jsx("div", { id: "nd-page", ...props, className: cn('flex w-full min-w-0 flex-col', page, props.className), children: props.children }));
|
|
27
|
+
}
|
|
28
|
+
export function PageArticle(props) {
|
|
29
|
+
const { article } = usePageStyles();
|
|
30
|
+
return (_jsx("article", { ...props, className: cn('flex w-full flex-1 flex-col gap-6 px-4 pt-8 md:pt-12 lg:px-8 xl:mx-auto', article, props.className), children: props.children }));
|
|
31
|
+
}
|
|
22
32
|
export function LastUpdate(props) {
|
|
23
33
|
const { text } = useI18n();
|
|
24
34
|
const [date, setDate] = useState('');
|
package/dist/page.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../src/page.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EACL,KAAK,oBAAoB,EAEzB,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAE,KAAK,mBAAmB,EAAkB,MAAM,mBAAmB,CAAC;AAI7E,OAAO,EAEL,KAAK,WAAW,EAIhB,KAAK,eAAe,
|
|
1
|
+
{"version":3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,EACT,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG;IAClC,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,YAAY,CAAC,YAAY,CAAC,CAAC;IACjC,IAAI,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC;CACtB,kDAmCA;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,GAAG,SAAS,CAM5E"}
|
package/dist/page.js
CHANGED
|
@@ -4,29 +4,31 @@ import { AnchorProvider } from 'fumadocs-core/toc';
|
|
|
4
4
|
import { Card, Cards } from './components/card';
|
|
5
5
|
import { replaceOrDefault } from './layouts/shared';
|
|
6
6
|
import { cn } from './utils/cn';
|
|
7
|
-
import { Footer, LastUpdate,
|
|
7
|
+
import { Footer, LastUpdate, TocNav, Breadcrumb, PageBody, PageArticle, } from './page.client';
|
|
8
8
|
import { Toc, TOCItems, TocPopoverTrigger, TocPopover, TocPopoverContent, } from './components/layout/toc';
|
|
9
9
|
import { buttonVariants } from './components/ui/button';
|
|
10
10
|
import { Edit, Text } from 'lucide-react';
|
|
11
11
|
import { I18nLabel } from './contexts/i18n';
|
|
12
12
|
import ClerkTOCItems from './components/layout/toc-clerk';
|
|
13
|
-
export function DocsPage({ toc = [], full = false, tableOfContentPopover: { enabled: tocPopoverEnabled
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
13
|
+
export function DocsPage({ toc = [], full = false, tableOfContentPopover: { enabled: tocPopoverEnabled, component: tocPopoverReplace, ...tocPopoverOptions } = {}, tableOfContent: { enabled: tocEnabled, component: tocReplace, ...tocOptions } = {}, ...props }) {
|
|
14
|
+
const isTocRequired = toc.length > 0 ||
|
|
15
|
+
tocOptions.footer !== undefined ||
|
|
16
|
+
tocOptions.header !== undefined;
|
|
17
|
+
// disable TOC on full mode, you can still enable it with `enabled` option.
|
|
18
|
+
tocEnabled ?? (tocEnabled = !full && isTocRequired);
|
|
19
|
+
tocPopoverEnabled ?? (tocPopoverEnabled = toc.length > 0 ||
|
|
20
|
+
tocPopoverOptions.header !== undefined ||
|
|
21
|
+
tocPopoverOptions.footer !== undefined);
|
|
22
|
+
return (_jsxs(AnchorProvider, { toc: toc, single: tocOptions.single, children: [_jsxs(PageBody, { ...props.container, className: cn(props.container?.className), style: {
|
|
23
|
+
'--fd-tocnav-height': !tocPopoverEnabled ? '0px' : undefined,
|
|
24
|
+
...props.container?.style,
|
|
25
|
+
}, children: [replaceOrDefault({ enabled: tocPopoverEnabled, component: tocPopoverReplace }, _jsx(TocNav, { children: _jsxs(TocPopover, { children: [_jsx(TocPopoverTrigger, { className: "size-full", items: toc }), _jsxs(TocPopoverContent, { children: [tocPopoverOptions.header, tocPopoverOptions.style === 'clerk' ? (_jsx(ClerkTOCItems, { items: toc, isMenu: true })) : (_jsx(TOCItems, { items: toc, isMenu: true })), tocPopoverOptions.footer] })] }) }), {
|
|
24
26
|
items: toc,
|
|
25
27
|
...tocPopoverOptions,
|
|
26
|
-
}), _jsxs(
|
|
28
|
+
}), _jsxs(PageArticle, { ...props.article, className: cn(full || !tocEnabled ? 'max-w-[1120px]' : 'max-w-[860px]', props.article?.className), children: [replaceOrDefault(props.breadcrumb, _jsx(Breadcrumb, { includePage: props.breadcrumb?.full, ...props.breadcrumb })), props.children, _jsx("div", { role: "none", className: "flex-1" }), _jsxs("div", { className: "flex flex-row flex-wrap items-center justify-between gap-4 empty:hidden", children: [props.editOnGithub ? (_jsx(EditOnGitHub, { ...props.editOnGithub })) : null, props.lastUpdate ? (_jsx(LastUpdate, { date: new Date(props.lastUpdate) })) : null] }), replaceOrDefault(props.footer, _jsx(Footer, { items: props.footer?.items }))] })] }), replaceOrDefault({ enabled: tocEnabled, component: tocReplace }, _jsxs(Toc, { children: [tocOptions.header, _jsxs("h3", { className: "-ms-0.5 inline-flex items-center gap-1.5 text-sm text-fd-muted-foreground", children: [_jsx(Text, { className: "size-4" }), _jsx(I18nLabel, { label: "toc" })] }), tocOptions.style === 'clerk' ? (_jsx(ClerkTOCItems, { items: toc })) : (_jsx(TOCItems, { items: toc })), tocOptions.footer] }), {
|
|
27
29
|
items: toc,
|
|
28
30
|
...tocOptions,
|
|
29
|
-
}
|
|
31
|
+
})] }));
|
|
30
32
|
}
|
|
31
33
|
function EditOnGitHub({ owner, repo, sha, path, ...props }) {
|
|
32
34
|
const href = `https://github.com/${owner}/${repo}/blob/${sha}/${path.startsWith('/') ? path.slice(1) : path}`;
|
|
@@ -67,10 +69,12 @@ function findParent(node, page) {
|
|
|
67
69
|
}
|
|
68
70
|
}
|
|
69
71
|
export function DocsCategory({ page, from, tree: forcedTree, ...props }) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
+
let tree = forcedTree;
|
|
73
|
+
if (!tree) {
|
|
74
|
+
tree = from._i18n
|
|
72
75
|
? from.pageTree[page.locale ?? from._i18n.defaultLanguage]
|
|
73
|
-
: from.pageTree
|
|
76
|
+
: from.pageTree;
|
|
77
|
+
}
|
|
74
78
|
const parent = findParent(tree, page);
|
|
75
79
|
if (!parent)
|
|
76
80
|
return null;
|
package/dist/provider.d.ts
CHANGED
|
@@ -38,4 +38,5 @@ export { useI18n, I18nLabel } from './contexts/i18n';
|
|
|
38
38
|
export { SearchProvider, SearchOnly, useSearchContext, type SearchProviderProps, } from './contexts/search';
|
|
39
39
|
export { SidebarProvider, useSidebar } from './contexts/sidebar';
|
|
40
40
|
export { useTreePath, useTreeContext, TreeContextProvider, } from './contexts/tree';
|
|
41
|
+
export { StylesProvider, usePageStyles, type PageStyles, } from './contexts/layout';
|
|
41
42
|
//# sourceMappingURL=provider.d.ts.map
|
package/dist/provider.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.tsx"],"names":[],"mappings":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B,GACzB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EACL,WAAW,EACX,cAAc,EACd,mBAAmB,GACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,cAAc,EACd,aAAa,EACb,KAAK,UAAU,GAChB,MAAM,mBAAmB,CAAC"}
|
package/dist/provider.js
CHANGED
|
@@ -18,3 +18,4 @@ export { useI18n, I18nLabel } from './contexts/i18n';
|
|
|
18
18
|
export { SearchProvider, SearchOnly, useSearchContext, } from './contexts/search';
|
|
19
19
|
export { SidebarProvider, useSidebar } from './contexts/sidebar';
|
|
20
20
|
export { useTreePath, useTreeContext, TreeContextProvider, } from './contexts/tree';
|
|
21
|
+
export { StylesProvider, usePageStyles, } from './contexts/layout';
|
package/dist/style.css
CHANGED
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
--tw-contain-paint: ;
|
|
106
106
|
--tw-contain-style: ;
|
|
107
107
|
}/*
|
|
108
|
-
! tailwindcss v3.4.
|
|
108
|
+
! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com
|
|
109
109
|
*//*
|
|
110
110
|
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
|
|
111
111
|
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
|
|
@@ -522,6 +522,7 @@ video {
|
|
|
522
522
|
--fd-layout-width: 100vw;
|
|
523
523
|
--fd-banner-height: 0px;
|
|
524
524
|
--fd-nav-height: 0px;
|
|
525
|
+
--fd-tocnav-height: 0px;
|
|
525
526
|
--fd-diff-remove-color: rgba(200,10,100,0.12);
|
|
526
527
|
--fd-diff-remove-symbol-color: rgb(230,10,100);
|
|
527
528
|
--fd-diff-add-color: rgba(14,180,100,0.12);
|
|
@@ -529,15 +530,15 @@ video {
|
|
|
529
530
|
}
|
|
530
531
|
|
|
531
532
|
.dark {
|
|
532
|
-
--background: 0 0% 8.
|
|
533
|
+
--background: 0 0% 8.04%;
|
|
533
534
|
--foreground: 0 0% 92%;
|
|
534
535
|
--muted: 0 0% 12.9%;
|
|
535
536
|
--muted-foreground: 0 0% 60.9%;
|
|
536
537
|
--popover: 0 0% 9.8%;
|
|
537
538
|
--popover-foreground: 0 0% 88%;
|
|
538
|
-
--card: 0 0%
|
|
539
|
+
--card: 0 0% 9.8%;
|
|
539
540
|
--card-foreground: 0 0% 98%;
|
|
540
|
-
--border: 0 0%
|
|
541
|
+
--border: 0 0% 14%;
|
|
541
542
|
--primary: 0 0% 98%;
|
|
542
543
|
--primary-foreground: 0 0% 9%;
|
|
543
544
|
--secondary: 0 0% 12.9%;
|
|
@@ -1043,9 +1044,6 @@ body {
|
|
|
1043
1044
|
.start-0 {
|
|
1044
1045
|
inset-inline-start: 0px;
|
|
1045
1046
|
}
|
|
1046
|
-
.start-2 {
|
|
1047
|
-
inset-inline-start: 0.5rem;
|
|
1048
|
-
}
|
|
1049
1047
|
.top-0 {
|
|
1050
1048
|
top: 0px;
|
|
1051
1049
|
}
|
|
@@ -1172,6 +1170,9 @@ body {
|
|
|
1172
1170
|
.mt-8 {
|
|
1173
1171
|
margin-top: 2rem;
|
|
1174
1172
|
}
|
|
1173
|
+
.mt-\[var\(--fd-nav-height\)\] {
|
|
1174
|
+
margin-top: var(--fd-nav-height);
|
|
1175
|
+
}
|
|
1175
1176
|
.mt-\[var\(--fd-top\)\] {
|
|
1176
1177
|
margin-top: var(--fd-top);
|
|
1177
1178
|
}
|
|
@@ -1664,8 +1665,8 @@ body {
|
|
|
1664
1665
|
.pe-2 {
|
|
1665
1666
|
padding-inline-end: 0.5rem;
|
|
1666
1667
|
}
|
|
1667
|
-
.pe-
|
|
1668
|
-
padding-inline-end:
|
|
1668
|
+
.pe-\[var\(--fd-layout-offset\)\] {
|
|
1669
|
+
padding-inline-end: var(--fd-layout-offset);
|
|
1669
1670
|
}
|
|
1670
1671
|
.ps-1\.5 {
|
|
1671
1672
|
padding-inline-start: 0.375rem;
|
|
@@ -1902,6 +1903,9 @@ body {
|
|
|
1902
1903
|
.\[--fd-nav-height\:56px\] {
|
|
1903
1904
|
--fd-nav-height: 56px;
|
|
1904
1905
|
}
|
|
1906
|
+
.\[--fd-tocnav-height\:36px\] {
|
|
1907
|
+
--fd-tocnav-height: 36px;
|
|
1908
|
+
}
|
|
1905
1909
|
.\[--radix-collapsible-content-height\:0px\] {
|
|
1906
1910
|
--radix-collapsible-content-height: 0px;
|
|
1907
1911
|
}
|
|
@@ -2003,8 +2007,8 @@ body {
|
|
|
2003
2007
|
opacity: 1;
|
|
2004
2008
|
}
|
|
2005
2009
|
|
|
2006
|
-
.data-\[collapsed\=false\]\:
|
|
2007
|
-
|
|
2010
|
+
.data-\[collapsed\=false\]\:invisible[data-collapsed="false"] {
|
|
2011
|
+
visibility: hidden;
|
|
2008
2012
|
}
|
|
2009
2013
|
|
|
2010
2014
|
.data-\[collapsed\=false\]\:hidden[data-collapsed="false"] {
|
|
@@ -2303,10 +2307,6 @@ body {
|
|
|
2303
2307
|
color: hsl(var(--primary) / var(--tw-text-opacity, 1));
|
|
2304
2308
|
}
|
|
2305
2309
|
|
|
2306
|
-
.data-\[collapsed\=false\]\:opacity-0[data-collapsed="false"] {
|
|
2307
|
-
opacity: 0;
|
|
2308
|
-
}
|
|
2309
|
-
|
|
2310
2310
|
.group[data-state="closed"] .group-data-\[state\=closed\]\:-rotate-90 {
|
|
2311
2311
|
--tw-rotate: -90deg;
|
|
2312
2312
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
@@ -2345,6 +2345,13 @@ body {
|
|
|
2345
2345
|
color: hsl(var(--muted-foreground) / var(--tw-text-opacity, 1));
|
|
2346
2346
|
}
|
|
2347
2347
|
|
|
2348
|
+
@media not all and (min-width: 1280px) {
|
|
2349
|
+
|
|
2350
|
+
.max-xl\:hidden {
|
|
2351
|
+
display: none;
|
|
2352
|
+
}
|
|
2353
|
+
}
|
|
2354
|
+
|
|
2348
2355
|
@media not all and (min-width: 1024px) {
|
|
2349
2356
|
|
|
2350
2357
|
.max-lg\:hidden {
|
|
@@ -2430,11 +2437,6 @@ body {
|
|
|
2430
2437
|
order: -9999;
|
|
2431
2438
|
}
|
|
2432
2439
|
|
|
2433
|
-
.md\:-mx-2 {
|
|
2434
|
-
margin-left: -0.5rem;
|
|
2435
|
-
margin-right: -0.5rem;
|
|
2436
|
-
}
|
|
2437
|
-
|
|
2438
2440
|
.md\:-me-\[var\(--fd-sidebar-width\)\] {
|
|
2439
2441
|
margin-inline-end: calc(var(--fd-sidebar-width) * -1);
|
|
2440
2442
|
}
|
|
@@ -2459,10 +2461,6 @@ body {
|
|
|
2459
2461
|
width: var(--fd-sidebar-width);
|
|
2460
2462
|
}
|
|
2461
2463
|
|
|
2462
|
-
.md\:flex-1 {
|
|
2463
|
-
flex: 1 1 0%;
|
|
2464
|
-
}
|
|
2465
|
-
|
|
2466
2464
|
.md\:translate-x-0 {
|
|
2467
2465
|
--tw-translate-x: 0px;
|
|
2468
2466
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
@@ -2490,24 +2488,11 @@ body {
|
|
|
2490
2488
|
padding-right: 0.5rem;
|
|
2491
2489
|
}
|
|
2492
2490
|
|
|
2493
|
-
.md\:px-3 {
|
|
2494
|
-
padding-left: 0.75rem;
|
|
2495
|
-
padding-right: 0.75rem;
|
|
2496
|
-
}
|
|
2497
|
-
|
|
2498
2491
|
.md\:py-1\.5 {
|
|
2499
2492
|
padding-top: 0.375rem;
|
|
2500
2493
|
padding-bottom: 0.375rem;
|
|
2501
2494
|
}
|
|
2502
2495
|
|
|
2503
|
-
.md\:pe-1\.5 {
|
|
2504
|
-
padding-inline-end: 0.375rem;
|
|
2505
|
-
}
|
|
2506
|
-
|
|
2507
|
-
.md\:ps-2 {
|
|
2508
|
-
padding-inline-start: 0.5rem;
|
|
2509
|
-
}
|
|
2510
|
-
|
|
2511
2496
|
.md\:ps-\[var\(--fd-layout-offset\)\] {
|
|
2512
2497
|
padding-inline-start: var(--fd-layout-offset);
|
|
2513
2498
|
}
|
|
@@ -2524,12 +2509,6 @@ body {
|
|
|
2524
2509
|
opacity: 0;
|
|
2525
2510
|
}
|
|
2526
2511
|
|
|
2527
|
-
.md\:transition-\[max-width\] {
|
|
2528
|
-
transition-property: max-width;
|
|
2529
|
-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
2530
|
-
transition-duration: 150ms;
|
|
2531
|
-
}
|
|
2532
|
-
|
|
2533
2512
|
.md\:transition-all {
|
|
2534
2513
|
transition-property: all;
|
|
2535
2514
|
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
@@ -2540,12 +2519,8 @@ body {
|
|
|
2540
2519
|
--fd-nav-height: 0px;
|
|
2541
2520
|
}
|
|
2542
2521
|
|
|
2543
|
-
.md\:\[--fd-sidebar-width\:
|
|
2544
|
-
--fd-sidebar-width:
|
|
2545
|
-
}
|
|
2546
|
-
|
|
2547
|
-
.md\:data-\[collapsed\=true\]\:flex-initial[data-collapsed="true"] {
|
|
2548
|
-
flex: 0 1 auto;
|
|
2522
|
+
.md\:\[--fd-sidebar-width\:268px\] {
|
|
2523
|
+
--fd-sidebar-width: 268px;
|
|
2549
2524
|
}
|
|
2550
2525
|
}
|
|
2551
2526
|
|
|
@@ -2583,20 +2558,34 @@ body {
|
|
|
2583
2558
|
border-width: 1px;
|
|
2584
2559
|
}
|
|
2585
2560
|
|
|
2561
|
+
.lg\:px-4 {
|
|
2562
|
+
padding-left: 1rem;
|
|
2563
|
+
padding-right: 1rem;
|
|
2564
|
+
}
|
|
2565
|
+
|
|
2586
2566
|
.lg\:px-8 {
|
|
2587
2567
|
padding-left: 2rem;
|
|
2588
2568
|
padding-right: 2rem;
|
|
2589
2569
|
}
|
|
2590
|
-
|
|
2591
|
-
.lg\:\[--fd-toc-width\:260px\] {
|
|
2592
|
-
--fd-toc-width: 260px;
|
|
2593
|
-
}
|
|
2594
2570
|
}
|
|
2595
2571
|
|
|
2596
2572
|
@media (min-width: 1280px) {
|
|
2597
2573
|
|
|
2598
|
-
.xl
|
|
2599
|
-
|
|
2574
|
+
.xl\:mx-auto {
|
|
2575
|
+
margin-left: auto;
|
|
2576
|
+
margin-right: auto;
|
|
2577
|
+
}
|
|
2578
|
+
|
|
2579
|
+
.xl\:hidden {
|
|
2580
|
+
display: none;
|
|
2581
|
+
}
|
|
2582
|
+
|
|
2583
|
+
.xl\:\[--fd-toc-width\:268px\] {
|
|
2584
|
+
--fd-toc-width: 268px;
|
|
2585
|
+
}
|
|
2586
|
+
|
|
2587
|
+
.xl\:\[--fd-tocnav-height\:0px\] {
|
|
2588
|
+
--fd-tocnav-height: 0px;
|
|
2600
2589
|
}
|
|
2601
2590
|
}
|
|
2602
2591
|
|
|
@@ -2630,55 +2619,6 @@ body {
|
|
|
2630
2619
|
border-style: none;
|
|
2631
2620
|
}
|
|
2632
2621
|
|
|
2633
|
-
.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg {
|
|
2634
|
-
--tw-rotate: 180deg;
|
|
2635
|
-
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
2636
|
-
}
|
|
2637
|
-
|
|
2638
|
-
.\[\&_\#nd-page\]\:mt-\[var\(--fd-nav-height\)\] #nd-page {
|
|
2639
|
-
margin-top: var(--fd-nav-height);
|
|
2640
|
-
}
|
|
2641
|
-
|
|
2642
|
-
.\[\&_\#nd-page\]\:max-w-\[calc\(min\(100vw\2c var\(--fd-layout-width\)\)-var\(--fd-sidebar-width\)-var\(--fd-toc-width\)\)\] #nd-page {
|
|
2643
|
-
max-width: calc(min(100vw,var(--fd-layout-width)) - var(--fd-sidebar-width) - var(--fd-toc-width));
|
|
2644
|
-
}
|
|
2645
|
-
|
|
2646
|
-
@media not all and (min-width: 1280px) {
|
|
2647
|
-
|
|
2648
|
-
.\[\&_\#nd-toc\]\:max-xl\:hidden #nd-toc {
|
|
2649
|
-
display: none;
|
|
2650
|
-
}
|
|
2651
|
-
}
|
|
2652
|
-
|
|
2653
|
-
@media not all and (min-width: 1024px) {
|
|
2654
|
-
|
|
2655
|
-
.\[\&_\#nd-toc\]\:max-lg\:hidden #nd-toc {
|
|
2656
|
-
display: none;
|
|
2657
|
-
}
|
|
2658
|
-
}
|
|
2659
|
-
|
|
2660
|
-
@media (min-width: 1024px) {
|
|
2661
|
-
|
|
2662
|
-
.\[\&_\#nd-tocnav\]\:lg\:hidden #nd-tocnav {
|
|
2663
|
-
display: none;
|
|
2664
|
-
}
|
|
2665
|
-
}
|
|
2666
|
-
|
|
2667
|
-
@media (min-width: 1280px) {
|
|
2668
|
-
|
|
2669
|
-
.\[\&_\#nd-tocnav\]\:xl\:hidden #nd-tocnav {
|
|
2670
|
-
display: none;
|
|
2671
|
-
}
|
|
2672
|
-
}
|
|
2673
|
-
|
|
2674
|
-
@media not all and (min-width: 1280px) {
|
|
2675
|
-
|
|
2676
|
-
.max-xl\:\[\&_article\]\:mx-0 article {
|
|
2677
|
-
margin-left: 0px;
|
|
2678
|
-
margin-right: 0px;
|
|
2679
|
-
}
|
|
2680
|
-
}
|
|
2681
|
-
|
|
2682
2622
|
.\[\&_svg\]\:size-3\.5 svg {
|
|
2683
2623
|
width: 0.875rem;
|
|
2684
2624
|
height: 0.875rem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tailwind-plugin.d.ts","sourceRoot":"","sources":["../src/tailwind-plugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE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B,CAAC;AAEzC,OAAO,EACL,KAAK,OAAO,IAAI,iBAAiB,EACjC,UAAU,EACX,MAAM,oBAAoB,CAAC;AAE5B,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,iBAAiB,EAAE,qBAAqB,CAAC;IACtD;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,OAAO,OAAO,GAAG,MAAM,CAAC;IAEvC,UAAU,CAAC,EAAE,iBAAiB,CAAC;CAChC;AAED,KAAK,IAAI,GACL,YAAY,GACZ,YAAY,GACZ,OAAO,GACP,kBAAkB,GAClB,SAAS,GACT,oBAAoB,GACpB,MAAM,GACN,iBAAiB,GACjB,QAAQ,GACR,SAAS,GACT,oBAAoB,GACpB,WAAW,GACX,sBAAsB,GACtB,QAAQ,GACR,mBAAmB,GACnB,MAAM,CAAC;AAEX,KAAK,KAAK,GAAG,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AAElC,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,EAAE,KAAK,CAAC;IACZ,GAAG,CAAC,EAAE,aAAa,CAAC;CACrB;AAkDD,eAAO,MAAM,MAAM;;;cApHH,CAAC;;;CAyQhB,CAAC;AAEF,wBAAgB,YAAY,CAAC,OAAO,GAAE,aAAkB,GAAG,aAAa,CAWvE;AAED,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/tailwind-plugin.js
CHANGED
|
@@ -48,6 +48,7 @@ export const docsUi = plugin.withOptions(({ cssPrefix = '', preset = 'default',
|
|
|
48
48
|
'--fd-layout-width': layoutWidth,
|
|
49
49
|
'--fd-banner-height': '0px',
|
|
50
50
|
'--fd-nav-height': '0px',
|
|
51
|
+
'--fd-tocnav-height': '0px',
|
|
51
52
|
'--fd-diff-remove-color': 'rgba(200,10,100,0.12)',
|
|
52
53
|
'--fd-diff-remove-symbol-color': 'rgb(230,10,100)',
|
|
53
54
|
'--fd-diff-add-color': 'rgba(14,180,100,0.12)',
|
package/dist/theme/colors.js
CHANGED
|
@@ -100,15 +100,15 @@ const neutral = {
|
|
|
100
100
|
ring: '0 0% 63.9%',
|
|
101
101
|
},
|
|
102
102
|
dark: {
|
|
103
|
-
background: '0 0% 8.
|
|
103
|
+
background: '0 0% 8.04%',
|
|
104
104
|
foreground: '0 0% 92%',
|
|
105
105
|
muted: '0 0% 12.9%',
|
|
106
106
|
'muted-foreground': '0 0% 60.9%',
|
|
107
107
|
popover: '0 0% 9.8%',
|
|
108
108
|
'popover-foreground': '0 0% 88%',
|
|
109
|
-
card: '0 0%
|
|
109
|
+
card: '0 0% 9.8%',
|
|
110
110
|
'card-foreground': '0 0% 98%',
|
|
111
|
-
border: '0 0%
|
|
111
|
+
border: '0 0% 14%',
|
|
112
112
|
primary: '0 0% 98%',
|
|
113
113
|
'primary-foreground': '0 0% 9%',
|
|
114
114
|
secondary: '0 0% 12.9%',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-sidebar-tabs.d.ts","sourceRoot":"","sources":["../../src/utils/get-sidebar-tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAE9D,MAAM,WAAW,UAAU;IACzB,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;CACtE;
|
|
1
|
+
{"version":3,"file":"get-sidebar-tabs.d.ts","sourceRoot":"","sources":["../../src/utils/get-sidebar-tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAE9D,MAAM,WAAW,UAAU;IACzB,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;CACtE;AAeD,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,QAAQ,CAAC,IAAI,EACvB,EAAE,SAA4B,EAAE,GAAE,UAAe,GAChD,MAAM,EAAE,CA8BV"}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
const defaultTransform = (option, node) => {
|
|
3
|
+
if (!node.icon)
|
|
4
|
+
return option;
|
|
5
|
+
return {
|
|
6
|
+
...option,
|
|
7
|
+
icon: (_jsx("div", { className: "rounded-md border bg-fd-secondary p-1 shadow-md [&_svg]:size-5", children: node.icon })),
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export function getSidebarTabs(pageTree, { transform = defaultTransform } = {}) {
|
|
2
11
|
function findOptions(node) {
|
|
3
12
|
const results = [];
|
|
4
13
|
if (node.root) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-ui",
|
|
3
|
-
"version": "14.6.
|
|
3
|
+
"version": "14.6.2",
|
|
4
4
|
"description": "The framework for building a documentation website in Next.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NextJs",
|
|
@@ -52,15 +52,15 @@
|
|
|
52
52
|
"dist/*"
|
|
53
53
|
],
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@radix-ui/react-accordion": "^1.2.
|
|
56
|
-
"@radix-ui/react-collapsible": "^1.1.
|
|
57
|
-
"@radix-ui/react-dialog": "^1.1.
|
|
55
|
+
"@radix-ui/react-accordion": "^1.2.2",
|
|
56
|
+
"@radix-ui/react-collapsible": "^1.1.2",
|
|
57
|
+
"@radix-ui/react-dialog": "^1.1.4",
|
|
58
58
|
"@radix-ui/react-direction": "^1.1.0",
|
|
59
|
-
"@radix-ui/react-navigation-menu": "^1.2.
|
|
60
|
-
"@radix-ui/react-popover": "^1.1.
|
|
61
|
-
"@radix-ui/react-scroll-area": "^1.2.
|
|
62
|
-
"@radix-ui/react-slot": "^1.1.
|
|
63
|
-
"@radix-ui/react-tabs": "^1.1.
|
|
59
|
+
"@radix-ui/react-navigation-menu": "^1.2.3",
|
|
60
|
+
"@radix-ui/react-popover": "^1.1.4",
|
|
61
|
+
"@radix-ui/react-scroll-area": "^1.2.2",
|
|
62
|
+
"@radix-ui/react-slot": "^1.1.1",
|
|
63
|
+
"@radix-ui/react-tabs": "^1.1.2",
|
|
64
64
|
"class-variance-authority": "^0.7.1",
|
|
65
65
|
"lodash.merge": "^4.6.2",
|
|
66
66
|
"lucide-react": "^0.468.0",
|
|
@@ -68,22 +68,22 @@
|
|
|
68
68
|
"postcss-selector-parser": "^7.0.0",
|
|
69
69
|
"react-medium-image-zoom": "^5.2.12",
|
|
70
70
|
"tailwind-merge": "^2.5.5",
|
|
71
|
-
"fumadocs-core": "14.6.
|
|
71
|
+
"fumadocs-core": "14.6.2"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"@next/eslint-plugin-next": "^15.
|
|
74
|
+
"@next/eslint-plugin-next": "^15.1.1",
|
|
75
75
|
"@types/lodash.merge": "^4.6.9",
|
|
76
76
|
"@types/react": "^19.0.1",
|
|
77
77
|
"@types/react-dom": "^19.0.2",
|
|
78
78
|
"autoprefixer": "^10.4.20",
|
|
79
|
-
"next": "15.
|
|
79
|
+
"next": "15.1.1",
|
|
80
80
|
"postcss": "^8.4.49",
|
|
81
81
|
"postcss-cli": "^11.0.0",
|
|
82
|
-
"tailwindcss": "^3.4.
|
|
82
|
+
"tailwindcss": "^3.4.17",
|
|
83
83
|
"tsc-alias": "^1.8.10",
|
|
84
84
|
"@fumadocs/cli": "0.0.4",
|
|
85
|
-
"
|
|
86
|
-
"
|
|
85
|
+
"tsconfig": "0.0.0",
|
|
86
|
+
"eslint-config-custom": "0.0.0"
|
|
87
87
|
},
|
|
88
88
|
"peerDependencies": {
|
|
89
89
|
"next": "14.x.x || 15.x.x",
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { type ButtonHTMLAttributes, type HTMLAttributes } from 'react';
|
|
2
|
-
export declare function Navbar(props: HTMLAttributes<HTMLElement>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
export declare function NavbarSidebarTrigger(props: ButtonHTMLAttributes<HTMLButtonElement>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
//# sourceMappingURL=navbar.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"navbar.d.ts","sourceRoot":"","sources":["../../../src/layouts/docs/navbar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,oBAAoB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAOvE,wBAAgB,MAAM,CAAC,KAAK,EAAE,cAAc,CAAC,WAAW,CAAC,2CAgBxD;AAED,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,oBAAoB,CAAC,iBAAiB,CAAC,2CAkB/C"}
|