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
@@ -2,11 +2,11 @@
2
2
  import {
3
3
  SearchDialog,
4
4
  SearchDialogContent
5
- } from "../../chunk-UGTA4YYX.js";
5
+ } from "../../chunk-WDMDQTHE.js";
6
6
  import "../../chunk-36MVEJ25.js";
7
7
  import "../../chunk-YAHHY62W.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
 
12
12
  // src/components/dialog/search-algolia.tsx
@@ -2,13 +2,13 @@
2
2
  import {
3
3
  SearchDialog,
4
4
  SearchDialogContent
5
- } from "../../chunk-UGTA4YYX.js";
5
+ } from "../../chunk-WDMDQTHE.js";
6
6
  import "../../chunk-36MVEJ25.js";
7
7
  import {
8
8
  useI18n
9
9
  } from "../../chunk-YAHHY62W.js";
10
- import "../../chunk-FAZEWBYX.js";
11
- import "../../chunk-KCGRUOMD.js";
10
+ import "../../chunk-7GZKFBAP.js";
11
+ import "../../chunk-TK3TM3MR.js";
12
12
  import "../../chunk-6C3VEZWH.js";
13
13
 
14
14
  // src/components/dialog/search-default.tsx
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  SearchDialog,
3
3
  SearchDialogContent
4
- } from "../../chunk-UGTA4YYX.js";
4
+ } from "../../chunk-WDMDQTHE.js";
5
5
  import "../../chunk-36MVEJ25.js";
6
6
  import "../../chunk-YAHHY62W.js";
7
- import "../../chunk-FAZEWBYX.js";
8
- import "../../chunk-KCGRUOMD.js";
7
+ import "../../chunk-7GZKFBAP.js";
8
+ import "../../chunk-TK3TM3MR.js";
9
9
  import "../../chunk-6C3VEZWH.js";
10
10
  export {
11
11
  SearchDialog,
@@ -1,20 +1,20 @@
1
1
  import { HTMLAttributes, ReactNode } from 'react';
2
2
 
3
3
  declare function Files({ className, ...props }: HTMLAttributes<HTMLDivElement>): JSX.Element;
4
- interface FileProps {
5
- title: string;
4
+ interface FileProps extends HTMLAttributes<HTMLDivElement> {
5
+ name: string;
6
6
  icon?: ReactNode;
7
+ }
8
+ interface FolderProps extends HTMLAttributes<HTMLDivElement> {
9
+ name: string;
7
10
  /**
8
11
  * Open folder by default
9
12
  *
10
13
  * @defaultValue false
11
14
  */
12
15
  defaultOpen?: boolean;
13
- /**
14
- * hildren files of the folder, considered as file if empty
15
- */
16
- children?: ReactNode;
17
16
  }
18
- declare function File({ title, icon, defaultOpen, children, }: FileProps): JSX.Element;
17
+ declare function File({ name, icon, className, ...rest }: FileProps): JSX.Element;
18
+ declare function Folder({ name, defaultOpen, ...props }: FolderProps): JSX.Element;
19
19
 
20
- export { File, Files };
20
+ export { File, type FileProps, Files, Folder, type FolderProps };
@@ -3,15 +3,16 @@ import {
3
3
  Collapsible,
4
4
  CollapsibleContent,
5
5
  CollapsibleTrigger
6
- } from "../chunk-5EZE3X7G.js";
6
+ } from "../chunk-7XPZOMJ2.js";
7
7
  import {
8
- cn
9
- } from "../chunk-KCGRUOMD.js";
8
+ twMerge
9
+ } from "../chunk-TK3TM3MR.js";
10
10
  import "../chunk-6C3VEZWH.js";
11
11
 
12
12
  // src/components/files.tsx
13
13
  import { cva } from "class-variance-authority";
14
14
  import { FileIcon, FolderIcon, FolderOpenIcon } from "lucide-react";
15
+ import { useState } from "react";
15
16
  import { jsx, jsxs } from "react/jsx-runtime";
