fumadocs-ui 8.2.0 → 9.0.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.
Files changed (45) hide show
  1. package/dist/{chunk-TSEDUE4C.js → chunk-3YZ7NCMG.js} +9 -9
  2. package/dist/{chunk-FAZEWBYX.js → chunk-7GZKFBAP.js} +1 -1
  3. package/dist/{chunk-5EZE3X7G.js → chunk-7XPZOMJ2.js} +3 -3
  4. package/dist/{chunk-GZQICERS.js → chunk-CYNHK27D.js} +3 -3
  5. package/dist/{chunk-F62NYOL5.js → chunk-REAI3OOF.js} +4 -4
  6. package/dist/chunk-TK3TM3MR.js +6 -0
  7. package/dist/{chunk-CBOHU2VN.js → chunk-UKE65HV3.js} +3 -3
  8. package/dist/{chunk-UGTA4YYX.js → chunk-WDMDQTHE.js} +15 -15
  9. package/dist/{chunk-OG3QOLYP.js → chunk-ZOR33LFA.js} +4 -4
  10. package/dist/components/accordion.d.mts +5 -7
  11. package/dist/components/accordion.js +49 -72
  12. package/dist/components/api.js +12 -12
  13. package/dist/components/callout.d.mts +3 -3
  14. package/dist/components/callout.js +3 -3
  15. package/dist/components/card.js +2 -2
  16. package/dist/components/codeblock.d.mts +4 -4
  17. package/dist/components/codeblock.js +4 -4
  18. package/dist/components/dialog/search-algolia.js +3 -3
  19. package/dist/components/dialog/search-default.js +3 -3
  20. package/dist/components/dialog/search.js +3 -3
  21. package/dist/components/files.d.mts +8 -8
  22. package/dist/components/files.js +27 -21
  23. package/dist/components/heading.js +2 -2
  24. package/dist/components/inline-toc.d.mts +1 -3
  25. package/dist/components/inline-toc.js +10 -21
  26. package/dist/components/roll-button.js +4 -4
  27. package/dist/components/tabs.d.mts +5 -5
  28. package/dist/components/tabs.js +6 -6
  29. package/dist/components/type-table.js +11 -11
  30. package/dist/i18n.js +9 -9
  31. package/dist/layout.client.js +26 -32
  32. package/dist/layout.js +3 -3
  33. package/dist/mdx.client.js +4 -4
  34. package/dist/mdx.js +3 -3
  35. package/dist/page.client.js +6 -6
  36. package/dist/page.d.mts +2 -2
  37. package/dist/page.js +3 -3
  38. package/dist/provider.d.mts +2 -2
  39. package/dist/style.css +1 -1
  40. package/dist/tailwind-plugin.d.ts +7 -3
  41. package/dist/tailwind-plugin.js +55 -19
  42. package/dist/twoslash/popup.d.mts +4 -4
  43. package/dist/twoslash/popup.js +3 -3
  44. package/package.json +2 -2
  45. package/dist/chunk-KCGRUOMD.js +0 -13
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  ScrollArea
3
- } from "./chunk-OG3QOLYP.js";
3
+ } from "./chunk-ZOR33LFA.js";
4
4
  import {
5
5
  useCopyButton
6
6
  } from "./chunk-24NYFO7H.js";
7
7
  import {
8
8
  buttonVariants
9
- } from "./chunk-FAZEWBYX.js";
9
+ } from "./chunk-7GZKFBAP.js";
10
10
  import {
11
- cn
12
- } from "./chunk-KCGRUOMD.js";
11
+ twMerge
12
+ } from "./chunk-TK3TM3MR.js";
13
13
 
14
14
  // src/components/codeblock.tsx
15
15
  import { CheckIcon, CopyIcon } from "lucide-react";
@@ -17,7 +17,7 @@ import { forwardRef, useCallback, useRef } from "react";
17
17
  import { jsx, jsxs } from "react/jsx-runtime";
18
18
  var Pre = forwardRef(
19
19
  ({ className, ...props }, ref) => {
20
- return /* @__PURE__ */ jsx("pre", { ref, className: cn("nd-codeblock py-4", className), ...props, children: props.children });
20
+ return /* @__PURE__ */ jsx("pre", { ref, className: twMerge("nd-codeblock py-4", className), ...props, children: props.children });
21
21
  }
22
22
  );
23
23
  Pre.displayName = "Pre";
@@ -39,7 +39,7 @@ var CodeBlock = forwardRef(
39
39
  "figure",
40
40
  {
41
41
  ref,
42
- className: cn(
42
+ className: twMerge(
43
43
  "not-prose group relative my-6 overflow-hidden rounded-lg border bg-secondary/50 text-sm",
44
44
  className
45
45
  ),
@@ -73,7 +73,7 @@ function CopyButton({
73
73
  "button",
74
74
  {
75
75
  type: "button",
76
- className: cn(
76
+ className: twMerge(
77
77
  buttonVariants({
78
78
  color: "ghost",
79
79
  className: "transition-all group-hover:opacity-100"
@@ -88,13 +88,13 @@ function CopyButton({
88
88
  /* @__PURE__ */ jsx(
89
89
  CheckIcon,
90
90
  {
91
- className: cn("size-3.5 transition-transform", !checked && "scale-0")
91
+ className: twMerge("size-3.5 transition-transform", !checked && "scale-0")
92
92
  }
93
93
  ),
94
94
  /* @__PURE__ */ jsx(
95
95
  CopyIcon,
96
96
  {
97
- className: cn(
97
+ className: twMerge(
98
98
  "absolute size-3.5 transition-transform",
99
99
  checked && "scale-0"
100
100
  )
@@ -10,7 +10,7 @@ var buttonVariants = cva(
10
10
  secondary: "border bg-secondary text-secondary-foreground hover:bg-accent hover:text-accent-foreground"
11
11
  },
12
12
  size: {
13
- lg: "px-4 py-2 text-medium",
13
+ lg: "px-4 py-2 text-[15px]",
14
14
  icon: "p-1.5 [&_svg]:size-5"
15
15
  }
16
16
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
- cn
3
- } from "./chunk-KCGRUOMD.js";
2
+ twMerge
3
+ } from "./chunk-TK3TM3MR.js";
4
4
 
5
5
  // src/components/ui/collapsible.tsx
6
6
  import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
@@ -13,7 +13,7 @@ var CollapsibleContent2 = forwardRef(({ className, children, ...props }, ref) =>
13
13
  CollapsiblePrimitive.CollapsibleContent,
14
14
  {
15
15
  ref,
16
- className: cn(
16
+ className: twMerge(
17
17
  "overflow-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down",
18
18
  className
19
19
  ),
@@ -1,6 +1,6 @@
1
1
  import {
2
- cn
3
- } from "./chunk-KCGRUOMD.js";
2
+ twMerge
3
+ } from "./chunk-TK3TM3MR.js";
4
4
 
5
5
  // src/components/ui/popover.tsx
6
6
  import * as PopoverPrimitive from "@radix-ui/react-popover";
@@ -15,7 +15,7 @@ var PopoverContent = React.forwardRef(({ className, align = "center", sideOffset
15
15
  align,
16
16
  sideOffset,
17
17
  side: "bottom",
18
- className: cn(
18
+ className: twMerge(
19
19
  "z-50 max-w-[90vw] rounded-md border bg-popover p-2 text-popover-foreground shadow-md outline-none data-[state=closed]:animate-popover-out data-[state=open]:animate-popover-in",
20
20
  className
21
21
  ),
@@ -1,6 +1,6 @@
1
1
  import {
2
- cn
3
- } from "./chunk-KCGRUOMD.js";
2
+ twMerge
3
+ } from "./chunk-TK3TM3MR.js";
4
4
 
5
5
  // src/components/card.tsx
6
6
  import Link from "fumadocs-core/link";
@@ -10,7 +10,7 @@ function Cards(props) {
10
10
  "div",
11
11
  {
12
12
  ...props,
13
- className: cn("grid grid-cols-1 gap-4 sm:grid-cols-2", props.className),
13
+ className: twMerge("grid grid-cols-1 gap-4 sm:grid-cols-2", props.className),
14
14
  children: props.children
15
15
  }
16
16
  );
@@ -25,7 +25,7 @@ function Card({
25
25
  Link,
26
26
  {
27
27
  ...props,
28
- className: cn(
28
+ className: twMerge(
29
29
  "not-prose block rounded-lg border bg-card p-4 text-sm text-card-foreground shadow-md transition-colors hover:bg-muted/80",
30
30
  props.className
31
31
  ),
@@ -0,0 +1,6 @@
1
+ // src/utils/cn.ts
2
+ import { twMerge } from "tailwind-merge";
3
+
4
+ export {
5
+ twMerge
6
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
- cn
3
- } from "./chunk-KCGRUOMD.js";
2
+ twMerge
3
+ } from "./chunk-TK3TM3MR.js";
4
4
 
5
5
  // src/components/heading.tsx
6
6
  import { LinkIcon } from "lucide-react";
@@ -11,7 +11,7 @@ function Heading({
11
11
  ...props
12
12
  }) {
13
13
  const As = as ?? "h1";
14
- return /* @__PURE__ */ jsx(As, { className: cn("scroll-m-20", className), ...props, children: props.id ? /* @__PURE__ */ jsxs("a", { href: `#${props.id}`, className: "not-prose group", children: [
14
+ return /* @__PURE__ */ jsx(As, { className: twMerge("scroll-m-20", className), ...props, children: props.id ? /* @__PURE__ */ jsxs("a", { href: `#${props.id}`, className: "not-prose group", children: [
15
15
  props.children,
16
16
  /* @__PURE__ */ jsx(
17
17
  LinkIcon,
@@ -6,10 +6,10 @@ import {
6
6
  } from "./chunk-YAHHY62W.js";
7
7
  import {
8
8
  buttonVariants
9
- } from "./chunk-FAZEWBYX.js";
9
+ } from "./chunk-7GZKFBAP.js";
10
10
  import {
11
- cn
12
- } from "./chunk-KCGRUOMD.js";
11
+ twMerge
12
+ } from "./chunk-TK3TM3MR.js";
13
13
 
14
14
  // src/components/dialog/search.tsx
15
15
  import { FileTextIcon, HashIcon, TextIcon } from "lucide-react";
@@ -32,7 +32,7 @@ var DialogContent = React.forwardRef(({ className, children, ...props }, ref) =>
32
32
  DialogPrimitive.Content,
33
33
  {
34
34
  ref,
35
- className: cn(
35
+ className: twMerge(
36
36
  "fixed left-[50%] top-[10vh] z-50 w-[98vw] max-w-[640px] origin-left translate-x-[-50%] rounded-lg border bg-popover p-6 text-popover-foreground shadow-lg data-[state=closed]:animate-dialog-out data-[state=open]:animate-dialog-in",
37
37
  className
38
38
  ),
@@ -49,7 +49,7 @@ function DialogHeader({
49
49
  return /* @__PURE__ */ jsx(
50
50
  "div",
51
51
  {
52
- className: cn(
52
+ className: twMerge(
53
53
  "flex flex-col space-y-1.5 text-center sm:text-left",
54
54
  className
55
55
  ),
@@ -62,7 +62,7 @@ function DialogFooter({
62
62
  className,
63
63
  ...props
64
64
  }) {
65
- return /* @__PURE__ */ jsx("div", { className: cn("mt-auto flex flex-col p-3", className), ...props });
65
+ return /* @__PURE__ */ jsx("div", { className: twMerge("mt-auto flex flex-col p-3", className), ...props });
66
66
  }
67
67
  DialogFooter.displayName = "DialogFooter";
68
68
  var DialogClose = DialogPrimitive.Close;
@@ -73,7 +73,7 @@ var Command = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
73
73
  CommandPrimitive,
74
74
  {
75
75
  ref,
76
- className: cn("flex max-h-[80vh] flex-col", className),
76
+ className: twMerge("flex max-h-[80vh] flex-col", className),
77
77
  shouldFilter: false,
78
78
  loop: true,
79
79
  ...props
@@ -86,7 +86,7 @@ var CommandInput = React2.forwardRef(({ className, ...props }, ref) => /* @__PUR
86
86
  CommandPrimitive.Input,
87
87
  {
88
88
  ref,
89
- className: cn(
89
+ className: twMerge(
90
90
  "w-full bg-transparent py-3 text-base outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed",
91
91
  className
92
92
  ),
@@ -96,7 +96,7 @@ var CommandInput = React2.forwardRef(({ className, ...props }, ref) => /* @__PUR
96
96
  /* @__PURE__ */ jsx2(
97
97
  DialogClose,
98
98
  {
99
- className: cn(
99
+ className: twMerge(
100
100
  buttonVariants({
101
101
  color: "outline",
102
102
  size: "icon",
@@ -112,7 +112,7 @@ var CommandList = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE
112
112
  CommandPrimitive.List,
113
113
  {
114
114
  ref,
115
- className: cn("max-h-[460px] overflow-y-auto border-t p-2", className),
115
+ className: twMerge("max-h-[460px] overflow-y-auto border-t p-2", className),
116
116
  ...props
117
117
  }
118
118
  ));
@@ -130,7 +130,7 @@ var CommandGroup = React2.forwardRef(({ className, ...props }, ref) => /* @__PUR
130
130
  CommandPrimitive.Group,
131
131
  {
132
132
  ref,
133
- className: cn(
133
+ className: twMerge(
134
134
  "overflow-hidden [&_[cmdk-group-heading]]:px-3 [&_[cmdk-group-heading]]:py-2 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",
135
135
  className
136
136
  ),
@@ -142,7 +142,7 @@ var CommandSeparator = React2.forwardRef(({ className, ...props }, ref) => /* @_
142
142
  CommandPrimitive.Separator,
143
143
  {
144
144
  ref,
145
- className: cn("h-px bg-border", className),
145
+ className: twMerge("h-px bg-border", className),
146
146
  ...props
147
147
  }
148
148
  ));
@@ -151,7 +151,7 @@ var CommandItem = React2.forwardRef(({ className, icon, nested = false, children
151
151
  CommandPrimitive.Item,
152
152
  {
153
153
  ref,
154
- className: cn(
154
+ className: twMerge(
155
155
  "select-none rounded-lg px-2 text-sm aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
156
156
  className
157
157
  ),
@@ -159,7 +159,7 @@ var CommandItem = React2.forwardRef(({ className, icon, nested = false, children
159
159
  children: /* @__PURE__ */ jsxs2(
160
160
  "div",
161
161
  {
162
- className: cn(
162
+ className: twMerge(
163
163
  "flex min-h-10 items-center gap-3",
164
164
  nested && "ml-2 gap-2 border-l pl-4"
165
165
  ),
@@ -214,7 +214,7 @@ function Search2({ search, onSearchChange, results }) {
214
214
  placeholder: text.search
215
215
  }
216
216
  ),
217
- /* @__PURE__ */ jsxs3(CommandList, { className: cn(hideList && "hidden"), children: [
217
+ /* @__PURE__ */ jsxs3(CommandList, { className: twMerge(hideList && "hidden"), children: [
218
218
  /* @__PURE__ */ jsx3(CommandEmpty, { children: text.searchNoResult }),
219
219
  /* @__PURE__ */ jsx3(CommandGroup, { value: "result", children: items.map((item) => /* @__PURE__ */ jsx3(
220
220
  CommandItem,
@@ -1,6 +1,6 @@
1
1
  import {
2
- cn
3
- } from "./chunk-KCGRUOMD.js";
2
+ twMerge
3
+ } from "./chunk-TK3TM3MR.js";
4
4
 
5
5
  // src/components/ui/scroll-area.tsx
6
6
  import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
@@ -10,7 +10,7 @@ var ScrollArea = React.forwardRef(({ className, children, ...props }, ref) => /*
10
10
  ScrollAreaPrimitive.Root,
11
11
  {
12
12
  ref,
13
- className: cn("overflow-hidden", className),
13
+ className: twMerge("overflow-hidden", className),
14
14
  ...props,
15
15
  children: [
16
16
  /* @__PURE__ */ jsx(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
@@ -26,7 +26,7 @@ var ScrollBar = React.forwardRef(({ className, orientation = "vertical", ...prop
26
26
  {
27
27
  ref,
28
28
  orientation,
29
- className: cn(
29
+ className: twMerge(
30
30
  "flex select-none data-[state=hidden]:animate-fade-out",
31
31
  orientation === "vertical" && "h-full w-1.5",
32
32
  orientation === "horizontal" && "h-1.5 flex-col",
@@ -1,11 +1,9 @@
1
- import * as react from 'react';
1
+ import * as React from 'react';
2
2
  import * as AccordionPrimitive from '@radix-ui/react-accordion';
3
3
 
4
- declare const Accordions: react.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & react.RefAttributes<HTMLDivElement>>;
5
- declare const MultipleAccordions: react.ForwardRefExoticComponent<AccordionPrimitive.AccordionMultipleProps & react.RefAttributes<HTMLDivElement>>;
6
- declare const SingleAccordions: react.ForwardRefExoticComponent<AccordionPrimitive.AccordionSingleProps & react.RefAttributes<HTMLDivElement>>;
7
- declare const Accordion: react.ForwardRefExoticComponent<Omit<Omit<AccordionPrimitive.AccordionItemProps & react.RefAttributes<HTMLDivElement>, "ref">, "value"> & {
4
+ declare const Accordions: React.ForwardRefExoticComponent<(Omit<AccordionPrimitive.AccordionSingleProps, "value" | "onValueChange"> | Omit<AccordionPrimitive.AccordionMultipleProps, "value" | "onValueChange">) & React.RefAttributes<HTMLDivElement>>;
5
+ declare const Accordion: React.ForwardRefExoticComponent<Omit<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref">, "value"> & {
8
6
  title: string;
9
- } & react.RefAttributes<HTMLDivElement>>;
7
+ } & React.RefAttributes<HTMLDivElement>>;
10
8
 
11
- export { Accordion, Accordions, MultipleAccordions, SingleAccordions };
9
+ export { Accordion, Accordions };
@@ -4,10 +4,10 @@ import {
4
4
  } from "../chunk-24NYFO7H.js";
5
5
  import {
6
6
  buttonVariants
7
- } from "../chunk-FAZEWBYX.js";
7
+ } from "../chunk-7GZKFBAP.js";
8
8
  import {
9
- cn
10
- } from "../chunk-KCGRUOMD.js";
9
+ twMerge
10
+ } from "../chunk-TK3TM3MR.js";
11
11
  import "../chunk-6C3VEZWH.js";
12
12
 
13
13
  // src/components/accordion.tsx
@@ -18,81 +18,60 @@ import {
18
18
  useState,
19
19
  useEffect
20
20
  } from "react";
21
- import { cva } from "class-variance-authority";
22
21
  import { jsx, jsxs } from "react/jsx-runtime";
23
- var variants = cva("divide-y divide-border");
24
- var Accordions = forwardRef((props, ref) => {
25
- if (props.type === "multiple") {
26
- return /* @__PURE__ */ jsx(MultipleAccordions, { ref, ...props });
27
- }
28
- return /* @__PURE__ */ jsx(
29
- SingleAccordions,
30
- {
31
- ref,
32
- ...props,
33
- type: "single"
34
- }
22
+ var Accordions = forwardRef(({ type = "single", className, defaultValue, ...props }, ref) => {
23
+ const [value, setValue] = useState(
24
+ type === "single" ? defaultValue ?? "" : defaultValue ?? []
35
25
  );
36
- });
37
- Accordions.displayName = "Accordions";
38
- var MultipleAccordions = forwardRef(({ className, defaultValue, ...props }, ref) => {
39
- const [defValue, setDefValue] = useState(defaultValue);
40
- const value = props.value ?? defValue;
41
- const setValue = props.onValueChange?.bind(props) ?? setDefValue;
42
26
  useEffect(() => {
43
- if (window.location.hash.length > 0)
44
- setValue([window.location.hash.substring(1)]);
45
- }, [setValue]);
46
- return /* @__PURE__ */ jsx(
47
- AccordionPrimitive.Root,
48
- {
49
- ref,
50
- value,
51
- onValueChange: setValue,
52
- className: cn(variants(), className),
53
- ...props
54
- }
27
+ const id = window.location.hash.substring(1);
28
+ if (id.length > 0)
29
+ setValue((prev) => {
30
+ return type === "single" ? id : [id, ...Array.isArray(prev) ? prev : []];
31
+ });
32
+ }, [type]);
33
+ return (
34
+ // @ts-expect-error -- Multiple types
35
+ /* @__PURE__ */ jsx(
36
+ AccordionPrimitive.Root,
37
+ {
38
+ type,
39
+ ref,
40
+ value,
41
+ onValueChange: setValue,
42
+ collapsible: true,
43
+ className: twMerge(
44
+ "divide-y divide-border overflow-hidden rounded-lg border bg-card",
45
+ className
46
+ ),
47
+ ...props
48
+ }
49
+ )
55
50
  );
56
51
  });
57
- MultipleAccordions.displayName = "MultipleAccordions";
58
- var SingleAccordions = forwardRef(({ className, defaultValue, ...props }, ref) => {
59
- const [defValue, setDefValue] = useState(defaultValue);
60
- const value = props.value ?? defValue;
61
- const setValue = props.onValueChange?.bind(props) ?? setDefValue;
62
- useEffect(() => {
63
- if (window.location.hash.length > 0)
64
- setValue(window.location.hash.substring(1));
65
- }, [setValue]);
66
- return /* @__PURE__ */ jsx(
67
- AccordionPrimitive.Root,
68
- {
69
- ref,
70
- value,
71
- onValueChange: setValue,
72
- collapsible: true,
73
- className: cn(variants(), className),
74
- ...props
75
- }
76
- );
77
- });
78
- SingleAccordions.displayName = "SingleAccordions";
79
- var Accordion = forwardRef(({ title, className, children, ...props }, ref) => {
52
+ Accordions.displayName = "Accordions";
53
+ var Accordion = forwardRef(({ title, className, id, children, ...props }, ref) => {
80
54
  return /* @__PURE__ */ jsxs(
81
55
  AccordionPrimitive.Item,
82
56
  {
83
57
  ref,
84
- value: props.id ?? title,
85
- className: cn("group/accordion scroll-m-20", className),
58
+ value: id ?? title,
59
+ className: twMerge("group/accordion relative scroll-m-20", className),
86
60
  ...props,
87
61
  children: [
88
- /* @__PURE__ */ jsxs(AccordionPrimitive.Header, { className: "not-prose flex items-center text-medium text-muted-foreground", children: [
89
- /* @__PURE__ */ jsxs(AccordionPrimitive.Trigger, { className: "flex w-full items-center gap-1 py-4 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", children: [
90
- /* @__PURE__ */ jsx(ChevronRightIcon, { className: "size-5 transition-transform duration-200 group-data-[state=open]/accordion:rotate-90" }),
91
- /* @__PURE__ */ jsx("span", { className: "text-medium font-medium text-foreground", children: title })
92
- ] }),
93
- props.id ? /* @__PURE__ */ jsx(CopyButton, { id: props.id }) : null
94
- ] }),
95
- /* @__PURE__ */ jsx(AccordionPrimitive.Content, { className: "overflow-hidden data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down", children: /* @__PURE__ */ jsx("div", { className: "pb-4 pl-6 text-sm prose-no-margin", children }) })
62
+ /* @__PURE__ */ jsx(
63
+ AccordionPrimitive.Header,
64
+ {
65
+ id,
66
+ className: "not-prose font-medium text-foreground",
67
+ children: /* @__PURE__ */ jsxs(AccordionPrimitive.Trigger, { className: "flex w-full items-center gap-2 p-4 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", children: [
68
+ /* @__PURE__ */ jsx(ChevronRightIcon, { className: "size-4 text-muted-foreground transition-transform duration-200 group-data-[state=open]/accordion:rotate-90" }),
69
+ title
70
+ ] })
71
+ }
72
+ ),
73
+ id ? /* @__PURE__ */ jsx(CopyButton, { id }) : null,
74
+ /* @__PURE__ */ jsx(AccordionPrimitive.Content, { className: "overflow-hidden data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down", children: /* @__PURE__ */ jsx("div", { className: "ml-2 p-4 pt-0 prose-no-margin", children }) })
96
75
  ]
97
76
  }
98
77
  );
@@ -108,10 +87,10 @@ function CopyButton({ id }) {
108
87
  {
109
88
  type: "button",
110
89
  "aria-label": "Copy Link",
111
- className: cn(
90
+ className: twMerge(
112
91
  buttonVariants({
113
92
  color: "ghost",
114
- className: "opacity-0 transition-all group-data-[state=open]/accordion:opacity-100"
93
+ className: "absolute top-4 right-4 text-muted-foreground"
115
94
  })
116
95
  ),
117
96
  onClick,
@@ -122,7 +101,5 @@ function CopyButton({ id }) {
122
101
  Accordion.displayName = "Accordion";
123
102
  export {
124
103
  Accordion,
125
- Accordions,
126
- MultipleAccordions,
127
- SingleAccordions
104
+ Accordions
128
105
  };
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  buttonVariants
4
- } from "../chunk-FAZEWBYX.js";
4
+ } from "../chunk-7GZKFBAP.js";
5
5
  import {
6
- cn
7
- } from "../chunk-KCGRUOMD.js";
6
+ twMerge
7
+ } from "../chunk-TK3TM3MR.js";
8
8
  import "../chunk-6C3VEZWH.js";
9
9
 
10
10
  // src/components/api.tsx
@@ -19,7 +19,7 @@ function Root({
19
19
  return /* @__PURE__ */ jsx(
20
20
  "div",
21
21
  {
22
- className: cn("space-y-24 text-sm text-muted-foreground", className),
22
+ className: twMerge("space-y-24 text-sm text-muted-foreground", className),
23
23
  ...props,
24
24
  children
25
25
  }
@@ -33,7 +33,7 @@ function API({
33
33
  return /* @__PURE__ */ jsx(
34
34
  "div",
35
35
  {
36
- className: cn("flex flex-col gap-x-6 gap-y-2 xl:flex-row", className),
36
+ className: twMerge("flex flex-col gap-x-6 gap-y-2 xl:flex-row", className),
37
37
  ...props,
38
38
  children
39
39
  }
@@ -62,9 +62,9 @@ function APIInfo({
62
62
  color = "yellow";
63
63
  if (["DELETE"].includes(method))
64
64
  color = "red";
65
- return /* @__PURE__ */ jsxs("div", { className: cn("flex-1", className), ...props, children: [
65
+ return /* @__PURE__ */ jsxs("div", { className: twMerge("flex-1", className), ...props, children: [
66
66
  /* @__PURE__ */ jsxs("h2", { className: "not-prose mb-2 inline-flex items-center gap-3 font-mono", children: [
67
- /* @__PURE__ */ jsx("div", { className: cn(badgeVariants({ color })), children: method }),
67
+ /* @__PURE__ */ jsx("div", { className: twMerge(badgeVariants({ color })), children: method }),
68
68
  /* @__PURE__ */ jsx("p", { className: "text-xs", children: route })
69
69
  ] }),
70
70
  children
@@ -80,8 +80,8 @@ function Property({
80
80
  return /* @__PURE__ */ jsxs("div", { className: "mb-4 flex flex-col rounded-lg border bg-card p-3 prose-no-margin", children: [
81
81
  /* @__PURE__ */ jsxs("h4", { className: "inline-flex items-center gap-4", children: [
82
82
  /* @__PURE__ */ jsx("code", { children: name }),
83
- required ? /* @__PURE__ */ jsx("div", { className: cn(badgeVariants({ color: "red" })), children: "Required" }) : null,
84
- deprecated ? /* @__PURE__ */ jsx("div", { className: cn(badgeVariants({ color: "yellow" })), children: "Deprecated" }) : null,
83
+ required ? /* @__PURE__ */ jsx("div", { className: twMerge(badgeVariants({ color: "red" })), children: "Required" }) : null,
84
+ deprecated ? /* @__PURE__ */ jsx("div", { className: twMerge(badgeVariants({ color: "yellow" })), children: "Deprecated" }) : null,
85
85
  /* @__PURE__ */ jsx("span", { className: "ml-auto font-mono text-[13px] text-muted-foreground", children: type })
86
86
  ] }),
87
87
  children
@@ -96,7 +96,7 @@ function APIExample({
96
96
  return /* @__PURE__ */ jsxs(
97
97
  "div",
98
98
  {
99
- className: cn(
99
+ className: twMerge(
100
100
  "sticky top-14 h-fit xl:w-[40%] xl:min-w-[400px]",
101
101
  className
102
102
  ),
@@ -108,7 +108,7 @@ function APIExample({
108
108
  "button",
109
109
  {
110
110
  type: "button",
111
- className: cn(
111
+ className: twMerge(
112
112
  buttonVariants({
113
113
  color: "secondary",
114
114
  size: "lg"
@@ -122,7 +122,7 @@ function APIExample({
122
122
  ),
123
123
  /* @__PURE__ */ jsx("div", { className: "h-px flex-1 bg-border" })
124
124
  ] }),
125
- /* @__PURE__ */ jsx("div", { className: cn(!isOpen && "max-xl:hidden"), children })
125
+ /* @__PURE__ */ jsx("div", { className: twMerge(!isOpen && "max-xl:hidden"), children })
126
126
  ]
127
127
  }
128
128
  );
@@ -1,13 +1,13 @@
1
- import * as react from 'react';
1
+ import * as React from 'react';
2
2
  import { HTMLAttributes, ReactNode } from 'react';
3
3
 
4
- declare const Callout: react.ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "title" | "type" | "icon"> & {
4
+ declare const Callout: React.ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "title" | "type" | "icon"> & {
5
5
  title?: ReactNode;
6
6
  /**
7
7
  * @defaultValue info
8
8
  */
9
9
  type?: "info" | "warn" | "error" | undefined;
10
10
  icon?: ReactNode;
11
- } & react.RefAttributes<HTMLDivElement>>;
11
+ } & React.RefAttributes<HTMLDivElement>>;
12
12
 
13
13
  export { Callout };
@@ -1,6 +1,6 @@
1
1
  import {
2
- cn
3
- } from "../chunk-KCGRUOMD.js";
2
+ twMerge
3
+ } from "../chunk-TK3TM3MR.js";
4
4
  import "../chunk-6C3VEZWH.js";
5
5
 
6
6
  // src/components/callout.tsx
@@ -13,7 +13,7 @@ var Callout = forwardRef(
13
13
  "div",
14
14
  {
15
15
  ref,
16
- className: cn(
16
+ className: twMerge(
17
17
  "my-6 flex flex-row gap-2 rounded-lg border bg-card p-3 text-sm text-muted-foreground shadow-md",
18
18
  className
19
19
  ),
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  Card,
3
3
  Cards
4
- } from "../chunk-F62NYOL5.js";
5
- import "../chunk-KCGRUOMD.js";
4
+ } from "../chunk-REAI3OOF.js";
5
+ import "../chunk-TK3TM3MR.js";
6
6
  import "../chunk-6C3VEZWH.js";
7
7
  export {
8
8
  Card,
@@ -1,4 +1,4 @@
1
- import * as react from 'react';
1
+ import * as React from 'react';
2
2
  import { HTMLAttributes, ReactNode } from 'react';
3
3
 
4
4
  type CodeBlockProps = HTMLAttributes<HTMLElement> & {
@@ -8,13 +8,13 @@ type CodeBlockProps = HTMLAttributes<HTMLElement> & {
8
8
  icon?: ReactNode;
9
9
  allowCopy?: boolean;
10
10
  };
11
- declare const Pre: react.ForwardRefExoticComponent<HTMLAttributes<HTMLPreElement> & react.RefAttributes<HTMLPreElement>>;
12
- declare const CodeBlock: react.ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
11
+ declare const Pre: React.ForwardRefExoticComponent<HTMLAttributes<HTMLPreElement> & React.RefAttributes<HTMLPreElement>>;
12
+ declare const CodeBlock: React.ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
13
13
  /**
14
14
  * Icon of code block
15
15
  */
16
16
  icon?: ReactNode;
17
17
  allowCopy?: boolean | undefined;
18
- } & react.RefAttributes<HTMLElement>>;
18
+ } & React.RefAttributes<HTMLElement>>;
19
19
 
20
20
  export { CodeBlock, type CodeBlockProps, Pre };
@@ -2,11 +2,11 @@
2
2
  import {
3
3
  CodeBlock,
4
4
  Pre
5
- } from "../chunk-TSEDUE4C.js";
6
- import "../chunk-OG3QOLYP.js";
5
+ } from "../chunk-3YZ7NCMG.js";
6
+ import "../chunk-ZOR33LFA.js";
7
7
  import "../chunk-24NYFO7H.js";
8
- import "../chunk-FAZEWBYX.js";
9
- import "../chunk-KCGRUOMD.js";
8
+ import "../chunk-7GZKFBAP.js";
9
+ import "../chunk-TK3TM3MR.js";
10
10
  import "../chunk-6C3VEZWH.js";
11
11
  export {
12
12
  CodeBlock,