livemark 0.23.0 → 0.24.1

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 (281) hide show
  1. package/.agents/skills/change-review/SKILL.md +47 -0
  2. package/{skills/configuration → .agents/skills/livemark-configuration}/SKILL.md +2 -4
  3. package/build/actions/changelog/build.d.ts +21 -9
  4. package/build/actions/changelog/build.js +31 -23
  5. package/build/actions/changelog/build.unit.js +156 -2
  6. package/build/actions/config/load.js +1 -1
  7. package/build/actions/config/load.unit.js +1 -1
  8. package/build/actions/target/build.js +2 -5
  9. package/build/commands/build.js +1 -1
  10. package/build/commands/escape.js +1 -1
  11. package/build/commands/preview.js +1 -1
  12. package/build/commands/start.js +1 -1
  13. package/build/components/Abbr.js +2 -2
  14. package/build/components/Article.js +2 -2
  15. package/build/components/BlogIndex.js +2 -4
  16. package/build/components/Callout.js +2 -2
  17. package/build/components/ChangelogIndex.js +1 -1
  18. package/build/components/CodeBlock.js +3 -5
  19. package/build/components/CodeTabs.js +1 -1
  20. package/build/components/Columns.js +2 -4
  21. package/build/components/Content.js +2 -2
  22. package/build/components/ContentTab.js +1 -1
  23. package/build/components/ContentTabs.js +1 -1
  24. package/build/components/DefinitionList.js +1 -1
  25. package/build/components/FileTree.js +1 -1
  26. package/build/components/FootnoteRef.js +2 -2
  27. package/build/components/InlineToc.js +1 -1
  28. package/build/components/Layout.js +1 -1
  29. package/build/components/LinkButton.js +2 -2
  30. package/build/components/Mermaid.js +1 -1
  31. package/build/components/PackageTabs.js +2 -2
  32. package/build/components/PageToolbar.js +2 -2
  33. package/build/components/PrevNext.js +3 -7
  34. package/build/components/SearchDialog.js +1 -1
  35. package/build/components/Section.js +2 -2
  36. package/build/components/SectionHeader.js +2 -2
  37. package/build/components/Sidebar.js +2 -2
  38. package/build/components/SidebarArticles.js +2 -2
  39. package/build/components/SidebarLinks.js +2 -2
  40. package/build/components/TagIndex.js +2 -4
  41. package/build/components/Toc.js +1 -1
  42. package/build/content/article.js +1 -1
  43. package/build/content-collections.js +6 -7
  44. package/build/elements/accordion.js +2 -2
  45. package/build/elements/alert-dialog.js +5 -5
  46. package/build/elements/alert.js +2 -2
  47. package/build/elements/aspect-ratio.js +2 -2
  48. package/build/elements/avatar.d.ts +1 -1
  49. package/build/elements/avatar.js +3 -3
  50. package/build/elements/badge.js +2 -2
  51. package/build/elements/breadcrumb.js +2 -2
  52. package/build/elements/button-group.d.ts +1 -1
  53. package/build/elements/button-group.js +3 -3
  54. package/build/elements/button.js +2 -2
  55. package/build/elements/calendar.js +5 -5
  56. package/build/elements/card.js +2 -2
  57. package/build/elements/carousel.js +2 -2
  58. package/build/elements/chart.js +5 -15
  59. package/build/elements/checkbox.js +2 -2
  60. package/build/elements/collapsible.js +3 -3
  61. package/build/elements/command.js +2 -2
  62. package/build/elements/context-menu.js +5 -5
  63. package/build/elements/dialog.js +2 -2
  64. package/build/elements/direction.d.ts +1 -1
  65. package/build/elements/direction.js +2 -2
  66. package/build/elements/drawer.js +2 -2
  67. package/build/elements/dropdown-menu.js +3 -3
  68. package/build/elements/empty.d.ts +1 -1
  69. package/build/elements/empty.js +3 -3
  70. package/build/elements/field.js +2 -2
  71. package/build/elements/hover-card.js +3 -3
  72. package/build/elements/input-group.js +2 -2
  73. package/build/elements/input-otp.js +2 -2
  74. package/build/elements/input.js +2 -2
  75. package/build/elements/item.js +2 -2
  76. package/build/elements/kbd.js +2 -2
  77. package/build/elements/label.js +2 -2
  78. package/build/elements/menubar.js +2 -2
  79. package/build/elements/native-select.js +2 -2
  80. package/build/elements/navigation-menu.js +2 -2
  81. package/build/elements/pagination.js +3 -3
  82. package/build/elements/popover.js +2 -2
  83. package/build/elements/progress.d.ts +1 -1
  84. package/build/elements/progress.js +3 -3
  85. package/build/elements/radio-group.js +2 -2
  86. package/build/elements/resizable.js +3 -3
  87. package/build/elements/scroll-area.js +2 -2
  88. package/build/elements/select.js +2 -2
  89. package/build/elements/separator.js +2 -2
  90. package/build/elements/sheet.js +2 -2
  91. package/build/elements/sidebar.js +3 -4
  92. package/build/elements/skeleton.js +2 -2
  93. package/build/elements/slider.js +2 -2
  94. package/build/elements/spinner.js +2 -2
  95. package/build/elements/switch.js +2 -2
  96. package/build/elements/table.js +2 -2
  97. package/build/elements/tabs.js +2 -2
  98. package/build/elements/textarea.js +2 -2
  99. package/build/elements/toggle-group.js +2 -2
  100. package/build/elements/toggle.js +2 -2
  101. package/build/elements/tooltip.js +2 -2
  102. package/build/helpers/changelog-source.js +1 -1
  103. package/build/helpers/dynamic-icon-resolver.js +1 -1
  104. package/build/helpers/resolve-asset-path.unit.js +1 -1
  105. package/build/helpers/resolve-base.unit.js +2 -2
  106. package/build/helpers/resolve-includes.js +2 -2
  107. package/build/helpers/resolve-includes.unit.js +1 -1
  108. package/build/helpers/rss.js +2 -4
  109. package/build/helpers/rss.unit.js +1 -1
  110. package/build/helpers/section.js +2 -3
  111. package/build/helpers/section.unit.js +4 -13
  112. package/build/helpers/toc.unit.js +2 -4
  113. package/build/plugins/rehype-inline-code.js +2 -2
  114. package/build/plugins/rehype-task-list-a11y.js +1 -1
  115. package/build/plugins/remark-abbr.js +2 -4
  116. package/build/plugins/remark-ansi.js +2 -4
  117. package/build/plugins/remark-ansi.unit.js +1 -1
  118. package/build/plugins/remark-badge.js +2 -4
  119. package/build/plugins/remark-button.unit.js +1 -1
  120. package/build/plugins/remark-callout.js +1 -1
  121. package/build/plugins/remark-card.js +1 -1
  122. package/build/plugins/remark-code-tabs.js +4 -8
  123. package/build/plugins/remark-columns.js +1 -1
  124. package/build/plugins/remark-custom-heading-id.unit.js +1 -1
  125. package/build/plugins/remark-deflist.js +1 -1
  126. package/build/plugins/remark-details.js +2 -4
  127. package/build/plugins/remark-filetree.js +1 -1
  128. package/build/plugins/remark-filetree.unit.js +1 -1
  129. package/build/plugins/remark-media.js +3 -7
  130. package/build/plugins/remark-media.unit.js +1 -1
  131. package/build/plugins/remark-steps.unit.js +1 -1
  132. package/build/plugins/remark-tab.js +4 -2
  133. package/build/plugins/remark-tab.unit.js +3 -7
  134. package/build/plugins/remark-toc.unit.js +1 -1
  135. package/build/plugins/shiki-icon.js +1 -1
  136. package/build/plugins/shiki-line-highlight.js +1 -1
  137. package/build/plugins/vite-livemark.js +1 -1
  138. package/build/plugins/vite-robots.js +1 -1
  139. package/build/plugins/vite-robots.unit.js +1 -1
  140. package/build/routes/$.js +1 -1
  141. package/build/vite.config.js +3 -8
  142. package/package.json +17 -19
  143. package/source/actions/changelog/build.ts +32 -35
  144. package/source/actions/changelog/build.unit.ts +191 -1
  145. package/source/actions/config/load.ts +1 -3
  146. package/source/actions/config/load.unit.ts +2 -7
  147. package/source/actions/target/build.ts +1 -4
  148. package/source/commands/build.ts +1 -7
  149. package/source/commands/escape.ts +3 -8
  150. package/source/commands/preview.ts +1 -7
  151. package/source/commands/start.ts +1 -7
  152. package/source/components/Abbr.tsx +1 -5
  153. package/source/components/Article.tsx +1 -5
  154. package/source/components/BlogIndex.tsx +3 -9
  155. package/source/components/Callout.tsx +2 -7
  156. package/source/components/ChangelogIndex.tsx +1 -3
  157. package/source/components/CodeBlock.tsx +4 -14
  158. package/source/components/CodeTabs.tsx +1 -3
  159. package/source/components/Columns.tsx +1 -3
  160. package/source/components/Content.tsx +1 -5
  161. package/source/components/ContentTab.tsx +1 -4
  162. package/source/components/ContentTabs.tsx +3 -10
  163. package/source/components/DefinitionList.tsx +1 -4
  164. package/source/components/FileTree.tsx +1 -5
  165. package/source/components/FootnoteRef.tsx +1 -5
  166. package/source/components/InlineToc.tsx +1 -4
  167. package/source/components/Layout.tsx +3 -10
  168. package/source/components/LinkButton.tsx +2 -8
  169. package/source/components/Mermaid.tsx +1 -3
  170. package/source/components/PackageTabs.tsx +1 -5
  171. package/source/components/PageToolbar.tsx +1 -5
  172. package/source/components/PrevNext.tsx +2 -6
  173. package/source/components/SearchDialog.tsx +2 -6
  174. package/source/components/Section.tsx +1 -1
  175. package/source/components/SectionHeader.tsx +2 -8
  176. package/source/components/Sidebar.tsx +2 -7
  177. package/source/components/SidebarArticles.tsx +4 -20
  178. package/source/components/SidebarLinks.tsx +2 -6
  179. package/source/components/TagIndex.tsx +3 -9
  180. package/source/components/Toc.tsx +2 -7
  181. package/source/content/article.ts +1 -2
  182. package/source/content-collections.ts +6 -8
  183. package/source/elements/accordion.tsx +1 -1
  184. package/source/elements/alert-dialog.tsx +8 -30
  185. package/source/elements/alert.tsx +2 -5
  186. package/source/elements/aspect-ratio.tsx +1 -1
  187. package/source/elements/avatar.tsx +5 -21
  188. package/source/elements/badge.tsx +3 -5
  189. package/source/elements/breadcrumb.tsx +4 -14
  190. package/source/elements/button-group.tsx +2 -7
  191. package/source/elements/button.tsx +1 -1
  192. package/source/elements/calendar.tsx +7 -24
  193. package/source/elements/card.tsx +1 -1
  194. package/source/elements/carousel.tsx +4 -11
  195. package/source/elements/chart.tsx +9 -34
  196. package/source/elements/checkbox.tsx +1 -1
  197. package/source/elements/collapsible.tsx +2 -6
  198. package/source/elements/command.tsx +4 -13
  199. package/source/elements/context-menu.tsx +8 -25
  200. package/source/elements/dialog.tsx +4 -14
  201. package/source/elements/direction.tsx +1 -4
  202. package/source/elements/drawer.tsx +4 -10
  203. package/source/elements/dropdown-menu.tsx +5 -19
  204. package/source/elements/empty.tsx +3 -13
  205. package/source/elements/field.tsx +3 -7
  206. package/source/elements/hover-card.tsx +2 -4
  207. package/source/elements/input-group.tsx +15 -28
  208. package/source/elements/input-otp.tsx +1 -1
  209. package/source/elements/input.tsx +1 -1
  210. package/source/elements/item.tsx +4 -13
  211. package/source/elements/kbd.tsx +1 -1
  212. package/source/elements/label.tsx +1 -1
  213. package/source/elements/menubar.tsx +5 -14
  214. package/source/elements/native-select.tsx +4 -15
  215. package/source/elements/navigation-menu.tsx +2 -5
  216. package/source/elements/pagination.tsx +4 -14
  217. package/source/elements/popover.tsx +2 -5
  218. package/source/elements/progress.tsx +4 -16
  219. package/source/elements/radio-group.tsx +1 -1
  220. package/source/elements/resizable.tsx +4 -12
  221. package/source/elements/scroll-area.tsx +2 -6
  222. package/source/elements/select.tsx +4 -14
  223. package/source/elements/separator.tsx +1 -1
  224. package/source/elements/sheet.tsx +3 -10
  225. package/source/elements/sidebar.tsx +7 -25
  226. package/source/elements/skeleton.tsx +1 -1
  227. package/source/elements/slider.tsx +1 -1
  228. package/source/elements/spinner.tsx +1 -1
  229. package/source/elements/switch.tsx +1 -1
  230. package/source/elements/table.tsx +4 -13
  231. package/source/elements/tabs.tsx +1 -1
  232. package/source/elements/textarea.tsx +1 -1
  233. package/source/elements/toggle-group.tsx +2 -4
  234. package/source/elements/toggle.tsx +1 -1
  235. package/source/elements/tooltip.tsx +3 -10
  236. package/source/helpers/changelog-source.ts +1 -3
  237. package/source/helpers/dynamic-icon-resolver.tsx +1 -4
  238. package/source/helpers/resolve-asset-path.unit.ts +6 -12
  239. package/source/helpers/resolve-base.unit.ts +1 -2
  240. package/source/helpers/resolve-includes.ts +2 -8
  241. package/source/helpers/resolve-includes.unit.ts +9 -36
  242. package/source/helpers/rss.ts +3 -9
  243. package/source/helpers/rss.unit.ts +1 -3
  244. package/source/helpers/section.ts +1 -4
  245. package/source/helpers/section.unit.ts +5 -18
  246. package/source/helpers/toc.unit.ts +1 -3
  247. package/source/plugins/rehype-inline-code.ts +5 -21
  248. package/source/plugins/rehype-task-list-a11y.ts +1 -2
  249. package/source/plugins/remark-abbr.ts +1 -3
  250. package/source/plugins/remark-ansi.ts +2 -5
  251. package/source/plugins/remark-ansi.unit.ts +6 -18
  252. package/source/plugins/remark-badge.ts +1 -3
  253. package/source/plugins/remark-button.unit.ts +3 -9
  254. package/source/plugins/remark-callout.ts +35 -40
  255. package/source/plugins/remark-card.ts +25 -29
  256. package/source/plugins/remark-code-tabs.ts +3 -7
  257. package/source/plugins/remark-columns.ts +13 -17
  258. package/source/plugins/remark-custom-heading-id.unit.ts +2 -6
  259. package/source/plugins/remark-deflist.ts +1 -2
  260. package/source/plugins/remark-details.ts +28 -34
  261. package/source/plugins/remark-filetree.ts +28 -34
  262. package/source/plugins/remark-filetree.unit.ts +1 -4
  263. package/source/plugins/remark-media.ts +2 -6
  264. package/source/plugins/remark-media.unit.ts +2 -6
  265. package/source/plugins/remark-steps.unit.ts +2 -7
  266. package/source/plugins/remark-tab.ts +26 -30
  267. package/source/plugins/remark-tab.unit.ts +2 -6
  268. package/source/plugins/remark-toc.unit.ts +1 -3
  269. package/source/plugins/shiki-icon.ts +1 -4
  270. package/source/plugins/shiki-line-highlight.ts +4 -11
  271. package/source/plugins/vite-livemark.ts +3 -10
  272. package/source/plugins/vite-robots.ts +1 -6
  273. package/source/plugins/vite-robots.unit.ts +1 -3
  274. package/source/routes/$.tsx +1 -3
  275. package/source/styles/general.css +1 -5
  276. package/source/vite.config.ts +2 -7
  277. package/build/utils/style.d.ts +0 -2
  278. package/build/utils/style.js +0 -6
  279. package/source/utils/style.ts +0 -6
  280. /package/{skills/authoring → .agents/skills/livemark-authoring}/SKILL.md +0 -0
  281. /package/{skills/customization → .agents/skills/livemark-customization}/SKILL.md +0 -0
