fumadocs-core 10.0.5 → 10.1.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/mdx-plugins/index.js +1 -1
- package/dist/search/server.js +2 -2
- package/dist/sidebar.d.ts +3 -3
- package/dist/sidebar.js +3 -1
- package/dist/toc.d.ts +1 -1
- package/package.json +8 -8
|
@@ -384,7 +384,7 @@ function remarkImage({
|
|
|
384
384
|
}
|
|
385
385
|
url = slash(urlPath);
|
|
386
386
|
}
|
|
387
|
-
const variableName = `__img${importsToInject.length}`;
|
|
387
|
+
const variableName = `__img${importsToInject.length.toString()}`;
|
|
388
388
|
const hasBlur = placeholder === "blur" && VALID_BLUR_EXT.some((ext) => url.endsWith(ext));
|
|
389
389
|
importsToInject.push({ variableName, importPath: url });
|
|
390
390
|
Object.assign(node, {
|
package/dist/search/server.js
CHANGED
|
@@ -140,7 +140,7 @@ function initSearchAPIAdvanced({
|
|
|
140
140
|
});
|
|
141
141
|
for (const heading of data.headings) {
|
|
142
142
|
index.add({
|
|
143
|
-
id: page.id + id
|
|
143
|
+
id: page.id + (id++).toString(),
|
|
144
144
|
page_id: page.id,
|
|
145
145
|
type: "heading",
|
|
146
146
|
tag: page.tag,
|
|
@@ -150,7 +150,7 @@ function initSearchAPIAdvanced({
|
|
|
150
150
|
}
|
|
151
151
|
for (const content of data.contents) {
|
|
152
152
|
index.add({
|
|
153
|
-
id: page.id + id
|
|
153
|
+
id: page.id + (id++).toString(),
|
|
154
154
|
page_id: page.id,
|
|
155
155
|
tag: page.tag,
|
|
156
156
|
type: "text",
|
package/dist/sidebar.d.ts
CHANGED
|
@@ -5,15 +5,15 @@ interface SidebarProviderProps {
|
|
|
5
5
|
onOpenChange?: (v: boolean) => void;
|
|
6
6
|
children: ReactNode;
|
|
7
7
|
}
|
|
8
|
-
declare function SidebarProvider(props: SidebarProviderProps):
|
|
8
|
+
declare function SidebarProvider(props: SidebarProviderProps): React.ReactElement;
|
|
9
9
|
type WithAs<T extends ElementType, Extend = object> = Omit<ComponentPropsWithoutRef<T>, 'as' | keyof Extend> & Extend & {
|
|
10
10
|
as?: T;
|
|
11
11
|
};
|
|
12
12
|
type SidebarTriggerProps<T extends ElementType> = WithAs<T>;
|
|
13
|
-
declare function SidebarTrigger<T extends ElementType = 'button'>({ as, ...props }: SidebarTriggerProps<T>):
|
|
13
|
+
declare function SidebarTrigger<T extends ElementType = 'button'>({ as, ...props }: SidebarTriggerProps<T>): React.ReactElement;
|
|
14
14
|
type SidebarContentProps<T extends ElementType> = WithAs<T, {
|
|
15
15
|
minWidth?: number;
|
|
16
16
|
}>;
|
|
17
|
-
declare function SidebarList<T extends ElementType = 'aside'>({ as, minWidth, ...props }: SidebarContentProps<T>):
|
|
17
|
+
declare function SidebarList<T extends ElementType = 'aside'>({ as, minWidth, ...props }: SidebarContentProps<T>): React.ReactElement;
|
|
18
18
|
|
|
19
19
|
export { type SidebarContentProps, SidebarList, SidebarProvider, type SidebarProviderProps, SidebarTrigger, type SidebarTriggerProps };
|
package/dist/sidebar.js
CHANGED
|
@@ -60,7 +60,9 @@ function SidebarList(_a) {
|
|
|
60
60
|
useEffect(() => {
|
|
61
61
|
if (minWidth === void 0)
|
|
62
62
|
return;
|
|
63
|
-
const mediaQueryList = window.matchMedia(
|
|
63
|
+
const mediaQueryList = window.matchMedia(
|
|
64
|
+
`(min-width: ${minWidth.toString()}px)`
|
|
65
|
+
);
|
|
64
66
|
const handleChange = () => {
|
|
65
67
|
setIsMobileLayout(!mediaQueryList.matches);
|
|
66
68
|
};
|
package/dist/toc.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ interface TOCScrollProvider {
|
|
|
12
12
|
toc: TableOfContents;
|
|
13
13
|
children: ReactNode;
|
|
14
14
|
}
|
|
15
|
-
declare function TOCScrollProvider({ toc, containerRef, children, }: TOCScrollProvider):
|
|
15
|
+
declare function TOCScrollProvider({ toc, containerRef, children, }: TOCScrollProvider): React.ReactElement;
|
|
16
16
|
interface TOCItemProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
17
17
|
href: string;
|
|
18
18
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-core",
|
|
3
|
-
"version": "10.0
|
|
3
|
+
"version": "10.1.0",
|
|
4
4
|
"description": "The library for building a documentation website in Next.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NextJs",
|
|
@@ -109,18 +109,18 @@
|
|
|
109
109
|
],
|
|
110
110
|
"dependencies": {
|
|
111
111
|
"@formatjs/intl-localematcher": "^0.5.4",
|
|
112
|
-
"@shikijs/rehype": "^1.
|
|
113
|
-
"@shikijs/transformers": "^1.
|
|
112
|
+
"@shikijs/rehype": "^1.2.0",
|
|
113
|
+
"@shikijs/transformers": "^1.2.0",
|
|
114
114
|
"flexsearch": "0.7.21",
|
|
115
115
|
"github-slugger": "^2.0.0",
|
|
116
116
|
"hast-util-to-estree": "^3.1.0",
|
|
117
117
|
"negotiator": "^0.6.3",
|
|
118
|
-
"react-remove-scroll": "^2.5.
|
|
118
|
+
"react-remove-scroll": "^2.5.9",
|
|
119
119
|
"remark": "^15.0.0",
|
|
120
120
|
"remark-gfm": "^4.0.0",
|
|
121
121
|
"remark-mdx": "^3.0.1",
|
|
122
122
|
"scroll-into-view-if-needed": "^3.1.0",
|
|
123
|
-
"shiki": "^1.
|
|
123
|
+
"shiki": "^1.2.0",
|
|
124
124
|
"swr": "^2.2.5",
|
|
125
125
|
"unist-util-visit": "^5.0.0"
|
|
126
126
|
},
|
|
@@ -131,10 +131,10 @@
|
|
|
131
131
|
"@types/mdast": "^4.0.3",
|
|
132
132
|
"@types/negotiator": "^0.6.3",
|
|
133
133
|
"@types/node": "18.17.5",
|
|
134
|
-
"@types/react": "^18.2.
|
|
135
|
-
"@types/react-dom": "^18.2.
|
|
134
|
+
"@types/react": "^18.2.67",
|
|
135
|
+
"@types/react-dom": "^18.2.22",
|
|
136
136
|
"algoliasearch": "^4.22.1",
|
|
137
|
-
"next": "^14.1.
|
|
137
|
+
"next": "^14.1.4",
|
|
138
138
|
"unified": "^11.0.4",
|
|
139
139
|
"eslint-config-custom": "0.0.0",
|
|
140
140
|
"tsconfig": "0.0.0"
|