fumadocs-ui 16.8.6 → 16.8.8
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/generated/shared.css +9 -5
- package/dist/components/accordion.js +1 -1
- package/dist/components/codeblock.js +1 -1
- package/dist/components/dialog/search.js +2 -2
- package/dist/components/heading.d.ts +2 -2
- package/dist/components/heading.js +20 -10
- package/dist/components/toc/clerk.js +34 -23
- package/dist/contexts/search.js +1 -1
- package/dist/layouts/shared/page-actions.js +1 -1
- package/dist/og/takumi.d.ts +1 -1
- package/dist/style.css +13 -13
- package/package.json +5 -5
package/css/generated/shared.css
CHANGED
|
@@ -92,7 +92,6 @@
|
|
|
92
92
|
@source inline("application/json");
|
|
93
93
|
@source inline("areaRef");
|
|
94
94
|
@source inline("aria-describedby");
|
|
95
|
-
@source inline("aria-hidden");
|
|
96
95
|
@source inline("aria-label");
|
|
97
96
|
@source inline("aria-selected");
|
|
98
97
|
@source inline("as");
|
|
@@ -404,6 +403,8 @@
|
|
|
404
403
|
@source inline("group-data-[state=active]:bg-fd-primary");
|
|
405
404
|
@source inline("group-data-[state=open]:rotate-180");
|
|
406
405
|
@source inline("group-data-[state=open]:rotate-90");
|
|
406
|
+
@source inline("group-hover/heading:opacity-100");
|
|
407
|
+
@source inline("group/heading");
|
|
407
408
|
@source inline("groupListeners");
|
|
408
409
|
@source inline("guides");
|
|
409
410
|
@source inline("h");
|
|
@@ -465,6 +466,8 @@
|
|
|
465
466
|
@source inline("inputType");
|
|
466
467
|
@source inline("inset-0");
|
|
467
468
|
@source inline("inset-s-0");
|
|
469
|
+
@source inline("inset-s-3");
|
|
470
|
+
@source inline("inset-s-6");
|
|
468
471
|
@source inline("inset-x-0");
|
|
469
472
|
@source inline("inset-x-2");
|
|
470
473
|
@source inline("inset-y-0");
|
|
@@ -642,6 +645,7 @@
|
|
|
642
645
|
@source inline("onChange");
|
|
643
646
|
@source inline("onClick");
|
|
644
647
|
@source inline("onCompute");
|
|
648
|
+
@source inline("onCopy");
|
|
645
649
|
@source inline("onKey");
|
|
646
650
|
@source inline("onOpenChange");
|
|
647
651
|
@source inline("onOpenChangeCallback");
|
|
@@ -708,8 +712,6 @@
|
|
|
708
712
|
@source inline("pb-0");
|
|
709
713
|
@source inline("pb-2");
|
|
710
714
|
@source inline("pe-2");
|
|
711
|
-
@source inline("peer");
|
|
712
|
-
@source inline("peer-hover:opacity-100");
|
|
713
715
|
@source inline("performing");
|
|
714
716
|
@source inline("persist");
|
|
715
717
|
@source inline("persistent");
|
|
@@ -892,8 +894,6 @@
|
|
|
892
894
|
@source inline("specific");
|
|
893
895
|
@source inline("src");
|
|
894
896
|
@source inline("stars");
|
|
895
|
-
@source inline("start-3");
|
|
896
|
-
@source inline("start-6");
|
|
897
897
|
@source inline("startIdx");
|
|
898
898
|
@source inline("state");
|
|
899
899
|
@source inline("static");
|
|
@@ -1075,8 +1075,12 @@
|
|
|
1075
1075
|
@source inline("wrapInSuspense");
|
|
1076
1076
|
@source inline("wrapped");
|
|
1077
1077
|
@source inline("x");
|
|
1078
|
+
@source inline("x1");
|
|
1079
|
+
@source inline("x2");
|
|
1078
1080
|
@source inline("xmlns");
|
|
1079
1081
|
@source inline("y");
|
|
1082
|
+
@source inline("y1");
|
|
1083
|
+
@source inline("y2");
|
|
1080
1084
|
@source inline("you");
|
|
1081
1085
|
@source inline("your");
|
|
1082
1086
|
@source inline("z-2");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../utils/cn.js";
|
|
3
|
-
import { useCopyButton } from "../utils/use-copy-button.js";
|
|
4
3
|
import { buttonVariants } from "./ui/button.js";
|
|
4
|
+
import { useCopyButton } from "../utils/use-copy-button.js";
|
|
5
5
|
import { mergeRefs } from "../utils/merge-refs.js";
|
|
6
6
|
import { Accordion as Accordion$1, AccordionContent, AccordionHeader, AccordionItem, AccordionTrigger } from "./ui/accordion.js";
|
|
7
7
|
import { useEffect, useRef, useState } from "react";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../utils/cn.js";
|
|
3
|
-
import { useCopyButton } from "../utils/use-copy-button.js";
|
|
4
3
|
import { buttonVariants } from "./ui/button.js";
|
|
4
|
+
import { useCopyButton } from "../utils/use-copy-button.js";
|
|
5
5
|
import { mergeRefs } from "../utils/merge-refs.js";
|
|
6
6
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from "./ui/tabs.js";
|
|
7
7
|
import { createContext, use, useMemo, useRef } from "react";
|
|
@@ -263,9 +263,9 @@ function SearchDialogListItem({ item, className, children, renderMarkdown = (s)
|
|
|
263
263
|
}),
|
|
264
264
|
item.type !== "page" && /* @__PURE__ */ jsx("div", {
|
|
265
265
|
role: "none",
|
|
266
|
-
className: "absolute
|
|
266
|
+
className: "absolute inset-s-3 inset-y-0 w-px bg-fd-border"
|
|
267
267
|
}),
|
|
268
|
-
item.type === "heading" && /* @__PURE__ */ jsx(Hash, { className: "absolute
|
|
268
|
+
item.type === "heading" && /* @__PURE__ */ jsx(Hash, { className: "absolute inset-s-6 top-2.5 size-4 text-fd-muted-foreground" }),
|
|
269
269
|
/* @__PURE__ */ jsx("div", {
|
|
270
270
|
className: cn("min-w-0", item.type === "text" && "ps-4", item.type === "heading" && "ps-8", item.type === "page" || item.type === "heading" ? "font-medium" : "text-fd-popover-foreground/80"),
|
|
271
271
|
children: typeof item.content === "string" ? renderMarkdown(item.content) : item.content
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef } from "react";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
3
|
|
|
3
4
|
//#region src/components/heading.d.ts
|
|
4
5
|
type Types = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
@@ -7,8 +8,7 @@ type HeadingProps<T extends Types> = Omit<ComponentPropsWithoutRef<T>, 'as'> & {
|
|
|
7
8
|
};
|
|
8
9
|
declare function Heading<T extends Types = 'h1'>({
|
|
9
10
|
as,
|
|
10
|
-
className,
|
|
11
11
|
...props
|
|
12
|
-
}: HeadingProps<T>):
|
|
12
|
+
}: HeadingProps<T>): _$react_jsx_runtime0.JSX.Element;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { Heading };
|
|
@@ -1,24 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { cn } from "../utils/cn.js";
|
|
3
|
+
import { buttonVariants } from "./ui/button.js";
|
|
4
|
+
import { useCopyButton } from "../utils/use-copy-button.js";
|
|
2
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { LinkIcon } from "lucide-react";
|
|
6
|
+
import { CopyCheckIcon, LinkIcon } from "lucide-react";
|
|
4
7
|
//#region src/components/heading.tsx
|
|
5
|
-
function Heading({ as,
|
|
8
|
+
function Heading({ as, ...props }) {
|
|
6
9
|
const As = as ?? "h1";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
const [isChecked, onCopy] = useCopyButton(() => {
|
|
11
|
+
if (!props.id) return;
|
|
12
|
+
const url = new URL(window.location.href);
|
|
13
|
+
url.hash = props.id;
|
|
14
|
+
return navigator.clipboard.writeText(url.href);
|
|
10
15
|
});
|
|
16
|
+
if (!props.id) return /* @__PURE__ */ jsx(As, { ...props });
|
|
11
17
|
return /* @__PURE__ */ jsxs(As, {
|
|
12
|
-
className: cn("flex scroll-m-28 flex-row items-center gap-2", className),
|
|
13
18
|
...props,
|
|
19
|
+
className: cn("group/heading flex scroll-m-28 flex-row items-center gap-1", props.className),
|
|
14
20
|
children: [/* @__PURE__ */ jsx("a", {
|
|
15
21
|
"data-card": "",
|
|
16
22
|
href: `#${props.id}`,
|
|
17
|
-
className: "peer",
|
|
18
23
|
children: props.children
|
|
19
|
-
}), /* @__PURE__ */ jsx(
|
|
20
|
-
"aria-
|
|
21
|
-
className:
|
|
24
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
25
|
+
"aria-label": "Copy Anchor Link",
|
|
26
|
+
className: cn(buttonVariants({
|
|
27
|
+
variant: "ghost",
|
|
28
|
+
size: "icon-xs"
|
|
29
|
+
}), "not-prose shrink-0 text-fd-muted-foreground opacity-0 transition-opacity group-hover/heading:opacity-100"),
|
|
30
|
+
onClick: onCopy,
|
|
31
|
+
children: isChecked ? /* @__PURE__ */ jsx(CopyCheckIcon, {}) : /* @__PURE__ */ jsx(LinkIcon, {})
|
|
22
32
|
})]
|
|
23
33
|
});
|
|
24
34
|
}
|
|
@@ -208,29 +208,40 @@ function TOCItem({ item, ...props }) {
|
|
|
208
208
|
xmlns: "http://www.w3.org/2000/svg",
|
|
209
209
|
className: cn("absolute -top-1.5 inset-s-0 bottom-0 h-[calc(100%+--spacing(1.5))] -z-1 rtl:-scale-x-100", l1 !== l2 && "h-full bottom-1.5"),
|
|
210
210
|
style: { width: Math.max(l0, l1) + 9 },
|
|
211
|
-
children: [
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
211
|
+
children: [
|
|
212
|
+
l0 !== l1 && /* @__PURE__ */ jsx("path", {
|
|
213
|
+
d: `M ${l0 + .5} 0 C ${l0 + .5} 8 ${l1 + .5} 4 ${l1 + .5} 12`,
|
|
214
|
+
stroke: "black",
|
|
215
|
+
strokeWidth: "1",
|
|
216
|
+
fill: "none",
|
|
217
|
+
className: "stroke-fd-foreground/10"
|
|
218
|
+
}),
|
|
219
|
+
/* @__PURE__ */ jsx("line", {
|
|
220
|
+
x1: l1 + .5,
|
|
221
|
+
y1: l0 === l1 ? "6" : "12",
|
|
222
|
+
x2: l1 + .5,
|
|
223
|
+
y2: "100%",
|
|
224
|
+
strokeWidth: "1",
|
|
225
|
+
className: "stroke-fd-foreground/10"
|
|
226
|
+
}),
|
|
227
|
+
item._step !== void 0 && /* @__PURE__ */ jsxs("g", {
|
|
228
|
+
transform: `translate(${l1 + .5}, ${l1 === l2 ? "3" : "6"})`,
|
|
229
|
+
children: [/* @__PURE__ */ jsx("circle", {
|
|
230
|
+
cx: "0",
|
|
231
|
+
cy: "50%",
|
|
232
|
+
r: "8",
|
|
233
|
+
className: "fill-fd-muted"
|
|
234
|
+
}), /* @__PURE__ */ jsx("text", {
|
|
235
|
+
x: "0",
|
|
236
|
+
y: "50%",
|
|
237
|
+
textAnchor: "middle",
|
|
238
|
+
alignmentBaseline: "central",
|
|
239
|
+
dominantBaseline: "middle",
|
|
240
|
+
className: "fill-fd-muted-foreground font-medium text-xs leading-none font-mono rtl:-scale-x-100",
|
|
241
|
+
children: item._step
|
|
242
|
+
})]
|
|
243
|
+
})
|
|
244
|
+
]
|
|
234
245
|
})
|
|
235
246
|
};
|
|
236
247
|
}, [items, item]);
|
package/dist/contexts/search.js
CHANGED
|
@@ -14,7 +14,7 @@ function useSearchContext() {
|
|
|
14
14
|
function MetaOrControl() {
|
|
15
15
|
const [key, setKey] = useState("⌘");
|
|
16
16
|
useEffect(() => {
|
|
17
|
-
if (window.navigator.userAgent
|
|
17
|
+
if (/Windows|Linux/i.test(window.navigator.userAgent)) setKey("Ctrl");
|
|
18
18
|
}, []);
|
|
19
19
|
return key;
|
|
20
20
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../../utils/cn.js";
|
|
3
|
-
import { useCopyButton } from "../../utils/use-copy-button.js";
|
|
4
3
|
import { buttonVariants } from "../../components/ui/button.js";
|
|
4
|
+
import { useCopyButton } from "../../utils/use-copy-button.js";
|
|
5
5
|
import { Popover, PopoverContent, PopoverTrigger } from "../../components/ui/popover.js";
|
|
6
6
|
import { useMemo, useState } from "react";
|
|
7
7
|
import { usePathname } from "fumadocs-core/framework";
|
package/dist/og/takumi.d.ts
CHANGED
package/dist/style.css
CHANGED
|
@@ -317,18 +317,18 @@
|
|
|
317
317
|
.inset-s-0 {
|
|
318
318
|
inset-inline-start: calc(var(--spacing) * 0);
|
|
319
319
|
}
|
|
320
|
+
.inset-s-3 {
|
|
321
|
+
inset-inline-start: calc(var(--spacing) * 3);
|
|
322
|
+
}
|
|
320
323
|
.inset-s-4 {
|
|
321
324
|
inset-inline-start: calc(var(--spacing) * 4);
|
|
322
325
|
}
|
|
326
|
+
.inset-s-6 {
|
|
327
|
+
inset-inline-start: calc(var(--spacing) * 6);
|
|
328
|
+
}
|
|
323
329
|
.start {
|
|
324
330
|
inset-inline-start: var(--spacing);
|
|
325
331
|
}
|
|
326
|
-
.start-3 {
|
|
327
|
-
inset-inline-start: calc(var(--spacing) * 3);
|
|
328
|
-
}
|
|
329
|
-
.start-6 {
|
|
330
|
-
inset-inline-start: calc(var(--spacing) * 6);
|
|
331
|
-
}
|
|
332
332
|
.end-2 {
|
|
333
333
|
inset-inline-end: calc(var(--spacing) * 2);
|
|
334
334
|
}
|
|
@@ -2105,6 +2105,13 @@
|
|
|
2105
2105
|
margin-bottom: calc(var(--spacing) * 2);
|
|
2106
2106
|
}
|
|
2107
2107
|
}
|
|
2108
|
+
.group-hover\/heading\:opacity-100 {
|
|
2109
|
+
&:is(:where(.group\/heading):hover *) {
|
|
2110
|
+
@media (hover: hover) {
|
|
2111
|
+
opacity: 100%;
|
|
2112
|
+
}
|
|
2113
|
+
}
|
|
2114
|
+
}
|
|
2108
2115
|
.group-data-\[state\=active\]\:bg-fd-primary {
|
|
2109
2116
|
&:is(:where(.group)[data-state="active"] *) {
|
|
2110
2117
|
background-color: var(--color-fd-primary);
|
|
@@ -2120,13 +2127,6 @@
|
|
|
2120
2127
|
rotate: 180deg;
|
|
2121
2128
|
}
|
|
2122
2129
|
}
|
|
2123
|
-
.peer-hover\:opacity-100 {
|
|
2124
|
-
&:is(:where(.peer):hover ~ *) {
|
|
2125
|
-
@media (hover: hover) {
|
|
2126
|
-
opacity: 100%;
|
|
2127
|
-
}
|
|
2128
|
-
}
|
|
2129
|
-
}
|
|
2130
2130
|
.placeholder\:text-fd-muted-foreground {
|
|
2131
2131
|
&::placeholder {
|
|
2132
2132
|
color: var(--color-fd-muted-foreground);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-ui",
|
|
3
|
-
"version": "16.8.
|
|
3
|
+
"version": "16.8.8",
|
|
4
4
|
"description": "The Radix UI version of Fumadocs UI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Docs",
|
|
@@ -156,9 +156,9 @@
|
|
|
156
156
|
"tailwindcss": "^4.2.4",
|
|
157
157
|
"tsdown": "0.21.10",
|
|
158
158
|
"unified": "^11.0.5",
|
|
159
|
-
"fumadocs
|
|
160
|
-
"
|
|
161
|
-
"
|
|
159
|
+
"@fumadocs/cli": "1.3.10",
|
|
160
|
+
"fumadocs-core": "16.8.8",
|
|
161
|
+
"tsconfig": "0.0.0"
|
|
162
162
|
},
|
|
163
163
|
"peerDependencies": {
|
|
164
164
|
"@takumi-rs/image-response": "*",
|
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
"next": "16.x.x",
|
|
168
168
|
"react": "^19.2.0",
|
|
169
169
|
"react-dom": "^19.2.0",
|
|
170
|
-
"fumadocs-core": "16.8.
|
|
170
|
+
"fumadocs-core": "16.8.8"
|
|
171
171
|
},
|
|
172
172
|
"peerDependenciesMeta": {
|
|
173
173
|
"next": {
|