@fumadocs/base-ui 16.18.2 → 16.18.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/generated/shared.css +1 -1
- package/css/generated/spacious.css +1 -1
- package/dist/_virtual/_rolldown/runtime.js +4 -4
- package/dist/components/accordion.js +3 -2
- package/dist/components/codeblock.js +2 -2
- package/dist/components/codeblock.rsc.js +1 -1
- 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-orama.d.ts +1 -1
- package/dist/components/dialog/search-orama.js +1 -1
- package/dist/components/dynamic-codeblock.core.js +1 -1
- package/dist/components/image-zoom.js +3 -3
- package/dist/components/inline-toc.js +1 -1
- package/dist/components/sidebar/base.js +1 -1
- package/dist/components/sidebar/tabs/dropdown.js +2 -2
- package/dist/components/type-table.js +3 -2
- package/dist/components/ui/tabs.js +2 -1
- package/dist/i18n.js +1 -1
- package/dist/layouts/docs/client.js +3 -3
- package/dist/layouts/docs/index.d.ts +1 -1
- package/dist/layouts/docs/page/index.js +1 -1
- package/dist/layouts/docs/page/slots/breadcrumb.js +1 -1
- package/dist/layouts/docs/page/slots/container.js +1 -1
- package/dist/layouts/docs/page/slots/toc.d.ts +6 -6
- package/dist/layouts/docs/page/slots/toc.js +2 -2
- package/dist/layouts/docs/slots/header.js +1 -1
- package/dist/layouts/docs/slots/sidebar.js +5 -5
- package/dist/layouts/flux/index.js +4 -4
- package/dist/layouts/flux/page/index.d.ts +1 -1
- package/dist/layouts/flux/page/index.js +2 -2
- package/dist/layouts/flux/page/slots/breadcrumb.js +1 -1
- package/dist/layouts/flux/page/slots/toc.d.ts +5 -5
- package/dist/layouts/flux/page/slots/toc.js +3 -3
- package/dist/layouts/flux/slots/sidebar.js +2 -2
- package/dist/layouts/flux/slots/tab-dropdown.js +1 -1
- package/dist/layouts/glass/index.js +2 -2
- package/dist/layouts/glass/layout-tabs.js +2 -2
- package/dist/layouts/glass/page/index.d.ts +1 -1
- package/dist/layouts/glass/page/index.js +1 -1
- package/dist/layouts/glass/page/slots/breadcrumb.js +1 -1
- package/dist/layouts/glass/page/slots/toc.js +1 -1
- package/dist/layouts/glass/slots/header.js +1 -1
- package/dist/layouts/glass/slots/sidebar.js +4 -4
- package/dist/layouts/home/not-found.js +1 -1
- package/dist/layouts/home/slots/header.js +3 -3
- package/dist/layouts/notebook/client.d.ts +1 -1
- package/dist/layouts/notebook/client.js +3 -3
- package/dist/layouts/notebook/index.d.ts +1 -1
- package/dist/layouts/notebook/page/index.d.ts +1 -1
- package/dist/layouts/notebook/page/index.js +2 -2
- package/dist/layouts/notebook/page/slots/breadcrumb.js +1 -1
- package/dist/layouts/notebook/page/slots/container.js +1 -1
- package/dist/layouts/notebook/page/slots/toc.d.ts +6 -6
- package/dist/layouts/notebook/page/slots/toc.js +2 -2
- package/dist/layouts/notebook/slots/header.js +5 -5
- package/dist/layouts/notebook/slots/sidebar.js +4 -4
- package/dist/layouts/shared/client.d.ts +2 -2
- package/dist/layouts/shared/client.js +2 -2
- package/dist/layouts/shared/index.d.ts +2 -2
- package/dist/layouts/shared/index.js +3 -1
- package/dist/layouts/shared/page-actions.js +1 -1
- package/dist/layouts/shared/slots/language-select.js +2 -2
- package/dist/layouts/shared/slots/search-trigger.js +1 -1
- package/dist/layouts/spacious/index.js +3 -3
- package/dist/layouts/spacious/page/index.d.ts +1 -1
- package/dist/layouts/spacious/page/index.js +4 -4
- package/dist/layouts/spacious/page/slots/breadcrumb.js +1 -1
- package/dist/layouts/spacious/page/slots/toc.d.ts +5 -5
- package/dist/layouts/spacious/page/slots/toc.js +2 -2
- package/dist/layouts/spacious/slots/actions.js +1 -1
- package/dist/layouts/spacious/slots/header.js +2 -2
- package/dist/layouts/spacious/slots/sidebar.js +19 -11
- package/dist/mdx.d.ts +2 -2
- package/dist/mdx.js +1 -1
- package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/index.d.ts +1 -1
- package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/uncontrolled.d.ts +1 -1
- package/dist/page.js +3 -3
- package/dist/provider/base.d.ts +1 -1
- package/dist/provider/base.js +1 -1
- package/dist/style.css +25 -28
- package/dist/utils/urls.js +10 -1
- package/package.json +16 -16
- /package/dist/.translations/{keys.js → keys.json.js} +0 -0
- /package/dist/components/{image-zoom2.css → image-zoom.css} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn } from "../../../../utils/cn.js";
|
|
3
2
|
import { useTreeContext, useTreePath } from "../../../../contexts/tree.js";
|
|
3
|
+
import { cn } from "../../../../utils/cn.js";
|
|
4
4
|
import Link from "fumadocs-core/link";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { ChevronRight } from "lucide-react";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn } from "../../../../utils/cn.js";
|
|
3
2
|
import { TOCProvider as TOCProvider$1, TOCScrollArea, useTOCItems } from "../../../../components/toc/index.js";
|
|
3
|
+
import { cn } from "../../../../utils/cn.js";
|
|
4
4
|
import { useGlassLayout } from "../../index.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { Text } from "lucide-react";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../../../utils/cn.js";
|
|
3
3
|
import { buttonVariants } from "../../../components/ui/button.js";
|
|
4
|
-
import { LayoutTabsDropdown } from "../layout-tabs.js";
|
|
5
4
|
import { useGlassLayout } from "../index.js";
|
|
5
|
+
import { LayoutTabsDropdown } from "../layout-tabs.js";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { ChevronsUpDown, LanguagesIcon, MessageCircleIcon, SidebarIcon } from "lucide-react";
|
|
8
8
|
import { useTranslations } from "@fuma-translate/react";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { buttonVariants } from "../../../components/ui/button.js";
|
|
2
|
+
import { isLinkItemActive } from "../../shared/index.js";
|
|
4
3
|
import { useTreeContext, useTreePath } from "../../../contexts/tree.js";
|
|
5
4
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../../components/ui/collapsible.js";
|
|
5
|
+
import { cn } from "../../../utils/cn.js";
|
|
6
6
|
import { useHotKey } from "../../../utils/hotkey.js";
|
|
7
|
-
import {
|
|
8
|
-
import { LayoutTabsDropdown } from "../layout-tabs.js";
|
|
7
|
+
import { buttonVariants } from "../../../components/ui/button.js";
|
|
9
8
|
import { useGlassLayout } from "../index.js";
|
|
9
|
+
import { LayoutTabsDropdown } from "../layout-tabs.js";
|
|
10
10
|
import Link from "fumadocs-core/link";
|
|
11
11
|
import { usePathname } from "fumadocs-core/framework";
|
|
12
12
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn } from "../../utils/cn.js";
|
|
3
2
|
import { buttonVariants } from "../../components/ui/button.js";
|
|
3
|
+
import { cn } from "../../utils/cn.js";
|
|
4
4
|
import Link from "fumadocs-core/link";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { HomeIcon } from "lucide-react";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../../../utils/cn.js";
|
|
3
|
-
import { buttonVariants } from "../../../components/ui/button.js";
|
|
4
|
-
import { mergeRefs } from "../../../utils/merge-refs.js";
|
|
5
|
-
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../../components/ui/collapsible.js";
|
|
6
3
|
import { LinkItem } from "../../shared/client.js";
|
|
4
|
+
import { buttonVariants } from "../../../components/ui/button.js";
|
|
7
5
|
import { useIsScrollTop } from "../../../utils/use-is-scroll-top.js";
|
|
8
6
|
import { useHomeLayout } from "../index.js";
|
|
7
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../../components/ui/collapsible.js";
|
|
8
|
+
import { mergeRefs } from "../../../utils/merge-refs.js";
|
|
9
9
|
import Link from "fumadocs-core/link";
|
|
10
10
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { ChevronDown, Languages } from "lucide-react";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseSlots, BaseSlotsProps } from "../shared/client.js";
|
|
2
|
+
import { DocsLayoutProps } from "./index.js";
|
|
2
3
|
import { LayoutTab, LinkItemType } from "../shared/index.js";
|
|
3
4
|
import { SidebarProps, SidebarProviderProps } from "./slots/sidebar.js";
|
|
4
|
-
import { DocsLayoutProps } from "./index.js";
|
|
5
5
|
import { ComponentProps, FC } from "react";
|
|
6
6
|
export interface DocsSlots extends BaseSlots {
|
|
7
7
|
container: FC<ComponentProps<'div'>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { TreeContextProvider } from "../../contexts/tree.js";
|
|
3
|
-
import { AIChatPanel, AIChatTrigger, SkipToContent, baseSlots } from "../shared/client.js";
|
|
4
|
-
import { useLinkItems } from "../shared/index.js";
|
|
5
2
|
import { useIsScrollTop } from "../../utils/use-is-scroll-top.js";
|
|
3
|
+
import { useLinkItems } from "../shared/index.js";
|
|
4
|
+
import { AIChatPanel, AIChatTrigger, SkipToContent, baseSlots } from "../shared/client.js";
|
|
5
|
+
import { TreeContextProvider } from "../../contexts/tree.js";
|
|
6
6
|
import { Container } from "./slots/container.js";
|
|
7
7
|
import { Sidebar, SidebarCollapseTrigger, SidebarProvider, SidebarTrigger, useSidebar } from "./slots/sidebar.js";
|
|
8
8
|
import { Header } from "./slots/header.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AIChatOptions, BaseLayoutProps, GetLayoutTabsOptions, LayoutTab, NavOptions } from "../shared/index.js";
|
|
2
1
|
import { SidebarProps, SidebarProviderProps } from "./slots/sidebar.js";
|
|
2
|
+
import { AIChatOptions, BaseLayoutProps, GetLayoutTabsOptions, LayoutTab, NavOptions } from "../shared/index.js";
|
|
3
3
|
import { DocsSlots, useNotebookLayout } from "./client.js";
|
|
4
4
|
import { HTMLAttributes } from "react";
|
|
5
5
|
import * as PageTree from "fumadocs-core/page-tree";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MarkdownCopyButton, ViewOptionsPopover } from "../../shared/page-actions.js";
|
|
2
1
|
import { TOCPopoverProps, TOCProps, TOCProviderProps } from "./slots/toc.js";
|
|
3
2
|
import { Footer, FooterProps } from "./slots/footer.js";
|
|
4
3
|
import { Breadcrumb, BreadcrumbProps } from "./slots/breadcrumb.js";
|
|
4
|
+
import { MarkdownCopyButton, ViewOptionsPopover } from "../../shared/page-actions.js";
|
|
5
5
|
import { ComponentProps, FC, ReactNode } from "react";
|
|
6
6
|
import { TOCItemType } from "fumadocs-core/toc";
|
|
7
7
|
export interface DocsPageProps extends ComponentProps<'article'> {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
3
|
import { cn } from "../../../utils/cn.js";
|
|
4
|
-
import { buttonVariants } from "../../../components/ui/button.js";
|
|
5
|
-
import { MarkdownCopyButton, ViewOptionsPopover } from "../../shared/page-actions.js";
|
|
6
4
|
import { TOC, TOCPopover, TOCProvider } from "./slots/toc.js";
|
|
7
5
|
import { Footer } from "./slots/footer.js";
|
|
8
6
|
import { Breadcrumb } from "./slots/breadcrumb.js";
|
|
9
7
|
import { Container } from "./slots/container.js";
|
|
8
|
+
import { buttonVariants } from "../../../components/ui/button.js";
|
|
9
|
+
import { MarkdownCopyButton, ViewOptionsPopover } from "../../shared/page-actions.js";
|
|
10
10
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { Edit } from "lucide-react";
|
|
12
12
|
import { createContext, use, useEffect, useState } from "react";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn } from "../../../../utils/cn.js";
|
|
3
2
|
import { useTreeContext, useTreePath } from "../../../../contexts/tree.js";
|
|
3
|
+
import { cn } from "../../../../utils/cn.js";
|
|
4
4
|
import Link from "fumadocs-core/link";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { ChevronRight } from "lucide-react";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn } from "../../../../utils/cn.js";
|
|
3
2
|
import { useDocsPage } from "../index.js";
|
|
3
|
+
import { cn } from "../../../../utils/cn.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
// src/layouts/notebook/page/slots/container.tsx
|
|
6
6
|
function Container(props) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TOCItemsProps } from "../../../../components/toc/default.js";
|
|
2
|
-
import { TOCItemsProps as TOCItemsProps$1 } from "../../../../components/toc/
|
|
3
|
-
import { TOCItemsProps as TOCItemsProps$2 } from "../../../../components/toc/
|
|
2
|
+
import { TOCItemsProps as TOCItemsProps$1 } from "../../../../components/toc/clerk.js";
|
|
3
|
+
import { TOCItemsProps as TOCItemsProps$2 } from "../../../../components/toc/block.js";
|
|
4
4
|
import { TOCProviderProps as TOCProviderProps$1 } from "../../../../components/toc/index.js";
|
|
5
5
|
import { ComponentProps, ReactNode } from "react";
|
|
6
6
|
export type TOCProviderProps = TOCProviderProps$1;
|
|
@@ -20,10 +20,10 @@ export type TOCProps = {
|
|
|
20
20
|
list?: TOCItemsProps;
|
|
21
21
|
} | {
|
|
22
22
|
style: 'clerk';
|
|
23
|
-
list?: TOCItemsProps$
|
|
23
|
+
list?: TOCItemsProps$1;
|
|
24
24
|
} | {
|
|
25
25
|
style: 'block';
|
|
26
|
-
list?: TOCItemsProps$
|
|
26
|
+
list?: TOCItemsProps$2;
|
|
27
27
|
});
|
|
28
28
|
export declare function TOC({ container, header, footer, style, list }: TOCProps): import("react").JSX.Element;
|
|
29
29
|
export type TOCPopoverProps = {
|
|
@@ -43,9 +43,9 @@ export type TOCPopoverProps = {
|
|
|
43
43
|
list?: TOCItemsProps;
|
|
44
44
|
} | {
|
|
45
45
|
style: 'clerk';
|
|
46
|
-
list?: TOCItemsProps$
|
|
46
|
+
list?: TOCItemsProps$1;
|
|
47
47
|
} | {
|
|
48
48
|
style: 'block';
|
|
49
|
-
list?: TOCItemsProps$
|
|
49
|
+
list?: TOCItemsProps$2;
|
|
50
50
|
});
|
|
51
51
|
export declare function TOCPopover({ container, trigger, content, header, footer, style, list }: TOCPopoverProps): import("react").JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn } from "../../../../utils/cn.js";
|
|
3
|
-
import { TOCProvider as TOCProvider$1, TOCScrollArea, useItems, useTOCItems } from "../../../../components/toc/index.js";
|
|
4
2
|
import { default_exports } from "../../../../components/toc/default.js";
|
|
5
3
|
import { clerk_exports } from "../../../../components/toc/clerk.js";
|
|
6
4
|
import { block_exports } from "../../../../components/toc/block.js";
|
|
5
|
+
import { TOCProvider as TOCProvider$1, TOCScrollArea, useItems, useTOCItems } from "../../../../components/toc/index.js";
|
|
6
|
+
import { cn } from "../../../../utils/cn.js";
|
|
7
7
|
import { useTreePath } from "../../../../contexts/tree.js";
|
|
8
8
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../../../components/ui/collapsible.js";
|
|
9
9
|
import { useNotebookLayout } from "../../client.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn } from "../../../utils/cn.js";
|
|
3
2
|
import { buttonVariants } from "../../../components/ui/button.js";
|
|
4
|
-
import {
|
|
5
|
-
import { Popover, PopoverContent, PopoverTrigger } from "../../../components/ui/popover.js";
|
|
6
|
-
import { LinkItem } from "../../shared/client.js";
|
|
3
|
+
import { cn } from "../../../utils/cn.js";
|
|
7
4
|
import { isLayoutTabActive } from "../../shared/index.js";
|
|
8
|
-
import { SidebarTabsDropdown } from "../../../components/sidebar/tabs/dropdown.js";
|
|
9
5
|
import { useNotebookLayout } from "../client.js";
|
|
6
|
+
import { LinkItem } from "../../shared/client.js";
|
|
7
|
+
import { Popover, PopoverContent, PopoverTrigger } from "../../../components/ui/popover.js";
|
|
8
|
+
import { useTabsGroups, useTreePath } from "../../../contexts/tree.js";
|
|
9
|
+
import { SidebarTabsDropdown } from "../../../components/sidebar/tabs/dropdown.js";
|
|
10
10
|
import Link from "fumadocs-core/link";
|
|
11
11
|
import { usePathname } from "fumadocs-core/framework";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { SidebarCollapseTrigger as SidebarCollapseTrigger$1, SidebarContent as SidebarContent$1, SidebarDrawerContent, SidebarDrawerOverlay, SidebarFolder as SidebarFolder$1, SidebarFolderContent as SidebarFolderContent$1, SidebarFolderLink as SidebarFolderLink$1, SidebarFolderTrigger as SidebarFolderTrigger$1, SidebarItem as SidebarItem$1, SidebarProvider as SidebarProvider$1, SidebarSeparator as SidebarSeparator$1, SidebarTrigger as SidebarTrigger$1, SidebarViewport, base_exports, useFolder, useFolderDepth } from "../../../components/sidebar/base.js";
|
|
2
3
|
import { cn } from "../../../utils/cn.js";
|
|
4
|
+
import { createPageTreeRenderer } from "../../../components/sidebar/page-tree.js";
|
|
5
|
+
import { createLinkItemRenderer } from "../../../components/sidebar/link-item.js";
|
|
3
6
|
import { buttonVariants } from "../../../components/ui/button.js";
|
|
4
7
|
import { mergeRefs } from "../../../utils/merge-refs.js";
|
|
5
8
|
import { LinkItem } from "../../shared/client.js";
|
|
6
|
-
import { SidebarCollapseTrigger as SidebarCollapseTrigger$1, SidebarContent as SidebarContent$1, SidebarDrawerContent, SidebarDrawerOverlay, SidebarFolder as SidebarFolder$1, SidebarFolderContent as SidebarFolderContent$1, SidebarFolderLink as SidebarFolderLink$1, SidebarFolderTrigger as SidebarFolderTrigger$1, SidebarItem as SidebarItem$1, SidebarProvider as SidebarProvider$1, SidebarSeparator as SidebarSeparator$1, SidebarTrigger as SidebarTrigger$1, SidebarViewport, base_exports, useFolder, useFolderDepth } from "../../../components/sidebar/base.js";
|
|
7
|
-
import { createPageTreeRenderer } from "../../../components/sidebar/page-tree.js";
|
|
8
|
-
import { createLinkItemRenderer } from "../../../components/sidebar/link-item.js";
|
|
9
|
-
import { SidebarTabsDropdown } from "../../../components/sidebar/tabs/dropdown.js";
|
|
10
9
|
import { useNotebookLayout } from "../client.js";
|
|
10
|
+
import { SidebarTabsDropdown } from "../../../components/sidebar/tabs/dropdown.js";
|
|
11
11
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
import { Languages, SidebarIcon, X } from "lucide-react";
|
|
13
13
|
import { cva } from "class-variance-authority";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { BaseLayoutProps, LinkItemType } from "./index.js";
|
|
1
2
|
import { LanguageSelectProps, LanguageSelectTextProps } from "./slots/language-select.js";
|
|
2
3
|
import { FullSearchTriggerProps, SearchTriggerProps } from "./slots/search-trigger.js";
|
|
3
4
|
import { ThemeSwitchProps } from "./slots/theme-switch.js";
|
|
4
|
-
import {
|
|
5
|
-
import { ComponentProps, FC, ReactNode } from "react";
|
|
5
|
+
import { ComponentProps, FC } from "react";
|
|
6
6
|
export declare function LinkItem({ ref, item, ...props }: Omit<ComponentProps<'a'>, 'href'> & {
|
|
7
7
|
item: Extract<LinkItemType, {
|
|
8
8
|
url: string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { useI18n } from "../../contexts/i18n.js";
|
|
2
3
|
import { cn } from "../../utils/cn.js";
|
|
3
4
|
import { buttonVariants } from "../../components/ui/button.js";
|
|
4
|
-
import {
|
|
5
|
+
import { isLinkItemActive } from "./index.js";
|
|
5
6
|
import { LanguageSelect, LanguageSelectText } from "./slots/language-select.js";
|
|
6
7
|
import { FullSearchTrigger, SearchTrigger } from "./slots/search-trigger.js";
|
|
7
8
|
import { ThemeSwitch } from "./slots/theme-switch.js";
|
|
8
|
-
import { isLinkItemActive } from "./index.js";
|
|
9
9
|
import Link from "fumadocs-core/link";
|
|
10
10
|
import { usePathname } from "fumadocs-core/framework";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FullSearchTriggerProps, SearchTriggerProps } from "./slots/search-trigger.js";
|
|
2
|
-
import { ThemeSwitchProps } from "./slots/theme-switch.js";
|
|
3
1
|
import { BaseSlots, BaseSlotsProps, LinkItem, baseSlots } from "./client.js";
|
|
2
|
+
import { ThemeSwitchProps } from "./slots/theme-switch.js";
|
|
3
|
+
import { FullSearchTriggerProps, SearchTriggerProps } from "./slots/search-trigger.js";
|
|
4
4
|
import { ComponentProps, FC, ReactNode } from "react";
|
|
5
5
|
import * as PageTree from "fumadocs-core/page-tree";
|
|
6
6
|
import { I18nConfig } from "fumadocs-core/i18n";
|
|
@@ -2,6 +2,7 @@ import { isActive, normalize } from "../../utils/urls.js";
|
|
|
2
2
|
import { LinkItem, baseSlots } from "./client.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { useMemo } from "react";
|
|
5
|
+
import * as PageTree from "fumadocs-core/page-tree";
|
|
5
6
|
// src/layouts/shared/index.tsx
|
|
6
7
|
const defaultTransform = (option, node) => {
|
|
7
8
|
if (!node.icon) return option;
|
|
@@ -17,7 +18,8 @@ function getLayoutTabs(tree, { transform = defaultTransform } = {}) {
|
|
|
17
18
|
const results = [];
|
|
18
19
|
function next(node, unlisted) {
|
|
19
20
|
if ("root" in node && node.root) {
|
|
20
|
-
const
|
|
21
|
+
const page = node.index ?? node.children.find((node) => node.type === "page") ?? PageTree.findPath(node.children, (node) => node.type === "page")?.at(-1);
|
|
22
|
+
const url = page?.type === "page" ? page.url : void 0;
|
|
21
23
|
if (url) {
|
|
22
24
|
const option = {
|
|
23
25
|
title: node.name,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../../utils/cn.js";
|
|
3
|
-
import { buttonVariants } from "../../components/ui/button.js";
|
|
4
3
|
import { useCopyButton } from "../../utils/use-copy-button.js";
|
|
5
4
|
import { Popover, PopoverContent, PopoverTrigger } from "../../components/ui/popover.js";
|
|
5
|
+
import { buttonVariants } from "../../components/ui/button.js";
|
|
6
6
|
import { usePathname } from "fumadocs-core/framework";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { Check, ChevronDown, Copy, ExternalLinkIcon, TextIcon } from "lucide-react";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn } from "../../../utils/cn.js";
|
|
3
|
-
import { buttonVariants } from "../../../components/ui/button.js";
|
|
4
2
|
import { useI18n } from "../../../contexts/i18n.js";
|
|
5
3
|
import { Popover, PopoverClose, PopoverContent, PopoverTrigger } from "../../../components/ui/popover.js";
|
|
4
|
+
import { cn } from "../../../utils/cn.js";
|
|
5
|
+
import { buttonVariants } from "../../../components/ui/button.js";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { useTranslations } from "@fuma-translate/react";
|
|
8
8
|
// src/layouts/shared/slots/language-select.tsx
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { useSearchContext } from "../../../contexts/search.js";
|
|
2
3
|
import { cn } from "../../../utils/cn.js";
|
|
3
4
|
import { buttonVariants } from "../../../components/ui/button.js";
|
|
4
|
-
import { useSearchContext } from "../../../contexts/search.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { Search } from "lucide-react";
|
|
7
7
|
import { useTranslations } from "@fuma-translate/react";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn } from "../../utils/cn.js";
|
|
3
|
-
import { TreeContextProvider } from "../../contexts/tree.js";
|
|
4
|
-
import { AIChatPanel, SkipToContent, baseSlots } from "../shared/client.js";
|
|
5
2
|
import { getLayoutTabs, useLinkItems } from "../shared/index.js";
|
|
3
|
+
import { TreeContextProvider } from "../../contexts/tree.js";
|
|
6
4
|
import { Sidebar, SidebarDrawer, SidebarProvider } from "./slots/sidebar.js";
|
|
7
5
|
import { Header } from "./slots/header.js";
|
|
6
|
+
import { AIChatPanel, SkipToContent, baseSlots } from "../shared/client.js";
|
|
7
|
+
import { cn } from "../../utils/cn.js";
|
|
8
8
|
import { HeaderActions } from "./slots/actions.js";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { createContext, use, useMemo } from "react";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MarkdownCopyButton, ViewOptionsPopover } from "../../shared/page-actions.js";
|
|
2
1
|
import { TOCDropdownProps, TOCPopoverProps, TOCProps, TOCProviderProps } from "./slots/toc.js";
|
|
3
2
|
import { Footer, FooterProps } from "./slots/footer.js";
|
|
4
3
|
import { Breadcrumb, BreadcrumbProps } from "./slots/breadcrumb.js";
|
|
4
|
+
import { MarkdownCopyButton, ViewOptionsPopover } from "../../shared/page-actions.js";
|
|
5
5
|
import { ComponentProps, FC } from "react";
|
|
6
6
|
import { TOCItemType } from "fumadocs-core/toc";
|
|
7
7
|
interface DocsPageSlots {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn } from "../../../utils/cn.js";
|
|
3
|
-
import { buttonVariants } from "../../../components/ui/button.js";
|
|
4
2
|
import { SidebarCollapseTrigger, useSidebar } from "../../../components/sidebar/base.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { buttonVariants } from "../../../components/ui/button.js";
|
|
4
|
+
import { cn } from "../../../utils/cn.js";
|
|
7
5
|
import { TOC, TOCDropdown, TOCPopover, TOCProvider } from "./slots/toc.js";
|
|
8
6
|
import { Footer } from "./slots/footer.js";
|
|
9
7
|
import { Breadcrumb, useBreadcrumbItems } from "./slots/breadcrumb.js";
|
|
8
|
+
import { useSpaciousLayout } from "../index.js";
|
|
9
|
+
import { MarkdownCopyButton, ViewOptionsPopover } from "../../shared/page-actions.js";
|
|
10
10
|
import { usePathname } from "fumadocs-core/framework";
|
|
11
11
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
import { EditIcon, SidebarIcon } from "lucide-react";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn } from "../../../../utils/cn.js";
|
|
3
2
|
import { useTreeContext, useTreePath } from "../../../../contexts/tree.js";
|
|
3
|
+
import { cn } from "../../../../utils/cn.js";
|
|
4
4
|
import Link from "fumadocs-core/link";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { Fragment as Fragment$1, useMemo } from "react";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { TOCItemsProps } from "../../../../components/toc/default.js";
|
|
2
|
-
import { TOCItemsProps as TOCItemsProps$1 } from "../../../../components/toc/block.js";
|
|
3
|
-
import { TOCItemsProps as TOCItemsProps$2 } from "../../../../components/toc/clerk.js";
|
|
4
1
|
import { TOCProviderProps as TOCProviderProps$1 } from "../../../../components/toc/index.js";
|
|
2
|
+
import { TOCItemsProps } from "../../../../components/toc/default.js";
|
|
3
|
+
import { TOCItemsProps as TOCItemsProps$1 } from "../../../../components/toc/clerk.js";
|
|
4
|
+
import { TOCItemsProps as TOCItemsProps$2 } from "../../../../components/toc/block.js";
|
|
5
5
|
import { ComponentProps, ReactNode } from "react";
|
|
6
6
|
export type TOCProviderProps = TOCProviderProps$1;
|
|
7
7
|
export declare function TOCProvider(props: TOCProviderProps): import("react").JSX.Element;
|
|
8
8
|
type TOCStyle = {
|
|
9
9
|
style?: 'block';
|
|
10
|
-
list?: TOCItemsProps$
|
|
10
|
+
list?: TOCItemsProps$2;
|
|
11
11
|
} | {
|
|
12
12
|
style: 'normal';
|
|
13
13
|
list?: TOCItemsProps;
|
|
14
14
|
} | {
|
|
15
15
|
style: 'clerk';
|
|
16
|
-
list?: TOCItemsProps$
|
|
16
|
+
list?: TOCItemsProps$1;
|
|
17
17
|
};
|
|
18
18
|
type TOCContent = {
|
|
19
19
|
/**
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../../../components/ui/collapsible.js";
|
|
3
3
|
import { TOCProvider as TOCProvider$1, TOCScrollArea, useTOCItems } from "../../../../components/toc/index.js";
|
|
4
4
|
import { default_exports } from "../../../../components/toc/default.js";
|
|
5
5
|
import { clerk_exports } from "../../../../components/toc/clerk.js";
|
|
6
6
|
import { block_exports } from "../../../../components/toc/block.js";
|
|
7
|
+
import { cn } from "../../../../utils/cn.js";
|
|
7
8
|
import { useTreePath } from "../../../../contexts/tree.js";
|
|
8
|
-
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../../../components/ui/collapsible.js";
|
|
9
9
|
import { useSpaciousLayout } from "../../index.js";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { ChevronDownIcon, TextIcon } from "lucide-react";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn } from "../../../utils/cn.js";
|
|
3
2
|
import { buttonVariants } from "../../../components/ui/button.js";
|
|
4
3
|
import { useI18n } from "../../../contexts/i18n.js";
|
|
5
4
|
import { LinkItem } from "../../shared/client.js";
|
|
5
|
+
import { cn } from "../../../utils/cn.js";
|
|
6
6
|
import { useSpaciousLayout } from "../index.js";
|
|
7
7
|
import Link from "fumadocs-core/link";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn } from "../../../utils/cn.js";
|
|
3
|
-
import { buttonVariants } from "../../../components/ui/button.js";
|
|
4
2
|
import { SidebarTrigger } from "../../../components/sidebar/base.js";
|
|
3
|
+
import { buttonVariants } from "../../../components/ui/button.js";
|
|
4
|
+
import { cn } from "../../../utils/cn.js";
|
|
5
5
|
import { useSpaciousLayout } from "../index.js";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { SidebarIcon } from "lucide-react";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn } from "../../../utils/cn.js";
|
|
3
|
-
import { buttonVariants } from "../../../components/ui/button.js";
|
|
4
|
-
import { useTabsGroups, useTreePath } from "../../../contexts/tree.js";
|
|
5
|
-
import { LinkItem } from "../../shared/client.js";
|
|
6
|
-
import { isLayoutTabActive } from "../../shared/index.js";
|
|
7
2
|
import { SidebarCollapseTrigger, SidebarDrawerContent, SidebarDrawerOverlay, SidebarFolder, SidebarFolderContent as SidebarFolderContent$1, SidebarFolderLink as SidebarFolderLink$1, SidebarFolderTrigger as SidebarFolderTrigger$1, SidebarItem as SidebarItem$1, SidebarProvider as SidebarProvider$1, SidebarSeparator as SidebarSeparator$1, SidebarTrigger, useFolderDepth, useSidebar } from "../../../components/sidebar/base.js";
|
|
8
3
|
import { createPageTreeRenderer } from "../../../components/sidebar/page-tree.js";
|
|
9
4
|
import { createLinkItemRenderer } from "../../../components/sidebar/link-item.js";
|
|
5
|
+
import { LinkItem } from "../../shared/client.js";
|
|
6
|
+
import { buttonVariants } from "../../../components/ui/button.js";
|
|
7
|
+
import { useTabsGroups, useTreePath } from "../../../contexts/tree.js";
|
|
8
|
+
import { isLayoutTabActive } from "../../shared/index.js";
|
|
9
|
+
import { cn } from "../../../utils/cn.js";
|
|
10
10
|
import { useSpaciousLayout } from "../index.js";
|
|
11
11
|
import Link from "fumadocs-core/link";
|
|
12
12
|
import { usePathname } from "fumadocs-core/framework";
|
|
@@ -54,7 +54,7 @@ function Sidebar({ className, ...props }) {
|
|
|
54
54
|
}),
|
|
55
55
|
/* @__PURE__ */ jsxs("div", {
|
|
56
56
|
className: "flex flex-col gap-2 px-3 empty:hidden",
|
|
57
|
-
children: [/* @__PURE__ */ jsx(
|
|
57
|
+
children: [/* @__PURE__ */ jsx(TabsMenus, {}), slots.searchTrigger && /* @__PURE__ */ jsx(slots.searchTrigger.full, {
|
|
58
58
|
hideIfDisabled: true,
|
|
59
59
|
className: "h-10 gap-3 rounded-xl ps-[calc(--spacing(2.5)-1px)] pe-2 [&_svg]:shrink-0"
|
|
60
60
|
})]
|
|
@@ -101,7 +101,7 @@ function SidebarDrawer() {
|
|
|
101
101
|
}),
|
|
102
102
|
/* @__PURE__ */ jsxs("div", {
|
|
103
103
|
className: "flex flex-col gap-2 px-3 empty:hidden",
|
|
104
|
-
children: [/* @__PURE__ */ jsx(
|
|
104
|
+
children: [/* @__PURE__ */ jsx(TabsMenus, {}), aiChat && /* @__PURE__ */ jsxs("button", {
|
|
105
105
|
type: "button",
|
|
106
106
|
className: cn(itemVariants(), "hover:bg-fd-accent/60"),
|
|
107
107
|
onClick: () => {
|
|
@@ -115,16 +115,24 @@ function SidebarDrawer() {
|
|
|
115
115
|
]
|
|
116
116
|
})] });
|
|
117
117
|
}
|
|
118
|
-
|
|
118
|
+
/** the sections, then the root folders of a type within them (`root: 'version'`), as one control */
|
|
119
|
+
function TabsMenus() {
|
|
119
120
|
const { props: { tabs } } = useSpaciousLayout();
|
|
121
|
+
const groups = useTabsGroups(tabs);
|
|
122
|
+
const start = Math.max(0, groups.findLastIndex((group) => typeof group.active?.root !== "string"));
|
|
123
|
+
if (start >= groups.length) return;
|
|
124
|
+
return /* @__PURE__ */ jsx("div", {
|
|
125
|
+
className: "flex flex-col rounded-xl border bg-fd-secondary/50 divide-y overflow-clip",
|
|
126
|
+
children: groups.map((group, i) => i >= start && /* @__PURE__ */ jsx(TabsMenu, { options: group.options }, i))
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
function TabsMenu({ options }) {
|
|
120
130
|
const t = useTranslations();
|
|
121
131
|
const pathname = usePathname();
|
|
122
132
|
const path = useTreePath();
|
|
123
|
-
const options = useTabsGroups(tabs).findLast((group) => typeof group.active?.root !== "string")?.options ?? [];
|
|
124
133
|
const selected = options.findLast((tab) => isLayoutTabActive(tab, path, pathname));
|
|
125
|
-
if (options.length === 0) return;
|
|
126
134
|
return /* @__PURE__ */ jsxs(Menu.Root, { children: [/* @__PURE__ */ jsxs(Menu.Trigger, {
|
|
127
|
-
className: "flex w-full h-10 items-center gap-3
|
|
135
|
+
className: "flex w-full h-10 items-center gap-3 ps-[calc(--spacing(2.5)-1px)] pe-2.5 text-start font-medium outline-none transition-colors hover:bg-fd-accent focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-fd-ring data-popup-open:bg-fd-accent [&_svg]:size-4 [&_svg]:shrink-0",
|
|
128
136
|
children: [
|
|
129
137
|
selected && /* @__PURE__ */ jsx(TabIcon, { tab: selected }),
|
|
130
138
|
/* @__PURE__ */ jsx("span", {
|
package/dist/mdx.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createRelativeLink as createRelativeLink$1 } from "./mdx.server.js";
|
|
2
2
|
import { Card, Cards } from "./components/card.js";
|
|
3
|
+
import { Callout, CalloutContainer, CalloutDescription, CalloutTitle } from "./components/callout.js";
|
|
3
4
|
import { CodeBlockTab, CodeBlockTabs, CodeBlockTabsList, CodeBlockTabsTrigger } from "./components/codeblock.js";
|
|
4
|
-
import { createRelativeLink as createRelativeLink$1 } from "./mdx.server.js";
|
|
5
5
|
import React, { AnchorHTMLAttributes, FC, HTMLAttributes, ImgHTMLAttributes, TableHTMLAttributes } from "react";
|
|
6
6
|
/**
|
|
7
7
|
* global types for MDX.js
|
package/dist/mdx.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { cn } from "./utils/cn.js";
|
|
2
1
|
import { Card, Cards } from "./components/card.js";
|
|
3
2
|
import { Callout, CalloutContainer, CalloutDescription, CalloutTitle } from "./components/callout.js";
|
|
4
3
|
import { Heading } from "./components/heading.js";
|
|
4
|
+
import { cn } from "./utils/cn.js";
|
|
5
5
|
import { CodeBlock, CodeBlockTab, CodeBlockTabs, CodeBlockTabsList, CodeBlockTabsTrigger, Pre } from "./components/codeblock.js";
|
|
6
6
|
import Link from "fumadocs-core/link";
|
|
7
7
|
import { Image } from "fumadocs-core/framework";
|
package/dist/page.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "./utils/cn.js";
|
|
3
|
-
import { useIsDocsLayout } from "./layouts/docs/client.js";
|
|
4
|
-
import { Breadcrumb } from "./layouts/docs/page/slots/breadcrumb.js";
|
|
5
3
|
import { DocsBody, DocsDescription, DocsTitle, EditOnGitHub, PageLastUpdate, page_exports } from "./layouts/docs/page/index.js";
|
|
4
|
+
import { Breadcrumb } from "./layouts/docs/page/slots/breadcrumb.js";
|
|
6
5
|
import { page_exports as page_exports$1 } from "./layouts/notebook/page/index.js";
|
|
6
|
+
import { useIsDocsLayout } from "./layouts/docs/client.js";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
// src/page.tsx
|
|
9
9
|
/**
|
|
@@ -25,7 +25,7 @@ function DocsPage({ lastUpdate, editOnGithub, children, ...props }) {
|
|
|
25
25
|
...props,
|
|
26
26
|
children: [children, /* @__PURE__ */ jsxs("div", {
|
|
27
27
|
className: "flex flex-row flex-wrap items-center justify-between gap-4 empty:hidden",
|
|
28
|
-
children: [editOnGithub && /* @__PURE__ */ jsx(EditOnGitHub, { href: `https://github.com/${editOnGithub.owner}/${editOnGithub.repo}/blob/${editOnGithub.sha ?? "main"}/${editOnGithub.path.startsWith("/") ? editOnGithub.path.slice(1) : editOnGithub.path}` }), lastUpdate && /* @__PURE__ */ jsx(PageLastUpdate, { date: new Date(lastUpdate) })]
|
|
28
|
+
children: [editOnGithub && /* @__PURE__ */ jsx(EditOnGitHub, { href: `https://github.com/${editOnGithub.owner}/${editOnGithub.repo}/blob/${editOnGithub.sha ?? "main"}/${encodeURI(editOnGithub.path.startsWith("/") ? editOnGithub.path.slice(1) : editOnGithub.path)}` }), lastUpdate && /* @__PURE__ */ jsx(PageLastUpdate, { date: new Date(lastUpdate) })]
|
|
29
29
|
})]
|
|
30
30
|
});
|
|
31
31
|
}
|
package/dist/provider/base.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SearchProviderProps } from "../contexts/search.js";
|
|
2
1
|
import { I18nProviderProps } from "../contexts/i18n.js";
|
|
2
|
+
import { SearchProviderProps } from "../contexts/search.js";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
import { ThemeProviderProps, UseThemeProps, useTheme } from "next-themes";
|
|
5
5
|
interface SearchOptions extends Omit<SearchProviderProps, 'children'> {
|
package/dist/provider/base.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { I18nProvider } from "../contexts/i18n.js";
|
|
3
|
-
import { useHotKey } from "../utils/hotkey.js";
|
|
4
3
|
import { SearchProvider } from "../contexts/search.js";
|
|
4
|
+
import { useHotKey } from "../utils/hotkey.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { ThemeProvider, useTheme, useTheme as useTheme$1 } from "next-themes";
|
|
7
7
|
import { flushSync } from "react-dom";
|