harebear-ui 0.0.0-stage → 0.2.2

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 (198) hide show
  1. package/AGENTS.md +66 -0
  2. package/LICENSE +21 -0
  3. package/README.md +92 -2
  4. package/bin/harebear-ui.mjs +125 -0
  5. package/dist/components/admin/activity-feed.d.ts +15 -0
  6. package/dist/components/admin/activity-feed.js +50 -0
  7. package/dist/components/admin/app-shell.d.ts +47 -0
  8. package/dist/components/admin/app-shell.js +108 -0
  9. package/dist/components/admin/callout.d.ts +7 -0
  10. package/dist/components/admin/callout.js +18 -0
  11. package/dist/components/admin/key-value-grid.d.ts +11 -0
  12. package/dist/components/admin/key-value-grid.js +23 -0
  13. package/dist/components/admin/link-tile.d.ts +17 -0
  14. package/dist/components/admin/link-tile.js +36 -0
  15. package/dist/components/admin/page-header.d.ts +14 -0
  16. package/dist/components/admin/page-header.js +41 -0
  17. package/dist/components/admin/search-input.d.ts +12 -0
  18. package/dist/components/admin/search-input.js +32 -0
  19. package/dist/components/admin/stat-card.d.ts +20 -0
  20. package/dist/components/admin/stat-card.js +53 -0
  21. package/dist/components/admin/status.d.ts +12 -0
  22. package/dist/components/admin/status.js +32 -0
  23. package/dist/components/admin/timeline.d.ts +13 -0
  24. package/dist/components/admin/timeline.js +36 -0
  25. package/dist/components/admin/usage-meter.d.ts +17 -0
  26. package/dist/components/admin/usage-meter.js +43 -0
  27. package/dist/components/admin/user-chip.d.ts +14 -0
  28. package/dist/components/admin/user-chip.js +38 -0
  29. package/dist/components/ai/chat.d.ts +44 -0
  30. package/dist/components/ai/chat.js +151 -0
  31. package/dist/components/ai/code-block.d.ts +27 -0
  32. package/dist/components/ai/code-block.js +63 -0
  33. package/dist/components/ai/conversation-list.d.ts +18 -0
  34. package/dist/components/ai/conversation-list.js +30 -0
  35. package/dist/components/ai/model-picker.d.ts +21 -0
  36. package/dist/components/ai/model-picker.js +55 -0
  37. package/dist/components/ai/prompt-input.d.ts +27 -0
  38. package/dist/components/ai/prompt-input.js +99 -0
  39. package/dist/components/auth/auth.d.ts +85 -0
  40. package/dist/components/auth/auth.js +325 -0
  41. package/dist/components/data/bar-list.d.ts +14 -0
  42. package/dist/components/data/bar-list.js +27 -0
  43. package/dist/components/data/data-table.d.ts +70 -0
  44. package/dist/components/data/data-table.js +208 -0
  45. package/dist/components/data/sparkline.d.ts +16 -0
  46. package/dist/components/data/sparkline.js +72 -0
  47. package/dist/components/data/status-bars.d.ts +17 -0
  48. package/dist/components/data/status-bars.js +37 -0
  49. package/dist/components/data/trend-chart.d.ts +31 -0
  50. package/dist/components/data/trend-chart.js +136 -0
  51. package/dist/components/theme/theme-provider.d.ts +42 -0
  52. package/dist/components/theme/theme-provider.js +110 -0
  53. package/dist/components/theme/theme-toggle.d.ts +5 -0
  54. package/dist/components/theme/theme-toggle.js +21 -0
  55. package/dist/components/ui/accordion.d.ts +7 -0
  56. package/dist/components/ui/accordion.js +53 -0
  57. package/dist/components/ui/alert-dialog.d.ts +18 -0
  58. package/dist/components/ui/alert-dialog.js +99 -0
  59. package/dist/components/ui/alert.d.ts +10 -0
  60. package/dist/components/ui/alert.js +42 -0
  61. package/dist/components/ui/aspect-ratio.d.ts +3 -0
  62. package/dist/components/ui/aspect-ratio.js +11 -0
  63. package/dist/components/ui/attachment.d.ts +24 -0
  64. package/dist/components/ui/attachment.js +100 -0
  65. package/dist/components/ui/avatar.d.ts +11 -0
  66. package/dist/components/ui/avatar.js +49 -0
  67. package/dist/components/ui/badge.d.ts +9 -0
  68. package/dist/components/ui/badge.js +30 -0
  69. package/dist/components/ui/breadcrumb.d.ts +11 -0
  70. package/dist/components/ui/breadcrumb.js +70 -0
  71. package/dist/components/ui/bubble.d.ts +17 -0
  72. package/dist/components/ui/bubble.js +71 -0
  73. package/dist/components/ui/button-group.d.ts +11 -0
  74. package/dist/components/ui/button-group.js +39 -0
  75. package/dist/components/ui/button.d.ts +11 -0
  76. package/dist/components/ui/button.js +55 -0
  77. package/dist/components/ui/calendar.d.ts +10 -0
  78. package/dist/components/ui/calendar.js +108 -0
  79. package/dist/components/ui/card.d.ts +11 -0
  80. package/dist/components/ui/card.js +55 -0
  81. package/dist/components/ui/carousel.d.ts +28 -0
  82. package/dist/components/ui/carousel.js +131 -0
  83. package/dist/components/ui/chart.d.ts +44 -0
  84. package/dist/components/ui/chart.js +148 -0
  85. package/dist/components/ui/checkbox.d.ts +4 -0
  86. package/dist/components/ui/checkbox.js +19 -0
  87. package/dist/components/ui/code-block.d.ts +26 -0
  88. package/dist/components/ui/code-block.js +123 -0
  89. package/dist/components/ui/collapsible.d.ts +5 -0
  90. package/dist/components/ui/collapsible.js +23 -0
  91. package/dist/components/ui/combobox.d.ts +24 -0
  92. package/dist/components/ui/combobox.js +162 -0
  93. package/dist/components/ui/command.d.ts +18 -0
  94. package/dist/components/ui/command.js +86 -0
  95. package/dist/components/ui/context-menu.d.ts +31 -0
  96. package/dist/components/ui/context-menu.js +123 -0
  97. package/dist/components/ui/dialog.d.ts +17 -0
  98. package/dist/components/ui/dialog.js +94 -0
  99. package/dist/components/ui/direction.d.ts +7 -0
  100. package/dist/components/ui/direction.js +12 -0
  101. package/dist/components/ui/drawer.d.ts +13 -0
  102. package/dist/components/ui/drawer.js +76 -0
  103. package/dist/components/ui/dropdown-menu.d.ts +29 -0
  104. package/dist/components/ui/dropdown-menu.js +126 -0
  105. package/dist/components/ui/empty.d.ts +11 -0
  106. package/dist/components/ui/empty.js +59 -0
  107. package/dist/components/ui/field.d.ts +24 -0
  108. package/dist/components/ui/field.js +109 -0
  109. package/dist/components/ui/hover-card.d.ts +6 -0
  110. package/dist/components/ui/hover-card.js +30 -0
  111. package/dist/components/ui/input-group.d.ts +16 -0
  112. package/dist/components/ui/input-group.js +77 -0
  113. package/dist/components/ui/input-otp.d.ts +11 -0
  114. package/dist/components/ui/input-otp.js +46 -0
  115. package/dist/components/ui/input.d.ts +3 -0
  116. package/dist/components/ui/input.js +13 -0
  117. package/dist/components/ui/item.d.ts +23 -0
  118. package/dist/components/ui/item.js +117 -0
  119. package/dist/components/ui/kbd.d.ts +3 -0
  120. package/dist/components/ui/kbd.js +19 -0
  121. package/dist/components/ui/label.d.ts +4 -0
  122. package/dist/components/ui/label.js +13 -0
  123. package/dist/components/ui/marker.d.ts +11 -0
  124. package/dist/components/ui/marker.js +39 -0
  125. package/dist/components/ui/menubar.d.ts +30 -0
  126. package/dist/components/ui/menubar.js +133 -0
  127. package/dist/components/ui/message-scroller.d.ts +10 -0
  128. package/dist/components/ui/message-scroller.js +59 -0
  129. package/dist/components/ui/message.d.ts +10 -0
  130. package/dist/components/ui/message.js +48 -0
  131. package/dist/components/ui/native-select.d.ts +8 -0
  132. package/dist/components/ui/native-select.js +37 -0
  133. package/dist/components/ui/navigation-menu.d.ts +14 -0
  134. package/dist/components/ui/navigation-menu.js +79 -0
  135. package/dist/components/ui/pagination.d.ts +17 -0
  136. package/dist/components/ui/pagination.js +79 -0
  137. package/dist/components/ui/popover.d.ts +10 -0
  138. package/dist/components/ui/popover.js +54 -0
  139. package/dist/components/ui/progress.d.ts +4 -0
  140. package/dist/components/ui/progress.js +18 -0
  141. package/dist/components/ui/questionnaire.d.ts +19 -0
  142. package/dist/components/ui/questionnaire.js +168 -0
  143. package/dist/components/ui/radio-group.d.ts +5 -0
  144. package/dist/components/ui/radio-group.js +25 -0
  145. package/dist/components/ui/resizable.d.ts +7 -0
  146. package/dist/components/ui/resizable.js +27 -0
  147. package/dist/components/ui/scroll-area.d.ts +5 -0
  148. package/dist/components/ui/scroll-area.js +35 -0
  149. package/dist/components/ui/select.d.ts +15 -0
  150. package/dist/components/ui/select.js +98 -0
  151. package/dist/components/ui/separator.d.ts +4 -0
  152. package/dist/components/ui/separator.js +15 -0
  153. package/dist/components/ui/sheet.d.ts +14 -0
  154. package/dist/components/ui/sheet.js +88 -0
  155. package/dist/components/ui/sidebar.d.ts +69 -0
  156. package/dist/components/ui/sidebar.js +377 -0
  157. package/dist/components/ui/skeleton.d.ts +2 -0
  158. package/dist/components/ui/skeleton.js +12 -0
  159. package/dist/components/ui/slider.d.ts +4 -0
  160. package/dist/components/ui/slider.js +35 -0
  161. package/dist/components/ui/sonner.d.ts +3 -0
  162. package/dist/components/ui/sonner.js +29 -0
  163. package/dist/components/ui/spinner.d.ts +2 -0
  164. package/dist/components/ui/spinner.js +15 -0
  165. package/dist/components/ui/switch.d.ts +6 -0
  166. package/dist/components/ui/switch.js +18 -0
  167. package/dist/components/ui/table.d.ts +10 -0
  168. package/dist/components/ui/table.js +65 -0
  169. package/dist/components/ui/tabs.d.ts +11 -0
  170. package/dist/components/ui/tabs.js +45 -0
  171. package/dist/components/ui/textarea.d.ts +3 -0
  172. package/dist/components/ui/textarea.js +12 -0
  173. package/dist/components/ui/toggle-group.d.ts +10 -0
  174. package/dist/components/ui/toggle-group.js +50 -0
  175. package/dist/components/ui/toggle.d.ts +9 -0
  176. package/dist/components/ui/toggle.js +35 -0
  177. package/dist/components/ui/tooltip.d.ts +7 -0
  178. package/dist/components/ui/tooltip.js +34 -0
  179. package/dist/components/ui/trace.d.ts +18 -0
  180. package/dist/components/ui/trace.js +74 -0
  181. package/dist/hooks/use-copy-to-clipboard.d.ts +5 -0
  182. package/dist/hooks/use-copy-to-clipboard.js +24 -0
  183. package/dist/hooks/use-highlighted-code.d.ts +2 -0
  184. package/dist/hooks/use-highlighted-code.js +54 -0
  185. package/dist/hooks/use-mobile.d.ts +1 -0
  186. package/dist/hooks/use-mobile.js +17 -0
  187. package/dist/index.d.ts +94 -0
  188. package/dist/index.js +94 -0
  189. package/dist/lib/highlighter.d.ts +9 -0
  190. package/dist/lib/highlighter.js +77 -0
  191. package/dist/lib/utils.d.ts +3 -0
  192. package/dist/lib/utils.js +8 -0
  193. package/dist/shadcn-base.css +638 -0
  194. package/dist/styles.css +188 -0
  195. package/docs/COMPONENTS.md +405 -0
  196. package/llms.txt +36 -0
  197. package/package.json +119 -4
  198. package/skills/harebear-ui/SKILL.md +34 -0
