@fumadocs/base-ui 16.11.1 → 16.11.3
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/docs.css +1 -1
- package/css/generated/flux.css +1 -1
- package/css/generated/home.css +1 -1
- package/css/generated/notebook.css +1 -1
- package/css/generated/shared.css +1 -1
- package/dist/components/accordion.d.ts +2 -14
- package/dist/components/banner.d.ts +1 -9
- package/dist/components/callout.d.ts +4 -24
- package/dist/components/card.d.ts +1 -7
- package/dist/components/codeblock.d.ts +4 -26
- package/dist/components/codeblock.rsc.d.ts +1 -6
- package/dist/components/dialog/search-algolia.d.ts +2 -11
- package/dist/components/dialog/search-default.d.ts +2 -12
- package/dist/components/dialog/search-orama.d.ts +2 -13
- package/dist/components/dialog/search.d.ts +10 -50
- package/dist/components/dialog/search.js +19 -6
- package/dist/components/dynamic-codeblock.core.d.ts +1 -9
- package/dist/components/dynamic-codeblock.d.ts +0 -1
- package/dist/components/files.d.ts +3 -16
- package/dist/components/github-info.d.ts +2 -17
- package/dist/components/heading.d.ts +1 -5
- package/dist/components/image-zoom.d.ts +2 -7
- package/dist/components/inline-toc.d.ts +1 -6
- package/dist/components/sidebar/base.d.ts +9 -45
- package/dist/components/sidebar/link-item.d.ts +1 -11
- package/dist/components/sidebar/page-tree.d.ts +1 -9
- package/dist/components/sidebar/tabs/dropdown.d.ts +1 -6
- package/dist/components/sidebar/tabs/index.d.ts +1 -4
- package/dist/components/steps.d.ts +2 -7
- package/dist/components/tabs.d.ts +5 -27
- package/dist/components/toc/clerk.d.ts +2 -11
- package/dist/components/toc/default.d.ts +2 -12
- package/dist/components/toc/index.d.ts +2 -11
- package/dist/components/type-table.d.ts +1 -7
- package/dist/components/ui/accordion.d.ts +5 -24
- package/dist/components/ui/button.d.ts +0 -1
- package/dist/components/ui/collapsible.d.ts +1 -6
- package/dist/components/ui/popover.d.ts +1 -7
- package/dist/components/ui/scroll-area.d.ts +3 -15
- package/dist/components/ui/tabs.d.ts +2 -15
- package/dist/contexts/i18n.d.ts +1 -8
- package/dist/contexts/search.d.ts +6 -12
- package/dist/contexts/search.js +11 -5
- package/dist/contexts/tree.d.ts +1 -5
- package/dist/i18n.d.ts +0 -1
- package/dist/layouts/docs/client.d.ts +0 -1
- package/dist/layouts/docs/index.d.ts +1 -13
- package/dist/layouts/docs/page/index.d.ts +5 -44
- package/dist/layouts/docs/page/slots/breadcrumb.d.ts +1 -7
- package/dist/layouts/docs/page/slots/container.d.ts +0 -1
- package/dist/layouts/docs/page/slots/footer.d.ts +1 -7
- package/dist/layouts/docs/page/slots/toc.d.ts +2 -17
- package/dist/layouts/docs/slots/container.d.ts +0 -1
- package/dist/layouts/docs/slots/header.d.ts +0 -1
- package/dist/layouts/docs/slots/sidebar.d.ts +1 -8
- package/dist/layouts/flux/index.d.ts +2 -14
- package/dist/layouts/flux/page/index.d.ts +5 -40
- package/dist/layouts/flux/page/slots/breadcrumb.d.ts +1 -7
- package/dist/layouts/flux/page/slots/container.d.ts +0 -1
- package/dist/layouts/flux/page/slots/footer.d.ts +1 -7
- package/dist/layouts/flux/page/slots/toc.d.ts +1 -10
- package/dist/layouts/flux/slots/container.d.ts +0 -1
- package/dist/layouts/flux/slots/sidebar.d.ts +1 -7
- package/dist/layouts/flux/slots/tab-dropdown.d.ts +1 -7
- package/dist/layouts/home/index.d.ts +0 -1
- package/dist/layouts/home/navbar.d.ts +5 -5
- package/dist/layouts/home/navbar.js +18 -15
- package/dist/layouts/home/slots/container.d.ts +0 -1
- package/dist/layouts/home/slots/header.d.ts +1 -2
- package/dist/layouts/home/slots/header.js +67 -52
- package/dist/layouts/notebook/client.d.ts +0 -1
- package/dist/layouts/notebook/index.d.ts +1 -12
- package/dist/layouts/notebook/page/index.d.ts +5 -44
- package/dist/layouts/notebook/page/slots/breadcrumb.d.ts +1 -7
- package/dist/layouts/notebook/page/slots/container.d.ts +0 -1
- package/dist/layouts/notebook/page/slots/footer.d.ts +1 -7
- package/dist/layouts/notebook/page/slots/toc.d.ts +2 -17
- package/dist/layouts/notebook/slots/container.d.ts +0 -1
- package/dist/layouts/notebook/slots/header.d.ts +0 -1
- package/dist/layouts/notebook/slots/sidebar.d.ts +2 -13
- package/dist/layouts/shared/client.d.ts +2 -9
- package/dist/layouts/shared/index.d.ts +3 -12
- package/dist/layouts/shared/page-actions.d.ts +2 -17
- package/dist/layouts/shared/slots/language-select.d.ts +1 -7
- package/dist/layouts/shared/slots/search-trigger.d.ts +2 -11
- package/dist/layouts/shared/slots/search-trigger.js +7 -10
- package/dist/layouts/shared/slots/theme-switch.d.ts +1 -6
- package/dist/mdx.d.ts +0 -1
- package/dist/mdx.server.d.ts +0 -1
- package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-medium-image-zoom/dist/controlled.d.ts +0 -1
- package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-medium-image-zoom/dist/uncontrolled.d.ts +0 -1
- package/dist/og/takumi.d.ts +2 -8
- package/dist/og/takumi.js +1 -1
- package/dist/og.d.ts +1 -7
- package/dist/page.d.ts +1 -7
- package/dist/provider/astro.d.ts +29 -0
- package/dist/provider/astro.js +20 -0
- package/dist/provider/base.d.ts +1 -8
- package/dist/provider/next.d.ts +1 -5
- package/dist/provider/react-router.d.ts +1 -5
- package/dist/provider/tanstack.d.ts +1 -5
- package/dist/provider/waku.d.ts +1 -5
- package/dist/style.css +10 -9
- package/dist/utils/use-copy-button.d.ts +0 -1
- package/dist/utils/use-footer-items.d.ts +0 -1
- package/dist/utils/use-is-scroll-top.d.ts +1 -3
- package/package.json +12 -12
- package/dist/components/ui/navigation-menu.d.ts +0 -28
- package/dist/components/ui/navigation-menu.js +0 -56
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef } from "react";
|
|
2
|
-
|
|
3
2
|
//#region src/components/heading.d.ts
|
|
4
3
|
type Types = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
5
4
|
type HeadingProps<T extends Types> = Omit<ComponentPropsWithoutRef<T>, 'as'> & {
|
|
6
5
|
as?: T;
|
|
7
6
|
};
|
|
8
|
-
declare function Heading<T extends Types = 'h1'>({
|
|
9
|
-
as,
|
|
10
|
-
...props
|
|
11
|
-
}: HeadingProps<T>): import("react").JSX.Element;
|
|
7
|
+
declare function Heading<T extends Types = 'h1'>({ as, ...props }: HeadingProps<T>): import("react").JSX.Element;
|
|
12
8
|
//#endregion
|
|
13
9
|
export { Heading };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UncontrolledProps } from "../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-medium-image-zoom/dist/uncontrolled.js";
|
|
2
|
+
import "../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-medium-image-zoom/dist/index.js";
|
|
2
3
|
import { ImageProps } from "fumadocs-core/framework";
|
|
3
4
|
import { ComponentProps } from "react";
|
|
4
|
-
|
|
5
5
|
//#region src/components/image-zoom.d.ts
|
|
6
6
|
type ImageZoomProps = ImageProps & {
|
|
7
7
|
/**
|
|
@@ -13,11 +13,6 @@ type ImageZoomProps = ImageProps & {
|
|
|
13
13
|
*/
|
|
14
14
|
rmiz?: UncontrolledProps;
|
|
15
15
|
};
|
|
16
|
-
declare function ImageZoom({
|
|
17
|
-
zoomInProps,
|
|
18
|
-
children,
|
|
19
|
-
rmiz,
|
|
20
|
-
...props
|
|
21
|
-
}: ImageZoomProps): import("react").JSX.Element;
|
|
16
|
+
declare function ImageZoom({ zoomInProps, children, rmiz, ...props }: ImageZoomProps): import("react").JSX.Element;
|
|
22
17
|
//#endregion
|
|
23
18
|
export { ImageZoom, ImageZoomProps };
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
import { Collapsible } from "./ui/collapsible.js";
|
|
2
2
|
import { ComponentProps } from "react";
|
|
3
3
|
import { TOCItemType } from "fumadocs-core/toc";
|
|
4
|
-
|
|
5
4
|
//#region src/components/inline-toc.d.ts
|
|
6
5
|
interface InlineTocProps extends ComponentProps<typeof Collapsible> {
|
|
7
6
|
items: TOCItemType[];
|
|
8
7
|
}
|
|
9
|
-
declare function InlineTOC({
|
|
10
|
-
items,
|
|
11
|
-
className,
|
|
12
|
-
...props
|
|
13
|
-
}: InlineTocProps): import("react").JSX.Element;
|
|
8
|
+
declare function InlineTOC({ items, className, ...props }: InlineTocProps): import("react").JSX.Element;
|
|
14
9
|
//#endregion
|
|
15
10
|
export { InlineTOC, InlineTocProps };
|
|
@@ -2,8 +2,6 @@ import { CollapsibleContentProps, CollapsibleTriggerProps } from "../ui/collapsi
|
|
|
2
2
|
import { ScrollAreaProps } from "../ui/scroll-area.js";
|
|
3
3
|
import { LinkProps } from "fumadocs-core/link";
|
|
4
4
|
import { ComponentProps, PointerEvent, ReactNode, RefObject } from "react";
|
|
5
|
-
|
|
6
|
-
//#region src/components/sidebar/base.d.ts
|
|
7
5
|
declare namespace base_d_exports {
|
|
8
6
|
export { SidebarCollapseTrigger, SidebarContent, SidebarDrawerContent, SidebarDrawerOverlay, SidebarFolder, SidebarFolderContent, SidebarFolderLink, SidebarFolderTrigger, SidebarItem, SidebarProvider, SidebarProviderProps, SidebarSeparator, SidebarTrigger, SidebarViewport, useAutoScroll, useFolder, useFolderDepth, useSidebar };
|
|
9
7
|
}
|
|
@@ -36,11 +34,7 @@ interface SidebarProviderProps {
|
|
|
36
34
|
}
|
|
37
35
|
type Mode = 'drawer' | 'full';
|
|
38
36
|
declare const SidebarContext: import("react").Context<SidebarContext | null>;
|
|
39
|
-
declare function SidebarProvider({
|
|
40
|
-
defaultOpenLevel,
|
|
41
|
-
prefetch,
|
|
42
|
-
children
|
|
43
|
-
}: SidebarProviderProps): import("react").JSX.Element;
|
|
37
|
+
declare function SidebarProvider({ defaultOpenLevel, prefetch, children }: SidebarProviderProps): import("react").JSX.Element;
|
|
44
38
|
declare function useSidebar(): SidebarContext;
|
|
45
39
|
declare function useFolder(): {
|
|
46
40
|
open: boolean;
|
|
@@ -49,9 +43,7 @@ declare function useFolder(): {
|
|
|
49
43
|
collapsible: boolean;
|
|
50
44
|
} | null;
|
|
51
45
|
declare function useFolderDepth(): number;
|
|
52
|
-
declare function SidebarContent({
|
|
53
|
-
children
|
|
54
|
-
}: {
|
|
46
|
+
declare function SidebarContent({ children }: {
|
|
55
47
|
children: (state: {
|
|
56
48
|
ref: RefObject<HTMLElement | null>;
|
|
57
49
|
collapsed: boolean;
|
|
@@ -61,52 +53,24 @@ declare function SidebarContent({
|
|
|
61
53
|
}) => ReactNode;
|
|
62
54
|
}): ReactNode;
|
|
63
55
|
declare function SidebarDrawerOverlay(props: ComponentProps<'div'>): import("react").JSX.Element | undefined;
|
|
64
|
-
declare function SidebarDrawerContent({
|
|
65
|
-
|
|
66
|
-
children,
|
|
67
|
-
...props
|
|
68
|
-
}: ComponentProps<'aside'>): import("react").JSX.Element | undefined;
|
|
69
|
-
declare function SidebarViewport({
|
|
70
|
-
className,
|
|
71
|
-
...props
|
|
72
|
-
}: ScrollAreaProps): import("react").JSX.Element;
|
|
56
|
+
declare function SidebarDrawerContent({ className, children, ...props }: ComponentProps<'aside'>): import("react").JSX.Element | undefined;
|
|
57
|
+
declare function SidebarViewport({ className, ...props }: ScrollAreaProps): import("react").JSX.Element;
|
|
73
58
|
declare function SidebarSeparator(props: ComponentProps<'p'>): import("react").JSX.Element;
|
|
74
|
-
declare function SidebarItem({
|
|
75
|
-
icon,
|
|
76
|
-
active,
|
|
77
|
-
children,
|
|
78
|
-
...props
|
|
79
|
-
}: LinkProps & {
|
|
59
|
+
declare function SidebarItem({ icon, active, children, ...props }: LinkProps & {
|
|
80
60
|
active?: boolean;
|
|
81
61
|
icon?: ReactNode;
|
|
82
62
|
}): import("react").JSX.Element;
|
|
83
|
-
declare function SidebarFolder({
|
|
84
|
-
defaultOpen: defaultOpenProp,
|
|
85
|
-
collapsible,
|
|
86
|
-
active,
|
|
87
|
-
children,
|
|
88
|
-
...props
|
|
89
|
-
}: ComponentProps<'div'> & {
|
|
63
|
+
declare function SidebarFolder({ defaultOpen: defaultOpenProp, collapsible, active, children, ...props }: ComponentProps<'div'> & {
|
|
90
64
|
active?: boolean;
|
|
91
65
|
defaultOpen?: boolean;
|
|
92
66
|
collapsible?: boolean;
|
|
93
67
|
}): import("react").JSX.Element;
|
|
94
|
-
declare function SidebarFolderTrigger({
|
|
95
|
-
|
|
96
|
-
...props
|
|
97
|
-
}: CollapsibleTriggerProps): import("react").JSX.Element;
|
|
98
|
-
declare function SidebarFolderLink({
|
|
99
|
-
children,
|
|
100
|
-
active,
|
|
101
|
-
...props
|
|
102
|
-
}: LinkProps & {
|
|
68
|
+
declare function SidebarFolderTrigger({ children, ...props }: CollapsibleTriggerProps): import("react").JSX.Element;
|
|
69
|
+
declare function SidebarFolderLink({ children, active, ...props }: LinkProps & {
|
|
103
70
|
active?: boolean;
|
|
104
71
|
}): import("react").JSX.Element;
|
|
105
72
|
declare function SidebarFolderContent(props: CollapsibleContentProps): import("react").JSX.Element;
|
|
106
|
-
declare function SidebarTrigger({
|
|
107
|
-
children,
|
|
108
|
-
...props
|
|
109
|
-
}: ComponentProps<'button'>): import("react").JSX.Element;
|
|
73
|
+
declare function SidebarTrigger({ children, ...props }: ComponentProps<'button'>): import("react").JSX.Element;
|
|
110
74
|
declare function SidebarCollapseTrigger(props: ComponentProps<'button'>): import("react").JSX.Element;
|
|
111
75
|
/**
|
|
112
76
|
* scroll to the element if `active` is true
|
|
@@ -1,19 +1,9 @@
|
|
|
1
1
|
import { base_d_exports } from "./base.js";
|
|
2
2
|
import { LinkItemType } from "../../layouts/shared/index.js";
|
|
3
3
|
import { HTMLAttributes } from "react";
|
|
4
|
-
|
|
5
4
|
//#region src/components/sidebar/link-item.d.ts
|
|
6
5
|
type InternalComponents = Pick<typeof base_d_exports, 'SidebarFolder' | 'SidebarFolderLink' | 'SidebarFolderContent' | 'SidebarFolderTrigger' | 'SidebarItem'>;
|
|
7
|
-
declare function createLinkItemRenderer({
|
|
8
|
-
SidebarFolder,
|
|
9
|
-
SidebarFolderContent,
|
|
10
|
-
SidebarFolderLink,
|
|
11
|
-
SidebarFolderTrigger,
|
|
12
|
-
SidebarItem
|
|
13
|
-
}: InternalComponents): ({
|
|
14
|
-
item,
|
|
15
|
-
...props
|
|
16
|
-
}: HTMLAttributes<HTMLElement> & {
|
|
6
|
+
declare function createLinkItemRenderer({ SidebarFolder, SidebarFolderContent, SidebarFolderLink, SidebarFolderTrigger, SidebarItem }: InternalComponents): ({ item, ...props }: HTMLAttributes<HTMLElement> & {
|
|
17
7
|
item: Exclude<LinkItemType, {
|
|
18
8
|
type: "icon";
|
|
19
9
|
}>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { base_d_exports } from "./base.js";
|
|
2
2
|
import { FC, ReactNode } from "react";
|
|
3
3
|
import * as PageTree from "fumadocs-core/page-tree";
|
|
4
|
-
|
|
5
4
|
//#region src/components/sidebar/page-tree.d.ts
|
|
6
5
|
interface SidebarPageTreeComponents {
|
|
7
6
|
Item: FC<{
|
|
@@ -16,13 +15,6 @@ interface SidebarPageTreeComponents {
|
|
|
16
15
|
}>;
|
|
17
16
|
}
|
|
18
17
|
type InternalComponents = Pick<typeof base_d_exports, 'SidebarSeparator' | 'SidebarFolder' | 'SidebarFolderLink' | 'SidebarFolderContent' | 'SidebarFolderTrigger' | 'SidebarItem'>;
|
|
19
|
-
declare function createPageTreeRenderer({
|
|
20
|
-
SidebarFolder,
|
|
21
|
-
SidebarFolderContent,
|
|
22
|
-
SidebarFolderLink,
|
|
23
|
-
SidebarFolderTrigger,
|
|
24
|
-
SidebarSeparator,
|
|
25
|
-
SidebarItem
|
|
26
|
-
}: InternalComponents): (components: Partial<SidebarPageTreeComponents>) => import("react").JSX.Element;
|
|
18
|
+
declare function createPageTreeRenderer({ SidebarFolder, SidebarFolderContent, SidebarFolderLink, SidebarFolderTrigger, SidebarSeparator, SidebarItem }: InternalComponents): (components: Partial<SidebarPageTreeComponents>) => import("react").JSX.Element;
|
|
27
19
|
//#endregion
|
|
28
20
|
export { SidebarPageTreeComponents, createPageTreeRenderer };
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import { LayoutTab, isLayoutTabActive } from "../../../layouts/shared/index.js";
|
|
2
2
|
import { ComponentProps, ReactNode } from "react";
|
|
3
|
-
|
|
4
3
|
//#region src/components/sidebar/tabs/dropdown.d.ts
|
|
5
4
|
type SidebarTabWithProps = LayoutTab;
|
|
6
|
-
declare function SidebarTabsDropdown({
|
|
7
|
-
options,
|
|
8
|
-
placeholder,
|
|
9
|
-
...props
|
|
10
|
-
}: {
|
|
5
|
+
declare function SidebarTabsDropdown({ options, placeholder, ...props }: {
|
|
11
6
|
placeholder?: ReactNode;
|
|
12
7
|
options: SidebarTabWithProps[];
|
|
13
8
|
} & ComponentProps<'button'>): import("react").JSX.Element;
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { LayoutTab } from "../../../layouts/shared/index.js";
|
|
2
2
|
import * as PageTree from "fumadocs-core/page-tree";
|
|
3
|
-
|
|
4
3
|
//#region src/components/sidebar/tabs/index.d.ts
|
|
5
4
|
type SidebarTab = LayoutTab;
|
|
6
5
|
interface GetSidebarTabsOptions {
|
|
7
6
|
transform?: (option: SidebarTab, node: PageTree.Folder) => SidebarTab | null;
|
|
8
7
|
}
|
|
9
|
-
declare function getSidebarTabs(tree: PageTree.Root, {
|
|
10
|
-
transform
|
|
11
|
-
}?: GetSidebarTabsOptions): SidebarTab[];
|
|
8
|
+
declare function getSidebarTabs(tree: PageTree.Root, { transform }?: GetSidebarTabsOptions): SidebarTab[];
|
|
12
9
|
//#endregion
|
|
13
10
|
export { GetSidebarTabsOptions, SidebarTab, getSidebarTabs };
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
|
|
3
2
|
//#region src/components/steps.d.ts
|
|
4
|
-
declare function Steps({
|
|
5
|
-
children
|
|
6
|
-
}: {
|
|
3
|
+
declare function Steps({ children }: {
|
|
7
4
|
children: ReactNode;
|
|
8
5
|
}): import("react").JSX.Element;
|
|
9
|
-
declare function Step({
|
|
10
|
-
children
|
|
11
|
-
}: {
|
|
6
|
+
declare function Step({ children }: {
|
|
12
7
|
children: ReactNode;
|
|
13
8
|
}): import("react").JSX.Element;
|
|
14
9
|
//#endregion
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Tabs as Tabs$1, TabsContent as TabsContent$1, TabsList as TabsList$1, TabsTrigger as TabsTrigger$1 } from "./ui/tabs.js";
|
|
2
2
|
import * as React$1 from "react";
|
|
3
3
|
import { ComponentProps, ReactNode } from "react";
|
|
4
|
-
|
|
5
4
|
//#region src/components/tabs.d.ts
|
|
6
5
|
interface TabsProps extends Omit<ComponentProps<typeof Tabs$1>, 'value' | 'onValueChange'> {
|
|
7
6
|
/**
|
|
@@ -19,37 +18,16 @@ interface TabsProps extends Omit<ComponentProps<typeof Tabs$1>, 'value' | 'onVal
|
|
|
19
18
|
*/
|
|
20
19
|
label?: ReactNode;
|
|
21
20
|
}
|
|
22
|
-
declare function TabsList({
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}: React$1.ComponentProps<typeof TabsList$1>): React$1.JSX.Element;
|
|
26
|
-
declare function TabsTrigger({
|
|
27
|
-
className,
|
|
28
|
-
...props
|
|
29
|
-
}: React$1.ComponentProps<typeof TabsTrigger$1>): React$1.JSX.Element;
|
|
30
|
-
declare function Tabs({
|
|
31
|
-
ref,
|
|
32
|
-
className,
|
|
33
|
-
items,
|
|
34
|
-
label,
|
|
35
|
-
defaultIndex,
|
|
36
|
-
defaultValue,
|
|
37
|
-
...props
|
|
38
|
-
}: TabsProps): React$1.JSX.Element;
|
|
21
|
+
declare function TabsList({ className, ...props }: React$1.ComponentProps<typeof TabsList$1>): React$1.JSX.Element;
|
|
22
|
+
declare function TabsTrigger({ className, ...props }: React$1.ComponentProps<typeof TabsTrigger$1>): React$1.JSX.Element;
|
|
23
|
+
declare function Tabs({ ref, className, items, label, defaultIndex, defaultValue, ...props }: TabsProps): React$1.JSX.Element;
|
|
39
24
|
interface TabProps extends Omit<ComponentProps<typeof TabsContent$1>, 'value'> {
|
|
40
25
|
/**
|
|
41
26
|
* Value of tab, detect from index if unspecified.
|
|
42
27
|
*/
|
|
43
28
|
value?: string;
|
|
44
29
|
}
|
|
45
|
-
declare function Tab({
|
|
46
|
-
|
|
47
|
-
...props
|
|
48
|
-
}: TabProps): React$1.JSX.Element;
|
|
49
|
-
declare function TabsContent({
|
|
50
|
-
value,
|
|
51
|
-
className,
|
|
52
|
-
...props
|
|
53
|
-
}: ComponentProps<typeof TabsContent$1>): React$1.JSX.Element;
|
|
30
|
+
declare function Tab({ value, ...props }: TabProps): React$1.JSX.Element;
|
|
31
|
+
declare function TabsContent({ value, className, ...props }: ComponentProps<typeof TabsContent$1>): React$1.JSX.Element;
|
|
54
32
|
//#endregion
|
|
55
33
|
export { Tab, TabProps, Tabs, TabsContent, TabsList, TabsProps, TabsTrigger };
|
|
@@ -1,19 +1,10 @@
|
|
|
1
1
|
import { ComponentProps } from "react";
|
|
2
2
|
import * as Primitive from "fumadocs-core/toc";
|
|
3
|
-
|
|
4
3
|
//#region src/components/toc/clerk.d.ts
|
|
5
4
|
type TOCItemsProps = ComponentProps<'div'>;
|
|
6
|
-
declare function TOCItems({
|
|
7
|
-
ref,
|
|
8
|
-
className,
|
|
9
|
-
children,
|
|
10
|
-
...props
|
|
11
|
-
}: TOCItemsProps): import("react").JSX.Element;
|
|
5
|
+
declare function TOCItems({ ref, className, children, ...props }: TOCItemsProps): import("react").JSX.Element;
|
|
12
6
|
declare function TOCEmpty(): import("react").JSX.Element;
|
|
13
|
-
declare function TOCItem({
|
|
14
|
-
item,
|
|
15
|
-
...props
|
|
16
|
-
}: Primitive.TOCItemProps & {
|
|
7
|
+
declare function TOCItem({ item, ...props }: Primitive.TOCItemProps & {
|
|
17
8
|
item: Primitive.TOCItemType;
|
|
18
9
|
}): import("react").JSX.Element;
|
|
19
10
|
//#endregion
|
|
@@ -1,22 +1,12 @@
|
|
|
1
1
|
import { ComponentProps } from "react";
|
|
2
2
|
import * as Primitive from "fumadocs-core/toc";
|
|
3
|
-
|
|
4
3
|
//#region src/components/toc/default.d.ts
|
|
5
4
|
interface TOCItemsProps extends ComponentProps<'div'> {
|
|
6
5
|
thumbBox?: boolean;
|
|
7
6
|
}
|
|
8
|
-
declare function TOCItems({
|
|
9
|
-
ref,
|
|
10
|
-
className,
|
|
11
|
-
thumbBox,
|
|
12
|
-
children,
|
|
13
|
-
...props
|
|
14
|
-
}: TOCItemsProps): import("react").JSX.Element;
|
|
7
|
+
declare function TOCItems({ ref, className, thumbBox, children, ...props }: TOCItemsProps): import("react").JSX.Element;
|
|
15
8
|
declare function TOCEmpty(): import("react").JSX.Element;
|
|
16
|
-
declare function TOCItem({
|
|
17
|
-
item,
|
|
18
|
-
...props
|
|
19
|
-
}: Primitive.TOCItemProps & {
|
|
9
|
+
declare function TOCItem({ item, ...props }: Primitive.TOCItemProps & {
|
|
20
10
|
item: Primitive.TOCItemType;
|
|
21
11
|
}): import("react").JSX.Element;
|
|
22
12
|
//#endregion
|
|
@@ -1,19 +1,10 @@
|
|
|
1
1
|
import { ComponentProps } from "react";
|
|
2
2
|
import * as Primitive from "fumadocs-core/toc";
|
|
3
|
-
|
|
4
3
|
//#region src/components/toc/index.d.ts
|
|
5
4
|
declare function useTOCItems(): Primitive.TOCItemType[];
|
|
6
5
|
type TOCProviderProps = Primitive.AnchorProviderProps;
|
|
7
6
|
declare const useActiveAnchor: typeof Primitive.useActiveAnchor, useActiveAnchors: typeof Primitive.useActiveAnchors, useItems: typeof Primitive.useItems;
|
|
8
|
-
declare function TOCProvider({
|
|
9
|
-
|
|
10
|
-
children,
|
|
11
|
-
...props
|
|
12
|
-
}: TOCProviderProps): import("react").JSX.Element;
|
|
13
|
-
declare function TOCScrollArea({
|
|
14
|
-
ref,
|
|
15
|
-
className,
|
|
16
|
-
...props
|
|
17
|
-
}: ComponentProps<'div'>): import("react").JSX.Element;
|
|
7
|
+
declare function TOCProvider({ toc, children, ...props }: TOCProviderProps): import("react").JSX.Element;
|
|
8
|
+
declare function TOCScrollArea({ ref, className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
18
9
|
//#endregion
|
|
19
10
|
export { TOCProvider, TOCProviderProps, TOCScrollArea, useActiveAnchor, useActiveAnchors, useItems, useTOCItems };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ComponentProps, ReactNode } from "react";
|
|
2
|
-
|
|
3
2
|
//#region src/components/type-table.d.ts
|
|
4
3
|
interface ParameterNode {
|
|
5
4
|
name: string;
|
|
@@ -31,12 +30,7 @@ interface TypeNode {
|
|
|
31
30
|
parameters?: ParameterNode[];
|
|
32
31
|
returns?: ReactNode;
|
|
33
32
|
}
|
|
34
|
-
declare function TypeTable({
|
|
35
|
-
id,
|
|
36
|
-
type,
|
|
37
|
-
className,
|
|
38
|
-
...props
|
|
39
|
-
}: {
|
|
33
|
+
declare function TypeTable({ id, type, className, ...props }: {
|
|
40
34
|
type: Record<string, TypeNode>;
|
|
41
35
|
} & ComponentProps<'div'>): import("react").JSX.Element;
|
|
42
36
|
//#endregion
|
|
@@ -1,29 +1,10 @@
|
|
|
1
1
|
import { ComponentProps } from "react";
|
|
2
2
|
import { Accordion as Accordion$1 } from "@base-ui/react/accordion";
|
|
3
|
-
|
|
4
3
|
//#region src/components/ui/accordion.d.ts
|
|
5
|
-
declare function Accordion({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}: ComponentProps<typeof Accordion$1.
|
|
9
|
-
declare function
|
|
10
|
-
children,
|
|
11
|
-
...props
|
|
12
|
-
}: ComponentProps<typeof Accordion$1.Item>): import("react").JSX.Element;
|
|
13
|
-
declare function AccordionHeader({
|
|
14
|
-
className,
|
|
15
|
-
children,
|
|
16
|
-
...props
|
|
17
|
-
}: ComponentProps<typeof Accordion$1.Header>): import("react").JSX.Element;
|
|
18
|
-
declare function AccordionTrigger({
|
|
19
|
-
className,
|
|
20
|
-
children,
|
|
21
|
-
...props
|
|
22
|
-
}: ComponentProps<typeof Accordion$1.Trigger>): import("react").JSX.Element;
|
|
23
|
-
declare function AccordionContent({
|
|
24
|
-
className,
|
|
25
|
-
children,
|
|
26
|
-
...props
|
|
27
|
-
}: ComponentProps<typeof Accordion$1.Panel>): import("react").JSX.Element;
|
|
4
|
+
declare function Accordion({ className, ...props }: ComponentProps<typeof Accordion$1.Root>): import("react").JSX.Element;
|
|
5
|
+
declare function AccordionItem({ children, ...props }: ComponentProps<typeof Accordion$1.Item>): import("react").JSX.Element;
|
|
6
|
+
declare function AccordionHeader({ className, children, ...props }: ComponentProps<typeof Accordion$1.Header>): import("react").JSX.Element;
|
|
7
|
+
declare function AccordionTrigger({ className, children, ...props }: ComponentProps<typeof Accordion$1.Trigger>): import("react").JSX.Element;
|
|
8
|
+
declare function AccordionContent({ className, children, ...props }: ComponentProps<typeof Accordion$1.Panel>): import("react").JSX.Element;
|
|
28
9
|
//#endregion
|
|
29
10
|
export { Accordion, AccordionContent, AccordionHeader, AccordionItem, AccordionTrigger };
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import { ComponentProps } from "react";
|
|
2
2
|
import { Collapsible as Collapsible$1 } from "@base-ui/react/collapsible";
|
|
3
|
-
|
|
4
3
|
//#region src/components/ui/collapsible.d.ts
|
|
5
4
|
declare const Collapsible: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").CollapsibleRootProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
5
|
declare const CollapsibleTrigger: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").CollapsibleTriggerProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
7
|
-
declare function CollapsibleContent({
|
|
8
|
-
children,
|
|
9
|
-
className,
|
|
10
|
-
...props
|
|
11
|
-
}: ComponentProps<typeof Collapsible$1.Panel>): import("react").JSX.Element;
|
|
6
|
+
declare function CollapsibleContent({ children, className, ...props }: ComponentProps<typeof Collapsible$1.Panel>): import("react").JSX.Element;
|
|
12
7
|
type CollapsibleProps = Collapsible$1.Root.Props;
|
|
13
8
|
type CollapsibleContentProps = Collapsible$1.Panel.Props;
|
|
14
9
|
type CollapsibleTriggerProps = Collapsible$1.Trigger.Props;
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
2
|
import { Popover as Popover$1 } from "@base-ui/react/popover";
|
|
3
|
-
|
|
4
3
|
//#region src/components/ui/popover.d.ts
|
|
5
4
|
declare const Popover: typeof Popover$1.Root;
|
|
6
5
|
declare const PopoverTrigger: Popover$1.Trigger;
|
|
7
|
-
declare function PopoverContent({
|
|
8
|
-
className,
|
|
9
|
-
align,
|
|
10
|
-
sideOffset,
|
|
11
|
-
...props
|
|
12
|
-
}: React$1.ComponentProps<typeof Popover$1.Popup> & Pick<Popover$1.Positioner.Props, 'sideOffset' | 'align'>): React$1.JSX.Element;
|
|
6
|
+
declare function PopoverContent({ className, align, sideOffset, ...props }: React$1.ComponentProps<typeof Popover$1.Popup> & Pick<Popover$1.Positioner.Props, 'sideOffset' | 'align'>): React$1.JSX.Element;
|
|
13
7
|
declare const PopoverClose: React$1.ForwardRefExoticComponent<Omit<import("@base-ui/react").PopoverCloseProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
14
8
|
//#endregion
|
|
15
9
|
export { Popover, PopoverClose, PopoverContent, PopoverTrigger };
|
|
@@ -1,21 +1,9 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
2
|
import { ScrollArea as ScrollArea$1 } from "@base-ui/react/scroll-area";
|
|
3
|
-
|
|
4
3
|
//#region src/components/ui/scroll-area.d.ts
|
|
5
|
-
declare function ScrollArea({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}: React$1.ComponentProps<typeof ScrollArea$1.Root>): React$1.JSX.Element;
|
|
9
|
-
declare function ScrollViewport({
|
|
10
|
-
className,
|
|
11
|
-
children,
|
|
12
|
-
...props
|
|
13
|
-
}: React$1.ComponentProps<typeof ScrollArea$1.Viewport>): React$1.JSX.Element;
|
|
14
|
-
declare function ScrollBar({
|
|
15
|
-
className,
|
|
16
|
-
orientation,
|
|
17
|
-
...props
|
|
18
|
-
}: React$1.ComponentProps<typeof ScrollArea$1.Scrollbar>): React$1.JSX.Element;
|
|
4
|
+
declare function ScrollArea({ children, ...props }: React$1.ComponentProps<typeof ScrollArea$1.Root>): React$1.JSX.Element;
|
|
5
|
+
declare function ScrollViewport({ className, children, ...props }: React$1.ComponentProps<typeof ScrollArea$1.Viewport>): React$1.JSX.Element;
|
|
6
|
+
declare function ScrollBar({ className, orientation, ...props }: React$1.ComponentProps<typeof ScrollArea$1.Scrollbar>): React$1.JSX.Element;
|
|
19
7
|
type ScrollAreaProps = ScrollArea$1.Root.Props;
|
|
20
8
|
//#endregion
|
|
21
9
|
export { ScrollArea, ScrollAreaProps, ScrollBar, ScrollViewport };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentProps } from "react";
|
|
2
2
|
import { Tabs as Tabs$1 } from "@base-ui/react/tabs";
|
|
3
|
-
|
|
4
3
|
//#region src/components/ui/tabs.d.ts
|
|
5
4
|
interface TabsProps extends ComponentProps<typeof Tabs$1.Root> {
|
|
6
5
|
/**
|
|
@@ -19,19 +18,7 @@ interface TabsProps extends ComponentProps<typeof Tabs$1.Root> {
|
|
|
19
18
|
}
|
|
20
19
|
declare const TabsList: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").TabsListProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
21
20
|
declare const TabsTrigger: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").TabsTabProps, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
22
|
-
declare function Tabs({
|
|
23
|
-
|
|
24
|
-
groupId,
|
|
25
|
-
persist,
|
|
26
|
-
updateAnchor,
|
|
27
|
-
defaultValue,
|
|
28
|
-
value: _value,
|
|
29
|
-
onValueChange: _onValueChange,
|
|
30
|
-
...props
|
|
31
|
-
}: TabsProps): import("react").JSX.Element;
|
|
32
|
-
declare function TabsContent({
|
|
33
|
-
value,
|
|
34
|
-
...props
|
|
35
|
-
}: ComponentProps<typeof Tabs$1.Panel>): import("react").JSX.Element;
|
|
21
|
+
declare function Tabs({ ref, groupId, persist, updateAnchor, defaultValue, value: _value, onValueChange: _onValueChange, ...props }: TabsProps): import("react").JSX.Element;
|
|
22
|
+
declare function TabsContent({ value, ...props }: ComponentProps<typeof Tabs$1.Panel>): import("react").JSX.Element;
|
|
36
23
|
//#endregion
|
|
37
24
|
export { Tabs, TabsContent, TabsList, TabsProps, TabsTrigger };
|
package/dist/contexts/i18n.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
|
|
3
2
|
//#region src/contexts/i18n.d.ts
|
|
4
3
|
interface LocaleItem {
|
|
5
4
|
name: string;
|
|
@@ -18,12 +17,6 @@ interface I18nProviderProps {
|
|
|
18
17
|
locales?: LocaleItem[];
|
|
19
18
|
children?: ReactNode;
|
|
20
19
|
}
|
|
21
|
-
declare function I18nProvider({
|
|
22
|
-
locales,
|
|
23
|
-
locale,
|
|
24
|
-
onLocaleChange,
|
|
25
|
-
children,
|
|
26
|
-
translations
|
|
27
|
-
}: I18nProviderProps): import("react").JSX.Element;
|
|
20
|
+
declare function I18nProvider({ locales, locale, onLocaleChange, children, translations }: I18nProviderProps): import("react").JSX.Element;
|
|
28
21
|
//#endregion
|
|
29
22
|
export { I18nProvider, I18nProviderProps, useI18n };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DefaultSearchDialogProps } from "../components/dialog/search-default.js";
|
|
2
2
|
import { ComponentType, ReactNode } from "react";
|
|
3
|
-
|
|
3
|
+
import { Dialog } from "@base-ui/react/dialog";
|
|
4
4
|
//#region src/contexts/search.d.ts
|
|
5
5
|
interface HotKey {
|
|
6
6
|
display: ReactNode;
|
|
@@ -12,6 +12,7 @@ interface HotKey {
|
|
|
12
12
|
interface SharedProps {
|
|
13
13
|
open: boolean;
|
|
14
14
|
onOpenChange: (open: boolean) => void;
|
|
15
|
+
dialogHandle: Dialog.Handle<unknown>;
|
|
15
16
|
}
|
|
16
17
|
type SearchLink = [name: string, href: string];
|
|
17
18
|
interface TagItem {
|
|
@@ -23,6 +24,7 @@ interface SearchProviderProps<DialogProps extends SharedProps = DefaultSearchDia
|
|
|
23
24
|
* Preload search dialog before opening it
|
|
24
25
|
*
|
|
25
26
|
* @defaultValue `true`
|
|
27
|
+
* @deprecated Ignored, it must be preloaded for Base UI dialog to work
|
|
26
28
|
*/
|
|
27
29
|
preload?: boolean;
|
|
28
30
|
/**
|
|
@@ -52,22 +54,14 @@ interface SearchContextType {
|
|
|
52
54
|
open: boolean;
|
|
53
55
|
hotKey: HotKey[];
|
|
54
56
|
setOpenSearch: (value: boolean) => void;
|
|
57
|
+
dialogHandle: Dialog.Handle<unknown>;
|
|
55
58
|
}
|
|
56
59
|
declare function useSearchContext(): SearchContextType;
|
|
57
|
-
declare function SearchProvider<DialogProps extends SharedProps = DefaultSearchDialogProps>({
|
|
58
|
-
SearchDialog,
|
|
59
|
-
children,
|
|
60
|
-
preload,
|
|
61
|
-
options,
|
|
62
|
-
hotKey,
|
|
63
|
-
links
|
|
64
|
-
}: SearchProviderProps<DialogProps>): import("react").JSX.Element;
|
|
60
|
+
declare function SearchProvider<DialogProps extends SharedProps = DefaultSearchDialogProps>({ SearchDialog, children, options, hotKey, links }: SearchProviderProps<DialogProps>): import("react").JSX.Element;
|
|
65
61
|
/**
|
|
66
62
|
* Show children only when search is enabled via React Context
|
|
67
63
|
*/
|
|
68
|
-
declare function SearchOnly({
|
|
69
|
-
children
|
|
70
|
-
}: {
|
|
64
|
+
declare function SearchOnly({ children }: {
|
|
71
65
|
children: ReactNode;
|
|
72
66
|
}): ReactNode;
|
|
73
67
|
//#endregion
|
package/dist/contexts/search.js
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Suspense, createContext, lazy, use, useEffect, useEffectEvent, useMemo, useState } from "react";
|
|
4
|
+
import { Dialog } from "@base-ui/react/dialog";
|
|
4
5
|
//#region src/contexts/search.tsx
|
|
6
|
+
/** built-in Base UI Dialog handle */
|
|
7
|
+
const dialogHandle = Dialog.createHandle();
|
|
5
8
|
const SearchContext = createContext({
|
|
6
9
|
enabled: false,
|
|
7
10
|
open: false,
|
|
8
11
|
hotKey: [],
|
|
9
|
-
setOpenSearch: () => void 0
|
|
12
|
+
setOpenSearch: () => void 0,
|
|
13
|
+
dialogHandle
|
|
10
14
|
});
|
|
11
15
|
function useSearchContext() {
|
|
12
16
|
return use(SearchContext);
|
|
@@ -26,8 +30,8 @@ const DEFAULT_HOT_KEYS = [{
|
|
|
26
30
|
display: "K"
|
|
27
31
|
}];
|
|
28
32
|
const DefaultSearchDialog = lazy(() => import("../components/dialog/search-default.js"));
|
|
29
|
-
function SearchProvider({ SearchDialog = DefaultSearchDialog, children,
|
|
30
|
-
const [isOpen, setIsOpen] = useState(
|
|
33
|
+
function SearchProvider({ SearchDialog = DefaultSearchDialog, children, options, hotKey = DEFAULT_HOT_KEYS, links }) {
|
|
34
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
31
35
|
const onKeyDown = useEffectEvent((e) => {
|
|
32
36
|
if (hotKey.every((v) => typeof v.key === "string" ? e.key === v.key : v.key(e))) {
|
|
33
37
|
setIsOpen((open) => !open);
|
|
@@ -43,16 +47,18 @@ function SearchProvider({ SearchDialog = DefaultSearchDialog, children, preload
|
|
|
43
47
|
return /* @__PURE__ */ jsxs(SearchContext, {
|
|
44
48
|
value: useMemo(() => ({
|
|
45
49
|
enabled: true,
|
|
46
|
-
open: isOpen
|
|
50
|
+
open: isOpen,
|
|
47
51
|
hotKey,
|
|
52
|
+
dialogHandle,
|
|
48
53
|
setOpenSearch: setIsOpen
|
|
49
54
|
}), [isOpen, hotKey]),
|
|
50
55
|
children: [/* @__PURE__ */ jsx(Suspense, {
|
|
51
56
|
fallback: null,
|
|
52
|
-
children:
|
|
57
|
+
children: /* @__PURE__ */ jsx(SearchDialog, {
|
|
53
58
|
open: isOpen,
|
|
54
59
|
onOpenChange: setIsOpen,
|
|
55
60
|
links,
|
|
61
|
+
dialogHandle,
|
|
56
62
|
...options
|
|
57
63
|
})
|
|
58
64
|
}), children]
|
package/dist/contexts/tree.d.ts
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
import * as PageTree from "fumadocs-core/page-tree";
|
|
3
|
-
|
|
4
3
|
//#region src/contexts/tree.d.ts
|
|
5
4
|
type MakeRequired<O, K extends keyof O> = Omit<O, K> & Pick<Required<O>, K>;
|
|
6
5
|
interface TreeContextType {
|
|
7
6
|
root: MakeRequired<PageTree.Root | PageTree.Folder, '$id'>;
|
|
8
7
|
full: PageTree.Root;
|
|
9
8
|
}
|
|
10
|
-
declare function TreeContextProvider({
|
|
11
|
-
tree: rawTree,
|
|
12
|
-
children
|
|
13
|
-
}: {
|
|
9
|
+
declare function TreeContextProvider({ tree: rawTree, children }: {
|
|
14
10
|
tree: PageTree.Root;
|
|
15
11
|
children: ReactNode;
|
|
16
12
|
}): import("react").JSX.Element;
|