veryfront 0.1.996 → 0.1.998

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 (380) hide show
  1. package/esm/cli/templates/manifest.js +1 -1
  2. package/esm/deno.d.ts +8 -0
  3. package/esm/deno.js +12 -3
  4. package/esm/deps/esm.sh/react-dom@19.2.4.d.ts +2 -0
  5. package/esm/deps/esm.sh/react-dom@19.2.4.d.ts.map +1 -0
  6. package/esm/deps/esm.sh/react-dom@19.2.4.js +3 -0
  7. package/esm/react/react-dom.d.ts +3 -0
  8. package/esm/react/react-dom.d.ts.map +1 -0
  9. package/esm/react/react-dom.js +2 -0
  10. package/esm/src/agent/ag-ui/host-support.d.ts.map +1 -1
  11. package/esm/src/agent/ag-ui/host-support.js +12 -0
  12. package/esm/src/agent/react/index.d.ts +4 -2
  13. package/esm/src/agent/react/index.d.ts.map +1 -1
  14. package/esm/src/agent/react/index.js +2 -1
  15. package/esm/src/agent/react/use-agent-metadata.d.ts +5 -0
  16. package/esm/src/agent/react/use-agent-metadata.d.ts.map +1 -1
  17. package/esm/src/agent/react/use-agent-metadata.js +18 -9
  18. package/esm/src/agent/react/use-agents.d.ts +33 -0
  19. package/esm/src/agent/react/use-agents.d.ts.map +1 -0
  20. package/esm/src/agent/react/use-agents.js +72 -0
  21. package/esm/src/agent/react/use-chat/index.d.ts +1 -1
  22. package/esm/src/agent/react/use-chat/index.d.ts.map +1 -1
  23. package/esm/src/agent/react/use-chat/types.d.ts +3 -2
  24. package/esm/src/agent/react/use-chat/types.d.ts.map +1 -1
  25. package/esm/src/agent/react/use-chat/use-chat.d.ts +12 -1
  26. package/esm/src/agent/react/use-chat/use-chat.d.ts.map +1 -1
  27. package/esm/src/agent/react/use-chat/use-chat.js +47 -7
  28. package/esm/src/agent/react/use-chat/utils.d.ts.map +1 -1
  29. package/esm/src/agent/react/use-chat/utils.js +4 -0
  30. package/esm/src/agent/runtime/message-adapter.d.ts.map +1 -1
  31. package/esm/src/agent/runtime/message-adapter.js +3 -1
  32. package/esm/src/agent/runtime/text-generation-runtime-message-converter.d.ts.map +1 -1
  33. package/esm/src/agent/runtime/text-generation-runtime-message-converter.js +6 -2
  34. package/esm/src/chat/index.d.ts +17 -7
  35. package/esm/src/chat/index.d.ts.map +1 -1
  36. package/esm/src/chat/index.js +33 -7
  37. package/esm/src/chat/protocol.d.ts +13 -1
  38. package/esm/src/chat/protocol.d.ts.map +1 -1
  39. package/esm/src/chat/upload-handler.d.ts +55 -0
  40. package/esm/src/chat/upload-handler.d.ts.map +1 -0
  41. package/esm/src/chat/upload-handler.js +180 -0
  42. package/esm/src/discovery/import-rewriter.d.ts +1 -1
  43. package/esm/src/discovery/import-rewriter.d.ts.map +1 -1
  44. package/esm/src/discovery/import-rewriter.js +2 -0
  45. package/esm/src/discovery/transpiler.d.ts.map +1 -1
  46. package/esm/src/discovery/transpiler.js +2 -0
  47. package/esm/src/react/components/chat/agent-card.d.ts +84 -11
  48. package/esm/src/react/components/chat/agent-card.d.ts.map +1 -1
  49. package/esm/src/react/components/chat/agent-card.js +151 -57
  50. package/esm/src/react/components/chat/agent-picker.d.ts +166 -0
  51. package/esm/src/react/components/chat/agent-picker.d.ts.map +1 -0
  52. package/esm/src/react/components/chat/agent-picker.js +183 -0
  53. package/esm/src/react/components/chat/chat/components/animations.js +1 -1
  54. package/esm/src/react/components/chat/chat/components/attachment-pill.d.ts +125 -3
  55. package/esm/src/react/components/chat/chat/components/attachment-pill.d.ts.map +1 -1
  56. package/esm/src/react/components/chat/chat/components/attachment-pill.js +209 -25
  57. package/esm/src/react/components/chat/chat/components/attachments-panel.d.ts +149 -0
  58. package/esm/src/react/components/chat/chat/components/attachments-panel.d.ts.map +1 -0
  59. package/esm/src/react/components/chat/chat/components/attachments-panel.js +187 -0
  60. package/esm/src/react/components/chat/chat/components/branch-picker.d.ts +13 -2
  61. package/esm/src/react/components/chat/chat/components/branch-picker.d.ts.map +1 -1
  62. package/esm/src/react/components/chat/chat/components/branch-picker.js +6 -8
  63. package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.d.ts +20 -0
  64. package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.d.ts.map +1 -0
  65. package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.js +31 -0
  66. package/esm/src/react/components/chat/chat/components/code-block.d.ts +9 -1
  67. package/esm/src/react/components/chat/chat/components/code-block.d.ts.map +1 -1
  68. package/esm/src/react/components/chat/chat/components/code-block.js +14 -6
  69. package/esm/src/react/components/chat/chat/components/drop-zone.d.ts +11 -4
  70. package/esm/src/react/components/chat/chat/components/drop-zone.d.ts.map +1 -1
  71. package/esm/src/react/components/chat/chat/components/drop-zone.js +10 -8
  72. package/esm/src/react/components/chat/chat/components/empty-state.d.ts +2 -1
  73. package/esm/src/react/components/chat/chat/components/empty-state.d.ts.map +1 -1
  74. package/esm/src/react/components/chat/chat/components/empty-state.js +7 -8
  75. package/esm/src/react/components/chat/chat/components/inference-badge.d.ts +6 -2
  76. package/esm/src/react/components/chat/chat/components/inference-badge.d.ts.map +1 -1
  77. package/esm/src/react/components/chat/chat/components/inference-badge.js +5 -4
  78. package/esm/src/react/components/chat/chat/components/inline-citation.d.ts +9 -1
  79. package/esm/src/react/components/chat/chat/components/inline-citation.d.ts.map +1 -1
  80. package/esm/src/react/components/chat/chat/components/inline-citation.js +19 -20
  81. package/esm/src/react/components/chat/chat/components/message-actions.d.ts +28 -5
  82. package/esm/src/react/components/chat/chat/components/message-actions.d.ts.map +1 -1
  83. package/esm/src/react/components/chat/chat/components/message-actions.js +24 -36
  84. package/esm/src/react/components/chat/chat/components/message-edit-form.d.ts +7 -2
  85. package/esm/src/react/components/chat/chat/components/message-edit-form.d.ts.map +1 -1
  86. package/esm/src/react/components/chat/chat/components/message-edit-form.js +5 -5
  87. package/esm/src/react/components/chat/chat/components/message-feedback.d.ts +11 -1
  88. package/esm/src/react/components/chat/chat/components/message-feedback.d.ts.map +1 -1
  89. package/esm/src/react/components/chat/chat/components/message-feedback.js +9 -11
  90. package/esm/src/react/components/chat/chat/components/quick-actions.d.ts.map +1 -1
  91. package/esm/src/react/components/chat/chat/components/quick-actions.js +3 -1
  92. package/esm/src/react/components/chat/chat/components/reasoning.d.ts +66 -3
  93. package/esm/src/react/components/chat/chat/components/reasoning.d.ts.map +1 -1
  94. package/esm/src/react/components/chat/chat/components/reasoning.js +95 -21
  95. package/esm/src/react/components/chat/chat/components/sidebar.d.ts +178 -12
  96. package/esm/src/react/components/chat/chat/components/sidebar.d.ts.map +1 -1
  97. package/esm/src/react/components/chat/chat/components/sidebar.js +228 -45
  98. package/esm/src/react/components/chat/chat/components/skill-badge.d.ts +6 -1
  99. package/esm/src/react/components/chat/chat/components/skill-badge.d.ts.map +1 -1
  100. package/esm/src/react/components/chat/chat/components/skill-badge.js +6 -5
  101. package/esm/src/react/components/chat/chat/components/skill-tool.d.ts +37 -0
  102. package/esm/src/react/components/chat/chat/components/skill-tool.d.ts.map +1 -0
  103. package/esm/src/react/components/chat/chat/components/skill-tool.js +46 -0
  104. package/esm/src/react/components/chat/chat/components/sources.d.ts +55 -3
  105. package/esm/src/react/components/chat/chat/components/sources.d.ts.map +1 -1
  106. package/esm/src/react/components/chat/chat/components/sources.js +50 -16
  107. package/esm/src/react/components/chat/chat/components/step-indicator.d.ts +42 -3
  108. package/esm/src/react/components/chat/chat/components/step-indicator.d.ts.map +1 -1
  109. package/esm/src/react/components/chat/chat/components/step-indicator.js +55 -12
  110. package/esm/src/react/components/chat/chat/components/tab-switcher.d.ts +1 -1
  111. package/esm/src/react/components/chat/chat/components/tab-switcher.d.ts.map +1 -1
  112. package/esm/src/react/components/chat/chat/components/tab-switcher.js +3 -3
  113. package/esm/src/react/components/chat/chat/components/tool-ui.d.ts +96 -3
  114. package/esm/src/react/components/chat/chat/components/tool-ui.d.ts.map +1 -1
  115. package/esm/src/react/components/chat/chat/components/tool-ui.js +158 -36
  116. package/esm/src/react/components/chat/chat/composition/api.d.ts +4 -2
  117. package/esm/src/react/components/chat/chat/composition/api.d.ts.map +1 -1
  118. package/esm/src/react/components/chat/chat/composition/api.js +4 -2
  119. package/esm/src/react/components/chat/chat/composition/chat-composer.d.ts +112 -5
  120. package/esm/src/react/components/chat/chat/composition/chat-composer.d.ts.map +1 -1
  121. package/esm/src/react/components/chat/chat/composition/chat-composer.js +251 -61
  122. package/esm/src/react/components/chat/chat/composition/chat-empty-state.d.ts +78 -0
  123. package/esm/src/react/components/chat/chat/composition/chat-empty-state.d.ts.map +1 -0
  124. package/esm/src/react/components/chat/chat/composition/chat-empty-state.js +63 -0
  125. package/esm/src/react/components/chat/chat/composition/chat-empty.d.ts +4 -1
  126. package/esm/src/react/components/chat/chat/composition/chat-empty.d.ts.map +1 -1
  127. package/esm/src/react/components/chat/chat/composition/chat-empty.js +11 -10
  128. package/esm/src/react/components/chat/chat/composition/chat-message-list.d.ts +11 -3
  129. package/esm/src/react/components/chat/chat/composition/chat-message-list.d.ts.map +1 -1
  130. package/esm/src/react/components/chat/chat/composition/chat-message-list.js +81 -111
  131. package/esm/src/react/components/chat/chat/composition/chat-root.d.ts +4 -0
  132. package/esm/src/react/components/chat/chat/composition/chat-root.d.ts.map +1 -1
  133. package/esm/src/react/components/chat/chat/composition/chat-root.js +3 -1
  134. package/esm/src/react/components/chat/chat/composition/error-banner.d.ts +4 -0
  135. package/esm/src/react/components/chat/chat/composition/error-banner.d.ts.map +1 -1
  136. package/esm/src/react/components/chat/chat/composition/error-banner.js +10 -7
  137. package/esm/src/react/components/chat/chat/composition/message.d.ts +123 -5
  138. package/esm/src/react/components/chat/chat/composition/message.d.ts.map +1 -1
  139. package/esm/src/react/components/chat/chat/composition/message.js +332 -53
  140. package/esm/src/react/components/chat/chat/composition/model-avatar.d.ts +6 -1
  141. package/esm/src/react/components/chat/chat/composition/model-avatar.d.ts.map +1 -1
  142. package/esm/src/react/components/chat/chat/composition/model-avatar.js +3 -4
  143. package/esm/src/react/components/chat/chat/composition/pending-message.d.ts +31 -0
  144. package/esm/src/react/components/chat/chat/composition/pending-message.d.ts.map +1 -0
  145. package/esm/src/react/components/chat/chat/composition/pending-message.js +31 -0
  146. package/esm/src/react/components/chat/chat/contexts/chat-context.d.ts +4 -0
  147. package/esm/src/react/components/chat/chat/contexts/chat-context.d.ts.map +1 -1
  148. package/esm/src/react/components/chat/chat/contexts/composer-context.d.ts +1 -0
  149. package/esm/src/react/components/chat/chat/contexts/composer-context.d.ts.map +1 -1
  150. package/esm/src/react/components/chat/chat/contexts/conversations-context.d.ts +29 -0
  151. package/esm/src/react/components/chat/chat/contexts/conversations-context.d.ts.map +1 -0
  152. package/esm/src/react/components/chat/chat/contexts/conversations-context.js +39 -0
  153. package/esm/src/react/components/chat/chat/contexts/index.d.ts +1 -1
  154. package/esm/src/react/components/chat/chat/contexts/index.d.ts.map +1 -1
  155. package/esm/src/react/components/chat/chat/contexts/index.js +1 -1
  156. package/esm/src/react/components/chat/chat/contexts/message-context.d.ts +2 -0
  157. package/esm/src/react/components/chat/chat/contexts/message-context.d.ts.map +1 -1
  158. package/esm/src/react/components/chat/chat/hooks/use-clipboard.d.ts +10 -0
  159. package/esm/src/react/components/chat/chat/hooks/use-clipboard.d.ts.map +1 -0
  160. package/esm/src/react/components/chat/chat/hooks/use-clipboard.js +34 -0
  161. package/esm/src/react/components/chat/chat/hooks/use-conversation.d.ts +21 -0
  162. package/esm/src/react/components/chat/chat/hooks/use-conversation.d.ts.map +1 -0
  163. package/esm/src/react/components/chat/chat/hooks/use-conversation.js +54 -0
  164. package/esm/src/react/components/chat/chat/hooks/use-conversations.d.ts +67 -0
  165. package/esm/src/react/components/chat/chat/hooks/use-conversations.d.ts.map +1 -0
  166. package/esm/src/react/components/chat/chat/hooks/use-conversations.js +317 -0
  167. package/esm/src/react/components/chat/chat/hooks/use-drop-zone.d.ts +27 -0
  168. package/esm/src/react/components/chat/chat/hooks/use-drop-zone.d.ts.map +1 -0
  169. package/esm/src/react/components/chat/chat/hooks/use-drop-zone.js +50 -0
  170. package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.d.ts +49 -0
  171. package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.d.ts.map +1 -0
  172. package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.js +120 -0
  173. package/esm/src/react/components/chat/chat/hooks/use-upload.d.ts +34 -0
  174. package/esm/src/react/components/chat/chat/hooks/use-upload.d.ts.map +1 -0
  175. package/esm/src/react/components/chat/chat/hooks/use-upload.js +147 -0
  176. package/esm/src/react/components/chat/chat/hooks/use-uploads-registry.d.ts +37 -0
  177. package/esm/src/react/components/chat/chat/hooks/use-uploads-registry.d.ts.map +1 -0
  178. package/esm/src/react/components/chat/chat/hooks/use-uploads-registry.js +178 -0
  179. package/esm/src/react/components/chat/chat/index.d.ts +171 -31
  180. package/esm/src/react/components/chat/chat/index.d.ts.map +1 -1
  181. package/esm/src/react/components/chat/chat/index.js +371 -77
  182. package/esm/src/react/components/chat/chat/persistence/conversation-store.d.ts +63 -0
  183. package/esm/src/react/components/chat/chat/persistence/conversation-store.d.ts.map +1 -0
  184. package/esm/src/react/components/chat/chat/persistence/conversation-store.js +1 -0
  185. package/esm/src/react/components/chat/chat/persistence/local-conversation-store.d.ts +13 -0
  186. package/esm/src/react/components/chat/chat/persistence/local-conversation-store.d.ts.map +1 -0
  187. package/esm/src/react/components/chat/chat/persistence/local-conversation-store.js +102 -0
  188. package/esm/src/react/components/chat/chat/persistence/memory-conversation-store.d.ts +11 -0
  189. package/esm/src/react/components/chat/chat/persistence/memory-conversation-store.d.ts.map +1 -0
  190. package/esm/src/react/components/chat/chat/persistence/memory-conversation-store.js +33 -0
  191. package/esm/src/react/components/chat/chat/utils/message-parts.d.ts +4 -1
  192. package/esm/src/react/components/chat/chat/utils/message-parts.d.ts.map +1 -1
  193. package/esm/src/react/components/chat/chat/utils/message-parts.js +4 -0
  194. package/esm/src/react/components/chat/chat-actions.d.ts +164 -0
  195. package/esm/src/react/components/chat/chat-actions.d.ts.map +1 -0
  196. package/esm/src/react/components/chat/chat-actions.js +191 -0
  197. package/esm/src/react/components/chat/chat-agent-picker.d.ts +50 -0
  198. package/esm/src/react/components/chat/chat-agent-picker.d.ts.map +1 -0
  199. package/esm/src/react/components/chat/chat-agent-picker.js +40 -0
  200. package/esm/src/react/components/chat/chat-theme-scope.d.ts +26 -0
  201. package/esm/src/react/components/chat/chat-theme-scope.d.ts.map +1 -0
  202. package/esm/src/react/components/chat/chat-theme-scope.js +27 -0
  203. package/esm/src/react/components/chat/chat-tokens-style.d.ts +21 -0
  204. package/esm/src/react/components/chat/chat-tokens-style.d.ts.map +1 -0
  205. package/esm/src/react/components/chat/chat-tokens-style.js +24 -0
  206. package/esm/src/react/components/chat/chat.d.ts +5 -5
  207. package/esm/src/react/components/chat/chat.d.ts.map +1 -1
  208. package/esm/src/react/components/chat/chat.js +5 -5
  209. package/esm/src/react/components/chat/color-mode.d.ts +46 -0
  210. package/esm/src/react/components/chat/color-mode.d.ts.map +1 -0
  211. package/esm/src/react/components/chat/color-mode.js +123 -0
  212. package/esm/src/react/components/chat/error-boundary.js +2 -2
  213. package/esm/src/react/components/chat/icons/index.d.ts +8 -0
  214. package/esm/src/react/components/chat/icons/index.d.ts.map +1 -1
  215. package/esm/src/react/components/chat/icons/index.js +64 -0
  216. package/esm/src/react/components/chat/markdown.d.ts +24 -1
  217. package/esm/src/react/components/chat/markdown.d.ts.map +1 -1
  218. package/esm/src/react/components/chat/markdown.js +122 -38
  219. package/esm/src/react/components/chat/model-selector.d.ts +130 -8
  220. package/esm/src/react/components/chat/model-selector.d.ts.map +1 -1
  221. package/esm/src/react/components/chat/model-selector.js +148 -121
  222. package/esm/src/react/components/chat/theme.d.ts +9 -12
  223. package/esm/src/react/components/chat/theme.d.ts.map +1 -1
  224. package/esm/src/react/components/chat/theme.js +149 -93
  225. package/esm/src/react/components/chat/ui/alert.d.ts +30 -0
  226. package/esm/src/react/components/chat/ui/alert.d.ts.map +1 -0
  227. package/esm/src/react/components/chat/ui/alert.js +35 -0
  228. package/esm/src/react/components/chat/ui/app-shell.d.ts +155 -0
  229. package/esm/src/react/components/chat/ui/app-shell.d.ts.map +1 -0
  230. package/esm/src/react/components/chat/ui/app-shell.js +276 -0
  231. package/esm/src/react/components/chat/ui/avatar.d.ts +24 -0
  232. package/esm/src/react/components/chat/ui/avatar.d.ts.map +1 -0
  233. package/esm/src/react/components/chat/ui/avatar.js +44 -0
  234. package/esm/src/react/components/chat/ui/badge.d.ts +24 -0
  235. package/esm/src/react/components/chat/ui/badge.d.ts.map +1 -0
  236. package/esm/src/react/components/chat/ui/badge.js +30 -0
  237. package/esm/src/react/components/chat/ui/button.d.ts +44 -0
  238. package/esm/src/react/components/chat/ui/button.d.ts.map +1 -0
  239. package/esm/src/react/components/chat/ui/button.js +108 -0
  240. package/esm/src/react/components/chat/ui/card.d.ts +42 -0
  241. package/esm/src/react/components/chat/ui/card.d.ts.map +1 -0
  242. package/esm/src/react/components/chat/ui/card.js +55 -0
  243. package/esm/src/react/components/chat/ui/checkbox.d.ts +28 -0
  244. package/esm/src/react/components/chat/ui/checkbox.d.ts.map +1 -0
  245. package/esm/src/react/components/chat/ui/checkbox.js +36 -0
  246. package/esm/src/react/components/chat/ui/code-block.d.ts +89 -0
  247. package/esm/src/react/components/chat/ui/code-block.d.ts.map +1 -0
  248. package/esm/src/react/components/chat/ui/code-block.js +277 -0
  249. package/esm/src/react/components/chat/ui/collapsible.d.ts +30 -0
  250. package/esm/src/react/components/chat/ui/collapsible.d.ts.map +1 -0
  251. package/esm/src/react/components/chat/ui/collapsible.js +44 -0
  252. package/esm/src/react/components/chat/ui/command.d.ts +65 -0
  253. package/esm/src/react/components/chat/ui/command.d.ts.map +1 -0
  254. package/esm/src/react/components/chat/ui/command.js +121 -0
  255. package/esm/src/react/components/chat/ui/cva.d.ts +36 -0
  256. package/esm/src/react/components/chat/ui/cva.d.ts.map +1 -0
  257. package/esm/src/react/components/chat/ui/cva.js +45 -0
  258. package/esm/src/react/components/chat/ui/dialog.d.ts +55 -0
  259. package/esm/src/react/components/chat/ui/dialog.d.ts.map +1 -0
  260. package/esm/src/react/components/chat/ui/dialog.js +116 -0
  261. package/esm/src/react/components/chat/ui/drawer.d.ts +41 -0
  262. package/esm/src/react/components/chat/ui/drawer.d.ts.map +1 -0
  263. package/esm/src/react/components/chat/ui/drawer.js +92 -0
  264. package/esm/src/react/components/chat/ui/dropdown-menu.d.ts +63 -0
  265. package/esm/src/react/components/chat/ui/dropdown-menu.d.ts.map +1 -0
  266. package/esm/src/react/components/chat/ui/dropdown-menu.js +76 -0
  267. package/esm/src/react/components/chat/ui/file-type.d.ts +26 -0
  268. package/esm/src/react/components/chat/ui/file-type.d.ts.map +1 -0
  269. package/esm/src/react/components/chat/ui/file-type.js +235 -0
  270. package/esm/src/react/components/chat/ui/floating.d.ts +29 -0
  271. package/esm/src/react/components/chat/ui/floating.d.ts.map +1 -0
  272. package/esm/src/react/components/chat/ui/floating.js +90 -0
  273. package/esm/src/react/components/chat/ui/icon-button.d.ts +19 -0
  274. package/esm/src/react/components/chat/ui/icon-button.d.ts.map +1 -0
  275. package/esm/src/react/components/chat/ui/icon-button.js +20 -0
  276. package/esm/src/react/components/chat/ui/index.d.ts +43 -0
  277. package/esm/src/react/components/chat/ui/index.d.ts.map +1 -0
  278. package/esm/src/react/components/chat/ui/index.js +42 -0
  279. package/esm/src/react/components/chat/ui/input.d.ts +27 -0
  280. package/esm/src/react/components/chat/ui/input.d.ts.map +1 -0
  281. package/esm/src/react/components/chat/ui/input.js +41 -0
  282. package/esm/src/react/components/chat/ui/label.d.ts +29 -0
  283. package/esm/src/react/components/chat/ui/label.d.ts.map +1 -0
  284. package/esm/src/react/components/chat/ui/label.js +40 -0
  285. package/esm/src/react/components/chat/ui/list.d.ts +47 -0
  286. package/esm/src/react/components/chat/ui/list.d.ts.map +1 -0
  287. package/esm/src/react/components/chat/ui/list.js +40 -0
  288. package/esm/src/react/components/chat/ui/pill.d.ts +26 -0
  289. package/esm/src/react/components/chat/ui/pill.d.ts.map +1 -0
  290. package/esm/src/react/components/chat/ui/pill.js +39 -0
  291. package/esm/src/react/components/chat/ui/popover.d.ts +47 -0
  292. package/esm/src/react/components/chat/ui/popover.d.ts.map +1 -0
  293. package/esm/src/react/components/chat/ui/popover.js +68 -0
  294. package/esm/src/react/components/chat/ui/progress-bar.d.ts +20 -0
  295. package/esm/src/react/components/chat/ui/progress-bar.d.ts.map +1 -0
  296. package/esm/src/react/components/chat/ui/progress-bar.js +31 -0
  297. package/esm/src/react/components/chat/ui/radio.d.ts +25 -0
  298. package/esm/src/react/components/chat/ui/radio.d.ts.map +1 -0
  299. package/esm/src/react/components/chat/ui/radio.js +29 -0
  300. package/esm/src/react/components/chat/ui/scroll-fade.d.ts +23 -0
  301. package/esm/src/react/components/chat/ui/scroll-fade.d.ts.map +1 -0
  302. package/esm/src/react/components/chat/ui/scroll-fade.js +40 -0
  303. package/esm/src/react/components/chat/ui/select.d.ts +64 -0
  304. package/esm/src/react/components/chat/ui/select.d.ts.map +1 -0
  305. package/esm/src/react/components/chat/ui/select.js +148 -0
  306. package/esm/src/react/components/chat/ui/shimmer.d.ts +25 -0
  307. package/esm/src/react/components/chat/ui/shimmer.d.ts.map +1 -0
  308. package/esm/src/react/components/chat/ui/shimmer.js +24 -0
  309. package/esm/src/react/components/chat/ui/skeleton.d.ts +14 -0
  310. package/esm/src/react/components/chat/ui/skeleton.d.ts.map +1 -0
  311. package/esm/src/react/components/chat/ui/skeleton.js +12 -0
  312. package/esm/src/react/components/chat/ui/slot.d.ts +21 -0
  313. package/esm/src/react/components/chat/ui/slot.d.ts.map +1 -0
  314. package/esm/src/react/components/chat/ui/slot.js +70 -0
  315. package/esm/src/react/components/chat/ui/status.d.ts +28 -0
  316. package/esm/src/react/components/chat/ui/status.d.ts.map +1 -0
  317. package/esm/src/react/components/chat/ui/status.js +23 -0
  318. package/esm/src/react/components/chat/ui/switch.d.ts +34 -0
  319. package/esm/src/react/components/chat/ui/switch.d.ts.map +1 -0
  320. package/esm/src/react/components/chat/ui/switch.js +58 -0
  321. package/esm/src/react/components/chat/ui/tabs.d.ts +44 -0
  322. package/esm/src/react/components/chat/ui/tabs.d.ts.map +1 -0
  323. package/esm/src/react/components/chat/ui/tabs.js +51 -0
  324. package/esm/src/react/components/chat/ui/tag.d.ts +22 -0
  325. package/esm/src/react/components/chat/ui/tag.d.ts.map +1 -0
  326. package/esm/src/react/components/chat/ui/tag.js +27 -0
  327. package/esm/src/react/components/chat/ui/textarea.d.ts +22 -0
  328. package/esm/src/react/components/chat/ui/textarea.d.ts.map +1 -0
  329. package/esm/src/react/components/chat/ui/textarea.js +35 -0
  330. package/esm/src/react/components/chat/ui/tooltip.d.ts +40 -0
  331. package/esm/src/react/components/chat/ui/tooltip.d.ts.map +1 -0
  332. package/esm/src/react/components/chat/ui/tooltip.js +132 -0
  333. package/esm/src/react/primitives/input-box.d.ts.map +1 -1
  334. package/esm/src/react/primitives/input-box.js +17 -4
  335. package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts.map +1 -1
  336. package/esm/src/server/handlers/dev/framework-candidates.generated.js +9437 -1064
  337. package/esm/src/server/handlers/dev/projects/html-shell.d.ts +1 -1
  338. package/esm/src/server/handlers/dev/projects/html-shell.d.ts.map +1 -1
  339. package/esm/src/server/handlers/dev/projects/html-shell.js +1 -12
  340. package/esm/src/server/handlers/request/public-agents-list.handler.d.ts +18 -0
  341. package/esm/src/server/handlers/request/public-agents-list.handler.d.ts.map +1 -0
  342. package/esm/src/server/handlers/request/public-agents-list.handler.js +44 -0
  343. package/esm/src/server/runtime-handler/index.d.ts +1 -1
  344. package/esm/src/server/runtime-handler/index.d.ts.map +1 -1
  345. package/esm/src/server/runtime-handler/index.js +3 -0
  346. package/esm/src/studio/bridge/bridge-bundle.generated.d.ts +1 -1
  347. package/esm/src/studio/bridge/bridge-bundle.generated.d.ts.map +1 -1
  348. package/esm/src/studio/bridge/bridge-bundle.generated.js +3 -2
  349. package/esm/src/task/discovery.d.ts +95 -0
  350. package/esm/src/task/discovery.d.ts.map +1 -0
  351. package/esm/src/task/discovery.js +192 -0
  352. package/esm/src/task/index.d.ts +27 -0
  353. package/esm/src/task/index.d.ts.map +1 -0
  354. package/esm/src/task/index.js +22 -0
  355. package/esm/src/utils/version-constant.d.ts +1 -1
  356. package/esm/src/utils/version-constant.js +1 -1
  357. package/esm/src/workflow/blob/local-storage.d.ts +32 -0
  358. package/esm/src/workflow/blob/local-storage.d.ts.map +1 -0
  359. package/esm/src/workflow/blob/local-storage.js +179 -0
  360. package/esm/src/workflow/blob/types.d.ts +5 -0
  361. package/esm/src/workflow/blob/types.d.ts.map +1 -1
  362. package/esm/src/workflow/blob/veryfront-cloud-storage.d.ts +11 -0
  363. package/esm/src/workflow/blob/veryfront-cloud-storage.d.ts.map +1 -1
  364. package/esm/src/workflow/blob/veryfront-cloud-storage.js +36 -0
  365. package/package.json +9 -1
  366. package/esm/src/react/components/chat/chat/components/uploads-panel.d.ts +0 -20
  367. package/esm/src/react/components/chat/chat/components/uploads-panel.d.ts.map +0 -1
  368. package/esm/src/react/components/chat/chat/components/uploads-panel.js +0 -49
  369. package/esm/src/react/components/chat/chat/contexts/thread-list-context.d.ts +0 -28
  370. package/esm/src/react/components/chat/chat/contexts/thread-list-context.d.ts.map +0 -1
  371. package/esm/src/react/components/chat/chat/contexts/thread-list-context.js +0 -27
  372. package/esm/src/react/components/chat/chat/hooks/use-threads.d.ts +0 -28
  373. package/esm/src/react/components/chat/chat/hooks/use-threads.d.ts.map +0 -1
  374. package/esm/src/react/components/chat/chat/hooks/use-threads.js +0 -151
  375. package/esm/src/react/components/chat/chat-with-sidebar.d.ts +0 -110
  376. package/esm/src/react/components/chat/chat-with-sidebar.d.ts.map +0 -1
  377. package/esm/src/react/components/chat/chat-with-sidebar.js +0 -167
  378. package/esm/src/react/components/chat/message.d.ts +0 -42
  379. package/esm/src/react/components/chat/message.d.ts.map +0 -1
  380. package/esm/src/react/components/chat/message.js +0 -69
