@chatsdk-dev/ui 0.0.1 → 0.1.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 (468) hide show
  1. package/README.md +7 -7
  2. package/dist/atoms/accordion.d.ts +7 -0
  3. package/dist/atoms/accordion.d.ts.map +1 -0
  4. package/dist/atoms/accordion.js +18 -0
  5. package/dist/atoms/alert-dialog.d.ts +19 -0
  6. package/dist/atoms/alert-dialog.d.ts.map +1 -0
  7. package/dist/atoms/alert-dialog.js +42 -0
  8. package/dist/atoms/alert.d.ts +11 -0
  9. package/dist/atoms/alert.d.ts.map +1 -0
  10. package/dist/atoms/alert.js +27 -0
  11. package/dist/atoms/avatar.d.ts +12 -0
  12. package/dist/atoms/avatar.d.ts.map +1 -0
  13. package/dist/atoms/avatar.js +23 -0
  14. package/dist/atoms/badge.d.ts +8 -0
  15. package/dist/atoms/badge.d.ts.map +1 -0
  16. package/dist/atoms/badge.js +44 -0
  17. package/dist/atoms/button-group.d.ts +11 -0
  18. package/dist/atoms/button-group.d.ts.map +1 -0
  19. package/dist/atoms/button-group.js +36 -0
  20. package/dist/atoms/button-loader.d.ts +9 -0
  21. package/dist/atoms/button-loader.d.ts.map +1 -0
  22. package/dist/atoms/button-loader.js +10 -0
  23. package/dist/atoms/button.d.ts +9 -0
  24. package/dist/atoms/button.d.ts.map +1 -0
  25. package/dist/atoms/button.js +32 -0
  26. package/dist/atoms/card.d.ts +12 -0
  27. package/dist/atoms/card.d.ts.map +1 -0
  28. package/dist/atoms/card.js +25 -0
  29. package/dist/atoms/carousel.d.ts +29 -0
  30. package/dist/atoms/carousel.d.ts.map +1 -0
  31. package/dist/atoms/carousel.js +91 -0
  32. package/dist/atoms/collapsible.d.ts +6 -0
  33. package/dist/atoms/collapsible.d.ts.map +1 -0
  34. package/dist/atoms/collapsible.js +13 -0
  35. package/dist/atoms/command.d.ts +20 -0
  36. package/dist/atoms/command.d.ts.map +1 -0
  37. package/dist/atoms/command.js +35 -0
  38. package/dist/atoms/container.d.ts +8 -0
  39. package/dist/atoms/container.d.ts.map +1 -0
  40. package/dist/atoms/container.js +5 -0
  41. package/dist/atoms/dialog.d.ts +19 -0
  42. package/dist/atoms/dialog.d.ts.map +1 -0
  43. package/dist/atoms/dialog.js +38 -0
  44. package/dist/atoms/dots-loader.d.ts +15 -0
  45. package/dist/atoms/dots-loader.d.ts.map +1 -0
  46. package/dist/atoms/dots-loader.js +21 -0
  47. package/dist/atoms/drawer.d.ts +14 -0
  48. package/dist/atoms/drawer.d.ts.map +1 -0
  49. package/dist/atoms/drawer.js +35 -0
  50. package/dist/atoms/dropdown-menu.d.ts +26 -0
  51. package/dist/atoms/dropdown-menu.d.ts.map +1 -0
  52. package/dist/atoms/dropdown-menu.js +51 -0
  53. package/dist/atoms/empty.d.ts +12 -0
  54. package/dist/atoms/empty.d.ts.map +1 -0
  55. package/dist/atoms/empty.js +33 -0
  56. package/dist/atoms/field.d.ts +25 -0
  57. package/dist/atoms/field.d.ts.map +1 -0
  58. package/dist/atoms/field.js +68 -0
  59. package/dist/atoms/form.d.ts +23 -0
  60. package/dist/atoms/form.d.ts.map +1 -0
  61. package/dist/atoms/form.js +68 -0
  62. package/dist/atoms/header.d.ts +6 -0
  63. package/dist/atoms/header.d.ts.map +1 -0
  64. package/dist/atoms/header.js +6 -0
  65. package/dist/atoms/hover-card.d.ts +6 -0
  66. package/dist/atoms/hover-card.d.ts.map +1 -0
  67. package/dist/atoms/hover-card.js +14 -0
  68. package/dist/atoms/index.d.ts +5 -0
  69. package/dist/atoms/index.d.ts.map +1 -0
  70. package/dist/atoms/index.js +5 -0
  71. package/dist/atoms/input-group.d.ts +19 -0
  72. package/dist/atoms/input-group.d.ts.map +1 -0
  73. package/dist/atoms/input-group.js +57 -0
  74. package/dist/atoms/input.d.ts +7 -0
  75. package/dist/atoms/input.d.ts.map +1 -0
  76. package/dist/atoms/input.js +6 -0
  77. package/dist/atoms/label.d.ts +3 -0
  78. package/dist/atoms/label.d.ts.map +1 -0
  79. package/dist/atoms/label.js +7 -0
  80. package/dist/atoms/logo.d.ts +7 -0
  81. package/dist/atoms/logo.d.ts.map +1 -0
  82. package/dist/atoms/logo.js +6 -0
  83. package/dist/atoms/number-flow.d.ts +3 -0
  84. package/dist/atoms/number-flow.d.ts.map +1 -0
  85. package/dist/atoms/number-flow.js +6 -0
  86. package/dist/atoms/popover.d.ts +10 -0
  87. package/dist/atoms/popover.d.ts.map +1 -0
  88. package/dist/atoms/popover.js +23 -0
  89. package/dist/atoms/progress.d.ts +8 -0
  90. package/dist/atoms/progress.d.ts.map +1 -0
  91. package/dist/atoms/progress.js +20 -0
  92. package/dist/atoms/radio-group.d.ts +6 -0
  93. package/dist/atoms/radio-group.d.ts.map +1 -0
  94. package/dist/atoms/radio-group.js +13 -0
  95. package/dist/atoms/scroll-area.d.ts +5 -0
  96. package/dist/atoms/scroll-area.d.ts.map +1 -0
  97. package/dist/atoms/scroll-area.js +11 -0
  98. package/dist/atoms/select.d.ts +17 -0
  99. package/dist/atoms/select.d.ts.map +1 -0
  100. package/dist/atoms/select.js +34 -0
  101. package/dist/atoms/separator.d.ts +3 -0
  102. package/dist/atoms/separator.d.ts.map +1 -0
  103. package/dist/atoms/separator.js +7 -0
  104. package/dist/atoms/sheet.d.ts +15 -0
  105. package/dist/atoms/sheet.d.ts.map +1 -0
  106. package/dist/atoms/sheet.js +37 -0
  107. package/dist/atoms/sidebar.d.ts +65 -0
  108. package/dist/atoms/sidebar.d.ts.map +1 -0
  109. package/dist/atoms/sidebar.js +258 -0
  110. package/dist/atoms/skeleton.d.ts +2 -0
  111. package/dist/atoms/skeleton.d.ts.map +1 -0
  112. package/dist/atoms/skeleton.js +5 -0
  113. package/dist/atoms/spinner.d.ts +3 -0
  114. package/dist/atoms/spinner.d.ts.map +1 -0
  115. package/dist/atoms/spinner.js +7 -0
  116. package/dist/atoms/switch.d.ts +5 -0
  117. package/dist/atoms/switch.d.ts.map +1 -0
  118. package/dist/atoms/switch.js +7 -0
  119. package/dist/atoms/table.d.ts +13 -0
  120. package/dist/atoms/table.d.ts.map +1 -0
  121. package/dist/atoms/table.js +28 -0
  122. package/dist/atoms/tabs.d.ts +12 -0
  123. package/dist/atoms/tabs.d.ts.map +1 -0
  124. package/dist/atoms/tabs.js +32 -0
  125. package/dist/atoms/textarea.d.ts +3 -0
  126. package/dist/atoms/textarea.d.ts.map +1 -0
  127. package/dist/atoms/textarea.js +5 -0
  128. package/dist/atoms/toggle.d.ts +9 -0
  129. package/dist/atoms/toggle.d.ts.map +1 -0
  130. package/dist/atoms/toggle.js +26 -0
  131. package/dist/atoms/tooltip.d.ts +7 -0
  132. package/dist/atoms/tooltip.d.ts.map +1 -0
  133. package/dist/atoms/tooltip.js +17 -0
  134. package/dist/atoms/typography/h1.d.ts +10 -0
  135. package/dist/atoms/typography/h1.d.ts.map +1 -0
  136. package/dist/atoms/typography/h1.js +6 -0
  137. package/dist/atoms/typography/paragraph.d.ts +6 -0
  138. package/dist/atoms/typography/paragraph.d.ts.map +1 -0
  139. package/dist/atoms/typography/paragraph.js +6 -0
  140. package/dist/atoms/typography/text.d.ts +14 -0
  141. package/dist/atoms/typography/text.d.ts.map +1 -0
  142. package/dist/atoms/typography/text.js +41 -0
  143. package/dist/components/responsive-alert-dialog.d.ts +16 -0
  144. package/dist/components/responsive-alert-dialog.d.ts.map +1 -0
  145. package/dist/components/responsive-alert-dialog.js +20 -0
  146. package/dist/components/responsive-dialog.d.ts +11 -0
  147. package/dist/components/responsive-dialog.d.ts.map +1 -0
  148. package/dist/components/responsive-dialog.js +21 -0
  149. package/dist/hooks/use-copy-to-clipboard.d.ts +2 -0
  150. package/dist/hooks/use-copy-to-clipboard.d.ts.map +1 -0
  151. package/dist/hooks/use-copy-to-clipboard.js +31 -0
  152. package/dist/index.css +1580 -39
  153. package/dist/molecules/actions.d.ts +10 -0
  154. package/dist/molecules/actions.d.ts.map +1 -0
  155. package/dist/molecules/actions.js +13 -0
  156. package/dist/molecules/agent.d.ts +27 -0
  157. package/dist/molecules/agent.d.ts.map +1 -0
  158. package/dist/molecules/agent.js +27 -0
  159. package/dist/molecules/ai/actions.d.ts +10 -0
  160. package/dist/molecules/ai/actions.d.ts.map +1 -0
  161. package/dist/molecules/ai/actions.js +13 -0
  162. package/dist/molecules/ai/agent.d.ts +27 -0
  163. package/dist/molecules/ai/agent.d.ts.map +1 -0
  164. package/dist/molecules/ai/agent.js +27 -0
  165. package/dist/molecules/ai/artifact.d.ts +24 -0
  166. package/dist/molecules/ai/artifact.d.ts.map +1 -0
  167. package/dist/molecules/ai/artifact.js +20 -0
  168. package/dist/molecules/ai/attachments.d.ts +55 -0
  169. package/dist/molecules/ai/attachments.d.ts.map +1 -0
  170. package/dist/molecules/ai/attachments.js +125 -0
  171. package/dist/molecules/ai/audio-player.d.ts +30 -0
  172. package/dist/molecules/ai/audio-player.d.ts.map +1 -0
  173. package/dist/molecules/ai/audio-player.js +43 -0
  174. package/dist/molecules/ai/canvas.d.ts +9 -0
  175. package/dist/molecules/ai/canvas.d.ts.map +1 -0
  176. package/dist/molecules/ai/canvas.js +5 -0
  177. package/dist/molecules/ai/chain-of-thought.d.ts +30 -0
  178. package/dist/molecules/ai/chain-of-thought.d.ts.map +1 -0
  179. package/dist/molecules/ai/chain-of-thought.js +49 -0
  180. package/dist/molecules/ai/checkpoint.d.ts +12 -0
  181. package/dist/molecules/ai/checkpoint.d.ts.map +1 -0
  182. package/dist/molecules/ai/checkpoint.js +10 -0
  183. package/dist/molecules/ai/code-block.d.ts +46 -0
  184. package/dist/molecules/ai/code-block.d.ts.map +1 -0
  185. package/dist/molecules/ai/code-block.js +216 -0
  186. package/dist/molecules/ai/commit.d.ts +65 -0
  187. package/dist/molecules/ai/commit.d.ts.map +1 -0
  188. package/dist/molecules/ai/commit.js +95 -0
  189. package/dist/molecules/ai/confirmation.d.ts +50 -0
  190. package/dist/molecules/ai/confirmation.d.ts.map +1 -0
  191. package/dist/molecules/ai/confirmation.js +61 -0
  192. package/dist/molecules/ai/connection.d.ts +3 -0
  193. package/dist/molecules/ai/connection.d.ts.map +1 -0
  194. package/dist/molecules/ai/connection.js +3 -0
  195. package/dist/molecules/ai/context.d.ts +33 -0
  196. package/dist/molecules/ai/context.d.ts.map +1 -0
  197. package/dist/molecules/ai/context.js +164 -0
  198. package/dist/molecules/ai/controls.d.ts +5 -0
  199. package/dist/molecules/ai/controls.d.ts.map +1 -0
  200. package/dist/molecules/ai/controls.js +5 -0
  201. package/dist/molecules/ai/conversation.d.ts +24 -0
  202. package/dist/molecules/ai/conversation.d.ts.map +1 -0
  203. package/dist/molecules/ai/conversation.js +41 -0
  204. package/dist/molecules/ai/edge.d.ts +6 -0
  205. package/dist/molecules/ai/edge.d.ts.map +1 -0
  206. package/dist/molecules/ai/edge.js +87 -0
  207. package/dist/molecules/ai/environment-variables.d.ts +39 -0
  208. package/dist/molecules/ai/environment-variables.d.ts.map +1 -0
  209. package/dist/molecules/ai/environment-variables.js +87 -0
  210. package/dist/molecules/ai/file-tree.d.ts +27 -0
  211. package/dist/molecules/ai/file-tree.d.ts.map +1 -0
  212. package/dist/molecules/ai/file-tree.js +71 -0
  213. package/dist/molecules/ai/image.d.ts +7 -0
  214. package/dist/molecules/ai/image.d.ts.map +1 -0
  215. package/dist/molecules/ai/image.js +3 -0
  216. package/dist/molecules/ai/inline-citation.d.ts +39 -0
  217. package/dist/molecules/ai/inline-citation.d.ts.map +1 -0
  218. package/dist/molecules/ai/inline-citation.js +68 -0
  219. package/dist/molecules/ai/jsx-preview.d.ts +30 -0
  220. package/dist/molecules/ai/jsx-preview.d.ts.map +1 -0
  221. package/dist/molecules/ai/jsx-preview.js +167 -0
  222. package/dist/molecules/ai/loader.d.ts +6 -0
  223. package/dist/molecules/ai/loader.d.ts.map +1 -0
  224. package/dist/molecules/ai/loader.js +4 -0
  225. package/dist/molecules/ai/message.d.ts +38 -0
  226. package/dist/molecules/ai/message.d.ts.map +1 -0
  227. package/dist/molecules/ai/message.js +92 -0
  228. package/dist/molecules/ai/mic-selector.d.ts +46 -0
  229. package/dist/molecules/ai/mic-selector.d.ts.map +1 -0
  230. package/dist/molecules/ai/mic-selector.js +184 -0
  231. package/dist/molecules/ai/model-selector.d.ts +36 -0
  232. package/dist/molecules/ai/model-selector.d.ts.map +1 -0
  233. package/dist/molecules/ai/model-selector.js +18 -0
  234. package/dist/molecules/ai/node.d.ts +22 -0
  235. package/dist/molecules/ai/node.d.ts.map +1 -0
  236. package/dist/molecules/ai/node.js +11 -0
  237. package/dist/molecules/ai/open-in-chat.d.ts +29 -0
  238. package/dist/molecules/ai/open-in-chat.d.ts.map +1 -0
  239. package/dist/molecules/ai/open-in-chat.js +100 -0
  240. package/dist/molecules/ai/package-info.d.ts +30 -0
  241. package/dist/molecules/ai/package-info.d.ts.map +1 -0
  242. package/dist/molecules/ai/package-info.js +50 -0
  243. package/dist/molecules/ai/panel.d.ts +6 -0
  244. package/dist/molecules/ai/panel.d.ts.map +1 -0
  245. package/dist/molecules/ai/panel.js +4 -0
  246. package/dist/molecules/ai/persona.d.ts +49 -0
  247. package/dist/molecules/ai/persona.d.ts.map +1 -0
  248. package/dist/molecules/ai/persona.js +189 -0
  249. package/dist/molecules/ai/plan.d.ts +26 -0
  250. package/dist/molecules/ai/plan.d.ts.map +1 -0
  251. package/dist/molecules/ai/plan.js +34 -0
  252. package/dist/molecules/ai/prompt-input.d.ts +149 -0
  253. package/dist/molecules/ai/prompt-input.d.ts.map +1 -0
  254. package/dist/molecules/ai/prompt-input.js +702 -0
  255. package/dist/molecules/ai/queue.d.ts +62 -0
  256. package/dist/molecules/ai/queue.d.ts.map +1 -0
  257. package/dist/molecules/ai/queue.js +28 -0
  258. package/dist/molecules/ai/reasoning.d.ts +27 -0
  259. package/dist/molecules/ai/reasoning.d.ts.map +1 -0
  260. package/dist/molecules/ai/reasoning.js +95 -0
  261. package/dist/molecules/ai/response.d.ts +6 -0
  262. package/dist/molecules/ai/response.d.ts.map +1 -0
  263. package/dist/molecules/ai/response.js +18 -0
  264. package/dist/molecules/ai/sandbox.d.ts +25 -0
  265. package/dist/molecules/ai/sandbox.d.ts.map +1 -0
  266. package/dist/molecules/ai/sandbox.js +15 -0
  267. package/dist/molecules/ai/schema-display.d.ts +56 -0
  268. package/dist/molecules/ai/schema-display.d.ts.map +1 -0
  269. package/dist/molecules/ai/schema-display.js +73 -0
  270. package/dist/molecules/ai/shimmer.d.ts +10 -0
  271. package/dist/molecules/ai/shimmer.d.ts.map +1 -0
  272. package/dist/molecules/ai/shimmer.js +28 -0
  273. package/dist/molecules/ai/snippet.d.ts +19 -0
  274. package/dist/molecules/ai/snippet.d.ts.map +1 -0
  275. package/dist/molecules/ai/snippet.js +46 -0
  276. package/dist/molecules/ai/sources.d.ts +13 -0
  277. package/dist/molecules/ai/sources.d.ts.map +1 -0
  278. package/dist/molecules/ai/sources.js +9 -0
  279. package/dist/molecules/ai/speech-input.d.ts +55 -0
  280. package/dist/molecules/ai/speech-input.d.ts.map +1 -0
  281. package/dist/molecules/ai/speech-input.js +187 -0
  282. package/dist/molecules/ai/stack-trace.d.ts +38 -0
  283. package/dist/molecules/ai/stack-trace.d.ts.map +1 -0
  284. package/dist/molecules/ai/stack-trace.js +194 -0
  285. package/dist/molecules/ai/suggestion.d.ts +11 -0
  286. package/dist/molecules/ai/suggestion.d.ts.map +1 -0
  287. package/dist/molecules/ai/suggestion.js +13 -0
  288. package/dist/molecules/ai/task.d.ts +15 -0
  289. package/dist/molecules/ai/task.d.ts.map +1 -0
  290. package/dist/molecules/ai/task.js +10 -0
  291. package/dist/molecules/ai/terminal.d.ts +28 -0
  292. package/dist/molecules/ai/terminal.d.ts.map +1 -0
  293. package/dist/molecules/ai/terminal.js +68 -0
  294. package/dist/molecules/ai/test-results.d.ts +59 -0
  295. package/dist/molecules/ai/test-results.d.ts.map +1 -0
  296. package/dist/molecules/ai/test-results.js +97 -0
  297. package/dist/molecules/ai/tool.d.ts +32 -0
  298. package/dist/molecules/ai/tool.d.ts.map +1 -0
  299. package/dist/molecules/ai/tool.js +49 -0
  300. package/dist/molecules/ai/toolbar.d.ts +6 -0
  301. package/dist/molecules/ai/toolbar.d.ts.map +1 -0
  302. package/dist/molecules/ai/toolbar.js +4 -0
  303. package/dist/molecules/ai/transcription.d.ts +17 -0
  304. package/dist/molecules/ai/transcription.d.ts.map +1 -0
  305. package/dist/molecules/ai/transcription.js +36 -0
  306. package/dist/molecules/ai/voice-selector.d.ts +64 -0
  307. package/dist/molecules/ai/voice-selector.d.ts.map +1 -0
  308. package/dist/molecules/ai/voice-selector.js +224 -0
  309. package/dist/molecules/ai/web-preview.d.ts +35 -0
  310. package/dist/molecules/ai/web-preview.d.ts.map +1 -0
  311. package/dist/molecules/ai/web-preview.js +65 -0
  312. package/dist/molecules/artifact.d.ts +24 -0
  313. package/dist/molecules/artifact.d.ts.map +1 -0
  314. package/dist/molecules/artifact.js +20 -0
  315. package/dist/molecules/attachments.d.ts +55 -0
  316. package/dist/molecules/attachments.d.ts.map +1 -0
  317. package/dist/molecules/attachments.js +125 -0
  318. package/dist/molecules/audio-player.d.ts +30 -0
  319. package/dist/molecules/audio-player.d.ts.map +1 -0
  320. package/dist/molecules/audio-player.js +43 -0
  321. package/dist/molecules/canvas.d.ts +9 -0
  322. package/dist/molecules/canvas.d.ts.map +1 -0
  323. package/dist/molecules/canvas.js +5 -0
  324. package/dist/molecules/chain-of-thought.d.ts +30 -0
  325. package/dist/molecules/chain-of-thought.d.ts.map +1 -0
  326. package/dist/molecules/chain-of-thought.js +49 -0
  327. package/dist/molecules/chat-message.d.ts +10 -0
  328. package/dist/molecules/chat-message.d.ts.map +1 -0
  329. package/dist/molecules/chat-message.js +53 -0
  330. package/dist/molecules/checkpoint.d.ts +12 -0
  331. package/dist/molecules/checkpoint.d.ts.map +1 -0
  332. package/dist/molecules/checkpoint.js +10 -0
  333. package/dist/molecules/code-block.d.ts +46 -0
  334. package/dist/molecules/code-block.d.ts.map +1 -0
  335. package/dist/molecules/code-block.js +216 -0
  336. package/dist/molecules/commit.d.ts +65 -0
  337. package/dist/molecules/commit.d.ts.map +1 -0
  338. package/dist/molecules/commit.js +95 -0
  339. package/dist/molecules/confirmation.d.ts +50 -0
  340. package/dist/molecules/confirmation.d.ts.map +1 -0
  341. package/dist/molecules/confirmation.js +61 -0
  342. package/dist/molecules/connection.d.ts +3 -0
  343. package/dist/molecules/connection.d.ts.map +1 -0
  344. package/dist/molecules/connection.js +3 -0
  345. package/dist/molecules/context.d.ts +33 -0
  346. package/dist/molecules/context.d.ts.map +1 -0
  347. package/dist/molecules/context.js +164 -0
  348. package/dist/molecules/controls.d.ts +5 -0
  349. package/dist/molecules/controls.d.ts.map +1 -0
  350. package/dist/molecules/controls.js +5 -0
  351. package/dist/molecules/conversation.d.ts +24 -0
  352. package/dist/molecules/conversation.d.ts.map +1 -0
  353. package/dist/molecules/conversation.js +41 -0
  354. package/dist/molecules/edge.d.ts +6 -0
  355. package/dist/molecules/edge.d.ts.map +1 -0
  356. package/dist/molecules/edge.js +87 -0
  357. package/dist/molecules/environment-variables.d.ts +39 -0
  358. package/dist/molecules/environment-variables.d.ts.map +1 -0
  359. package/dist/molecules/environment-variables.js +87 -0
  360. package/dist/molecules/file-tree.d.ts +27 -0
  361. package/dist/molecules/file-tree.d.ts.map +1 -0
  362. package/dist/molecules/file-tree.js +71 -0
  363. package/dist/molecules/image.d.ts +7 -0
  364. package/dist/molecules/image.d.ts.map +1 -0
  365. package/dist/molecules/image.js +3 -0
  366. package/dist/molecules/inline-citation.d.ts +39 -0
  367. package/dist/molecules/inline-citation.d.ts.map +1 -0
  368. package/dist/molecules/inline-citation.js +68 -0
  369. package/dist/molecules/jsx-preview.d.ts +30 -0
  370. package/dist/molecules/jsx-preview.d.ts.map +1 -0
  371. package/dist/molecules/jsx-preview.js +167 -0
  372. package/dist/molecules/loader.d.ts +6 -0
  373. package/dist/molecules/loader.d.ts.map +1 -0
  374. package/dist/molecules/loader.js +4 -0
  375. package/dist/molecules/message.d.ts +38 -0
  376. package/dist/molecules/message.d.ts.map +1 -0
  377. package/dist/molecules/message.js +92 -0
  378. package/dist/molecules/mic-selector.d.ts +46 -0
  379. package/dist/molecules/mic-selector.d.ts.map +1 -0
  380. package/dist/molecules/mic-selector.js +184 -0
  381. package/dist/molecules/model-selector.d.ts +36 -0
  382. package/dist/molecules/model-selector.d.ts.map +1 -0
  383. package/dist/molecules/model-selector.js +18 -0
  384. package/dist/molecules/node.d.ts +22 -0
  385. package/dist/molecules/node.d.ts.map +1 -0
  386. package/dist/molecules/node.js +11 -0
  387. package/dist/molecules/open-in-chat.d.ts +29 -0
  388. package/dist/molecules/open-in-chat.d.ts.map +1 -0
  389. package/dist/molecules/open-in-chat.js +100 -0
  390. package/dist/molecules/package-info.d.ts +30 -0
  391. package/dist/molecules/package-info.d.ts.map +1 -0
  392. package/dist/molecules/package-info.js +50 -0
  393. package/dist/molecules/panel.d.ts +6 -0
  394. package/dist/molecules/panel.d.ts.map +1 -0
  395. package/dist/molecules/panel.js +4 -0
  396. package/dist/molecules/persona.d.ts +49 -0
  397. package/dist/molecules/persona.d.ts.map +1 -0
  398. package/dist/molecules/persona.js +189 -0
  399. package/dist/molecules/plan.d.ts +26 -0
  400. package/dist/molecules/plan.d.ts.map +1 -0
  401. package/dist/molecules/plan.js +34 -0
  402. package/dist/molecules/prompt-input.d.ts +149 -0
  403. package/dist/molecules/prompt-input.d.ts.map +1 -0
  404. package/dist/molecules/prompt-input.js +702 -0
  405. package/dist/molecules/queue.d.ts +62 -0
  406. package/dist/molecules/queue.d.ts.map +1 -0
  407. package/dist/molecules/queue.js +28 -0
  408. package/dist/molecules/reasoning.d.ts +27 -0
  409. package/dist/molecules/reasoning.d.ts.map +1 -0
  410. package/dist/molecules/reasoning.js +95 -0
  411. package/dist/molecules/response.d.ts +6 -0
  412. package/dist/molecules/response.d.ts.map +1 -0
  413. package/dist/molecules/response.js +18 -0
  414. package/dist/molecules/responsive-alert-dialog.d.ts +16 -0
  415. package/dist/molecules/responsive-alert-dialog.d.ts.map +1 -0
  416. package/dist/molecules/responsive-alert-dialog.js +20 -0
  417. package/dist/molecules/responsive-dialog.d.ts +11 -0
  418. package/dist/molecules/responsive-dialog.d.ts.map +1 -0
  419. package/dist/molecules/responsive-dialog.js +21 -0
  420. package/dist/molecules/sandbox.d.ts +25 -0
  421. package/dist/molecules/sandbox.d.ts.map +1 -0
  422. package/dist/molecules/sandbox.js +15 -0
  423. package/dist/molecules/schema-display.d.ts +56 -0
  424. package/dist/molecules/schema-display.d.ts.map +1 -0
  425. package/dist/molecules/schema-display.js +73 -0
  426. package/dist/molecules/shimmer.d.ts +10 -0
  427. package/dist/molecules/shimmer.d.ts.map +1 -0
  428. package/dist/molecules/shimmer.js +28 -0
  429. package/dist/molecules/snippet.d.ts +19 -0
  430. package/dist/molecules/snippet.d.ts.map +1 -0
  431. package/dist/molecules/snippet.js +46 -0
  432. package/dist/molecules/sources.d.ts +13 -0
  433. package/dist/molecules/sources.d.ts.map +1 -0
  434. package/dist/molecules/sources.js +9 -0
  435. package/dist/molecules/speech-input.d.ts +55 -0
  436. package/dist/molecules/speech-input.d.ts.map +1 -0
  437. package/dist/molecules/speech-input.js +187 -0
  438. package/dist/molecules/stack-trace.d.ts +38 -0
  439. package/dist/molecules/stack-trace.d.ts.map +1 -0
  440. package/dist/molecules/stack-trace.js +194 -0
  441. package/dist/molecules/suggestion.d.ts +11 -0
  442. package/dist/molecules/suggestion.d.ts.map +1 -0
  443. package/dist/molecules/suggestion.js +13 -0
  444. package/dist/molecules/task.d.ts +15 -0
  445. package/dist/molecules/task.d.ts.map +1 -0
  446. package/dist/molecules/task.js +10 -0
  447. package/dist/molecules/terminal.d.ts +28 -0
  448. package/dist/molecules/terminal.d.ts.map +1 -0
  449. package/dist/molecules/terminal.js +68 -0
  450. package/dist/molecules/test-results.d.ts +59 -0
  451. package/dist/molecules/test-results.d.ts.map +1 -0
  452. package/dist/molecules/test-results.js +97 -0
  453. package/dist/molecules/tool.d.ts +32 -0
  454. package/dist/molecules/tool.d.ts.map +1 -0
  455. package/dist/molecules/tool.js +49 -0
  456. package/dist/molecules/toolbar.d.ts +6 -0
  457. package/dist/molecules/toolbar.d.ts.map +1 -0
  458. package/dist/molecules/toolbar.js +4 -0
  459. package/dist/molecules/transcription.d.ts +17 -0
  460. package/dist/molecules/transcription.d.ts.map +1 -0
  461. package/dist/molecules/transcription.js +36 -0
  462. package/dist/molecules/voice-selector.d.ts +64 -0
  463. package/dist/molecules/voice-selector.d.ts.map +1 -0
  464. package/dist/molecules/voice-selector.js +224 -0
  465. package/dist/molecules/web-preview.d.ts +35 -0
  466. package/dist/molecules/web-preview.d.ts.map +1 -0
  467. package/dist/molecules/web-preview.js +65 -0
  468. package/package.json +27 -8
