@fumadocs/base-ui 16.7.6 → 16.7.8
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 +26 -6
- package/css/generated/notebook.css +13 -1
- package/css/generated/shared.css +24 -8
- package/dist/components/accordion.d.ts +3 -3
- package/dist/components/banner.d.ts +2 -2
- package/dist/components/callout.d.ts +5 -5
- package/dist/components/card.d.ts +3 -3
- package/dist/components/codeblock.d.ts +7 -7
- package/dist/components/codeblock.rsc.d.ts +2 -2
- package/dist/components/dialog/search-algolia.d.ts +2 -2
- package/dist/components/dialog/search-default.d.ts +2 -2
- package/dist/components/dialog/search-orama.d.ts +2 -2
- package/dist/components/dialog/search.d.ts +13 -13
- package/dist/components/dynamic-codeblock.core.d.ts +2 -2
- package/dist/components/dynamic-codeblock.d.ts +2 -2
- package/dist/components/github-info.d.ts +2 -2
- package/dist/components/image-zoom.d.ts +2 -2
- package/dist/components/image-zoom.js +1 -2
- package/dist/components/{image-zoom.css → image-zoom2.css} +11 -17
- package/dist/components/inline-toc.d.ts +2 -2
- package/dist/components/sidebar/base.d.ts +15 -15
- package/dist/components/sidebar/link-item.d.ts +2 -2
- package/dist/components/sidebar/page-tree.d.ts +2 -2
- package/dist/components/sidebar/tabs/dropdown.d.ts +2 -2
- package/dist/components/steps.d.ts +3 -3
- package/dist/components/tabs.d.ts +6 -6
- package/dist/components/toc/clerk.d.ts +4 -4
- package/dist/components/toc/clerk.js +67 -39
- package/dist/components/toc/default.d.ts +4 -4
- package/dist/components/toc/index.d.ts +4 -6
- package/dist/components/toc/index.js +4 -10
- package/dist/components/type-table.d.ts +2 -2
- package/dist/components/ui/accordion.d.ts +6 -6
- package/dist/components/ui/button.d.ts +2 -2
- package/dist/components/ui/collapsible.d.ts +6 -6
- package/dist/components/ui/navigation-menu.d.ts +9 -9
- package/dist/components/ui/popover.d.ts +4 -4
- package/dist/components/ui/scroll-area.d.ts +4 -4
- package/dist/components/ui/tabs.d.ts +7 -7
- package/dist/contexts/i18n.d.ts +2 -2
- package/dist/contexts/search.d.ts +2 -2
- package/dist/contexts/tree.d.ts +2 -2
- package/dist/layouts/docs/client.d.ts +0 -1
- package/dist/layouts/docs/index.d.ts +2 -2
- package/dist/layouts/docs/page/index.d.ts +7 -7
- package/dist/layouts/docs/page/slots/breadcrumb.d.ts +2 -2
- package/dist/layouts/docs/page/slots/container.d.ts +2 -2
- package/dist/layouts/docs/page/slots/footer.d.ts +2 -2
- package/dist/layouts/docs/page/slots/toc.d.ts +4 -4
- package/dist/layouts/docs/slots/container.d.ts +2 -2
- package/dist/layouts/docs/slots/container.js +8 -1
- package/dist/layouts/docs/slots/header.d.ts +3 -3
- package/dist/layouts/docs/slots/sidebar.d.ts +4 -4
- package/dist/layouts/docs/slots/sidebar.js +25 -17
- package/dist/layouts/flux/index.d.ts +4 -4
- package/dist/layouts/flux/page/index.d.ts +7 -7
- package/dist/layouts/flux/page/slots/breadcrumb.d.ts +2 -2
- package/dist/layouts/flux/page/slots/container.d.ts +2 -2
- package/dist/layouts/flux/page/slots/footer.d.ts +2 -2
- package/dist/layouts/flux/page/slots/toc.d.ts +2 -2
- package/dist/layouts/flux/slots/container.d.ts +2 -2
- package/dist/layouts/flux/slots/sidebar.d.ts +4 -4
- package/dist/layouts/flux/slots/tab-dropdown.d.ts +2 -2
- package/dist/layouts/home/index.d.ts +2 -2
- package/dist/layouts/home/navbar.d.ts +4 -4
- package/dist/layouts/home/not-found.d.ts +2 -2
- package/dist/layouts/home/slots/container.d.ts +2 -2
- package/dist/layouts/home/slots/header.d.ts +4 -4
- package/dist/layouts/notebook/client.d.ts +0 -1
- package/dist/layouts/notebook/index.d.ts +2 -2
- package/dist/layouts/notebook/page/index.d.ts +7 -7
- package/dist/layouts/notebook/page/slots/breadcrumb.d.ts +2 -2
- package/dist/layouts/notebook/page/slots/container.d.ts +2 -2
- package/dist/layouts/notebook/page/slots/footer.d.ts +2 -2
- package/dist/layouts/notebook/page/slots/toc.d.ts +4 -4
- package/dist/layouts/notebook/slots/container.d.ts +2 -2
- package/dist/layouts/notebook/slots/container.js +8 -1
- package/dist/layouts/notebook/slots/header.d.ts +3 -3
- package/dist/layouts/notebook/slots/header.js +1 -1
- package/dist/layouts/notebook/slots/sidebar.d.ts +6 -6
- package/dist/layouts/notebook/slots/sidebar.js +14 -12
- package/dist/layouts/shared/client.d.ts +2 -2
- package/dist/layouts/shared/page-actions.d.ts +3 -3
- package/dist/layouts/shared/slots/language-select.d.ts +13 -4
- package/dist/layouts/shared/slots/language-select.js +7 -10
- package/dist/layouts/shared/slots/search-trigger.d.ts +3 -3
- package/dist/layouts/shared/slots/theme-switch.d.ts +2 -2
- package/dist/layouts/shared/slots/theme-switch.js +1 -1
- package/dist/mdx.d.ts +10 -10
- package/dist/og/takumi.d.ts +2 -2
- package/dist/og.d.ts +3 -3
- package/dist/page.d.ts +3 -3
- package/dist/provider/base.d.ts +2 -2
- package/dist/provider/next.d.ts +2 -2
- package/dist/provider/react-router.d.ts +2 -2
- package/dist/provider/tanstack.d.ts +2 -2
- package/dist/provider/waku.d.ts +2 -2
- package/dist/style.css +79 -14
- package/package.json +11 -11
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SharedProps } from "../../contexts/search.js";
|
|
2
2
|
import { ComponentProps, ReactNode } from "react";
|
|
3
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
4
|
import { Dialog } from "@base-ui/react/dialog";
|
|
5
5
|
import { HighlightedText, ReactSortedResult } from "fumadocs-core/search";
|
|
6
6
|
|
|
@@ -28,24 +28,24 @@ declare function SearchDialog({
|
|
|
28
28
|
isLoading,
|
|
29
29
|
onSelect: onSelectProp,
|
|
30
30
|
children
|
|
31
|
-
}: SearchDialogProps): react_jsx_runtime0.JSX.Element;
|
|
32
|
-
declare function SearchDialogHeader(props: ComponentProps<'div'>): react_jsx_runtime0.JSX.Element;
|
|
33
|
-
declare function SearchDialogInput(props: ComponentProps<'input'>): react_jsx_runtime0.JSX.Element;
|
|
31
|
+
}: SearchDialogProps): _$react_jsx_runtime0.JSX.Element;
|
|
32
|
+
declare function SearchDialogHeader(props: ComponentProps<'div'>): _$react_jsx_runtime0.JSX.Element;
|
|
33
|
+
declare function SearchDialogInput(props: ComponentProps<'input'>): _$react_jsx_runtime0.JSX.Element;
|
|
34
34
|
declare function SearchDialogClose({
|
|
35
35
|
children,
|
|
36
36
|
className,
|
|
37
37
|
...props
|
|
38
|
-
}: ComponentProps<'button'>): react_jsx_runtime0.JSX.Element;
|
|
39
|
-
declare function SearchDialogFooter(props: ComponentProps<'div'>): react_jsx_runtime0.JSX.Element;
|
|
38
|
+
}: ComponentProps<'button'>): _$react_jsx_runtime0.JSX.Element;
|
|
39
|
+
declare function SearchDialogFooter(props: ComponentProps<'div'>): _$react_jsx_runtime0.JSX.Element;
|
|
40
40
|
declare function SearchDialogOverlay({
|
|
41
41
|
className,
|
|
42
42
|
...props
|
|
43
|
-
}: ComponentProps<typeof Dialog.Backdrop>): react_jsx_runtime0.JSX.Element;
|
|
43
|
+
}: ComponentProps<typeof Dialog.Backdrop>): _$react_jsx_runtime0.JSX.Element;
|
|
44
44
|
declare function SearchDialogContent({
|
|
45
45
|
children,
|
|
46
46
|
className,
|
|
47
47
|
...props
|
|
48
|
-
}: ComponentProps<typeof Dialog.Popup>): react_jsx_runtime0.JSX.Element;
|
|
48
|
+
}: ComponentProps<typeof Dialog.Popup>): _$react_jsx_runtime0.JSX.Element;
|
|
49
49
|
declare function SearchDialogList({
|
|
50
50
|
items,
|
|
51
51
|
Empty,
|
|
@@ -64,7 +64,7 @@ declare function SearchDialogList({
|
|
|
64
64
|
item: SearchItemType;
|
|
65
65
|
onClick: () => void;
|
|
66
66
|
}) => ReactNode;
|
|
67
|
-
}): react_jsx_runtime0.JSX.Element;
|
|
67
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
68
68
|
declare function SearchDialogListItem({
|
|
69
69
|
item,
|
|
70
70
|
className,
|
|
@@ -76,8 +76,8 @@ declare function SearchDialogListItem({
|
|
|
76
76
|
renderMarkdown?: (v: string) => ReactNode; /** @deprecated highlight blocks is now wrapped in `<mark />`, use `renderMarkdown` to handle instead. */
|
|
77
77
|
renderHighlights?: (blocks: HighlightedText<ReactNode>[]) => ReactNode;
|
|
78
78
|
item: SearchItemType;
|
|
79
|
-
}): react_jsx_runtime0.JSX.Element;
|
|
80
|
-
declare function SearchDialogIcon(props: ComponentProps<'svg'>): react_jsx_runtime0.JSX.Element;
|
|
79
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
80
|
+
declare function SearchDialogIcon(props: ComponentProps<'svg'>): _$react_jsx_runtime0.JSX.Element;
|
|
81
81
|
interface TagsListProps extends ComponentProps<'div'> {
|
|
82
82
|
tag?: string;
|
|
83
83
|
onTagChange: (tag: string | undefined) => void;
|
|
@@ -88,14 +88,14 @@ declare function TagsList({
|
|
|
88
88
|
onTagChange,
|
|
89
89
|
allowClear,
|
|
90
90
|
...props
|
|
91
|
-
}: TagsListProps): react_jsx_runtime0.JSX.Element;
|
|
91
|
+
}: TagsListProps): _$react_jsx_runtime0.JSX.Element;
|
|
92
92
|
declare function TagsListItem({
|
|
93
93
|
value,
|
|
94
94
|
className,
|
|
95
95
|
...props
|
|
96
96
|
}: ComponentProps<'button'> & {
|
|
97
97
|
value: string;
|
|
98
|
-
}): react_jsx_runtime0.JSX.Element;
|
|
98
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
99
99
|
declare function useSearch(): {
|
|
100
100
|
open: boolean;
|
|
101
101
|
onOpenChange: (open: boolean) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CodeBlockProps } from "./codeblock.js";
|
|
2
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
import { UseShikiOptions } from "fumadocs-core/highlight/shiki/react";
|
|
4
4
|
import { HighlighterCore } from "shiki";
|
|
5
5
|
|
|
@@ -30,6 +30,6 @@ declare function DynamicCodeBlock({
|
|
|
30
30
|
options,
|
|
31
31
|
wrapInSuspense,
|
|
32
32
|
highlighter
|
|
33
|
-
}: DynamicCodeblockProps): react_jsx_runtime0.JSX.Element;
|
|
33
|
+
}: DynamicCodeblockProps): _$react_jsx_runtime0.JSX.Element;
|
|
34
34
|
//#endregion
|
|
35
35
|
export { DynamicCodeBlock, DynamicCodeblockProps };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { DynamicCodeblockProps as DynamicCodeblockProps$1 } from "./dynamic-codeblock.core.js";
|
|
2
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/dynamic-codeblock.d.ts
|
|
5
5
|
type DynamicCodeblockProps = Omit<DynamicCodeblockProps$1, 'highlighter' | 'options'> & {
|
|
6
6
|
options?: DynamicCodeblockProps$1['options'];
|
|
7
7
|
};
|
|
8
|
-
declare function DynamicCodeBlock(props: DynamicCodeblockProps): react_jsx_runtime0.JSX.Element;
|
|
8
|
+
declare function DynamicCodeBlock(props: DynamicCodeblockProps): _$react_jsx_runtime0.JSX.Element;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { DynamicCodeBlock, DynamicCodeblockProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentProps } from "react";
|
|
2
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/github-info.d.ts
|
|
5
5
|
interface FetchRepositoryInfoOptions {
|
|
@@ -27,6 +27,6 @@ declare function GithubInfo({
|
|
|
27
27
|
baseUrl,
|
|
28
28
|
fetchOptions,
|
|
29
29
|
...props
|
|
30
|
-
}: ComponentProps<'a'> & FetchRepositoryInfoOptions): react_jsx_runtime0.JSX.Element;
|
|
30
|
+
}: ComponentProps<'a'> & FetchRepositoryInfoOptions): _$react_jsx_runtime0.JSX.Element;
|
|
31
31
|
//#endregion
|
|
32
32
|
export { FetchRepositoryInfoOptions, GithubInfo, RepositoryInfo, fetchRepositoryInfo };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentProps } from "react";
|
|
2
2
|
import { ImageProps } from "fumadocs-core/framework";
|
|
3
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
4
|
import { UncontrolledProps } from "react-medium-image-zoom";
|
|
5
5
|
|
|
6
6
|
//#region src/components/image-zoom.d.ts
|
|
@@ -19,6 +19,6 @@ declare function ImageZoom({
|
|
|
19
19
|
children,
|
|
20
20
|
rmiz,
|
|
21
21
|
...props
|
|
22
|
-
}: ImageZoomProps): react_jsx_runtime0.JSX.Element;
|
|
22
|
+
}: ImageZoomProps): _$react_jsx_runtime0.JSX.Element;
|
|
23
23
|
//#endregion
|
|
24
24
|
export { ImageZoom, ImageZoomProps };
|
|
@@ -8,24 +8,19 @@
|
|
|
8
8
|
position: absolute;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
[data-rmiz-btn-zoom],
|
|
12
|
-
[data-rmiz-btn-unzoom] {
|
|
11
|
+
[data-rmiz-btn-zoom], [data-rmiz-btn-unzoom] {
|
|
13
12
|
display: none;
|
|
14
13
|
}
|
|
15
14
|
|
|
16
|
-
[data-rmiz-content=
|
|
15
|
+
[data-rmiz-content="found"] img {
|
|
17
16
|
cursor: zoom-in;
|
|
18
17
|
}
|
|
19
18
|
|
|
20
19
|
[data-rmiz-modal][open] {
|
|
21
|
-
|
|
20
|
+
background-color: #0000;
|
|
22
21
|
width: 100dvw;
|
|
23
|
-
|
|
24
|
-
height: 100vh /* fallback */;
|
|
25
|
-
height: 100dvh;
|
|
26
|
-
|
|
27
|
-
background-color: transparent;
|
|
28
22
|
max-width: none;
|
|
23
|
+
height: 100dvh;
|
|
29
24
|
max-height: none;
|
|
30
25
|
margin: 0;
|
|
31
26
|
padding: 0;
|
|
@@ -38,17 +33,17 @@
|
|
|
38
33
|
}
|
|
39
34
|
|
|
40
35
|
[data-rmiz-modal-overlay] {
|
|
41
|
-
transition: background-color
|
|
36
|
+
transition: background-color .3s;
|
|
42
37
|
position: absolute;
|
|
43
38
|
inset: 0;
|
|
44
39
|
}
|
|
45
40
|
|
|
46
|
-
[data-rmiz-modal-overlay=
|
|
41
|
+
[data-rmiz-modal-overlay="visible"] {
|
|
47
42
|
background-color: var(--color-fd-background);
|
|
48
43
|
}
|
|
49
44
|
|
|
50
|
-
[data-rmiz-modal-overlay=
|
|
51
|
-
background-color:
|
|
45
|
+
[data-rmiz-modal-overlay="hidden"] {
|
|
46
|
+
background-color: #0000;
|
|
52
47
|
}
|
|
53
48
|
|
|
54
49
|
[data-rmiz-modal-content] {
|
|
@@ -65,13 +60,12 @@
|
|
|
65
60
|
cursor: zoom-out;
|
|
66
61
|
image-rendering: high-quality;
|
|
67
62
|
transform-origin: 0 0;
|
|
68
|
-
transition: transform
|
|
63
|
+
transition: transform .3s;
|
|
69
64
|
position: absolute;
|
|
70
65
|
}
|
|
71
66
|
|
|
72
67
|
@media (prefers-reduced-motion: reduce) {
|
|
73
|
-
[data-rmiz-modal-overlay],
|
|
74
|
-
|
|
75
|
-
transition-duration: 0.01ms !important;
|
|
68
|
+
[data-rmiz-modal-overlay], [data-rmiz-modal-img] {
|
|
69
|
+
transition-duration: .01ms !important;
|
|
76
70
|
}
|
|
77
71
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Collapsible } from "./ui/collapsible.js";
|
|
2
2
|
import { ComponentProps } from "react";
|
|
3
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
4
|
import { TOCItemType } from "fumadocs-core/toc";
|
|
5
5
|
|
|
6
6
|
//#region src/components/inline-toc.d.ts
|
|
@@ -11,6 +11,6 @@ declare function InlineTOC({
|
|
|
11
11
|
items,
|
|
12
12
|
className,
|
|
13
13
|
...props
|
|
14
|
-
}: InlineTocProps): react_jsx_runtime0.JSX.Element;
|
|
14
|
+
}: InlineTocProps): _$react_jsx_runtime0.JSX.Element;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { InlineTOC, InlineTocProps };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CollapsibleContentProps, CollapsibleTriggerProps } from "../ui/collapsible.js";
|
|
2
2
|
import { ScrollAreaProps } from "../ui/scroll-area.js";
|
|
3
|
-
import * as react from "react";
|
|
3
|
+
import * as _$react from "react";
|
|
4
4
|
import { ComponentProps, PointerEvent, ReactNode, RefObject } from "react";
|
|
5
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
6
|
import { LinkProps } from "fumadocs-core/link";
|
|
7
7
|
|
|
8
8
|
//#region src/components/sidebar/base.d.ts
|
|
@@ -37,12 +37,12 @@ interface SidebarProviderProps {
|
|
|
37
37
|
children?: ReactNode;
|
|
38
38
|
}
|
|
39
39
|
type Mode = 'drawer' | 'full';
|
|
40
|
-
declare const SidebarContext: react.Context<SidebarContext | null>;
|
|
40
|
+
declare const SidebarContext: _$react.Context<SidebarContext | null>;
|
|
41
41
|
declare function SidebarProvider({
|
|
42
42
|
defaultOpenLevel,
|
|
43
43
|
prefetch,
|
|
44
44
|
children
|
|
45
|
-
}: SidebarProviderProps): react_jsx_runtime0.JSX.Element;
|
|
45
|
+
}: SidebarProviderProps): _$react_jsx_runtime0.JSX.Element;
|
|
46
46
|
declare function useSidebar(): SidebarContext;
|
|
47
47
|
declare function useFolder(): {
|
|
48
48
|
open: boolean;
|
|
@@ -62,17 +62,17 @@ declare function SidebarContent({
|
|
|
62
62
|
onPointerLeave: (event: PointerEvent) => void;
|
|
63
63
|
}) => ReactNode;
|
|
64
64
|
}): ReactNode;
|
|
65
|
-
declare function SidebarDrawerOverlay(props: ComponentProps<'div'>): react_jsx_runtime0.JSX.Element | undefined;
|
|
65
|
+
declare function SidebarDrawerOverlay(props: ComponentProps<'div'>): _$react_jsx_runtime0.JSX.Element | undefined;
|
|
66
66
|
declare function SidebarDrawerContent({
|
|
67
67
|
className,
|
|
68
68
|
children,
|
|
69
69
|
...props
|
|
70
|
-
}: ComponentProps<'aside'>): react_jsx_runtime0.JSX.Element | undefined;
|
|
70
|
+
}: ComponentProps<'aside'>): _$react_jsx_runtime0.JSX.Element | undefined;
|
|
71
71
|
declare function SidebarViewport({
|
|
72
72
|
className,
|
|
73
73
|
...props
|
|
74
|
-
}: ScrollAreaProps): react_jsx_runtime0.JSX.Element;
|
|
75
|
-
declare function SidebarSeparator(props: ComponentProps<'p'>): react_jsx_runtime0.JSX.Element;
|
|
74
|
+
}: ScrollAreaProps): _$react_jsx_runtime0.JSX.Element;
|
|
75
|
+
declare function SidebarSeparator(props: ComponentProps<'p'>): _$react_jsx_runtime0.JSX.Element;
|
|
76
76
|
declare function SidebarItem({
|
|
77
77
|
icon,
|
|
78
78
|
active,
|
|
@@ -81,7 +81,7 @@ declare function SidebarItem({
|
|
|
81
81
|
}: LinkProps & {
|
|
82
82
|
active?: boolean;
|
|
83
83
|
icon?: ReactNode;
|
|
84
|
-
}): react_jsx_runtime0.JSX.Element;
|
|
84
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
85
85
|
declare function SidebarFolder({
|
|
86
86
|
defaultOpen: defaultOpenProp,
|
|
87
87
|
collapsible,
|
|
@@ -92,24 +92,24 @@ declare function SidebarFolder({
|
|
|
92
92
|
active?: boolean;
|
|
93
93
|
defaultOpen?: boolean;
|
|
94
94
|
collapsible?: boolean;
|
|
95
|
-
}): react_jsx_runtime0.JSX.Element;
|
|
95
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
96
96
|
declare function SidebarFolderTrigger({
|
|
97
97
|
children,
|
|
98
98
|
...props
|
|
99
|
-
}: CollapsibleTriggerProps): react_jsx_runtime0.JSX.Element;
|
|
99
|
+
}: CollapsibleTriggerProps): _$react_jsx_runtime0.JSX.Element;
|
|
100
100
|
declare function SidebarFolderLink({
|
|
101
101
|
children,
|
|
102
102
|
active,
|
|
103
103
|
...props
|
|
104
104
|
}: LinkProps & {
|
|
105
105
|
active?: boolean;
|
|
106
|
-
}): react_jsx_runtime0.JSX.Element;
|
|
107
|
-
declare function SidebarFolderContent(props: CollapsibleContentProps): react_jsx_runtime0.JSX.Element;
|
|
106
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
107
|
+
declare function SidebarFolderContent(props: CollapsibleContentProps): _$react_jsx_runtime0.JSX.Element;
|
|
108
108
|
declare function SidebarTrigger({
|
|
109
109
|
children,
|
|
110
110
|
...props
|
|
111
|
-
}: ComponentProps<'button'>): react_jsx_runtime0.JSX.Element;
|
|
112
|
-
declare function SidebarCollapseTrigger(props: ComponentProps<'button'>): react_jsx_runtime0.JSX.Element;
|
|
111
|
+
}: ComponentProps<'button'>): _$react_jsx_runtime0.JSX.Element;
|
|
112
|
+
declare function SidebarCollapseTrigger(props: ComponentProps<'button'>): _$react_jsx_runtime0.JSX.Element;
|
|
113
113
|
/**
|
|
114
114
|
* scroll to the element if `active` is true
|
|
115
115
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
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
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/components/sidebar/link-item.d.ts
|
|
7
7
|
type InternalComponents = Pick<typeof base_d_exports, 'SidebarFolder' | 'SidebarFolderLink' | 'SidebarFolderContent' | 'SidebarFolderTrigger' | 'SidebarItem'>;
|
|
@@ -18,6 +18,6 @@ declare function createLinkItemRenderer({
|
|
|
18
18
|
item: Exclude<LinkItemType, {
|
|
19
19
|
type: "icon";
|
|
20
20
|
}>;
|
|
21
|
-
}) => react_jsx_runtime0.JSX.Element;
|
|
21
|
+
}) => _$react_jsx_runtime0.JSX.Element;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { createLinkItemRenderer };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { base_d_exports } from "./base.js";
|
|
2
2
|
import { FC, ReactNode } from "react";
|
|
3
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
4
|
import * as PageTree from "fumadocs-core/page-tree";
|
|
5
5
|
|
|
6
6
|
//#region src/components/sidebar/page-tree.d.ts
|
|
@@ -24,6 +24,6 @@ declare function createPageTreeRenderer({
|
|
|
24
24
|
SidebarFolderTrigger,
|
|
25
25
|
SidebarSeparator,
|
|
26
26
|
SidebarItem
|
|
27
|
-
}: InternalComponents): (components: Partial<SidebarPageTreeComponents>) => react_jsx_runtime0.JSX.Element;
|
|
27
|
+
}: InternalComponents): (components: Partial<SidebarPageTreeComponents>) => _$react_jsx_runtime0.JSX.Element;
|
|
28
28
|
//#endregion
|
|
29
29
|
export { SidebarPageTreeComponents, createPageTreeRenderer };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LayoutTab, isLayoutTabActive } from "../../../layouts/shared/index.js";
|
|
2
2
|
import { ComponentProps, ReactNode } from "react";
|
|
3
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/components/sidebar/tabs/dropdown.d.ts
|
|
6
6
|
type SidebarTabWithProps = LayoutTab;
|
|
@@ -11,7 +11,7 @@ declare function SidebarTabsDropdown({
|
|
|
11
11
|
}: {
|
|
12
12
|
placeholder?: ReactNode;
|
|
13
13
|
options: SidebarTabWithProps[];
|
|
14
|
-
} & ComponentProps<'button'>): react_jsx_runtime0.JSX.Element;
|
|
14
|
+
} & ComponentProps<'button'>): _$react_jsx_runtime0.JSX.Element;
|
|
15
15
|
declare const isTabActive: typeof isLayoutTabActive;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { SidebarTabWithProps, SidebarTabsDropdown, isTabActive };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/steps.d.ts
|
|
5
5
|
declare function Steps({
|
|
6
6
|
children
|
|
7
7
|
}: {
|
|
8
8
|
children: ReactNode;
|
|
9
|
-
}): react_jsx_runtime0.JSX.Element;
|
|
9
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
10
10
|
declare function Step({
|
|
11
11
|
children
|
|
12
12
|
}: {
|
|
13
13
|
children: ReactNode;
|
|
14
|
-
}): react_jsx_runtime0.JSX.Element;
|
|
14
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { Step, Steps };
|
|
@@ -1,7 +1,7 @@
|
|
|
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
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/components/tabs.d.ts
|
|
7
7
|
interface TabsProps extends Omit<ComponentProps<typeof Tabs$1>, 'value' | 'onValueChange'> {
|
|
@@ -23,11 +23,11 @@ interface TabsProps extends Omit<ComponentProps<typeof Tabs$1>, 'value' | 'onVal
|
|
|
23
23
|
declare function TabsList({
|
|
24
24
|
className,
|
|
25
25
|
...props
|
|
26
|
-
}: React$1.ComponentPropsWithRef<typeof TabsList$1>): react_jsx_runtime0.JSX.Element;
|
|
26
|
+
}: React$1.ComponentPropsWithRef<typeof TabsList$1>): _$react_jsx_runtime0.JSX.Element;
|
|
27
27
|
declare function TabsTrigger({
|
|
28
28
|
className,
|
|
29
29
|
...props
|
|
30
|
-
}: React$1.ComponentPropsWithRef<typeof TabsTrigger$1>): react_jsx_runtime0.JSX.Element;
|
|
30
|
+
}: React$1.ComponentPropsWithRef<typeof TabsTrigger$1>): _$react_jsx_runtime0.JSX.Element;
|
|
31
31
|
declare function Tabs({
|
|
32
32
|
ref,
|
|
33
33
|
className,
|
|
@@ -36,7 +36,7 @@ declare function Tabs({
|
|
|
36
36
|
defaultIndex,
|
|
37
37
|
defaultValue,
|
|
38
38
|
...props
|
|
39
|
-
}: TabsProps): react_jsx_runtime0.JSX.Element;
|
|
39
|
+
}: TabsProps): _$react_jsx_runtime0.JSX.Element;
|
|
40
40
|
interface TabProps extends Omit<ComponentProps<typeof TabsContent$1>, 'value'> {
|
|
41
41
|
/**
|
|
42
42
|
* Value of tab, detect from index if unspecified.
|
|
@@ -46,11 +46,11 @@ interface TabProps extends Omit<ComponentProps<typeof TabsContent$1>, 'value'> {
|
|
|
46
46
|
declare function Tab({
|
|
47
47
|
value,
|
|
48
48
|
...props
|
|
49
|
-
}: TabProps): react_jsx_runtime0.JSX.Element;
|
|
49
|
+
}: TabProps): _$react_jsx_runtime0.JSX.Element;
|
|
50
50
|
declare function TabsContent({
|
|
51
51
|
value,
|
|
52
52
|
className,
|
|
53
53
|
...props
|
|
54
|
-
}: ComponentProps<typeof TabsContent$1>): react_jsx_runtime0.JSX.Element;
|
|
54
|
+
}: ComponentProps<typeof TabsContent$1>): _$react_jsx_runtime0.JSX.Element;
|
|
55
55
|
//#endregion
|
|
56
56
|
export { Tab, TabProps, Tabs, TabsContent, TabsList, TabsProps, TabsTrigger };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentProps } from "react";
|
|
2
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
import * as Primitive from "fumadocs-core/toc";
|
|
4
4
|
|
|
5
5
|
//#region src/components/toc/clerk.d.ts
|
|
@@ -7,13 +7,13 @@ declare function TOCItems({
|
|
|
7
7
|
ref,
|
|
8
8
|
className,
|
|
9
9
|
...props
|
|
10
|
-
}: ComponentProps<'div'>): react_jsx_runtime0.JSX.Element;
|
|
11
|
-
declare function TOCEmpty(): react_jsx_runtime0.JSX.Element;
|
|
10
|
+
}: ComponentProps<'div'>): _$react_jsx_runtime0.JSX.Element;
|
|
11
|
+
declare function TOCEmpty(): _$react_jsx_runtime0.JSX.Element;
|
|
12
12
|
declare function TOCItem({
|
|
13
13
|
item,
|
|
14
14
|
...props
|
|
15
15
|
}: Primitive.TOCItemProps & {
|
|
16
16
|
item: Primitive.TOCItemType;
|
|
17
|
-
}): react_jsx_runtime0.JSX.Element;
|
|
17
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { TOCEmpty, TOCItem, TOCItems };
|
|
@@ -22,25 +22,46 @@ function TOCItems({ ref, className, ...props }) {
|
|
|
22
22
|
if (!container || container.clientHeight === 0) return;
|
|
23
23
|
let w = 0;
|
|
24
24
|
let h = 0;
|
|
25
|
-
let
|
|
25
|
+
let upperBottom = 0;
|
|
26
|
+
let upperX = 0;
|
|
26
27
|
let d = "";
|
|
28
|
+
const output = [];
|
|
27
29
|
for (let i = 0; i < items.length; i++) {
|
|
28
|
-
const
|
|
30
|
+
const item = items[i];
|
|
31
|
+
const element = container.querySelector(`a[href="#${item.url.slice(1)}"]`);
|
|
29
32
|
if (!element) continue;
|
|
30
33
|
const styles = getComputedStyle(element);
|
|
31
|
-
const
|
|
32
|
-
w = Math.max(
|
|
34
|
+
const x = getLineOffset(item.depth) + .5, top = element.offsetTop + parseFloat(styles.paddingTop), bottom = element.offsetTop + element.clientHeight - parseFloat(styles.paddingBottom);
|
|
35
|
+
w = Math.max(x + 8, w);
|
|
33
36
|
h = Math.max(h, bottom);
|
|
34
|
-
if (i === 0) d += ` M${
|
|
35
|
-
else {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
if (i === 0) d += ` M${x} ${top} L${x} ${bottom}`;
|
|
38
|
+
else d += ` C ${upperX} ${top - 4} ${x} ${upperBottom + 4} ${x} ${top} L${x} ${bottom}`;
|
|
39
|
+
if (item._step !== void 0) output.push(/* @__PURE__ */ jsx("circle", {
|
|
40
|
+
cx: x,
|
|
41
|
+
cy: (top + bottom) / 2,
|
|
42
|
+
r: "8",
|
|
43
|
+
className: "fill-fd-primary"
|
|
44
|
+
}, `${i}-circle`), /* @__PURE__ */ jsx("text", {
|
|
45
|
+
x,
|
|
46
|
+
y: (top + bottom) / 2,
|
|
47
|
+
textAnchor: "middle",
|
|
48
|
+
alignmentBaseline: "central",
|
|
49
|
+
dominantBaseline: "middle",
|
|
50
|
+
className: "fill-fd-primary-foreground font-medium text-xs leading-none font-mono",
|
|
51
|
+
children: item._step
|
|
52
|
+
}, `${i}-text`));
|
|
53
|
+
upperX = x;
|
|
54
|
+
upperBottom = bottom;
|
|
40
55
|
}
|
|
41
|
-
|
|
56
|
+
output.unshift(/* @__PURE__ */ jsx("path", {
|
|
42
57
|
d,
|
|
43
|
-
|
|
58
|
+
className: "stroke-fd-primary",
|
|
59
|
+
strokeWidth: "1",
|
|
60
|
+
fill: "none"
|
|
61
|
+
}, "path"));
|
|
62
|
+
setSvg({
|
|
63
|
+
content: output,
|
|
64
|
+
width: w,
|
|
44
65
|
height: h
|
|
45
66
|
});
|
|
46
67
|
});
|
|
@@ -69,12 +90,7 @@ function TOCItems({ ref, className, ...props }) {
|
|
|
69
90
|
height: svg.height,
|
|
70
91
|
clipPath: `polygon(0 var(--fd-top), 100% var(--fd-top), 100% calc(var(--fd-top) + var(--fd-height)), 0 calc(var(--fd-top) + var(--fd-height)))`
|
|
71
92
|
},
|
|
72
|
-
children:
|
|
73
|
-
d: svg.d,
|
|
74
|
-
className: "stroke-fd-primary",
|
|
75
|
-
strokeWidth: "1",
|
|
76
|
-
fill: "none"
|
|
77
|
-
})
|
|
93
|
+
children: svg.content
|
|
78
94
|
}), /* @__PURE__ */ jsx(ThumbBox, {})]
|
|
79
95
|
}), /* @__PURE__ */ jsx("div", {
|
|
80
96
|
ref: mergeRefs(containerRef, ref),
|
|
@@ -91,32 +107,39 @@ function TOCEmpty() {
|
|
|
91
107
|
}
|
|
92
108
|
function ThumbBox() {
|
|
93
109
|
const items = Primitive.useItems();
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
for (let i = 0; i < items.length; i++) {
|
|
98
|
-
const item = items[i];
|
|
99
|
-
if (item.active) {
|
|
100
|
-
if (startIdx === -1) startIdx = i;
|
|
101
|
-
endIdx = i;
|
|
102
|
-
} else if (lastInactiveIdx === -1 || items[lastInactiveIdx].t < item.t) lastInactiveIdx = i;
|
|
103
|
-
}
|
|
110
|
+
const previousRef = useRef(null);
|
|
111
|
+
const startIdx = items.findIndex((item) => item.active);
|
|
112
|
+
const endIdx = items.findLastIndex((item) => item.active);
|
|
104
113
|
if (startIdx === -1) return;
|
|
105
|
-
|
|
114
|
+
let isUp = false;
|
|
115
|
+
if (previousRef.current) {
|
|
116
|
+
const prev = previousRef.current;
|
|
117
|
+
isUp = prev.startIdx > startIdx || prev.endIdx > endIdx || prev.startIdx === startIdx && prev.endIdx === endIdx && prev.isUp;
|
|
118
|
+
}
|
|
119
|
+
previousRef.current = {
|
|
120
|
+
startIdx,
|
|
121
|
+
endIdx,
|
|
122
|
+
isUp
|
|
123
|
+
};
|
|
124
|
+
const original = items[isUp ? startIdx : endIdx].original;
|
|
106
125
|
return /* @__PURE__ */ jsx("div", {
|
|
107
126
|
className: "absolute size-1 bg-fd-primary rounded-full transition-transform",
|
|
108
|
-
style: {
|
|
127
|
+
style: {
|
|
128
|
+
translate: `${getLineOffset(original.depth) - 1.5}px calc(${isUp ? "var(--fd-top)" : "var(--fd-top) + var(--fd-height)"} - 1.5px)`,
|
|
129
|
+
scale: original._step !== void 0 ? "0" : "1"
|
|
130
|
+
}
|
|
109
131
|
});
|
|
110
132
|
}
|
|
133
|
+
const a = 8;
|
|
111
134
|
function getItemOffset(depth) {
|
|
112
|
-
if (depth <= 2) return
|
|
113
|
-
if (depth === 3) return
|
|
114
|
-
return 36;
|
|
135
|
+
if (depth <= 2) return 12 + a;
|
|
136
|
+
if (depth === 3) return 24 + a;
|
|
137
|
+
return 36 + a;
|
|
115
138
|
}
|
|
116
139
|
function getLineOffset(depth) {
|
|
117
|
-
if (depth <= 2) return
|
|
118
|
-
if (depth === 3) return
|
|
119
|
-
return
|
|
140
|
+
if (depth <= 2) return a;
|
|
141
|
+
if (depth === 3) return 8 + a;
|
|
142
|
+
return 16 + a;
|
|
120
143
|
}
|
|
121
144
|
function TOCItem({ item, ...props }) {
|
|
122
145
|
const items = useTOCItems();
|
|
@@ -132,7 +155,7 @@ function TOCItem({ item, ...props }) {
|
|
|
132
155
|
return /* @__PURE__ */ jsxs(Primitive.TOCItem, {
|
|
133
156
|
href: item.url,
|
|
134
157
|
...props,
|
|
135
|
-
className: cn("prose relative py-1.5 text-sm scroll-m-4 text-fd-muted-foreground hover:text-fd-accent-foreground transition-colors wrap-anywhere first:pt-0 last:pb-0 data-[active=true]:text-fd-primary", props.className),
|
|
158
|
+
className: cn("group prose relative py-1.5 text-sm scroll-m-4 text-fd-muted-foreground hover:text-fd-accent-foreground transition-colors wrap-anywhere first:pt-0 last:pb-0 data-[active=true]:text-fd-primary", props.className),
|
|
136
159
|
style: {
|
|
137
160
|
paddingInlineStart: getItemOffset(item.depth),
|
|
138
161
|
...props.style
|
|
@@ -141,7 +164,7 @@ function TOCItem({ item, ...props }) {
|
|
|
141
164
|
offset !== upperOffset && /* @__PURE__ */ jsx("svg", {
|
|
142
165
|
xmlns: "http://www.w3.org/2000/svg",
|
|
143
166
|
viewBox: `${Math.min(offset, upperOffset)} 0 ${Math.abs(upperOffset - offset)} 12`,
|
|
144
|
-
className: "absolute -top-1.5",
|
|
167
|
+
className: "absolute -top-1.5 -z-1",
|
|
145
168
|
style: {
|
|
146
169
|
width: Math.abs(upperOffset - offset) + 1,
|
|
147
170
|
height: 12,
|
|
@@ -156,9 +179,14 @@ function TOCItem({ item, ...props }) {
|
|
|
156
179
|
})
|
|
157
180
|
}),
|
|
158
181
|
/* @__PURE__ */ jsx("div", {
|
|
159
|
-
className: cn("absolute inset-y-0 w-px bg-fd-foreground/10", offset !== upperOffset && "top-1.5", offset !== lowerOffset && "bottom-1.5"),
|
|
182
|
+
className: cn("absolute inset-y-0 w-px bg-fd-foreground/10 -z-1", offset !== upperOffset && "top-1.5", offset !== lowerOffset && "bottom-1.5"),
|
|
160
183
|
style: { insetInlineStart: offset }
|
|
161
184
|
}),
|
|
185
|
+
item._step !== void 0 && /* @__PURE__ */ jsx("div", {
|
|
186
|
+
className: "absolute flex items-center justify-center -translate-1/2 -z-1 top-[calc(50%-var(--t,0px)+var(--b,0px))] size-4 font-mono font-medium text-xs bg-fd-muted text-fd-muted-foreground rounded-full leading-none group-first:[--t:--spacing(0.75)] group-last:[--b:--spacing(0.75)]",
|
|
187
|
+
style: { insetInlineStart: offset },
|
|
188
|
+
children: item._step
|
|
189
|
+
}),
|
|
162
190
|
item.title
|
|
163
191
|
]
|
|
164
192
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentProps } from "react";
|
|
2
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
import * as Primitive from "fumadocs-core/toc";
|
|
4
4
|
|
|
5
5
|
//#region src/components/toc/default.d.ts
|
|
@@ -7,13 +7,13 @@ declare function TOCItems({
|
|
|
7
7
|
ref,
|
|
8
8
|
className,
|
|
9
9
|
...props
|
|
10
|
-
}: ComponentProps<'div'>): react_jsx_runtime0.JSX.Element;
|
|
11
|
-
declare function TOCEmpty(): react_jsx_runtime0.JSX.Element;
|
|
10
|
+
}: ComponentProps<'div'>): _$react_jsx_runtime0.JSX.Element;
|
|
11
|
+
declare function TOCEmpty(): _$react_jsx_runtime0.JSX.Element;
|
|
12
12
|
declare function TOCItem({
|
|
13
13
|
item,
|
|
14
14
|
...props
|
|
15
15
|
}: Primitive.TOCItemProps & {
|
|
16
16
|
item: Primitive.TOCItemType;
|
|
17
|
-
}): react_jsx_runtime0.JSX.Element;
|
|
17
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { TOCEmpty, TOCItem, TOCItems };
|