fumadocs-ui 8.1.1 → 8.3.0
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-NC3UQMN7.js → chunk-3YZ7NCMG.js} +16 -15
- package/dist/{chunk-5KW7ATCP.js → chunk-7GZKFBAP.js} +2 -3
- package/dist/{chunk-5EZE3X7G.js → chunk-7XPZOMJ2.js} +3 -3
- package/dist/{chunk-GZQICERS.js → chunk-CYNHK27D.js} +3 -3
- package/dist/{chunk-F62NYOL5.js → chunk-REAI3OOF.js} +4 -4
- package/dist/chunk-TK3TM3MR.js +6 -0
- package/dist/{chunk-CBOHU2VN.js → chunk-UKE65HV3.js} +3 -3
- package/dist/{chunk-IXYX64FW.js → chunk-WDMDQTHE.js} +15 -15
- package/dist/{chunk-OG3QOLYP.js → chunk-ZOR33LFA.js} +4 -4
- package/dist/components/accordion.js +26 -19
- package/dist/components/api.js +13 -13
- package/dist/components/callout.js +3 -3
- package/dist/components/card.js +2 -2
- package/dist/components/codeblock.d.mts +9 -1
- package/dist/components/codeblock.js +4 -4
- package/dist/components/dialog/search-algolia.js +3 -3
- package/dist/components/dialog/search-default.js +3 -3
- package/dist/components/dialog/search.js +3 -3
- package/dist/components/files.d.mts +8 -8
- package/dist/components/files.js +27 -22
- package/dist/components/heading.js +2 -2
- package/dist/components/image-zoom.js +1 -0
- package/dist/components/inline-toc.js +7 -7
- package/dist/components/roll-button.js +4 -4
- package/dist/components/tabs.js +6 -6
- package/dist/components/type-table.js +11 -11
- package/dist/i18n.js +9 -9
- package/dist/image-zoom.css +1 -0
- package/dist/layout.client.js +26 -32
- package/dist/layout.js +3 -3
- package/dist/mdx.client.d.mts +3 -4
- package/dist/mdx.client.js +6 -5
- package/dist/mdx.d.mts +2 -3
- package/dist/mdx.js +3 -3
- package/dist/page.client.js +6 -6
- package/dist/page.js +3 -3
- package/dist/style.css +1 -1
- package/dist/tailwind-plugin.d.ts +8 -4
- package/dist/tailwind-plugin.js +62 -82
- package/dist/twoslash/popup.js +3 -3
- package/package.json +4 -3
- package/dist/chunk-KCGRUOMD.js +0 -13
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
|
|
3
3
|
declare function Files({ className, ...props }: HTMLAttributes<HTMLDivElement>): JSX.Element;
|
|
4
|
-
interface FileProps {
|
|
5
|
-
|
|
4
|
+
interface FileProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
name: string;
|
|
6
6
|
icon?: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
interface FolderProps extends HTMLAttributes<HTMLDivElement> {
|
|
9
|
+
name: string;
|
|
7
10
|
/**
|
|
8
11
|
* Open folder by default
|
|
9
12
|
*
|
|
10
13
|
* @defaultValue false
|
|
11
14
|
*/
|
|
12
15
|
defaultOpen?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* hildren files of the folder, considered as file if empty
|
|
15
|
-
*/
|
|
16
|
-
children?: ReactNode;
|
|
17
16
|
}
|
|
18
|
-
declare function File(
|
|
17
|
+
declare function File(props: FileProps): JSX.Element;
|
|
18
|
+
declare function Folder({ name, defaultOpen, ...props }: FolderProps): JSX.Element;
|
|
19
19
|
|
|
20
|
-
export { File, Files };
|
|
20
|
+
export { File, type FileProps, Files, Folder, type FolderProps };
|
package/dist/components/files.js
CHANGED
|
@@ -3,15 +3,16 @@ import {
|
|
|
3
3
|
Collapsible,
|
|
4
4
|
CollapsibleContent,
|
|
5
5
|
CollapsibleTrigger
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-7XPZOMJ2.js";
|
|
7
7
|
import {
|
|
8
|
-
|
|
9
|
-
} from "../chunk-
|
|
8
|
+
twMerge
|
|
9
|
+
} from "../chunk-TK3TM3MR.js";
|
|
10
10
|
import "../chunk-6C3VEZWH.js";
|
|
11
11
|
|
|
12
12
|
// src/components/files.tsx
|
|
13
13
|
import { cva } from "class-variance-authority";
|
|
14
14
|
import { FileIcon, FolderIcon, FolderOpenIcon } from "lucide-react";
|
|
15
|
+
import { useState } from "react";
|
|
15
16
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
17
|
var item = cva(
|
|
17
18
|
"flex flex-row items-center gap-2 rounded-md px-2 py-1.5 text-sm hover:bg-accent hover:text-accent-foreground [&_svg]:size-4"
|
|
@@ -23,34 +24,38 @@ function Files({
|
|
|
23
24
|
return /* @__PURE__ */ jsx(
|
|
24
25
|
"div",
|
|
25
26
|
{
|
|
26
|
-
className:
|
|
27
|
+
className: twMerge("not-prose rounded-md border bg-card p-2", className),
|
|
27
28
|
...props,
|
|
28
29
|
children: props.children
|
|
29
30
|
}
|
|
30
31
|
);
|
|
31
32
|
}
|
|
32
|
-
function File({
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
defaultOpen,
|
|
36
|
-
children
|
|
37
|
-
}) {
|
|
38
|
-
if (!children) {
|
|
39
|
-
return /* @__PURE__ */ jsxs("p", { className: cn(item()), children: [
|
|
40
|
-
icon ?? /* @__PURE__ */ jsx(FileIcon, {}),
|
|
41
|
-
title
|
|
42
|
-
] });
|
|
33
|
+
function File(props) {
|
|
34
|
+
if ("children" in props) {
|
|
35
|
+
return /* @__PURE__ */ jsx(Folder, { ...props });
|
|
43
36
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
37
|
+
const { name, icon = /* @__PURE__ */ jsx(FileIcon, {}), className, ...rest } = props;
|
|
38
|
+
return /* @__PURE__ */ jsxs("div", { className: twMerge(item({ className })), ...rest, children: [
|
|
39
|
+
icon,
|
|
40
|
+
name ?? props.title
|
|
41
|
+
] });
|
|
42
|
+
}
|
|
43
|
+
function Folder({
|
|
44
|
+
name,
|
|
45
|
+
defaultOpen = false,
|
|
46
|
+
...props
|
|
47
|
+
}) {
|
|
48
|
+
const [open, setOpen] = useState(defaultOpen);
|
|
49
|
+
return /* @__PURE__ */ jsxs(Collapsible, { open, onOpenChange: setOpen, ...props, children: [
|
|
50
|
+
/* @__PURE__ */ jsxs(CollapsibleTrigger, { className: twMerge(item({ className: "w-full" })), children: [
|
|
51
|
+
open ? /* @__PURE__ */ jsx(FolderOpenIcon, {}) : /* @__PURE__ */ jsx(FolderIcon, {}),
|
|
52
|
+
name ?? props.title
|
|
49
53
|
] }),
|
|
50
|
-
/* @__PURE__ */ jsx(CollapsibleContent, { children: /* @__PURE__ */ jsx("div", { className: "ml-
|
|
54
|
+
/* @__PURE__ */ jsx(CollapsibleContent, { children: /* @__PURE__ */ jsx("div", { className: "ml-2 flex flex-col border-l pl-2", children: props.children }) })
|
|
51
55
|
] });
|
|
52
56
|
}
|
|
53
57
|
export {
|
|
54
58
|
File,
|
|
55
|
-
Files
|
|
59
|
+
Files,
|
|
60
|
+
Folder
|
|
56
61
|
};
|
|
@@ -7,6 +7,7 @@ import "../chunk-6C3VEZWH.js";
|
|
|
7
7
|
// src/components/image-zoom.tsx
|
|
8
8
|
import Image from "next/image";
|
|
9
9
|
import Zoom from "react-medium-image-zoom";
|
|
10
|
+
import "../../dist/image-zoom.css";
|
|
10
11
|
import { jsx } from "react/jsx-runtime";
|
|
11
12
|
function getImageSrc(src) {
|
|
12
13
|
if (typeof src === "string")
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
Collapsible,
|
|
4
4
|
CollapsibleContent,
|
|
5
5
|
CollapsibleTrigger
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-7XPZOMJ2.js";
|
|
7
|
+
import "../chunk-TK3TM3MR.js";
|
|
8
8
|
import "../chunk-6C3VEZWH.js";
|
|
9
9
|
|
|
10
10
|
// src/components/inline-toc.tsx
|
|
@@ -19,26 +19,26 @@ function InlineTOC({
|
|
|
19
19
|
Collapsible,
|
|
20
20
|
{
|
|
21
21
|
defaultOpen,
|
|
22
|
-
className: "not-prose rounded-lg border bg-card text-card-foreground",
|
|
22
|
+
className: "not-prose rounded-lg border bg-card p-4 text-card-foreground",
|
|
23
23
|
children: [
|
|
24
24
|
/* @__PURE__ */ jsx(CollapsibleTrigger, { asChild: true, children: children ?? /* @__PURE__ */ jsxs(
|
|
25
25
|
"button",
|
|
26
26
|
{
|
|
27
27
|
type: "button",
|
|
28
|
-
className: "inline-flex w-full items-center justify-between
|
|
28
|
+
className: "inline-flex w-full items-center justify-between font-medium [&[data-state=open]>svg]:rotate-180",
|
|
29
29
|
children: [
|
|
30
30
|
"Table of Contents",
|
|
31
31
|
/* @__PURE__ */ jsx(ChevronDown, { className: "size-4 transition-transform duration-200" })
|
|
32
32
|
]
|
|
33
33
|
}
|
|
34
34
|
) }),
|
|
35
|
-
/* @__PURE__ */ jsx(CollapsibleContent, { children: /* @__PURE__ */ jsx("div", { className: "flex flex-col
|
|
35
|
+
/* @__PURE__ */ jsx(CollapsibleContent, { children: /* @__PURE__ */ jsx("div", { className: "mt-2 flex flex-col text-sm text-muted-foreground", children: items.map((item) => /* @__PURE__ */ jsx(
|
|
36
36
|
"a",
|
|
37
37
|
{
|
|
38
38
|
href: item.url,
|
|
39
|
-
className: "py-1.5 hover:text-accent-foreground",
|
|
39
|
+
className: "border-l py-1.5 hover:text-accent-foreground",
|
|
40
40
|
style: {
|
|
41
|
-
paddingLeft:
|
|
41
|
+
paddingLeft: 12 * Math.max(item.depth - 1, 0)
|
|
42
42
|
},
|
|
43
43
|
children: item.title
|
|
44
44
|
},
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
buttonVariants
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-7GZKFBAP.js";
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "../chunk-
|
|
6
|
+
twMerge
|
|
7
|
+
} from "../chunk-TK3TM3MR.js";
|
|
8
8
|
import "../chunk-6C3VEZWH.js";
|
|
9
9
|
|
|
10
10
|
// src/components/roll-button.tsx
|
|
@@ -31,7 +31,7 @@ function RollButton({ percentage = 0.2 }) {
|
|
|
31
31
|
{
|
|
32
32
|
type: "button",
|
|
33
33
|
"aria-label": "Scroll to Top",
|
|
34
|
-
className:
|
|
34
|
+
className: twMerge(
|
|
35
35
|
buttonVariants({
|
|
36
36
|
color: "secondary",
|
|
37
37
|
size: "icon",
|
package/dist/components/tabs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "../chunk-
|
|
3
|
+
twMerge
|
|
4
|
+
} from "../chunk-TK3TM3MR.js";
|
|
5
5
|
import {
|
|
6
6
|
__export
|
|
7
7
|
} from "../chunk-6C3VEZWH.js";
|
|
@@ -25,7 +25,7 @@ var TabsList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
25
25
|
TabsPrimitive.List,
|
|
26
26
|
{
|
|
27
27
|
ref,
|
|
28
|
-
className:
|
|
28
|
+
className: twMerge(
|
|
29
29
|
"inline-flex h-9 w-full items-end gap-2 overflow-x-auto text-muted-foreground shadow-[0_-1px_0_var(--tw-shadow)_inset] shadow-border",
|
|
30
30
|
className
|
|
31
31
|
),
|
|
@@ -37,7 +37,7 @@ var TabsTrigger = React.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
37
37
|
TabsPrimitive.Trigger,
|
|
38
38
|
{
|
|
39
39
|
ref,
|
|
40
|
-
className:
|
|
40
|
+
className: twMerge(
|
|
41
41
|
"whitespace-nowrap border-b border-transparent p-1.5 text-sm font-medium hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=active]:border-primary data-[state=active]:text-primary",
|
|
42
42
|
className
|
|
43
43
|
),
|
|
@@ -49,7 +49,7 @@ var TabsContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
49
49
|
TabsPrimitive.Content,
|
|
50
50
|
{
|
|
51
51
|
ref,
|
|
52
|
-
className:
|
|
52
|
+
className: twMerge("mt-2 focus-visible:outline-none", className),
|
|
53
53
|
...props
|
|
54
54
|
}
|
|
55
55
|
));
|
|
@@ -129,7 +129,7 @@ function Tab({
|
|
|
129
129
|
TabsContent,
|
|
130
130
|
{
|
|
131
131
|
value: toValue(value),
|
|
132
|
-
className:
|
|
132
|
+
className: twMerge("prose-no-margin", className),
|
|
133
133
|
...props
|
|
134
134
|
}
|
|
135
135
|
);
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
Popover,
|
|
4
4
|
PopoverContent,
|
|
5
5
|
PopoverTrigger
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-CYNHK27D.js";
|
|
7
7
|
import {
|
|
8
|
-
|
|
9
|
-
} from "../chunk-
|
|
8
|
+
twMerge
|
|
9
|
+
} from "../chunk-TK3TM3MR.js";
|
|
10
10
|
import "../chunk-6C3VEZWH.js";
|
|
11
11
|
|
|
12
12
|
// src/components/type-table.tsx
|
|
@@ -22,19 +22,19 @@ function Info({ children }) {
|
|
|
22
22
|
function TypeTable({
|
|
23
23
|
type
|
|
24
24
|
}) {
|
|
25
|
-
const th =
|
|
26
|
-
const td =
|
|
27
|
-
const field =
|
|
28
|
-
const code =
|
|
25
|
+
const th = twMerge("p-2 font-medium first:pl-0 last:pr-0");
|
|
26
|
+
const td = twMerge("p-2 first:pl-0 last:pr-0");
|
|
27
|
+
const field = twMerge("inline-flex flex-row items-center gap-1");
|
|
28
|
+
const code = twMerge("rounded-md bg-secondary p-1 text-secondary-foreground");
|
|
29
29
|
return /* @__PURE__ */ jsx("div", { className: "not-prose overflow-auto whitespace-nowrap", children: /* @__PURE__ */ jsxs("table", { className: "my-4 w-full text-left text-sm text-muted-foreground", children: [
|
|
30
30
|
/* @__PURE__ */ jsx("thead", { className: "border-b", children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
31
|
-
/* @__PURE__ */ jsx("th", { className:
|
|
32
|
-
/* @__PURE__ */ jsx("th", { className:
|
|
33
|
-
/* @__PURE__ */ jsx("th", { className:
|
|
31
|
+
/* @__PURE__ */ jsx("th", { className: twMerge(th, "w-[45%]"), children: "Prop" }),
|
|
32
|
+
/* @__PURE__ */ jsx("th", { className: twMerge(th, "w-[30%]"), children: "Type" }),
|
|
33
|
+
/* @__PURE__ */ jsx("th", { className: twMerge(th, "w-[25%]"), children: "Default" })
|
|
34
34
|
] }) }),
|
|
35
35
|
/* @__PURE__ */ jsx("tbody", { className: "border-collapse divide-y divide-border", children: Object.entries(type).map(([key, value]) => /* @__PURE__ */ jsxs("tr", { children: [
|
|
36
36
|
/* @__PURE__ */ jsx("td", { className: td, children: /* @__PURE__ */ jsxs("div", { className: field, children: [
|
|
37
|
-
/* @__PURE__ */ jsx("code", { className:
|
|
37
|
+
/* @__PURE__ */ jsx("code", { className: twMerge(code, "bg-primary/10 text-primary"), children: key }),
|
|
38
38
|
value.description ? /* @__PURE__ */ jsx(Info, { children: value.description }) : null
|
|
39
39
|
] }) }),
|
|
40
40
|
/* @__PURE__ */ jsx("td", { className: td, children: /* @__PURE__ */ jsxs("div", { className: field, children: [
|
package/dist/i18n.js
CHANGED
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
useI18n
|
|
5
5
|
} from "./chunk-YAHHY62W.js";
|
|
6
6
|
import {
|
|
7
|
-
|
|
8
|
-
} from "./chunk-
|
|
7
|
+
twMerge
|
|
8
|
+
} from "./chunk-TK3TM3MR.js";
|
|
9
9
|
import "./chunk-6C3VEZWH.js";
|
|
10
10
|
|
|
11
11
|
// src/i18n.tsx
|
|
@@ -23,8 +23,8 @@ var SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
23
23
|
SelectPrimitive.Trigger,
|
|
24
24
|
{
|
|
25
25
|
ref,
|
|
26
|
-
className:
|
|
27
|
-
"flex h-10 w-full items-center justify-between rounded-md border
|
|
26
|
+
className: twMerge(
|
|
27
|
+
"flex h-10 w-full items-center justify-between rounded-md border px-3 py-2 text-sm ring-offset-background focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[placeholder]:text-muted-foreground",
|
|
28
28
|
className
|
|
29
29
|
),
|
|
30
30
|
...props,
|
|
@@ -39,7 +39,7 @@ var SelectContent = React.forwardRef(({ className, children, position = "popper"
|
|
|
39
39
|
SelectPrimitive.Content,
|
|
40
40
|
{
|
|
41
41
|
ref,
|
|
42
|
-
className:
|
|
42
|
+
className: twMerge(
|
|
43
43
|
"relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=closed]:animate-popover-out data-[state=open]:animate-popover-in",
|
|
44
44
|
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
45
45
|
className
|
|
@@ -49,7 +49,7 @@ var SelectContent = React.forwardRef(({ className, children, position = "popper"
|
|
|
49
49
|
children: /* @__PURE__ */ jsx(
|
|
50
50
|
SelectPrimitive.Viewport,
|
|
51
51
|
{
|
|
52
|
-
className:
|
|
52
|
+
className: twMerge(
|
|
53
53
|
"p-1",
|
|
54
54
|
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
55
55
|
),
|
|
@@ -63,7 +63,7 @@ var SelectLabel = React.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
63
63
|
SelectPrimitive.Label,
|
|
64
64
|
{
|
|
65
65
|
ref,
|
|
66
|
-
className:
|
|
66
|
+
className: twMerge("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
|
|
67
67
|
...props
|
|
68
68
|
}
|
|
69
69
|
));
|
|
@@ -72,7 +72,7 @@ var SelectItem = React.forwardRef(({ className, children, ...props }, ref) => /*
|
|
|
72
72
|
SelectPrimitive.Item,
|
|
73
73
|
{
|
|
74
74
|
ref,
|
|
75
|
-
className:
|
|
75
|
+
className: twMerge(
|
|
76
76
|
"relative flex w-full select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
77
77
|
className
|
|
78
78
|
),
|
|
@@ -88,7 +88,7 @@ var SelectSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
88
88
|
SelectPrimitive.Separator,
|
|
89
89
|
{
|
|
90
90
|
ref,
|
|
91
|
-
className:
|
|
91
|
+
className: twMerge("-mx-1 my-1 h-px bg-muted", className),
|
|
92
92
|
...props
|
|
93
93
|
}
|
|
94
94
|
));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[data-rmiz]{display:block;position:relative}[data-rmiz-ghost]{pointer-events:none;position:absolute}[data-rmiz-btn-zoom],[data-rmiz-btn-unzoom]{display:none}[data-rmiz-content=found] img{cursor:zoom-in}[data-rmiz-modal][open]{width:100vw;width:100dvw;height:100vh;background-color:transparent;max-width:none;height:100dvh;max-height:none;margin:0;padding:0;position:fixed;overflow:hidden}[data-rmiz-modal]:focus-visible{outline:"none"}[data-rmiz-modal-overlay]{transition:background-color .3s;position:absolute;top:0;bottom:0;left:0;right:0}[data-rmiz-modal-overlay=hidden]{background-color:transparent}[data-rmiz-modal-overlay=visible]{background-color:hsl(var(--background)/80%)}[data-rmiz-modal-content]{width:100%;height:100%;position:relative}[data-rmiz-modal]::backdrop{display:none}[data-rmiz-modal-img]{cursor:zoom-out;image-rendering:high-quality;transform-origin:0 0;transition:transform .3s;position:absolute}@media (prefers-reduced-motion:reduce){[data-rmiz-modal-overlay],[data-rmiz-modal-img]{transition-duration:.01ms!important}}
|
package/dist/layout.client.js
CHANGED
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
} from "./chunk-UIZNMCLD.js";
|
|
9
9
|
import {
|
|
10
10
|
ScrollArea
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ZOR33LFA.js";
|
|
12
12
|
import {
|
|
13
13
|
Popover,
|
|
14
14
|
PopoverContent,
|
|
15
15
|
PopoverTrigger
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-CYNHK27D.js";
|
|
17
17
|
import {
|
|
18
18
|
hasActive,
|
|
19
19
|
isActive
|
|
@@ -28,13 +28,13 @@ import {
|
|
|
28
28
|
Collapsible,
|
|
29
29
|
CollapsibleContent,
|
|
30
30
|
CollapsibleTrigger
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-7XPZOMJ2.js";
|
|
32
32
|
import {
|
|
33
33
|
buttonVariants
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-7GZKFBAP.js";
|
|
35
35
|
import {
|
|
36
|
-
|
|
37
|
-
} from "./chunk-
|
|
36
|
+
twMerge
|
|
37
|
+
} from "./chunk-TK3TM3MR.js";
|
|
38
38
|
import "./chunk-6C3VEZWH.js";
|
|
39
39
|
|
|
40
40
|
// src/components/nav.tsx
|
|
@@ -83,7 +83,7 @@ function ThemeToggle({
|
|
|
83
83
|
"button",
|
|
84
84
|
{
|
|
85
85
|
type: "button",
|
|
86
|
-
className:
|
|
86
|
+
className: twMerge(
|
|
87
87
|
"inline-flex items-center rounded-full border p-0.5",
|
|
88
88
|
className
|
|
89
89
|
),
|
|
@@ -91,8 +91,8 @@ function ThemeToggle({
|
|
|
91
91
|
onClick: onToggle,
|
|
92
92
|
...props,
|
|
93
93
|
children: [
|
|
94
|
-
/* @__PURE__ */ jsx(SunIcon, { className:
|
|
95
|
-
/* @__PURE__ */ jsx(MoonIcon, { className:
|
|
94
|
+
/* @__PURE__ */ jsx(SunIcon, { className: twMerge(buttonVariants2({ dark: false })) }),
|
|
95
|
+
/* @__PURE__ */ jsx(MoonIcon, { className: twMerge(buttonVariants2({ dark: true })) })
|
|
96
96
|
]
|
|
97
97
|
}
|
|
98
98
|
);
|
|
@@ -126,9 +126,9 @@ function Nav({
|
|
|
126
126
|
return /* @__PURE__ */ jsx2(
|
|
127
127
|
"header",
|
|
128
128
|
{
|
|
129
|
-
className:
|
|
130
|
-
"sticky top-0 z-50 h-16 border-b
|
|
131
|
-
transparent ? "border-transparent" : "border-foreground/10 bg-background/50"
|
|
129
|
+
className: twMerge(
|
|
130
|
+
"sticky top-0 z-50 h-16 border-b transition-colors",
|
|
131
|
+
transparent ? "border-transparent" : "border-foreground/10 bg-background/50 backdrop-blur-md"
|
|
132
132
|
),
|
|
133
133
|
children: /* @__PURE__ */ jsxs2("nav", { className: "container flex h-full flex-row items-center gap-4", children: [
|
|
134
134
|
/* @__PURE__ */ jsx2(Link, { href: url, className: "inline-flex items-center font-bold", children: title }),
|
|
@@ -144,7 +144,7 @@ function Nav({
|
|
|
144
144
|
/* @__PURE__ */ jsx2(
|
|
145
145
|
PopoverTrigger,
|
|
146
146
|
{
|
|
147
|
-
className:
|
|
147
|
+
className: twMerge(
|
|
148
148
|
buttonVariants({
|
|
149
149
|
size: "icon",
|
|
150
150
|
color: "ghost",
|
|
@@ -155,20 +155,14 @@ function Nav({
|
|
|
155
155
|
}
|
|
156
156
|
),
|
|
157
157
|
/* @__PURE__ */ jsxs2(PopoverContent, { className: "flex min-w-[260px] flex-col px-3 py-1", children: [
|
|
158
|
-
items.map((item) => /* @__PURE__ */ jsx2(PopoverClose, { asChild: true, children: /* @__PURE__ */ jsx2(
|
|
159
|
-
NavItem,
|
|
160
|
-
{
|
|
161
|
-
item,
|
|
162
|
-
className: "py-2 text-medium font-medium"
|
|
163
|
-
}
|
|
164
|
-
) }, item.url)),
|
|
158
|
+
items.map((item) => /* @__PURE__ */ jsx2(PopoverClose, { asChild: true, children: /* @__PURE__ */ jsx2(NavItem, { item, className: "py-2 text-lg font-medium" }) }, item.url)),
|
|
165
159
|
/* @__PURE__ */ jsx2(ThemeToggle, { className: "w-fit" })
|
|
166
160
|
] })
|
|
167
161
|
] }),
|
|
168
162
|
/* @__PURE__ */ jsx2(
|
|
169
163
|
"div",
|
|
170
164
|
{
|
|
171
|
-
className:
|
|
165
|
+
className: twMerge(
|
|
172
166
|
"flex flex-row items-center border-l pl-2 max-md:hidden",
|
|
173
167
|
links.length === 0 && "hidden"
|
|
174
168
|
),
|
|
@@ -178,7 +172,7 @@ function Nav({
|
|
|
178
172
|
"aria-label": item.label,
|
|
179
173
|
href: item.href,
|
|
180
174
|
external: item.external,
|
|
181
|
-
className:
|
|
175
|
+
className: twMerge(buttonVariants({ size: "icon", color: "ghost" })),
|
|
182
176
|
children: item.icon
|
|
183
177
|
},
|
|
184
178
|
item.href
|
|
@@ -202,7 +196,7 @@ function SearchToggle() {
|
|
|
202
196
|
"button",
|
|
203
197
|
{
|
|
204
198
|
type: "button",
|
|
205
|
-
className:
|
|
199
|
+
className: twMerge(
|
|
206
200
|
buttonVariants({
|
|
207
201
|
size: "icon",
|
|
208
202
|
color: "ghost",
|
|
@@ -239,7 +233,7 @@ function SidebarToggle({ collapsible }) {
|
|
|
239
233
|
SidebarTrigger,
|
|
240
234
|
{
|
|
241
235
|
"aria-label": "Toggle Sidebar",
|
|
242
|
-
className:
|
|
236
|
+
className: twMerge(
|
|
243
237
|
buttonVariants({
|
|
244
238
|
size: "icon",
|
|
245
239
|
color: "ghost",
|
|
@@ -257,7 +251,7 @@ function SidebarToggle({ collapsible }) {
|
|
|
257
251
|
onClick: () => {
|
|
258
252
|
setOpen(!open);
|
|
259
253
|
},
|
|
260
|
-
className:
|
|
254
|
+
className: twMerge(
|
|
261
255
|
buttonVariants({
|
|
262
256
|
color: "outline",
|
|
263
257
|
size: "icon",
|
|
@@ -278,7 +272,7 @@ var NavItem = forwardRef(({ item, className, ...props }, ref) => {
|
|
|
278
272
|
ref,
|
|
279
273
|
href: url,
|
|
280
274
|
external,
|
|
281
|
-
className:
|
|
275
|
+
className: twMerge(
|
|
282
276
|
"text-sm text-muted-foreground",
|
|
283
277
|
isActive(url, pathname) ? "font-medium text-accent-foreground" : "transition-colors hover:text-accent-foreground",
|
|
284
278
|
className
|
|
@@ -324,8 +318,8 @@ function Sidebar({
|
|
|
324
318
|
Base.SidebarList,
|
|
325
319
|
{
|
|
326
320
|
minWidth: 768,
|
|
327
|
-
className:
|
|
328
|
-
"flex w-full flex-col text-
|
|
321
|
+
className: twMerge(
|
|
322
|
+
"flex w-full flex-col text-[15px]",
|
|
329
323
|
!open ? "md:hidden" : "md:sticky md:top-16 md:h-body md:w-[240px] md:text-sm xl:w-[260px]",
|
|
330
324
|
"max-md:fixed max-md:inset-0 max-md:z-40 max-md:bg-background/80 max-md:pt-16 max-md:backdrop-blur-md max-md:data-[open=false]:hidden"
|
|
331
325
|
),
|
|
@@ -338,7 +332,7 @@ function Sidebar({
|
|
|
338
332
|
/* @__PURE__ */ jsxs3(
|
|
339
333
|
"div",
|
|
340
334
|
{
|
|
341
|
-
className:
|
|
335
|
+
className: twMerge(
|
|
342
336
|
"flex flex-row items-center gap-2 border-t py-2 max-md:px-4",
|
|
343
337
|
!footer && "md:hidden"
|
|
344
338
|
),
|
|
@@ -382,7 +376,7 @@ function BaseItem({
|
|
|
382
376
|
{
|
|
383
377
|
href: item.url,
|
|
384
378
|
external: item.external,
|
|
385
|
-
className:
|
|
379
|
+
className: twMerge(itemVariants({ active })),
|
|
386
380
|
children: [
|
|
387
381
|
item.icon,
|
|
388
382
|
item.text
|
|
@@ -418,7 +412,7 @@ function Folder({
|
|
|
418
412
|
setExtend((prev) => !prev);
|
|
419
413
|
e.preventDefault();
|
|
420
414
|
},
|
|
421
|
-
className:
|
|
415
|
+
className: twMerge("ml-auto transition-transform", !extend && "-rotate-90")
|
|
422
416
|
}
|
|
423
417
|
)
|
|
424
418
|
] });
|
|
@@ -431,7 +425,7 @@ function Folder({
|
|
|
431
425
|
/* @__PURE__ */ jsx3(
|
|
432
426
|
CollapsibleTrigger,
|
|
433
427
|
{
|
|
434
|
-
className:
|
|
428
|
+
className: twMerge(itemVariants({ active, className: "w-full" })),
|
|
435
429
|
asChild: true,
|
|
436
430
|
children: index ? /* @__PURE__ */ jsx3(Link2, { href: index.url, children: content }) : /* @__PURE__ */ jsx3("button", { type: "button", children: content })
|
|
437
431
|
}
|
package/dist/layout.js
CHANGED
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
replaceOrDefault
|
|
8
8
|
} from "./chunk-EDUYFB4P.js";
|
|
9
9
|
import {
|
|
10
|
-
|
|
11
|
-
} from "./chunk-
|
|
10
|
+
twMerge
|
|
11
|
+
} from "./chunk-TK3TM3MR.js";
|
|
12
12
|
import "./chunk-6C3VEZWH.js";
|
|
13
13
|
|
|
14
14
|
// src/layout.tsx
|
|
@@ -40,7 +40,7 @@ function DocsLayout({
|
|
|
40
40
|
"div",
|
|
41
41
|
{
|
|
42
42
|
...containerProps,
|
|
43
|
-
className:
|
|
43
|
+
className: twMerge(
|
|
44
44
|
"container flex flex-row gap-6 xl:gap-12",
|
|
45
45
|
containerProps?.className
|
|
46
46
|
),
|
package/dist/mdx.client.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CodeBlockProps } from './components/codeblock.mjs';
|
|
2
|
+
import 'react';
|
|
2
3
|
|
|
3
|
-
declare function Pre({ title, allowCopy, ...props }:
|
|
4
|
-
allowCopy?: boolean;
|
|
5
|
-
}): JSX.Element;
|
|
4
|
+
declare function Pre({ title, allowCopy, icon, ...props }: CodeBlockProps): JSX.Element;
|
|
6
5
|
|
|
7
6
|
export { Pre };
|
package/dist/mdx.client.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import {
|
|
3
3
|
CodeBlock,
|
|
4
4
|
Pre
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-3YZ7NCMG.js";
|
|
6
|
+
import "./chunk-ZOR33LFA.js";
|
|
7
7
|
import "./chunk-24NYFO7H.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-7GZKFBAP.js";
|
|
9
|
+
import "./chunk-TK3TM3MR.js";
|
|
10
10
|
import "./chunk-6C3VEZWH.js";
|
|
11
11
|
|
|
12
12
|
// src/mdx.client.tsx
|
|
@@ -14,9 +14,10 @@ import { jsx } from "react/jsx-runtime";
|
|
|
14
14
|
function Pre2({
|
|
15
15
|
title,
|
|
16
16
|
allowCopy,
|
|
17
|
+
icon,
|
|
17
18
|
...props
|
|
18
19
|
}) {
|
|
19
|
-
return /* @__PURE__ */ jsx(CodeBlock, { title, allowCopy, children: /* @__PURE__ */ jsx(Pre, { ...props }) });
|
|
20
|
+
return /* @__PURE__ */ jsx(CodeBlock, { title, allowCopy, icon, children: /* @__PURE__ */ jsx(Pre, { ...props }) });
|
|
20
21
|
}
|
|
21
22
|
export {
|
|
22
23
|
Pre2 as Pre
|
package/dist/mdx.d.mts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FC, AnchorHTMLAttributes, ImgHTMLAttributes, TableHTMLAttributes } from 'react';
|
|
1
|
+
import { FC, HTMLAttributes, AnchorHTMLAttributes, ImgHTMLAttributes, TableHTMLAttributes } from 'react';
|
|
3
2
|
import { Card, Cards } from './components/card.mjs';
|
|
4
3
|
import 'fumadocs-core/link';
|
|
5
4
|
|
|
6
5
|
declare function Image(props: ImgHTMLAttributes<HTMLImageElement>): JSX.Element;
|
|
7
6
|
declare function Table(props: TableHTMLAttributes<HTMLTableElement>): JSX.Element;
|
|
8
7
|
declare const defaultMdxComponents: {
|
|
9
|
-
pre:
|
|
8
|
+
pre: FC<HTMLAttributes<HTMLPreElement>>;
|
|
10
9
|
Card: typeof Card;
|
|
11
10
|
Cards: typeof Cards;
|
|
12
11
|
a: FC<AnchorHTMLAttributes<HTMLAnchorElement>>;
|
package/dist/mdx.js
CHANGED
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
Card,
|
|
7
7
|
Cards
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-REAI3OOF.js";
|
|
9
9
|
import {
|
|
10
10
|
Heading
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-UKE65HV3.js";
|
|
12
|
+
import "./chunk-TK3TM3MR.js";
|
|
13
13
|
import "./chunk-6C3VEZWH.js";
|
|
14
14
|
|
|
15
15
|
// src/mdx.tsx
|