@@ -0,0 +1,77 @@
1
+ "use client";
2
+ import { cn } from "../../lib/utils.js";
3
+ import { Button } from "./button.js";
4
+ import { Input } from "./input.js";
5
+ import { Textarea } from "./textarea.js";
6
+ import { jsx } from "react/jsx-runtime";
7
+ import { cva } from "class-variance-authority";
8
+ // src/components/ui/input-group.tsx
9
+ function InputGroup({ className, ...props }) {
10
+ return /* @__PURE__ */ jsx("div", {
11
+ "data-slot": "input-group",
12
+ role: "group",
13
+ className: cn("group/input-group relative flex h-10 w-full min-w-0 items-center rounded-md border border-transparent bg-muted transition-[border-color,box-shadow,background-color] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-primary has-[[data-slot=input-group-control]:focus-visible]:bg-card has-[[data-slot=input-group-control]:focus-visible]:ring-4 has-[[data-slot=input-group-control]:focus-visible]:ring-primary/15 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5", className),
14
+ ...props
15
+ });
16
+ }
17
+ const inputGroupAddonVariants = cva("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4", {
18
+ variants: { align: {
19
+ "inline-start": "order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]",
20
+ "inline-end": "order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]",
21
+ "block-start": "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
22
+ "block-end": "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"
23
+ } },
24
+ defaultVariants: { align: "inline-start" }
25
+ });
26
+ function InputGroupAddon({ className, align = "inline-start", ...props }) {
27
+ return /* @__PURE__ */ jsx("div", {
28
+ role: "group",
29
+ "data-slot": "input-group-addon",
30
+ "data-align": align,
31
+ className: cn(inputGroupAddonVariants({ align }), className),
32
+ onClick: (e) => {
33
+ if (e.target.closest("button")) return;
34
+ e.currentTarget.parentElement?.querySelector("input")?.focus();
35
+ },
36
+ ...props
37
+ });
38
+ }
39
+ const inputGroupButtonVariants = cva("flex items-center gap-2 text-sm shadow-none", {
40
+ variants: { size: {
41
+ xs: "h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
42
+ sm: "",
43
+ "icon-xs": "size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0",
44
+ "icon-sm": "size-8 p-0 has-[>svg]:p-0"
45
+ } },
46
+ defaultVariants: { size: "xs" }
47
+ });
48
+ function InputGroupButton({ className, type = "button", variant = "ghost", size = "xs", ...props }) {
49
+ return /* @__PURE__ */ jsx(Button, {
50
+ type,
51
+ "data-size": size,
52
+ variant,
53
+ className: cn(inputGroupButtonVariants({ size }), className),
54
+ ...props
55
+ });
56
+ }
57
+ function InputGroupText({ className, ...props }) {
58
+ return /* @__PURE__ */ jsx("span", {
59
+ className: cn("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
60
+ ...props
61
+ });
62
+ }
63
+ function InputGroupInput({ className, ...props }) {
64
+ return /* @__PURE__ */ jsx(Input, {
65
+ "data-slot": "input-group-control",
66
+ className: cn("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent", className),
67
+ ...props
68
+ });
69
+ }
70
+ function InputGroupTextarea({ className, ...props }) {
71
+ return /* @__PURE__ */ jsx(Textarea, {
72
+ "data-slot": "input-group-control",
73
+ className: cn("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent", className),
74
+ ...props
75
+ });
76
+ }
77
+ export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea };
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ import { OTPInput } from "input-otp";
3
+ declare function InputOTP({ className, containerClassName, ...props }: React.ComponentProps<typeof OTPInput> & {
4
+ containerClassName?: string;
5
+ }): React.JSX.Element;
6
+ declare function InputOTPGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
7
+ declare function InputOTPSlot({ index, className, ...props }: React.ComponentProps<"div"> & {
8
+ index: number;
9
+ }): React.JSX.Element;
10
+ declare function InputOTPSeparator({ ...props }: React.ComponentProps<"div">): React.JSX.Element;
11
+ export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
@@ -0,0 +1,46 @@
1
+ "use client";
2
+ import { cn } from "../../lib/utils.js";
3
+ import * as React from "react";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { MinusIcon } from "lucide-react";
6
+ import { OTPInput, OTPInputContext } from "input-otp";
7
+ // src/components/ui/input-otp.tsx
8
+ function InputOTP({ className, containerClassName, ...props }) {
9
+ return /* @__PURE__ */ jsx(OTPInput, {
10
+ "data-slot": "input-otp",
11
+ containerClassName: cn("cn-input-otp flex items-center has-disabled:opacity-50", containerClassName),
12
+ spellCheck: false,
13
+ className: cn("disabled:cursor-not-allowed", className),
14
+ ...props
15
+ });
16
+ }
17
+ function InputOTPGroup({ className, ...props }) {
18
+ return /* @__PURE__ */ jsx("div", {
19
+ "data-slot": "input-otp-group",
20
+ className: cn("flex items-center rounded-lg has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40", className),
21
+ ...props
22
+ });
23
+ }
24
+ function InputOTPSlot({ index, className, ...props }) {
25
+ const { char, hasFakeCaret, isActive } = React.useContext(OTPInputContext)?.slots[index] ?? {};
26
+ return /* @__PURE__ */ jsxs("div", {
27
+ "data-slot": "input-otp-slot",
28
+ "data-active": isActive,
29
+ className: cn("relative flex size-8 items-center justify-center border-y border-r border-input text-sm transition-all outline-none first:rounded-l-lg first:border-l last:rounded-r-lg aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-3 data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40", className),
30
+ ...props,
31
+ children: [char, hasFakeCaret && /* @__PURE__ */ jsx("div", {
32
+ className: "pointer-events-none absolute inset-0 flex items-center justify-center",
33
+ children: /* @__PURE__ */ jsx("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" })
34
+ })]
35
+ });
36
+ }
37
+ function InputOTPSeparator({ ...props }) {
38
+ return /* @__PURE__ */ jsx("div", {
39
+ "data-slot": "input-otp-separator",
40
+ className: "flex items-center [&_svg:not([class*='size-'])]:size-4",
41
+ role: "separator",
42
+ ...props,
43
+ children: /* @__PURE__ */ jsx(MinusIcon, {})
44
+ });
45
+ }
46
+ export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
@@ -0,0 +1,3 @@
1
+ import * as React from "react";
2
+ declare function Input({ className, type, ...props }: React.ComponentProps<"input">): React.JSX.Element;
3
+ export { Input };
@@ -0,0 +1,13 @@
1
+ "use client";
2
+ import { cn } from "../../lib/utils.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ // src/components/ui/input.tsx
5
+ function Input({ className, type, ...props }) {
6
+ return /* @__PURE__ */ jsx("input", {
7
+ type,
8
+ "data-slot": "input",
9
+ className: cn("h-10 w-full min-w-0 py-1 file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground [&::-webkit-search-cancel-button]:hidden rounded-md border border-transparent bg-muted px-3.5 text-base transition-[border-color,box-shadow,background-color] outline-none placeholder:text-muted-foreground focus-visible:border-primary focus-visible:bg-card focus-visible:ring-4 focus-visible:ring-primary/15 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-4 aria-invalid:ring-destructive/15 md:text-sm", className),
10
+ ...props
11
+ });
12
+ }
13
+ export { Input };
@@ -0,0 +1,23 @@
1
+ import { Separator } from "./separator.js";
2
+ import * as React from "react";
3
+ import { VariantProps } from "class-variance-authority";
4
+ declare function ItemGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
5
+ declare function ItemSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): React.JSX.Element;
6
+ declare const itemVariants: (props?: ({
7
+ variant?: "default" | "muted" | "outline" | null | undefined;
8
+ size?: "default" | "sm" | "xs" | null | undefined;
9
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
+ declare function Item({ className, variant, size, asChild, ...props }: React.ComponentProps<"div"> & VariantProps<typeof itemVariants> & {
11
+ asChild?: boolean;
12
+ }): React.JSX.Element;
13
+ declare const itemMediaVariants: (props?: ({
14
+ variant?: "default" | "icon" | "image" | null | undefined;
15
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
16
+ declare function ItemMedia({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof itemMediaVariants>): React.JSX.Element;
17
+ declare function ItemContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
18
+ declare function ItemTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
19
+ declare function ItemDescription({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
20
+ declare function ItemActions({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
21
+ declare function ItemHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
22
+ declare function ItemFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
23
+ export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle };
@@ -0,0 +1,117 @@
1
+ "use client";
2
+ import { cn } from "../../lib/utils.js";
3
+ import { Separator as Separator$1 } from "./separator.js";
4
+ import { jsx } from "react/jsx-runtime";
5
+ import { cva } from "class-variance-authority";
6
+ import { Slot } from "radix-ui";
7
+ // src/components/ui/item.tsx
8
+ function ItemGroup({ className, ...props }) {
9
+ return /* @__PURE__ */ jsx("div", {
10
+ role: "list",
11
+ "data-slot": "item-group",
12
+ className: cn("group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2", className),
13
+ ...props
14
+ });
15
+ }
16
+ function ItemSeparator({ className, ...props }) {
17
+ return /* @__PURE__ */ jsx(Separator$1, {
18
+ "data-slot": "item-separator",
19
+ orientation: "horizontal",
20
+ className: cn("my-2", className),
21
+ ...props
22
+ });
23
+ }
24
+ const itemVariants = cva("group/item flex w-full flex-wrap items-center rounded-lg border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted", {
25
+ variants: {
26
+ variant: {
27
+ default: "border-transparent",
28
+ outline: "border-border",
29
+ muted: "border-transparent bg-muted/50"
30
+ },
31
+ size: {
32
+ default: "gap-2.5 px-3 py-2.5",
33
+ sm: "gap-2.5 px-3 py-2.5",
34
+ xs: "gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0"
35
+ }
36
+ },
37
+ defaultVariants: {
38
+ variant: "default",
39
+ size: "default"
40
+ }
41
+ });
42
+ function Item({ className, variant = "default", size = "default", asChild = false, ...props }) {
43
+ const Comp = asChild ? Slot.Root : "div";
44
+ return /* @__PURE__ */ jsx(Comp, {
45
+ "data-slot": "item",
46
+ "data-variant": variant,
47
+ "data-size": size,
48
+ className: cn(itemVariants({
49
+ variant,
50
+ size,
51
+ className
52
+ })),
53
+ ...props
54
+ });
55
+ }
56
+ const itemMediaVariants = cva("flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none", {
57
+ variants: { variant: {
58
+ default: "bg-transparent",
59
+ icon: "[&_svg:not([class*='size-'])]:size-4",
60
+ image: "size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover"
61
+ } },
62
+ defaultVariants: { variant: "default" }
63
+ });
64
+ function ItemMedia({ className, variant = "default", ...props }) {
65
+ return /* @__PURE__ */ jsx("div", {
66
+ "data-slot": "item-media",
67
+ "data-variant": variant,
68
+ className: cn(itemMediaVariants({
69
+ variant,
70
+ className
71
+ })),
72
+ ...props
73
+ });
74
+ }
75
+ function ItemContent({ className, ...props }) {
76
+ return /* @__PURE__ */ jsx("div", {
77
+ "data-slot": "item-content",
78
+ className: cn("flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none", className),
79
+ ...props
80
+ });
81
+ }
82
+ function ItemTitle({ className, ...props }) {
83
+ return /* @__PURE__ */ jsx("div", {
84
+ "data-slot": "item-title",
85
+ className: cn("line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4", className),
86
+ ...props
87
+ });
88
+ }
89
+ function ItemDescription({ className, ...props }) {
90
+ return /* @__PURE__ */ jsx("p", {
91
+ "data-slot": "item-description",
92
+ className: cn("line-clamp-2 text-left text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
93
+ ...props
94
+ });
95
+ }
96
+ function ItemActions({ className, ...props }) {
97
+ return /* @__PURE__ */ jsx("div", {
98
+ "data-slot": "item-actions",
99
+ className: cn("flex items-center gap-2", className),
100
+ ...props
101
+ });
102
+ }
103
+ function ItemHeader({ className, ...props }) {
104
+ return /* @__PURE__ */ jsx("div", {
105
+ "data-slot": "item-header",
106
+ className: cn("flex basis-full items-center justify-between gap-2", className),
107
+ ...props
108
+ });
109
+ }
110
+ function ItemFooter({ className, ...props }) {
111
+ return /* @__PURE__ */ jsx("div", {
112
+ "data-slot": "item-footer",
113
+ className: cn("flex basis-full items-center justify-between gap-2", className),
114
+ ...props
115
+ });
116
+ }
117
+ export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle };
@@ -0,0 +1,3 @@
1
+ declare function Kbd({ className, ...props }: React.ComponentProps<"kbd">): import("react").JSX.Element;
2
+ declare function KbdGroup({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
3
+ export { Kbd, KbdGroup };
@@ -0,0 +1,19 @@
1
+ "use client";
2
+ import { cn } from "../../lib/utils.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ // src/components/ui/kbd.tsx
5
+ function Kbd({ className, ...props }) {
6
+ return /* @__PURE__ */ jsx("kbd", {
7
+ "data-slot": "kbd",
8
+ className: cn("pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-[6px] border bg-card px-1.5 font-mono text-[11px] font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3", className),
9
+ ...props
10
+ });
11
+ }
12
+ function KbdGroup({ className, ...props }) {
13
+ return /* @__PURE__ */ jsx("kbd", {
14
+ "data-slot": "kbd-group",
15
+ className: cn("inline-flex items-center gap-1", className),
16
+ ...props
17
+ });
18
+ }
19
+ export { Kbd, KbdGroup };
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import { Label as Label$1 } from "radix-ui";
3
+ declare function Label({ className, ...props }: React.ComponentProps<typeof Label$1.Root>): React.JSX.Element;
4
+ export { Label };
@@ -0,0 +1,13 @@
1
+ "use client";
2
+ import { cn } from "../../lib/utils.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { Label as Label$1 } from "radix-ui";
5
+ // src/components/ui/label.tsx
6
+ function Label({ className, ...props }) {
7
+ return /* @__PURE__ */ jsx(Label$1.Root, {
8
+ "data-slot": "label",
9
+ className: cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className),
10
+ ...props
11
+ });
12
+ }
13
+ export { Label };
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ import { VariantProps } from "class-variance-authority";
3
+ declare const markerVariants: (props?: ({
4
+ variant?: "border" | "default" | "separator" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ declare function Marker({ className, variant, asChild, ...props }: React.ComponentProps<"div"> & VariantProps<typeof markerVariants> & {
7
+ asChild?: boolean;
8
+ }): React.JSX.Element;
9
+ declare function MarkerIcon({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
10
+ declare function MarkerContent({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
11
+ export { Marker, MarkerContent, MarkerIcon, markerVariants };
@@ -0,0 +1,39 @@
1
+ "use client";
2
+ import { cn } from "../../lib/utils.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { cva } from "class-variance-authority";
5
+ import { Slot } from "radix-ui";
6
+ // src/components/ui/marker.tsx
7
+ const markerVariants = cva("group/marker relative flex min-h-4 w-full items-center gap-2 text-left text-sm text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [a]:underline [a]:underline-offset-3 [a]:hover:text-foreground", { variants: { variant: {
8
+ default: "",
9
+ separator: "before:mr-1 before:h-px before:min-w-0 before:flex-1 before:bg-border after:ml-1 after:h-px after:min-w-0 after:flex-1 after:bg-border",
10
+ border: "border-b border-border pb-2"
11
+ } } });
12
+ function Marker({ className, variant = "default", asChild = false, ...props }) {
13
+ const Comp = asChild ? Slot.Root : "div";
14
+ return /* @__PURE__ */ jsx(Comp, {
15
+ "data-slot": "marker",
16
+ "data-variant": variant,
17
+ className: cn(markerVariants({
18
+ variant,
19
+ className
20
+ })),
21
+ ...props
22
+ });
23
+ }
24
+ function MarkerIcon({ className, ...props }) {
25
+ return /* @__PURE__ */ jsx("span", {
26
+ "data-slot": "marker-icon",
27
+ "aria-hidden": "true",
28
+ className: cn("size-4 shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
29
+ ...props
30
+ });
31
+ }
32
+ function MarkerContent({ className, ...props }) {
33
+ return /* @__PURE__ */ jsx("span", {
34
+ "data-slot": "marker-content",
35
+ className: cn("min-w-0 wrap-break-word group-data-[variant=separator]/marker:flex-none group-data-[variant=separator]/marker:text-center *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className),
36
+ ...props
37
+ });
38
+ }
39
+ export { Marker, MarkerContent, MarkerIcon, markerVariants };
@@ -0,0 +1,30 @@
1
+ import * as React from "react";
2
+ import { Menubar as Menubar$1 } from "radix-ui";
3
+ declare function Menubar({ className, ...props }: React.ComponentProps<typeof Menubar$1.Root>): React.JSX.Element;
4
+ declare function MenubarMenu({ ...props }: React.ComponentProps<typeof Menubar$1.Menu>): React.JSX.Element;
5
+ declare function MenubarGroup({ ...props }: React.ComponentProps<typeof Menubar$1.Group>): React.JSX.Element;
6
+ declare function MenubarPortal({ ...props }: React.ComponentProps<typeof Menubar$1.Portal>): React.JSX.Element;
7
+ declare function MenubarRadioGroup({ ...props }: React.ComponentProps<typeof Menubar$1.RadioGroup>): React.JSX.Element;
8
+ declare function MenubarTrigger({ className, ...props }: React.ComponentProps<typeof Menubar$1.Trigger>): React.JSX.Element;
9
+ declare function MenubarContent({ className, align, alignOffset, sideOffset, ...props }: React.ComponentProps<typeof Menubar$1.Content>): React.JSX.Element;
10
+ declare function MenubarItem({ className, inset, variant, ...props }: React.ComponentProps<typeof Menubar$1.Item> & {
11
+ inset?: boolean;
12
+ variant?: "default" | "destructive";
13
+ }): React.JSX.Element;
14
+ declare function MenubarCheckboxItem({ className, children, checked, inset, ...props }: React.ComponentProps<typeof Menubar$1.CheckboxItem> & {
15
+ inset?: boolean;
16
+ }): React.JSX.Element;
17
+ declare function MenubarRadioItem({ className, children, inset, ...props }: React.ComponentProps<typeof Menubar$1.RadioItem> & {
18
+ inset?: boolean;
19
+ }): React.JSX.Element;
20
+ declare function MenubarLabel({ className, inset, ...props }: React.ComponentProps<typeof Menubar$1.Label> & {
21
+ inset?: boolean;
22
+ }): React.JSX.Element;
23
+ declare function MenubarSeparator({ className, ...props }: React.ComponentProps<typeof Menubar$1.Separator>): React.JSX.Element;
24
+ declare function MenubarShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
25
+ declare function MenubarSub({ ...props }: React.ComponentProps<typeof Menubar$1.Sub>): React.JSX.Element;
26
+ declare function MenubarSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof Menubar$1.SubTrigger> & {
27
+ inset?: boolean;
28
+ }): React.JSX.Element;
29
+ declare function MenubarSubContent({ className, ...props }: React.ComponentProps<typeof Menubar$1.SubContent>): React.JSX.Element;
30
+ export { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger };
@@ -0,0 +1,133 @@
1
+ "use client";
2
+ import { cn } from "../../lib/utils.js";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { CheckIcon, ChevronRightIcon } from "lucide-react";
5
+ import { Menubar as Menubar$1 } from "radix-ui";
6
+ // src/components/ui/menubar.tsx
7
+ function Menubar({ className, ...props }) {
8
+ return /* @__PURE__ */ jsx(Menubar$1.Root, {
9
+ "data-slot": "menubar",
10
+ className: cn("flex h-8 items-center gap-0.5 rounded-lg border p-[3px]", className),
11
+ ...props
12
+ });
13
+ }
14
+ function MenubarMenu({ ...props }) {
15
+ return /* @__PURE__ */ jsx(Menubar$1.Menu, {
16
+ "data-slot": "menubar-menu",
17
+ ...props
18
+ });
19
+ }
20
+ function MenubarGroup({ ...props }) {
21
+ return /* @__PURE__ */ jsx(Menubar$1.Group, {
22
+ "data-slot": "menubar-group",
23
+ ...props
24
+ });
25
+ }
26
+ function MenubarPortal({ ...props }) {
27
+ return /* @__PURE__ */ jsx(Menubar$1.Portal, {
28
+ "data-slot": "menubar-portal",
29
+ ...props
30
+ });
31
+ }
32
+ function MenubarRadioGroup({ ...props }) {
33
+ return /* @__PURE__ */ jsx(Menubar$1.RadioGroup, {
34
+ "data-slot": "menubar-radio-group",
35
+ ...props
36
+ });
37
+ }
38
+ function MenubarTrigger({ className, ...props }) {
39
+ return /* @__PURE__ */ jsx(Menubar$1.Trigger, {
40
+ "data-slot": "menubar-trigger",
41
+ className: cn("flex items-center rounded-sm px-1.5 py-[2px] text-sm font-medium outline-hidden select-none hover:bg-muted aria-expanded:bg-muted", className),
42
+ ...props
43
+ });
44
+ }
45
+ function MenubarContent({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }) {
46
+ return /* @__PURE__ */ jsx(MenubarPortal, { children: /* @__PURE__ */ jsx(Menubar$1.Content, {
47
+ "data-slot": "menubar-content",
48
+ align,
49
+ alignOffset,
50
+ sideOffset,
51
+ className: cn("z-50 min-w-36 origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95", className),
52
+ ...props
53
+ }) });
54
+ }
55
+ function MenubarItem({ className, inset, variant = "default", ...props }) {
56
+ return /* @__PURE__ */ jsx(Menubar$1.Item, {
57
+ "data-slot": "menubar-item",
58
+ "data-inset": inset,
59
+ "data-variant": variant,
60
+ className: cn("group/menubar-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive!", className),
61
+ ...props
62
+ });
63
+ }
64
+ function MenubarCheckboxItem({ className, children, checked, inset, ...props }) {
65
+ return /* @__PURE__ */ jsxs(Menubar$1.CheckboxItem, {
66
+ "data-slot": "menubar-checkbox-item",
67
+ "data-inset": inset,
68
+ className: cn("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0", className),
69
+ checked,
70
+ ...props,
71
+ children: [/* @__PURE__ */ jsx("span", {
72
+ className: "pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
73
+ children: /* @__PURE__ */ jsx(Menubar$1.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
74
+ }), children]
75
+ });
76
+ }
77
+ function MenubarRadioItem({ className, children, inset, ...props }) {
78
+ return /* @__PURE__ */ jsxs(Menubar$1.RadioItem, {
79
+ "data-slot": "menubar-radio-item",
80
+ "data-inset": inset,
81
+ className: cn("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
82
+ ...props,
83
+ children: [/* @__PURE__ */ jsx("span", {
84
+ className: "pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
85
+ children: /* @__PURE__ */ jsx(Menubar$1.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
86
+ }), children]
87
+ });
88
+ }
89
+ function MenubarLabel({ className, inset, ...props }) {
90
+ return /* @__PURE__ */ jsx(Menubar$1.Label, {
91
+ "data-slot": "menubar-label",
92
+ "data-inset": inset,
93
+ className: cn("px-1.5 py-1 text-sm font-medium data-inset:pl-7", className),
94
+ ...props
95
+ });
96
+ }
97
+ function MenubarSeparator({ className, ...props }) {
98
+ return /* @__PURE__ */ jsx(Menubar$1.Separator, {
99
+ "data-slot": "menubar-separator",
100
+ className: cn("-mx-1 my-1 h-px bg-border", className),
101
+ ...props
102
+ });
103
+ }
104
+ function MenubarShortcut({ className, ...props }) {
105
+ return /* @__PURE__ */ jsx("span", {
106
+ "data-slot": "menubar-shortcut",
107
+ className: cn("ml-auto text-xs tracking-widest text-muted-foreground group-focus/menubar-item:text-accent-foreground", className),
108
+ ...props
109
+ });
110
+ }
111
+ function MenubarSub({ ...props }) {
112
+ return /* @__PURE__ */ jsx(Menubar$1.Sub, {
113
+ "data-slot": "menubar-sub",
114
+ ...props
115
+ });
116
+ }
117
+ function MenubarSubTrigger({ className, inset, children, ...props }) {
118
+ return /* @__PURE__ */ jsxs(Menubar$1.SubTrigger, {
119
+ "data-slot": "menubar-sub-trigger",
120
+ "data-inset": inset,
121
+ className: cn("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-none select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4", className),
122
+ ...props,
123
+ children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto size-4" })]
124
+ });
125
+ }
126
+ function MenubarSubContent({ className, ...props }) {
127
+ return /* @__PURE__ */ jsx(Menubar$1.SubContent, {
128
+ "data-slot": "menubar-sub-content",
129
+ className: cn("z-50 min-w-32 origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
130
+ ...props
131
+ });
132
+ }
133
+ export { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger };
@@ -0,0 +1,10 @@
1
+ import { Button } from "./button.js";
2
+ import * as React from "react";
3
+ import { MessageScroller as MessageScroller$1, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from "@shadcn/react/message-scroller";
4
+ declare function MessageScrollerProvider(props: React.ComponentProps<typeof MessageScroller$1.Provider>): React.JSX.Element;
5
+ declare function MessageScroller({ className, ...props }: React.ComponentProps<typeof MessageScroller$1.Root>): React.JSX.Element;
6
+ declare function MessageScrollerViewport({ className, ...props }: React.ComponentProps<typeof MessageScroller$1.Viewport>): React.JSX.Element;
7
+ declare function MessageScrollerContent({ className, ...props }: React.ComponentProps<typeof MessageScroller$1.Content>): React.JSX.Element;
8
+ declare function MessageScrollerItem({ className, scrollAnchor, ...props }: React.ComponentProps<typeof MessageScroller$1.Item>): React.JSX.Element;
9
+ declare function MessageScrollerButton({ direction, className, children, render, variant, size, ...props }: React.ComponentProps<typeof MessageScroller$1.Button> & Pick<React.ComponentProps<typeof Button>, "variant" | "size">): React.JSX.Element;
10
+ export { MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility };
@@ -0,0 +1,59 @@
1
+ "use client";
2
+ import { cn } from "../../lib/utils.js";
3
+ import { Button } from "./button.js";
4
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
+ import { ArrowDownIcon } from "lucide-react";
6
+ import { MessageScroller as MessageScroller$1, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from "@shadcn/react/message-scroller";
7
+ // src/components/ui/message-scroller.tsx
8
+ function MessageScrollerProvider(props) {
9
+ return /* @__PURE__ */ jsx(MessageScroller$1.Provider, { ...props });
10
+ }
11
+ function MessageScroller({ className, ...props }) {
12
+ return /* @__PURE__ */ jsx(MessageScroller$1.Root, {
13
+ "data-slot": "message-scroller",
14
+ className: cn("group/message-scroller relative flex size-full min-h-0 flex-col overflow-hidden", className),
15
+ ...props
16
+ });
17
+ }
18
+ function MessageScrollerViewport({ className, ...props }) {
19
+ return /* @__PURE__ */ jsx(MessageScroller$1.Viewport, {
20
+ "data-slot": "message-scroller-viewport",
21
+ className: cn("size-full min-h-0 min-w-0 scroll-fade-b scrollbar-thin scrollbar-gutter-stable overflow-y-auto overscroll-contain contain-content data-autoscrolling:scrollbar-thumb-transparent data-autoscrolling:scrollbar-track-transparent data-pending-scroll:invisible", className),
22
+ ...props
23
+ });
24
+ }
25
+ function MessageScrollerContent({ className, ...props }) {
26
+ return /* @__PURE__ */ jsx(MessageScroller$1.Content, {
27
+ "data-slot": "message-scroller-content",
28
+ className: cn("flex h-max min-h-full flex-col gap-6", className),
29
+ ...props
30
+ });
31
+ }
32
+ function MessageScrollerItem({ className, scrollAnchor = false, ...props }) {
33
+ return /* @__PURE__ */ jsx(MessageScroller$1.Item, {
34
+ "data-slot": "message-scroller-item",
35
+ scrollAnchor,
36
+ className: cn("min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]", className),
37
+ ...props
38
+ });
39
+ }
40
+ function MessageScrollerButton({ direction = "end", className, children, render, variant = "secondary", size = "icon-sm", ...props }) {
41
+ return /* @__PURE__ */ jsx(MessageScroller$1.Button, {
42
+ "data-slot": "message-scroller-button",
43
+ "data-direction": direction,
44
+ "data-variant": variant,
45
+ "data-size": size,
46
+ direction,
47
+ className: cn("absolute inset-s-1/2 -translate-x-1/2 border-border bg-background text-foreground transition-[translate,scale,opacity] duration-200 hover:bg-muted hover:text-foreground data-[active=false]:pointer-events-none data-[active=false]:scale-95 data-[active=false]:opacity-0 data-[active=false]:duration-400 data-[active=false]:ease-[cubic-bezier(0.7,0,0.84,0)] data-[active=true]:translate-y-0 data-[active=true]:scale-100 data-[active=true]:opacity-100 data-[active=true]:ease-[cubic-bezier(0.23,1,0.32,1)] data-[direction=end]:bottom-4 data-[direction=end]:data-[active=false]:translate-y-full data-[direction=start]:top-4 data-[direction=start]:data-[active=false]:-translate-y-full rtl:translate-x-1/2 data-[direction=start]:[&_svg]:rotate-180", className),
48
+ render: render ?? /* @__PURE__ */ jsx(Button, {
49
+ variant,
50
+ size
51
+ }),
52
+ ...props,
53
+ children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ArrowDownIcon, {}), /* @__PURE__ */ jsx("span", {
54
+ className: "sr-only",
55
+ children: direction === "end" ? "Scroll to end" : "Scroll to start"
56
+ })] })
57
+ });
58
+ }
59
+ export { MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility };