@hex-core/components 1.3.1 → 1.5.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 (222) hide show
  1. package/README.md +183 -9
  2. package/dist/_tsup-dts-rollup.d.ts +3105 -0
  3. package/dist/accordion.d.ts +4 -0
  4. package/dist/accordion.js +62 -0
  5. package/dist/accordion.js.map +1 -0
  6. package/dist/alert-dialog.d.ts +11 -0
  7. package/dist/alert-dialog.js +125 -0
  8. package/dist/alert-dialog.js.map +1 -0
  9. package/dist/alert.d.ts +4 -0
  10. package/dist/alert.js +54 -0
  11. package/dist/alert.js.map +1 -0
  12. package/dist/aspect-ratio.d.ts +1 -0
  13. package/dist/aspect-ratio.js +8 -0
  14. package/dist/aspect-ratio.js.map +1 -0
  15. package/dist/avatar.d.ts +3 -0
  16. package/dist/avatar.js +44 -0
  17. package/dist/avatar.js.map +1 -0
  18. package/dist/badge.d.ts +3 -0
  19. package/dist/badge.js +36 -0
  20. package/dist/badge.js.map +1 -0
  21. package/dist/breadcrumb.d.ts +7 -0
  22. package/dist/breadcrumb.js +120 -0
  23. package/dist/breadcrumb.js.map +1 -0
  24. package/dist/button.d.ts +3 -0
  25. package/dist/button.js +113 -0
  26. package/dist/button.js.map +1 -0
  27. package/dist/calendar.d.ts +1 -0
  28. package/dist/calendar.js +126 -0
  29. package/dist/calendar.js.map +1 -0
  30. package/dist/card.d.ts +6 -0
  31. package/dist/card.js +68 -0
  32. package/dist/card.js.map +1 -0
  33. package/dist/checkbox.d.ts +2 -0
  34. package/dist/checkbox.js +65 -0
  35. package/dist/checkbox.js.map +1 -0
  36. package/dist/citation.d.ts +2 -0
  37. package/dist/citation.js +70 -0
  38. package/dist/citation.js.map +1 -0
  39. package/dist/cluster.d.ts +3 -0
  40. package/dist/cluster.js +50 -0
  41. package/dist/cluster.js.map +1 -0
  42. package/dist/code-block-copy.d.ts +2 -0
  43. package/dist/code-block-copy.js +108 -0
  44. package/dist/code-block-copy.js.map +1 -0
  45. package/dist/code-block.d.ts +3 -0
  46. package/dist/code-block.js +90 -0
  47. package/dist/code-block.js.map +1 -0
  48. package/dist/collapsible.d.ts +3 -0
  49. package/dist/collapsible.js +10 -0
  50. package/dist/collapsible.js.map +1 -0
  51. package/dist/color-picker.d.ts +2 -0
  52. package/dist/color-picker.js +321 -0
  53. package/dist/color-picker.js.map +1 -0
  54. package/dist/combobox.d.ts +3 -0
  55. package/dist/combobox.js +226 -0
  56. package/dist/combobox.js.map +1 -0
  57. package/dist/command.d.ts +9 -0
  58. package/dist/command.js +232 -0
  59. package/dist/command.js.map +1 -0
  60. package/dist/composer.d.ts +2 -0
  61. package/dist/composer.js +75 -0
  62. package/dist/composer.js.map +1 -0
  63. package/dist/container.d.ts +3 -0
  64. package/dist/container.js +39 -0
  65. package/dist/container.js.map +1 -0
  66. package/dist/context-menu.d.ts +12 -0
  67. package/dist/context-menu.js +130 -0
  68. package/dist/context-menu.js.map +1 -0
  69. package/dist/data-table.d.ts +2 -0
  70. package/dist/data-table.js +103 -0
  71. package/dist/data-table.js.map +1 -0
  72. package/dist/date-picker.d.ts +2 -0
  73. package/dist/date-picker.js +221 -0
  74. package/dist/date-picker.js.map +1 -0
  75. package/dist/dialog.d.ts +11 -0
  76. package/dist/dialog.js +125 -0
  77. package/dist/dialog.js.map +1 -0
  78. package/dist/drawer.d.ts +10 -0
  79. package/dist/drawer.js +82 -0
  80. package/dist/drawer.js.map +1 -0
  81. package/dist/dropdown-menu.d.ts +13 -0
  82. package/dist/dropdown-menu.js +133 -0
  83. package/dist/dropdown-menu.js.map +1 -0
  84. package/dist/dropzone.d.ts +3 -0
  85. package/dist/dropzone.js +194 -0
  86. package/dist/dropzone.js.map +1 -0
  87. package/dist/file-tree.d.ts +3 -0
  88. package/dist/file-tree.js +322 -0
  89. package/dist/file-tree.js.map +1 -0
  90. package/dist/form.d.ts +8 -0
  91. package/dist/form.js +114 -0
  92. package/dist/form.js.map +1 -0
  93. package/dist/grid.d.ts +3 -0
  94. package/dist/grid.js +58 -0
  95. package/dist/grid.js.map +1 -0
  96. package/dist/hover-card.d.ts +3 -0
  97. package/dist/hover-card.js +34 -0
  98. package/dist/hover-card.js.map +1 -0
  99. package/dist/index.d.ts +298 -1652
  100. package/dist/index.js +1157 -5493
  101. package/dist/index.js.map +1 -1
  102. package/dist/input-otp.d.ts +5 -0
  103. package/dist/input-otp.js +71 -0
  104. package/dist/input-otp.js.map +1 -0
  105. package/dist/input.d.ts +2 -0
  106. package/dist/input.js +40 -0
  107. package/dist/input.js.map +1 -0
  108. package/dist/label.d.ts +2 -0
  109. package/dist/label.js +22 -0
  110. package/dist/label.js.map +1 -0
  111. package/dist/loading-indicator.d.ts +3 -0
  112. package/dist/loading-indicator.js +64 -0
  113. package/dist/loading-indicator.js.map +1 -0
  114. package/dist/markdown.d.ts +2 -0
  115. package/dist/markdown.js +28 -0
  116. package/dist/markdown.js.map +1 -0
  117. package/dist/menubar.d.ts +11 -0
  118. package/dist/menubar.js +106 -0
  119. package/dist/menubar.js.map +1 -0
  120. package/dist/message-actions.d.ts +2 -0
  121. package/dist/message-actions.js +28 -0
  122. package/dist/message-actions.js.map +1 -0
  123. package/dist/message-list.d.ts +2 -0
  124. package/dist/message-list.js +49 -0
  125. package/dist/message-list.js.map +1 -0
  126. package/dist/message.d.ts +3 -0
  127. package/dist/message.js +35 -0
  128. package/dist/message.js.map +1 -0
  129. package/dist/multi-combobox.d.ts +3 -0
  130. package/dist/multi-combobox.js +258 -0
  131. package/dist/multi-combobox.js.map +1 -0
  132. package/dist/navigation-menu.d.ts +9 -0
  133. package/dist/navigation-menu.js +108 -0
  134. package/dist/navigation-menu.js.map +1 -0
  135. package/dist/pagination.d.ts +7 -0
  136. package/dist/pagination.js +195 -0
  137. package/dist/pagination.js.map +1 -0
  138. package/dist/popover.d.ts +4 -0
  139. package/dist/popover.js +35 -0
  140. package/dist/popover.js.map +1 -0
  141. package/dist/progress.d.ts +1 -0
  142. package/dist/progress.js +38 -0
  143. package/dist/progress.js.map +1 -0
  144. package/dist/radio-group.d.ts +2 -0
  145. package/dist/radio-group.js +44 -0
  146. package/dist/radio-group.js.map +1 -0
  147. package/dist/reasoning.d.ts +2 -0
  148. package/dist/reasoning.js +90 -0
  149. package/dist/reasoning.js.map +1 -0
  150. package/dist/resizable.d.ts +3 -0
  151. package/dist/resizable.js +66 -0
  152. package/dist/resizable.js.map +1 -0
  153. package/dist/schemas.d.ts +72 -0
  154. package/dist/schemas.js +5491 -0
  155. package/dist/schemas.js.map +1 -0
  156. package/dist/scroll-area.d.ts +3 -0
  157. package/dist/scroll-area.js +55 -0
  158. package/dist/scroll-area.js.map +1 -0
  159. package/dist/select.d.ts +8 -0
  160. package/dist/select.js +136 -0
  161. package/dist/select.js.map +1 -0
  162. package/dist/separator.d.ts +2 -0
  163. package/dist/separator.js +29 -0
  164. package/dist/separator.js.map +1 -0
  165. package/dist/sheet.d.ts +10 -0
  166. package/dist/sheet.js +140 -0
  167. package/dist/sheet.js.map +1 -0
  168. package/dist/sidebar.d.ts +8 -0
  169. package/dist/sidebar.js +201 -0
  170. package/dist/sidebar.js.map +1 -0
  171. package/dist/skeleton.d.ts +1 -0
  172. package/dist/skeleton.js +21 -0
  173. package/dist/skeleton.js.map +1 -0
  174. package/dist/slider.d.ts +2 -0
  175. package/dist/slider.js +55 -0
  176. package/dist/slider.js.map +1 -0
  177. package/dist/sonner.d.ts +2 -0
  178. package/dist/sonner.js +27 -0
  179. package/dist/sonner.js.map +1 -0
  180. package/dist/spacer.d.ts +3 -0
  181. package/dist/spacer.js +43 -0
  182. package/dist/spacer.js.map +1 -0
  183. package/dist/stack.d.ts +3 -0
  184. package/dist/stack.js +49 -0
  185. package/dist/stack.js.map +1 -0
  186. package/dist/stepper.d.ts +4 -0
  187. package/dist/stepper.js +226 -0
  188. package/dist/stepper.js.map +1 -0
  189. package/dist/suggestion.d.ts +2 -0
  190. package/dist/suggestion.js +55 -0
  191. package/dist/suggestion.js.map +1 -0
  192. package/dist/switch.d.ts +2 -0
  193. package/dist/switch.js +47 -0
  194. package/dist/switch.js.map +1 -0
  195. package/dist/table.d.ts +8 -0
  196. package/dist/table.js +85 -0
  197. package/dist/table.js.map +1 -0
  198. package/dist/tabs.d.ts +4 -0
  199. package/dist/tabs.js +57 -0
  200. package/dist/tabs.js.map +1 -0
  201. package/dist/textarea.d.ts +2 -0
  202. package/dist/textarea.js +36 -0
  203. package/dist/textarea.js.map +1 -0
  204. package/dist/time-picker.d.ts +2 -0
  205. package/dist/time-picker.js +50 -0
  206. package/dist/time-picker.js.map +1 -0
  207. package/dist/timeline.d.ts +4 -0
  208. package/dist/timeline.js +84 -0
  209. package/dist/timeline.js.map +1 -0
  210. package/dist/toggle-group.d.ts +2 -0
  211. package/dist/toggle-group.js +83 -0
  212. package/dist/toggle-group.js.map +1 -0
  213. package/dist/toggle.d.ts +2 -0
  214. package/dist/toggle.js +49 -0
  215. package/dist/toggle.js.map +1 -0
  216. package/dist/tool-call.d.ts +2 -0
  217. package/dist/tool-call.js +133 -0
  218. package/dist/tool-call.js.map +1 -0
  219. package/dist/tooltip.d.ts +4 -0
  220. package/dist/tooltip.js +33 -0
  221. package/dist/tooltip.js.map +1 -0
  222. package/package.json +71 -16
