fumadocs-ui 15.0.3 → 15.0.5
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/accordion.js +3 -3
- package/dist/components/api.d.ts +3 -3
- package/dist/components/api.js +3 -3
- package/dist/components/banner.js +2 -2
- package/dist/components/callout.js +1 -1
- package/dist/components/card.js +1 -1
- package/dist/components/codeblock.d.ts.map +1 -1
- package/dist/components/codeblock.js +5 -5
- package/dist/components/dialog/search-algolia.d.ts +1 -1
- package/dist/components/dialog/search-algolia.js +1 -1
- package/dist/components/dialog/search-default.d.ts +1 -1
- package/dist/components/dialog/search-default.js +2 -2
- package/dist/components/dialog/search-orama.d.ts +1 -1
- package/dist/components/dialog/search-orama.js +1 -1
- package/dist/components/dialog/search.js +4 -4
- package/dist/components/dynamic-codeblock.js +2 -2
- package/dist/components/files.js +2 -2
- package/dist/components/heading.js +1 -1
- package/dist/components/inline-toc.d.ts +1 -1
- package/dist/components/inline-toc.js +2 -2
- package/dist/components/layout/language-toggle.js +4 -4
- package/dist/components/layout/nav.js +2 -2
- package/dist/components/layout/root-toggle.js +4 -4
- package/dist/components/layout/search-toggle.js +4 -4
- package/dist/components/layout/theme-toggle.d.ts.map +1 -1
- package/dist/components/layout/theme-toggle.js +13 -8
- package/dist/components/layout/toc-clerk.js +4 -4
- package/dist/components/layout/toc.js +6 -6
- package/dist/components/tabs.d.ts +1 -1
- package/dist/components/tabs.js +2 -2
- package/dist/components/type-table.js +2 -2
- package/dist/components/ui/collapsible.js +1 -1
- package/dist/components/ui/navigation-menu.js +1 -1
- package/dist/components/ui/popover.js +1 -1
- package/dist/components/ui/scroll-area.js +1 -1
- package/dist/components/ui/tabs.js +1 -1
- package/dist/contexts/search.d.ts +1 -1
- package/dist/i18n.d.ts +1 -1
- package/dist/i18n.js +1 -1
- package/dist/layouts/docs/shared.d.ts +3 -3
- package/dist/layouts/docs/shared.js +4 -4
- package/dist/layouts/docs/sidebar.d.ts +1 -1
- package/dist/layouts/docs/sidebar.js +7 -7
- package/dist/layouts/docs.client.d.ts +1 -1
- package/dist/layouts/docs.client.js +7 -7
- package/dist/layouts/docs.d.ts +4 -4
- package/dist/layouts/docs.js +16 -16
- package/dist/layouts/home/menu.d.ts +2 -2
- package/dist/layouts/home/menu.js +4 -4
- package/dist/layouts/home/navbar.d.ts +1 -1
- package/dist/layouts/home/navbar.d.ts.map +1 -1
- package/dist/layouts/home/navbar.js +6 -6
- package/dist/layouts/home.d.ts +3 -3
- package/dist/layouts/home.d.ts.map +1 -1
- package/dist/layouts/home.js +14 -14
- package/dist/layouts/links.js +1 -1
- package/dist/layouts/notebook.client.js +4 -4
- package/dist/layouts/notebook.d.ts +2 -2
- package/dist/layouts/notebook.js +15 -15
- package/dist/layouts/shared.d.ts +2 -2
- package/dist/mdx.client.d.ts +1 -1
- package/dist/mdx.client.js +1 -1
- package/dist/mdx.d.ts +1 -1
- package/dist/mdx.js +5 -5
- package/dist/page.client.js +7 -7
- package/dist/page.d.ts +3 -3
- package/dist/page.d.ts.map +1 -1
- package/dist/page.js +17 -14
- package/dist/provider.d.ts +7 -7
- package/dist/provider.js +8 -8
- package/dist/style.css +8 -5
- package/dist/theme/typography/index.js +1 -1
- package/package.json +12 -12
package/dist/layouts/docs.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import Link from 'next/link';
|
|
3
3
|
import { Languages, MoreHorizontal } from 'lucide-react';
|
|
4
|
-
import { cn } from '../utils/cn';
|
|
5
|
-
import { buttonVariants } from '../components/ui/button';
|
|
6
|
-
import { CollapsibleSidebar, Sidebar, SidebarFooter, SidebarHeader, SidebarCollapseTrigger, SidebarViewport, SidebarPageTree, } from '../layouts/docs/sidebar';
|
|
7
|
-
import { replaceOrDefault } from '../layouts/shared';
|
|
8
|
-
import { BaseLinkItem, } from '../layouts/links';
|
|
9
|
-
import { RootToggle } from '../components/layout/root-toggle';
|
|
10
|
-
import { getLinks } from './shared';
|
|
11
|
-
import { LanguageToggle, LanguageToggleText, } from '../components/layout/language-toggle';
|
|
12
|
-
import { LinksMenu, Navbar, NavbarSidebarTrigger } from '../layouts/docs.client';
|
|
13
|
-
import { TreeContextProvider } from '../contexts/tree';
|
|
14
|
-
import { NavProvider, Title } from '../components/layout/nav';
|
|
15
|
-
import { ThemeToggle } from '../components/layout/theme-toggle';
|
|
16
|
-
import { LargeSearchToggle, SearchToggle, } from '../components/layout/search-toggle';
|
|
17
|
-
import { checkPageTree, getSidebarTabsFromOptions, layoutVariables, SidebarLinkItem, } from '../layouts/docs/shared';
|
|
18
|
-
import { StylesProvider } from '../contexts/layout';
|
|
4
|
+
import { cn } from '../utils/cn.js';
|
|
5
|
+
import { buttonVariants } from '../components/ui/button.js';
|
|
6
|
+
import { CollapsibleSidebar, Sidebar, SidebarFooter, SidebarHeader, SidebarCollapseTrigger, SidebarViewport, SidebarPageTree, } from '../layouts/docs/sidebar.js';
|
|
7
|
+
import { replaceOrDefault } from '../layouts/shared.js';
|
|
8
|
+
import { BaseLinkItem, } from '../layouts/links.js';
|
|
9
|
+
import { RootToggle } from '../components/layout/root-toggle.js';
|
|
10
|
+
import { getLinks } from './shared.js';
|
|
11
|
+
import { LanguageToggle, LanguageToggleText, } from '../components/layout/language-toggle.js';
|
|
12
|
+
import { LinksMenu, Navbar, NavbarSidebarTrigger } from '../layouts/docs.client.js';
|
|
13
|
+
import { TreeContextProvider } from '../contexts/tree.js';
|
|
14
|
+
import { NavProvider, Title } from '../components/layout/nav.js';
|
|
15
|
+
import { ThemeToggle } from '../components/layout/theme-toggle.js';
|
|
16
|
+
import { LargeSearchToggle, SearchToggle, } from '../components/layout/search-toggle.js';
|
|
17
|
+
import { checkPageTree, getSidebarTabsFromOptions, layoutVariables, SidebarLinkItem, } from '../layouts/docs/shared.js';
|
|
18
|
+
import { StylesProvider } from '../contexts/layout.js';
|
|
19
19
|
export function DocsLayout({ nav: { enabled: navEnabled = true, component: navReplace, transparentMode, ...nav } = {}, sidebar: { enabled: sidebarEnabled = true, collapsible = true, component: sidebarReplace, tabs: tabOptions, banner: sidebarBanner, footer: sidebarFooter, components: sidebarComponents, hideSearch: sidebarHideSearch, ...sidebar } = {}, i18n = false, ...props }) {
|
|
20
20
|
checkPageTree(props.tree);
|
|
21
21
|
const links = getLinks(props.links ?? [], props.githubUrl);
|
|
@@ -58,4 +58,4 @@ function SidebarFooterItems({ iconItems, i18n, sidebarCollapsible, disableThemeS
|
|
|
58
58
|
return null;
|
|
59
59
|
return (_jsxs("div", { className: "flex flex-row items-center", children: [iconItems.map((item, i) => (_jsx(BaseLinkItem, { item: item, className: cn(buttonVariants({ size: 'icon', color: 'ghost' }), 'text-fd-muted-foreground md:hidden'), "aria-label": item.label, children: item.icon }, i))), _jsx("div", { role: "separator", className: "flex-1" }), i18n ? (_jsxs(LanguageToggle, { className: "me-1.5", children: [_jsx(Languages, { className: "size-5" }), _jsx(LanguageToggleText, { className: "md:hidden" })] })) : null, !disableThemeSwitch ? (_jsx(ThemeToggle, { className: "p-0 md:order-first" })) : null, sidebarCollapsible ? (_jsx(SidebarCollapseTrigger, { className: "-me-1.5 max-md:hidden" })) : null] }));
|
|
60
60
|
}
|
|
61
|
-
export { getSidebarTabsFromOptions } from './docs/shared';
|
|
61
|
+
export { getSidebarTabsFromOptions } from './docs/shared.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type LinkItemType } from '../../layouts/links';
|
|
2
|
-
import { NavigationMenuContent, NavigationMenuTrigger } from '../../components/ui/navigation-menu';
|
|
1
|
+
import { type LinkItemType } from '../../layouts/links.js';
|
|
2
|
+
import { NavigationMenuContent, NavigationMenuTrigger } from '../../components/ui/navigation-menu.js';
|
|
3
3
|
import type { ComponentPropsWithoutRef } from 'react';
|
|
4
4
|
export declare function MenuLinkItem({ item, ...props }: {
|
|
5
5
|
item: LinkItemType;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { BaseLinkItem } from '../../layouts/links';
|
|
4
|
-
import { cn } from '../../utils/cn';
|
|
5
|
-
import { NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuTrigger, } from '../../components/ui/navigation-menu';
|
|
3
|
+
import { BaseLinkItem } from '../../layouts/links.js';
|
|
4
|
+
import { cn } from '../../utils/cn.js';
|
|
5
|
+
import { NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuTrigger, } from '../../components/ui/navigation-menu.js';
|
|
6
6
|
import Link from 'fumadocs-core/link';
|
|
7
7
|
import { cva } from 'class-variance-authority';
|
|
8
|
-
import { buttonVariants } from '../../components/ui/button';
|
|
8
|
+
import { buttonVariants } from '../../components/ui/button.js';
|
|
9
9
|
const menuItemVariants = cva('', {
|
|
10
10
|
variants: {
|
|
11
11
|
variant: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ComponentProps, type HTMLAttributes } from 'react';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
import { type LinkProps } from 'fumadocs-core/link';
|
|
4
|
-
import { BaseLinkItem } from '../../layouts/links';
|
|
4
|
+
import { BaseLinkItem } from '../../layouts/links.js';
|
|
5
5
|
import type { NavigationMenuContentProps, NavigationMenuTriggerProps } from '@radix-ui/react-navigation-menu';
|
|
6
6
|
export declare function Navbar(props: HTMLAttributes<HTMLElement>): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export declare const NavbarMenu: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-navigation-menu").NavigationMenuItemProps & import("react").RefAttributes<HTMLLIElement>, "ref"> & import("react").RefAttributes<HTMLLIElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navbar.d.ts","sourceRoot":"","sources":["../../../src/layouts/home/navbar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAY,MAAM,OAAO,CAAC;AAC3E,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAa,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"navbar.d.ts","sourceRoot":"","sources":["../../../src/layouts/home/navbar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAY,MAAM,OAAO,CAAC;AAC3E,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAa,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAW/C,OAAO,KAAK,EACV,0BAA0B,EAC1B,0BAA0B,EAC3B,MAAM,iCAAiC,CAAC;AAOzC,wBAAgB,MAAM,CAAC,KAAK,EAAE,cAAc,CAAC,WAAW,CAAC,2CA2BxD;AAED,eAAO,MAAM,UAAU,yNAAqB,CAAC;AAE7C,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,0BAA0B,2CAYlE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,0BAA0B,2CASlE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,2CAc9C;AAED,QAAA,MAAM,YAAY;;8EAiBhB,CAAC;AAEH,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,OAAO,EACP,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,YAAY,CAAC,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,2CAczE"}
|
|
@@ -3,17 +3,17 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
5
5
|
import Link from 'fumadocs-core/link';
|
|
6
|
-
import { cn } from '../../utils/cn';
|
|
7
|
-
import { BaseLinkItem } from '../../layouts/links';
|
|
8
|
-
import { NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuTrigger, NavigationMenuViewport, } from '../../components/ui/navigation-menu';
|
|
9
|
-
import { useNav } from '../../components/layout/nav';
|
|
10
|
-
import { buttonVariants } from '../../components/ui/button';
|
|
6
|
+
import { cn } from '../../utils/cn.js';
|
|
7
|
+
import { BaseLinkItem } from '../../layouts/links.js';
|
|
8
|
+
import { NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, } from '../../components/ui/navigation-menu.js';
|
|
9
|
+
import { useNav } from '../../components/layout/nav.js';
|
|
10
|
+
import { buttonVariants } from '../../components/ui/button.js';
|
|
11
11
|
const navItemVariants = cva('inline-flex items-center gap-1 p-2 text-fd-muted-foreground transition-colors hover:text-fd-accent-foreground data-[active=true]:text-fd-primary [&_svg]:size-4');
|
|
12
12
|
export function Navbar(props) {
|
|
13
13
|
const [value, setValue] = useState('');
|
|
14
14
|
const { isTransparent } = useNav();
|
|
15
15
|
return (_jsx(NavigationMenu, { value: value, onValueChange: setValue, asChild: true, children: _jsxs("header", { id: "nd-nav", ...props, className: cn('fixed left-1/2 top-[var(--fd-banner-height)] z-40 box-content w-full max-w-fd-container -translate-x-1/2 border-b border-fd-foreground/10 transition-colors lg:mt-2 lg:w-[calc(100%-1rem)] lg:rounded-2xl lg:border', value.length > 0 ? 'shadow-lg' : 'shadow-sm', (!isTransparent || value.length > 0) &&
|
|
16
|
-
'bg-fd-background/80 backdrop-blur-lg', props.className), children: [_jsx(
|
|
16
|
+
'bg-fd-background/80 backdrop-blur-lg', props.className), children: [_jsx(NavigationMenuList, { className: "flex h-14 w-full flex-row items-center px-4 lg:h-12", asChild: true, children: _jsx("nav", { children: props.children }) }), _jsx(NavigationMenuViewport, {})] }) }));
|
|
17
17
|
}
|
|
18
18
|
export const NavbarMenu = NavigationMenuItem;
|
|
19
19
|
export function NavbarMenuContent(props) {
|
package/dist/layouts/home.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { type NavOptions } from '../layouts/shared';
|
|
3
|
-
import { type BaseLayoutProps } from './shared';
|
|
1
|
+
import { type HTMLAttributes } from 'react';
|
|
2
|
+
import { type NavOptions } from '../layouts/shared.js';
|
|
3
|
+
import { type BaseLayoutProps } from './shared.js';
|
|
4
4
|
export interface HomeLayoutProps extends BaseLayoutProps, HTMLAttributes<HTMLElement> {
|
|
5
5
|
nav?: Partial<NavOptions & {
|
|
6
6
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"home.d.ts","sourceRoot":"","sources":["../../src/layouts/home.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"home.d.ts","sourceRoot":"","sources":["../../src/layouts/home.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EAAE,KAAK,UAAU,EAAoB,MAAM,kBAAkB,CAAC;AAErE,OAAO,EAAY,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AA6B1D,MAAM,WAAW,eACf,SAAQ,eAAe,EACrB,cAAc,CAAC,WAAW,CAAC;IAC7B,GAAG,CAAC,EAAE,OAAO,CACX,UAAU,GAAG;QACX;;WAEG;QACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;KAC7B,CACF,CAAC;CACH;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,2CA0BhD"}
|
package/dist/layouts/home.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { Navbar, NavbarLink, NavbarMenu, NavbarMenuContent, NavbarMenuLink, NavbarMenuTrigger, } from '../layouts/home/navbar';
|
|
8
|
-
import { LargeSearchToggle, SearchToggle, } from '../components/layout/search-toggle';
|
|
9
|
-
import { ThemeToggle } from '../components/layout/theme-toggle';
|
|
10
|
-
import { LanguageToggle, LanguageToggleText, } from '../components/layout/language-toggle';
|
|
2
|
+
import { Fragment } from 'react';
|
|
3
|
+
import { replaceOrDefault } from '../layouts/shared.js';
|
|
4
|
+
import { cn } from '../utils/cn.js';
|
|
5
|
+
import { getLinks } from './shared.js';
|
|
6
|
+
import { NavProvider, Title } from '../components/layout/nav.js';
|
|
7
|
+
import { Navbar, NavbarLink, NavbarMenu, NavbarMenuContent, NavbarMenuLink, NavbarMenuTrigger, } from '../layouts/home/navbar.js';
|
|
8
|
+
import { LargeSearchToggle, SearchToggle, } from '../components/layout/search-toggle.js';
|
|
9
|
+
import { ThemeToggle } from '../components/layout/theme-toggle.js';
|
|
10
|
+
import { LanguageToggle, LanguageToggleText, } from '../components/layout/language-toggle.js';
|
|
11
11
|
import { ChevronDown, Languages } from 'lucide-react';
|
|
12
12
|
import Link from 'fumadocs-core/link';
|
|
13
|
-
import { Menu, MenuContent, MenuLinkItem, MenuTrigger, } from '../layouts/home/menu';
|
|
13
|
+
import { Menu, MenuContent, MenuLinkItem, MenuTrigger, } from '../layouts/home/menu.js';
|
|
14
14
|
export function HomeLayout(props) {
|
|
15
15
|
const { nav, links, githubUrl, i18n: _i18n, disableThemeSwitch: _disableThemeSwitch, ...rest } = props;
|
|
16
16
|
const finalLinks = getLinks(links, githubUrl);
|
|
@@ -21,19 +21,19 @@ export function HomeLayout(props) {
|
|
|
21
21
|
function Header({ nav: { enableSearch = true, ...nav } = {}, i18n = false, finalLinks, disableThemeSwitch, }) {
|
|
22
22
|
const navItems = finalLinks.filter((item) => ['nav', 'all'].includes(item.on ?? 'all'));
|
|
23
23
|
const menuItems = finalLinks.filter((item) => ['menu', 'all'].includes(item.on ?? 'all'));
|
|
24
|
-
return (_jsxs(Navbar, { children: [_jsx(Title, { title: nav.title, url: nav.url }), nav.children, _jsx(
|
|
24
|
+
return (_jsxs(Navbar, { children: [_jsx(Title, { title: nav.title, url: nav.url }), nav.children, _jsx("ul", { className: "flex flex-row items-center gap-2 px-6 max-sm:hidden", children: navItems
|
|
25
25
|
.filter((item) => !isSecondary(item))
|
|
26
|
-
.map((item, i) => (_jsx(NavbarLinkItem, { item: item, className: "text-sm" }, i))) }), _jsxs("div", { className: "flex flex-
|
|
26
|
+
.map((item, i) => (_jsx(NavbarLinkItem, { item: item, className: "text-sm" }, i))) }), _jsxs("div", { className: "flex flex-row items-center justify-end gap-1.5 flex-1", children: [enableSearch ? (_jsxs(_Fragment, { children: [_jsx(SearchToggle, { className: "lg:hidden", hideIfDisabled: true }), _jsx(LargeSearchToggle, { className: "w-full max-w-[240px] max-lg:hidden", hideIfDisabled: true })] })) : null, !disableThemeSwitch ? _jsx(ThemeToggle, { className: "max-lg:hidden" }) : null, i18n ? (_jsx(LanguageToggle, { className: "max-lg:hidden", children: _jsx(Languages, { className: "size-5" }) })) : null] }), _jsxs("ul", { className: "flex flex-row items-center", children: [navItems.filter(isSecondary).map((item, i) => (_jsx(NavbarLinkItem, { item: item, className: "-me-1.5 max-lg:hidden" }, i))), _jsxs(Menu, { className: "lg:hidden", children: [_jsx(MenuTrigger, { "aria-label": "Toggle Menu", className: "group -me-2", enableHover: nav.enableHoverToOpen, children: _jsx(ChevronDown, { className: "size-3 transition-transform duration-300 group-data-[state=open]:rotate-180" }) }), _jsxs(MenuContent, { className: "sm:flex-row sm:items-center sm:justify-end", children: [menuItems
|
|
27
27
|
.filter((item) => !isSecondary(item))
|
|
28
28
|
.map((item, i) => (_jsx(MenuLinkItem, { item: item, className: "sm:hidden" }, i))), _jsxs("div", { className: "-ms-1.5 flex flex-row items-center gap-1.5 max-sm:mt-2", children: [menuItems.filter(isSecondary).map((item, i) => (_jsx(MenuLinkItem, { item: item, className: "-me-1.5" }, i))), _jsx("div", { role: "separator", className: "flex-1" }), i18n ? (_jsxs(LanguageToggle, { children: [_jsx(Languages, { className: "size-5" }), _jsx(LanguageToggleText, {}), _jsx(ChevronDown, { className: "size-3 text-fd-muted-foreground" })] })) : null, !disableThemeSwitch ? _jsx(ThemeToggle, {}) : null] })] })] })] })] }));
|
|
29
29
|
}
|
|
30
30
|
function NavbarLinkItem({ item, ...props }) {
|
|
31
31
|
if (item.type === 'custom')
|
|
32
|
-
return
|
|
32
|
+
return item.children;
|
|
33
33
|
if (item.type === 'menu') {
|
|
34
34
|
const children = item.items.map((child, j) => {
|
|
35
35
|
if (child.type === 'custom')
|
|
36
|
-
return _jsx(
|
|
36
|
+
return _jsx(Fragment, { children: child.children }, j);
|
|
37
37
|
const { banner, footer, ...rest } = child.menu ?? {};
|
|
38
38
|
return (_jsxs(NavbarMenuLink, { href: child.url, ...rest, children: [banner ??
|
|
39
39
|
(child.icon ? (_jsx("div", { className: "w-fit rounded-md border bg-fd-muted p-1 [&_svg]:size-4", children: child.icon })) : null), _jsx("p", { className: "-mb-1 text-sm font-medium", children: child.text }), child.description ? (_jsx("p", { className: "text-[13px] text-fd-muted-foreground", children: child.description })) : null, footer] }, j));
|
package/dist/layouts/links.js
CHANGED
|
@@ -3,7 +3,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import Link from 'fumadocs-core/link';
|
|
4
4
|
import { usePathname } from 'next/navigation';
|
|
5
5
|
import { forwardRef, } from 'react';
|
|
6
|
-
import { isActive } from '../utils/is-active';
|
|
6
|
+
import { isActive } from '../utils/is-active.js';
|
|
7
7
|
export const BaseLinkItem = forwardRef(({ item, ...props }, ref) => {
|
|
8
8
|
const pathname = usePathname();
|
|
9
9
|
const activeType = item.active ?? 'url';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { cn } from '../utils/cn';
|
|
4
|
-
import { useSidebar } from '../contexts/sidebar';
|
|
5
|
-
import { useNav } from '../components/layout/nav';
|
|
3
|
+
import { cn } from '../utils/cn.js';
|
|
4
|
+
import { useSidebar } from '../contexts/sidebar.js';
|
|
5
|
+
import { useNav } from '../components/layout/nav.js';
|
|
6
6
|
import { SidebarTrigger } from 'fumadocs-core/sidebar';
|
|
7
|
-
import { buttonVariants } from '../components/ui/button';
|
|
7
|
+
import { buttonVariants } from '../components/ui/button.js';
|
|
8
8
|
import { Menu, X } from 'lucide-react';
|
|
9
9
|
export function Navbar(props) {
|
|
10
10
|
const { open, collapsed } = useSidebar();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
-
import { type BaseLayoutProps } from '../layouts/shared';
|
|
3
|
-
import { type SidebarOptions } from '../layouts/docs/shared';
|
|
2
|
+
import { type BaseLayoutProps } from '../layouts/shared.js';
|
|
3
|
+
import { type SidebarOptions } from '../layouts/docs/shared.js';
|
|
4
4
|
import type { PageTree } from 'fumadocs-core/server';
|
|
5
5
|
export interface DocsLayoutProps extends BaseLayoutProps {
|
|
6
6
|
tree: PageTree.Root;
|
package/dist/layouts/notebook.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Fragment } from 'react';
|
|
3
|
-
import { getLinks, } from '../layouts/shared';
|
|
4
|
-
import { CollapsibleSidebar, Sidebar, SidebarCollapseTrigger, SidebarFooter, SidebarHeader, SidebarViewport, SidebarPageTree, } from '../layouts/docs/sidebar';
|
|
5
|
-
import { RootToggle } from '../components/layout/root-toggle';
|
|
6
|
-
import { TreeContextProvider } from '../contexts/tree';
|
|
7
|
-
import { NavProvider, Title } from '../components/layout/nav';
|
|
8
|
-
import { LargeSearchToggle, SearchToggle, } from '../components/layout/search-toggle';
|
|
9
|
-
import { cn } from '../utils/cn';
|
|
3
|
+
import { getLinks, } from '../layouts/shared.js';
|
|
4
|
+
import { CollapsibleSidebar, Sidebar, SidebarCollapseTrigger, SidebarFooter, SidebarHeader, SidebarViewport, SidebarPageTree, } from '../layouts/docs/sidebar.js';
|
|
5
|
+
import { RootToggle } from '../components/layout/root-toggle.js';
|
|
6
|
+
import { TreeContextProvider } from '../contexts/tree.js';
|
|
7
|
+
import { NavProvider, Title } from '../components/layout/nav.js';
|
|
8
|
+
import { LargeSearchToggle, SearchToggle, } from '../components/layout/search-toggle.js';
|
|
9
|
+
import { cn } from '../utils/cn.js';
|
|
10
10
|
import Link from 'next/link';
|
|
11
|
-
import { buttonVariants } from '../components/ui/button';
|
|
11
|
+
import { buttonVariants } from '../components/ui/button.js';
|
|
12
12
|
import { ChevronDown, Languages } from 'lucide-react';
|
|
13
|
-
import { BaseLinkItem } from '../layouts/links';
|
|
14
|
-
import { LanguageToggle } from '../components/layout/language-toggle';
|
|
15
|
-
import { ThemeToggle } from '../components/layout/theme-toggle';
|
|
16
|
-
import { Popover, PopoverContent, PopoverTrigger, } from '../components/ui/popover';
|
|
17
|
-
import { checkPageTree, getSidebarTabsFromOptions, layoutVariables, SidebarLinkItem, } from '../layouts/docs/shared';
|
|
18
|
-
import { Navbar, NavbarSidebarTrigger } from './notebook.client';
|
|
19
|
-
import { StylesProvider } from '../contexts/layout';
|
|
13
|
+
import { BaseLinkItem } from '../layouts/links.js';
|
|
14
|
+
import { LanguageToggle } from '../components/layout/language-toggle.js';
|
|
15
|
+
import { ThemeToggle } from '../components/layout/theme-toggle.js';
|
|
16
|
+
import { Popover, PopoverContent, PopoverTrigger, } from '../components/ui/popover.js';
|
|
17
|
+
import { checkPageTree, getSidebarTabsFromOptions, layoutVariables, SidebarLinkItem, } from '../layouts/docs/shared.js';
|
|
18
|
+
import { Navbar, NavbarSidebarTrigger } from './notebook.client.js';
|
|
19
|
+
import { StylesProvider } from '../contexts/layout.js';
|
|
20
20
|
export function DocsLayout({ nav: { transparentMode, ...nav } = {}, sidebar: { collapsible: sidebarCollapsible = true, tabs: tabOptions, banner: sidebarBanner, footer: sidebarFooter, components: sidebarComponents, ...sidebar } = {}, i18n = false, ...props }) {
|
|
21
21
|
checkPageTree(props.tree);
|
|
22
22
|
const links = getLinks(props.links ?? [], props.githubUrl);
|
package/dist/layouts/shared.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import type { LinkItemType } from '../layouts/links';
|
|
3
|
-
import type { NavProviderProps, TitleProps } from '../components/layout/nav';
|
|
2
|
+
import type { LinkItemType } from '../layouts/links.js';
|
|
3
|
+
import type { NavProviderProps, TitleProps } from '../components/layout/nav.js';
|
|
4
4
|
export interface NavOptions extends SharedNavProps {
|
|
5
5
|
enabled: boolean;
|
|
6
6
|
component: ReactNode;
|
package/dist/mdx.client.d.ts
CHANGED
package/dist/mdx.client.js
CHANGED
package/dist/mdx.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AnchorHTMLAttributes, FC, HTMLAttributes, ImgHTMLAttributes, TableHTMLAttributes } from 'react';
|
|
2
|
-
import { Card, Cards } from './components/card';
|
|
2
|
+
import { Card, Cards } from './components/card.js';
|
|
3
3
|
declare function Image(props: ImgHTMLAttributes<HTMLImageElement>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare function Table(props: TableHTMLAttributes<HTMLTableElement>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare const defaultMdxComponents: {
|
package/dist/mdx.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import Link from 'fumadocs-core/link';
|
|
3
3
|
import NextImage from 'next/image';
|
|
4
|
-
import { Card, Cards } from './components/card';
|
|
5
|
-
import { Callout } from './components/callout';
|
|
6
|
-
import { Heading } from './components/heading';
|
|
7
|
-
import { cn } from './utils/cn';
|
|
8
|
-
import { Pre } from './mdx.client';
|
|
4
|
+
import { Card, Cards } from './components/card.js';
|
|
5
|
+
import { Callout } from './components/callout.js';
|
|
6
|
+
import { Heading } from './components/heading.js';
|
|
7
|
+
import { cn } from './utils/cn.js';
|
|
8
|
+
import { Pre } from './mdx.client.js';
|
|
9
9
|
function Image(props) {
|
|
10
10
|
return (_jsx(NextImage, { sizes: "(max-width: 768px) 100vw, (max-width: 1200px) 70vw, 900px", ...props, className: cn('rounded-lg', props.className) }));
|
|
11
11
|
}
|
package/dist/page.client.js
CHANGED
|
@@ -4,15 +4,15 @@ import { Fragment, useEffect, useMemo, useState, } from 'react';
|
|
|
4
4
|
import { ChevronLeft, ChevronRight } from 'lucide-react';
|
|
5
5
|
import Link from 'next/link';
|
|
6
6
|
import { cva } from 'class-variance-authority';
|
|
7
|
-
import { cn } from './utils/cn';
|
|
8
|
-
import { useI18n } from './contexts/i18n';
|
|
9
|
-
import { useTreeContext, useTreePath } from './contexts/tree';
|
|
10
|
-
import { useSidebar } from './contexts/sidebar';
|
|
7
|
+
import { cn } from './utils/cn.js';
|
|
8
|
+
import { useI18n } from './contexts/i18n.js';
|
|
9
|
+
import { useTreeContext, useTreePath } from './contexts/tree.js';
|
|
10
|
+
import { useSidebar } from './contexts/sidebar.js';
|
|
11
11
|
import { usePathname } from 'next/navigation';
|
|
12
|
-
import { useNav } from './components/layout/nav';
|
|
12
|
+
import { useNav } from './components/layout/nav.js';
|
|
13
13
|
import { getBreadcrumbItemsFromPath, } from 'fumadocs-core/breadcrumb';
|
|
14
|
-
import { usePageStyles } from './contexts/layout';
|
|
15
|
-
import { isActive } from './utils/is-active';
|
|
14
|
+
import { usePageStyles } from './contexts/layout.js';
|
|
15
|
+
import { isActive } from './utils/is-active.js';
|
|
16
16
|
export function TocNav(props) {
|
|
17
17
|
const { open } = useSidebar();
|
|
18
18
|
const { tocNav } = usePageStyles();
|
package/dist/page.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { type PageTree, type TableOfContents } from 'fumadocs-core/server';
|
|
|
2
2
|
import { type AnchorHTMLAttributes, type HTMLAttributes, type ReactNode } from 'react';
|
|
3
3
|
import type { LoaderConfig, LoaderOutput, Page } from 'fumadocs-core/source';
|
|
4
4
|
import { type AnchorProviderProps } from 'fumadocs-core/toc';
|
|
5
|
-
import { type FooterProps, type BreadcrumbProps } from './page.client';
|
|
6
|
-
import { type TOCProps } from './components/layout/toc';
|
|
5
|
+
import { type FooterProps, type BreadcrumbProps } from './page.client.js';
|
|
6
|
+
import { type TOCProps } from './components/layout/toc.js';
|
|
7
7
|
type TableOfContentOptions = Omit<TOCProps, 'items' | 'children'> & Pick<AnchorProviderProps, 'single'> & {
|
|
8
8
|
enabled: boolean;
|
|
9
9
|
component: ReactNode;
|
|
@@ -66,7 +66,7 @@ export interface DocsPageProps {
|
|
|
66
66
|
article?: HTMLAttributes<HTMLElement>;
|
|
67
67
|
children: ReactNode;
|
|
68
68
|
}
|
|
69
|
-
export declare function DocsPage({ toc, full, tableOfContentPopover: { enabled: tocPopoverEnabled, component: tocPopoverReplace, ...tocPopoverOptions }, tableOfContent: { enabled: tocEnabled, component: tocReplace, ...tocOptions }, ...props }: DocsPageProps):
|
|
69
|
+
export declare function DocsPage({ toc, full, tableOfContentPopover: { enabled: tocPopoverEnabled, component: tocPopoverReplace, ...tocPopoverOptions }, tableOfContent: { enabled: tocEnabled, component: tocReplace, ...tocOptions }, ...props }: DocsPageProps): import("react/jsx-runtime").JSX.Element;
|
|
70
70
|
/**
|
|
71
71
|
* Add typography styles
|
|
72
72
|
*/
|
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,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Ref, } from 'react';
|
|
3
3
|
import { AnchorProvider } from 'fumadocs-core/toc';
|
|
4
|
-
import { Card, Cards } from './components/card';
|
|
5
|
-
import { replaceOrDefault } from './layouts/shared';
|
|
6
|
-
import { cn } from './utils/cn';
|
|
7
|
-
import { Footer, LastUpdate, TocNav, Breadcrumb, PageBody, PageArticle, } from './page.client';
|
|
8
|
-
import { Toc, TOCItems, TocPopoverTrigger, TocPopover, TocPopoverContent, } from './components/layout/toc';
|
|
9
|
-
import { buttonVariants } from './components/ui/button';
|
|
4
|
+
import { Card, Cards } from './components/card.js';
|
|
5
|
+
import { replaceOrDefault } from './layouts/shared.js';
|
|
6
|
+
import { cn } from './utils/cn.js';
|
|
7
|
+
import { Footer, LastUpdate, TocNav, Breadcrumb, PageBody, PageArticle, } from './page.client.js';
|
|
8
|
+
import { Toc, TOCItems, TocPopoverTrigger, TocPopover, TocPopoverContent, } from './components/layout/toc.js';
|
|
9
|
+
import { buttonVariants } from './components/ui/button.js';
|
|
10
10
|
import { Edit, Text } from 'lucide-react';
|
|
11
|
-
import { I18nLabel } from './contexts/i18n';
|
|
12
|
-
import ClerkTOCItems from './components/layout/toc-clerk';
|
|
11
|
+
import { I18nLabel } from './contexts/i18n.js';
|
|
12
|
+
import ClerkTOCItems from './components/layout/toc-clerk.js';
|
|
13
13
|
export function DocsPage({ toc = [], full = false, tableOfContentPopover: { enabled: tocPopoverEnabled, component: tocPopoverReplace, ...tocPopoverOptions } = {}, tableOfContent: { enabled: tocEnabled, component: tocReplace, ...tocOptions } = {}, ...props }) {
|
|
14
14
|
const isTocRequired = toc.length > 0 ||
|
|
15
15
|
tocOptions.footer !== undefined ||
|
|
@@ -54,11 +54,15 @@ export const DocsTitle = forwardRef((props, ref) => {
|
|
|
54
54
|
});
|
|
55
55
|
DocsTitle.displayName = 'DocsTitle';
|
|
56
56
|
export function DocsCategory({ page, from, tree: forcedTree, ...props }) {
|
|
57
|
-
let tree
|
|
58
|
-
if (
|
|
59
|
-
tree =
|
|
57
|
+
let tree;
|
|
58
|
+
if (forcedTree) {
|
|
59
|
+
tree = forcedTree;
|
|
60
60
|
}
|
|
61
|
-
else if (
|
|
61
|
+
else if (from._i18n) {
|
|
62
|
+
const locale = page.locale ?? from._i18n.defaultLanguage;
|
|
63
|
+
tree = from.pageTree[locale];
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
62
66
|
tree = from.pageTree;
|
|
63
67
|
}
|
|
64
68
|
function findParentFromTree(node, page) {
|
|
@@ -92,8 +96,7 @@ export function DocsCategory({ page, from, tree: forcedTree, ...props }) {
|
|
|
92
96
|
}
|
|
93
97
|
if (items.length === 0)
|
|
94
98
|
return null;
|
|
95
|
-
return (_jsx(Cards, { ...props, children: items.map((item) => (_jsx(Card, { title: item.data.title, description: item.data.description
|
|
96
|
-
'No Description', href: item.url }, item.url))) }));
|
|
99
|
+
return (_jsx(Cards, { ...props, children: items.map((item) => (_jsx(Card, { title: item.data.title, description: item.data.description, href: item.url }, item.url))) }));
|
|
97
100
|
}
|
|
98
101
|
/**
|
|
99
102
|
* For separate MDX page
|
package/dist/provider.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ThemeProvider } from 'next-themes';
|
|
2
2
|
import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
3
|
-
import type { DefaultSearchDialogProps } from './components/dialog/search-default';
|
|
4
|
-
import { type SearchProviderProps } from './contexts/search';
|
|
3
|
+
import type { DefaultSearchDialogProps } from './components/dialog/search-default.js';
|
|
4
|
+
import { type SearchProviderProps } from './contexts/search.js';
|
|
5
5
|
interface SearchOptions extends Omit<SearchProviderProps, 'options' | 'children'> {
|
|
6
6
|
options?: Partial<DefaultSearchDialogProps> | SearchProviderProps['options'];
|
|
7
7
|
/**
|
|
@@ -34,9 +34,9 @@ export interface RootProviderProps {
|
|
|
34
34
|
children: ReactNode;
|
|
35
35
|
}
|
|
36
36
|
export declare function RootProvider({ children, dir, theme: { enabled, ...theme }, search, }: RootProviderProps): React.ReactElement;
|
|
37
|
-
export { useI18n, I18nLabel } from './contexts/i18n';
|
|
38
|
-
export { SearchProvider, SearchOnly, useSearchContext, type SearchProviderProps, } from './contexts/search';
|
|
39
|
-
export { SidebarProvider, useSidebar } from './contexts/sidebar';
|
|
40
|
-
export { useTreePath, useTreeContext, TreeContextProvider, } from './contexts/tree';
|
|
41
|
-
export { StylesProvider, usePageStyles, type PageStyles, } from './contexts/layout';
|
|
37
|
+
export { useI18n, I18nLabel } from './contexts/i18n.js';
|
|
38
|
+
export { SearchProvider, SearchOnly, useSearchContext, type SearchProviderProps, } from './contexts/search.js';
|
|
39
|
+
export { SidebarProvider, useSidebar } from './contexts/sidebar.js';
|
|
40
|
+
export { useTreePath, useTreeContext, TreeContextProvider, } from './contexts/tree.js';
|
|
41
|
+
export { StylesProvider, usePageStyles, type PageStyles, } from './contexts/layout.js';
|
|
42
42
|
//# sourceMappingURL=provider.d.ts.map
|
package/dist/provider.js
CHANGED
|
@@ -3,9 +3,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { ThemeProvider } from 'next-themes';
|
|
4
4
|
import dynamic from 'next/dynamic';
|
|
5
5
|
import { DirectionProvider } from '@radix-ui/react-direction';
|
|
6
|
-
import { SidebarProvider } from './contexts/sidebar';
|
|
7
|
-
import { SearchProvider } from './contexts/search';
|
|
8
|
-
const DefaultSearchDialog = dynamic(() => import('./components/dialog/search-default'), { ssr: false });
|
|
6
|
+
import { SidebarProvider } from './contexts/sidebar.js';
|
|
7
|
+
import { SearchProvider } from './contexts/search.js';
|
|
8
|
+
const DefaultSearchDialog = dynamic(() => import('./components/dialog/search-default.js'), { ssr: false });
|
|
9
9
|
export function RootProvider({ children, dir, theme: { enabled = true, ...theme } = {}, search, }) {
|
|
10
10
|
let body = children;
|
|
11
11
|
if (search?.enabled !== false)
|
|
@@ -14,8 +14,8 @@ export function RootProvider({ children, dir, theme: { enabled = true, ...theme
|
|
|
14
14
|
body = (_jsx(ThemeProvider, { attribute: "class", defaultTheme: "system", enableSystem: true, disableTransitionOnChange: true, ...theme, children: body }));
|
|
15
15
|
return (_jsx(DirectionProvider, { dir: dir ?? 'ltr', children: _jsx(SidebarProvider, { children: body }) }));
|
|
16
16
|
}
|
|
17
|
-
export { useI18n, I18nLabel } from './contexts/i18n';
|
|
18
|
-
export { SearchProvider, SearchOnly, useSearchContext, } from './contexts/search';
|
|
19
|
-
export { SidebarProvider, useSidebar } from './contexts/sidebar';
|
|
20
|
-
export { useTreePath, useTreeContext, TreeContextProvider, } from './contexts/tree';
|
|
21
|
-
export { StylesProvider, usePageStyles, } from './contexts/layout';
|
|
17
|
+
export { useI18n, I18nLabel } from './contexts/i18n.js';
|
|
18
|
+
export { SearchProvider, SearchOnly, useSearchContext, } from './contexts/search.js';
|
|
19
|
+
export { SidebarProvider, useSidebar } from './contexts/sidebar.js';
|
|
20
|
+
export { useTreePath, useTreeContext, TreeContextProvider, } from './contexts/tree.js';
|
|
21
|
+
export { StylesProvider, usePageStyles, } from './contexts/layout.js';
|
package/dist/style.css
CHANGED
|
@@ -1564,6 +1564,9 @@
|
|
|
1564
1564
|
.px-4 {
|
|
1565
1565
|
padding-inline: calc(var(--spacing) * 4);
|
|
1566
1566
|
}
|
|
1567
|
+
.px-6 {
|
|
1568
|
+
padding-inline: calc(var(--spacing) * 6);
|
|
1569
|
+
}
|
|
1567
1570
|
.py-0\.5 {
|
|
1568
1571
|
padding-block: calc(var(--spacing) * 0.5);
|
|
1569
1572
|
}
|
|
@@ -2272,11 +2275,6 @@
|
|
|
2272
2275
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
2273
2276
|
}
|
|
2274
2277
|
}
|
|
2275
|
-
.lg\:gap-1\.5 {
|
|
2276
|
-
@media (width >= 64rem) {
|
|
2277
|
-
gap: calc(var(--spacing) * 1.5);
|
|
2278
|
-
}
|
|
2279
|
-
}
|
|
2280
2278
|
.lg\:rounded-2xl {
|
|
2281
2279
|
@media (width >= 64rem) {
|
|
2282
2280
|
border-radius: var(--radius-2xl);
|
|
@@ -2388,6 +2386,11 @@
|
|
|
2388
2386
|
border-style: none;
|
|
2389
2387
|
}
|
|
2390
2388
|
}
|
|
2389
|
+
.\[\@media\(hover\:hover\)\]\:opacity-0 {
|
|
2390
|
+
@media (hover:hover) {
|
|
2391
|
+
opacity: 0%;
|
|
2392
|
+
}
|
|
2393
|
+
}
|
|
2391
2394
|
}
|
|
2392
2395
|
.dark {
|
|
2393
2396
|
--color-fd-background: hsl(0, 0%, 7.04%);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-ui",
|
|
3
|
-
"version": "15.0.
|
|
3
|
+
"version": "15.0.5",
|
|
4
4
|
"description": "The framework for building a documentation website in Next.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NextJs",
|
|
@@ -53,15 +53,15 @@
|
|
|
53
53
|
"css/*"
|
|
54
54
|
],
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@radix-ui/react-accordion": "^1.2.
|
|
57
|
-
"@radix-ui/react-collapsible": "^1.1.
|
|
58
|
-
"@radix-ui/react-dialog": "^1.1.
|
|
56
|
+
"@radix-ui/react-accordion": "^1.2.3",
|
|
57
|
+
"@radix-ui/react-collapsible": "^1.1.3",
|
|
58
|
+
"@radix-ui/react-dialog": "^1.1.6",
|
|
59
59
|
"@radix-ui/react-direction": "^1.1.0",
|
|
60
|
-
"@radix-ui/react-navigation-menu": "^1.2.
|
|
61
|
-
"@radix-ui/react-popover": "^1.1.
|
|
62
|
-
"@radix-ui/react-scroll-area": "^1.2.
|
|
63
|
-
"@radix-ui/react-slot": "^1.1.
|
|
64
|
-
"@radix-ui/react-tabs": "^1.1.
|
|
60
|
+
"@radix-ui/react-navigation-menu": "^1.2.5",
|
|
61
|
+
"@radix-ui/react-popover": "^1.1.6",
|
|
62
|
+
"@radix-ui/react-scroll-area": "^1.2.3",
|
|
63
|
+
"@radix-ui/react-slot": "^1.1.2",
|
|
64
|
+
"@radix-ui/react-tabs": "^1.1.3",
|
|
65
65
|
"class-variance-authority": "^0.7.1",
|
|
66
66
|
"lodash.merge": "^4.6.2",
|
|
67
67
|
"lucide-react": "^0.474.0",
|
|
@@ -79,9 +79,9 @@
|
|
|
79
79
|
"next": "15.1.6",
|
|
80
80
|
"tailwindcss": "^4.0.3",
|
|
81
81
|
"tsc-alias": "^1.8.10",
|
|
82
|
-
"@fumadocs/cli": "0.0.
|
|
82
|
+
"@fumadocs/cli": "0.0.8",
|
|
83
83
|
"eslint-config-custom": "0.0.0",
|
|
84
|
-
"fumadocs-core": "15.0.
|
|
84
|
+
"fumadocs-core": "15.0.5",
|
|
85
85
|
"tsconfig": "0.0.0"
|
|
86
86
|
},
|
|
87
87
|
"peerDependencies": {
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"react": "18.x.x || 19.x.x",
|
|
90
90
|
"react-dom": "18.x.x || 19.x.x",
|
|
91
91
|
"tailwindcss": "^3.4.14 || ^4.0.0",
|
|
92
|
-
"fumadocs-core": "15.0.
|
|
92
|
+
"fumadocs-core": "15.0.5"
|
|
93
93
|
},
|
|
94
94
|
"peerDependenciesMeta": {
|
|
95
95
|
"tailwindcss": {
|