16
17
  var item = cva(
17
18
  "flex flex-row items-center gap-2 rounded-md px-2 py-1.5 text-sm hover:bg-accent hover:text-accent-foreground [&_svg]:size-4"
@@ -23,34 +24,39 @@ function Files({
23
24
  return /* @__PURE__ */ jsx(
24
25
  "div",
25
26
  {
26
- className: cn("not-prose rounded-md border bg-card p-2", className),
27
+ className: twMerge("not-prose rounded-md border bg-card p-2", className),
27
28
  ...props,
28
29
  children: props.children
29
30
  }
30
31
  );
31
32
  }
32
33
  function File({
33
- title,
34
- icon,
35
- defaultOpen,
36
- children
34
+ name,
35
+ icon = /* @__PURE__ */ jsx(FileIcon, {}),
36
+ className,
37
+ ...rest
38
+ }) {
39
+ return /* @__PURE__ */ jsxs("div", { className: twMerge(item({ className })), ...rest, children: [
40
+ icon,
41
+ name
42
+ ] });
43
+ }
44
+ function Folder({
45
+ name,
46
+ defaultOpen = false,
47
+ ...props
37
48
  }) {
38
- if (!children) {
39
- return /* @__PURE__ */ jsxs("p", { className: cn(item()), children: [
40
- icon ?? /* @__PURE__ */ jsx(FileIcon, {}),
41
- title
42
- ] });
43
- }
44
- return /* @__PURE__ */ jsxs(Collapsible, { defaultOpen, children: [
45
- /* @__PURE__ */ jsxs(CollapsibleTrigger, { className: cn(item({ className: "group w-full" })), children: [
46
- /* @__PURE__ */ jsx(FolderIcon, { className: "group-data-[state=open]:hidden" }),
47
- /* @__PURE__ */ jsx(FolderOpenIcon, { className: "group-data-[state=closed]:hidden" }),
48
- title
49
+ const [open, setOpen] = useState(defaultOpen);
50
+ return /* @__PURE__ */ jsxs(Collapsible, { open, onOpenChange: setOpen, ...props, children: [
51
+ /* @__PURE__ */ jsxs(CollapsibleTrigger, { className: twMerge(item({ className: "w-full" })), children: [
52
+ open ? /* @__PURE__ */ jsx(FolderOpenIcon, {}) : /* @__PURE__ */ jsx(FolderIcon, {}),
53
+ name
49
54
  ] }),
50
- /* @__PURE__ */ jsx(CollapsibleContent, { children: /* @__PURE__ */ jsx("div", { className: "ml-4 flex flex-col border-l py-2 pl-2", children }) })
55
+ /* @__PURE__ */ jsx(CollapsibleContent, { children: /* @__PURE__ */ jsx("div", { className: "ml-2 flex flex-col border-l pl-2", children: props.children }) })
51
56
  ] });
52
57
  }
53
58
  export {
54
59
  File,
55
- Files
60
+ Files,
61
+ Folder
56
62
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Heading
3
- } from "../chunk-CBOHU2VN.js";
4
- import "../chunk-KCGRUOMD.js";
3
+ } from "../chunk-UKE65HV3.js";
4
+ import "../chunk-TK3TM3MR.js";
5
5
  import "../chunk-6C3VEZWH.js";
6
6
  export {
7
7
  Heading
@@ -1,11 +1,9 @@
1
1
  import { TOCItemType } from 'fumadocs-core/server';
2
- import { ReactNode } from 'react';
3
2
 
4
3
  interface InlineTocProps {
5
4
  items: TOCItemType[];
6
5
  defaultOpen?: boolean;
7
- children?: ReactNode;
8
6
  }
9
- declare function InlineTOC({ items, defaultOpen, children, }: InlineTocProps): JSX.Element;
7
+ declare function InlineTOC({ items, defaultOpen }: InlineTocProps): JSX.Element;
10
8
 
11
9
  export { InlineTOC, type InlineTocProps };
@@ -3,42 +3,31 @@ import {
3
3
  Collapsible,
4
4
  CollapsibleContent,
5
5
  CollapsibleTrigger
6
- } from "../chunk-5EZE3X7G.js";
7
- import "../chunk-KCGRUOMD.js";
6
+ } from "../chunk-7XPZOMJ2.js";
7
+ import "../chunk-TK3TM3MR.js";
8
8
  import "../chunk-6C3VEZWH.js";
9
9
 
10
10
  // src/components/inline-toc.tsx
11
11
  import { ChevronDown } from "lucide-react";
12
12
  import { jsx, jsxs } from "react/jsx-runtime";
13
- function InlineTOC({
14
- items,
15
- defaultOpen,
16
- children
17
- }) {
13
+ function InlineTOC({ items, defaultOpen }) {
18
14
  return /* @__PURE__ */ jsxs(
19
15
  Collapsible,
20
16
  {
21
17
  defaultOpen,
22
18
  className: "not-prose rounded-lg border bg-card text-card-foreground",
23
19
  children: [
24
- /* @__PURE__ */ jsx(CollapsibleTrigger, { asChild: true, children: children ?? /* @__PURE__ */ jsxs(
25
- "button",
26
- {
27
- type: "button",
28
- className: "inline-flex w-full items-center justify-between p-4 text-medium font-medium [&[data-state=open]>svg]:rotate-180",
29
- children: [
30
- "Table of Contents",
31
- /* @__PURE__ */ jsx(ChevronDown, { className: "size-4 transition-transform duration-200" })
32
- ]
33
- }
34
- ) }),
35
- /* @__PURE__ */ jsx(CollapsibleContent, { children: /* @__PURE__ */ jsx("div", { className: "flex flex-col px-6 pb-4 text-sm text-muted-foreground", children: items.map((item) => /* @__PURE__ */ jsx(
20
+ /* @__PURE__ */ jsxs(CollapsibleTrigger, { className: "inline-flex w-full items-center justify-between p-4 font-medium [&[data-state=open]>svg]:rotate-180", children: [
21
+ "Table of Contents",
22
+ /* @__PURE__ */ jsx(ChevronDown, { className: "size-4 transition-transform duration-200" })
23
+ ] }),
24
+ /* @__PURE__ */ jsx(CollapsibleContent, { children: /* @__PURE__ */ jsx("div", { className: "flex flex-col p-4 pt-0 text-sm text-muted-foreground", children: items.map((item) => /* @__PURE__ */ jsx(
36
25
  "a",
37
26
  {
38
27
  href: item.url,
39
- className: "py-1.5 hover:text-accent-foreground",
28
+ className: "border-l py-1.5 hover:text-accent-foreground",
40
29
  style: {
41
- paddingLeft: 16 * Math.max(item.depth - 2, 0)
30
+ paddingLeft: 12 * Math.max(item.depth - 1, 0)
42
31
  },
43
32
  children: item.title
44
33
  },
@@ -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/roll-button.tsx
@@ -31,7 +31,7 @@ function RollButton({ percentage = 0.2 }) {
31
31
  {
32
32
  type: "button",
33
33
  "aria-label": "Scroll to Top",
34
- className: cn(
34
+ className: twMerge(
35
35
  buttonVariants({
36
36
  color: "secondary",
37
37
  size: "icon",
@@ -1,12 +1,12 @@
1
1
  import * as TabsPrimitive from '@radix-ui/react-tabs';
2
2
  import { TabsContentProps } from '@radix-ui/react-tabs';
3
- import * as react from 'react';
3
+ import * as React from 'react';
4
4
  import { ReactNode } from 'react';
5
5
 
6
- declare const Tabs$1: react.ForwardRefExoticComponent<TabsPrimitive.TabsProps & react.RefAttributes<HTMLDivElement>>;
7
- declare const TabsList: react.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
8
- declare const TabsTrigger: react.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & react.RefAttributes<HTMLButtonElement>, "ref"> & react.RefAttributes<HTMLButtonElement>>;
9
- declare const TabsContent: react.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
6
+ declare const Tabs$1: React.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>>;
7
+ declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+ declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
9
+ declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
10
 
11
11
  declare const tabs_TabsContent: typeof TabsContent;
12
12
  declare const tabs_TabsList: typeof TabsList;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
- cn
4
- } from "../chunk-KCGRUOMD.js";
3
+ twMerge
4
+ } from "../chunk-TK3TM3MR.js";
5
5
  import {
6
6
  __export
7
7
  } from "../chunk-6C3VEZWH.js";
@@ -25,7 +25,7 @@ var TabsList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
25
25
  TabsPrimitive.List,
26
26
  {
27
27
  ref,
28
- className: cn(
28
+ className: twMerge(
29
29
  "inline-flex h-9 w-full items-end gap-2 overflow-x-auto text-muted-foreground shadow-[0_-1px_0_var(--tw-shadow)_inset] shadow-border",
30
30
  className
31
31
  ),
@@ -37,7 +37,7 @@ var TabsTrigger = React.forwardRef(({ className, ...props }, ref) => /* @__PURE_
37
37
  TabsPrimitive.Trigger,
38
38
  {
39
39
  ref,
40
- className: cn(
40
+ className: twMerge(
41
41
  "whitespace-nowrap border-b border-transparent p-1.5 text-sm font-medium hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=active]:border-primary data-[state=active]:text-primary",
42
42
  className
43
43
  ),
@@ -49,7 +49,7 @@ var TabsContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE_
49
49
  TabsPrimitive.Content,
50
50
  {
51
51
  ref,
52
- className: cn("mt-2 focus-visible:outline-none", className),
52
+ className: twMerge("mt-2 focus-visible:outline-none", className),
53
53
  ...props
54
54
  }
55
55
  ));
@@ -129,7 +129,7 @@ function Tab({
129
129
  TabsContent,
130
130
  {
131
131
  value: toValue(value),
132
- className: cn("prose-no-margin", className),
132
+ className: twMerge("prose-no-margin", className),
133
133
  ...props
134
134
  }
135
135
  );
@@ -3,10 +3,10 @@ import {
3
3
  Popover,
4
4
  PopoverContent,
5
5
  PopoverTrigger
6
- } from "../chunk-GZQICERS.js";
6
+ } from "../chunk-CYNHK27D.js";
7
7
  import {
8
- cn
9
- } from "../chunk-KCGRUOMD.js";
8
+ twMerge
9
+ } from "../chunk-TK3TM3MR.js";
10
10
  import "../chunk-6C3VEZWH.js";
11
11
 
12
12
  // src/components/type-table.tsx
@@ -22,19 +22,19 @@ function Info({ children }) {
22
22
  function TypeTable({
23
23
  type
24
24
  }) {
25
- const th = cn("p-2 font-medium first:pl-0 last:pr-0");
26
- const td = cn("p-2 first:pl-0 last:pr-0");
27
- const field = cn("inline-flex flex-row items-center gap-1");
28
- const code = cn("rounded-md bg-secondary p-1 text-secondary-foreground");
25
+ const th = twMerge("p-2 font-medium first:pl-0 last:pr-0");
26
+ const td = twMerge("p-2 first:pl-0 last:pr-0");
27
+ const field = twMerge("inline-flex flex-row items-center gap-1");
28
+ const code = twMerge("rounded-md bg-secondary p-1 text-secondary-foreground");
29
29
  return /* @__PURE__ */ jsx("div", { className: "not-prose overflow-auto whitespace-nowrap", children: /* @__PURE__ */ jsxs("table", { className: "my-4 w-full text-left text-sm text-muted-foreground", children: [
30
30
  /* @__PURE__ */ jsx("thead", { className: "border-b", children: /* @__PURE__ */ jsxs("tr", { children: [
31
- /* @__PURE__ */ jsx("th", { className: cn(th, "w-[45%]"), children: "Prop" }),
32
- /* @__PURE__ */ jsx("th", { className: cn(th, "w-[30%]"), children: "Type" }),
33
- /* @__PURE__ */ jsx("th", { className: cn(th, "w-[25%]"), children: "Default" })
31
+ /* @__PURE__ */ jsx("th", { className: twMerge(th, "w-[45%]"), children: "Prop" }),
32
+ /* @__PURE__ */ jsx("th", { className: twMerge(th, "w-[30%]"), children: "Type" }),
33
+ /* @__PURE__ */ jsx("th", { className: twMerge(th, "w-[25%]"), children: "Default" })
34
34
  ] }) }),
35
35
  /* @__PURE__ */ jsx("tbody", { className: "border-collapse divide-y divide-border", children: Object.entries(type).map(([key, value]) => /* @__PURE__ */ jsxs("tr", { children: [
36
36
  /* @__PURE__ */ jsx("td", { className: td, children: /* @__PURE__ */ jsxs("div", { className: field, children: [
37
- /* @__PURE__ */ jsx("code", { className: cn(code, "bg-primary/10 text-primary"), children: key }),
37
+ /* @__PURE__ */ jsx("code", { className: twMerge(code, "bg-primary/10 text-primary"), children: key }),
38
38
  value.description ? /* @__PURE__ */ jsx(Info, { children: value.description }) : null
39
39
  ] }) }),
40
40
  /* @__PURE__ */ jsx("td", { className: td, children: /* @__PURE__ */ jsxs("div", { className: field, children: [
package/dist/i18n.js CHANGED
@@ -4,8 +4,8 @@ import {
4
4
  useI18n
5
5
  } from "./chunk-YAHHY62W.js";
6
6
  import {
7
- cn
8
- } from "./chunk-KCGRUOMD.js";
7
+ twMerge
8
+ } from "./chunk-TK3TM3MR.js";
9
9
  import "./chunk-6C3VEZWH.js";
10
10
 
11
11
  // src/i18n.tsx
@@ -23,8 +23,8 @@ var SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) =>
23
23
  SelectPrimitive.Trigger,
24
24
  {
25
25
  ref,
26
- className: cn(
27
- "flex h-10 w-full items-center justify-between rounded-md border border-input px-3 py-2 text-sm ring-offset-background focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[placeholder]:text-muted-foreground",
26
+ className: twMerge(
27
+ "flex h-10 w-full items-center justify-between rounded-md border px-3 py-2 text-sm ring-offset-background focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[placeholder]:text-muted-foreground",
28
28
  className
29
29
  ),
30
30
  ...props,
@@ -39,7 +39,7 @@ var SelectContent = React.forwardRef(({ className, children, position = "popper"
39
39
  SelectPrimitive.Content,
40
40
  {
41
41
  ref,
42
- className: cn(
42
+ className: twMerge(
43
43
  "relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=closed]:animate-popover-out data-[state=open]:animate-popover-in",
44
44
  position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
45
45
  className
@@ -49,7 +49,7 @@ var SelectContent = React.forwardRef(({ className, children, position = "popper"
49
49
  children: /* @__PURE__ */ jsx(
50
50
  SelectPrimitive.Viewport,
51
51
  {
52
- className: cn(
52
+ className: twMerge(
53
53
  "p-1",
54
54
  position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
55
55
  ),
@@ -63,7 +63,7 @@ var SelectLabel = React.forwardRef(({ className, ...props }, ref) => /* @__PURE_
63
63
  SelectPrimitive.Label,
64
64
  {
65
65
  ref,
66
- className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
66
+ className: twMerge("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
67
67
  ...props
68
68
  }
69
69
  ));
@@ -72,7 +72,7 @@ var SelectItem = React.forwardRef(({ className, children, ...props }, ref) => /*
72
72
  SelectPrimitive.Item,
73
73
  {
74
74
  ref,
75
- className: cn(
75
+ className: twMerge(
76
76
  "relative flex w-full select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
77
77
  className
78
78
  ),
@@ -88,7 +88,7 @@ var SelectSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__P
88
88
  SelectPrimitive.Separator,
89
89
  {
90
90
  ref,
91
- className: cn("-mx-1 my-1 h-px bg-muted", className),
91
+ className: twMerge("-mx-1 my-1 h-px bg-muted", className),
92
92
  ...props
93
93
  }
94
94
  ));
@@ -8,12 +8,12 @@ import {
8
8
  } from "./chunk-UIZNMCLD.js";
9
9
  import {
10
10
  ScrollArea
11
- } from "./chunk-OG3QOLYP.js";
11
+ } from "./chunk-ZOR33LFA.js";
12
12
  import {
13
13
  Popover,
14
14
  PopoverContent,
15
15
  PopoverTrigger
16
- } from "./chunk-GZQICERS.js";
16
+ } from "./chunk-CYNHK27D.js";
17
17
  import {
18
18
  hasActive,
19
19
  isActive
@@ -28,13 +28,13 @@ import {
28
28
  Collapsible,
29
29
  CollapsibleContent,
30
30
  CollapsibleTrigger
31
- } from "./chunk-5EZE3X7G.js";
31
+ } from "./chunk-7XPZOMJ2.js";
32
32
  import {
33
33
  buttonVariants
34
- } from "./chunk-FAZEWBYX.js";
34
+ } from "./chunk-7GZKFBAP.js";
35
35
  import {
36
- cn
37
- } from "./chunk-KCGRUOMD.js";
36
+ twMerge
37
+ } from "./chunk-TK3TM3MR.js";
38
38
  import "./chunk-6C3VEZWH.js";
39
39
 
40
40
  // src/components/nav.tsx
@@ -66,8 +66,8 @@ import { jsx, jsxs } from "react/jsx-runtime";
66
66
  var buttonVariants2 = cva("size-7 rounded-full p-1.5 text-muted-foreground", {
67
67
  variants: {
68
68
  dark: {
69
- true: "dark:bg-accent dark:text-accent-foreground",
70
- false: "bg-accent text-accent-foreground dark:bg-transparent dark:text-muted-foreground"
69
+ true: "dark:bg-secondary dark:text-secondary-foreground",
70
+ false: "bg-secondary text-secondary-foreground dark:bg-transparent dark:text-muted-foreground"
71
71
  }
72
72
  }
73
73
  });
@@ -83,7 +83,7 @@ function ThemeToggle({
83
83
  "button",
84
84
  {
85
85
  type: "button",
86
- className: cn(
86
+ className: twMerge(
87
87
  "inline-flex items-center rounded-full border p-0.5",
88
88
  className
89
89
  ),
@@ -91,8 +91,8 @@ function ThemeToggle({
91
91
  onClick: onToggle,
92
92
  ...props,
93
93
  children: [
94
- /* @__PURE__ */ jsx(SunIcon, { className: cn(buttonVariants2({ dark: false })) }),
95
- /* @__PURE__ */ jsx(MoonIcon, { className: cn(buttonVariants2({ dark: true })) })
94
+ /* @__PURE__ */ jsx(SunIcon, { className: twMerge(buttonVariants2({ dark: false })) }),
95
+ /* @__PURE__ */ jsx(MoonIcon, { className: twMerge(buttonVariants2({ dark: true })) })
96
96
  ]
97
97
  }
98
98
  );
@@ -126,7 +126,7 @@ function Nav({
126
126
  return /* @__PURE__ */ jsx2(
127
127
  "header",
128
128
  {
129
- className: cn(
129
+ className: twMerge(
130
130
  "sticky top-0 z-50 h-16 border-b transition-colors",
131
131
  transparent ? "border-transparent" : "border-foreground/10 bg-background/50 backdrop-blur-md"
132
132
  ),
@@ -144,7 +144,7 @@ function Nav({
144
144
  /* @__PURE__ */ jsx2(
145
145
  PopoverTrigger,
146
146
  {
147
- className: cn(
147
+ className: twMerge(
148
148
  buttonVariants({
149
149
  size: "icon",
150
150
  color: "ghost",
@@ -155,20 +155,14 @@ function Nav({
155
155
  }
156
156
  ),
157
157
  /* @__PURE__ */ jsxs2(PopoverContent, { className: "flex min-w-[260px] flex-col px-3 py-1", children: [
158
- items.map((item) => /* @__PURE__ */ jsx2(PopoverClose, { asChild: true, children: /* @__PURE__ */ jsx2(
159
- NavItem,
160
- {
161
- item,
162
- className: "py-2 text-medium font-medium"
163
- }
164
- ) }, item.url)),
158
+ items.map((item) => /* @__PURE__ */ jsx2(PopoverClose, { asChild: true, children: /* @__PURE__ */ jsx2(NavItem, { item, className: "py-2 text-lg font-medium" }) }, item.url)),
165
159
  /* @__PURE__ */ jsx2(ThemeToggle, { className: "w-fit" })
166
160
  ] })
167
161
  ] }),
168
162
  /* @__PURE__ */ jsx2(
169
163
  "div",
170
164
  {
171
- className: cn(
165
+ className: twMerge(
172
166
  "flex flex-row items-center border-l pl-2 max-md:hidden",
173
167
  links.length === 0 && "hidden"
174
168
  ),
@@ -178,7 +172,7 @@ function Nav({
178
172
  "aria-label": item.label,
179
173
  href: item.href,
180
174
  external: item.external,
181
- className: cn(buttonVariants({ size: "icon", color: "ghost" })),
175
+ className: twMerge(buttonVariants({ size: "icon", color: "ghost" })),
182
176
  children: item.icon
183
177
  },
184
178
  item.href
@@ -202,7 +196,7 @@ function SearchToggle() {
202
196
  "button",
203
197
  {
204
198
  type: "button",
205
- className: cn(
199
+ className: twMerge(
206
200
  buttonVariants({
207
201
  size: "icon",
208
202
  color: "ghost",
@@ -239,7 +233,7 @@ function SidebarToggle({ collapsible }) {
239
233
  SidebarTrigger,
240
234
  {
241
235
  "aria-label": "Toggle Sidebar",
242
- className: cn(
236
+ className: twMerge(
243
237
  buttonVariants({
244
238
  size: "icon",
245
239
  color: "ghost",
@@ -257,7 +251,7 @@ function SidebarToggle({ collapsible }) {
257
251
  onClick: () => {
258
252
  setOpen(!open);
259
253
  },
260
- className: cn(
254
+ className: twMerge(
261
255
  buttonVariants({
262
256
  color: "outline",
263
257
  size: "icon",
@@ -278,7 +272,7 @@ var NavItem = forwardRef(({ item, className, ...props }, ref) => {
278
272
  ref,
279
273
  href: url,
280
274
  external,
281
- className: cn(
275
+ className: twMerge(
282
276
  "text-sm text-muted-foreground",
283
277
  isActive(url, pathname) ? "font-medium text-accent-foreground" : "transition-colors hover:text-accent-foreground",
284
278
  className
@@ -324,8 +318,8 @@ function Sidebar({
324
318
  Base.SidebarList,
325
319
  {
326
320
  minWidth: 768,
327
- className: cn(
328
- "flex w-full flex-col text-medium",
321
+ className: twMerge(
322
+ "flex w-full flex-col text-[15px]",
329
323
  !open ? "md:hidden" : "md:sticky md:top-16 md:h-body md:w-[240px] md:text-sm xl:w-[260px]",
330
324
  "max-md:fixed max-md:inset-0 max-md:z-40 max-md:bg-background/80 max-md:pt-16 max-md:backdrop-blur-md max-md:data-[open=false]:hidden"
331
325
  ),
@@ -338,7 +332,7 @@ function Sidebar({
338
332
  /* @__PURE__ */ jsxs3(
339
333
  "div",
340
334
  {
341
- className: cn(
335
+ className: twMerge(
342
336
  "flex flex-row items-center gap-2 border-t py-2 max-md:px-4",
343
337
  !footer && "md:hidden"
344
338
  ),
@@ -382,7 +376,7 @@ function BaseItem({
382
376
  {
383
377
  href: item.url,
384
378
  external: item.external,
385
- className: cn(itemVariants({ active })),
379
+ className: twMerge(itemVariants({ active })),
386
380
  children: [
387
381
  item.icon,
388
382
  item.text
@@ -418,7 +412,7 @@ function Folder({
418
412
  setExtend((prev) => !prev);
419
413
  e.preventDefault();
420
414
  },
421
- className: cn("ml-auto transition-transform", !extend && "-rotate-90")
415
+ className: twMerge("ml-auto transition-transform", !extend && "-rotate-90")
422
416
  }
423
417
  )
424
418
  ] });
@@ -431,7 +425,7 @@ function Folder({
431
425
  /* @__PURE__ */ jsx3(
432
426
  CollapsibleTrigger,
433
427
  {
434
- className: cn(itemVariants({ active, className: "w-full" })),
428
+ className: twMerge(itemVariants({ active, className: "w-full" })),
435
429
  asChild: true,
436
430
  children: index ? /* @__PURE__ */ jsx3(Link2, { href: index.url, children: content }) : /* @__PURE__ */ jsx3("button", { type: "button", children: content })
437
431
  }
package/dist/layout.js CHANGED
@@ -7,8 +7,8 @@ import {
7
7
  replaceOrDefault
8
8
  } from "./chunk-EDUYFB4P.js";
9
9
  import {
10
- cn
11
- } from "./chunk-KCGRUOMD.js";
10
+ twMerge
11
+ } from "./chunk-TK3TM3MR.js";
12
12
  import "./chunk-6C3VEZWH.js";
13
13
 
14
14
  // src/layout.tsx
@@ -40,7 +40,7 @@ function DocsLayout({
40
40
  "div",
41
41
  {
42
42
  ...containerProps,
43
- className: cn(
43
+ className: twMerge(
44
44
  "container flex flex-row gap-6 xl:gap-12",
45
45
  containerProps?.className
46
46
  ),