@@ -0,0 +1,10 @@
1
+ import type { ComponentProps } from "react";
2
+ import { type ButtonProps } from "@chatsdk-dev/ui/components/button";
3
+ export type ActionsProps = ComponentProps<"div">;
4
+ export declare const Actions: ({ className, children, ...props }: ActionsProps) => import("react/jsx-runtime").JSX.Element;
5
+ export type ActionProps = ButtonProps & {
6
+ tooltip?: string;
7
+ label?: string;
8
+ };
9
+ export declare const Action: ({ tooltip, children, label, className, variant, size, ...props }: ActionProps) => import("react/jsx-runtime").JSX.Element;
10
+ //# sourceMappingURL=actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/molecules/actions.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAS7E,MAAM,MAAM,YAAY,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAEjD,eAAO,MAAM,OAAO,GAAI,mCAAmC,YAAY,4CAItE,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,kEAQpB,WAAW,4CA+Bb,CAAC"}
@@ -0,0 +1,13 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Button } from "@chatsdk-dev/ui/components/button";
4
+ import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "@chatsdk-dev/ui/components/tooltip";
5
+ import { cn } from "@chatsdk-dev/ui/lib/utils";
6
+ export const Actions = ({ className, children, ...props }) => (_jsx("div", { className: cn("flex items-center gap-", className), ...props, children: children }));
7
+ export const Action = ({ tooltip, children, label, className, variant = "ghost", size = "sm", ...props }) => {
8
+ const button = (_jsxs(Button, { className: cn("size-9 p-1.5 bg-transparent text-muted-foreground hover:text-foreground hover:bg-transparent relative", className), size: size, type: "button", variant: variant, ...props, children: [children, _jsx("span", { className: "sr-only", children: label || tooltip })] }));
9
+ if (tooltip) {
10
+ return (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { children: button }), _jsx(TooltipContent, { children: _jsx("p", { children: tooltip }) })] }) }));
11
+ }
12
+ return button;
13
+ };
@@ -0,0 +1,27 @@
1
+ import { Accordion, AccordionItem } from "@chatsdk-dev/ui/components/accordion";
2
+ import type { Tool } from "ai";
3
+ import type { ComponentProps } from "react";
4
+ export type AgentProps = ComponentProps<"div">;
5
+ export declare const Agent: import("react").MemoExoticComponent<({ className, ...props }: AgentProps) => import("react/jsx-runtime").JSX.Element>;
6
+ export type AgentHeaderProps = ComponentProps<"div"> & {
7
+ name: string;
8
+ model?: string;
9
+ };
10
+ export declare const AgentHeader: import("react").MemoExoticComponent<({ className, name, model, ...props }: AgentHeaderProps) => import("react/jsx-runtime").JSX.Element>;
11
+ export type AgentContentProps = ComponentProps<"div">;
12
+ export declare const AgentContent: import("react").MemoExoticComponent<({ className, ...props }: AgentContentProps) => import("react/jsx-runtime").JSX.Element>;
13
+ export type AgentInstructionsProps = ComponentProps<"div"> & {
14
+ children: string;
15
+ };
16
+ export declare const AgentInstructions: import("react").MemoExoticComponent<({ className, children, ...props }: AgentInstructionsProps) => import("react/jsx-runtime").JSX.Element>;
17
+ export type AgentToolsProps = ComponentProps<typeof Accordion>;
18
+ export declare const AgentTools: import("react").MemoExoticComponent<({ className, ...props }: AgentToolsProps) => import("react/jsx-runtime").JSX.Element>;
19
+ export type AgentToolProps = ComponentProps<typeof AccordionItem> & {
20
+ tool: Tool;
21
+ };
22
+ export declare const AgentTool: import("react").MemoExoticComponent<({ className, tool, value, ...props }: AgentToolProps) => import("react/jsx-runtime").JSX.Element>;
23
+ export type AgentOutputProps = ComponentProps<"div"> & {
24
+ schema: string;
25
+ };
26
+ export declare const AgentOutput: import("react").MemoExoticComponent<({ className, schema, ...props }: AgentOutputProps) => import("react/jsx-runtime").JSX.Element>;
27
+ //# sourceMappingURL=agent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/molecules/agent.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,SAAS,EAET,aAAa,EAEd,MAAM,sCAAsC,CAAC;AAG9C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAE/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAK5C,MAAM,MAAM,UAAU,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAE/C,eAAO,MAAM,KAAK,gEAAkC,UAAU,6CAK5D,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,WAAW,6EACiB,gBAAgB,6CAmBxD,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAEtD,eAAO,MAAM,YAAY,gEACG,iBAAiB,6CAG5C,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IAC3D,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,iBAAiB,0EACQ,sBAAsB,6CAU3D,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC;AAE/D,eAAO,MAAM,UAAU,gEAAkC,eAAe,6CAKtE,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,OAAO,aAAa,CAAC,GAAG;IAClE,IAAI,EAAE,IAAI,CAAC;CACZ,CAAC;AAEF,eAAO,MAAM,SAAS,6EACmB,cAAc,6CAuBtD,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IACrD,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,WAAW,wEACY,gBAAgB,6CAUnD,CAAC"}
@@ -0,0 +1,27 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Accordion, AccordionContent, AccordionItem, AccordionTrigger, } from "@chatsdk-dev/ui/components/accordion";
4
+ import { Badge } from "@chatsdk-dev/ui/components/badge";
5
+ import { cn } from "@chatsdk-dev/ui/lib/utils";
6
+ import { BotIcon } from "lucide-react";
7
+ import { memo } from "react";
8
+ import { CodeBlock } from "./code-block";
9
+ export const Agent = memo(({ className, ...props }) => (_jsx("div", { className: cn("not-prose w-full rounded-md border", className), ...props })));
10
+ export const AgentHeader = memo(({ className, name, model, ...props }) => (_jsx("div", { className: cn("flex w-full items-center justify-between gap-4 p-3", className), ...props, children: _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(BotIcon, { className: "size-4 text-muted-foreground" }), _jsx("span", { className: "font-medium text-sm", children: name }), model && (_jsx(Badge, { className: "font-mono text-xs", variant: "secondary", children: model }))] }) })));
11
+ export const AgentContent = memo(({ className, ...props }) => (_jsx("div", { className: cn("space-y-4 p-4 pt-0", className), ...props })));
12
+ export const AgentInstructions = memo(({ className, children, ...props }) => (_jsxs("div", { className: cn("space-y-2", className), ...props, children: [_jsx("span", { className: "font-medium text-muted-foreground text-sm", children: "Instructions" }), _jsx("div", { className: "rounded-md bg-muted/50 p-3 text-muted-foreground text-sm", children: _jsx("p", { children: children }) })] })));
13
+ export const AgentTools = memo(({ className, ...props }) => (_jsxs("div", { className: cn("space-y-2", className), children: [_jsx("span", { className: "font-medium text-muted-foreground text-sm", children: "Tools" }), _jsx(Accordion, { className: "rounded-md border", ...props })] })));
14
+ export const AgentTool = memo(({ className, tool, value, ...props }) => {
15
+ const schema = "jsonSchema" in tool && tool.jsonSchema
16
+ ? tool.jsonSchema
17
+ : tool.inputSchema;
18
+ return (_jsxs(AccordionItem, { className: cn("border-b last:border-b-0", className), value: value, ...props, children: [_jsx(AccordionTrigger, { className: "px-3 py-2 text-sm hover:no-underline", children: tool.description ?? "No description" }), _jsx(AccordionContent, { className: "px-3 pb-3", children: _jsx("div", { className: "rounded-md bg-muted/50", children: _jsx(CodeBlock, { code: JSON.stringify(schema, null, 2), language: "json" }) }) })] }));
19
+ });
20
+ export const AgentOutput = memo(({ className, schema, ...props }) => (_jsxs("div", { className: cn("space-y-2", className), ...props, children: [_jsx("span", { className: "font-medium text-muted-foreground text-sm", children: "Output Schema" }), _jsx("div", { className: "rounded-md bg-muted/50", children: _jsx(CodeBlock, { code: schema, language: "typescript" }) })] })));
21
+ Agent.displayName = "Agent";
22
+ AgentHeader.displayName = "AgentHeader";
23
+ AgentContent.displayName = "AgentContent";
24
+ AgentInstructions.displayName = "AgentInstructions";
25
+ AgentTools.displayName = "AgentTools";
26
+ AgentTool.displayName = "AgentTool";
27
+ AgentOutput.displayName = "AgentOutput";
@@ -0,0 +1,10 @@
1
+ import type { ComponentProps } from "react";
2
+ import { type ButtonProps } from "@chatsdk-dev/ui/atoms/button";
3
+ export type ActionsProps = ComponentProps<"div">;
4
+ export declare const Actions: ({ className, children, ...props }: ActionsProps) => import("react/jsx-runtime").JSX.Element;
5
+ export type ActionProps = ButtonProps & {
6
+ tooltip?: string;
7
+ label?: string;
8
+ };
9
+ export declare const Action: ({ tooltip, children, label, className, variant, size, ...props }: ActionProps) => import("react/jsx-runtime").JSX.Element;
10
+ //# sourceMappingURL=actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/molecules/ai/actions.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,8BAA8B,CAAC;AASxE,MAAM,MAAM,YAAY,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAEjD,eAAO,MAAM,OAAO,GAAI,mCAAmC,YAAY,4CAItE,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,kEAQpB,WAAW,4CA+Bb,CAAC"}
@@ -0,0 +1,13 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Button } from "@chatsdk-dev/ui/atoms/button";
4
+ import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "@chatsdk-dev/ui/atoms/tooltip";
5
+ import { cn } from "@chatsdk-dev/ui/lib/utils";
6
+ export const Actions = ({ className, children, ...props }) => (_jsx("div", { className: cn("flex items-center gap-", className), ...props, children: children }));
7
+ export const Action = ({ tooltip, children, label, className, variant = "ghost", size = "sm", ...props }) => {
8
+ const button = (_jsxs(Button, { className: cn("size-9 p-1.5 bg-transparent text-muted-foreground hover:text-foreground hover:bg-transparent relative", className), size: size, type: "button", variant: variant, ...props, children: [children, _jsx("span", { className: "sr-only", children: label || tooltip })] }));
9
+ if (tooltip) {
10
+ return (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { children: button }), _jsx(TooltipContent, { children: _jsx("p", { children: tooltip }) })] }) }));
11
+ }
12
+ return button;
13
+ };
@@ -0,0 +1,27 @@
1
+ import { Accordion, AccordionItem } from "@chatsdk-dev/ui/atoms/accordion";
2
+ import type { Tool } from "ai";
3
+ import type { ComponentProps } from "react";
4
+ export type AgentProps = ComponentProps<"div">;
5
+ export declare const Agent: import("react").MemoExoticComponent<({ className, ...props }: AgentProps) => import("react/jsx-runtime").JSX.Element>;
6
+ export type AgentHeaderProps = ComponentProps<"div"> & {
7
+ name: string;
8
+ model?: string;
9
+ };
10
+ export declare const AgentHeader: import("react").MemoExoticComponent<({ className, name, model, ...props }: AgentHeaderProps) => import("react/jsx-runtime").JSX.Element>;
11
+ export type AgentContentProps = ComponentProps<"div">;
12
+ export declare const AgentContent: import("react").MemoExoticComponent<({ className, ...props }: AgentContentProps) => import("react/jsx-runtime").JSX.Element>;
13
+ export type AgentInstructionsProps = ComponentProps<"div"> & {
14
+ children: string;
15
+ };
16
+ export declare const AgentInstructions: import("react").MemoExoticComponent<({ className, children, ...props }: AgentInstructionsProps) => import("react/jsx-runtime").JSX.Element>;
17
+ export type AgentToolsProps = ComponentProps<typeof Accordion>;
18
+ export declare const AgentTools: import("react").MemoExoticComponent<({ className, ...props }: AgentToolsProps) => import("react/jsx-runtime").JSX.Element>;
19
+ export type AgentToolProps = ComponentProps<typeof AccordionItem> & {
20
+ tool: Tool;
21
+ };
22
+ export declare const AgentTool: import("react").MemoExoticComponent<({ className, tool, value, ...props }: AgentToolProps) => import("react/jsx-runtime").JSX.Element>;
23
+ export type AgentOutputProps = ComponentProps<"div"> & {
24
+ schema: string;
25
+ };
26
+ export declare const AgentOutput: import("react").MemoExoticComponent<({ className, schema, ...props }: AgentOutputProps) => import("react/jsx-runtime").JSX.Element>;
27
+ //# sourceMappingURL=agent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../src/molecules/ai/agent.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,SAAS,EAET,aAAa,EAEd,MAAM,iCAAiC,CAAC;AAGzC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAE/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAK5C,MAAM,MAAM,UAAU,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAE/C,eAAO,MAAM,KAAK,gEAAkC,UAAU,6CAK5D,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,WAAW,6EACiB,gBAAgB,6CAmBxD,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAEtD,eAAO,MAAM,YAAY,gEACG,iBAAiB,6CAG5C,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IAC3D,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,iBAAiB,0EACQ,sBAAsB,6CAU3D,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC;AAE/D,eAAO,MAAM,UAAU,gEAAkC,eAAe,6CAKtE,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,OAAO,aAAa,CAAC,GAAG;IAClE,IAAI,EAAE,IAAI,CAAC;CACZ,CAAC;AAEF,eAAO,MAAM,SAAS,6EACmB,cAAc,6CAuBtD,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IACrD,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,WAAW,wEACY,gBAAgB,6CAUnD,CAAC"}
@@ -0,0 +1,27 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Accordion, AccordionContent, AccordionItem, AccordionTrigger, } from "@chatsdk-dev/ui/atoms/accordion";
4
+ import { Badge } from "@chatsdk-dev/ui/atoms/badge";
5
+ import { cn } from "@chatsdk-dev/ui/lib/utils";
6
+ import { BotIcon } from "lucide-react";
7
+ import { memo } from "react";
8
+ import { CodeBlock } from "./code-block";
9
+ export const Agent = memo(({ className, ...props }) => (_jsx("div", { className: cn("not-prose w-full rounded-md border", className), ...props })));
10
+ export const AgentHeader = memo(({ className, name, model, ...props }) => (_jsx("div", { className: cn("flex w-full items-center justify-between gap-4 p-3", className), ...props, children: _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(BotIcon, { className: "size-4 text-muted-foreground" }), _jsx("span", { className: "font-medium text-sm", children: name }), model && (_jsx(Badge, { className: "font-mono text-xs", variant: "secondary", children: model }))] }) })));
11
+ export const AgentContent = memo(({ className, ...props }) => (_jsx("div", { className: cn("space-y-4 p-4 pt-0", className), ...props })));
12
+ export const AgentInstructions = memo(({ className, children, ...props }) => (_jsxs("div", { className: cn("space-y-2", className), ...props, children: [_jsx("span", { className: "font-medium text-muted-foreground text-sm", children: "Instructions" }), _jsx("div", { className: "rounded-md bg-muted/50 p-3 text-muted-foreground text-sm", children: _jsx("p", { children: children }) })] })));
13
+ export const AgentTools = memo(({ className, ...props }) => (_jsxs("div", { className: cn("space-y-2", className), children: [_jsx("span", { className: "font-medium text-muted-foreground text-sm", children: "Tools" }), _jsx(Accordion, { className: "rounded-md border", ...props })] })));
14
+ export const AgentTool = memo(({ className, tool, value, ...props }) => {
15
+ const schema = "jsonSchema" in tool && tool.jsonSchema
16
+ ? tool.jsonSchema
17
+ : tool.inputSchema;
18
+ return (_jsxs(AccordionItem, { className: cn("border-b last:border-b-0", className), value: value, ...props, children: [_jsx(AccordionTrigger, { className: "px-3 py-2 text-sm hover:no-underline", children: tool.description ?? "No description" }), _jsx(AccordionContent, { className: "px-3 pb-3", children: _jsx("div", { className: "rounded-md bg-muted/50", children: _jsx(CodeBlock, { code: JSON.stringify(schema, null, 2), language: "json" }) }) })] }));
19
+ });
20
+ export const AgentOutput = memo(({ className, schema, ...props }) => (_jsxs("div", { className: cn("space-y-2", className), ...props, children: [_jsx("span", { className: "font-medium text-muted-foreground text-sm", children: "Output Schema" }), _jsx("div", { className: "rounded-md bg-muted/50", children: _jsx(CodeBlock, { code: schema, language: "typescript" }) })] })));
21
+ Agent.displayName = "Agent";
22
+ AgentHeader.displayName = "AgentHeader";
23
+ AgentContent.displayName = "AgentContent";
24
+ AgentInstructions.displayName = "AgentInstructions";
25
+ AgentTools.displayName = "AgentTools";
26
+ AgentTool.displayName = "AgentTool";
27
+ AgentOutput.displayName = "AgentOutput";
@@ -0,0 +1,24 @@
1
+ import { Button } from "@chatsdk-dev/ui/atoms/button";
2
+ import type { LucideIcon } from "lucide-react";
3
+ import type { ComponentProps, HTMLAttributes } from "react";
4
+ export type ArtifactProps = HTMLAttributes<HTMLDivElement>;
5
+ export declare const Artifact: ({ className, ...props }: ArtifactProps) => import("react/jsx-runtime").JSX.Element;
6
+ export type ArtifactHeaderProps = HTMLAttributes<HTMLDivElement>;
7
+ export declare const ArtifactHeader: ({ className, ...props }: ArtifactHeaderProps) => import("react/jsx-runtime").JSX.Element;
8
+ export type ArtifactCloseProps = ComponentProps<typeof Button>;
9
+ export declare const ArtifactClose: ({ className, children, size, variant, ...props }: ArtifactCloseProps) => import("react/jsx-runtime").JSX.Element;
10
+ export type ArtifactTitleProps = HTMLAttributes<HTMLParagraphElement>;
11
+ export declare const ArtifactTitle: ({ className, ...props }: ArtifactTitleProps) => import("react/jsx-runtime").JSX.Element;
12
+ export type ArtifactDescriptionProps = HTMLAttributes<HTMLParagraphElement>;
13
+ export declare const ArtifactDescription: ({ className, ...props }: ArtifactDescriptionProps) => import("react/jsx-runtime").JSX.Element;
14
+ export type ArtifactActionsProps = HTMLAttributes<HTMLDivElement>;
15
+ export declare const ArtifactActions: ({ className, ...props }: ArtifactActionsProps) => import("react/jsx-runtime").JSX.Element;
16
+ export type ArtifactActionProps = ComponentProps<typeof Button> & {
17
+ tooltip?: string;
18
+ label?: string;
19
+ icon?: LucideIcon;
20
+ };
21
+ export declare const ArtifactAction: ({ tooltip, label, icon: Icon, children, className, size, variant, ...props }: ArtifactActionProps) => import("react/jsx-runtime").JSX.Element;
22
+ export type ArtifactContentProps = HTMLAttributes<HTMLDivElement>;
23
+ export declare const ArtifactContent: ({ className, ...props }: ArtifactContentProps) => import("react/jsx-runtime").JSX.Element;
24
+ //# sourceMappingURL=artifact.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifact.d.ts","sourceRoot":"","sources":["../../../src/molecules/ai/artifact.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAQtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5D,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAE3D,eAAO,MAAM,QAAQ,GAAI,yBAAyB,aAAa,4CAQ9D,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAEjE,eAAO,MAAM,cAAc,GAAI,yBAG5B,mBAAmB,4CAQrB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC;AAE/D,eAAO,MAAM,aAAa,GAAI,kDAM3B,kBAAkB,4CAcpB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,oBAAoB,CAAC,CAAC;AAEtE,eAAO,MAAM,aAAa,GAAI,yBAAyB,kBAAkB,4CAKxE,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC,oBAAoB,CAAC,CAAC;AAE5E,eAAO,MAAM,mBAAmB,GAAI,yBAGjC,wBAAwB,4CAE1B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAElE,eAAO,MAAM,eAAe,GAAI,yBAG7B,oBAAoB,4CAEtB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,OAAO,MAAM,CAAC,GAAG;IAChE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,8EAS5B,mBAAmB,4CA+BrB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAElE,eAAO,MAAM,eAAe,GAAI,yBAG7B,oBAAoB,4CAEtB,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Button } from "@chatsdk-dev/ui/atoms/button";
4
+ import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "@chatsdk-dev/ui/atoms/tooltip";
5
+ import { cn } from "@chatsdk-dev/ui/lib/utils";
6
+ import { XIcon } from "lucide-react";
7
+ export const Artifact = ({ className, ...props }) => (_jsx("div", { className: cn("flex flex-col overflow-hidden rounded-lg border bg-background shadow-sm", className), ...props }));
8
+ export const ArtifactHeader = ({ className, ...props }) => (_jsx("div", { className: cn("flex items-center justify-between border-b bg-muted/50 px-4 py-3", className), ...props }));
9
+ export const ArtifactClose = ({ className, children, size = "sm", variant = "ghost", ...props }) => (_jsxs(Button, { className: cn("size-8 p-0 text-muted-foreground hover:text-foreground", className), size: size, type: "button", variant: variant, ...props, children: [children ?? _jsx(XIcon, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "Close" })] }));
10
+ export const ArtifactTitle = ({ className, ...props }) => (_jsx("p", { className: cn("font-medium text-foreground text-sm", className), ...props }));
11
+ export const ArtifactDescription = ({ className, ...props }) => (_jsx("p", { className: cn("text-muted-foreground text-sm", className), ...props }));
12
+ export const ArtifactActions = ({ className, ...props }) => (_jsx("div", { className: cn("flex items-center gap-1", className), ...props }));
13
+ export const ArtifactAction = ({ tooltip, label, icon: Icon, children, className, size = "sm", variant = "ghost", ...props }) => {
14
+ const button = (_jsxs(Button, { className: cn("size-8 p-0 text-muted-foreground hover:text-foreground", className), size: size, type: "button", variant: variant, ...props, children: [Icon ? _jsx(Icon, { className: "size-4" }) : children, _jsx("span", { className: "sr-only", children: label || tooltip })] }));
15
+ if (tooltip) {
16
+ return (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { render: button }), _jsx(TooltipContent, { children: _jsx("p", { children: tooltip }) })] }) }));
17
+ }
18
+ return button;
19
+ };
20
+ export const ArtifactContent = ({ className, ...props }) => (_jsx("div", { className: cn("flex-1 overflow-auto p-4", className), ...props }));
@@ -0,0 +1,55 @@
1
+ import { Button } from "@chatsdk-dev/ui/atoms/button";
2
+ import { HoverCard, HoverCardContent, HoverCardTrigger } from "@chatsdk-dev/ui/atoms/hover-card";
3
+ import type { FileUIPart, SourceDocumentUIPart } from "ai";
4
+ import type { ComponentProps, HTMLAttributes, ReactNode } from "react";
5
+ export type AttachmentData = (FileUIPart & {
6
+ id: string;
7
+ }) | (SourceDocumentUIPart & {
8
+ id: string;
9
+ });
10
+ export type AttachmentMediaCategory = "image" | "video" | "audio" | "document" | "source" | "unknown";
11
+ export type AttachmentVariant = "grid" | "inline" | "list";
12
+ export declare const getMediaCategory: (data: AttachmentData) => AttachmentMediaCategory;
13
+ export declare const getAttachmentLabel: (data: AttachmentData) => string;
14
+ interface AttachmentsContextValue {
15
+ variant: AttachmentVariant;
16
+ }
17
+ interface AttachmentContextValue {
18
+ data: AttachmentData;
19
+ mediaCategory: AttachmentMediaCategory;
20
+ onRemove?: () => void;
21
+ variant: AttachmentVariant;
22
+ }
23
+ export declare const useAttachmentsContext: () => AttachmentsContextValue;
24
+ export declare const useAttachmentContext: () => AttachmentContextValue;
25
+ export type AttachmentsProps = HTMLAttributes<HTMLDivElement> & {
26
+ variant?: AttachmentVariant;
27
+ };
28
+ export declare const Attachments: ({ variant, className, children, ...props }: AttachmentsProps) => import("react/jsx-runtime").JSX.Element;
29
+ export type AttachmentProps = HTMLAttributes<HTMLDivElement> & {
30
+ data: AttachmentData;
31
+ onRemove?: () => void;
32
+ };
33
+ export declare const Attachment: ({ data, onRemove, className, children, ...props }: AttachmentProps) => import("react/jsx-runtime").JSX.Element;
34
+ export type AttachmentPreviewProps = HTMLAttributes<HTMLDivElement> & {
35
+ fallbackIcon?: ReactNode;
36
+ };
37
+ export declare const AttachmentPreview: ({ fallbackIcon, className, ...props }: AttachmentPreviewProps) => import("react/jsx-runtime").JSX.Element;
38
+ export type AttachmentInfoProps = HTMLAttributes<HTMLDivElement> & {
39
+ showMediaType?: boolean;
40
+ };
41
+ export declare const AttachmentInfo: ({ showMediaType, className, ...props }: AttachmentInfoProps) => import("react/jsx-runtime").JSX.Element | null;
42
+ export type AttachmentRemoveProps = ComponentProps<typeof Button> & {
43
+ label?: string;
44
+ };
45
+ export declare const AttachmentRemove: ({ label, className, children, ...props }: AttachmentRemoveProps) => import("react/jsx-runtime").JSX.Element | null;
46
+ export type AttachmentHoverCardProps = ComponentProps<typeof HoverCard>;
47
+ export declare const AttachmentHoverCard: ({ ...props }: AttachmentHoverCardProps) => import("react/jsx-runtime").JSX.Element;
48
+ export type AttachmentHoverCardTriggerProps = ComponentProps<typeof HoverCardTrigger>;
49
+ export declare const AttachmentHoverCardTrigger: ({ delay, closeDelay, ...props }: AttachmentHoverCardTriggerProps) => import("react/jsx-runtime").JSX.Element;
50
+ export type AttachmentHoverCardContentProps = ComponentProps<typeof HoverCardContent>;
51
+ export declare const AttachmentHoverCardContent: ({ align, className, ...props }: AttachmentHoverCardContentProps) => import("react/jsx-runtime").JSX.Element;
52
+ export type AttachmentEmptyProps = HTMLAttributes<HTMLDivElement>;
53
+ export declare const AttachmentEmpty: ({ className, children, ...props }: AttachmentEmptyProps) => import("react/jsx-runtime").JSX.Element;
54
+ export {};
55
+ //# sourceMappingURL=attachments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachments.d.ts","sourceRoot":"","sources":["../../../src/molecules/ai/attachments.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EACL,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,KAAK,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,IAAI,CAAC;AAU3D,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvE,MAAM,MAAM,cAAc,GACtB,CAAC,UAAU,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC,GAC7B,CAAC,oBAAoB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE5C,MAAM,MAAM,uBAAuB,GAC/B,OAAO,GACP,OAAO,GACP,OAAO,GACP,UAAU,GACV,QAAQ,GACR,SAAS,CAAC;AAEd,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AAe3D,eAAO,MAAM,gBAAgB,GAC3B,MAAM,cAAc,KACnB,uBAqBF,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,MAAM,cAAc,KAAG,MAOzD,CAAC;AA6BF,UAAU,uBAAuB;IAC/B,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAID,UAAU,sBAAsB;IAC9B,IAAI,EAAE,cAAc,CAAC;IACrB,aAAa,EAAE,uBAAuB,CAAC;IACvC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAQD,eAAO,MAAM,qBAAqB,+BAC8B,CAAC;AAEjE,eAAO,MAAM,oBAAoB,8BAMhC,CAAC;AAMF,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IAC9D,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,4CAKzB,gBAAgB,4CAkBlB,CAAC;AAMF,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IAC7D,IAAI,EAAE,cAAc,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,mDAMxB,eAAe,4CAiCjB,CAAC;AAMF,MAAM,MAAM,sBAAsB,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IACpE,YAAY,CAAC,EAAE,SAAS,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,uCAI/B,sBAAsB,4CAoCxB,CAAC;AAMF,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IACjE,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,wCAI5B,mBAAmB,mDAkBrB,CAAC;AAMF,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,OAAO,MAAM,CAAC,GAAG;IAClE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,0CAK9B,qBAAqB,mDA2CvB,CAAC;AAMF,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC;AAExE,eAAO,MAAM,mBAAmB,GAAI,cAAc,wBAAwB,4CAEzE,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG,cAAc,CAC1D,OAAO,gBAAgB,CACxB,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,iCAIxC,+BAA+B,4CAEjC,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG,cAAc,CAC1D,OAAO,gBAAgB,CACxB,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,gCAIxC,+BAA+B,4CAMjC,CAAC;AAMF,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAElE,eAAO,MAAM,eAAe,GAAI,mCAI7B,oBAAoB,4CAUtB,CAAC"}
@@ -0,0 +1,125 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Button } from "@chatsdk-dev/ui/atoms/button";
4
+ import { HoverCard, HoverCardContent, HoverCardTrigger, } from "@chatsdk-dev/ui/atoms/hover-card";
5
+ import { cn } from "@chatsdk-dev/ui/lib/utils";
6
+ import { FileTextIcon, GlobeIcon, ImageIcon, Music2Icon, PaperclipIcon, VideoIcon, XIcon, } from "lucide-react";
7
+ import { createContext, useCallback, useContext, useMemo } from "react";
8
+ const mediaCategoryIcons = {
9
+ audio: Music2Icon,
10
+ document: FileTextIcon,
11
+ image: ImageIcon,
12
+ source: GlobeIcon,
13
+ unknown: PaperclipIcon,
14
+ video: VideoIcon,
15
+ };
16
+ // ============================================================================
17
+ // Utility Functions
18
+ // ============================================================================
19
+ export const getMediaCategory = (data) => {
20
+ if (data.type === "source-document") {
21
+ return "source";
22
+ }
23
+ const mediaType = data.mediaType ?? "";
24
+ if (mediaType.startsWith("image/")) {
25
+ return "image";
26
+ }
27
+ if (mediaType.startsWith("video/")) {
28
+ return "video";
29
+ }
30
+ if (mediaType.startsWith("audio/")) {
31
+ return "audio";
32
+ }
33
+ if (mediaType.startsWith("application/") || mediaType.startsWith("text/")) {
34
+ return "document";
35
+ }
36
+ return "unknown";
37
+ };
38
+ export const getAttachmentLabel = (data) => {
39
+ if (data.type === "source-document") {
40
+ return data.title || data.filename || "Source";
41
+ }
42
+ const category = getMediaCategory(data);
43
+ return data.filename || (category === "image" ? "Image" : "Attachment");
44
+ };
45
+ const renderAttachmentImage = (url, filename, isGrid) => isGrid ? (_jsx("img", { alt: filename || "Image", className: "size-full object-cover", height: 96, src: url, width: 96 })) : (_jsx("img", { alt: filename || "Image", className: "size-full rounded object-cover", height: 20, src: url, width: 20 }));
46
+ const AttachmentsContext = createContext(null);
47
+ const AttachmentContext = createContext(null);
48
+ // ============================================================================
49
+ // Hooks
50
+ // ============================================================================
51
+ export const useAttachmentsContext = () => useContext(AttachmentsContext) ?? { variant: "grid" };
52
+ export const useAttachmentContext = () => {
53
+ const ctx = useContext(AttachmentContext);
54
+ if (!ctx) {
55
+ throw new Error("Attachment components must be used within <Attachment>");
56
+ }
57
+ return ctx;
58
+ };
59
+ export const Attachments = ({ variant = "grid", className, children, ...props }) => {
60
+ const contextValue = useMemo(() => ({ variant }), [variant]);
61
+ return (_jsx(AttachmentsContext.Provider, { value: contextValue, children: _jsx("div", { className: cn("flex items-start", variant === "list" ? "flex-col gap-2" : "flex-wrap gap-2", variant === "grid" && "ml-auto w-fit", className), ...props, children: children }) }));
62
+ };
63
+ export const Attachment = ({ data, onRemove, className, children, ...props }) => {
64
+ const { variant } = useAttachmentsContext();
65
+ const mediaCategory = getMediaCategory(data);
66
+ const contextValue = useMemo(() => ({ data, mediaCategory, onRemove, variant }), [data, mediaCategory, onRemove, variant]);
67
+ return (_jsx(AttachmentContext.Provider, { value: contextValue, children: _jsx("div", { className: cn("group relative", variant === "grid" && "size-24 overflow-hidden rounded-lg", variant === "inline" && [
68
+ "flex h-8 cursor-pointer select-none items-center gap-1.5",
69
+ "rounded-md border border-border px-1.5",
70
+ "font-medium text-sm transition-all",
71
+ "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
72
+ ], variant === "list" && [
73
+ "flex w-full items-center gap-3 rounded-lg border p-3",
74
+ "hover:bg-accent/50",
75
+ ], className), ...props, children: children }) }));
76
+ };
77
+ export const AttachmentPreview = ({ fallbackIcon, className, ...props }) => {
78
+ const { data, mediaCategory, variant } = useAttachmentContext();
79
+ const iconSize = variant === "inline" ? "size-3" : "size-4";
80
+ const renderIcon = (Icon) => (_jsx(Icon, { className: cn(iconSize, "text-muted-foreground") }));
81
+ const renderContent = () => {
82
+ if (mediaCategory === "image" && data.type === "file" && data.url) {
83
+ return renderAttachmentImage(data.url, data.filename, variant === "grid");
84
+ }
85
+ if (mediaCategory === "video" && data.type === "file" && data.url) {
86
+ return _jsx("video", { className: "size-full object-cover", muted: true, src: data.url });
87
+ }
88
+ const Icon = mediaCategoryIcons[mediaCategory];
89
+ return fallbackIcon ?? renderIcon(Icon);
90
+ };
91
+ return (_jsx("div", { className: cn("flex shrink-0 items-center justify-center overflow-hidden", variant === "grid" && "size-full bg-muted", variant === "inline" && "size-5 rounded bg-background", variant === "list" && "size-12 rounded bg-muted", className), ...props, children: renderContent() }));
92
+ };
93
+ export const AttachmentInfo = ({ showMediaType = false, className, ...props }) => {
94
+ const { data, variant } = useAttachmentContext();
95
+ const label = getAttachmentLabel(data);
96
+ if (variant === "grid") {
97
+ return null;
98
+ }
99
+ return (_jsxs("div", { className: cn("min-w-0 flex-1", className), ...props, children: [_jsx("span", { className: "block truncate", children: label }), showMediaType && data.mediaType && (_jsx("span", { className: "block truncate text-muted-foreground text-xs", children: data.mediaType }))] }));
100
+ };
101
+ export const AttachmentRemove = ({ label = "Remove", className, children, ...props }) => {
102
+ const { onRemove, variant } = useAttachmentContext();
103
+ const handleClick = useCallback((e) => {
104
+ e.stopPropagation();
105
+ onRemove?.();
106
+ }, [onRemove]);
107
+ if (!onRemove) {
108
+ return null;
109
+ }
110
+ return (_jsxs(Button, { "aria-label": label, className: cn(variant === "grid" && [
111
+ "absolute top-2 right-2 size-6 rounded-full p-0",
112
+ "bg-background/80 backdrop-blur-sm",
113
+ "opacity-0 transition-opacity group-hover:opacity-100",
114
+ "hover:bg-background",
115
+ "[&>svg]:size-3",
116
+ ], variant === "inline" && [
117
+ "size-5 rounded p-0",
118
+ "opacity-0 transition-opacity group-hover:opacity-100",
119
+ "[&>svg]:size-2.5",
120
+ ], variant === "list" && ["size-8 shrink-0 rounded p-0", "[&>svg]:size-4"], className), onClick: handleClick, type: "button", variant: "ghost", ...props, children: [children ?? _jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: label })] }));
121
+ };
122
+ export const AttachmentHoverCard = ({ ...props }) => (_jsx(HoverCard, { ...props }));
123
+ export const AttachmentHoverCardTrigger = ({ delay = 0, closeDelay = 0, ...props }) => (_jsx(HoverCardTrigger, { delay: delay, closeDelay: closeDelay, ...props }));
124
+ export const AttachmentHoverCardContent = ({ align = "start", className, ...props }) => (_jsx(HoverCardContent, { align: align, className: cn("w-auto p-2", className), ...props }));
125
+ export const AttachmentEmpty = ({ className, children, ...props }) => (_jsx("div", { className: cn("flex items-center justify-center p-4 text-muted-foreground text-sm", className), ...props, children: children ?? "No attachments" }));
@@ -0,0 +1,30 @@
1
+ import type { Experimental_SpeechResult as SpeechResult } from "ai";
2
+ import { MediaControlBar, MediaController, MediaDurationDisplay, MediaMuteButton, MediaPlayButton, MediaSeekBackwardButton, MediaSeekForwardButton, MediaTimeDisplay, MediaTimeRange, MediaVolumeRange } from "media-chrome/react";
3
+ import type { ComponentProps } from "react";
4
+ export type AudioPlayerProps = Omit<ComponentProps<typeof MediaController>, "audio">;
5
+ export declare const AudioPlayer: ({ children, style, ...props }: AudioPlayerProps) => import("react/jsx-runtime").JSX.Element;
6
+ export type AudioPlayerElementProps = Omit<ComponentProps<"audio">, "src"> & ({
7
+ data: SpeechResult["audio"];
8
+ } | {
9
+ src: string;
10
+ });
11
+ export declare const AudioPlayerElement: ({ ...props }: AudioPlayerElementProps) => import("react/jsx-runtime").JSX.Element;
12
+ export type AudioPlayerControlBarProps = ComponentProps<typeof MediaControlBar>;
13
+ export declare const AudioPlayerControlBar: ({ children, ...props }: AudioPlayerControlBarProps) => import("react/jsx-runtime").JSX.Element;
14
+ export type AudioPlayerPlayButtonProps = ComponentProps<typeof MediaPlayButton>;
15
+ export declare const AudioPlayerPlayButton: ({ className, ...props }: AudioPlayerPlayButtonProps) => import("react/jsx-runtime").JSX.Element;
16
+ export type AudioPlayerSeekBackwardButtonProps = ComponentProps<typeof MediaSeekBackwardButton>;
17
+ export declare const AudioPlayerSeekBackwardButton: ({ seekOffset, ...props }: AudioPlayerSeekBackwardButtonProps) => import("react/jsx-runtime").JSX.Element;
18
+ export type AudioPlayerSeekForwardButtonProps = ComponentProps<typeof MediaSeekForwardButton>;
19
+ export declare const AudioPlayerSeekForwardButton: ({ seekOffset, ...props }: AudioPlayerSeekForwardButtonProps) => import("react/jsx-runtime").JSX.Element;
20
+ export type AudioPlayerTimeDisplayProps = ComponentProps<typeof MediaTimeDisplay>;
21
+ export declare const AudioPlayerTimeDisplay: ({ className, ...props }: AudioPlayerTimeDisplayProps) => import("react/jsx-runtime").JSX.Element;
22
+ export type AudioPlayerTimeRangeProps = ComponentProps<typeof MediaTimeRange>;
23
+ export declare const AudioPlayerTimeRange: ({ className, ...props }: AudioPlayerTimeRangeProps) => import("react/jsx-runtime").JSX.Element;
24
+ export type AudioPlayerDurationDisplayProps = ComponentProps<typeof MediaDurationDisplay>;
25
+ export declare const AudioPlayerDurationDisplay: ({ className, ...props }: AudioPlayerDurationDisplayProps) => import("react/jsx-runtime").JSX.Element;
26
+ export type AudioPlayerMuteButtonProps = ComponentProps<typeof MediaMuteButton>;
27
+ export declare const AudioPlayerMuteButton: ({ className, ...props }: AudioPlayerMuteButtonProps) => import("react/jsx-runtime").JSX.Element;
28
+ export type AudioPlayerVolumeRangeProps = ComponentProps<typeof MediaVolumeRange>;
29
+ export declare const AudioPlayerVolumeRange: ({ className, ...props }: AudioPlayerVolumeRangeProps) => import("react/jsx-runtime").JSX.Element;
30
+ //# sourceMappingURL=audio-player.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audio-player.d.ts","sourceRoot":"","sources":["../../../src/molecules/ai/audio-player.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,yBAAyB,IAAI,YAAY,EAAE,MAAM,IAAI,CAAC;AACpE,OAAO,EACL,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,uBAAuB,EACvB,sBAAsB,EACtB,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,cAAc,EAAiB,MAAM,OAAO,CAAC;AAE3D,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,cAAc,CAAC,OAAO,eAAe,CAAC,EACtC,OAAO,CACR,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,+BAIzB,gBAAgB,4CAiClB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,GACxE,CACI;IACE,IAAI,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;CAC7B,GACD;IACE,GAAG,EAAE,MAAM,CAAC;CACb,CACJ,CAAC;AAEJ,eAAO,MAAM,kBAAkB,GAAI,cAAc,uBAAuB,4CAYvE,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,cAAc,CAAC,OAAO,eAAe,CAAC,CAAC;AAEhF,eAAO,MAAM,qBAAqB,GAAI,wBAGnC,0BAA0B,4CAI5B,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,cAAc,CAAC,OAAO,eAAe,CAAC,CAAC;AAEhF,eAAO,MAAM,qBAAqB,GAAI,yBAGnC,0BAA0B,4CAY5B,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAAG,cAAc,CAC7D,OAAO,uBAAuB,CAC/B,CAAC;AAEF,eAAO,MAAM,6BAA6B,GAAI,0BAG3C,kCAAkC,4CAYpC,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG,cAAc,CAC5D,OAAO,sBAAsB,CAC9B,CAAC;AAEF,eAAO,MAAM,4BAA4B,GAAI,0BAG1C,iCAAiC,4CAYnC,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,cAAc,CACtD,OAAO,gBAAgB,CACxB,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,yBAGpC,2BAA2B,4CAW7B,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,cAAc,CAAC,OAAO,cAAc,CAAC,CAAC;AAE9E,eAAO,MAAM,oBAAoB,GAAI,yBAGlC,yBAAyB,4CAW3B,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG,cAAc,CAC1D,OAAO,oBAAoB,CAC5B,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,yBAGxC,+BAA+B,4CAWjC,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,cAAc,CAAC,OAAO,eAAe,CAAC,CAAC;AAEhF,eAAO,MAAM,qBAAqB,GAAI,yBAGnC,0BAA0B,4CAW5B,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,cAAc,CACtD,OAAO,gBAAgB,CACxB,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,yBAGpC,2BAA2B,4CAW7B,CAAC"}
@@ -0,0 +1,43 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { Button } from "@chatsdk-dev/ui/atoms/button";
4
+ import { ButtonGroup, ButtonGroupText, } from "@chatsdk-dev/ui/atoms/button-group";
5
+ import { cn } from "@chatsdk-dev/ui/lib/utils";
6
+ import { MediaControlBar, MediaController, MediaDurationDisplay, MediaMuteButton, MediaPlayButton, MediaSeekBackwardButton, MediaSeekForwardButton, MediaTimeDisplay, MediaTimeRange, MediaVolumeRange, } from "media-chrome/react";
7
+ export const AudioPlayer = ({ children, style, ...props }) => (_jsx(MediaController, { audio: true, "data-slot": "audio-player", style: {
8
+ "--media-background-color": "transparent",
9
+ "--media-button-icon-height": "1rem",
10
+ "--media-button-icon-width": "1rem",
11
+ "--media-control-background": "transparent",
12
+ "--media-control-hover-background": "var(--color-accent)",
13
+ "--media-control-padding": "0",
14
+ "--media-font": "var(--font-sans)",
15
+ "--media-font-size": "10px",
16
+ "--media-icon-color": "currentColor",
17
+ "--media-preview-time-background": "var(--color-background)",
18
+ "--media-preview-time-border-radius": "var(--radius-md)",
19
+ "--media-preview-time-text-shadow": "none",
20
+ "--media-primary-color": "var(--color-primary)",
21
+ "--media-range-bar-color": "var(--color-primary)",
22
+ "--media-range-track-background": "var(--color-secondary)",
23
+ "--media-secondary-color": "var(--color-secondary)",
24
+ "--media-text-color": "var(--color-foreground)",
25
+ "--media-tooltip-arrow-display": "none",
26
+ "--media-tooltip-background": "var(--color-background)",
27
+ "--media-tooltip-border-radius": "var(--radius-md)",
28
+ ...style,
29
+ }, ...props, children: children }));
30
+ export const AudioPlayerElement = ({ ...props }) => (
31
+ // oxlint-disable-next-line eslint-plugin-jsx-a11y(media-has-caption) -- audio player captions are provided by consumer
32
+ _jsx("audio", { "data-slot": "audio-player-element", slot: "media", src: "src" in props
33
+ ? props.src
34
+ : `data:${props.data.mediaType};base64,${props.data.base64}`, ...props }));
35
+ export const AudioPlayerControlBar = ({ children, ...props }) => (_jsx(MediaControlBar, { "data-slot": "audio-player-control-bar", ...props, children: _jsx(ButtonGroup, { orientation: "horizontal", children: children }) }));
36
+ export const AudioPlayerPlayButton = ({ className, ...props }) => (_jsx(Button, { size: "icon", variant: "outline", render: () => (_jsx(MediaPlayButton, { className: cn("bg-transparent", className), "data-slot": "audio-player-play-button", ...props })) }));
37
+ export const AudioPlayerSeekBackwardButton = ({ seekOffset = 10, ...props }) => (_jsx(Button, { size: "icon", variant: "outline", render: () => (_jsx(MediaSeekBackwardButton, { "data-slot": "audio-player-seek-backward-button", seekOffset: seekOffset, ...props })) }));
38
+ export const AudioPlayerSeekForwardButton = ({ seekOffset = 10, ...props }) => (_jsx(Button, { size: "icon", variant: "outline", render: () => (_jsx(MediaSeekForwardButton, { "data-slot": "audio-player-seek-forward-button", seekOffset: seekOffset, ...props })) }));
39
+ export const AudioPlayerTimeDisplay = ({ className, ...props }) => (_jsx(ButtonGroupText, { className: "bg-transparent", render: () => (_jsx(MediaTimeDisplay, { className: cn("tabular-nums", className), "data-slot": "audio-player-time-display", ...props })) }));
40
+ export const AudioPlayerTimeRange = ({ className, ...props }) => (_jsx(ButtonGroupText, { className: "bg-transparent", render: () => (_jsx(MediaTimeRange, { className: cn("", className), "data-slot": "audio-player-time-range", ...props })) }));
41
+ export const AudioPlayerDurationDisplay = ({ className, ...props }) => (_jsx(ButtonGroupText, { className: "bg-transparent", render: () => (_jsx(MediaDurationDisplay, { className: cn("tabular-nums", className), "data-slot": "audio-player-duration-display", ...props })) }));
42
+ export const AudioPlayerMuteButton = ({ className, ...props }) => (_jsx(ButtonGroupText, { className: "bg-transparent", render: () => (_jsx(MediaMuteButton, { className: cn("", className), "data-slot": "audio-player-mute-button", ...props })) }));
43
+ export const AudioPlayerVolumeRange = ({ className, ...props }) => (_jsx(ButtonGroupText, { className: "bg-transparent", render: () => (_jsx(MediaVolumeRange, { className: cn("", className), "data-slot": "audio-player-volume-range", ...props })) }));
@@ -0,0 +1,9 @@
1
+ import type { ReactFlowProps } from "@xyflow/react";
2
+ import type { ReactNode } from "react";
3
+ import "@xyflow/react/dist/style.css";
4
+ type CanvasProps = ReactFlowProps & {
5
+ children?: ReactNode;
6
+ };
7
+ export declare const Canvas: ({ children, ...props }: CanvasProps) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=canvas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canvas.d.ts","sourceRoot":"","sources":["../../../src/molecules/ai/canvas.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,8BAA8B,CAAC;AAEtC,KAAK,WAAW,GAAG,cAAc,GAAG;IAClC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAIF,eAAO,MAAM,MAAM,GAAI,wBAAwB,WAAW,4CAazD,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Background, ReactFlow } from "@xyflow/react";
3
+ import "@xyflow/react/dist/style.css";
4
+ const deleteKeyCode = ["Backspace", "Delete"];
5
+ export const Canvas = ({ children, ...props }) => (_jsxs(ReactFlow, { deleteKeyCode: deleteKeyCode, fitView: true, panOnDrag: false, panOnScroll: true, selectionOnDrag: true, zoomOnDoubleClick: false, ...props, children: [_jsx(Background, { bgColor: "var(--sidebar)" }), children] }));
@@ -0,0 +1,30 @@
1
+ import { Badge } from "@chatsdk-dev/ui/atoms/badge";
2
+ import { CollapsibleContent, CollapsibleTrigger } from "@chatsdk-dev/ui/atoms/collapsible";
3
+ import type { LucideIcon } from "lucide-react";
4
+ import type { ComponentProps, ReactNode } from "react";
5
+ export type ChainOfThoughtProps = ComponentProps<"div"> & {
6
+ open?: boolean;
7
+ defaultOpen?: boolean;
8
+ onOpenChange?: (open: boolean) => void;
9
+ };
10
+ export declare const ChainOfThought: import("react").MemoExoticComponent<({ className, open, defaultOpen, onOpenChange, children, ...props }: ChainOfThoughtProps) => import("react/jsx-runtime").JSX.Element>;
11
+ export type ChainOfThoughtHeaderProps = ComponentProps<typeof CollapsibleTrigger>;
12
+ export declare const ChainOfThoughtHeader: import("react").MemoExoticComponent<({ className, children, ...props }: ChainOfThoughtHeaderProps) => import("react/jsx-runtime").JSX.Element>;
13
+ export type ChainOfThoughtStepProps = ComponentProps<"div"> & {
14
+ icon?: LucideIcon;
15
+ label: ReactNode;
16
+ description?: ReactNode;
17
+ status?: "complete" | "active" | "pending";
18
+ };
19
+ export declare const ChainOfThoughtStep: import("react").MemoExoticComponent<({ className, icon: Icon, label, description, status, children, ...props }: ChainOfThoughtStepProps) => import("react/jsx-runtime").JSX.Element>;
20
+ export type ChainOfThoughtSearchResultsProps = ComponentProps<"div">;
21
+ export declare const ChainOfThoughtSearchResults: import("react").MemoExoticComponent<({ className, ...props }: ChainOfThoughtSearchResultsProps) => import("react/jsx-runtime").JSX.Element>;
22
+ export type ChainOfThoughtSearchResultProps = ComponentProps<typeof Badge>;
23
+ export declare const ChainOfThoughtSearchResult: import("react").MemoExoticComponent<({ className, children, ...props }: ChainOfThoughtSearchResultProps) => import("react/jsx-runtime").JSX.Element>;
24
+ export type ChainOfThoughtContentProps = ComponentProps<typeof CollapsibleContent>;
25
+ export declare const ChainOfThoughtContent: import("react").MemoExoticComponent<({ className, children, ...props }: ChainOfThoughtContentProps) => import("react/jsx-runtime").JSX.Element>;
26
+ export type ChainOfThoughtImageProps = ComponentProps<"div"> & {
27
+ caption?: string;
28
+ };
29
+ export declare const ChainOfThoughtImage: import("react").MemoExoticComponent<({ className, children, caption, ...props }: ChainOfThoughtImageProps) => import("react/jsx-runtime").JSX.Element>;
30
+ //# sourceMappingURL=chain-of-thought.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chain-of-thought.d.ts","sourceRoot":"","sources":["../../../src/molecules/ai/chain-of-thought.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAEL,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAsBvD,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IACxD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF,eAAO,MAAM,cAAc,2GAQtB,mBAAmB,6CAoBvB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,cAAc,CACpD,OAAO,kBAAkB,CAC1B,CAAC;AAEF,eAAO,MAAM,oBAAoB,0EACK,yBAAyB,6CA0B9D,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IAC5D,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,MAAM,CAAC,EAAE,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAC;CAC5C,CAAC;AAQF,eAAO,MAAM,kBAAkB,kHAS1B,uBAAuB,6CAuB3B,CAAC;AAEF,MAAM,MAAM,gCAAgC,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAErE,eAAO,MAAM,2BAA2B,gEACZ,gCAAgC,6CAM3D,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG,cAAc,CAAC,OAAO,KAAK,CAAC,CAAC;AAE3E,eAAO,MAAM,0BAA0B,0EACD,+BAA+B,6CASpE,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,cAAc,CACrD,OAAO,kBAAkB,CAC1B,CAAC;AAEF,eAAO,MAAM,qBAAqB,0EACI,0BAA0B,6CAkB/D,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IAC7D,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,mBAAmB,mFACe,wBAAwB,6CAQtE,CAAC"}