fumadocs-ui 15.6.0 → 15.6.2
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/preset.css +1 -1
- package/dist/components/callout.d.ts.map +1 -1
- package/dist/components/callout.js +11 -8
- package/dist/components/codeblock.js +1 -1
- package/dist/components/type-table.d.ts.map +1 -1
- package/dist/components/type-table.js +2 -4
- package/dist/layouts/docs.d.ts.map +1 -1
- package/dist/layouts/docs.js +1 -1
- package/dist/style.css +3 -3
- package/package.json +3 -3
package/css/preset.css
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
--color-fd-diff-remove: rgba(200, 10, 100, 0.12);
|
|
24
24
|
--color-fd-diff-remove-symbol: rgb(230, 10, 100);
|
|
25
|
-
--color-fd-diff-add: rgba(14, 180, 100, 0.
|
|
25
|
+
--color-fd-diff-add: rgba(14, 180, 100, 0.1);
|
|
26
26
|
--color-fd-diff-add-symbol: rgb(10, 200, 100);
|
|
27
27
|
|
|
28
28
|
--animate-fd-fade-in: fd-fade-in 300ms ease;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callout.d.ts","sourceRoot":"","sources":["../../src/components/callout.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"callout.d.ts","sourceRoot":"","sources":["../../src/components/callout.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAqBxE,eAAO,MAAM,OAAO;YAdV,SAAS;IACjB;;OAEG;WACI,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS;IAExD;;OAEG;WACI,SAAS;kDA0CjB,CAAC"}
|
|
@@ -2,18 +2,21 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { CircleCheck, CircleX, Info, TriangleAlert } from '../icons.js';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import { cn } from '../utils/cn.js';
|
|
5
|
+
const iconClass = 'size-5 -me-0.5 fill-(--callout-color) text-fd-card';
|
|
5
6
|
export const Callout = forwardRef(({ className, children, title, type = 'info', icon, ...props }, ref) => {
|
|
6
7
|
if (type === 'warn')
|
|
7
8
|
type = 'warning';
|
|
8
|
-
|
|
9
|
-
info
|
|
10
|
-
warning: TriangleAlert,
|
|
11
|
-
error: CircleX,
|
|
12
|
-
success: CircleCheck,
|
|
13
|
-
}[type];
|
|
9
|
+
if (type === 'tip')
|
|
10
|
+
type = 'info';
|
|
14
11
|
return (_jsxs("div", { ref: ref, className: cn('flex gap-2 my-4 rounded-xl border bg-fd-card p-3 ps-1 text-sm text-fd-card-foreground shadow-md', className), ...props, style: {
|
|
15
|
-
'--callout-color': `var(--color-fd-${type})`,
|
|
12
|
+
'--callout-color': `var(--color-fd-${type}, var(--color-fd-muted))`,
|
|
16
13
|
...props.style,
|
|
17
|
-
}, children: [_jsx("div", { role: "none", className: "w-
|
|
14
|
+
}, children: [_jsx("div", { role: "none", className: "w-0.5 bg-(--callout-color)/50 rounded-sm" }), icon ??
|
|
15
|
+
{
|
|
16
|
+
info: _jsx(Info, { className: iconClass }),
|
|
17
|
+
warning: _jsx(TriangleAlert, { className: iconClass }),
|
|
18
|
+
error: _jsx(CircleX, { className: iconClass }),
|
|
19
|
+
success: _jsx(CircleCheck, { className: iconClass }),
|
|
20
|
+
}[type], _jsxs("div", { className: "flex flex-col gap-2 min-w-0 flex-1", children: [title && _jsx("p", { className: "font-medium !my-0", children: title }), _jsx("div", { className: "text-fd-muted-foreground prose-no-margin empty:hidden", children: children })] })] }));
|
|
18
21
|
});
|
|
19
22
|
Callout.displayName = 'Callout';
|
|
@@ -61,6 +61,6 @@ export function CodeBlockTabsList(props) {
|
|
|
61
61
|
return (_jsxs(TabsList, { ...props, className: cn('flex flex-row overflow-x-auto px-1 -mx-1 text-fd-muted-foreground', props.className), children: [props.children, !nested && (_jsx(CopyButton, { className: "sticky ms-auto right-0 bg-fd-card backdrop-blur-sm", containerRef: containerRef }))] }));
|
|
62
62
|
}
|
|
63
63
|
export function CodeBlockTabsTrigger({ children, ...props }) {
|
|
64
|
-
return (_jsxs(TabsTrigger, { ...props, className: cn('relative group inline-flex text-sm font-medium items-center gap-2 px-2 first:ms-1 py-1.5 hover:text-fd-accent-foreground data-[state=active]:text-fd-primary [&_svg]:size-3.5', props.className), children: [_jsx("div", { className: "absolute inset-x-2 bottom-0 h-px group-data-[state=active]:bg-fd-primary" }), children] }));
|
|
64
|
+
return (_jsxs(TabsTrigger, { ...props, className: cn('relative group inline-flex text-sm font-medium text-nowrap items-center gap-2 px-2 first:ms-1 py-1.5 hover:text-fd-accent-foreground data-[state=active]:text-fd-primary [&_svg]:size-3.5', props.className), children: [_jsx("div", { className: "absolute inset-x-2 bottom-0 h-px group-data-[state=active]:bg-fd-primary" }), children] }));
|
|
65
65
|
}
|
|
66
66
|
export const CodeBlockTab = (props) => (_jsx(TabsContent, { ...props, asChild: true }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type-table.d.ts","sourceRoot":"","sources":["../../src/components/type-table.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,wBAAgB,IAAI,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,GAAG,SAAS,CAWrE;AAED,UAAU,UAAU;IAClB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAeD,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"type-table.d.ts","sourceRoot":"","sources":["../../src/components/type-table.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,wBAAgB,IAAI,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,GAAG,SAAS,CAWrE;AAED,UAAU,UAAU;IAClB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAeD,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;CAAE,2CAuDvE"}
|
|
@@ -18,9 +18,7 @@ const code = cva('rounded-md bg-fd-secondary p-1 text-fd-secondary-foreground',
|
|
|
18
18
|
},
|
|
19
19
|
});
|
|
20
20
|
export function TypeTable({ type }) {
|
|
21
|
-
return (_jsx("div", { className: "prose my-6 overflow-auto prose-no-margin", children: _jsxs("table", { className: "whitespace-nowrap text-sm text-fd-muted-foreground", children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { className: "w-[45%]", children: "Prop" }), _jsx("th", { className: "w-[30%]", children: "Type" }), _jsx("th", { className: "w-1/4", children: "Default" })] }) }), _jsx("tbody", { children: Object.entries(type)
|
|
22
|
-
.sort((a) => (a[1].deprecated ? 1 : -1))
|
|
23
|
-
.map(([key, value]) => (_jsxs("tr", { children: [_jsx("td", { children: _jsxs("div", { className: field(), children: [_jsxs("code", { className: cn(code({
|
|
21
|
+
return (_jsx("div", { className: "prose my-6 overflow-auto prose-no-margin", children: _jsxs("table", { className: "whitespace-nowrap text-sm text-fd-muted-foreground", children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { className: "w-[45%]", children: "Prop" }), _jsx("th", { className: "w-[30%]", children: "Type" }), _jsx("th", { className: "w-1/4", children: "Default" })] }) }), _jsx("tbody", { children: Object.entries(type).map(([key, value]) => (_jsxs("tr", { children: [_jsx("td", { children: _jsxs("div", { className: field(), children: [_jsxs("code", { className: cn(code({
|
|
24
22
|
color: value.deprecated ? 'deprecated' : 'primary',
|
|
25
|
-
})), children: [key, !value.required && '?'] }), value.description ?
|
|
23
|
+
})), children: [key, !value.required && '?'] }), value.description ? _jsx(Info, { children: value.description }) : null] }) }), _jsx("td", { children: _jsxs("div", { className: field(), children: [_jsx("code", { className: code(), children: value.type }), value.typeDescription ? (_jsx(Info, { children: value.typeDescription })) : null, value.typeDescriptionLink ? (_jsx(Link, { href: value.typeDescriptionLink, children: _jsx(InfoIcon, { className: "size-4" }) })) : null] }) }), _jsx("td", { children: value.default ? (_jsx("code", { className: code(), children: value.default })) : ('-') })] }, key))) })] }) }));
|
|
26
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/layouts/docs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;AAYrE,OAAO,EAAgB,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAElE,OAAO,EAAE,KAAK,eAAe,EAAY,MAAM,UAAU,CAAC;AAK1D,OAAO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AAO,EAGL,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAS/B,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC;IAEpB,OAAO,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG;QAClC,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,SAAS,CAAC,EAAE,SAAS,CAAC;KACvB,CAAC;IAEF;;OAEG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;CACjD;AAED,wBAAgB,UAAU,CAAC,EACzB,GAAG,EAAE,EAAE,eAAe,EAAE,GAAG,GAAG,EAAO,EACrC,OAAO,EAAE,EACP,IAAI,EAAE,WAAW,EACjB,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,cAAqB,EAC9B,WAAW,EAAE,kBAAyB,EACtC,SAAS,EAAE,gBAAgB,EAC3B,UAAU,EAAE,iBAAiB,EAC7B,GAAG,YAAY,EACX,EACN,YAAiB,EACjB,kBAA0B,EAC1B,WAA8C,EAC9C,IAAY,EACZ,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,eAAe,2CAqIjB;AAED,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAE,oBAAoB,EAAE,KAAK,YAAY,EAAE,CAAC"}
|
package/dist/layouts/docs.js
CHANGED
|
@@ -35,6 +35,6 @@ export function DocsLayout({ nav: { transparentMode, ...nav } = {}, sidebar: { t
|
|
|
35
35
|
(themeSwitch.component ?? (_jsx(ThemeToggle, { className: "p-0", mode: themeSwitch.mode })))] }), sidebarFooter] }) })] })] }));
|
|
36
36
|
return (_jsx(TreeContextProvider, { tree: props.tree, children: _jsxs(NavProvider, { transparentMode: transparentMode, children: [nav.enabled !== false &&
|
|
37
37
|
(nav.component ?? (_jsxs(Navbar, { className: "h-14 md:hidden", children: [_jsx(Link, { href: nav.url ?? '/', className: "inline-flex items-center gap-2.5 font-semibold", children: nav.title }), _jsx("div", { className: "flex-1", children: nav.children }), searchToggle?.enabled !== false &&
|
|
38
|
-
(searchToggle.components?.sm ?? (_jsx(SearchToggle, { className: "p-2", hideIfDisabled: true }))), _jsx(NavbarSidebarTrigger, { className: "p-2 -me-1.5 md:hidden" })] }))), _jsxs(LayoutBody, { ...props.containerProps, className: cn(variables, props.containerProps?.className), children: [sidebarEnabled && sidebar, children] })] }) }));
|
|
38
|
+
(searchToggle.components?.sm ?? (_jsx(SearchToggle, { className: "p-2", hideIfDisabled: true }))), sidebarEnabled && (_jsx(NavbarSidebarTrigger, { className: "p-2 -me-1.5 md:hidden" }))] }))), _jsxs(LayoutBody, { ...props.containerProps, className: cn(variables, props.containerProps?.className), children: [sidebarEnabled && sidebar, children] })] }) }));
|
|
39
39
|
}
|
|
40
40
|
export { CollapsibleControl, Navbar, NavbarSidebarTrigger };
|
package/dist/style.css
CHANGED
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
--fd-tocnav-height: 0px;
|
|
66
66
|
--color-fd-diff-remove: rgba(200, 10, 100, 0.12);
|
|
67
67
|
--color-fd-diff-remove-symbol: rgb(230, 10, 100);
|
|
68
|
-
--color-fd-diff-add: rgba(14, 180, 100, 0.
|
|
68
|
+
--color-fd-diff-add: rgba(14, 180, 100, 0.1);
|
|
69
69
|
--color-fd-diff-add-symbol: rgb(10, 200, 100);
|
|
70
70
|
--animate-fd-fade-in: fd-fade-in 300ms ease;
|
|
71
71
|
--animate-fd-fade-out: fd-fade-out 300ms ease;
|
|
@@ -1026,8 +1026,8 @@
|
|
|
1026
1026
|
.w-0 {
|
|
1027
1027
|
width: calc(var(--spacing) * 0);
|
|
1028
1028
|
}
|
|
1029
|
-
.w-
|
|
1030
|
-
width: calc(var(--spacing) *
|
|
1029
|
+
.w-0\.5 {
|
|
1030
|
+
width: calc(var(--spacing) * 0.5);
|
|
1031
1031
|
}
|
|
1032
1032
|
.w-1\.5 {
|
|
1033
1033
|
width: calc(var(--spacing) * 1.5);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-ui",
|
|
3
|
-
"version": "15.6.
|
|
3
|
+
"version": "15.6.2",
|
|
4
4
|
"description": "The framework for building a documentation website in Next.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NextJs",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"react-medium-image-zoom": "^5.2.14",
|
|
90
90
|
"scroll-into-view-if-needed": "^3.1.0",
|
|
91
91
|
"tailwind-merge": "^3.3.1",
|
|
92
|
-
"fumadocs-core": "15.6.
|
|
92
|
+
"fumadocs-core": "15.6.2"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
95
|
"@next/eslint-plugin-next": "^15.3.4",
|
|
@@ -101,8 +101,8 @@
|
|
|
101
101
|
"tailwindcss": "^4.1.11",
|
|
102
102
|
"tsc-alias": "^1.8.16",
|
|
103
103
|
"@fumadocs/cli": "0.2.1",
|
|
104
|
+
"fumadocs-core": "15.6.2",
|
|
104
105
|
"eslint-config-custom": "0.0.0",
|
|
105
|
-
"fumadocs-core": "15.6.0",
|
|
106
106
|
"tsconfig": "0.0.0"
|
|
107
107
|
},
|
|
108
108
|
"peerDependencies": {
|