fumadocs-ui 16.8.7 → 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 +5 -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/ui/button.d.ts +1 -1
- package/dist/contexts/search.js +1 -1
- package/dist/layouts/home/slots/header.d.ts +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 +3 -3
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");
|
|
@@ -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
|
}
|
|
@@ -5,7 +5,7 @@ import * as _$class_variance_authority_types0 from "class-variance-authority/typ
|
|
|
5
5
|
declare const buttonVariants: (props?: ({
|
|
6
6
|
variant?: "primary" | "outline" | "ghost" | "secondary" | null | undefined;
|
|
7
7
|
color?: "primary" | "outline" | "ghost" | "secondary" | null | undefined;
|
|
8
|
-
size?: "
|
|
8
|
+
size?: "icon" | "sm" | "icon-sm" | "icon-xs" | null | undefined;
|
|
9
9
|
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
10
10
|
type ButtonProps = VariantProps<typeof buttonVariants>;
|
|
11
11
|
//#endregion
|
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
|
}
|
|
@@ -5,7 +5,7 @@ import * as _$class_variance_authority_types0 from "class-variance-authority/typ
|
|
|
5
5
|
|
|
6
6
|
//#region src/layouts/home/slots/header.d.ts
|
|
7
7
|
declare const navItemVariants: (props?: ({
|
|
8
|
-
variant?: "icon" | "
|
|
8
|
+
variant?: "icon" | "main" | "button" | null | undefined;
|
|
9
9
|
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
10
10
|
declare function Header(props: ComponentProps<'header'>): string | number | bigint | true | _$react_jsx_runtime0.JSX.Element | Iterable<_$react.ReactNode> | Promise<string | number | bigint | boolean | _$react.ReactPortal | _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>> | Iterable<_$react.ReactNode> | null | undefined>;
|
|
11
11
|
//#endregion
|
|
@@ -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",
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
"tsdown": "0.21.10",
|
|
158
158
|
"unified": "^11.0.5",
|
|
159
159
|
"@fumadocs/cli": "1.3.10",
|
|
160
|
-
"fumadocs-core": "16.8.
|
|
160
|
+
"fumadocs-core": "16.8.8",
|
|
161
161
|
"tsconfig": "0.0.0"
|
|
162
162
|
},
|
|
163
163
|
"peerDependencies": {
|
|
@@ -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": {
|