fumadocs-core 15.2.1 → 15.2.3
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/sidebar.d.ts +11 -1
- package/dist/sidebar.js +4 -5
- package/package.json +7 -7
package/dist/sidebar.d.ts
CHANGED
|
@@ -15,9 +15,19 @@ declare function SidebarTrigger<T extends ElementType = 'button'>({ as, ...props
|
|
|
15
15
|
type SidebarContentProps<T extends ElementType> = AsProps<T> & {
|
|
16
16
|
/**
|
|
17
17
|
* Disable scroll blocking when the viewport width is larger than a certain number (in pixels)
|
|
18
|
+
*
|
|
19
|
+
* @deprecated use `removeScrollOn`
|
|
18
20
|
*/
|
|
19
21
|
blockScrollingWidth?: number;
|
|
22
|
+
/**
|
|
23
|
+
* A media query.
|
|
24
|
+
*
|
|
25
|
+
* When the sidebar is opening and media query is matched, scrolling outside the sidebar will be blocked.
|
|
26
|
+
*
|
|
27
|
+
* @example (min-width: 1000px)
|
|
28
|
+
*/
|
|
29
|
+
removeScrollOn?: string;
|
|
20
30
|
};
|
|
21
|
-
declare function SidebarList<T extends ElementType = 'aside'>({ as, blockScrollingWidth, ...props }: SidebarContentProps<T>): ReactElement;
|
|
31
|
+
declare function SidebarList<T extends ElementType = 'aside'>({ as, blockScrollingWidth, removeScrollOn, ...props }: SidebarContentProps<T>): ReactElement;
|
|
22
32
|
|
|
23
33
|
export { type SidebarContentProps, SidebarList, SidebarProvider, type SidebarProviderProps, SidebarTrigger, type SidebarTriggerProps };
|
package/dist/sidebar.js
CHANGED
|
@@ -54,15 +54,14 @@ function SidebarTrigger({
|
|
|
54
54
|
function SidebarList({
|
|
55
55
|
as,
|
|
56
56
|
blockScrollingWidth,
|
|
57
|
+
removeScrollOn = blockScrollingWidth ? `(min-width: ${blockScrollingWidth}px)` : void 0,
|
|
57
58
|
...props
|
|
58
59
|
}) {
|
|
59
60
|
const { open } = useSidebarContext();
|
|
60
61
|
const [isBlocking, setIsBlocking] = useState(false);
|
|
61
62
|
useEffect(() => {
|
|
62
|
-
if (!
|
|
63
|
-
const mediaQueryList = window.matchMedia(
|
|
64
|
-
`(min-width: ${blockScrollingWidth.toString()}px)`
|
|
65
|
-
);
|
|
63
|
+
if (!removeScrollOn) return;
|
|
64
|
+
const mediaQueryList = window.matchMedia(removeScrollOn);
|
|
66
65
|
const handleChange = () => {
|
|
67
66
|
setIsBlocking(!mediaQueryList.matches);
|
|
68
67
|
};
|
|
@@ -71,7 +70,7 @@ function SidebarList({
|
|
|
71
70
|
return () => {
|
|
72
71
|
mediaQueryList.removeEventListener("change", handleChange);
|
|
73
72
|
};
|
|
74
|
-
}, [
|
|
73
|
+
}, [removeScrollOn]);
|
|
75
74
|
return /* @__PURE__ */ jsx(
|
|
76
75
|
RemoveScroll,
|
|
77
76
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-core",
|
|
3
|
-
"version": "15.2.
|
|
3
|
+
"version": "15.2.3",
|
|
4
4
|
"description": "The library for building a documentation website in Next.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NextJs",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"github-slugger": "^2.0.0",
|
|
85
85
|
"hast-util-to-estree": "^3.1.3",
|
|
86
86
|
"hast-util-to-jsx-runtime": "^2.3.6",
|
|
87
|
-
"image-size": "^2.0.
|
|
87
|
+
"image-size": "^2.0.2",
|
|
88
88
|
"negotiator": "^1.0.0",
|
|
89
89
|
"react-remove-scroll": "^2.6.3",
|
|
90
90
|
"remark": "^15.0.0",
|
|
@@ -97,21 +97,21 @@
|
|
|
97
97
|
"@algolia/client-search": "4.24.0",
|
|
98
98
|
"@mdx-js/mdx": "^3.1.0",
|
|
99
99
|
"@oramacloud/client": "^2.1.4",
|
|
100
|
-
"@tanstack/react-router": "^1.114.
|
|
100
|
+
"@tanstack/react-router": "^1.114.34",
|
|
101
101
|
"@types/estree-jsx": "^1.0.5",
|
|
102
102
|
"@types/hast": "^3.0.4",
|
|
103
103
|
"@types/mdast": "^4.0.3",
|
|
104
104
|
"@types/negotiator": "^0.6.3",
|
|
105
|
-
"@types/node": "22.
|
|
106
|
-
"@types/react": "^19.0
|
|
107
|
-
"@types/react-dom": "^19.
|
|
105
|
+
"@types/node": "22.14.0",
|
|
106
|
+
"@types/react": "^19.1.0",
|
|
107
|
+
"@types/react-dom": "^19.1.1",
|
|
108
108
|
"algoliasearch": "4.24.0",
|
|
109
109
|
"mdast-util-mdx-jsx": "^3.2.0",
|
|
110
110
|
"mdast-util-mdxjs-esm": "^2.0.1",
|
|
111
111
|
"next": "^15.2.4",
|
|
112
112
|
"react-router": "^7.4.1",
|
|
113
113
|
"remark-mdx": "^3.1.0",
|
|
114
|
-
"remark-rehype": "^11.1.
|
|
114
|
+
"remark-rehype": "^11.1.2",
|
|
115
115
|
"typescript": "^5.8.2",
|
|
116
116
|
"unified": "^11.0.5",
|
|
117
117
|
"vfile": "^6.0.3",
|