fumadocs-ui 10.0.5 → 10.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-CYNHK27D.js → chunk-AVHD2JXX.js} +3 -1
- package/dist/{chunk-ZDIJ7KSY.js → chunk-RPQDC26K.js} +2 -3
- package/dist/chunk-SHMZYIS4.js +219 -0
- package/dist/components/accordion.js +10 -8
- package/dist/components/api.d.mts +5 -5
- package/dist/components/api.js +1 -4
- package/dist/components/card.d.mts +2 -2
- package/dist/components/codeblock.js +1 -1
- package/dist/components/dialog/search-algolia.d.mts +3 -5
- package/dist/components/dialog/search-algolia.js +3 -11
- package/dist/components/dialog/search-default.d.mts +3 -5
- package/dist/components/dialog/search-default.js +5 -9
- package/dist/components/dialog/search.d.mts +5 -9
- package/dist/components/dialog/search.js +3 -5
- package/dist/components/files.d.mts +3 -3
- package/dist/components/heading.d.mts +1 -1
- package/dist/components/image-zoom.d.mts +1 -1
- package/dist/components/inline-toc.d.mts +1 -1
- package/dist/components/inline-toc.js +4 -1
- package/dist/components/roll-button.d.mts +1 -1
- package/dist/components/roll-button.js +3 -1
- package/dist/components/steps.d.mts +4 -4
- package/dist/components/steps.js +6 -2
- package/dist/components/tabs.d.mts +7 -7
- package/dist/components/type-table.d.mts +5 -7
- package/dist/components/type-table.js +5 -3
- package/dist/i18n.d.mts +2 -2
- package/dist/i18n.js +4 -2
- package/dist/{layout-W7dJ6OHQ.d.mts → layout-joG0n3LI.d.mts} +4 -4
- package/dist/layout.client.d.mts +2 -2
- package/dist/layout.client.js +35 -21
- package/dist/layout.d.mts +1 -1
- package/dist/layout.js +1 -2
- package/dist/mdx.client.d.mts +1 -1
- package/dist/mdx.client.js +1 -1
- package/dist/mdx.d.mts +9 -8
- package/dist/page.client.d.mts +5 -5
- package/dist/page.client.js +15 -13
- package/dist/page.d.mts +3 -3
- package/dist/provider.d.mts +11 -7
- package/dist/provider.js +17 -11
- package/dist/style.css +1 -1
- package/dist/tailwind-plugin.js +0 -3
- package/dist/{tree-ersey5_u.d.mts → tree-cqNEopxM.d.mts} +1 -1
- package/package.json +10 -9
- package/dist/chunk-CUAH5G3U.js +0 -246
|
@@ -23,9 +23,11 @@ var PopoverContent = React.forwardRef(({ className, align = "center", sideOffset
|
|
|
23
23
|
}
|
|
24
24
|
) }));
|
|
25
25
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
26
|
+
var PopoverClose2 = PopoverPrimitive.PopoverClose;
|
|
26
27
|
|
|
27
28
|
export {
|
|
28
29
|
Popover,
|
|
29
30
|
PopoverTrigger,
|
|
30
|
-
PopoverContent
|
|
31
|
+
PopoverContent,
|
|
32
|
+
PopoverClose2 as PopoverClose
|
|
31
33
|
};
|
|
@@ -34,8 +34,7 @@ var CodeBlock = forwardRef(
|
|
|
34
34
|
clone.querySelectorAll(".nd-copy-ignore").forEach((node) => {
|
|
35
35
|
node.remove();
|
|
36
36
|
});
|
|
37
|
-
|
|
38
|
-
void navigator.clipboard.writeText(text);
|
|
37
|
+
void navigator.clipboard.writeText(clone.textContent ?? "");
|
|
39
38
|
}, []);
|
|
40
39
|
return /* @__PURE__ */ jsxs(
|
|
41
40
|
"figure",
|
|
@@ -58,7 +57,7 @@ var CodeBlock = forwardRef(
|
|
|
58
57
|
onCopy
|
|
59
58
|
}
|
|
60
59
|
),
|
|
61
|
-
/* @__PURE__ */ jsxs(ScrollArea, { ref: areaRef, children: [
|
|
60
|
+
/* @__PURE__ */ jsxs(ScrollArea, { ref: areaRef, dir: "ltr", children: [
|
|
62
61
|
/* @__PURE__ */ jsx(ScrollViewport, { children: props.children }),
|
|
63
62
|
/* @__PURE__ */ jsx(ScrollBar, { orientation: "horizontal" })
|
|
64
63
|
] })
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useSearchContext
|
|
3
|
+
} from "./chunk-T7VFHVWK.js";
|
|
4
|
+
import {
|
|
5
|
+
useI18n
|
|
6
|
+
} from "./chunk-YAHHY62W.js";
|
|
7
|
+
import {
|
|
8
|
+
buttonVariants
|
|
9
|
+
} from "./chunk-7GZKFBAP.js";
|
|
10
|
+
import {
|
|
11
|
+
twMerge
|
|
12
|
+
} from "./chunk-TK3TM3MR.js";
|
|
13
|
+
|
|
14
|
+
// src/components/dialog/search.tsx
|
|
15
|
+
import { FileTextIcon, HashIcon, TextIcon } from "lucide-react";
|
|
16
|
+
import { useRouter } from "next/navigation";
|
|
17
|
+
import { useMemo } from "react";
|
|
18
|
+
|
|
19
|
+
// src/components/ui/command.tsx
|
|
20
|
+
import { Command as CommandPrimitive } from "cmdk";
|
|
21
|
+
import { Search } from "lucide-react";
|
|
22
|
+
import * as React from "react";
|
|
23
|
+
import { DialogClose } from "@radix-ui/react-dialog";
|
|
24
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
25
|
+
var Command = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
26
|
+
CommandPrimitive,
|
|
27
|
+
{
|
|
28
|
+
ref,
|
|
29
|
+
className: twMerge("flex max-h-[80vh] flex-col", className),
|
|
30
|
+
shouldFilter: false,
|
|
31
|
+
loop: true,
|
|
32
|
+
...props
|
|
33
|
+
}
|
|
34
|
+
));
|
|
35
|
+
Command.displayName = CommandPrimitive.displayName;
|
|
36
|
+
var CommandInput = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-3", children: [
|
|
37
|
+
/* @__PURE__ */ jsx(Search, { className: "size-4 shrink-0 text-muted-foreground" }),
|
|
38
|
+
/* @__PURE__ */ jsx(
|
|
39
|
+
CommandPrimitive.Input,
|
|
40
|
+
{
|
|
41
|
+
ref,
|
|
42
|
+
className: twMerge(
|
|
43
|
+
"w-full bg-transparent py-3 text-base placeholder:text-muted-foreground focus-visible:outline-none",
|
|
44
|
+
className
|
|
45
|
+
),
|
|
46
|
+
...props
|
|
47
|
+
}
|
|
48
|
+
),
|
|
49
|
+
/* @__PURE__ */ jsx(
|
|
50
|
+
CommandDialogClose,
|
|
51
|
+
{
|
|
52
|
+
className: twMerge(
|
|
53
|
+
buttonVariants({
|
|
54
|
+
color: "outline",
|
|
55
|
+
className: "text-xs p-1.5"
|
|
56
|
+
})
|
|
57
|
+
),
|
|
58
|
+
children: "Esc"
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
] }));
|
|
62
|
+
CommandInput.displayName = CommandPrimitive.Input.displayName;
|
|
63
|
+
var CommandList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
64
|
+
CommandPrimitive.List,
|
|
65
|
+
{
|
|
66
|
+
ref,
|
|
67
|
+
className: twMerge("max-h-[460px] overflow-y-auto border-t p-2", className),
|
|
68
|
+
...props
|
|
69
|
+
}
|
|
70
|
+
));
|
|
71
|
+
CommandList.displayName = CommandPrimitive.List.displayName;
|
|
72
|
+
var CommandEmpty = React.forwardRef((props, ref) => /* @__PURE__ */ jsx(
|
|
73
|
+
CommandPrimitive.Empty,
|
|
74
|
+
{
|
|
75
|
+
ref,
|
|
76
|
+
className: "py-12 text-center text-sm",
|
|
77
|
+
...props
|
|
78
|
+
}
|
|
79
|
+
));
|
|
80
|
+
CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
|
|
81
|
+
var CommandGroup = React.forwardRef(({ className, heading, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
82
|
+
CommandPrimitive.Group,
|
|
83
|
+
{
|
|
84
|
+
ref,
|
|
85
|
+
heading: heading ? /* @__PURE__ */ jsx("div", { className: "px-3 py-2 text-xs font-medium", children: heading }) : void 0,
|
|
86
|
+
className: twMerge("overflow-hidden", className),
|
|
87
|
+
...props
|
|
88
|
+
}
|
|
89
|
+
));
|
|
90
|
+
CommandGroup.displayName = CommandPrimitive.Group.displayName;
|
|
91
|
+
var CommandSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
92
|
+
CommandPrimitive.Separator,
|
|
93
|
+
{
|
|
94
|
+
ref,
|
|
95
|
+
className: twMerge("h-px bg-border", className),
|
|
96
|
+
...props
|
|
97
|
+
}
|
|
98
|
+
));
|
|
99
|
+
CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
|
|
100
|
+
var CommandItem = React.forwardRef(({ className, icon, nested = false, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
101
|
+
CommandPrimitive.Item,
|
|
102
|
+
{
|
|
103
|
+
ref,
|
|
104
|
+
className: twMerge(
|
|
105
|
+
"select-none rounded-lg px-2 text-sm aria-disabled:pointer-events-none aria-disabled:opacity-50 aria-selected:bg-accent aria-selected:text-accent-foreground",
|
|
106
|
+
className
|
|
107
|
+
),
|
|
108
|
+
...props,
|
|
109
|
+
children: /* @__PURE__ */ jsxs(
|
|
110
|
+
"div",
|
|
111
|
+
{
|
|
112
|
+
className: twMerge(
|
|
113
|
+
"flex min-h-10 flex-row items-center gap-3",
|
|
114
|
+
nested && "ms-2 gap-2 border-s ps-4"
|
|
115
|
+
),
|
|
116
|
+
children: [
|
|
117
|
+
/* @__PURE__ */ jsx("div", { className: "text-muted-foreground [&_svg]:size-4", children: icon }),
|
|
118
|
+
/* @__PURE__ */ jsx("p", { className: "w-0 flex-1 truncate", children })
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
)
|
|
122
|
+
}
|
|
123
|
+
));
|
|
124
|
+
CommandItem.displayName = CommandPrimitive.Item.displayName;
|
|
125
|
+
var CommandDialog = React.forwardRef(({ footer, contentClassName, overlayClassName, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
126
|
+
CommandPrimitive.Dialog,
|
|
127
|
+
{
|
|
128
|
+
ref,
|
|
129
|
+
shouldFilter: false,
|
|
130
|
+
loop: true,
|
|
131
|
+
contentClassName: twMerge(
|
|
132
|
+
"fixed left-1/2 top-[10vh] z-50 w-[98vw] max-w-screen-sm origin-left -translate-x-1/2 rounded-lg border bg-popover text-popover-foreground shadow-lg data-[state=closed]:animate-dialog-out data-[state=open]:animate-dialog-in",
|
|
133
|
+
contentClassName
|
|
134
|
+
),
|
|
135
|
+
overlayClassName: twMerge(
|
|
136
|
+
"fixed inset-0 z-50 bg-background/50 backdrop-blur-sm data-[state=closed]:animate-fade-out data-[state=open]:animate-fade-in",
|
|
137
|
+
overlayClassName
|
|
138
|
+
),
|
|
139
|
+
...props,
|
|
140
|
+
children: [
|
|
141
|
+
children,
|
|
142
|
+
footer ? /* @__PURE__ */ jsx("div", { className: "mt-auto flex flex-col border-t p-3", children: footer }) : null
|
|
143
|
+
]
|
|
144
|
+
}
|
|
145
|
+
));
|
|
146
|
+
CommandDialog.displayName = CommandPrimitive.Dialog.displayName;
|
|
147
|
+
var CommandDialogClose = DialogClose;
|
|
148
|
+
|
|
149
|
+
// src/components/dialog/search.tsx
|
|
150
|
+
import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
151
|
+
function SearchDialog({
|
|
152
|
+
open,
|
|
153
|
+
onOpenChange,
|
|
154
|
+
footer,
|
|
155
|
+
links = [],
|
|
156
|
+
...props
|
|
157
|
+
}) {
|
|
158
|
+
const defaultItems = useMemo(
|
|
159
|
+
() => links.map(([name, link]) => ({
|
|
160
|
+
type: "page",
|
|
161
|
+
id: name,
|
|
162
|
+
content: name,
|
|
163
|
+
url: link
|
|
164
|
+
})),
|
|
165
|
+
[links]
|
|
166
|
+
);
|
|
167
|
+
return /* @__PURE__ */ jsx2(CommandDialog, { open, onOpenChange, footer, children: /* @__PURE__ */ jsx2(Search2, { defaultItems, ...props }) });
|
|
168
|
+
}
|
|
169
|
+
var icons = {
|
|
170
|
+
text: /* @__PURE__ */ jsx2(TextIcon, {}),
|
|
171
|
+
heading: /* @__PURE__ */ jsx2(HashIcon, {}),
|
|
172
|
+
page: /* @__PURE__ */ jsx2(FileTextIcon, {})
|
|
173
|
+
};
|
|
174
|
+
function Search2({
|
|
175
|
+
search,
|
|
176
|
+
onSearchChange,
|
|
177
|
+
defaultItems = [],
|
|
178
|
+
results
|
|
179
|
+
}) {
|
|
180
|
+
const { text } = useI18n();
|
|
181
|
+
const router = useRouter();
|
|
182
|
+
const { setOpenSearch } = useSearchContext();
|
|
183
|
+
const items = results === "empty" ? defaultItems : results;
|
|
184
|
+
const hideList = results === "empty" && defaultItems.length === 0;
|
|
185
|
+
const onOpen = (url) => {
|
|
186
|
+
router.push(url);
|
|
187
|
+
setOpenSearch(false);
|
|
188
|
+
};
|
|
189
|
+
return /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
190
|
+
/* @__PURE__ */ jsx2(
|
|
191
|
+
CommandInput,
|
|
192
|
+
{
|
|
193
|
+
value: search,
|
|
194
|
+
onValueChange: onSearchChange,
|
|
195
|
+
placeholder: text.search
|
|
196
|
+
}
|
|
197
|
+
),
|
|
198
|
+
/* @__PURE__ */ jsxs2(CommandList, { className: twMerge(hideList && "hidden"), children: [
|
|
199
|
+
/* @__PURE__ */ jsx2(CommandEmpty, { children: text.searchNoResult }),
|
|
200
|
+
/* @__PURE__ */ jsx2(CommandGroup, { value: "result", children: items.map((item) => /* @__PURE__ */ jsx2(
|
|
201
|
+
CommandItem,
|
|
202
|
+
{
|
|
203
|
+
value: item.id,
|
|
204
|
+
onSelect: () => {
|
|
205
|
+
onOpen(item.url);
|
|
206
|
+
},
|
|
207
|
+
icon: icons[item.type],
|
|
208
|
+
nested: item.type !== "page",
|
|
209
|
+
children: item.content
|
|
210
|
+
},
|
|
211
|
+
item.id
|
|
212
|
+
)) })
|
|
213
|
+
] })
|
|
214
|
+
] });
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export {
|
|
218
|
+
SearchDialog
|
|
219
|
+
};
|
|
@@ -59,18 +59,20 @@ var Accordion = forwardRef(({ title, className, id, children, ...props }, ref) =
|
|
|
59
59
|
className: twMerge("group/accordion relative scroll-m-20", className),
|
|
60
60
|
...props,
|
|
61
61
|
children: [
|
|
62
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ jsxs(
|
|
63
63
|
AccordionPrimitive.Header,
|
|
64
64
|
{
|
|
65
65
|
id,
|
|
66
|
-
className: "not-prose font-medium text-foreground",
|
|
67
|
-
children:
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
className: "not-prose flex flex-row items-center text-start font-medium text-foreground",
|
|
67
|
+
children: [
|
|
68
|
+
/* @__PURE__ */ jsxs(AccordionPrimitive.Trigger, { className: "flex flex-1 items-center gap-2 p-4 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", children: [
|
|
69
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "size-4 text-muted-foreground transition-transform duration-200 group-data-[state=open]/accordion:rotate-90" }),
|
|
70
|
+
title
|
|
71
|
+
] }),
|
|
72
|
+
id ? /* @__PURE__ */ jsx(CopyButton, { id }) : null
|
|
73
|
+
]
|
|
71
74
|
}
|
|
72
75
|
),
|
|
73
|
-
id ? /* @__PURE__ */ jsx(CopyButton, { id }) : null,
|
|
74
76
|
/* @__PURE__ */ jsx(AccordionPrimitive.Content, { className: "overflow-hidden data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down", children: /* @__PURE__ */ jsx("div", { className: "ml-2 p-4 pt-0 prose-no-margin", children }) })
|
|
75
77
|
]
|
|
76
78
|
}
|
|
@@ -90,7 +92,7 @@ function CopyButton({ id }) {
|
|
|
90
92
|
className: twMerge(
|
|
91
93
|
buttonVariants({
|
|
92
94
|
color: "ghost",
|
|
93
|
-
className: "
|
|
95
|
+
className: "text-muted-foreground mr-2"
|
|
94
96
|
})
|
|
95
97
|
),
|
|
96
98
|
onClick,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
declare function Root({ children, className, ...props }: HTMLAttributes<HTMLDivElement>):
|
|
4
|
-
declare function API({ className, children, ...props }: HTMLAttributes<HTMLDivElement>):
|
|
3
|
+
declare function Root({ children, className, ...props }: HTMLAttributes<HTMLDivElement>): React.ReactElement;
|
|
4
|
+
declare function API({ className, children, ...props }: HTMLAttributes<HTMLDivElement>): React.ReactElement;
|
|
5
5
|
interface APIInfoProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
6
|
method?: string;
|
|
7
7
|
route: string;
|
|
8
8
|
}
|
|
9
|
-
declare function APIInfo({ children, className, method, route, ...props }: APIInfoProps):
|
|
9
|
+
declare function APIInfo({ children, className, method, route, ...props }: APIInfoProps): React.ReactElement;
|
|
10
10
|
interface PropertyProps {
|
|
11
11
|
name: string;
|
|
12
12
|
type: string;
|
|
@@ -14,7 +14,7 @@ interface PropertyProps {
|
|
|
14
14
|
deprecated: boolean;
|
|
15
15
|
children: ReactNode;
|
|
16
16
|
}
|
|
17
|
-
declare function Property({ name, type, required, deprecated, children, }: PropertyProps):
|
|
18
|
-
declare function APIExample({ children, className, ...props }: HTMLAttributes<HTMLDivElement>):
|
|
17
|
+
declare function Property({ name, type, required, deprecated, children, }: PropertyProps): React.ReactElement;
|
|
18
|
+
declare function APIExample({ children, className, ...props }: HTMLAttributes<HTMLDivElement>): React.ReactElement;
|
|
19
19
|
|
|
20
20
|
export { API, APIExample, APIInfo, type APIInfoProps, Property, Root };
|
package/dist/components/api.js
CHANGED
|
@@ -96,10 +96,7 @@ function APIExample({
|
|
|
96
96
|
return /* @__PURE__ */ jsxs(
|
|
97
97
|
"div",
|
|
98
98
|
{
|
|
99
|
-
className: twMerge(
|
|
100
|
-
"sticky top-14 h-fit xl:w-[40%] xl:min-w-[400px]",
|
|
101
|
-
className
|
|
102
|
-
),
|
|
99
|
+
className: twMerge("sticky top-14 h-fit xl:w-2/5 xl:min-w-[400px]", className),
|
|
103
100
|
...props,
|
|
104
101
|
children: [
|
|
105
102
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-row items-center gap-4 xl:hidden", children: [
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { LinkProps } from 'fumadocs-core/link';
|
|
2
2
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
3
|
|
|
4
|
-
declare function Cards(props: HTMLAttributes<HTMLDivElement>):
|
|
4
|
+
declare function Cards(props: HTMLAttributes<HTMLDivElement>): React.ReactElement;
|
|
5
5
|
type CardProps = {
|
|
6
6
|
icon?: ReactNode;
|
|
7
7
|
title: string;
|
|
8
8
|
description: string;
|
|
9
9
|
} & Omit<LinkProps, 'title'>;
|
|
10
|
-
declare function Card({ icon, title, description, ...props }: CardProps):
|
|
10
|
+
declare function Card({ icon, title, description, ...props }: CardProps): React.ReactElement;
|
|
11
11
|
|
|
12
12
|
export { Card, type CardProps, Cards };
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import { SearchIndex } from 'algoliasearch/lite';
|
|
2
2
|
import { Options } from 'fumadocs-core/search-algolia/client';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
-
import { SharedProps
|
|
4
|
+
import { SharedProps } from './search.mjs';
|
|
5
5
|
import 'fumadocs-core/search/shared';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
interface ContentProps {
|
|
7
|
+
interface AlgoliaSearchDialogProps extends SharedProps {
|
|
9
8
|
index: SearchIndex;
|
|
10
9
|
searchOptions?: Options;
|
|
11
10
|
footer?: ReactNode;
|
|
12
|
-
links?: SearchLink[];
|
|
13
11
|
}
|
|
14
|
-
declare function AlgoliaSearchDialog({
|
|
12
|
+
declare function AlgoliaSearchDialog({ index, searchOptions, ...props }: AlgoliaSearchDialogProps): React.ReactElement;
|
|
15
13
|
|
|
16
14
|
export { type AlgoliaSearchDialogProps, AlgoliaSearchDialog as default };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
|
-
SearchDialog
|
|
4
|
-
|
|
5
|
-
} from "../../chunk-CUAH5G3U.js";
|
|
3
|
+
SearchDialog
|
|
4
|
+
} from "../../chunk-SHMZYIS4.js";
|
|
6
5
|
import "../../chunk-T7VFHVWK.js";
|
|
7
6
|
import "../../chunk-YAHHY62W.js";
|
|
8
7
|
import "../../chunk-7GZKFBAP.js";
|
|
@@ -15,20 +14,13 @@ import {
|
|
|
15
14
|
} from "fumadocs-core/search-algolia/client";
|
|
16
15
|
import { jsx } from "react/jsx-runtime";
|
|
17
16
|
function AlgoliaSearchDialog({
|
|
18
|
-
open,
|
|
19
|
-
onOpenChange,
|
|
20
|
-
...props
|
|
21
|
-
}) {
|
|
22
|
-
return /* @__PURE__ */ jsx(SearchDialog, { open, onOpenChange, children: /* @__PURE__ */ jsx(Content, { ...props }) });
|
|
23
|
-
}
|
|
24
|
-
function Content({
|
|
25
17
|
index,
|
|
26
18
|
searchOptions,
|
|
27
19
|
...props
|
|
28
20
|
}) {
|
|
29
21
|
const { search, setSearch, query } = useAlgoliaSearch(index, searchOptions);
|
|
30
22
|
return /* @__PURE__ */ jsx(
|
|
31
|
-
|
|
23
|
+
SearchDialog,
|
|
32
24
|
{
|
|
33
25
|
search,
|
|
34
26
|
onSearchChange: setSearch,
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { SharedProps
|
|
2
|
+
import { SharedProps } from './search.mjs';
|
|
3
3
|
import 'fumadocs-core/search/shared';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
interface ContentProps {
|
|
5
|
+
interface DefaultSearchDialogProps extends SharedProps {
|
|
7
6
|
/**
|
|
8
7
|
* Search tag
|
|
9
8
|
*/
|
|
@@ -13,8 +12,7 @@ interface ContentProps {
|
|
|
13
12
|
*/
|
|
14
13
|
api?: string;
|
|
15
14
|
footer?: ReactNode;
|
|
16
|
-
links?: SearchLink[];
|
|
17
15
|
}
|
|
18
|
-
declare function DefaultSearchDialog({
|
|
16
|
+
declare function DefaultSearchDialog({ tag, api, ...props }: DefaultSearchDialogProps): React.ReactElement;
|
|
19
17
|
|
|
20
18
|
export { type DefaultSearchDialogProps, DefaultSearchDialog as default };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
|
-
SearchDialog
|
|
4
|
-
|
|
5
|
-
} from "../../chunk-CUAH5G3U.js";
|
|
3
|
+
SearchDialog
|
|
4
|
+
} from "../../chunk-SHMZYIS4.js";
|
|
6
5
|
import "../../chunk-T7VFHVWK.js";
|
|
7
6
|
import {
|
|
8
7
|
useI18n
|
|
@@ -15,17 +14,14 @@ import "../../chunk-6C3VEZWH.js";
|
|
|
15
14
|
import { useDocsSearch } from "fumadocs-core/search/client";
|
|
16
15
|
import { jsx } from "react/jsx-runtime";
|
|
17
16
|
function DefaultSearchDialog({
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
tag,
|
|
18
|
+
api,
|
|
20
19
|
...props
|
|
21
20
|
}) {
|
|
22
|
-
return /* @__PURE__ */ jsx(SearchDialog, { open, onOpenChange, children: /* @__PURE__ */ jsx(Content, { ...props }) });
|
|
23
|
-
}
|
|
24
|
-
function Content({ tag, api, ...props }) {
|
|
25
21
|
const { locale } = useI18n();
|
|
26
22
|
const { search, setSearch, query } = useDocsSearch(locale, tag, api);
|
|
27
23
|
return /* @__PURE__ */ jsx(
|
|
28
|
-
|
|
24
|
+
SearchDialog,
|
|
29
25
|
{
|
|
30
26
|
search,
|
|
31
27
|
onSearchChange: setSearch,
|
|
@@ -10,19 +10,15 @@ interface SharedProps {
|
|
|
10
10
|
*/
|
|
11
11
|
links?: SearchLink[];
|
|
12
12
|
}
|
|
13
|
-
interface SearchDialogProps {
|
|
14
|
-
|
|
15
|
-
onOpenChange: (open: boolean) => void;
|
|
16
|
-
children?: ReactNode;
|
|
13
|
+
interface SearchDialogProps extends SharedProps, Omit<SearchContentProps, 'defaultItems'> {
|
|
14
|
+
footer?: ReactNode;
|
|
17
15
|
}
|
|
18
|
-
declare function SearchDialog(props: SearchDialogProps): JSX.Element;
|
|
19
16
|
interface SearchContentProps {
|
|
20
17
|
search: string;
|
|
21
18
|
onSearchChange: (v: string) => void;
|
|
22
19
|
results: SortedResult[] | 'empty';
|
|
23
|
-
|
|
24
|
-
links?: SearchLink[];
|
|
20
|
+
defaultItems?: SortedResult[];
|
|
25
21
|
}
|
|
26
|
-
declare function
|
|
22
|
+
declare function SearchDialog({ open, onOpenChange, footer, links, ...props }: SearchDialogProps): React.ReactElement;
|
|
27
23
|
|
|
28
|
-
export { SearchDialog,
|
|
24
|
+
export { SearchDialog, type SearchLink, type SharedProps };
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
|
-
SearchDialog
|
|
3
|
-
|
|
4
|
-
} from "../../chunk-CUAH5G3U.js";
|
|
2
|
+
SearchDialog
|
|
3
|
+
} from "../../chunk-SHMZYIS4.js";
|
|
5
4
|
import "../../chunk-T7VFHVWK.js";
|
|
6
5
|
import "../../chunk-YAHHY62W.js";
|
|
7
6
|
import "../../chunk-7GZKFBAP.js";
|
|
8
7
|
import "../../chunk-TK3TM3MR.js";
|
|
9
8
|
import "../../chunk-6C3VEZWH.js";
|
|
10
9
|
export {
|
|
11
|
-
SearchDialog
|
|
12
|
-
SearchDialogContent
|
|
10
|
+
SearchDialog
|
|
13
11
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
declare function Files({ className, ...props }: HTMLAttributes<HTMLDivElement>):
|
|
3
|
+
declare function Files({ className, ...props }: HTMLAttributes<HTMLDivElement>): React.ReactElement;
|
|
4
4
|
interface FileProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
5
|
name: string;
|
|
6
6
|
icon?: ReactNode;
|
|
@@ -14,7 +14,7 @@ interface FolderProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
14
14
|
*/
|
|
15
15
|
defaultOpen?: boolean;
|
|
16
16
|
}
|
|
17
|
-
declare function File({ name, icon, className, ...rest }: FileProps):
|
|
18
|
-
declare function Folder({ name, defaultOpen, ...props }: FolderProps):
|
|
17
|
+
declare function File({ name, icon, className, ...rest }: FileProps): React.ReactElement;
|
|
18
|
+
declare function Folder({ name, defaultOpen, ...props }: FolderProps): React.ReactElement;
|
|
19
19
|
|
|
20
20
|
export { File, type FileProps, Files, Folder, type FolderProps };
|
|
@@ -4,6 +4,6 @@ type Types = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
|
4
4
|
type HeadingProps<T extends Types> = Omit<ComponentPropsWithoutRef<T>, 'as'> & {
|
|
5
5
|
as?: T;
|
|
6
6
|
};
|
|
7
|
-
declare function Heading<T extends Types = 'h1'>({ as, className, ...props }: HeadingProps<T>):
|
|
7
|
+
declare function Heading<T extends Types = 'h1'>({ as, className, ...props }: HeadingProps<T>): React.ReactElement;
|
|
8
8
|
|
|
9
9
|
export { Heading };
|
|
@@ -7,6 +7,6 @@ type ImageZoomProps = ImageProps & {
|
|
|
7
7
|
*/
|
|
8
8
|
zoomInProps?: ImgHTMLAttributes<HTMLImageElement>;
|
|
9
9
|
};
|
|
10
|
-
declare function ImageZoom({ zoomInProps, children, ...props }: ImageZoomProps):
|
|
10
|
+
declare function ImageZoom({ zoomInProps, children, ...props }: ImageZoomProps): React.ReactElement;
|
|
11
11
|
|
|
12
12
|
export { ImageZoom, type ImageZoomProps };
|
|
@@ -4,6 +4,6 @@ interface InlineTocProps {
|
|
|
4
4
|
items: TOCItemType[];
|
|
5
5
|
defaultOpen?: boolean;
|
|
6
6
|
}
|
|
7
|
-
declare function InlineTOC({ items, defaultOpen }: InlineTocProps):
|
|
7
|
+
declare function InlineTOC({ items, defaultOpen, }: InlineTocProps): React.ReactElement;
|
|
8
8
|
|
|
9
9
|
export { InlineTOC, type InlineTocProps };
|
|
@@ -10,7 +10,10 @@ import "../chunk-6C3VEZWH.js";
|
|
|
10
10
|
// src/components/inline-toc.tsx
|
|
11
11
|
import { ChevronDown } from "lucide-react";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
-
function InlineTOC({
|
|
13
|
+
function InlineTOC({
|
|
14
|
+
items,
|
|
15
|
+
defaultOpen
|
|
16
|
+
}) {
|
|
14
17
|
return /* @__PURE__ */ jsxs(
|
|
15
18
|
Collapsible,
|
|
16
19
|
{
|
|
@@ -9,6 +9,6 @@ interface RollButtonProps {
|
|
|
9
9
|
/**
|
|
10
10
|
* A button that scrolls to the top
|
|
11
11
|
*/
|
|
12
|
-
declare function RollButton({ percentage }: RollButtonProps):
|
|
12
|
+
declare function RollButton({ percentage, }: RollButtonProps): React.ReactElement;
|
|
13
13
|
|
|
14
14
|
export { RollButton };
|
|
@@ -11,7 +11,9 @@ import "../chunk-6C3VEZWH.js";
|
|
|
11
11
|
import { ChevronUpIcon } from "lucide-react";
|
|
12
12
|
import { useEffect, useState } from "react";
|
|
13
13
|
import { jsx } from "react/jsx-runtime";
|
|
14
|
-
function RollButton({
|
|
14
|
+
function RollButton({
|
|
15
|
+
percentage = 0.2
|
|
16
|
+
}) {
|
|
15
17
|
const [show, setShow] = useState(false);
|
|
16
18
|
useEffect(() => {
|
|
17
19
|
const listener = () => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
declare function Steps({ children }: {
|
|
3
|
+
declare function Steps({ children, }: {
|
|
4
4
|
children: ReactNode;
|
|
5
|
-
}):
|
|
6
|
-
declare function Step({ children }: {
|
|
5
|
+
}): React.ReactElement;
|
|
6
|
+
declare function Step({ children, }: {
|
|
7
7
|
children: ReactNode;
|
|
8
|
-
}):
|
|
8
|
+
}): React.ReactElement;
|
|
9
9
|
|
|
10
10
|
export { Step, Steps };
|
package/dist/components/steps.js
CHANGED
|
@@ -2,10 +2,14 @@ import "../chunk-6C3VEZWH.js";
|
|
|
2
2
|
|
|
3
3
|
// src/components/steps.tsx
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
function Steps({
|
|
5
|
+
function Steps({
|
|
6
|
+
children
|
|
7
|
+
}) {
|
|
6
8
|
return /* @__PURE__ */ jsx("div", { className: "steps", children });
|
|
7
9
|
}
|
|
8
|
-
function Step({
|
|
10
|
+
function Step({
|
|
11
|
+
children
|
|
12
|
+
}) {
|
|
9
13
|
return /* @__PURE__ */ jsx("div", { className: "step", children });
|
|
10
14
|
}
|
|
11
15
|
export {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
2
2
|
import { TabsContentProps } from '@radix-ui/react-tabs';
|
|
3
|
-
import * as React from 'react';
|
|
3
|
+
import * as React$1 from 'react';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
|
|
6
|
-
declare const Tabs$1: React.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
-
declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
-
declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
-
declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const Tabs$1: React$1.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const TabsList: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const TabsTrigger: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
declare const TabsContent: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
10
10
|
|
|
11
11
|
declare const tabs_TabsContent: typeof TabsContent;
|
|
12
12
|
declare const tabs_TabsList: typeof TabsList;
|
|
@@ -31,7 +31,7 @@ interface TabsProps {
|
|
|
31
31
|
items?: string[];
|
|
32
32
|
children: ReactNode;
|
|
33
33
|
}
|
|
34
|
-
declare function Tabs({ id, items, persist, defaultIndex, children, }: TabsProps):
|
|
35
|
-
declare function Tab({ value, className, ...props }: TabsContentProps):
|
|
34
|
+
declare function Tabs({ id, items, persist, defaultIndex, children, }: TabsProps): React.ReactElement;
|
|
35
|
+
declare function Tab({ value, className, ...props }: TabsContentProps): React.ReactElement;
|
|
36
36
|
|
|
37
37
|
export { tabs as Primitive, Tab, Tabs, type TabsProps };
|