@@ -0,0 +1,149 @@
1
+ import * as React from "../../../../../../react/react.js";
2
+ /** Public API contract for uploaded file. */
3
+ export interface UploadedFile {
4
+ id: string;
5
+ name: string;
6
+ size?: number;
7
+ type?: string;
8
+ url?: string;
9
+ }
10
+ /** Per-panel state shared with `AttachmentsPanel.*` sub-parts. */
11
+ export interface AttachmentsPanelContextValue {
12
+ uploads: UploadedFile[];
13
+ /** `true` while the initial list is loading; shows the placeholder state. */
14
+ loading?: boolean;
15
+ onRemoveUpload?: (id: string) => void;
16
+ onAttach?: (files: FileList) => void;
17
+ attachAccept?: string;
18
+ /** Dismisses the panel; enables the close button when set. */
19
+ onClose?: () => void;
20
+ /** Opens the native file picker (wired to the hidden input in `Root`). */
21
+ triggerAttach: () => void;
22
+ }
23
+ /**
24
+ * Read the enclosing `AttachmentsPanel` state. Throws when used outside an
25
+ * `AttachmentsPanel`.
26
+ */
27
+ export declare function useAttachmentsPanel(): AttachmentsPanelContextValue;
28
+ /** Props accepted by `AttachmentsPanel` / `AttachmentsPanel.Root`. */
29
+ export interface AttachmentsPanelProps {
30
+ uploads?: UploadedFile[];
31
+ /**
32
+ * `true` while the initial list is still loading. When set and there are no
33
+ * uploads yet, the panel shows the `Loading` placeholder instead of `Empty`.
34
+ */
35
+ loading?: boolean;
36
+ onRemoveUpload?: (id: string) => void;
37
+ onAttach?: (files: FileList) => void;
38
+ attachAccept?: string;
39
+ /** Called to dismiss the panel; renders the header close button when set. */
40
+ onClose?: () => void;
41
+ className?: string;
42
+ /** Compose your own panel; when omitted, the default anatomy is rendered. */
43
+ children?: React.ReactNode;
44
+ }
45
+ /** Props for `AttachmentsPanel.Header` — the title row + close button. */
46
+ export interface AttachmentsPanelHeaderProps {
47
+ className?: string;
48
+ /** Compose your own header; when omitted, the "Attachments" title + close. */
49
+ children?: React.ReactNode;
50
+ }
51
+ /**
52
+ * The panel header: an "Attachments" title with a close `Button` on the right.
53
+ * The close button only appears when `onClose` is set on the panel.
54
+ */
55
+ declare function AttachmentsPanelHeader({ className, children }: AttachmentsPanelHeaderProps): React.JSX.Element;
56
+ declare namespace AttachmentsPanelHeader {
57
+ var displayName: string;
58
+ }
59
+ /** Props for `AttachmentsPanel.List` — the scrollable list of file rows. */
60
+ export interface AttachmentsPanelListProps {
61
+ className?: string;
62
+ /** Compose your own rows; when omitted, one `AttachmentsPanel.Item` per upload. */
63
+ children?: React.ReactNode;
64
+ }
65
+ /**
66
+ * The attachment list — a flex-gap column of `AttachmentsPanel.Item` cards
67
+ * (one per upload) plus the "Upload files" `AttachmentsPanel.Action` underneath
68
+ * when `onAttach` is set.
69
+ */
70
+ declare function AttachmentsPanelList({ className, children }: AttachmentsPanelListProps): React.JSX.Element;
71
+ declare namespace AttachmentsPanelList {
72
+ var displayName: string;
73
+ }
74
+ /** Props accepted by an individual `AttachmentsPanel.Item` (attachment card). */
75
+ export interface AttachmentsPanelItemProps {
76
+ file: UploadedFile;
77
+ className?: string;
78
+ }
79
+ /**
80
+ * A single attachment row — the shared `Attachment` (`AttachmentPill`) card,
81
+ * stretched full-width. This *composes* `AttachmentPill` (rather than rendering
82
+ * its default anatomy) to swap the trailing remove (✕) for an overflow (⋯) menu
83
+ * with Open / Delete — a live test of how composable `Attachment` is.
84
+ */
85
+ declare function AttachmentsPanelItem({ file: doc, className }: AttachmentsPanelItemProps): React.JSX.Element;
86
+ declare namespace AttachmentsPanelItem {
87
+ var displayName: string;
88
+ }
89
+ /** Props for `AttachmentsPanel.Loading` — the initial-fetch placeholder. */
90
+ export interface AttachmentsPanelLoadingProps {
91
+ className?: string;
92
+ /** How many skeleton rows to render. Default `3`. */
93
+ count?: number;
94
+ }
95
+ /**
96
+ * The loading state: skeleton rows shaped like `AttachmentsPanel.Item` cards,
97
+ * shown while the initial list is fetched so the panel doesn't flash `Empty`.
98
+ */
99
+ declare function AttachmentsPanelLoading({ className, count }: AttachmentsPanelLoadingProps): React.JSX.Element;
100
+ declare namespace AttachmentsPanelLoading {
101
+ var displayName: string;
102
+ }
103
+ /** Props for `AttachmentsPanel.Empty` — the no-files state. */
104
+ export interface AttachmentsPanelEmptyProps {
105
+ className?: string;
106
+ /** Compose your own empty state; when omitted, the default copy + action. */
107
+ children?: React.ReactNode;
108
+ }
109
+ /** The empty state: heading, hint, and the upload `AttachmentsPanel.Action`. */
110
+ declare function AttachmentsPanelEmpty({ className, children }: AttachmentsPanelEmptyProps): React.JSX.Element;
111
+ declare namespace AttachmentsPanelEmpty {
112
+ var displayName: string;
113
+ }
114
+ /** Props for `AttachmentsPanel.Action` — the upload/attach button. */
115
+ export interface AttachmentsPanelActionProps {
116
+ /**
117
+ * Presentation only: `empty` is the pill button in the empty state, `more` is
118
+ * the centered "add more" button below the list. Both render a `<Button>`
119
+ * labelled "Upload files". Defaults to `empty`.
120
+ */
121
+ variant?: "empty" | "more";
122
+ className?: string;
123
+ /** Button contents; defaults to "Upload files". */
124
+ children?: React.ReactNode;
125
+ /** Called after opening the native picker. */
126
+ onClick?: () => void;
127
+ }
128
+ /** The upload/attach button. Opens the native file picker wired in `Root`. */
129
+ declare function AttachmentsPanelAction({ variant, className, children, onClick }: AttachmentsPanelActionProps): React.JSX.Element;
130
+ declare namespace AttachmentsPanelAction {
131
+ var displayName: string;
132
+ }
133
+ /**
134
+ * AttachmentsPanel — render `<AttachmentsPanel uploads={…} />` for the default panel, or
135
+ * compose `AttachmentsPanel.Root` + `List` / `Item` / `Empty` / `Action` for a
136
+ * custom layout. Mirrors the `ToolCall` / `Sources` compounds: render it, or
137
+ * compose it.
138
+ */
139
+ export declare const AttachmentsPanel: React.ForwardRefExoticComponent<AttachmentsPanelProps & React.RefAttributes<HTMLDivElement>> & {
140
+ Root: React.ForwardRefExoticComponent<AttachmentsPanelProps & React.RefAttributes<HTMLDivElement>>;
141
+ Header: typeof AttachmentsPanelHeader;
142
+ List: typeof AttachmentsPanelList;
143
+ Item: typeof AttachmentsPanelItem;
144
+ Loading: typeof AttachmentsPanelLoading;
145
+ Empty: typeof AttachmentsPanelEmpty;
146
+ Action: typeof AttachmentsPanelAction;
147
+ };
148
+ export {};
149
+ //# sourceMappingURL=attachments-panel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachments-panel.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/attachments-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAqB1D,6CAA6C;AAC7C,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAYD,kEAAkE;AAClE,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;IACrC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8DAA8D;IAC9D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,0EAA0E;IAC1E,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B;AAMD;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,4BAA4B,CAQlE;AAED,sEAAsE;AACtE,MAAM,WAAW,qBAAqB;IACpC,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;IACrC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAiFD,0EAA0E;AAC1E,MAAM,WAAW,2BAA2B;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;GAGG;AACH,iBAAS,sBAAsB,CAC7B,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,2BAA2B,GACnD,KAAK,CAAC,GAAG,CAAC,OAAO,CA4BnB;kBA9BQ,sBAAsB;;;AAiC/B,4EAA4E;AAC5E,MAAM,WAAW,yBAAyB;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mFAAmF;IACnF,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;GAIG;AACH,iBAAS,oBAAoB,CAC3B,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,yBAAyB,GACjD,KAAK,CAAC,GAAG,CAAC,OAAO,CAYnB;kBAdQ,oBAAoB;;;AAiB7B,iFAAiF;AACjF,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,YAAY,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,iBAAS,oBAAoB,CAC3B,EAAE,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,yBAAyB,GAClD,KAAK,CAAC,GAAG,CAAC,OAAO,CASnB;kBAXQ,oBAAoB;;;AAsE7B,4EAA4E;AAC5E,MAAM,WAAW,4BAA4B;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,iBAAS,uBAAuB,CAC9B,EAAE,SAAS,EAAE,KAAS,EAAE,EAAE,4BAA4B,GACrD,KAAK,CAAC,GAAG,CAAC,OAAO,CAuBnB;kBAzBQ,uBAAuB;;;AA4BhC,+DAA+D;AAC/D,MAAM,WAAW,0BAA0B;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,gFAAgF;AAChF,iBAAS,qBAAqB,CAC5B,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,0BAA0B,GAClD,KAAK,CAAC,GAAG,CAAC,OAAO,CA6BnB;kBA/BQ,qBAAqB;;;AAkC9B,sEAAsE;AACtE,MAAM,WAAW,2BAA2B;IAC1C;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,8CAA8C;IAC9C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,8EAA8E;AAC9E,iBAAS,sBAAsB,CAC7B,EAAE,OAAiB,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,2BAA2B,GAC/E,KAAK,CAAC,GAAG,CAAC,OAAO,CA2BnB;kBA7BQ,sBAAsB;;;AAgC/B;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;CAQ3B,CAAC"}
@@ -0,0 +1,187 @@
1
+ import * as React from "../../../../../../react/react.js";
2
+ import { cn } from "../../theme.js";
3
+ import { ChatTokens } from "../../chat-tokens-style.js";
4
+ import { FileTextIcon, MoreHorizontalIcon, PaperclipIcon, TrashIcon, XIcon, } from "../../icons/index.js";
5
+ import { Button } from "../../ui/button.js";
6
+ import { Skeleton } from "../../ui/skeleton.js";
7
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from "../../ui/dropdown-menu.js";
8
+ import { AttachmentPill, useAttachmentPill } from "./attachment-pill.js";
9
+ import { COMPONENT_ERROR } from "../../../../../errors/error-registry.js";
10
+ const AttachmentsPanelContext = React.createContext(null);
11
+ /**
12
+ * Read the enclosing `AttachmentsPanel` state. Throws when used outside an
13
+ * `AttachmentsPanel`.
14
+ */
15
+ export function useAttachmentsPanel() {
16
+ const ctx = React.useContext(AttachmentsPanelContext);
17
+ if (!ctx) {
18
+ throw COMPONENT_ERROR.create({
19
+ detail: "useAttachmentsPanel must be used within an AttachmentsPanel",
20
+ });
21
+ }
22
+ return ctx;
23
+ }
24
+ /**
25
+ * `AttachmentsPanel.Root` — context provider + the panel wrapper (scroll area +
26
+ * hidden file input). No children renders the default anatomy (`Empty` when the
27
+ * list is empty, otherwise `List`); pass children to recompose.
28
+ */
29
+ const AttachmentsPanelRoot = React.forwardRef(function AttachmentsPanel({ uploads = [], loading = false, onRemoveUpload, onAttach, attachAccept, onClose, className, children, }, ref) {
30
+ const fileInputRef = React.useRef(null);
31
+ const triggerAttach = () => fileInputRef.current?.click();
32
+ const context = {
33
+ uploads,
34
+ loading,
35
+ onRemoveUpload,
36
+ onAttach,
37
+ attachAccept,
38
+ onClose,
39
+ triggerAttach,
40
+ };
41
+ return (React.createElement(AttachmentsPanelContext.Provider, { value: context },
42
+ React.createElement(ChatTokens, null),
43
+ React.createElement("div", { ref: ref, "data-vf-chat": "", className: cn("flex flex-col h-full", className) },
44
+ children ?? (React.createElement(React.Fragment, null,
45
+ onClose && React.createElement(AttachmentsPanelHeader, null),
46
+ React.createElement("div", { className: "flex-1 overflow-y-auto px-4 py-4" }, uploads.length > 0
47
+ ? React.createElement(AttachmentsPanelList, null)
48
+ : loading
49
+ ? React.createElement(AttachmentsPanelLoading, null)
50
+ : React.createElement(AttachmentsPanelEmpty, null)))),
51
+ onAttach && (React.createElement("input", { ref: fileInputRef, type: "file", accept: attachAccept, multiple: true, "aria-label": "Upload file", onChange: (e) => {
52
+ if (e.target.files?.length)
53
+ onAttach(e.target.files);
54
+ e.target.value = "";
55
+ }, style: {
56
+ position: "absolute",
57
+ width: 1,
58
+ height: 1,
59
+ padding: 0,
60
+ margin: -1,
61
+ overflow: "hidden",
62
+ clip: "rect(0,0,0,0)",
63
+ whiteSpace: "nowrap",
64
+ border: 0,
65
+ } })))));
66
+ });
67
+ AttachmentsPanelRoot.displayName = "AttachmentsPanel.Root";
68
+ /**
69
+ * The panel header: an "Attachments" title with a close `Button` on the right.
70
+ * The close button only appears when `onClose` is set on the panel.
71
+ */
72
+ function AttachmentsPanelHeader({ className, children }) {
73
+ const { onClose } = useAttachmentsPanel();
74
+ return (React.createElement("div", { className: cn("flex shrink-0 items-center justify-between px-4 pt-4", className) }, children ?? (React.createElement(React.Fragment, null,
75
+ React.createElement("h2", { className: "text-sm font-medium text-[var(--foreground)]" }, "Attachments"),
76
+ onClose && (React.createElement(Button, { variant: "icon-ghost", size: "icon-sm", onClick: onClose, "aria-label": "Close attachments" },
77
+ React.createElement(XIcon, { className: "size-4" })))))));
78
+ }
79
+ AttachmentsPanelHeader.displayName = "AttachmentsPanel.Header";
80
+ /**
81
+ * The attachment list — a flex-gap column of `AttachmentsPanel.Item` cards
82
+ * (one per upload) plus the "Upload files" `AttachmentsPanel.Action` underneath
83
+ * when `onAttach` is set.
84
+ */
85
+ function AttachmentsPanelList({ className, children }) {
86
+ const { uploads, onAttach } = useAttachmentsPanel();
87
+ return (React.createElement("div", { className: cn("mx-auto flex max-w-2xl flex-col gap-2", className) }, children ?? (React.createElement(React.Fragment, null,
88
+ uploads.map((doc) => React.createElement(AttachmentsPanelItem, { key: doc.id, file: doc })),
89
+ onAttach && React.createElement(AttachmentsPanelAction, { variant: "more" })))));
90
+ }
91
+ AttachmentsPanelList.displayName = "AttachmentsPanel.List";
92
+ /**
93
+ * A single attachment row — the shared `Attachment` (`AttachmentPill`) card,
94
+ * stretched full-width. This *composes* `AttachmentPill` (rather than rendering
95
+ * its default anatomy) to swap the trailing remove (✕) for an overflow (⋯) menu
96
+ * with Open / Delete — a live test of how composable `Attachment` is.
97
+ */
98
+ function AttachmentsPanelItem({ file: doc, className }) {
99
+ return (
100
+ // Borderless rows here — the panel is a plain list, not a field of chips.
101
+ React.createElement(AttachmentPill, { attachment: doc, bordered: false, className: cn("w-full", className) },
102
+ React.createElement(AttachmentsPanelItemMedia, null),
103
+ React.createElement(AttachmentPill.Label, null),
104
+ React.createElement(AttachmentsPanelItemMenu, { file: doc })));
105
+ }
106
+ AttachmentsPanelItem.displayName = "AttachmentsPanel.Item";
107
+ /**
108
+ * The leading media square — reads the pill's derived state to show the image
109
+ * `Thumbnail` (image attachments) or the file-type `Icon`, matching the default
110
+ * anatomy's choice.
111
+ */
112
+ function AttachmentsPanelItemMedia() {
113
+ const { imageSrc, isError } = useAttachmentPill();
114
+ return imageSrc && !isError ? React.createElement(AttachmentPill.Thumbnail, null) : React.createElement(AttachmentPill.Icon, null);
115
+ }
116
+ /**
117
+ * The trailing overflow (⋯) menu — Open (when the file has a url) and Delete
118
+ * (when `onRemoveUpload` is set). Replaces the pill's default ✕ control.
119
+ */
120
+ function AttachmentsPanelItemMenu({ file }) {
121
+ const { onRemoveUpload } = useAttachmentsPanel();
122
+ const canOpen = Boolean(file.url);
123
+ if (!canOpen && !onRemoveUpload)
124
+ return null;
125
+ return (React.createElement(DropdownMenu, null,
126
+ React.createElement(DropdownMenuTrigger, { asChild: true },
127
+ React.createElement(Button, { variant: "icon-ghost", size: "icon-sm", on: "card", "aria-label": `Actions for ${file.name}`, className: "shrink-0" },
128
+ React.createElement(MoreHorizontalIcon, null))),
129
+ React.createElement(DropdownMenuContent, { align: "end" },
130
+ canOpen && (React.createElement(DropdownMenuItem, { onSelect: () => globalThis.open?.(file.url, "_blank", "noopener") },
131
+ React.createElement(FileTextIcon, null),
132
+ "Open")),
133
+ onRemoveUpload && (React.createElement(DropdownMenuItem, { onSelect: () => onRemoveUpload(file.id), className: "text-[var(--destructive)] focus:text-[var(--destructive)]" },
134
+ React.createElement(TrashIcon, null),
135
+ "Delete")))));
136
+ }
137
+ /**
138
+ * The loading state: skeleton rows shaped like `AttachmentsPanel.Item` cards,
139
+ * shown while the initial list is fetched so the panel doesn't flash `Empty`.
140
+ */
141
+ function AttachmentsPanelLoading({ className, count = 3 }) {
142
+ return (React.createElement("div", { className: cn("mx-auto flex max-w-2xl flex-col gap-2", className), "aria-busy": "true", "aria-live": "polite", "aria-label": "Loading files" }, Array.from({ length: count }, (_, i) => (React.createElement("div", { key: i, className: "flex w-full items-center gap-3 py-1" },
143
+ React.createElement(Skeleton, { className: "size-10 shrink-0 rounded-[var(--radius-sm)]" }),
144
+ React.createElement("div", { className: "flex min-w-0 flex-1 flex-col gap-1.5" },
145
+ React.createElement(Skeleton, { className: "h-3.5 w-1/2" }),
146
+ React.createElement(Skeleton, { className: "h-3 w-1/4" })))))));
147
+ }
148
+ AttachmentsPanelLoading.displayName = "AttachmentsPanel.Loading";
149
+ /** The empty state: heading, hint, and the upload `AttachmentsPanel.Action`. */
150
+ function AttachmentsPanelEmpty({ className, children }) {
151
+ const { onAttach } = useAttachmentsPanel();
152
+ return (React.createElement("div", { className: cn("flex flex-col items-center justify-center h-full text-center", className) }, children ?? (React.createElement(React.Fragment, null,
153
+ React.createElement("div", { className: "mb-4 flex size-14 items-center justify-center rounded-full bg-[var(--secondary)] text-[var(--faint)]" },
154
+ React.createElement(PaperclipIcon, { className: "size-6" })),
155
+ React.createElement("h1", { className: "text-base font-medium text-[var(--foreground)]" }, "No files uploaded"),
156
+ React.createElement("p", { className: "mt-1 max-w-xs text-sm leading-6 text-[var(--faint)]" }, "Upload files to start asking questions about them"),
157
+ onAttach && (React.createElement(AttachmentsPanelAction, { variant: "empty" }, "Upload files"))))));
158
+ }
159
+ AttachmentsPanelEmpty.displayName = "AttachmentsPanel.Empty";
160
+ /** The upload/attach button. Opens the native file picker wired in `Root`. */
161
+ function AttachmentsPanelAction({ variant = "empty", className, children, onClick }) {
162
+ const { triggerAttach } = useAttachmentsPanel();
163
+ const handleClick = () => {
164
+ triggerAttach();
165
+ onClick?.();
166
+ };
167
+ return variant === "more"
168
+ ? (React.createElement("div", { className: "flex justify-center pt-2" },
169
+ React.createElement(Button, { variant: "primary", onClick: handleClick, className: cn("shadow-sm", className) }, children ?? "Upload files")))
170
+ : (React.createElement(Button, { variant: "primary", onClick: handleClick, className: cn("mt-4 shadow-sm", className) }, children ?? "Upload files"));
171
+ }
172
+ AttachmentsPanelAction.displayName = "AttachmentsPanel.Action";
173
+ /**
174
+ * AttachmentsPanel — render `<AttachmentsPanel uploads={…} />` for the default panel, or
175
+ * compose `AttachmentsPanel.Root` + `List` / `Item` / `Empty` / `Action` for a
176
+ * custom layout. Mirrors the `ToolCall` / `Sources` compounds: render it, or
177
+ * compose it.
178
+ */
179
+ export const AttachmentsPanel = Object.assign(AttachmentsPanelRoot, {
180
+ Root: AttachmentsPanelRoot,
181
+ Header: AttachmentsPanelHeader,
182
+ List: AttachmentsPanelList,
183
+ Item: AttachmentsPanelItem,
184
+ Loading: AttachmentsPanelLoading,
185
+ Empty: AttachmentsPanelEmpty,
186
+ Action: AttachmentsPanelAction,
187
+ });
@@ -1,11 +1,22 @@
1
1
  import * as React from "../../../../../../react/react.js";