@@ -1,7 +1,7 @@
1
1
  import * as React from "react"
2
2
  import { Avatar as AvatarPrimitive } from "@base-ui/react/avatar"
3
3
 
4
- import { cn } from "../utils/style.ts"
4
+ import { cn } from "cn"
5
5
 
6
6
  function Avatar({
7
7
  className,
@@ -27,19 +27,13 @@ function AvatarImage({ className, ...props }: AvatarPrimitive.Image.Props) {
27
27
  return (
28
28
  <AvatarPrimitive.Image
29
29
  data-slot="avatar-image"
30
- className={cn(
31
- "aspect-square size-full rounded-full object-cover",
32
- className,
33
- )}
30
+ className={cn("aspect-square size-full rounded-full object-cover", className)}
34
31
  {...props}
35
32
  />
36
33
  )
37
34
  }
38
35
 
39
- function AvatarFallback({
40
- className,
41
- ...props
42
- }: AvatarPrimitive.Fallback.Props) {
36
+ function AvatarFallback({ className, ...props }: AvatarPrimitive.Fallback.Props) {
43
37
  return (
44
38
  <AvatarPrimitive.Fallback
45
39
  data-slot="avatar-fallback"
@@ -81,10 +75,7 @@ function AvatarGroup({ className, ...props }: React.ComponentProps<"div">) {
81
75
  )
82
76
  }
83
77
 
84
- function AvatarGroupCount({
85
- className,
86
- ...props
87
- }: React.ComponentProps<"div">) {
78
+ function AvatarGroupCount({ className, ...props }: React.ComponentProps<"div">) {
88
79
  return (
89
80
  <div
90
81
  data-slot="avatar-group-count"
@@ -97,11 +88,4 @@ function AvatarGroupCount({
97
88
  )
98
89
  }
99
90
 
100
- export {
101
- Avatar,
102
- AvatarImage,
103
- AvatarFallback,
104
- AvatarGroup,
105
- AvatarGroupCount,
106
- AvatarBadge,
107
- }
91
+ export { Avatar, AvatarImage, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarBadge }
@@ -1,7 +1,7 @@
1
1
  import { mergeProps } from "@base-ui/react/merge-props"
2
2
  import { useRender } from "@base-ui/react/use-render"
3
3
  import { cva, type VariantProps } from "class-variance-authority"
4
- import { cn } from "../utils/style.ts"
4
+ import { cn } from "cn"
5
5
 
6
6
  const badgeVariants = cva(
7
7
  "h-5 gap-1 rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-3! inline-flex items-center justify-center w-fit whitespace-nowrap shrink-0 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive overflow-hidden group/badge",
@@ -9,14 +9,12 @@ const badgeVariants = cva(
9
9
  variants: {
10
10
  variant: {
11
11
  default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
12
- secondary:
13
- "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
12
+ secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
14
13
  destructive:
15
14
  "bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20",
16
15
  outline:
17
16
  "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
18
- ghost:
19
- "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
17
+ ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
20
18
  link: "text-primary underline-offset-4 hover:underline",
21
19
  },
22
20
  },
@@ -1,7 +1,7 @@
1
1
  import { mergeProps } from "@base-ui/react/merge-props"
2
2
  import { useRender } from "@base-ui/react/use-render"
3
3
  import { ChevronRightIcon, MoreHorizontalIcon } from "lucide-react"
4
- import { cn } from "../utils/style.ts"
4
+ import { cn } from "cn"
5
5
 
6
6
  function Breadcrumb({ className, ...props }: React.ComponentProps<"nav">) {
7
7
  return (
@@ -37,11 +37,7 @@ function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">) {
37
37
  )
38
38
  }
39
39
 
40
- function BreadcrumbLink({
41
- className,
42
- render,
43
- ...props
44
- }: useRender.ComponentProps<"a">) {
40
+ function BreadcrumbLink({ className, render, ...props }: useRender.ComponentProps<"a">) {
45
41
  return useRender({
46
42
  defaultTagName: "a",
47
43
  props: mergeProps<"a">(
@@ -88,19 +84,13 @@ function BreadcrumbSeparator({
88
84
  )
89
85
  }
90
86
 
91
- function BreadcrumbEllipsis({
92
- className,
93
- ...props
94
- }: React.ComponentProps<"span">) {
87
+ function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<"span">) {
95
88
  return (
96
89
  <span
97
90
  data-slot="breadcrumb-ellipsis"
98
91
  role="presentation"
99
92
  aria-hidden="true"
100
- className={cn(
101
- "size-5 [&>svg]:size-4 flex items-center justify-center",
102
- className,
103
- )}
93
+ className={cn("size-5 [&>svg]:size-4 flex items-center justify-center", className)}
104
94
  {...props}
105
95
  >
106
96
  <MoreHorizontalIcon />
@@ -2,7 +2,7 @@ import { mergeProps } from "@base-ui/react/merge-props"
2
2
  import { useRender } from "@base-ui/react/use-render"
3
3
  import { cva, type VariantProps } from "class-variance-authority"
4
4
 
5
- import { cn } from "../utils/style.ts"
5
+ import { cn } from "cn"
6
6
  import { Separator } from "./separator.tsx"
7
7
 
8
8
  const buttonGroupVariants = cva(
@@ -79,9 +79,4 @@ function ButtonGroupSeparator({
79
79
  )
80
80
  }
81
81
 
82
- export {
83
- ButtonGroup,
84
- ButtonGroupSeparator,
85
- ButtonGroupText,
86
- buttonGroupVariants,
87
- }
82
+ export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants }
@@ -1,6 +1,6 @@
1
1
  import { Button as ButtonPrimitive } from "@base-ui/react/button"
2
2
  import { cva, type VariantProps } from "class-variance-authority"
3
- import { cn } from "../utils/style.ts"
3
+ import { cn } from "cn"
4
4
 
5
5
  const buttonVariants = cva(
6
6
  "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-md border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-[3px] aria-invalid:ring-[3px] [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",
@@ -5,13 +5,9 @@ import {
5
5
  type DayButton,
6
6
  type Locale,
7
7
  } from "react-day-picker"
8
- import {
9
- ChevronDownIcon,
10
- ChevronLeftIcon,
11
- ChevronRightIcon,
12
- } from "lucide-react"
8
+ import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from "lucide-react"
13
9
 
14
- import { cn } from "../utils/style.ts"
10
+ import { cn } from "cn"
15
11
  import { Button, buttonVariants } from "./button.tsx"
16
12
 
17
13
  function Calendar({
@@ -47,10 +43,7 @@ function Calendar({
47
43
  }}
48
44
  classNames={{
49
45
  root: cn("w-fit", defaultClassNames.root),
50
- months: cn(
51
- "relative flex flex-col gap-4 md:flex-row",
52
- defaultClassNames.months,
53
- ),
46
+ months: cn("relative flex flex-col gap-4 md:flex-row", defaultClassNames.months),
54
47
  month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
55
48
  nav: cn(
56
49
  "absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
@@ -78,10 +71,7 @@ function Calendar({
78
71
  "cn-calendar-dropdown-root relative rounded-(--cell-radius)",
79
72
  defaultClassNames.dropdown_root,
80
73
  ),
81
- dropdown: cn(
82
- "absolute inset-0 bg-popover opacity-0",
83
- defaultClassNames.dropdown,
84
- ),
74
+ dropdown: cn("absolute inset-0 bg-popover opacity-0", defaultClassNames.dropdown),
85
75
  caption_label: cn(
86
76
  "font-medium select-none",
87
77
  captionLayout === "label"
@@ -128,10 +118,7 @@ function Calendar({
128
118
  "text-muted-foreground aria-selected:text-muted-foreground",
129
119
  defaultClassNames.outside,
130
120
  ),
131
- disabled: cn(
132
- "text-muted-foreground opacity-50",
133
- defaultClassNames.disabled,
134
- ),
121
+ disabled: cn("text-muted-foreground opacity-50", defaultClassNames.disabled),
135
122
  hidden: cn("invisible", defaultClassNames.hidden),
136
123
  ...classNames,
137
124
  }}
@@ -165,13 +152,9 @@ function Calendar({
165
152
  )
166
153
  }
167
154
 
168
- return (
169
- <ChevronDownIcon className={cn("size-4", className)} {...props} />
170
- )
155
+ return <ChevronDownIcon className={cn("size-4", className)} {...props} />
171
156
  },
172
- DayButton: ({ ...props }) => (
173
- <CalendarDayButton locale={locale} {...props} />
174
- ),
157
+ DayButton: ({ ...props }) => <CalendarDayButton locale={locale} {...props} />,
175
158
  WeekNumber: ({ children, ...props }) => {
176
159
  return (
177
160
  <td {...props}>
@@ -1,5 +1,5 @@
1
1
  import type * as React from "react"
2
- import { cn } from "../utils/style.ts"
2
+ import { cn } from "cn"
3
3
 
4
4
  function Card({
5
5
  className,
@@ -1,10 +1,8 @@
1
1
  import * as React from "react"
2
- import useEmblaCarousel, {
3
- type UseEmblaCarouselType,
4
- } from "embla-carousel-react"
2
+ import useEmblaCarousel, { type UseEmblaCarouselType } from "embla-carousel-react"
5
3
  import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react"
6
4
 
7
- import { cn } from "../utils/style.ts"
5
+ import { cn } from "cn"
8
6
  import { Button } from "./button.tsx"
9
7
 
10
8
  type CarouselApi = UseEmblaCarouselType[1]
@@ -108,8 +106,7 @@ function Carousel({
108
106
  carouselRef,
109
107
  api: api,
110
108
  opts,
111
- orientation:
112
- orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
109
+ orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
113
110
  scrollPrev,
114
111
  scrollNext,
115
112
  canScrollPrev,
@@ -134,11 +131,7 @@ function CarouselContent({ className, ...props }: React.ComponentProps<"div">) {
134
131
  const { carouselRef, orientation } = useCarousel()
135
132
 
136
133
  return (
137
- <div
138
- ref={carouselRef}
139
- className="overflow-hidden"
140
- data-slot="carousel-content"
141
- >
134
+ <div ref={carouselRef} className="overflow-hidden" data-slot="carousel-content">
142
135
  <div
143
136
  className={cn(
144
137
  "flex",
@@ -2,7 +2,7 @@ import * as React from "react"
2
2
  import * as RechartsPrimitive from "recharts"
3
3
  import type { TooltipValueType } from "recharts"
4
4
 
5
- import { cn } from "../utils/style.ts"
5
+ import { cn } from "cn"
6
6
 
7
7
  // Format: { THEME_NAME: CSS_SELECTOR }
8
8
  const THEMES = { light: "", dark: ".dark" } as const
@@ -46,9 +46,7 @@ function ChartContainer({
46
46
  ...props
47
47
  }: React.ComponentProps<"div"> & {
48
48
  config: ChartConfig
49
- children: React.ComponentProps<
50
- typeof RechartsPrimitive.ResponsiveContainer
51
- >["children"]
49
+ children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"]
52
50
  initialDimension?: {
53
51
  width: number
54
52
  height: number
@@ -69,9 +67,7 @@ function ChartContainer({
69
67
  {...props}
70
68
  >
71
69
  <ChartStyle id={chartId} config={config} />
72
- <RechartsPrimitive.ResponsiveContainer
73
- initialDimension={initialDimension}
74
- >
70
+ <RechartsPrimitive.ResponsiveContainer initialDimension={initialDimension}>
75
71
  {children}
76
72
  </RechartsPrimitive.ResponsiveContainer>
77
73
  </div>
@@ -99,8 +95,7 @@ ${prefix} [data-chart=${id}] {
99
95
  ${colorConfig
100
96
  .map(([key, itemConfig]) => {
101
97
  const color =
102
- itemConfig.theme?.[theme as keyof typeof itemConfig.theme] ??
103
- itemConfig.color
98
+ itemConfig.theme?.[theme as keyof typeof itemConfig.theme] ?? itemConfig.color
104
99
  return color ? ` --color-${key}: ${color};` : null
105
100
  })
106
101
  .join("\n")}
@@ -137,10 +132,7 @@ function ChartTooltipContent({
137
132
  nameKey?: string
138
133
  labelKey?: string
139
134
  } & Omit<
140
- RechartsPrimitive.DefaultTooltipContentProps<
141
- TooltipValueType,
142
- TooltipNameType
143
- >,
135
+ RechartsPrimitive.DefaultTooltipContentProps<TooltipValueType, TooltipNameType>,
144
136
  "accessibilityLayer"
145
137
  >) {
146
138
  const { config } = useChart()
@@ -171,15 +163,7 @@ function ChartTooltipContent({
171
163
  }
172
164
 
173
165
  return <div className={cn("font-medium", labelClassName)}>{value}</div>
174
- }, [
175
- label,
176
- labelFormatter,
177
- payload,
178
- hideLabel,
179
- labelClassName,
180
- config,
181
- labelKey,
182
- ])
166
+ }, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey])
183
167
 
184
168
  if (!active || !payload?.length) {
185
169
  return null
@@ -326,11 +310,7 @@ function ChartLegendContent({
326
310
  )
327
311
  }
328
312
 
329
- function getPayloadConfigFromPayload(
330
- config: ChartConfig,
331
- payload: unknown,
332
- key: string,
333
- ) {
313
+ function getPayloadConfigFromPayload(config: ChartConfig, payload: unknown, key: string) {
334
314
  if (typeof payload !== "object" || payload === null) {
335
315
  return undefined
336
316
  }
@@ -344,19 +324,14 @@ function getPayloadConfigFromPayload(
344
324
 
345
325
  let configLabelKey: string = key
346
326
 
347
- if (
348
- key in payload &&
349
- typeof payload[key as keyof typeof payload] === "string"
350
- ) {
327
+ if (key in payload && typeof payload[key as keyof typeof payload] === "string") {
351
328
  configLabelKey = payload[key as keyof typeof payload] as string
352
329
  } else if (
353
330
  payloadPayload &&
354
331
  key in payloadPayload &&
355
332
  typeof payloadPayload[key as keyof typeof payloadPayload] === "string"
356
333
  ) {
357
- configLabelKey = payloadPayload[
358
- key as keyof typeof payloadPayload
359
- ] as string
334
+ configLabelKey = payloadPayload[key as keyof typeof payloadPayload] as string
360
335
  }
361
336
 
362
337
  return configLabelKey in config ? config[configLabelKey] : config[key]
@@ -1,7 +1,7 @@
1
1
  import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox"
2
2
  import { CheckIcon } from "lucide-react"
3
3
 
4
- import { cn } from "../utils/style.ts"
4
+ import { cn } from "cn"
5
5
 
6
6
  function Checkbox({ className, ...props }: CheckboxPrimitive.Root.Props) {
7
7
  return (
@@ -5,15 +5,11 @@ function Collapsible({ ...props }: CollapsiblePrimitive.Root.Props) {
5
5
  }
6
6
 
7
7
  function CollapsibleTrigger({ ...props }: CollapsiblePrimitive.Trigger.Props) {
8
- return (
9
- <CollapsiblePrimitive.Trigger data-slot="collapsible-trigger" {...props} />
10
- )
8
+ return <CollapsiblePrimitive.Trigger data-slot="collapsible-trigger" {...props} />
11
9
  }
12
10
 
13
11
  function CollapsibleContent({ ...props }: CollapsiblePrimitive.Panel.Props) {
14
- return (
15
- <CollapsiblePrimitive.Panel data-slot="collapsible-content" {...props} />
16
- )
12
+ return <CollapsiblePrimitive.Panel data-slot="collapsible-content" {...props} />
17
13
  }
18
14
 
19
15
  export { Collapsible, CollapsibleTrigger, CollapsibleContent }
@@ -2,7 +2,7 @@ import * as React from "react"
2
2
  import { Command as CommandPrimitive } from "cmdk"
3
3
  import { CheckIcon, SearchIcon, XIcon } from "lucide-react"
4
4
 
5
- import { cn } from "../utils/style.ts"
5
+ import { cn } from "cn"
6
6
  import {
7
7
  Dialog,
8
8
  DialogContent,
@@ -12,10 +12,7 @@ import {
12
12
  } from "./dialog.tsx"
13
13
  import { InputGroup, InputGroupAddon } from "./input-group.tsx"
14
14
 
15
- function Command({
16
- className,
17
- ...props
18
- }: React.ComponentProps<typeof CommandPrimitive>) {
15
+ function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>) {
19
16
  return (
20
17
  <CommandPrimitive
21
18
  data-slot="command"
@@ -53,10 +50,7 @@ function CommandDialog({
53
50
  <DialogDescription>{description}</DialogDescription>
54
51
  </DialogHeader>
55
52
  <DialogContent
56
- className={cn(
57
- "top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0",
58
- className,
59
- )}
53
+ className={cn("top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0", className)}
60
54
  showCloseButton={showCloseButton}
61
55
  >
62
56
  <Command shouldFilter={shouldFilter} loop={loop}>
@@ -181,10 +175,7 @@ function CommandItem({
181
175
  )
182
176
  }
183
177
 
184
- function CommandShortcut({
185
- className,
186
- ...props
187
- }: React.ComponentProps<"span">) {
178
+ function CommandShortcut({ className, ...props }: React.ComponentProps<"span">) {
188
179
  return (
189
180
  <span
190
181
  data-slot="command-shortcut"
@@ -2,22 +2,17 @@ import * as React from "react"
2
2
  import { ContextMenu as ContextMenuPrimitive } from "@base-ui/react/context-menu"
3
3
  import { CheckIcon, ChevronRightIcon } from "lucide-react"
4
4
 
5
- import { cn } from "../utils/style.ts"
5
+ import { cn } from "cn"
6
6
 
7
7
  function ContextMenu({ ...props }: ContextMenuPrimitive.Root.Props) {
8
8
  return <ContextMenuPrimitive.Root data-slot="context-menu" {...props} />
9
9
  }
10
10
 
11
11
  function ContextMenuPortal({ ...props }: ContextMenuPrimitive.Portal.Props) {
12
- return (
13
- <ContextMenuPrimitive.Portal data-slot="context-menu-portal" {...props} />
14
- )
12
+ return <ContextMenuPrimitive.Portal data-slot="context-menu-portal" {...props} />
15
13
  }
16
14
 
17
- function ContextMenuTrigger({
18
- className,
19
- ...props
20
- }: ContextMenuPrimitive.Trigger.Props) {
15
+ function ContextMenuTrigger({ className, ...props }: ContextMenuPrimitive.Trigger.Props) {
21
16
  return (
22
17
  <ContextMenuPrimitive.Trigger
23
18
  data-slot="context-menu-trigger"
@@ -62,9 +57,7 @@ function ContextMenuContent({
62
57
  }
63
58
 
64
59
  function ContextMenuGroup({ ...props }: ContextMenuPrimitive.Group.Props) {
65
- return (
66
- <ContextMenuPrimitive.Group data-slot="context-menu-group" {...props} />
67
- )
60
+ return <ContextMenuPrimitive.Group data-slot="context-menu-group" {...props} />
68
61
  }
69
62
 
70
63
  function ContextMenuLabel({
@@ -111,9 +104,7 @@ function ContextMenuItem({
111
104
  }
112
105
 
113
106
  function ContextMenuSub({ ...props }: ContextMenuPrimitive.SubmenuRoot.Props) {
114
- return (
115
- <ContextMenuPrimitive.SubmenuRoot data-slot="context-menu-sub" {...props} />
116
- )
107
+ return <ContextMenuPrimitive.SubmenuRoot data-slot="context-menu-sub" {...props} />
117
108
  }
118
109
 
119
110
  function ContextMenuSubTrigger({
@@ -183,14 +174,9 @@ function ContextMenuCheckboxItem({
183
174
  )
184
175
  }
185
176
 
186
- function ContextMenuRadioGroup({
187
- ...props
188
- }: ContextMenuPrimitive.RadioGroup.Props) {
177
+ function ContextMenuRadioGroup({ ...props }: ContextMenuPrimitive.RadioGroup.Props) {
189
178
  return (
190
- <ContextMenuPrimitive.RadioGroup
191
- data-slot="context-menu-radio-group"
192
- {...props}
193
- />
179
+ <ContextMenuPrimitive.RadioGroup data-slot="context-menu-radio-group" {...props} />
194
180
  )
195
181
  }
196
182
 
@@ -235,10 +221,7 @@ function ContextMenuSeparator({
235
221
  )
236
222
  }
237
223
 
238
- function ContextMenuShortcut({
239
- className,
240
- ...props
241
- }: React.ComponentProps<"span">) {
224
+ function ContextMenuShortcut({ className, ...props }: React.ComponentProps<"span">) {
242
225
  return (
243
226
  <span
244
227
  data-slot="context-menu-shortcut"
@@ -1,6 +1,6 @@
1
1
  import { Dialog as DialogPrimitive } from "@base-ui/react/dialog"
2
2
  import { XIcon } from "lucide-react"
3
- import { cn } from "../utils/style.ts"
3
+ import { cn } from "cn"
4
4
  import { Button } from "./button.tsx"
5
5
 
6
6
  function Dialog({ ...props }: DialogPrimitive.Root.Props) {
@@ -19,10 +19,7 @@ function DialogClose({ ...props }: DialogPrimitive.Close.Props) {
19
19
  return <DialogPrimitive.Close data-slot="dialog-close" {...props} />
20
20
  }
21
21
 
22
- function DialogOverlay({
23
- className,
24
- ...props
25
- }: DialogPrimitive.Backdrop.Props) {
22
+ function DialogOverlay({ className, ...props }: DialogPrimitive.Backdrop.Props) {
26
23
  return (
27
24
  <DialogPrimitive.Backdrop
28
25
  data-slot="dialog-overlay"
@@ -59,11 +56,7 @@ function DialogContent({
59
56
  <DialogPrimitive.Close
60
57
  data-slot="dialog-close"
61
58
  render={
62
- <Button
63
- variant="ghost"
64
- className="absolute top-4 right-4"
65
- size="icon-sm"
66
- />
59
+ <Button variant="ghost" className="absolute top-4 right-4" size="icon-sm" />
67
60
  }
68
61
  >
69
62
  <XIcon />
@@ -122,10 +115,7 @@ function DialogTitle({ className, ...props }: DialogPrimitive.Title.Props) {
122
115
  )
123
116
  }
124
117
 
125
- function DialogDescription({
126
- className,
127
- ...props
128
- }: DialogPrimitive.Description.Props) {
118
+ function DialogDescription({ className, ...props }: DialogPrimitive.Description.Props) {
129
119
  return (
130
120
  <DialogPrimitive.Description
131
121
  data-slot="dialog-description"
@@ -1,4 +1 @@
1
- export {
2
- DirectionProvider,
3
- useDirection,
4
- } from "@base-ui/react/direction-provider"
1
+ export { DirectionProvider, useDirection } from "@base-ui/react/direction-provider"
@@ -1,9 +1,7 @@
1
1
  import { Drawer as DrawerPrimitive } from "vaul"
2
- import { cn } from "../utils/style.ts"
2
+ import { cn } from "cn"
3
3
 
4
- function Drawer({
5
- ...props
6
- }: React.ComponentProps<typeof DrawerPrimitive.Root>) {
4
+ function Drawer({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>) {
7
5
  return <DrawerPrimitive.Root data-slot="drawer" {...props} />
8
6
  }
9
7
 
@@ -13,15 +11,11 @@ function DrawerTrigger({
13
11
  return <DrawerPrimitive.Trigger data-slot="drawer-trigger" {...props} />
14
12
  }
15
13
 
16
- function DrawerPortal({
17
- ...props
18
- }: React.ComponentProps<typeof DrawerPrimitive.Portal>) {
14
+ function DrawerPortal({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Portal>) {
19
15
  return <DrawerPrimitive.Portal data-slot="drawer-portal" {...props} />
20
16
  }
21
17
 
22
- function DrawerClose({
23
- ...props
24
- }: React.ComponentProps<typeof DrawerPrimitive.Close>) {
18
+ function DrawerClose({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Close>) {
25
19
  return <DrawerPrimitive.Close data-slot="drawer-close" {...props} />
26
20
  }
27
21
 
@@ -1,6 +1,6 @@
1
1
  import { Menu as MenuPrimitive } from "@base-ui/react/menu"
2
2
  import { CheckIcon, ChevronRightIcon } from "lucide-react"
3
- import { cn } from "../utils/style.ts"
3
+ import { cn } from "cn"
4
4
 
5
5
  function DropdownMenu({ ...props }: MenuPrimitive.Root.Props) {
6
6
  return <MenuPrimitive.Root data-slot="dropdown-menu" {...props} />
@@ -22,10 +22,7 @@ function DropdownMenuContent({
22
22
  className,
23
23
  ...props
24
24
  }: MenuPrimitive.Popup.Props &
25
- Pick<
26
- MenuPrimitive.Positioner.Props,
27
- "align" | "alignOffset" | "side" | "sideOffset"
28
- >) {
25
+ Pick<MenuPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">) {
29
26
  return (
30
27
  <MenuPrimitive.Portal>
31
28
  <MenuPrimitive.Positioner
@@ -177,12 +174,7 @@ function DropdownMenuCheckboxItem({
177
174
  }
178
175
 
179
176
  function DropdownMenuRadioGroup({ ...props }: MenuPrimitive.RadioGroup.Props) {
180
- return (
181
- <MenuPrimitive.RadioGroup
182
- data-slot="dropdown-menu-radio-group"
183
- {...props}
184
- />
185
- )
177
+ return <MenuPrimitive.RadioGroup data-slot="dropdown-menu-radio-group" {...props} />
186
178
  }
187
179
 
188
180
  function DropdownMenuRadioItem({
@@ -212,10 +204,7 @@ function DropdownMenuRadioItem({
212
204
  )
213
205
  }
214
206
 
215
- function DropdownMenuSeparator({
216
- className,
217
- ...props
218
- }: MenuPrimitive.Separator.Props) {
207
+ function DropdownMenuSeparator({ className, ...props }: MenuPrimitive.Separator.Props) {
219
208
  return (
220
209
  <MenuPrimitive.Separator
221
210
  data-slot="dropdown-menu-separator"
@@ -225,10 +214,7 @@ function DropdownMenuSeparator({
225
214
  )
226
215
  }
227
216
 
228
- function DropdownMenuShortcut({
229
- className,
230
- ...props
231
- }: React.ComponentProps<"span">) {
217
+ function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">) {
232
218
  return (
233
219
  <span
234
220
  data-slot="dropdown-menu-shortcut"