fumadocs-ui 11.1.2 → 11.2.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-RPQDC26K.js → chunk-E2VA3Y4S.js} +4 -4
- package/dist/{chunk-XP3DGFDZ.js → chunk-HUXFUKD2.js} +1 -1
- package/dist/chunk-PW7TBOIJ.js +21 -0
- package/dist/components/accordion.js +3 -3
- package/dist/components/callout.d.ts +1 -1
- package/dist/components/callout.js +4 -4
- package/dist/components/codeblock.js +1 -1
- package/dist/components/dialog/search-algolia.js +2 -2
- package/dist/components/dialog/search-default.js +2 -2
- package/dist/components/dialog/search.js +2 -2
- package/dist/components/files.js +2 -2
- package/dist/components/roll-button.js +2 -2
- package/dist/{i18n-dw7ODAws.d.ts → i18n-p5QWhj_3.d.ts} +2 -0
- package/dist/i18n.d.ts +2 -2
- package/dist/i18n.js +2 -3
- package/dist/{layout-2R7eRkWi.d.ts → layout-vxXAvjoq.d.ts} +9 -9
- package/dist/layout.client.d.ts +6 -1
- package/dist/layout.client.js +168 -93
- package/dist/layout.d.ts +1 -1
- package/dist/layout.js +12 -4
- package/dist/mdx.client.js +1 -1
- package/dist/page.client.js +21 -30
- package/dist/page.js +1 -1
- package/dist/provider.d.ts +1 -1
- package/dist/provider.js +1 -1
- package/dist/style.css +1 -1
- package/dist/tailwind-plugin.cjs +25 -20
- package/dist/tailwind-plugin.js +25 -20
- package/package.json +2 -2
- package/dist/chunk-YAHHY62W.js +0 -20
|
@@ -14,12 +14,12 @@ import {
|
|
|
14
14
|
} from "./chunk-TK3TM3MR.js";
|
|
15
15
|
|
|
16
16
|
// src/components/codeblock.tsx
|
|
17
|
-
import {
|
|
17
|
+
import { Check, Copy } from "lucide-react";
|
|
18
18
|
import { forwardRef, useCallback, useRef } from "react";
|
|
19
19
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
20
20
|
var Pre = forwardRef(
|
|
21
21
|
({ className, ...props }, ref) => {
|
|
22
|
-
return /* @__PURE__ */ jsx("pre", { ref, className: twMerge("nd-codeblock
|
|
22
|
+
return /* @__PURE__ */ jsx("pre", { ref, className: twMerge("nd-codeblock p-4", className), ...props, children: props.children });
|
|
23
23
|
}
|
|
24
24
|
);
|
|
25
25
|
Pre.displayName = "Pre";
|
|
@@ -90,13 +90,13 @@ function CopyButton({
|
|
|
90
90
|
...props,
|
|
91
91
|
children: [
|
|
92
92
|
/* @__PURE__ */ jsx(
|
|
93
|
-
|
|
93
|
+
Check,
|
|
94
94
|
{
|
|
95
95
|
className: twMerge("size-3.5 transition-transform", !checked && "scale-0")
|
|
96
96
|
}
|
|
97
97
|
),
|
|
98
98
|
/* @__PURE__ */ jsx(
|
|
99
|
-
|
|
99
|
+
Copy,
|
|
100
100
|
{
|
|
101
101
|
className: twMerge(
|
|
102
102
|
"absolute size-3.5 transition-transform",
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// src/contexts/i18n.tsx
|
|
2
|
+
import { createContext, useContext } from "react";
|
|
3
|
+
var I18nContext = createContext({
|
|
4
|
+
text: {
|
|
5
|
+
search: "Search",
|
|
6
|
+
searchNoResult: "No results found",
|
|
7
|
+
toc: "On this page",
|
|
8
|
+
lastUpdate: "Last updated on",
|
|
9
|
+
chooseLanguage: "Choose a language",
|
|
10
|
+
nextPage: "Next",
|
|
11
|
+
previousPage: "Previous"
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
function useI18n() {
|
|
15
|
+
return useContext(I18nContext);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
I18nContext,
|
|
20
|
+
useI18n
|
|
21
|
+
};
|
|
@@ -12,7 +12,7 @@ import "../chunk-6C3VEZWH.js";
|
|
|
12
12
|
|
|
13
13
|
// src/components/accordion.tsx
|
|
14
14
|
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
15
|
-
import {
|
|
15
|
+
import { Check, ChevronRight, LinkIcon } from "lucide-react";
|
|
16
16
|
import {
|
|
17
17
|
forwardRef,
|
|
18
18
|
useState,
|
|
@@ -66,7 +66,7 @@ var Accordion = forwardRef(({ title, className, id, children, ...props }, ref) =
|
|
|
66
66
|
className: "not-prose flex flex-row items-center font-medium text-foreground",
|
|
67
67
|
children: [
|
|
68
68
|
/* @__PURE__ */ jsxs(AccordionPrimitive.Trigger, { className: "flex flex-1 items-center gap-2 p-4 text-start focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", children: [
|
|
69
|
-
/* @__PURE__ */ jsx(
|
|
69
|
+
/* @__PURE__ */ jsx(ChevronRight, { className: "size-4 text-muted-foreground transition-transform duration-200 group-data-[state=open]/accordion:rotate-90" }),
|
|
70
70
|
title
|
|
71
71
|
] }),
|
|
72
72
|
id ? /* @__PURE__ */ jsx(CopyButton, { id }) : null
|
|
@@ -96,7 +96,7 @@ function CopyButton({ id }) {
|
|
|
96
96
|
})
|
|
97
97
|
),
|
|
98
98
|
onClick,
|
|
99
|
-
children: checked ? /* @__PURE__ */ jsx(
|
|
99
|
+
children: checked ? /* @__PURE__ */ jsx(Check, { className: "size-3.5" }) : /* @__PURE__ */ jsx(LinkIcon, { className: "size-3.5" })
|
|
100
100
|
}
|
|
101
101
|
);
|
|
102
102
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
3
|
|
|
4
|
-
declare const Callout: React.ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "title" | "
|
|
4
|
+
declare const Callout: React.ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "title" | "type" | "icon"> & {
|
|
5
5
|
title?: ReactNode;
|
|
6
6
|
/**
|
|
7
7
|
* @defaultValue info
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import "../chunk-6C3VEZWH.js";
|
|
5
5
|
|
|
6
6
|
// src/components/callout.tsx
|
|
7
|
-
import {
|
|
7
|
+
import { AlertOctagon, AlertTriangle, Info } from "lucide-react";
|
|
8
8
|
import { forwardRef } from "react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
var Callout = forwardRef(
|
|
@@ -20,9 +20,9 @@ var Callout = forwardRef(
|
|
|
20
20
|
...props,
|
|
21
21
|
children: [
|
|
22
22
|
icon ?? {
|
|
23
|
-
info: /* @__PURE__ */ jsx(
|
|
24
|
-
warn: /* @__PURE__ */ jsx(
|
|
25
|
-
error: /* @__PURE__ */ jsx(
|
|
23
|
+
info: /* @__PURE__ */ jsx(Info, { className: "size-5 fill-blue-500 text-card" }),
|
|
24
|
+
warn: /* @__PURE__ */ jsx(AlertTriangle, { className: "size-5 fill-orange-500 text-card" }),
|
|
25
|
+
error: /* @__PURE__ */ jsx(AlertOctagon, { className: "size-5 fill-red-500 text-card" })
|
|
26
26
|
}[type],
|
|
27
27
|
/* @__PURE__ */ jsxs("div", { className: "w-0 flex-1", children: [
|
|
28
28
|
title ? /* @__PURE__ */ jsx("div", { className: "mb-2 font-medium text-card-foreground", children: title }) : null,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
SearchDialog
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-HUXFUKD2.js";
|
|
5
5
|
import "../../chunk-2KA2UOM3.js";
|
|
6
|
-
import "../../chunk-
|
|
6
|
+
import "../../chunk-PW7TBOIJ.js";
|
|
7
7
|
import "../../chunk-7GZKFBAP.js";
|
|
8
8
|
import "../../chunk-TK3TM3MR.js";
|
|
9
9
|
import "../../chunk-6C3VEZWH.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
SearchDialog
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-HUXFUKD2.js";
|
|
5
5
|
import "../../chunk-2KA2UOM3.js";
|
|
6
6
|
import {
|
|
7
7
|
useI18n
|
|
8
|
-
} from "../../chunk-
|
|
8
|
+
} from "../../chunk-PW7TBOIJ.js";
|
|
9
9
|
import "../../chunk-7GZKFBAP.js";
|
|
10
10
|
import "../../chunk-TK3TM3MR.js";
|
|
11
11
|
import "../../chunk-6C3VEZWH.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SearchDialog
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-HUXFUKD2.js";
|
|
4
4
|
import "../../chunk-2KA2UOM3.js";
|
|
5
|
-
import "../../chunk-
|
|
5
|
+
import "../../chunk-PW7TBOIJ.js";
|
|
6
6
|
import "../../chunk-7GZKFBAP.js";
|
|
7
7
|
import "../../chunk-TK3TM3MR.js";
|
|
8
8
|
import "../../chunk-6C3VEZWH.js";
|
package/dist/components/files.js
CHANGED
|
@@ -11,7 +11,7 @@ import "../chunk-6C3VEZWH.js";
|
|
|
11
11
|
|
|
12
12
|
// src/components/files.tsx
|
|
13
13
|
import { cva } from "class-variance-authority";
|
|
14
|
-
import { FileIcon, FolderIcon,
|
|
14
|
+
import { FileIcon, FolderIcon, FolderOpen } from "lucide-react";
|
|
15
15
|
import { useState } from "react";
|
|
16
16
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
17
|
var item = cva(
|
|
@@ -49,7 +49,7 @@ function Folder({
|
|
|
49
49
|
const [open, setOpen] = useState(defaultOpen);
|
|
50
50
|
return /* @__PURE__ */ jsxs(Collapsible, { open, onOpenChange: setOpen, ...props, children: [
|
|
51
51
|
/* @__PURE__ */ jsxs(CollapsibleTrigger, { className: twMerge(item({ className: "w-full" })), children: [
|
|
52
|
-
open ? /* @__PURE__ */ jsx(
|
|
52
|
+
open ? /* @__PURE__ */ jsx(FolderOpen, {}) : /* @__PURE__ */ jsx(FolderIcon, {}),
|
|
53
53
|
name
|
|
54
54
|
] }),
|
|
55
55
|
/* @__PURE__ */ jsx(CollapsibleContent, { children: /* @__PURE__ */ jsx("div", { className: "ml-2 flex flex-col border-l pl-2", children: props.children }) })
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import "../chunk-6C3VEZWH.js";
|
|
9
9
|
|
|
10
10
|
// src/components/roll-button.tsx
|
|
11
|
-
import {
|
|
11
|
+
import { ChevronUp } from "lucide-react";
|
|
12
12
|
import { useEffect, useState } from "react";
|
|
13
13
|
import { jsx } from "react/jsx-runtime";
|
|
14
14
|
function RollButton({
|
|
@@ -47,7 +47,7 @@ function RollButton({
|
|
|
47
47
|
behavior: "smooth"
|
|
48
48
|
});
|
|
49
49
|
},
|
|
50
|
-
children: /* @__PURE__ */ jsx(
|
|
50
|
+
children: /* @__PURE__ */ jsx(ChevronUp, {})
|
|
51
51
|
}
|
|
52
52
|
);
|
|
53
53
|
}
|
package/dist/i18n.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SelectProps } from '@radix-ui/react-select';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { N as NamedTranslation } from './i18n-
|
|
4
|
-
export { T as Translations } from './i18n-
|
|
3
|
+
import { N as NamedTranslation } from './i18n-p5QWhj_3.js';
|
|
4
|
+
export { T as Translations } from './i18n-p5QWhj_3.js';
|
|
5
5
|
|
|
6
6
|
type LanguageSelectProps = Omit<SelectProps, 'value' | 'onValueChange'>;
|
|
7
7
|
declare function LanguageSelect({ ...props }: LanguageSelectProps): React.ReactElement;
|
package/dist/i18n.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
I18nContext,
|
|
4
4
|
useI18n
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PW7TBOIJ.js";
|
|
6
6
|
import {
|
|
7
7
|
twMerge
|
|
8
8
|
} from "./chunk-TK3TM3MR.js";
|
|
@@ -24,7 +24,7 @@ var SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
24
24
|
{
|
|
25
25
|
ref,
|
|
26
26
|
className: twMerge(
|
|
27
|
-
"flex h-10 w-full items-center justify-between rounded-
|
|
27
|
+
"flex h-10 w-full items-center justify-between rounded-lg border px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[placeholder]:text-muted-foreground",
|
|
28
28
|
className
|
|
29
29
|
),
|
|
30
30
|
...props,
|
|
@@ -41,7 +41,6 @@ var SelectContent = React.forwardRef(({ className, children, position = "popper"
|
|
|
41
41
|
ref,
|
|
42
42
|
className: twMerge(
|
|
43
43
|
"relative z-50 min-w-32 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
|
-
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
44
|
className
|
|
46
45
|
),
|
|
47
46
|
position,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { PageTree } from 'fumadocs-core/server';
|
|
2
|
-
import * as React$1 from 'react';
|
|
3
2
|
import { ReactNode, HTMLAttributes } from 'react';
|
|
4
3
|
|
|
5
4
|
interface NavProps {
|
|
@@ -35,24 +34,25 @@ interface SidebarProps {
|
|
|
35
34
|
* @defaultValue 1
|
|
36
35
|
*/
|
|
37
36
|
defaultOpenLevel?: number;
|
|
38
|
-
collapsible?: boolean;
|
|
39
37
|
components?: Partial<Components>;
|
|
40
|
-
banner?: React
|
|
41
|
-
footer?: React
|
|
38
|
+
banner?: React.ReactNode;
|
|
39
|
+
footer?: React.ReactNode;
|
|
42
40
|
}
|
|
43
41
|
interface Components {
|
|
44
|
-
Item: React
|
|
42
|
+
Item: React.FC<{
|
|
45
43
|
item: PageTree.Item;
|
|
46
44
|
}>;
|
|
47
|
-
Folder: React
|
|
45
|
+
Folder: React.FC<{
|
|
48
46
|
item: PageTree.Folder;
|
|
49
47
|
level: number;
|
|
50
48
|
}>;
|
|
51
|
-
Separator: React
|
|
49
|
+
Separator: React.FC<{
|
|
52
50
|
item: PageTree.Separator;
|
|
53
51
|
}>;
|
|
54
52
|
}
|
|
55
|
-
declare function Sidebar({ footer, components, defaultOpenLevel,
|
|
53
|
+
declare function Sidebar({ footer, components, defaultOpenLevel, banner, items, ...props }: SidebarProps & {
|
|
54
|
+
className?: string;
|
|
55
|
+
}): React.ReactElement;
|
|
56
56
|
|
|
57
57
|
type ActiveType = 'none' | 'url' | 'nested-url';
|
|
58
58
|
type LinkItemType = {
|
|
@@ -114,4 +114,4 @@ interface DocsLayoutProps extends BaseLayoutProps {
|
|
|
114
114
|
declare function Layout({ nav, links, children, }: BaseLayoutProps): React.ReactElement;
|
|
115
115
|
declare function DocsLayout({ nav, sidebar, links, containerProps, tree, children, }: DocsLayoutProps): React.ReactElement;
|
|
116
116
|
|
|
117
|
-
export { type BaseLayoutProps as B, type DocsLayoutProps as D, type LinkItemType as L, Nav as N,
|
|
117
|
+
export { type BaseLayoutProps as B, type DocsLayoutProps as D, type LinkItemType as L, Nav as N, type SidebarProps as S, Sidebar as a, Layout as b, DocsLayout as c };
|
package/dist/layout.client.d.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
export { T as TreeContextProvider } from './tree-cqNEopxM.js';
|
|
2
|
-
|
|
2
|
+
import { S as SidebarProps } from './layout-vxXAvjoq.js';
|
|
3
|
+
export { N as Nav, a as Sidebar } from './layout-vxXAvjoq.js';
|
|
3
4
|
import 'fumadocs-core/server';
|
|
4
5
|
import 'react';
|
|
6
|
+
|
|
7
|
+
declare function DynamicSidebar(props: SidebarProps): React.ReactElement;
|
|
8
|
+
|
|
9
|
+
export { DynamicSidebar };
|