@@ -0,0 +1,5 @@
1
+ export { InputOTP_alias_1 as InputOTP } from './_tsup-dts-rollup.js';
2
+ export { InputOTPGroup_alias_1 as InputOTPGroup } from './_tsup-dts-rollup.js';
3
+ export { InputOTPSlot_alias_1 as InputOTPSlot } from './_tsup-dts-rollup.js';
4
+ export { InputOTPSeparator_alias_1 as InputOTPSeparator } from './_tsup-dts-rollup.js';
5
+ export { InputOTPProps_alias_1 as InputOTPProps } from './_tsup-dts-rollup.js';
@@ -0,0 +1,71 @@
1
+ "use client";
2
+ import { OTPInput, OTPInputContext } from 'input-otp';
3
+ import * as React from 'react';
4
+ import { clsx } from 'clsx';
5
+ import { twMerge } from 'tailwind-merge';
6
+ import { jsx, jsxs } from 'react/jsx-runtime';
7
+
8
+ function cn(...inputs) {
9
+ return twMerge(clsx(inputs));
10
+ }
11
+ var InputOTP = React.forwardRef(
12
+ ({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx(
13
+ OTPInput,
14
+ {
15
+ ref,
16
+ containerClassName: cn(
17
+ "flex items-center gap-[var(--gap-sm,0.5rem)] has-[:disabled]:opacity-50",
18
+ containerClassName
19
+ ),
20
+ className: cn("disabled:cursor-not-allowed", className),
21
+ ...props
22
+ }
23
+ )
24
+ );
25
+ InputOTP.displayName = "InputOTP";
26
+ var InputOTPGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex items-center", className), ...props }));
27
+ InputOTPGroup.displayName = "InputOTPGroup";
28
+ var InputOTPSlot = React.forwardRef(
29
+ ({ index, className, ...props }, ref) => {
30
+ const inputOTPContext = React.useContext(OTPInputContext);
31
+ const slot = inputOTPContext.slots[index];
32
+ const char = slot?.char ?? null;
33
+ const hasFakeCaret = slot?.hasFakeCaret ?? false;
34
+ const isActive = slot?.isActive ?? false;
35
+ return /* @__PURE__ */ jsxs(
36
+ "div",
37
+ {
38
+ ref,
39
+ className: cn(
40
+ "relative flex h-[var(--control-height-md,2.5rem)] w-[var(--control-height-md,2.5rem)] items-center justify-center border-y border-r border-input text-sm transition-all duration-[var(--duration-normal,200ms)] ease-out",
41
+ "inset-ring-1 inset-ring-foreground/[0.06]",
42
+ "first:rounded-l-md first:border-l last:rounded-r-md",
43
+ isActive && "z-10 ring-2 ring-ring ring-offset-2 ring-offset-background",
44
+ className
45
+ ),
46
+ ...props,
47
+ children: [
48
+ char,
49
+ hasFakeCaret && /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "h-4 w-px animate-pulse bg-foreground duration-1000" }) })
50
+ ]
51
+ }
52
+ );
53
+ }
54
+ );
55
+ InputOTPSlot.displayName = "InputOTPSlot";
56
+ var InputOTPSeparator = React.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, role: "separator", ...props, children: /* @__PURE__ */ jsx(
57
+ "svg",
58
+ {
59
+ xmlns: "http://www.w3.org/2000/svg",
60
+ viewBox: "0 0 24 24",
61
+ fill: "currentColor",
62
+ className: "h-2 w-2 text-muted-foreground",
63
+ "aria-hidden": "true",
64
+ children: /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "6" })
65
+ }
66
+ ) }));
67
+ InputOTPSeparator.displayName = "InputOTPSeparator";
68
+
69
+ export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
70
+ //# sourceMappingURL=input-otp.js.map
71
+ //# sourceMappingURL=input-otp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/utils.ts","../src/components/input-otp/input-otp.tsx"],"names":[],"mappings":";;;;;;AAQO,SAAS,MAAM,MAAA,EAAsB;AAC3C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC5B;ACAA,IAAM,QAAA,GAAiB,KAAA,CAAA,UAAA;AAAA,EACtB,CAAC,EAAE,SAAA,EAAW,oBAAoB,GAAG,KAAA,IAAS,GAAA,qBAC9C,GAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACA,GAAA;AAAA,MACA,kBAAA,EAAoB,EAAA;AAAA,QACnB,yEAAA;AAAA,QACA;AAAA,OACD;AAAA,MACA,SAAA,EAAW,EAAA,CAAG,6BAAA,EAA+B,SAAS,CAAA;AAAA,MACrD,GAAG;AAAA;AAAA;AAEL;AACD,QAAA,CAAS,WAAA,GAAc,UAAA;AAGvB,IAAM,gBAAsB,KAAA,CAAA,UAAA,CAG1B,CAAC,EAAE,SAAA,EAAW,GAAG,OAAM,EAAG,GAAA,yBAC1B,KAAA,EAAA,EAAI,GAAA,EAAU,WAAW,EAAA,CAAG,mBAAA,EAAqB,SAAS,CAAA,EAAI,GAAG,OAAO,CACzE;AACD,aAAA,CAAc,WAAA,G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AAA,IACL,SAAA,EAAU,+BAAA;AAAA,IACV,aAAA,EAAY,MAAA;AAAA,IAEZ,8BAAC,QAAA,EAAA,EAAO,EAAA,EAAG,MAAK,EAAA,EAAG,IAAA,EAAK,GAAE,GAAA,EAAI;AAAA;AAC/B,CAAA,EACD,CACA;AACD,iBAAA,CAAkB,WAAA,GAAc,mBAAA","file":"input-otp.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind CSS conflict resolution.\n * @param inputs - Class values (strings, arrays, objects) to merge\n * @returns A single merged class string with Tailwind conflicts resolved\n */\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","\"use client\";\n\nimport { OTPInput, OTPInputContext } from \"input-otp\";\nimport * as React from \"react\";\nimport { cn } from \"../../lib/utils.js\";\n\n/** Props for the root InputOTP component (mirrors input-otp's OTPInput). */\ntype InputOTPProps = React.ComponentPropsWithoutRef<typeof OTPInput>;\n\n/** Root OTP input. Wraps input-otp's OTPInput and exposes slot context to children. */\nconst InputOTP = React.forwardRef<React.ComponentRef<typeof OTPInput>, InputOTPProps>(\n\t({ className, containerClassName, ...props }, ref) => (\n\t<OTPInput\n\t\tref={ref}\n\t\tcontainerClassName={cn(\n\t\t\t\"flex items-center gap-[var(--gap-sm,0.5rem)] has-[:disabled]:opacity-50\",\n\t\t\tcontainerClassName,\n\t\t)}\n\t\tclassName={cn(\"disabled:cursor-not-allowed\", className)}\n\t\t{...props}\n\t/>\n));\nInputOTP.displayName = \"InputOTP\";\n\n/** Groups slots together; place between runs of slots to add visual dividers. */\nconst InputOTPGroup = React.forwardRef<\n\tReact.ComponentRef<\"div\">,\n\tReact.ComponentPropsWithoutRef<\"div\">\n>(({ className, ...props }, ref) => (\n\t<div ref={ref} className={cn(\"flex items-center\", className)} {...props} />\n));\nInputOTPGroup.displayName = \"InputOTPGroup\";\n\ninterface InputOTPSlotProps extends React.ComponentPropsWithoutRef<\"div\"> {\n\t/** Index of the slot in the underlying OTP value. */\n\tindex: number;\n}\n\n/** A single character slot. Reads its state from OTPInputContext. */\nconst InputOTPSlot = React.forwardRef<HTMLDivElement, InputOTPSlotProps>(\n\t({ index, className, ...props }, ref) => {\n\t\tconst inputOTPContext = React.useContext(OTPInputContext);\n\t\tconst slot = inputOTPContext.slots[index];\n\t\tconst char = slot?.char ?? null;\n\t\tconst hasFakeCaret = slot?.hasFakeCaret ?? false;\n\t\tconst isActive = slot?.isActive ?? false;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"relative flex h-[var(--control-height-md,2.5rem)] w-[var(--control-height-md,2.5rem)] items-center justify-center border-y border-r border-input text-sm transition-all duration-[var(--duration-normal,200ms)] ease-out\",\n\t\t\t\t\t\"inset-ring-1 inset-ring-foreground/[0.06]\",\n\t\t\t\t\t\"first:rounded-l-md first:border-l last:rounded-r-md\",\n\t\t\t\t\tisActive && \"z-10 ring-2 ring-ring ring-offset-2 ring-offset-background\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{char}\n\t\t\t\t{hasFakeCaret && (\n\t\t\t\t\t<div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n\t\t\t\t\t\t<div className=\"h-4 w-px animate-pulse bg-foreground duration-1000\" />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t},\n);\nInputOTPSlot.displayName = \"InputOTPSlot\";\n\n/** Visual separator between slot groups (a bullet by default). */\nconst InputOTPSeparator = React.forwardRef<\n\tReact.ComponentRef<\"div\">,\n\tReact.ComponentPropsWithoutRef<\"div\">\n>(({ ...props }, ref) => (\n\t<div ref={ref} role=\"separator\" {...props}>\n\t\t<svg\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\tviewBox=\"0 0 24 24\"\n\t\t\tfill=\"currentColor\"\n\t\t\tclassName=\"h-2 w-2 text-muted-foreground\"\n\t\t\taria-hidden=\"true\"\n\t\t>\n\t\t\t<circle cx=\"12\" cy=\"12\" r=\"6\" />\n\t\t</svg>\n\t</div>\n));\nInputOTPSeparator.displayName = \"InputOTPSeparator\";\n\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };\nexport type { InputOTPProps };\n"]}
@@ -0,0 +1,2 @@
1
+ export { InputProps_alias_1 as InputProps } from './_tsup-dts-rollup.js';
2
+ export { Input_alias_1 as Input } from './_tsup-dts-rollup.js';
package/dist/input.js ADDED
@@ -0,0 +1,40 @@
1
+ import * as React from 'react';
2
+ import { clsx } from 'clsx';
3
+ import { twMerge } from 'tailwind-merge';
4
+ import { jsx } from 'react/jsx-runtime';
5
+
6
+ // src/primitives/input/input.tsx
7
+ function cn(...inputs) {
8
+ return twMerge(clsx(inputs));
9
+ }
10
+ var Input = React.forwardRef(
11
+ ({ className, type, ...props }, ref) => {
12
+ return /* @__PURE__ */ jsx(
13
+ "input",
14
+ {
15
+ type,
16
+ className: cn(
17
+ "flex h-[var(--control-height-md,2.5rem)] w-full rounded-md border border-input bg-background px-[var(--space-3,0.75rem)] py-[var(--space-2,0.5rem)] text-sm",
18
+ "transition-all duration-[var(--duration-normal,200ms)] ease-out",
19
+ // inset-ring gives a self-borne edge so the input field is visible on flat
20
+ // surfaces (token border alone is too low-contrast on bg-background=white).
21
+ "shadow-sm inset-ring-1 inset-ring-foreground/[0.06]",
22
+ "file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground",
23
+ "placeholder:text-muted-foreground",
24
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
25
+ "focus-visible:shadow-md focus-visible:border-ring/50",
26
+ "hover:border-ring/30 hover:shadow-md",
27
+ "disabled:cursor-not-allowed disabled:opacity-50",
28
+ className
29
+ ),
30
+ ref,
31
+ ...props
32
+ }
33
+ );
34
+ }
35
+ );
36
+ Input.displayName = "Input";
37
+
38
+ export { Input };
39
+ //# sourceMappingURL=input.js.map
40
+ //# sourceMappingURL=input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/utils.ts","../src/primitives/input/input.tsx"],"names":[],"mappings":";;;;;;AAQO,SAAS,MAAM,MAAA,EAAsB;AAC3C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC5B;ACLA,IAAM,KAAA,GAAc,KAAA,CAAA,UAAA;AAAA,EACnB,CAAC,EAAE,SAAA,EAAW,MAAM,GAAG,KAAA,IAAS,GAAA,KAAQ;AACvC,IAAA,uBACC,GAAA;AAAA,MAAC,OAAA;AAAA,MAAA;AAAA,QACA,IAAA;AAAA,QACA,SAAA,EAAW,EAAA;AAAA,UACV,6JAAA;AAAA,UACA,iEAAA;AAAA;AAAA;AAAA,UAGA,qDAAA;AAAA,UACA,sFAAA;AAAA,UACA,mCAAA;AAAA,UACA,qGAAA;AAAA,UACA,sDAAA;AAAA,UACA,sCAAA;AAAA,UACA,iDAAA;AAAA,UACA;AAAA,SACD;AAAA,QACA,GAAA;AAAA,QACC,GAAG;AAAA;AAAA,KACL;AAAA,EAEF;AACD;AACA,KAAA,CAAM,WAAA,GAAc,OAAA","file":"input.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind CSS conflict resolution.\n * @param inputs - Class values (strings, arrays, objects) to merge\n * @returns A single merged class string with Tailwind conflicts resolved\n */\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","import * as React from \"react\";\nimport { cn } from \"../../lib/utils.js\";\n\nexport type InputProps = React.InputHTMLAttributes<HTMLInputElement>;\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n\t({ className, type, ...props }, ref) => {\n\t\treturn (\n\t\t\t<input\n\t\t\t\ttype={type}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"flex h-[var(--control-height-md,2.5rem)] w-full rounded-md border border-input bg-background px-[var(--space-3,0.75rem)] py-[var(--space-2,0.5rem)] text-sm\",\n\t\t\t\t\t\"transition-all duration-[var(--duration-normal,200ms)] ease-out\",\n\t\t\t\t\t// inset-ring gives a self-borne edge so the input field is visible on flat\n\t\t\t\t\t// surfaces (token border alone is too low-contrast on bg-background=white).\n\t\t\t\t\t\"shadow-sm inset-ring-1 inset-ring-foreground/[0.06]\",\n\t\t\t\t\t\"file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground\",\n\t\t\t\t\t\"placeholder:text-muted-foreground\",\n\t\t\t\t\t\"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n\t\t\t\t\t\"focus-visible:shadow-md focus-visible:border-ring/50\",\n\t\t\t\t\t\"hover:border-ring/30 hover:shadow-md\",\n\t\t\t\t\t\"disabled:cursor-not-allowed disabled:opacity-50\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nInput.displayName = \"Input\";\n\nexport { Input };\n"]}
@@ -0,0 +1,2 @@
1
+ export { LabelProps_alias_1 as LabelProps } from './_tsup-dts-rollup.js';
2
+ export { Label_alias_1 as Label } from './_tsup-dts-rollup.js';
package/dist/label.js ADDED
@@ -0,0 +1,22 @@
1
+ "use client";
2
+ import * as LabelPrimitive from '@radix-ui/react-label';
3
+ import { cva } from 'class-variance-authority';
4
+ import * as React from 'react';
5
+ import { clsx } from 'clsx';
6
+ import { twMerge } from 'tailwind-merge';
7
+ import { jsx } from 'react/jsx-runtime';
8
+
9
+ function cn(...inputs) {
10
+ return twMerge(clsx(inputs));
11
+ }
12
+ var labelVariants = cva(
13
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
14
+ );
15
+ var Label = React.forwardRef(
16
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx(LabelPrimitive.Root, { ref, className: cn(labelVariants(), className), ...props })
17
+ );
18
+ Label.displayName = "Label";
19
+
20
+ export { Label };
21
+ //# sourceMappingURL=label.js.map
22
+ //# sourceMappingURL=label.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/utils.ts","../src/primitives/label/label.tsx"],"names":[],"mappings":";;;;;;;AAQO,SAAS,MAAM,MAAA,EAAsB;AAC3C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC5B;ACHA,IAAM,aAAA,GAAgB,GAAA;AAAA,EACrB;AACD,CAAA;AAMA,IAAM,KAAA,GAAc,KAAA,CAAA,UAAA;AAAA,EACnB,CAAC,EAAE,SAAA,EAAW,GAAG,KAAA,EAAM,EAAG,wBACzB,GAAA,CAAgB,cAAA,CAAA,IAAA,EAAf,EAAoB,GAAA,EAAU,WAAW,EAAA,CAAG,aAAA,IAAiB,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO;AAEvF;AACA,KAAA,CAAM,WAAA,GAAc,OAAA","file":"label.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind CSS conflict resolution.\n * @param inputs - Class values (strings, arrays, objects) to merge\n * @returns A single merged class string with Tailwind conflicts resolved\n */\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","\"use client\";\n\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport * as React from \"react\";\nimport { cn } from \"../../lib/utils.js\";\n\nconst labelVariants = cva(\n\t\"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\",\n);\n\nexport interface LabelProps\n\textends React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>,\n\t\tVariantProps<typeof labelVariants> {}\n\nconst Label = React.forwardRef<React.ComponentRef<typeof LabelPrimitive.Root>, LabelProps>(\n\t({ className, ...props }, ref) => (\n\t\t<LabelPrimitive.Root ref={ref} className={cn(labelVariants(), className)} {...props} />\n\t),\n);\nLabel.displayName = \"Label\";\n\nexport { Label };\n"]}
@@ -0,0 +1,3 @@
1
+ export { LoadingIndicatorProps_alias_1 as LoadingIndicatorProps } from './_tsup-dts-rollup.js';
2
+ export { LoadingIndicator_alias_1 as LoadingIndicator } from './_tsup-dts-rollup.js';
3
+ export { loadingIndicatorVariants_alias_1 as loadingIndicatorVariants } from './_tsup-dts-rollup.js';
@@ -0,0 +1,64 @@
1
+ import { cva } from 'class-variance-authority';
2
+ import { clsx } from 'clsx';
3
+ import { twMerge } from 'tailwind-merge';
4
+ import { jsxs, jsx } from 'react/jsx-runtime';
5
+
6
+ // src/ai/loading-indicator/loading-indicator.tsx
7
+ function cn(...inputs) {
8
+ return twMerge(clsx(inputs));
9
+ }
10
+ var loadingIndicatorVariants = cva("inline-flex items-center gap-2 text-muted-foreground", {
11
+ variants: {
12
+ size: {
13
+ sm: "text-xs",
14
+ md: "text-sm"
15
+ }
16
+ },
17
+ defaultVariants: { size: "md" }
18
+ });
19
+ function LoadingIndicator({
20
+ variant = "dots",
21
+ size,
22
+ label,
23
+ className,
24
+ ...props
25
+ }) {
26
+ const ariaLabel = label ?? "Loading";
27
+ return /* @__PURE__ */ jsxs(
28
+ "div",
29
+ {
30
+ role: "status",
31
+ "aria-live": "polite",
32
+ className: cn(loadingIndicatorVariants({ size }), className),
33
+ ...props,
34
+ children: [
35
+ variant === "dots" ? /* @__PURE__ */ jsx(Dots, {}) : null,
36
+ variant === "pulse" ? /* @__PURE__ */ jsx(Pulse, {}) : null,
37
+ variant === "bar" ? /* @__PURE__ */ jsx(Bar, {}) : null,
38
+ label ? /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: label }) : null,
39
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: ariaLabel })
40
+ ]
41
+ }
42
+ );
43
+ }
44
+ function Dots() {
45
+ return /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1", children: [
46
+ /* @__PURE__ */ jsx("span", { className: "h-1.5 w-1.5 animate-bounce rounded-full bg-current [animation-delay:-0.3s]" }),
47
+ /* @__PURE__ */ jsx("span", { className: "h-1.5 w-1.5 animate-bounce rounded-full bg-current [animation-delay:-0.15s]" }),
48
+ /* @__PURE__ */ jsx("span", { className: "h-1.5 w-1.5 animate-bounce rounded-full bg-current" })
49
+ ] });
50
+ }
51
+ function Pulse() {
52
+ return /* @__PURE__ */ jsx("span", { className: "h-2 w-2 animate-pulse rounded-full bg-current" });
53
+ }
54
+ function Bar() {
55
+ return /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1", children: [
56
+ /* @__PURE__ */ jsx("span", { className: "h-0.5 w-2 animate-pulse rounded-full bg-current [animation-delay:-0.4s]" }),
57
+ /* @__PURE__ */ jsx("span", { className: "h-0.5 w-3 animate-pulse rounded-full bg-current [animation-delay:-0.2s]" }),
58
+ /* @__PURE__ */ jsx("span", { className: "h-0.5 w-4 animate-pulse rounded-full bg-current" })
59
+ ] });
60
+ }
61
+
62
+ export { LoadingIndicator, loadingIndicatorVariants };
63
+ //# sourceMappingURL=loading-indicator.js.map
64
+ //# sourceMappingURL=loading-indicator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/utils.ts","../src/ai/loading-indicator/loading-indicator.tsx"],"names":[],"mappings":";;;;;;AAQO,SAAS,MAAM,MAAA,EAAsB;AAC3C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC5B;ACNA,IAAM,wBAAA,GAA2B,IAAI,sDAAA,EAAwD;AAAA,EAC5F,QAAA,EAAU;AAAA,IACT,IAAA,EAAM;AAAA,MACL,EAAA,EAAI,SAAA;AAAA,MACJ,EAAA,EAAI;AAAA;AACL,GACD;AAAA,EACA,eAAA,EAAiB,EAAE,IAAA,EAAM,IAAA;AAC1B,CAAC;AAwBD,SAAS,gBAAA,CAAiB;AAAA,EACzB,OAAA,G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A,GAAQ;AAChB,EAAA,uBAAO,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,+CAAA,EAAgD,CAAA;AACxE;AAEA,SAAS,GAAA,GAAM;AACd,EAAA,uBACC,IAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,gCAAA,EACf,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,WAAU,yEAAA,EAA0E,CAAA;AAAA,oBAC1F,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,yEAAA,EAA0E,CAAA;AAAA,oBAC1F,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,iDAAA,EAAkD;AAAA,GAAA,EACnE,CAAA;AAEF","file":"loading-indicator.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind CSS conflict resolution.\n * @param inputs - Class values (strings, arrays, objects) to merge\n * @returns A single merged class string with Tailwind conflicts resolved\n */\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","import { type VariantProps, cva } from \"class-variance-authority\";\nimport * as React from \"react\";\nimport { cn } from \"../../lib/utils.js\";\n\nconst loadingIndicatorVariants = cva(\"inline-flex items-center gap-2 text-muted-foreground\", {\n\tvariants: {\n\t\tsize: {\n\t\t\tsm: \"text-xs\",\n\t\t\tmd: \"text-sm\",\n\t\t},\n\t},\n\tdefaultVariants: { size: \"md\" },\n});\n\n/**\n * Streaming/typing feedback for an in-flight LLM turn. Three motion variants\n * — `dots` (bouncing trio), `pulse` (single throbbing circle), `bar`\n * (horizontal sweep). Pure CSS, no JS — RSC-safe.\n *\n * @example\n * {isLoading && <LoadingIndicator label=\"Thinking…\" />}\n */\nexport interface LoadingIndicatorProps\n\textends React.HTMLAttributes<HTMLDivElement>,\n\t\tVariantProps<typeof loadingIndicatorVariants> {\n\t/** Animation style. Default `dots`. */\n\tvariant?: \"dots\" | \"pulse\" | \"bar\";\n\t/** Optional adjacent label, e.g. \"Thinking…\" or \"Searching docs…\". */\n\tlabel?: string;\n}\n\n/**\n * Renders an animated loading indicator with optional label.\n * @param props - variant + label\n * @returns A status div with role=\"status\"\n */\nfunction LoadingIndicator({\n\tvariant = \"dots\",\n\tsize,\n\tlabel,\n\tclassName,\n\t...props\n}: LoadingIndicatorProps) {\n\tconst ariaLabel = label ?? \"Loading\";\n\treturn (\n\t\t<div\n\t\t\trole=\"status\"\n\t\t\taria-live=\"polite\"\n\t\t\tclassName={cn(loadingIndicatorVariants({ size }), className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{variant === \"dots\" ? <Dots /> : null}\n\t\t\t{variant === \"pulse\" ? <Pulse /> : null}\n\t\t\t{variant === \"bar\" ? <Bar /> : null}\n\t\t\t{label ? (\n\t\t\t\t<span aria-hidden=\"true\">{label}</span>\n\t\t\t) : null}\n\t\t\t<span className=\"sr-only\">{ariaLabel}</span>\n\t\t</div>\n\t);\n}\n\nfunction Dots() {\n\treturn (\n\t\t<span className=\"flex items-center gap-1\">\n\t\t\t<span className=\"h-1.5 w-1.5 animate-bounce rounded-full bg-current [animation-delay:-0.3s]\" />\n\t\t\t<span className=\"h-1.5 w-1.5 animate-bounce rounded-full bg-current [animation-delay:-0.15s]\" />\n\t\t\t<span className=\"h-1.5 w-1.5 animate-bounce rounded-full bg-current\" />\n\t\t</span>\n\t);\n}\n\nfunction Pulse() {\n\treturn <span className=\"h-2 w-2 animate-pulse rounded-full bg-current\" />;\n}\n\nfunction Bar() {\n\treturn (\n\t\t<span className=\"inline-flex items-center gap-1\">\n\t\t\t<span className=\"h-0.5 w-2 animate-pulse rounded-full bg-current [animation-delay:-0.4s]\" />\n\t\t\t<span className=\"h-0.5 w-3 animate-pulse rounded-full bg-current [animation-delay:-0.2s]\" />\n\t\t\t<span className=\"h-0.5 w-4 animate-pulse rounded-full bg-current\" />\n\t\t</span>\n\t);\n}\n\nexport { LoadingIndicator, loadingIndicatorVariants };\n"]}
@@ -0,0 +1,2 @@
1
+ export { MarkdownProps_alias_1 as MarkdownProps } from './_tsup-dts-rollup.js';
2
+ export { Markdown_alias_1 as Markdown } from './_tsup-dts-rollup.js';
@@ -0,0 +1,28 @@
1
+ "use client";
2
+ import { Streamdown } from 'streamdown';
3
+ import { clsx } from 'clsx';
4
+ import { twMerge } from 'tailwind-merge';
5
+ import { jsx } from 'react/jsx-runtime';
6
+
7
+ function cn(...inputs) {
8
+ return twMerge(clsx(inputs));
9
+ }
10
+ function Markdown({ children, className }) {
11
+ return /* @__PURE__ */ jsx(
12
+ Streamdown,
13
+ {
14
+ className: cn(
15
+ "prose prose-sm max-w-none text-foreground",
16
+ "prose-headings:text-foreground prose-strong:text-foreground",
17
+ "prose-a:text-primary prose-a:underline-offset-4 hover:prose-a:underline",
18
+ "prose-code:text-foreground prose-code:before:content-none prose-code:after:content-none",
19
+ className
20
+ ),
21
+ children
22
+ }
23
+ );
24
+ }
25
+
26
+ export { Markdown };
27
+ //# sourceMappingURL=markdown.js.map
28
+ //# sourceMappingURL=markdown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/utils.ts","../src/ai/markdown/markdown.tsx"],"names":[],"mappings":";;;;;AAQO,SAAS,MAAM,MAAA,EAAsB;AAC3C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC5B;AC8BA,SAAS,QAAA,CAAS,EAAE,QAAA,EAAU,SAAA,EAAU,EAAkB;AACzD,EAAA,uBACC,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACA,SAAA,EAAW,EAAA;AAAA,QACV,2CAAA;AAAA,QACA,6DAAA;AAAA,QACA,yEAAA;AAAA,QACA,yFAAA;AAAA,QACA;AAAA,OACD;AAAA,MAEC;AAAA;AAAA,GACF;AAEF","file":"markdown.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind CSS conflict resolution.\n * @param inputs - Class values (strings, arrays, objects) to merge\n * @returns A single merged class string with Tailwind conflicts resolved\n */\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","\"use client\";\n\nimport * as React from \"react\";\nimport { Streamdown } from \"streamdown\";\nimport { cn } from \"../../lib/utils.js\";\n\n/**\n * Streaming-safe markdown renderer. Wraps Vercel's `streamdown` so partial\n * input mid-stream — unclosed code fences, half-typed tags, dangling\n * brackets — renders gracefully instead of throwing or flashing raw text.\n *\n * Public prop surface is intentionally minimal (`children` + `className`)\n * so this primitive's DTS doesn't drag in `streamdown`'s full type graph.\n * Doing so would transitively pull Shiki's 600-literal `BundledLanguage`\n * union into the rollup-dts pass and exhaust heap. For per-element\n * overrides (custom `pre`, `code`, `a`, `img`, mermaid, math, line\n * numbers, plugins, etc.) drop down to `Streamdown` directly:\n *\n * ```tsx\n * import { Streamdown } from \"streamdown\";\n * import { CodeBlock } from \"@hex-core/components\";\n * <Streamdown components={{ pre: (p) => <CodeBlock {...p} /> }}>{md}</Streamdown>\n * ```\n *\n * @example\n * <Message role=\"assistant\">\n * <Markdown>{streamingText}</Markdown>\n * </Message>\n */\nexport interface MarkdownProps {\n\t/** Raw markdown. May be a partial chunk during streaming. */\n\tchildren: string;\n\tclassName?: string;\n}\n\n/**\n * Renders streaming-safe markdown.\n * @param props - children string + optional Streamdown overrides\n * @returns A Streamdown root scoped with prose styles\n */\nfunction Markdown({ children, className }: MarkdownProps) {\n\treturn (\n\t\t<Streamdown\n\t\t\tclassName={cn(\n\t\t\t\t\"prose prose-sm max-w-none text-foreground\",\n\t\t\t\t\"prose-headings:text-foreground prose-strong:text-foreground\",\n\t\t\t\t\"prose-a:text-primary prose-a:underline-offset-4 hover:prose-a:underline\",\n\t\t\t\t\"prose-code:text-foreground prose-code:before:content-none prose-code:after:content-none\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t{children}\n\t\t</Streamdown>\n\t);\n}\n\nexport { Markdown };\n"]}
@@ -0,0 +1,11 @@
1
+ export { Menubar_alias_1 as Menubar } from './_tsup-dts-rollup.js';
2
+ export { MenubarMenu_alias_1 as MenubarMenu } from './_tsup-dts-rollup.js';
3
+ export { MenubarTrigger_alias_1 as MenubarTrigger } from './_tsup-dts-rollup.js';
4
+ export { MenubarContent_alias_1 as MenubarContent } from './_tsup-dts-rollup.js';
5
+ export { MenubarItem_alias_1 as MenubarItem } from './_tsup-dts-rollup.js';
6
+ export { MenubarLabel_alias_1 as MenubarLabel } from './_tsup-dts-rollup.js';
7
+ export { MenubarSeparator_alias_1 as MenubarSeparator } from './_tsup-dts-rollup.js';
8
+ export { MenubarShortcut_alias_1 as MenubarShortcut } from './_tsup-dts-rollup.js';
9
+ export { MenubarGroup_alias_1 as MenubarGroup } from './_tsup-dts-rollup.js';
10
+ export { MenubarPortal_alias_1 as MenubarPortal } from './_tsup-dts-rollup.js';
11
+ export { MenubarRadioGroup_alias_1 as MenubarRadioGroup } from './_tsup-dts-rollup.js';
@@ -0,0 +1,106 @@
1
+ "use client";
2
+ import * as MenubarPrimitive from '@radix-ui/react-menubar';
3
+ import * as React from 'react';
4
+ import { clsx } from 'clsx';
5
+ import { twMerge } from 'tailwind-merge';
6
+ import { jsx } from 'react/jsx-runtime';
7
+
8
+ function cn(...inputs) {
9
+ return twMerge(clsx(inputs));
10
+ }
11
+ var Menubar = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
12
+ MenubarPrimitive.Root,
13
+ {
14
+ ref,
15
+ className: cn(
16
+ "flex h-[var(--control-height-md,2.5rem)] items-center space-x-1 rounded-md border border-foreground/[0.08] bg-background p-[var(--space-1,0.25rem)]",
17
+ className
18
+ ),
19
+ ...props
20
+ }
21
+ ));
22
+ Menubar.displayName = "Menubar";
23
+ var MenubarMenu = MenubarPrimitive.Menu;
24
+ var MenubarGroup = MenubarPrimitive.Group;
25
+ var MenubarPortal = MenubarPrimitive.Portal;
26
+ var MenubarRadioGroup = MenubarPrimitive.RadioGroup;
27
+ var MenubarTrigger = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
28
+ MenubarPrimitive.Trigger,
29
+ {
30
+ ref,
31
+ className: cn(
32
+ "flex cursor-default select-none items-center rounded-sm px-[var(--space-3,0.75rem)] py-1.5 text-sm font-medium outline-none",
33
+ "transition-all duration-[var(--duration-normal,200ms)] ease-out",
34
+ "focus:bg-accent focus:text-accent-foreground",
35
+ "data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
36
+ className
37
+ ),
38
+ ...props
39
+ }
40
+ ));
41
+ MenubarTrigger.displayName = "MenubarTrigger";
42
+ var MenubarContent = React.forwardRef(({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, ref) => /* @__PURE__ */ jsx(MenubarPrimitive.Portal, { children: /* @__PURE__ */ jsx(
43
+ MenubarPrimitive.Content,
44
+ {
45
+ ref,
46
+ align,
47
+ alignOffset,
48
+ sideOffset,
49
+ className: cn(
50
+ "z-50 min-w-[12rem] overflow-hidden rounded-md border border-foreground/[0.08] bg-popover p-[var(--space-1,0.25rem)] text-popover-foreground shadow-md",
51
+ "data-[state=open]:animate-in data-[state=closed]:animate-out",
52
+ "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
53
+ "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
54
+ className
55
+ ),
56
+ ...props
57
+ }
58
+ ) }));
59
+ MenubarContent.displayName = "MenubarContent";
60
+ var MenubarItem = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
61
+ MenubarPrimitive.Item,
62
+ {
63
+ ref,
64
+ className: cn(
65
+ "relative flex cursor-default select-none items-center gap-[var(--gap-sm,0.5rem)] rounded-sm px-[var(--space-2,0.5rem)] py-1.5 text-sm outline-none",
66
+ "transition-all duration-[var(--duration-normal,200ms)] ease-out",
67
+ "focus:bg-accent focus:text-accent-foreground",
68
+ "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
69
+ inset && "pl-[var(--space-8,2rem)]",
70
+ className
71
+ ),
72
+ ...props
73
+ }
74
+ ));
75
+ MenubarItem.displayName = "MenubarItem";
76
+ var MenubarLabel = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
77
+ MenubarPrimitive.Label,
78
+ {
79
+ ref,
80
+ className: cn("px-[var(--space-2,0.5rem)] py-1.5 text-sm font-semibold", inset && "pl-[var(--space-8,2rem)]", className),
81
+ ...props
82
+ }
83
+ ));
84
+ MenubarLabel.displayName = "MenubarLabel";
85
+ var MenubarSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
86
+ MenubarPrimitive.Separator,
87
+ {
88
+ ref,
89
+ className: cn("-mx-[var(--space-1,0.25rem)] my-[var(--space-1,0.25rem)] h-px bg-foreground/[0.12]", className),
90
+ ...props
91
+ }
92
+ ));
93
+ MenubarSeparator.displayName = "MenubarSeparator";
94
+ function MenubarShortcut({ className, ...props }) {
95
+ return /* @__PURE__ */ jsx(
96
+ "span",
97
+ {
98
+ className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className),
99
+ ...props
100
+ }
101
+ );
102
+ }
103
+
104
+ export { Menubar, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarSeparator, MenubarShortcut, MenubarTrigger };
105
+ //# sourceMappingURL=menubar.js.map
106
+ //# sourceMappingURL=menubar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/utils.ts","../src/components/menubar/menubar.tsx"],"names":[],"mappings":";;;;;;AAQO,SAAS,MAAM,MAAA,EAAsB;AAC3C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC5B;ACHA,IAAM,OAAA,GAAgB,iBAGpB,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,GAAA,qBAC3B,GAAA;AAAA,EAAkB,gBAAA,CAAA,IAAA;AAAA,EAAjB;AAAA,IACA,GA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ge\";\n\n/**\n * Merge class names with Tailwind CSS conflict resolution.\n * @param inputs - Class values (strings, arrays, objects) to merge\n * @returns A single merged class string with Tailwind conflicts resolved\n */\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","\"use client\";\n\nimport * as MenubarPrimitive from \"@radix-ui/react-menubar\";\nimport * as React from \"react\";\nimport { cn } from \"../../lib/utils.js\";\n\n/** Top-level menu bar (File / Edit / View style). */\nconst Menubar = React.forwardRef<\n\tReact.ComponentRef<typeof MenubarPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n\t<MenubarPrimitive.Root\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex h-[var(--control-height-md,2.5rem)] items-center space-x-1 rounded-md border border-foreground/[0.08] bg-background p-[var(--space-1,0.25rem)]\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nMenubar.displayName = \"Menubar\";\n\n// The explicit `as typeof ...Primitive.X` casts below are load-bearing: without them,\n// tsup's dts build fails with TS2742 \"The inferred type of X cannot be named without a\n// reference to @radix-ui/react-context\" on direct re-exports of Radix primitives. Do not\n// remove without verifying `pnpm --filter @hex-core/components build` still succeeds.\n\n/** A top-level menu in the bar (e.g. \"File\"). */\nconst MenubarMenu = MenubarPrimitive.Menu as typeof MenubarPrimitive.Menu;\n\n/** Groups related items inside a menu content. */\nconst MenubarGroup = MenubarPrimitive.Group as typeof MenubarPrimitive.Group;\n\n/** Portals menu content into the body. */\nconst MenubarPortal = MenubarPrimitive.Portal as typeof MenubarPrimitive.Portal;\n\n/** Group for checkable radio items. */\nconst MenubarRadioGroup = MenubarPrimitive.RadioGroup as typeof MenubarPrimitive.RadioGroup;\n\n/** The clickable menu label in the bar. */\nconst MenubarTrigger = React.forwardRef<\n\tReact.ComponentRef<typeof MenubarPrimitive.Trigger>,\n\tReact.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n\t<MenubarPrimitive.Trigger\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex cursor-default select-none items-center rounded-sm px-[var(--space-3,0.75rem)] py-1.5 text-sm font-medium outline-none\",\n\t\t\t\"transition-all duration-[var(--duration-normal,200ms)] ease-out\",\n\t\t\t\"focus:bg-accent focus:text-accent-foreground\",\n\t\t\t\"data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nMenubarTrigger.displayName = \"MenubarTrigger\";\n\n/** The menu panel shown when a trigger opens. */\nconst MenubarContent = React.forwardRef<\n\tReact.ComponentRef<typeof MenubarPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>\n>(({ className, align = \"start\", alignOffset = -4, sideOffset = 8, ...props }, ref) => (\n\t<MenubarPrimitive.Portal>\n\t\t<MenubarPrimitive.Content\n\t\t\tref={ref}\n\t\t\talign={align}\n\t\t\talignOffset={alignOffset}\n\t\t\tsideOffset={sideOffset}\n\t\t\tclassName={cn(\n\t\t\t\t\"z-50 min-w-[12rem] overflow-hidden rounded-md border border-foreground/[0.08] bg-popover p-[var(--space-1,0.25rem)] text-popover-foreground shadow-md\",\n\t\t\t\t\"data-[state=open]:animate-in data-[state=closed]:animate-out\",\n\t\t\t\t\"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n\t\t\t\t\"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t</MenubarPrimitive.Portal>\n));\nMenubarContent.displayName = \"MenubarContent\";\n\n/** A clickable menu item. */\nconst MenubarItem = React.forwardRef<\n\tReact.ComponentRef<typeof MenubarPrimitive.Item>,\n\tReact.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => (\n\t<MenubarPrimitive.Item\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex cursor-default select-none items-center gap-[var(--gap-sm,0.5rem)] rounded-sm px-[var(--space-2,0.5rem)] py-1.5 text-sm outline-none\",\n\t\t\t\"transition-all duration-[var(--duration-normal,200ms)] ease-out\",\n\t\t\t\"focus:bg-accent focus:text-accent-foreground\",\n\t\t\t\"data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n\t\t\tinset && \"pl-[var(--space-8,2rem)]\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nMenubarItem.displayName = \"MenubarItem\";\n\n/** A non-interactive heading label. */\nconst MenubarLabel = React.forwardRef<\n\tReact.ComponentRef<typeof MenubarPrimitive.Label>,\n\tReact.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => (\n\t<MenubarPrimitive.Label\n\t\tref={ref}\n\t\tclassName={cn(\"px-[var(--space-2,0.5rem)] py-1.5 text-sm font-semibold\", inset && \"pl-[var(--space-8,2rem)]\", className)}\n\t\t{...props}\n\t/>\n));\nMenubarLabel.displayName = \"MenubarLabel\";\n\n/** Horizontal divider. */\nconst MenubarSeparator = React.forwardRef<\n\tReact.ComponentRef<typeof MenubarPrimitive.Separator>,\n\tReact.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n\t<MenubarPrimitive.Separator\n\t\tref={ref}\n\t\tclassName={cn(\"-mx-[var(--space-1,0.25rem)] my-[var(--space-1,0.25rem)] h-px bg-foreground/[0.12]\", className)}\n\t\t{...props}\n\t/>\n));\nMenubarSeparator.displayName = \"MenubarSeparator\";\n\n/**\n * Right-aligned keyboard shortcut text.\n * @returns A span with muted typography\n */\nfunction MenubarShortcut({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) {\n\treturn (\n\t\t<span\n\t\t\tclassName={cn(\"ml-auto text-xs tracking-widest text-muted-foreground\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tMenubar,\n\tMenubarMenu,\n\tMenubarTrigger,\n\tMenubarContent,\n\tMenubarItem,\n\tMenubarLabel,\n\tMenubarSeparator,\n\tMenubarShortcut,\n\tMenubarGroup,\n\tMenubarPortal,\n\tMenubarRadioGroup,\n};\n"]}
@@ -0,0 +1,2 @@
1
+ export { MessageActionsProps_alias_1 as MessageActionsProps } from './_tsup-dts-rollup.js';
2
+ export { MessageActions_alias_1 as MessageActions } from './_tsup-dts-rollup.js';
@@ -0,0 +1,28 @@
1
+ "use client";
2
+ import { clsx } from 'clsx';
3
+ import { twMerge } from 'tailwind-merge';
4
+ import { jsx } from 'react/jsx-runtime';
5
+
6
+ // src/lib/utils.ts
7
+ function cn(...inputs) {
8
+ return twMerge(clsx(inputs));
9
+ }
10
+ function MessageActions({ className, children, ...props }) {
11
+ return /* @__PURE__ */ jsx(
12
+ "div",
13
+ {
14
+ className: cn(
15
+ "mt-2 flex items-center gap-1 opacity-60",
16
+ "transition-opacity duration-[var(--duration-normal,200ms)] ease-out",
17
+ "group-hover/message:opacity-100 hover:opacity-100 focus-within:opacity-100",
18
+ className
19
+ ),
20
+ ...props,
21
+ children
22
+ }
23
+ );
24
+ }
25
+
26
+ export { MessageActions };
27
+ //# sourceMappingURL=message-actions.js.map
28
+ //# sourceMappingURL=message-actions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/utils.ts","../src/ai/message-actions/message-actions.tsx"],"names":[],"mappings":";;;;;AAQO,SAAS,MAAM,MAAA,EAAsB;AAC3C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC5B;ACmBA,SAAS,eAAe,EAAE,SAAA,EAAW,QAAA,EAAU,GAAG,OAAM,EAAwB;AAC/E,EAAA,uBACC,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACA,SAAA,EAAW,EAAA;AAAA,QACV,yCAAA;AAAA,QACA,qEAAA;AAAA,QACA,4EAAA;AAAA,QACA;AAAA,OACD;AAAA,MACC,GAAG,KAAA;AAAA,MAEH;AAAA;AAAA,GACF;AAEF","file":"message-actions.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind CSS conflict resolution.\n * @param inputs - Class values (strings, arrays, objects) to merge\n * @returns A single merged class string with Tailwind conflicts resolved\n */\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","import * as React from \"react\";\nimport { cn } from \"../../lib/utils.js\";\n\n/**\n * Inline action row beneath a message — typically holds copy / regenerate /\n * thumbs-up / thumbs-down buttons. Pure container: it sets the layout and\n * leaves the buttons (and their handlers) to the consumer.\n *\n * Renders below the message body with subtle hover-reveal styling — the\n * row is dimmed by default and brightens when the parent hovers.\n *\n * @example\n * <Message role=\"assistant\">\n * <Markdown>{text}</Markdown>\n * <MessageActions>\n * <Button variant=\"ghost\" size=\"icon\" onClick={() => copy(text)}><CopyIcon /></Button>\n * <Button variant=\"ghost\" size=\"icon\" onClick={onRegenerate}><RetryIcon /></Button>\n * </MessageActions>\n * </Message>\n */\nexport interface MessageActionsProps extends React.HTMLAttributes<HTMLDivElement> {\n\tchildren: React.ReactNode;\n}\n\n/**\n * Renders the action-button row.\n * @param props - children buttons\n * @returns A flex container styled for in-message actions\n */\nfunction MessageActions({ className, children, ...props }: MessageActionsProps) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t\"mt-2 flex items-center gap-1 opacity-60\",\n\t\t\t\t\"transition-opacity duration-[var(--duration-normal,200ms)] ease-out\",\n\t\t\t\t\"group-hover/message:opacity-100 hover:opacity-100 focus-within:opacity-100\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t);\n}\n\nexport { MessageActions };\n"]}
@@ -0,0 +1,2 @@
1
+ export { MessageListProps_alias_1 as MessageListProps } from './_tsup-dts-rollup.js';
2
+ export { MessageList_alias_1 as MessageList } from './_tsup-dts-rollup.js';
@@ -0,0 +1,49 @@
1
+ "use client";
2
+ import * as React from 'react';
3
+ import { clsx } from 'clsx';
4
+ import { twMerge } from 'tailwind-merge';
5
+ import { jsx } from 'react/jsx-runtime';
6
+
7
+ function cn(...inputs) {
8
+ return twMerge(clsx(inputs));
9
+ }
10
+ var NEAR_BOTTOM_THRESHOLD_PX = 80;
11
+ function MessageList({
12
+ autoScroll = true,
13
+ className,
14
+ children,
15
+ ...props
16
+ }) {
17
+ const ref = React.useRef(null);
18
+ const stickToBottomRef = React.useRef(true);
19
+ React.useEffect(() => {
20
+ const el = ref.current;
21
+ if (!el || !autoScroll) return;
22
+ if (stickToBottomRef.current) {
23
+ el.scrollTop = el.scrollHeight;
24
+ }
25
+ }, [autoScroll, children]);
26
+ function handleScroll(event) {
27
+ const el = event.currentTarget;
28
+ const distance = el.scrollHeight - el.scrollTop - el.clientHeight;
29
+ stickToBottomRef.current = distance < NEAR_BOTTOM_THRESHOLD_PX;
30
+ props.onScroll?.(event);
31
+ }
32
+ return /* @__PURE__ */ jsx(
33
+ "div",
34
+ {
35
+ ref,
36
+ role: "log",
37
+ "aria-live": "polite",
38
+ "aria-relevant": "additions",
39
+ className: cn("flex flex-col overflow-y-auto", className),
40
+ ...props,
41
+ onScroll: handleScroll,
42
+ children
43
+ }
44
+ );
45
+ }
46
+
47
+ export { MessageList };
48
+ //# sourceMappingURL=message-list.js.map
49
+ //# sourceMappingURL=message-list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/utils.ts","../src/ai/message-list/message-list.tsx"],"names":[],"mappings":";;;;;AAQO,SAAS,MAAM,MAAA,EAAsB;AAC3C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC5B;ACaA,IAAM,wBAAA,GAA2B,EAAA;AAOjC,SAAS,WAAA,CAAY;AAAA,EACpB,UAAA,GAAa,IAAA;AAAA,EACb,SAAA;AAAA,EACA,QAAA;AAAA,EACA,GAAG;AACJ,CAAA,EAAqB;AACpB,EAAA,MAAM,GAAA,GAAY,aAAuB,IAAI,CAAA;AAC7C,EAAA,MAAM,gBAAA,GAAyB,aAAO,IAAI,CAAA;AAE1C,EAAM,gBAAU,MAAM;AACrB,IAAA,MAAM,KAAK,GAAA,CAAI,OAAA;AACf,IAAA,IAAI,CAAC,EAAA,IAAM,CAAC,UAAA,EAAY;AACxB,IAAA,IAAI,iBAAiB,OAAA,EAAS;AAC7B,MAAA,EAAA,CAAG,YAAY,EAAA,CAAG,YAAA;AAAA,IACnB;AAAA,EACD,CAAA,EAAG,CAAC,UAAA,EAAY,QAAQ,CAAC,CAAA;AAEzB,EAAA,SAAS,aAAa,KAAA,EAAsC;AAC3D,IAAA,MAAM,KAAK,KAAA,CAAM,aAAA;AACjB,IAAA,MAAM,QAAA,GAAW,EAAA,CAAG,YAAA,GAAe,EAAA,CAAG,YAAY,EAAA,CAAG,YAAA;AACrD,IAAA,gBAAA,CAAiB,UAAU,QAAA,GAAW,wBAAA;AACtC,IAAA,KAAA,CAAM,WAAW,KAAK,CAAA;AAAA,EACvB;AAEA,EAAA,uBACC,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACA,GAAA;AAAA,MACA,IAAA,EAAK,KAAA;AAAA,MACL,WAAA,EAAU,QAAA;AAAA,MACV,eAAA,EAAc,WAAA;AAAA,MACd,SAAA,EAAW,EAAA,CAAG,+BAAA,EAAiC,SAAS,CAAA;AAAA,MACvD,GAAG,KAAA;AAAA,MACJ,QAAA,EAAU,YAAA;AAAA,MAET;AAAA;AAAA,GACF;AAEF","file":"message-list.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind CSS conflict resolution.\n * @param inputs - Class values (strings, arrays, objects) to merge\n * @returns A single merged class string with Tailwind conflicts resolved\n */\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","\"use client\";\n\nimport * as React from \"react\";\nimport { cn } from \"../../lib/utils.js\";\n\n/**\n * Auto-scrolling viewport for a stream of chat messages. When `autoScroll`\n * is true (default), the container pins to the bottom whenever its content\n * changes — including during streaming token updates. Detects whether the\n * user has scrolled away from the bottom and pauses auto-scroll until they\n * scroll back, so reading earlier turns doesn't fight the stream.\n *\n * @example\n * <MessageList>\n * {messages.map((m) => <Message key={m.id} role={m.role}>{m.content}</Message>)}\n * </MessageList>\n */\nexport interface MessageListProps extends React.HTMLAttributes<HTMLDivElement> {\n\t/** Auto-scroll to bottom on content change (when user is already near the bottom). Default: true. */\n\tautoScroll?: boolean;\n\tchildren: React.ReactNode;\n}\n\nconst NEAR_BOTTOM_THRESHOLD_PX = 80;\n\n/**\n * Renders the scrolling message viewport.\n * @param props - children + autoScroll toggle\n * @returns A scrollable div that auto-pins to bottom when streaming\n */\nfunction MessageList({\n\tautoScroll = true,\n\tclassName,\n\tchildren,\n\t...props\n}: MessageListProps) {\n\tconst ref = React.useRef<HTMLDivElement>(null);\n\tconst stickToBottomRef = React.useRef(true);\n\n\tReact.useEffect(() => {\n\t\tconst el = ref.current;\n\t\tif (!el || !autoScroll) return;\n\t\tif (stickToBottomRef.current) {\n\t\t\tel.scrollTop = el.scrollHeight;\n\t\t}\n\t}, [autoScroll, children]);\n\n\tfunction handleScroll(event: React.UIEvent<HTMLDivElement>) {\n\t\tconst el = event.currentTarget;\n\t\tconst distance = el.scrollHeight - el.scrollTop - el.clientHeight;\n\t\tstickToBottomRef.current = distance < NEAR_BOTTOM_THRESHOLD_PX;\n\t\tprops.onScroll?.(event);\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tref={ref}\n\t\t\trole=\"log\"\n\t\t\taria-live=\"polite\"\n\t\t\taria-relevant=\"additions\"\n\t\t\tclassName={cn(\"flex flex-col overflow-y-auto\", className)}\n\t\t\t{...props}\n\t\t\tonScroll={handleScroll}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t);\n}\n\nexport { MessageList };\n"]}
@@ -0,0 +1,3 @@
1
+ export { MessageProps_alias_1 as MessageProps } from './_tsup-dts-rollup.js';
2
+ export { Message_alias_1 as Message } from './_tsup-dts-rollup.js';
3
+ export { messageVariants_alias_1 as messageVariants } from './_tsup-dts-rollup.js';
@@ -0,0 +1,35 @@
1
+ import { cva } from 'class-variance-authority';
2
+ import { clsx } from 'clsx';
3
+ import { twMerge } from 'tailwind-merge';
4
+ import { jsx } from 'react/jsx-runtime';
5
+
6
+ // src/ai/message/message.tsx
7
+ function cn(...inputs) {
8
+ return twMerge(clsx(inputs));
9
+ }
10
+ var messageVariants = cva(
11
+ [
12
+ "flex w-full gap-3 px-4 py-3 text-sm",
13
+ "transition-colors duration-[var(--duration-normal,200ms)] ease-out"
14
+ ].join(" "),
15
+ {
16
+ variants: {
17
+ role: {
18
+ user: "bg-secondary/40 text-foreground",
19
+ assistant: "bg-card text-card-foreground",
20
+ system: "bg-muted text-muted-foreground italic",
21
+ tool: "bg-accent/15 text-accent-foreground border-l-2 border-accent"
22
+ }
23
+ },
24
+ defaultVariants: {
25
+ role: "assistant"
26
+ }
27
+ }
28
+ );
29
+ function Message({ role, className, children, ...props }) {
30
+ return /* @__PURE__ */ jsx("div", { "data-role": role, className: cn(messageVariants({ role }), className), ...props, children });
31
+ }
32
+
33
+ export { Message, messageVariants };
34
+ //# sourceMappingURL=message.js.map
35
+ //# sourceMappingURL=message.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/utils.ts","../src/ai/message/message.tsx"],"names":[],"mappings":";;;;;;AAQO,SAAS,MAAM,MAAA,EAAsB;AAC3C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC5B;ACLA,IAAM,eAAA,GAAkB,GAAA;AAAA,EACvB;AAAA,IACC,qCAAA;AAAA,IACA;AAAA,GACD,CAAE,KAAK,GAAG,CAAA;AAAA,EACV;AAAA,IACC,QAAA,EAAU;AAAA,MACT,IAAA,EAAM;AAAA,QACL,IAAA,EAAM,iCAAA;AAAA,QACN,SAAA,EAAW,8BAAA;AAAA,QACX,MAAA,EAAQ,uCAAA;AAAA,QACR,IAAA,EAAM;AAAA;AACP,KACD;AAAA,IACA,eAAA,EAAiB;AAAA,MAChB,IAAA,EAAM;AAAA;AACP;AAEF;AA8BA,SAAS,QAAQ,EAAE,IAAA,EAAM,WAAW,QAAA,EAAU,GAAG,OAAM,EAAiB;AACvE,EAAA,uBACC,GAAA,CAAC,KAAA,EAAA,EAAI,WAAA,EAAW,IAAA,EAAM,WAAW,EAAA,CAAG,eAAA,CAAgB,EAAE,IAAA,EAAM,CAAA,EAAG,SAAS,CAAA,EAAI,GAAG,OAC7E,QAAA,EACF,CAAA;AAEF","file":"message.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind CSS conflict resolution.\n * @param inputs - Class values (strings, arrays, objects) to merge\n * @returns A single merged class string with Tailwind conflicts resolved\n */\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","import { type VariantProps, cva } from \"class-variance-authority\";\nimport * as React from \"react\";\nimport { cn } from \"../../lib/utils.js\";\nimport type { Role } from \"../types.js\";\n\nconst messageVariants = cva(\n\t[\n\t\t\"flex w-full gap-3 px-4 py-3 text-sm\",\n\t\t\"transition-colors duration-[var(--duration-normal,200ms)] ease-out\",\n\t].join(\" \"),\n\t{\n\t\tvariants: {\n\t\t\trole: {\n\t\t\t\tuser: \"bg-secondary/40 text-foreground\",\n\t\t\t\tassistant: \"bg-card text-card-foreground\",\n\t\t\t\tsystem: \"bg-muted text-muted-foreground italic\",\n\t\t\t\ttool: \"bg-accent/15 text-accent-foreground border-l-2 border-accent\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\trole: \"assistant\",\n\t\t},\n\t},\n);\n\n/**\n * Single chat message row. Renders content with role-specific styling and a\n * `data-role` attribute so consumers can target arbitrary roles via CSS.\n *\n * Headless: accepts any `children`. Pair with `Markdown` + `CodeBlock` for\n * assistant turns, with `ToolCall` for agent steps, or with plain strings.\n *\n * @example\n * <Message role=\"user\">What's the weather?</Message>\n * @example\n * <Message role=\"assistant\">\n * <Markdown>{streamingText}</Markdown>\n * <ToolCall name=\"getWeather\" state=\"result\" args={...} result={...} />\n * </Message>\n */\nexport interface MessageProps\n\textends Omit<React.HTMLAttributes<HTMLDivElement>, \"role\">,\n\t\tVariantProps<typeof messageVariants> {\n\t/** Speaker — drives variant styling and the `data-role` attribute. */\n\trole: Role;\n\tchildren: React.ReactNode;\n}\n\n/**\n * Renders a chat-message row scoped to one speaker.\n * @param props - role + content\n * @returns A styled div tagged with `data-role={role}`\n */\nfunction Message({ role, className, children, ...props }: MessageProps) {\n\treturn (\n\t\t<div data-role={role} className={cn(messageVariants({ role }), className)} {...props}>\n\t\t\t{children}\n\t\t</div>\n\t);\n}\n\nexport { Message, messageVariants };\n"]}
@@ -0,0 +1,3 @@
1
+ export { MultiCombobox_alias_1 as MultiCombobox } from './_tsup-dts-rollup.js';
2
+ export { MultiComboboxOption_alias_1 as MultiComboboxOption } from './_tsup-dts-rollup.js';
3
+ export { MultiComboboxProps_alias_1 as MultiComboboxProps } from './_tsup-dts-rollup.js';