2
+ /**
3
+ * Icon overrides for {@link BranchPicker}. Each defaults to the built-in
4
+ * chevron glyph.
5
+ */
6
+ export interface BranchPickerIcons {
7
+ prev?: React.ReactNode;
8
+ next?: React.ReactNode;
9
+ }
2
10
  /** Props accepted by branch picker. */
3
- export interface BranchPickerProps {
11
+ export interface BranchPickerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onClick" | "className"> {
4
12
  current: number;
5
13
  total: number;
6
14
  onPrev: () => void;
7
15
  onNext: () => void;
16
+ className?: string;
17
+ /** Override either of the chevron icons. */
18
+ icons?: BranchPickerIcons;
8
19
  }
9
20
  /** Render branch picker. */
10
- export declare function BranchPicker({ current, total, onPrev, onNext, }: BranchPickerProps): React.ReactElement | null;
21
+ export declare function BranchPicker({ current, total, onPrev, onNext, className, icons, ...props }: BranchPickerProps): React.ReactElement | null;
11
22
  //# sourceMappingURL=branch-picker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"branch-picker.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/branch-picker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAG1D,uCAAuC;AACvC,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,4BAA4B;AAC5B,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,KAAK,EACL,MAAM,EACN,MAAM,GACP,EAAE,iBAAiB,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAsD/C"}
