fumadocs-ui 15.6.3 → 15.6.5
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/search.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,cAAc,EAGnB,KAAK,SAAS,EAOf,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/search.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,cAAc,EAGnB,KAAK,SAAS,EAOf,MAAM,OAAO,CAAC;AAGf,OAAO,EAEL,aAAa,EACb,aAAa,EAEd,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAIzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAKrD,KAAK,iBAAiB,GAAG,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,GAAG;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,SAAS,CAAC;CACpB,CAAC;AAGF,YAAY,EAAE,WAAW,EAAE,CAAC;AAE5B,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACpD,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAsBD,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,YAAY,EACZ,MAAM,EACN,cAAc,EACd,SAAiB,EACjB,QAAQ,GACT,EAAE,iBAAiB,2CAuBnB;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,2CAO9D;AAED,wBAAgB,iBAAiB,C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AM,GAAG,SAAS,KAAK,IAAI,CAAC;IAC/C,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAaD,wBAAgB,QAAQ,CAAC,EACvB,GAAG,EACH,WAAW,EACX,UAAkB,EAClB,GAAG,KAAK,EACT,EAAE,aAAa,2CAoBf;AAED,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,QAAQ,CAAC,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;CACf,2CAkBA;AAED,wBAAgB,SAAS;UA/ZjB,OAAO;kBACC,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI;YAC7B,MAAM;oBACE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;eAExB,OAAO;EA8ZnB;AAED,wBAAgB,WAAW;YAvZjB,MAAM;mBACC,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI;gBACtC,OAAO;EAyZpB;AAED,wBAAgB,aAAa;YAlanB,MAAM,GAAG,IAAI;eACV,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI;EAqatC"}
|
|
@@ -4,13 +4,13 @@ import { FileText, Hash, Search as SearchIcon } from '../../icons.js';
|
|
|
4
4
|
import { createContext, Fragment, useCallback, useContext, useEffect, useMemo, useRef, useState, } from 'react';
|
|
5
5
|
import { I18nLabel, useI18n } from '../../contexts/i18n.js';
|
|
6
6
|
import { cn } from '../../utils/cn.js';
|
|
7
|
-
import { buttonVariants } from '../../components/ui/button.js';
|
|
8
7
|
import { Dialog, DialogContent, DialogOverlay, DialogTitle, } from '@radix-ui/react-dialog';
|
|
9
8
|
import { cva } from 'class-variance-authority';
|
|
10
9
|
import { useEffectEvent } from 'fumadocs-core/utils/use-effect-event';
|
|
11
10
|
import { useRouter } from 'fumadocs-core/framework';
|
|
12
11
|
import { useOnChange } from 'fumadocs-core/utils/use-on-change';
|
|
13
12
|
import scrollIntoView from 'scroll-into-view-if-needed';
|
|
13
|
+
import { buttonVariants } from '../../components/ui/button.js';
|
|
14
14
|
const Context = createContext(null);
|
|
15
15
|
const ListContext = createContext(null);
|
|
16
16
|
const TagsListContext = createContext(null);
|
|
@@ -27,7 +27,7 @@ export function SearchDialog({ open, onOpenChange, search, onSearchChange, isLoa
|
|
|
27
27
|
}), [active, isLoading, onOpenChange, onSearchChange, open, search]), children: children }) }));
|
|
28
28
|
}
|
|
29
29
|
export function SearchDialogHeader(props) {
|
|
30
|
-
return (_jsx("div", { ...props, className: cn('flex flex-row items-center gap-2 p-3
|
|
30
|
+
return (_jsx("div", { ...props, className: cn('flex flex-row items-center gap-2 p-3', props.className) }));
|
|
31
31
|
}
|
|
32
32
|
export function SearchDialogInput(props) {
|
|
33
33
|
const { text } = useI18n();
|
|
@@ -50,7 +50,7 @@ export function SearchDialogOverlay(props) {
|
|
|
50
50
|
}
|
|
51
51
|
export function SearchDialogContent({ children, ...props }) {
|
|
52
52
|
const { text } = useI18n();
|
|
53
|
-
return (_jsxs(DialogContent, { "aria-describedby": undefined, ...props, className: cn('fixed
|
|
53
|
+
return (_jsxs(DialogContent, { "aria-describedby": undefined, ...props, className: cn('fixed left-1/2 top-4 md:top-[calc(50%-250px)] z-50 w-[calc(100%-2*var(--spacing))] max-w-screen-sm -translate-x-1/2 rounded-2xl border bg-fd-popover/60 backdrop-blur-xl text-fd-popover-foreground shadow-2xl shadow-black/40 overflow-hidden data-[state=closed]:animate-fd-dialog-out data-[state=open]:animate-fd-dialog-in', '*:border-b *:has-[+:last-child[data-empty=true]]:border-b-0 *:data-[empty=true]:border-b-0 *:last:border-b-0', props.className), children: [_jsx(DialogTitle, { className: "hidden", children: text.search }), children] }));
|
|
54
54
|
}
|
|
55
55
|
export function SearchDialogList({ items = null, Empty = () => (_jsx("div", { className: "py-12 text-center text-sm text-fd-muted-foreground", children: _jsx(I18nLabel, { label: "searchNoResult" }) })), Item = (props) => _jsx(SearchDialogListItem, { ...props }), ...props }) {
|
|
56
56
|
const ref = useRef(null);
|
|
@@ -107,7 +107,7 @@ export function SearchDialogList({ items = null, Empty = () => (_jsx("div", { cl
|
|
|
107
107
|
setActive(items[0].id);
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
|
-
return (_jsx("div", { ...props, ref: ref, className: cn('overflow-hidden h-(--fd-animated-height) transition-[height]',
|
|
110
|
+
return (_jsx("div", { ...props, ref: ref, "data-empty": items === null, className: cn('overflow-hidden h-(--fd-animated-height) transition-[height]', props.className), children: _jsx("div", { className: cn('w-full flex flex-col overflow-y-auto max-h-[460px] p-1', !items && 'hidden'), children: _jsxs(ListContext.Provider, { value: useMemo(() => ({
|
|
111
111
|
active,
|
|
112
112
|
setActive,
|
|
113
113
|
}), [active]), children: [items?.length === 0 && Empty(), items?.map((item) => (_jsx(Fragment, { children: Item({ item, onClick: () => onOpen(item) }) }, item.id)))] }) }) }));
|
|
@@ -71,7 +71,7 @@ function TOCItem({ item, upper = item.depth, lower = item.depth, }) {
|
|
|
71
71
|
const offset = getLineOffset(item.depth), upperOffset = getLineOffset(upper), lowerOffset = getLineOffset(lower);
|
|
72
72
|
return (_jsxs(Primitive.TOCItem, { href: item.url, style: {
|
|
73
73
|
paddingInlineStart: getItemOffset(item.depth),
|
|
74
|
-
}, className: "prose relative py-1.5 text-sm text-fd-muted-foreground transition-colors [overflow-wrap:anywhere] first:pt-0 last:pb-0 data-[active=true]:text-fd-primary", children: [offset !== upperOffset ? (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16", className: "absolute -top-1.5 start-0 size-4 rtl:-scale-x-100", children: _jsx("line", { x1: upperOffset, y1: "0", x2: offset, y2: "12", className: "stroke-fd-foreground/10", strokeWidth: "1" }) })) : null, _jsx("div", { className: cn('absolute inset-y-0 w-px bg-fd-foreground/10', offset !== upperOffset && 'top-1.5', offset !== lowerOffset && 'bottom-1.5'), style: {
|
|
74
|
+
}, className: "prose relative py-1.5 text-sm text-fd-muted-foreground hover:text-fd-accent-foreground transition-colors [overflow-wrap:anywhere] first:pt-0 last:pb-0 data-[active=true]:text-fd-primary", children: [offset !== upperOffset ? (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16", className: "absolute -top-1.5 start-0 size-4 rtl:-scale-x-100", children: _jsx("line", { x1: upperOffset, y1: "0", x2: offset, y2: "12", className: "stroke-fd-foreground/10", strokeWidth: "1" }) })) : null, _jsx("div", { className: cn('absolute inset-y-0 w-px bg-fd-foreground/10', offset !== upperOffset && 'top-1.5', offset !== lowerOffset && 'bottom-1.5'), style: {
|
|
75
75
|
insetInlineStart: offset,
|
|
76
76
|
} }), item.title] }));
|
|
77
77
|
}
|
package/dist/style.css
CHANGED
|
@@ -1303,10 +1303,6 @@
|
|
|
1303
1303
|
border-bottom-style: var(--tw-border-style);
|
|
1304
1304
|
border-bottom-width: 1px;
|
|
1305
1305
|
}
|
|
1306
|
-
.border-b-0 {
|
|
1307
|
-
border-bottom-style: var(--tw-border-style);
|
|
1308
|
-
border-bottom-width: 0px;
|
|
1309
|
-
}
|
|
1310
1306
|
.border-l {
|
|
1311
1307
|
border-left-style: var(--tw-border-style);
|
|
1312
1308
|
border-left-width: 1px;
|
|
@@ -1794,6 +1790,12 @@
|
|
|
1794
1790
|
flex-direction: column;
|
|
1795
1791
|
}
|
|
1796
1792
|
}
|
|
1793
|
+
.\*\:border-b {
|
|
1794
|
+
:is(& > *) {
|
|
1795
|
+
border-bottom-style: var(--tw-border-style);
|
|
1796
|
+
border-bottom-width: 1px;
|
|
1797
|
+
}
|
|
1798
|
+
}
|
|
1797
1799
|
.group-data-\[state\=active\]\:bg-fd-primary {
|
|
1798
1800
|
&:is(:where(.group)[data-state="active"] *) {
|
|
1799
1801
|
background-color: var(--color-fd-primary);
|
|
@@ -1841,6 +1843,14 @@
|
|
|
1841
1843
|
padding-bottom: calc(var(--spacing) * 0);
|
|
1842
1844
|
}
|
|
1843
1845
|
}
|
|
1846
|
+
.\*\:last\:border-b-0 {
|
|
1847
|
+
:is(& > *) {
|
|
1848
|
+
&:last-child {
|
|
1849
|
+
border-bottom-style: var(--tw-border-style);
|
|
1850
|
+
border-bottom-width: 0px;
|
|
1851
|
+
}
|
|
1852
|
+
}
|
|
1853
|
+
}
|
|
1844
1854
|
.empty\:mb-0 {
|
|
1845
1855
|
&:empty {
|
|
1846
1856
|
margin-bottom: calc(var(--spacing) * 0);
|
|
@@ -1950,6 +1960,14 @@
|
|
|
1950
1960
|
background-color: var(--color-fd-accent);
|
|
1951
1961
|
}
|
|
1952
1962
|
}
|
|
1963
|
+
.\*\:has-\[\+\:last-child\[data-empty\=true\]\]\:border-b-0 {
|
|
1964
|
+
:is(& > *) {
|
|
1965
|
+
&:has(+:last-child[data-empty=true]) {
|
|
1966
|
+
border-bottom-style: var(--tw-border-style);
|
|
1967
|
+
border-bottom-width: 0px;
|
|
1968
|
+
}
|
|
1969
|
+
}
|
|
1970
|
+
}
|
|
1953
1971
|
.data-\[active\=true\]\:font-medium {
|
|
1954
1972
|
&[data-active="true"] {
|
|
1955
1973
|
--tw-font-weight: var(--font-weight-medium);
|
|
@@ -1971,6 +1989,14 @@
|
|
|
1971
1989
|
display: none;
|
|
1972
1990
|
}
|
|
1973
1991
|
}
|
|
1992
|
+
.\*\:data-\[empty\=true\]\:border-b-0 {
|
|
1993
|
+
:is(& > *) {
|
|
1994
|
+
&[data-empty="true"] {
|
|
1995
|
+
border-bottom-style: var(--tw-border-style);
|
|
1996
|
+
border-bottom-width: 0px;
|
|
1997
|
+
}
|
|
1998
|
+
}
|
|
1999
|
+
}
|
|
1974
2000
|
.data-\[motion\=from-end\]\:animate-fd-enterFromRight {
|
|
1975
2001
|
&[data-motion="from-end"] {
|
|
1976
2002
|
animation: var(--animate-fd-enterFromRight);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-ui",
|
|
3
|
-
"version": "15.6.
|
|
3
|
+
"version": "15.6.5",
|
|
4
4
|
"description": "The framework for building a documentation website in Next.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NextJs",
|
|
@@ -86,23 +86,23 @@
|
|
|
86
86
|
"lodash.merge": "^4.6.2",
|
|
87
87
|
"next-themes": "^0.4.6",
|
|
88
88
|
"postcss-selector-parser": "^7.1.0",
|
|
89
|
-
"react-medium-image-zoom": "^5.
|
|
89
|
+
"react-medium-image-zoom": "^5.3.0",
|
|
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.5"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
|
-
"@next/eslint-plugin-next": "^15.
|
|
95
|
+
"@next/eslint-plugin-next": "^15.4.2",
|
|
96
96
|
"@tailwindcss/cli": "^4.1.11",
|
|
97
97
|
"@types/lodash.merge": "^4.6.9",
|
|
98
98
|
"@types/react": "^19.1.8",
|
|
99
99
|
"@types/react-dom": "^19.1.6",
|
|
100
|
-
"next": "15.
|
|
100
|
+
"next": "15.4.2",
|
|
101
101
|
"tailwindcss": "^4.1.11",
|
|
102
102
|
"tsc-alias": "^1.8.16",
|
|
103
103
|
"@fumadocs/cli": "0.2.1",
|
|
104
104
|
"eslint-config-custom": "0.0.0",
|
|
105
|
-
"fumadocs-core": "15.6.
|
|
105
|
+
"fumadocs-core": "15.6.5",
|
|
106
106
|
"tsconfig": "0.0.0"
|
|
107
107
|
},
|
|
108
108
|
"peerDependencies": {
|