fumadocs-ui 15.0.2 → 15.0.4
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/ocean.css +32 -32
- 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.js +1 -1
- package/dist/components/layout/toc-clerk.js +4 -4
- package/dist/components/layout/toc.js +6 -6
- package/dist/components/registry.d.ts.map +1 -1
- package/dist/components/registry.js +6 -0
- 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.js +5 -5
- package/dist/layouts/home.d.ts +2 -2
- package/dist/layouts/home.js +10 -10
- 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 +5 -0
- package/dist/theme/typography/index.js +1 -1
- package/package.json +12 -12
|
@@ -6,14 +6,14 @@ import { usePathname } from 'next/navigation';
|
|
|
6
6
|
import { createContext, useCallback, useContext, useMemo, useRef, useState, } from 'react';
|
|
7
7
|
import Link from 'fumadocs-core/link';
|
|
8
8
|
import { useOnChange } from 'fumadocs-core/utils/use-on-change';
|
|
9
|
-
import { cn } from '../../utils/cn';
|
|
10
|
-
import { ScrollArea, ScrollViewport } from '../../components/ui/scroll-area';
|
|
11
|
-
import { isActive } from '../../utils/is-active';
|
|
12
|
-
import { Collapsible, CollapsibleContent, CollapsibleTrigger, } from '../../components/ui/collapsible';
|
|
13
|
-
import { useSidebar } from '../../contexts/sidebar';
|
|
14
|
-
import { buttonVariants } from '../../components/ui/button';
|
|
9
|
+
import { cn } from '../../utils/cn.js';
|
|
10
|
+
import { ScrollArea, ScrollViewport } from '../../components/ui/scroll-area.js';
|
|
11
|
+
import { isActive } from '../../utils/is-active.js';
|
|
12
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger, } from '../../components/ui/collapsible.js';
|
|
13
|
+
import { useSidebar } from '../../contexts/sidebar.js';
|
|
14
|
+
import { buttonVariants } from '../../components/ui/button.js';
|
|
15
15
|
import { cva } from 'class-variance-authority';
|
|
16
|
-
import { useTreeContext, useTreePath } from '../../contexts/tree';
|
|
16
|
+
import { useTreeContext, useTreePath } from '../../contexts/tree.js';
|
|
17
17
|
const itemVariants = cva('relative flex flex-row items-center gap-2 rounded-md p-2 text-start text-fd-muted-foreground [overflow-wrap:anywhere] md:py-1.5 [&_svg]:size-4 [&_svg]:shrink-0', {
|
|
18
18
|
variants: {
|
|
19
19
|
active: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ButtonHTMLAttributes, type HTMLAttributes } from 'react';
|
|
2
|
-
import { type LinkItemType } from '../layouts/links';
|
|
2
|
+
import { type LinkItemType } from '../layouts/links.js';
|
|
3
3
|
interface LinksMenuProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
4
|
items: LinkItemType[];
|
|
5
5
|
}
|
|
@@ -4,14 +4,14 @@ import { ChevronDown, Menu, X } from 'lucide-react';
|
|
|
4
4
|
import { useState, } from 'react';
|
|
5
5
|
import { usePathname } from 'next/navigation';
|
|
6
6
|
import { useOnChange } from 'fumadocs-core/utils/use-on-change';
|
|
7
|
-
import { cn } from '../utils/cn';
|
|
8
|
-
import { Popover, PopoverContent, PopoverTrigger, } from '../components/ui/popover';
|
|
9
|
-
import { BaseLinkItem } from '../layouts/links';
|
|
10
|
-
import { Collapsible, CollapsibleContent, CollapsibleTrigger, } from '../components/ui/collapsible';
|
|
7
|
+
import { cn } from '../utils/cn.js';
|
|
8
|
+
import { Popover, PopoverContent, PopoverTrigger, } from '../components/ui/popover.js';
|
|
9
|
+
import { BaseLinkItem } from '../layouts/links.js';
|
|
10
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger, } from '../components/ui/collapsible.js';
|
|
11
11
|
import { cva } from 'class-variance-authority';
|
|
12
|
-
import { buttonVariants } from '../components/ui/button';
|
|
13
|
-
import { useSidebar } from '../contexts/sidebar';
|
|
14
|
-
import { useNav } from '../components/layout/nav';
|
|
12
|
+
import { buttonVariants } from '../components/ui/button.js';
|
|
13
|
+
import { useSidebar } from '../contexts/sidebar.js';
|
|
14
|
+
import { useNav } from '../components/layout/nav.js';
|
|
15
15
|
import { SidebarTrigger } from 'fumadocs-core/sidebar';
|
|
16
16
|
const itemVariants = cva('flex flex-row items-center gap-2 rounded-md px-3 py-2.5 text-fd-muted-foreground transition-colors duration-100 [overflow-wrap:anywhere] hover:bg-fd-accent/50 hover:text-fd-accent-foreground/80 hover:transition-none md:px-2 md:py-1.5 [&_svg]:size-4');
|
|
17
17
|
export function LinksMenu({ items, ...props }) {
|
package/dist/layouts/docs.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { PageTree } from 'fumadocs-core/server';
|
|
2
2
|
import { type ReactNode, type HTMLAttributes } from 'react';
|
|
3
|
-
import { type LinkItemType } from '../layouts/links';
|
|
4
|
-
import { type BaseLayoutProps } from './shared';
|
|
5
|
-
import { type SidebarOptions } from '../layouts/docs/shared';
|
|
3
|
+
import { type LinkItemType } from '../layouts/links.js';
|
|
4
|
+
import { type BaseLayoutProps } from './shared.js';
|
|
5
|
+
import { type SidebarOptions } from '../layouts/docs/shared.js';
|
|
6
6
|
export interface DocsLayoutProps extends BaseLayoutProps {
|
|
7
7
|
tree: PageTree.Root;
|
|
8
8
|
sidebar?: Partial<SidebarOptions>;
|
|
9
9
|
containerProps?: HTMLAttributes<HTMLDivElement>;
|
|
10
10
|
}
|
|
11
11
|
export declare function DocsLayout({ nav: { enabled: navEnabled, component: navReplace, transparentMode, ...nav }, sidebar: { enabled: sidebarEnabled, collapsible, component: sidebarReplace, tabs: tabOptions, banner: sidebarBanner, footer: sidebarFooter, components: sidebarComponents, hideSearch: sidebarHideSearch, ...sidebar }, i18n, ...props }: DocsLayoutProps): ReactNode;
|
|
12
|
-
export { getSidebarTabsFromOptions, type TabOptions } from './docs/shared';
|
|
12
|
+
export { getSidebarTabsFromOptions, type TabOptions } from './docs/shared.js';
|
|
13
13
|
export { type LinkItemType };
|
|
14
14
|
//# sourceMappingURL=docs.d.ts.map
|
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>>;
|
|
@@ -3,11 +3,11 @@ 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, 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('');
|
package/dist/layouts/home.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'react';
|
|
2
|
-
import { type NavOptions } from '../layouts/shared';
|
|
3
|
-
import { type BaseLayoutProps } from './shared';
|
|
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
|
/**
|
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 { replaceOrDefault } from '../layouts/shared';
|
|
3
|
-
import { cn } from '../utils/cn';
|
|
4
|
-
import { getLinks } from './shared';
|
|
5
|
-
import { NavProvider, Title } from '../components/layout/nav';
|
|
6
|
-
import { NavigationMenuList } from '../components/ui/navigation-menu';
|
|
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 { replaceOrDefault } from '../layouts/shared.js';
|
|
3
|
+
import { cn } from '../utils/cn.js';
|
|
4
|
+
import { getLinks } from './shared.js';
|
|
5
|
+
import { NavProvider, Title } from '../components/layout/nav.js';
|
|
6
|
+
import { NavigationMenuList } from '../components/ui/navigation-menu.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);
|
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,EACnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAE,KAAK,mB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AAM,CAAC;IAEpC,SAAS,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;IAC3C,OAAO,CAAC,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;IACtC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,QAAQ,CAAC,EACvB,GAAQ,EACR,IAAY,EACZ,qBAAqB,EAAE,EACrB,OAAO,EAAE,iBAAiB,EAC1B,SAAS,EAAE,iBAAiB,EAC5B,GAAG,iBAAiB,EAChB,EACN,cAAc,EAAE,EACd,OAAO,EAAE,UAAU,EACnB,SAAS,EAAE,UAAU,EACrB,GAAG,UAAU,EACT,EACN,GAAG,KAAK,EACT,EAAE,aAAa,2CAmGf;AA+BD;;GAEG;AACH,eAAO,MAAM,QAAQ,2HAOnB,CAAC;AAIH,eAAO,MAAM,eAAe,uIAgB1B,CAAC;AAIH,eAAO,MAAM,SAAS,mIAapB,CAAC;AAIH,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,IAAI,EACJ,IAAI,EAAE,UAAU,EAChB,GAAG,KAAK,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,kDAmEA;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,GAAG,SAAS,CAM5E"}
|
package/dist/page.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, } 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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-ui",
|
|
3
|
-
"version": "15.0.
|
|
3
|
+
"version": "15.0.4",
|
|
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.4",
|
|
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.4"
|
|
93
93
|
},
|
|
94
94
|
"peerDependenciesMeta": {
|
|
95
95
|
"tailwindcss": {
|