1
+ {"version":3,"file":"branch-picker.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/branch-picker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAG1D;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAED,uCAAuC;AACvC,MAAM,WAAW,iBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IAC3E,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,iBAAiB,CAAC;CAC3B;AAED,4BAA4B;AAC5B,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,KAAK,EACL,MAAM,EACN,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,iBAAiB,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAgE/C"}
@@ -1,18 +1,16 @@
1
1
  import * as React from "../../../../../../react/react.js";
2
2
  import { cn } from "../../theme.js";
3
3
  /** Render branch picker. */
4
- export function BranchPicker({ current, total, onPrev, onNext, }) {
4
+ export function BranchPicker({ current, total, onPrev, onNext, className, icons, ...props }) {
5
5
  if (total <= 1)
6
6
  return null;
7
- return (React.createElement("div", { className: "inline-flex items-center gap-1 text-xs text-[var(--input-placeholder)]" },
8
- React.createElement("button", { type: "button", onClick: onPrev, disabled: current <= 1, className: cn("size-5 flex items-center justify-center rounded-full transition-all", "hover:bg-[var(--foreground)]/5", "disabled:opacity-50 disabled:pointer-events-none"), "aria-label": "Previous variant" },
9
- React.createElement("svg", { className: "size-3", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" },
10
- React.createElement("polyline", { points: "15 18 9 12 15 6" }))),
7
+ return (React.createElement("div", { ...props, className: cn("inline-flex items-center gap-1 text-xs text-[var(--faint)]", className) },
8
+ React.createElement("button", { type: "button", onClick: onPrev, disabled: current <= 1, className: cn("size-5 flex items-center justify-center rounded-full transition-all", "hover:bg-[var(--foreground)]/5", "disabled:opacity-50 disabled:pointer-events-none"), "aria-label": "Previous variant" }, icons?.prev ?? (React.createElement("svg", { className: "size-3", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" },
9
+ React.createElement("polyline", { points: "15 18 9 12 15 6" })))),
11
10
  React.createElement("span", { className: "tabular-nums min-w-[2ch] text-center" },
12
11
  current,
13
12
  "/",
14
13
  total),
15
- React.createElement("button", { type: "button", onClick: onNext, disabled: current >= total, className: cn("size-5 flex items-center justify-center rounded-full transition-all", "hover:bg-[var(--foreground)]/5", "disabled:opacity-50 disabled:pointer-events-none"), "aria-label": "Next variant" },
16
- React.createElement("svg", { className: "size-3", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" },
17
- React.createElement("polyline", { points: "9 18 15 12 9 6" })))));
14
+ React.createElement("button", { type: "button", onClick: onNext, disabled: current >= total, className: cn("size-5 flex items-center justify-center rounded-full transition-all", "hover:bg-[var(--foreground)]/5", "disabled:opacity-50 disabled:pointer-events-none"), "aria-label": "Next variant" }, icons?.next ?? (React.createElement("svg", { className: "size-3", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" },
15
+ React.createElement("polyline", { points: "9 18 15 12 9 6" }))))));
18
16
  }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * ChatMessagesSkeleton — loading placeholder for a chat thread that is still
3
+ * fetching its history. Ported 1:1 from Studio's `ChatMessagesSkeleton`:
4
+ * alternating user (right-aligned bubble) and assistant (avatar + name + text
5
+ * lines) skeleton rows, at the same `max-w-[850px]` column as the real list.
6
+ * Wrapped in an `aria-busy` `<output>` for assistive tech.
7
+ *
8
+ * @module react/components/chat/components/chat-messages-skeleton
9
+ */
10
+ import * as React from "../../../../../../react/react.js";
11
+ /** Props accepted by `<ChatMessagesSkeleton>`. */
12
+ export interface ChatMessagesSkeletonProps {
13
+ className?: string;
14
+ }
15
+ /** Render the loading skeleton for a chat thread. */
16
+ export declare function ChatMessagesSkeleton({ className }: ChatMessagesSkeletonProps): React.ReactElement;
17
+ export declare namespace ChatMessagesSkeleton {
18
+ var displayName: string;
19
+ }
20
+ //# sourceMappingURL=chat-messages-skeleton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-messages-skeleton.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/chat-messages-skeleton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAyB1D,kDAAkD;AAClD,MAAM,WAAW,yBAAyB;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qDAAqD;AACrD,wBAAgB,oBAAoB,CAClC,EAAE,SAAS,EAAE,EAAE,yBAAyB,GACvC,KAAK,CAAC,YAAY,CAmBpB;yBArBe,oBAAoB"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * ChatMessagesSkeleton — loading placeholder for a chat thread that is still
3
+ * fetching its history. Ported 1:1 from Studio's `ChatMessagesSkeleton`:
4
+ * alternating user (right-aligned bubble) and assistant (avatar + name + text
5
+ * lines) skeleton rows, at the same `max-w-[850px]` column as the real list.
6
+ * Wrapped in an `aria-busy` `<output>` for assistive tech.
7
+ *
8
+ * @module react/components/chat/components/chat-messages-skeleton
9
+ */
10
+ import * as React from "../../../../../../react/react.js";
11
+ import { cn } from "../../theme.js";
12
+ import { Skeleton } from "../../ui/skeleton.js";
13
+ /** An assistant skeleton row: avatar + name, then a few text lines. */
14
+ function AssistantSkeletonRow({ lines }) {
15
+ return (React.createElement("div", { className: "flex flex-col gap-2" },
16
+ React.createElement("div", { className: "flex items-center gap-2" },
17
+ React.createElement(Skeleton, { className: "size-8! rounded-full! bg-[var(--edge)]!" }),
18
+ React.createElement(Skeleton, { className: "h-3! w-28! bg-[var(--edge)]!" })),
19
+ React.createElement("div", { className: "flex flex-col gap-2" }, lines.map((w, i) => React.createElement(Skeleton, { key: i, className: cn("h-3!", w) })))));
20
+ }
21
+ /** Render the loading skeleton for a chat thread. */
22
+ export function ChatMessagesSkeleton({ className }) {
23
+ return (React.createElement("output", { "aria-busy": "true", className: cn("flex-1 min-h-0 overflow-hidden", className) },
24
+ React.createElement("div", { className: "py-6 w-full max-w-[850px] mx-auto px-9 flex flex-col gap-5" },
25
+ React.createElement(Skeleton, { className: "h-8! w-48! self-end rounded-lg! rounded-br-sm! bg-[var(--tint)]!" }),
26
+ React.createElement(AssistantSkeletonRow, { lines: ["w-full!", "w-5/6!", "w-3/4!"] }),
27
+ React.createElement(Skeleton, { className: "h-8! w-36! self-end rounded-lg! rounded-br-sm! bg-[var(--tint)]!" }),
28
+ React.createElement(AssistantSkeletonRow, { lines: ["w-full!", "w-4/6!"] })),
29
+ React.createElement("span", { className: "sr-only" }, "Loading messages...")));
30
+ }
31
+ ChatMessagesSkeleton.displayName = "ChatMessagesSkeleton";
@@ -6,6 +6,14 @@ export interface CodeBlockProps {
6
6
  inline?: boolean;
7
7
  className?: string;
8
8
  }
9
- /** Render rich code block. */
9
+ /**
10
+ * Render rich code block.
11
+ *
12
+ * @deprecated Use the shared `CodeBlock` primitive (`chat/ui/code-block.tsx`)
13
+ * instead — it does real shiki syntax highlighting, an icon-only copy button
14
+ * with tooltip, a file-type/language label, collapsible + mermaid support. This
15
+ * plain `<pre>` fork (no highlighting) is kept only for back-compat and will be
16
+ * removed. `Markdown` already renders fenced blocks through `CodeBlock`.
17
+ */
10
18
  export declare const RichCodeBlock: React.ForwardRefExoticComponent<CodeBlockProps & React.RefAttributes<HTMLDivElement>>;
11
19
  //# sourceMappingURL=code-block.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"code-block.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/code-block.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAI1D,oCAAoC;AACpC,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,8BAA8B;AAC9B,eAAO,MAAM,aAAa,uFAqEzB,CAAC"}
1
+ {"version":3,"file":"code-block.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/code-block.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAI1D,oCAAoC;AACpC,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,uFAqEzB,CAAC"}
@@ -1,7 +1,15 @@
1
1
  import * as React from "../../../../../../react/react.js";
2
2
  import { cn } from "../../theme.js";
3
3
  import { CheckIcon, CopyIcon } from "../../icons/index.js";
4
- /** Render rich code block. */
4
+ /**
5
+ * Render rich code block.
6
+ *
7
+ * @deprecated Use the shared `CodeBlock` primitive (`chat/ui/code-block.tsx`)
8
+ * instead — it does real shiki syntax highlighting, an icon-only copy button
9
+ * with tooltip, a file-type/language label, collapsible + mermaid support. This
10
+ * plain `<pre>` fork (no highlighting) is kept only for back-compat and will be
11
+ * removed. `Markdown` already renders fenced blocks through `CodeBlock`.
12
+ */
5
13
  export const RichCodeBlock = React.forwardRef(function RichCodeBlock({ language, code, inline, className }, ref) {
6
14
  const [copied, setCopied] = React.useState(false);
7
15
  const handleCopy = React.useCallback(async () => {
@@ -21,19 +29,19 @@ export const RichCodeBlock = React.forwardRef(function RichCodeBlock({ language,
21
29
  globalThis.setTimeout(() => setCopied(false), 2000);
22
30
  }, [code]);
23
31
  if (inline) {
24
- return (React.createElement("code", { className: cn("bg-[var(--accent)] px-1.5 py-0.5 rounded text-sm font-mono", className) }, code));
32
+ return (React.createElement("code", { className: cn("rounded-[var(--radius-xs)] bg-[var(--accent)] px-1 py-0.5 font-mono text-sm font-medium", className) }, code));
25
33
  }
26
- return (React.createElement("div", { ref: ref, className: cn("my-4 rounded-xl overflow-hidden border border-[var(--border)]", className) },
27
- React.createElement("div", { className: "flex items-center justify-between px-4 py-2 text-[var(--muted-foreground)] text-xs" },
34
+ return (React.createElement("div", { ref: ref, className: cn("my-4 overflow-hidden rounded-[var(--radius-lg)] border border-[var(--edge)]", className) },
35
+ React.createElement("div", { className: "flex items-center justify-between px-4 py-2 text-xs text-[var(--faint)]" },
28
36
  React.createElement("span", { className: "font-mono font-medium" }, language || "text"),
29
- React.createElement("button", { type: "button", onClick: handleCopy, className: "inline-flex items-center gap-1.5 text-[var(--input-placeholder)] hover:text-[var(--foreground)] transition-colors" }, copied
37
+ React.createElement("button", { type: "button", onClick: handleCopy, className: "inline-flex items-center gap-1.5 text-[var(--faint)] transition-colors hover:text-[var(--foreground)]" }, copied
30
38
  ? (React.createElement(React.Fragment, null,
31
39
  React.createElement(CheckIcon, { className: "size-3.5" }),
32
40
  React.createElement("span", null, "Copied")))
33
41
  : (React.createElement(React.Fragment, null,
34
42
  React.createElement(CopyIcon, { className: "size-3.5" }),
35
43
  React.createElement("span", null, "Copy"))))),
36
- React.createElement("pre", { className: "p-4 text-[var(--foreground)] bg-[var(--accent)] overflow-auto text-sm [&_.hljs]:bg-transparent [&_.hljs]:p-0" },
44
+ React.createElement("pre", { className: "overflow-auto bg-[var(--secondary)] p-4 text-sm text-[var(--foreground)] [&_.hljs]:bg-transparent [&_.hljs]:p-0" },
37
45
  React.createElement("code", { className: language ? `language-${language}` : undefined }, code))));
38
46
  });
39
47
  RichCodeBlock.displayName = "RichCodeBlock";
@@ -1,9 +1,16 @@
1
1
  import * as React from "../../../../../../react/react.js";
2
2
  /** Props accepted by drop zone overlay. */
3
- export interface DropZoneOverlayProps {
3
+ export interface DropZoneOverlayProps extends React.HTMLAttributes<HTMLDivElement> {
4
4
  visible: boolean;
5
- accept?: string;
5
+ /** Override the upload glyph. */
6
+ icon?: React.ReactNode;
7
+ /** Override the prompt label. Defaults to "Drop files". */
8
+ label?: string;
6
9
  }
7
- /** Render drop zone overlay. */
8
- export declare function DropZoneOverlay({ visible, accept, }: DropZoneOverlayProps): React.ReactElement | null;
10
+ /**
11
+ * Drag overlay shown over the composer while files are dragged onto it — the
12
+ * glyph-in-a-circle + "Drop files" from Studio's `PromptForm`. Rendered inside
13
+ * a `relative` card; fills it and blurs the content behind.
14
+ */
15
+ export declare function DropZoneOverlay({ visible, icon, label, className, ...props }: DropZoneOverlayProps): React.ReactElement | null;
9
16
  //# sourceMappingURL=drop-zone.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"drop-zone.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/drop-zone.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAG1D,2CAA2C;AAC3C,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,gCAAgC;AAChC,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,MAAM,GACP,EAAE,oBAAoB,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAqClD"}
1
+ {"version":3,"file":"drop-zone.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/drop-zone.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAG1D,2CAA2C;AAC3C,MAAM,WAAW,oBAAqB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAChF,OAAO,EAAE,OAAO,CAAC;IACjB,iCAAiC;IACjC,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,2DAA2D;IAC3D,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,IAAI,EACJ,KAAoB,EACpB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,oBAAoB,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAgClD"}
@@ -1,15 +1,17 @@
1
1
  import * as React from "../../../../../../react/react.js";
2
2
  import { cn } from "../../theme.js";
3
- /** Render drop zone overlay. */
4
- export function DropZoneOverlay({ visible, accept, }) {
3
+ /**
4
+ * Drag overlay shown over the composer while files are dragged onto it — the
5
+ * glyph-in-a-circle + "Drop files" from Studio's `PromptForm`. Rendered inside
6
+ * a `relative` card; fills it and blurs the content behind.
7
+ */
8
+ export function DropZoneOverlay({ visible, icon, label = "Drop files", className, ...props }) {
5
9
  if (!visible)
6
10
  return null;
7
- return (React.createElement("div", { className: cn("absolute inset-0 z-50 flex flex-col items-center justify-center gap-3", "bg-[var(--background)]/80 backdrop-blur-sm", "border-2 border-dashed border-[var(--success)] rounded-2xl", "pointer-events-none") },
8
- React.createElement("svg", { className: "size-10 text-[var(--success)]", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" },
11
+ return (React.createElement("div", { ...props, className: cn("pointer-events-none absolute inset-0 z-10 flex flex-col items-center justify-center gap-1.5", "rounded-[var(--radius-lg)] bg-[var(--secondary)] backdrop-blur-sm", className) },
12
+ React.createElement("div", { className: "flex size-10 items-center justify-center rounded-full bg-[var(--accent)]" }, icon ?? (React.createElement("svg", { className: "size-4 text-[var(--foreground)]", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" },
9
13
  React.createElement("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
10
14
  React.createElement("polyline", { points: "17 8 12 3 7 8" }),
11
- React.createElement("line", { x1: "12", y1: "3", x2: "12", y2: "15" })),
12
- React.createElement("div", { className: "text-center" },
13
- React.createElement("p", { className: "text-sm font-medium text-[var(--card-foreground)]" }, "Drop files here"),
14
- accept && (React.createElement("p", { className: "text-xs text-[var(--muted-foreground)] mt-1" }, accept.replace(/\./g, "").toUpperCase().replace(/,/g, ", "))))));
15
+ React.createElement("line", { x1: "12", y1: "3", x2: "12", y2: "15" })))),
16
+ React.createElement("p", { className: "text-sm text-[var(--foreground)]" }, label)));
15
17
  }
@@ -31,7 +31,8 @@ export interface ConversationScrollButtonProps {
31
31
  onClick?: () => void;
32
32
  visible?: boolean;
33
33
  className?: string;
34
+ icon?: React.ReactNode;
34
35
  }
35
36
  /** Render conversation scroll button. */
36
- export declare function ConversationScrollButton({ onClick, visible, className, }: ConversationScrollButtonProps): React.ReactElement | null;
37
+ export declare function ConversationScrollButton({ onClick, visible, className, icon, }: ConversationScrollButtonProps): React.ReactElement | null;
37
38
  //# sourceMappingURL=empty-state.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"empty-state.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/empty-state.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAI1D,oCAAoC;AACpC,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAED,yBAAyB;AACzB,wBAAgB,UAAU,CAAC,EACzB,UAAU,EACV,OAAO,EACP,SAAS,EACT,IAAI,GACL,EAAE,eAAe,GAAG,KAAK,CAAC,YAAY,CAoBtC;AAED,qCAAqC;AACrC,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;CAChC;AAED,0BAA0B;AAC1B,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,SAAS,EACT,MAAe,GAChB,EAAE,gBAAgB,GAAG,KAAK,CAAC,YAAY,CAMvC;AAED,kDAAkD;AAClD,MAAM,WAAW,2BAA2B;IAC1C,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,oCAAoC;AACpC,wBAAgB,sBAAsB,CAAC,EACrC,IAAI,EACJ,KAA+B,EAC/B,WAAW,EACX,QAAQ,EACR,SAAS,GACV,EAAE,2BAA2B,GAAG,KAAK,CAAC,YAAY,CAuBlD;AAED,oDAAoD;AACpD,MAAM,WAAW,6BAA6B;IAC5C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,yCAAyC;AACzC,wBAAgB,wBAAwB,CAAC,EACvC,OAAO,EACP,OAAc,EACd,SAAS,GACV,EAAE,6BAA6B,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAe3D"}
1
+ {"version":3,"file":"empty-state.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/components/empty-state.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAI1D,oCAAoC;AACpC,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAED,yBAAyB;AACzB,wBAAgB,UAAU,CAAC,EACzB,UAAU,EACV,OAAO,EACP,SAAS,EACT,IAAI,GACL,EAAE,eAAe,GAAG,KAAK,CAAC,YAAY,CAoBtC;AAED,qCAAqC;AACrC,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;CAChC;AAED,0BAA0B;AAC1B,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,SAAS,EACT,MAAe,GAChB,EAAE,gBAAgB,GAAG,KAAK,CAAC,YAAY,CAMvC;AAED,kDAAkD;AAClD,MAAM,WAAW,2BAA2B;IAC1C,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,oCAAoC;AACpC,wBAAgB,sBAAsB,CAAC,EACrC,IAAI,EACJ,KAA+B,EAC/B,WAAW,EACX,QAAQ,EACR,SAAS,GACV,EAAE,2BAA2B,GAAG,KAAK,CAAC,YAAY,CA4BlD;AAED,oDAAoD;AACpD,MAAM,WAAW,6BAA6B;IAC5C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAED,yCAAyC;AACzC,wBAAgB,wBAAwB,CAAC,EACvC,OAAO,EACP,OAAc,EACd,SAAS,EACT,IAAI,GACL,EAAE,6BAA6B,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAgB3D"}