fumadocs-ui 12.0.5 → 12.0.7
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.
|
@@ -34,7 +34,7 @@ function LanguageToggle(props) {
|
|
|
34
34
|
}
|
|
35
35
|
),
|
|
36
36
|
/* @__PURE__ */ jsxs(PopoverContent, { className: "flex flex-col p-1", children: [
|
|
37
|
-
/* @__PURE__ */ jsx("p", { className: "mb-
|
|
37
|
+
/* @__PURE__ */ jsx("p", { className: "mb-1 p-2 text-xs font-medium text-muted-foreground", children: context.text.chooseLanguage }),
|
|
38
38
|
languages.map(([lang, { name }]) => /* @__PURE__ */ jsx(
|
|
39
39
|
"button",
|
|
40
40
|
{
|
|
@@ -33,6 +33,7 @@ function RollButton({
|
|
|
33
33
|
const nearTop = element.scrollTop / (element.scrollHeight - element.clientHeight) < percentage;
|
|
34
34
|
setShow(!nearTop);
|
|
35
35
|
};
|
|
36
|
+
listener();
|
|
36
37
|
window.addEventListener("scroll", listener);
|
|
37
38
|
return () => {
|
|
38
39
|
window.removeEventListener("scroll", listener);
|
package/dist/docs.client.js
CHANGED
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
useState
|
|
59
59
|
} from "react";
|
|
60
60
|
import Link from "fumadocs-core/link";
|
|
61
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
61
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
62
62
|
var itemVariants = cva(
|
|
63
63
|
"flex w-full flex-row items-center gap-2 rounded-md px-2 py-1.5 text-muted-foreground transition-colors duration-100 [&_svg]:size-4",
|
|
64
64
|
{
|
|
@@ -89,6 +89,7 @@ function Sidebar({
|
|
|
89
89
|
bannerProps,
|
|
90
90
|
footerProps
|
|
91
91
|
}) {
|
|
92
|
+
const search = useSearchContext();
|
|
92
93
|
const context = useMemo(
|
|
93
94
|
() => ({
|
|
94
95
|
defaultOpenLevel,
|
|
@@ -118,7 +119,7 @@ function Sidebar({
|
|
|
118
119
|
),
|
|
119
120
|
children: [
|
|
120
121
|
banner,
|
|
121
|
-
/* @__PURE__ */ jsx(LargeSearchToggle, { className: "rounded-lg max-md:hidden" })
|
|
122
|
+
search.enabled ? /* @__PURE__ */ jsx(LargeSearchToggle, { className: "rounded-lg max-md:hidden" }) : null
|
|
122
123
|
]
|
|
123
124
|
}
|
|
124
125
|
),
|
|
@@ -223,40 +224,26 @@ function FolderNode({
|
|
|
223
224
|
},
|
|
224
225
|
[closeOnRedirect, active]
|
|
225
226
|
);
|
|
227
|
+
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
228
|
+
icon,
|
|
229
|
+
name,
|
|
230
|
+
/* @__PURE__ */ jsx(
|
|
231
|
+
ChevronDown,
|
|
232
|
+
{
|
|
233
|
+
className: twMerge("ms-auto transition-transform", !extend && "-rotate-90")
|
|
234
|
+
}
|
|
235
|
+
)
|
|
236
|
+
] });
|
|
226
237
|
return /* @__PURE__ */ jsxs(Collapsible, { open: extend, onOpenChange: setExtend, children: [
|
|
227
|
-
index ? /* @__PURE__ */
|
|
238
|
+
index ? /* @__PURE__ */ jsx(
|
|
228
239
|
Link,
|
|
229
240
|
{
|
|
230
241
|
className: twMerge(itemVariants({ active })),
|
|
231
242
|
href: index.url,
|
|
232
243
|
onClick,
|
|
233
|
-
children:
|
|
234
|
-
icon,
|
|
235
|
-
name,
|
|
236
|
-
/* @__PURE__ */ jsx(
|
|
237
|
-
ChevronDown,
|
|
238
|
-
{
|
|
239
|
-
className: twMerge(
|
|
240
|
-
"ms-auto transition-transform",
|
|
241
|
-
!extend && "-rotate-90"
|
|
242
|
-
)
|
|
243
|
-
}
|
|
244
|
-
)
|
|
245
|
-
]
|
|
244
|
+
children: content
|
|
246
245
|
}
|
|
247
|
-
) : /* @__PURE__ */
|
|
248
|
-
icon,
|
|
249
|
-
name,
|
|
250
|
-
/* @__PURE__ */ jsx(
|
|
251
|
-
ChevronDown,
|
|
252
|
-
{
|
|
253
|
-
className: twMerge(
|
|
254
|
-
"ms-auto transition-transform",
|
|
255
|
-
!extend && "-rotate-90"
|
|
256
|
-
)
|
|
257
|
-
}
|
|
258
|
-
)
|
|
259
|
-
] }),
|
|
246
|
+
) : /* @__PURE__ */ jsx(CollapsibleTrigger, { className: twMerge(itemVariants({ active })), children: content }),
|
|
260
247
|
/* @__PURE__ */ jsx(CollapsibleContent, { children: /* @__PURE__ */ jsx(
|
|
261
248
|
NodeList,
|
|
262
249
|
{
|
|
@@ -276,7 +263,7 @@ function SeparatorNode({
|
|
|
276
263
|
// src/components/layout/dynamic-sidebar.tsx
|
|
277
264
|
import { useCallback as useCallback2, useRef, useState as useState2 } from "react";
|
|
278
265
|
import { SidebarIcon } from "lucide-react";
|
|
279
|
-
import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
266
|
+
import { Fragment as Fragment2, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
280
267
|
function DynamicSidebar(props) {
|
|
281
268
|
const { collapsed, setCollapsed } = useSidebar();
|
|
282
269
|
const [hover, setHover] = useState2(false);
|
|
@@ -296,7 +283,7 @@ function DynamicSidebar(props) {
|
|
|
296
283
|
setHover(false);
|
|
297
284
|
}, 300);
|
|
298
285
|
}, []);
|
|
299
|
-
return /* @__PURE__ */ jsxs2(
|
|
286
|
+
return /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
300
287
|
collapsed ? /* @__PURE__ */ jsx2(
|
|
301
288
|
"div",
|
|
302
289
|
{
|
|
@@ -336,7 +323,7 @@ function DynamicSidebar(props) {
|
|
|
336
323
|
collapsed && "md:fixed md:inset-y-2 md:start-2 md:h-auto md:rounded-xl md:border md:shadow-md"
|
|
337
324
|
)
|
|
338
325
|
},
|
|
339
|
-
footer: /* @__PURE__ */ jsxs2(
|
|
326
|
+
footer: /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
340
327
|
props.footer,
|
|
341
328
|
/* @__PURE__ */ jsx2(
|
|
342
329
|
"button",
|
package/dist/layout.js
CHANGED
|
@@ -79,7 +79,7 @@ function DocsLayout({
|
|
|
79
79
|
children: nav?.title
|
|
80
80
|
}
|
|
81
81
|
),
|
|
82
|
-
/* @__PURE__ */ jsx(LinksMenu, { items: finalLinks, children: /* @__PURE__ */ jsx(MoreHorizontal, {}) })
|
|
82
|
+
finalLinks.length > 0 && /* @__PURE__ */ jsx(LinksMenu, { items: finalLinks, children: /* @__PURE__ */ jsx(MoreHorizontal, {}) })
|
|
83
83
|
] }),
|
|
84
84
|
sidebar.banner
|
|
85
85
|
] }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-ui",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.7",
|
|
4
4
|
"description": "The framework for building a documentation website in Next.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NextJs",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"next-themes": "^0.3.0",
|
|
96
96
|
"react-medium-image-zoom": "^5.2.4",
|
|
97
97
|
"tailwind-merge": "^2.3.0",
|
|
98
|
-
"fumadocs-core": "12.0.
|
|
98
|
+
"fumadocs-core": "12.0.7"
|
|
99
99
|
},
|
|
100
100
|
"devDependencies": {
|
|
101
101
|
"@algolia/client-search": "^4.23.3",
|