veryfront 0.1.997 → 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 (374) hide show
  1. package/esm/cli/templates/manifest.js +1 -1
  2. package/esm/deno.d.ts +7 -0
  3. package/esm/deno.js +11 -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/utils/version-constant.d.ts +1 -1
  350. package/esm/src/utils/version-constant.js +1 -1
  351. package/esm/src/workflow/blob/local-storage.d.ts +32 -0
  352. package/esm/src/workflow/blob/local-storage.d.ts.map +1 -0
  353. package/esm/src/workflow/blob/local-storage.js +179 -0
  354. package/esm/src/workflow/blob/types.d.ts +5 -0
  355. package/esm/src/workflow/blob/types.d.ts.map +1 -1
  356. package/esm/src/workflow/blob/veryfront-cloud-storage.d.ts +11 -0
  357. package/esm/src/workflow/blob/veryfront-cloud-storage.d.ts.map +1 -1
  358. package/esm/src/workflow/blob/veryfront-cloud-storage.js +36 -0
  359. package/package.json +5 -1
  360. package/esm/src/react/components/chat/chat/components/uploads-panel.d.ts +0 -20
  361. package/esm/src/react/components/chat/chat/components/uploads-panel.d.ts.map +0 -1
  362. package/esm/src/react/components/chat/chat/components/uploads-panel.js +0 -49
  363. package/esm/src/react/components/chat/chat/contexts/thread-list-context.d.ts +0 -28
  364. package/esm/src/react/components/chat/chat/contexts/thread-list-context.d.ts.map +0 -1
  365. package/esm/src/react/components/chat/chat/contexts/thread-list-context.js +0 -27
  366. package/esm/src/react/components/chat/chat/hooks/use-threads.d.ts +0 -28
  367. package/esm/src/react/components/chat/chat/hooks/use-threads.d.ts.map +0 -1
  368. package/esm/src/react/components/chat/chat/hooks/use-threads.js +0 -151
  369. package/esm/src/react/components/chat/chat-with-sidebar.d.ts +0 -110
  370. package/esm/src/react/components/chat/chat-with-sidebar.d.ts.map +0 -1
  371. package/esm/src/react/components/chat/chat-with-sidebar.js +0 -167
  372. package/esm/src/react/components/chat/message.d.ts +0 -42
  373. package/esm/src/react/components/chat/message.d.ts.map +0 -1
  374. package/esm/src/react/components/chat/message.js +0 -69
@@ -0,0 +1,121 @@
1
+ /**
2
+ * Command — BASIC self-contained fork of Studio's `Command` (which wraps `cmdk`).
3
+ * A searchable, filtered list: Input / List / Empty / Group / Item (+ Item
4
+ * Content/Title/Description, Shortcut, Separator). Classes ported 1:1 from
5
+ * Studio (tokens remapped, icons sized down a half-step). Used by the model
6
+ * picker (Popover + Command). No `cmdk` dependency.
7
+ *
8
+ * TODO(a11y): arrow-key navigation + `aria-activedescendant`, fuzzy ranking
9
+ * (this does case-insensitive substring matching), `CommandDialog`. Private to
10
+ * the chat module.
11
+ *
12
+ * @module react/components/chat/ui/command
13
+ */
14
+ import * as React from "../../../../../react/react.js";
15
+ import { cn } from "../theme.js";
16
+ import { SearchIcon, XIcon } from "../icons/index.js";
17
+ import { Dialog, DialogContent, DialogTitle } from "./dialog.js";
18
+ const CommandContext = React.createContext(null);
19
+ function useCommand() {
20
+ const ctx = React.useContext(CommandContext);
21
+ if (!ctx)
22
+ throw new Error("Command parts must be used within <Command>");
23
+ return ctx;
24
+ }
25
+ /** Command root — owns the filter query and the item registry. */
26
+ export function Command({ className, children, ...props }) {
27
+ const [search, setSearch] = React.useState("");
28
+ const [items, setItems] = React.useState(new Map());
29
+ const register = React.useCallback((id, text) => {
30
+ setItems((m) => {
31
+ if (m.get(id) === text)
32
+ return m;
33
+ const next = new Map(m);
34
+ next.set(id, text);
35
+ return next;
36
+ });
37
+ }, []);
38
+ const unregister = React.useCallback((id) => {
39
+ setItems((m) => {
40
+ if (!m.has(id))
41
+ return m;
42
+ const next = new Map(m);
43
+ next.delete(id);
44
+ return next;
45
+ });
46
+ }, []);
47
+ const matches = React.useCallback((text) => !search || text.toLowerCase().includes(search.toLowerCase()), [search]);
48
+ const anyVisible = React.useMemo(() => [...items.values()].some(matches), [items, matches]);
49
+ return (React.createElement("div", { className: cn("overflow-hidden rounded-lg bg-[var(--secondary)] text-[var(--foreground)]", className), ...props },
50
+ React.createElement(CommandContext.Provider, { value: { search, setSearch, register, unregister, matches, anyVisible } }, children)));
51
+ }
52
+ /** A Command palette inside a modal Dialog overlay. */
53
+ export function CommandDialog({ children, open, defaultOpen, onOpenChange, }) {
54
+ return (React.createElement(Dialog, { open: open, defaultOpen: defaultOpen, onOpenChange: onOpenChange },
55
+ React.createElement(DialogContent, { className: "overflow-hidden rounded-lg! p-0 shadow-lg" },
56
+ React.createElement(DialogTitle, { className: "sr-only" }, "Command Menu"),
57
+ React.createElement(Command, null, children))));
58
+ }
59
+ /** Search input row — bound to the command's filter query. */
60
+ export function CommandInput({ className, icon, placeholder = "Search…", ...props }) {
61
+ const ctx = useCommand();
62
+ const hasValue = ctx.search.length > 0;
63
+ return (React.createElement("div", { className: "relative flex items-center px-2.5 border-b border-[var(--separator)]" },
64
+ React.createElement("span", { className: "absolute left-4 pointer-events-none text-[var(--foreground)]" }, icon ?? React.createElement(SearchIcon, { className: "size-3.5" })),
65
+ React.createElement("input", { value: ctx.search, onChange: (e) => ctx.setSearch(e.target.value), placeholder: placeholder, className: cn("flex h-12 w-full bg-transparent pl-9 pr-9 text-sm text-[var(--foreground)] placeholder:text-[var(--foreground)] placeholder:opacity-50 outline-none disabled:cursor-not-allowed disabled:opacity-50", className), ...props }),
66
+ hasValue && (React.createElement("button", { type: "button", onClick: () => ctx.setSearch(""), "aria-label": "Clear filter", className: "absolute right-2 flex size-6 items-center justify-center rounded-full bg-[var(--accent)] text-[var(--foreground)] transition-colors" },
67
+ React.createElement(XIcon, { className: "size-3" })))));
68
+ }
69
+ /** Scrollable results list. */
70
+ export function CommandList({ className, variant = "default", ...props }) {
71
+ return (React.createElement("div", { className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", variant === "flush" ? "p-0" : "p-2.5", className), ...props }));
72
+ }
73
+ /** Shown when the query matches no items. */
74
+ export function CommandEmpty({ className, ...props }) {
75
+ const ctx = useCommand();
76
+ if (ctx.anyVisible)
77
+ return null;
78
+ return (React.createElement("div", { className: cn("text-sm text-[var(--foreground)] text-center py-8 px-4", className), ...props }));
79
+ }
80
+ /** A labelled group of items; auto-hides when all its items are filtered out. */
81
+ export function CommandGroup({ className, heading, children, ...props }) {
82
+ return (React.createElement("div", { className: cn("overflow-hidden p-0.5 [&:not(:has([data-command-item]:not([hidden])))]:hidden", className), ...props },
83
+ heading && (React.createElement("div", { className: "pl-0.5 pr-3 pt-0 pb-1.5 mb-0.5 text-sm font-medium text-[var(--foreground)]" }, heading)),
84
+ children));
85
+ }
86
+ /** Divider between groups. */
87
+ export function CommandSeparator({ className }) {
88
+ return React.createElement("div", { className: cn("-mx-2.5 my-2 h-px bg-[var(--separator)]", className) });
89
+ }
90
+ /** A selectable, filterable result row. */
91
+ export function CommandItem({ className, align = "center", value, disabled, onSelect, children, ...props }) {
92
+ const ctx = useCommand();
93
+ const id = React.useId();
94
+ const text = value ?? "";
95
+ React.useEffect(() => {
96
+ ctx.register(id, text);
97
+ return () => ctx.unregister(id);
98
+ }, [id, text]);
99
+ const visible = ctx.matches(text);
100
+ return (React.createElement("div", { "data-command-item": "", role: "option", "aria-disabled": disabled || undefined, hidden: !visible || undefined, className: cn("relative flex gap-3 select-none cursor-default rounded-md px-3 h-auto py-2 text-base font-normal outline-none transition-colors", "hover:bg-[var(--tertiary)] dark:hover:bg-[var(--accent)]", "aria-disabled:pointer-events-none aria-disabled:opacity-50", "[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 min-w-0 group", align === "start" ? "items-start [&>svg]:mt-0.5" : "items-center", className), onClick: () => {
101
+ if (disabled)
102
+ return;
103
+ onSelect?.(value);
104
+ }, ...props }, children));
105
+ }
106
+ /** Flex column wrapper for an item's title + description. */
107
+ export function CommandItemContent({ className, ...props }) {
108
+ return React.createElement("div", { className: cn("flex-1 min-w-0", className), ...props });
109
+ }
110
+ /** Item primary text. */
111
+ export function CommandItemTitle({ className, ...props }) {
112
+ return React.createElement("div", { className: cn("text-sm font-medium", className), ...props });
113
+ }
114
+ /** Item secondary text. */
115
+ export function CommandItemDescription({ className, ...props }) {
116
+ return (React.createElement("div", { className: cn("text-xs text-[var(--foreground)] leading-tight", className), ...props }));
117
+ }
118
+ /** Trailing shortcut / metadata text. */
119
+ export function CommandShortcut({ className, ...props }) {
120
+ return (React.createElement("span", { className: cn("ml-auto text-xs text-[var(--foreground)] opacity-60", className), ...props }));
121
+ }
@@ -0,0 +1,36 @@
1
+ /**
2
+ * `cva` — forked from class-variance-authority (Apache-2.0, © Joe Bell), inlined
3
+ * so `veryfront/chat` takes no external `class-variance-authority` dependency.
4
+ *
5
+ * The runtime is faithful to upstream; the types are narrowed to what the chat
6
+ * UI primitives use. Private to the chat module — not a public export.
7
+ *
8
+ * @module react/components/chat/ui/cva
9
+ */
10
+ import { type ClassValue, clsx } from "../../../../utils/clsx.js";
11
+ /** Re-export of the class joiner, matching upstream's `cx`. */
12
+ export declare const cx: typeof clsx;
13
+ type VariantShape = Record<string, Record<string, ClassValue>>;
14
+ type VariantSelection<V extends VariantShape> = {
15
+ [K in keyof V]?: keyof V[K] | null | undefined;
16
+ };
17
+ type CvaProps<V extends VariantShape> = VariantSelection<V> & {
18
+ class?: ClassValue;
19
+ className?: ClassValue;
20
+ };
21
+ interface CvaConfig<V extends VariantShape> {
22
+ variants?: V;
23
+ compoundVariants?: Array<Partial<{
24
+ [K in keyof V]: keyof V[K] | Array<keyof V[K]>;
25
+ }> & {
26
+ class?: ClassValue;
27
+ className?: ClassValue;
28
+ }>;
29
+ defaultVariants?: VariantSelection<V>;
30
+ }
31
+ /** Extracts the variant props of a `cva` function, like upstream's helper. */
32
+ export type VariantProps<T extends (...args: any) => any> = Omit<NonNullable<Parameters<T>[0]>, "class" | "className">;
33
+ /** Build a class-name function from a base plus a variants config. */
34
+ export declare function cva<V extends VariantShape>(base?: ClassValue, config?: CvaConfig<V>): (props?: CvaProps<V>) => string;
35
+ export {};
36
+ //# sourceMappingURL=cva.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cva.d.ts","sourceRoot":"","sources":["../../../../../../src/src/react/components/chat/ui/cva.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,KAAK,UAAU,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAElE,+DAA+D;AAC/D,eAAO,MAAM,EAAE,aA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,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,MAAM,CA8CjC"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * `cva` — forked from class-variance-authority (Apache-2.0, © Joe Bell), inlined
3
+ * so `veryfront/chat` takes no external `class-variance-authority` dependency.
4
+ *
5
+ * The runtime is faithful to upstream; the types are narrowed to what the chat
6
+ * UI primitives use. Private to the chat module — not a public export.
7
+ *
8
+ * @module react/components/chat/ui/cva
9
+ */
10
+ import { clsx } from "../../../../utils/clsx.js";
11
+ /** Re-export of the class joiner, matching upstream's `cx`. */
12
+ export const cx = clsx;
13
+ const falsyToString = (value) => typeof value === "boolean" ? String(value) : value === 0 ? "0" : value;
14
+ /** Build a class-name function from a base plus a variants config. */
15
+ export function cva(base, config) {
16
+ return (props) => {
17
+ if (!config?.variants) {
18
+ return cx(base, props?.class, props?.className);
19
+ }
20
+ const { variants, defaultVariants } = config;
21
+ const variantClassNames = Object.keys(variants).map((variant) => {
22
+ const variantProp = props?.[variant];
23
+ const defaultVariantProp = defaultVariants?.[variant];
24
+ if (variantProp === null)
25
+ return null;
26
+ const variantKey = String(falsyToString(variantProp) ?? falsyToString(defaultVariantProp) ?? "");
27
+ return variants[variant]?.[variantKey];
28
+ });
29
+ const resolved = { ...defaultVariants };
30
+ if (props) {
31
+ for (const [key, value] of Object.entries(props)) {
32
+ if (value !== undefined)
33
+ resolved[key] = value;
34
+ }
35
+ }
36
+ const compoundClassNames = config.compoundVariants?.reduce((acc, compound) => {
37
+ const { class: cvClass, className: cvClassName, ...selectors } = compound;
38
+ const matches = Object.entries(selectors).every(([key, value]) => Array.isArray(value)
39
+ ? value.includes(resolved[key])
40
+ : resolved[key] === value);
41
+ return matches ? [...acc, cvClass, cvClassName] : acc;
42
+ }, []);
43
+ return cx(base, variantClassNames, compoundClassNames, props?.class, props?.className);
44
+ };
45
+ }
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Dialog — BASIC fork of @radix-ui/react-dialog with the same API shape (Root /
3
+ * Trigger / Content + Header / Title / Description / Body / Footer / Action /
4
+ * Cancel / Close / Form). Classes ported 1:1 from Studio's `Dialog` (tokens
5
+ * remapped; `Heading` level 2 + `Text` inlined). Modal overlay + centered panel;
6
+ * dismisses on `Escape` and overlay click.
7
+ *
8
+ * TODO(a11y): focus trap + restore, `aria-labelledby`/`aria-describedby` wiring,
9
+ * scroll-lock, portal, enter/exit animation. Private to the chat module.
10
+ *
11
+ * @module react/components/chat/ui/dialog
12
+ */
13
+ import * as React from "../../../../../react/react.js";
14
+ import { type ButtonProps } from "./button.js";
15
+ /** Props accepted by `<Dialog>`. */
16
+ export interface DialogProps {
17
+ children: React.ReactNode;
18
+ open?: boolean;
19
+ defaultOpen?: boolean;
20
+ onOpenChange?: (open: boolean) => void;
21
+ }
22
+ /** Dialog root — owns open state. */
23
+ export declare function Dialog({ children, open, defaultOpen, onOpenChange, }: DialogProps): React.ReactElement;
24
+ /** Trigger — opens the dialog. `asChild` merges onto the child element. */
25
+ export declare function DialogTrigger({ children, asChild, onClick, ...props }: React.ButtonHTMLAttributes<HTMLButtonElement> & {
26
+ asChild?: boolean;
27
+ }): React.ReactElement;
28
+ /** Modal surface — overlay + centered panel, rendered while open. */
29
+ export declare function DialogContent({ className, children, ...props }: React.HTMLAttributes<HTMLDivElement>): React.ReactElement | null;
30
+ /** Left-aligned title + description block. */
31
+ export declare function DialogHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.ReactElement;
32
+ /** Dialog title — Studio Heading level 2 (20px). Semibold so Inter reads at
33
+ * Studio's medium-on-Söhne weight (workbench heading convention). */
34
+ export declare function DialogTitle({ className, ...props }: React.HTMLAttributes<HTMLHeadingElement>): React.ReactElement;
35
+ /** Dialog description — body text, left-aligned. */
36
+ export declare function DialogDescription({ className, ...props }: React.HTMLAttributes<HTMLParagraphElement>): React.ReactElement;
37
+ /** Scrollable body area with a bottom edge-fade. */
38
+ export declare function DialogBody({ className, children, ...props }: React.HTMLAttributes<HTMLDivElement>): React.ReactElement;
39
+ /** Sticky footer row — action left, cancel right. */
40
+ export declare function DialogFooter({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.ReactElement;
41
+ /** Layout-neutral `<form>` shell (`display: contents`) wrapping header/body/footer. */
42
+ export declare function DialogForm({ className, ...props }: React.FormHTMLAttributes<HTMLFormElement>): React.ReactElement;
43
+ /** Props accepted by `<DialogAction>`. */
44
+ export interface DialogActionProps extends ButtonProps {
45
+ isLoading?: boolean;
46
+ }
47
+ /** Recommended action button (primary, default size). */
48
+ export declare function DialogAction({ isLoading, variant, size, type, ...props }: DialogActionProps): React.ReactElement;
49
+ /** Alternate button (secondary, default size) that closes the dialog. */
50
+ export declare function DialogCancel({ className, variant, size, onClick, ...props }: ButtonProps): React.ReactElement;
51
+ /** Closes the dialog. `asChild` merges onto the child element. */
52
+ export declare function DialogClose({ children, asChild, onClick, ...props }: React.ButtonHTMLAttributes<HTMLButtonElement> & {
53
+ asChild?: boolean;
54
+ }): React.ReactElement;
55
+ //# sourceMappingURL=dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../../../../src/src/react/components/chat/ui/dialog.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,KAAK,MAAM,+BAA+B,CAAC;AAIvD,OAAO,EAAU,KAAK,WAAW,EAAiB,MAAM,aAAa,CAAC;AAYtE,oCAAoC;AACpC,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC;AAED,qCAAqC;AACrC,wBAAgB,MAAM,CAAC,EACrB,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,YAAY,GACb,EAAE,WAAW,GAAG,KAAK,CAAC,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GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,kBAAkB,CAAC,eAAe,CAAC,GACjE,KAAK,CAAC,YAAY,CAEpB;AAED,0CAA0C;AAC1C,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACpD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,yDAAyD;AACzD,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,OAAmB,EACnB,IAAgB,EAChB,IAAe,EACf,GAAG,KAAK,EACT,EAAE,iBAAiB,GAAG,KAAK,CAAC,YAAY,CAUxC;AAED,yEAAyE;AACzE,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,OAAqB,EACrB,IAAgB,EAChB,OAAO,EACP,GAAG,KAAK,EACT,EAAE,WAAW,GAAG,KAAK,CAAC,YAAY,CAclC;AAED,kEAAkE;AAClE,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,OAAO,EACP,OAAO,EACP,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,KAAK,CAAC,YAAY,CAe5F"}
@@ -0,0 +1,116 @@
1
+ /**
2
+ * Dialog — BASIC fork of @radix-ui/react-dialog with the same API shape (Root /
3
+ * Trigger / Content + Header / Title / Description / Body / Footer / Action /
4
+ * Cancel / Close / Form). Classes ported 1:1 from Studio's `Dialog` (tokens
5
+ * remapped; `Heading` level 2 + `Text` inlined). Modal overlay + centered panel;
6
+ * dismisses on `Escape` and overlay click.
7
+ *
8
+ * TODO(a11y): focus trap + restore, `aria-labelledby`/`aria-describedby` wiring,
9
+ * scroll-lock, portal, enter/exit animation. Private to the chat module.
10
+ *
11
+ * @module react/components/chat/ui/dialog
12
+ */
13
+ import * as React from "../../../../../react/react.js";
14
+ import { cn } from "../theme.js";
15
+ import { Slot } from "./slot.js";
16
+ import { ScrollFade } from "./scroll-fade.js";
17
+ import { Button, LoadingButton } from "./button.js";
18
+ const DialogContext = React.createContext(null);
19
+ function useDialog() {
20
+ const ctx = React.useContext(DialogContext);
21
+ if (!ctx)
22
+ throw new Error("Dialog parts must be used within <Dialog>");
23
+ return ctx;
24
+ }
25
+ /** Dialog root — owns open state. */
26
+ export function Dialog({ children, open, defaultOpen, onOpenChange, }) {
27
+ const [internal, setInternal] = React.useState(defaultOpen ?? false);
28
+ const isControlled = open !== undefined;
29
+ const isOpen = isControlled ? open : internal;
30
+ const setOpen = React.useCallback((next) => {
31
+ if (!isControlled)
32
+ setInternal(next);
33
+ onOpenChange?.(next);
34
+ }, [isControlled, onOpenChange]);
35
+ return (React.createElement(DialogContext.Provider, { value: { open: isOpen, setOpen } }, children));
36
+ }
37
+ /** Trigger — opens the dialog. `asChild` merges onto the child element. */
38
+ export function DialogTrigger({ children, asChild, onClick, ...props }) {
39
+ const ctx = useDialog();
40
+ const Comp = asChild ? Slot : "button";
41
+ return (React.createElement(Comp, { ...(asChild ? {} : { type: "button" }), onClick: (e) => {
42
+ onClick?.(e);
43
+ ctx.setOpen(true);
44
+ }, ...props }, children));
45
+ }
46
+ /** Modal surface — overlay + centered panel, rendered while open. */
47
+ export function DialogContent({ className, children, ...props }) {
48
+ const ctx = useDialog();
49
+ const panelRef = React.useRef(null);
50
+ React.useEffect(() => {
51
+ if (!ctx.open)
52
+ return;
53
+ const onKeyDown = (e) => {
54
+ if (e.key === "Escape")
55
+ ctx.setOpen(false);
56
+ };
57
+ document.addEventListener("keydown", onKeyDown);
58
+ // Focus the first focusable descendant on open (radix-like) — e.g. a
59
+ // CommandInput — falling back to the panel itself. Full focus-trap is TODO.
60
+ const panel = panelRef.current;
61
+ const focusable = panel?.querySelector('input:not([disabled]), textarea:not([disabled]), select:not([disabled]), button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])');
62
+ (focusable ?? panel)?.focus();
63
+ return () => document.removeEventListener("keydown", onKeyDown);
64
+ }, [ctx.open]);
65
+ if (!ctx.open)
66
+ return null;
67
+ return (React.createElement("div", { className: "fixed inset-0 z-50" },
68
+ React.createElement("div", { className: "fixed inset-0 bg-[var(--overlay)]", onClick: () => ctx.setOpen(false) }),
69
+ React.createElement("div", { ref: panelRef, role: "dialog", "aria-modal": "true", tabIndex: -1, className: cn("fixed left-1/2 top-1/2 z-50 w-[calc(100%-3rem)] max-w-xl max-h-[85vh] -translate-x-1/2 -translate-y-1/2", "rounded-xl bg-[var(--dialog)] text-[var(--foreground)] shadow-lg outline-none overflow-hidden flex flex-col", className), ...props }, children)));
70
+ }
71
+ /** Left-aligned title + description block. */
72
+ export function DialogHeader({ className, ...props }) {
73
+ return React.createElement("div", { className: cn("flex flex-col px-6 pt-6 shrink-0", className), ...props });
74
+ }
75
+ /** Dialog title — Studio Heading level 2 (20px). Semibold so Inter reads at
76
+ * Studio's medium-on-Söhne weight (workbench heading convention). */
77
+ export function DialogTitle({ className, ...props }) {
78
+ return (React.createElement("h2", { className: cn("text-xl font-semibold text-[var(--foreground)]", className), ...props }));
79
+ }
80
+ /** Dialog description — body text, left-aligned. */
81
+ export function DialogDescription({ className, ...props }) {
82
+ return (React.createElement("p", { className: cn("text-base font-normal text-[var(--foreground)] mt-2", className), ...props }));
83
+ }
84
+ /** Scrollable body area with a bottom edge-fade. */
85
+ export function DialogBody({ className, children, ...props }) {
86
+ return (React.createElement(ScrollFade, { edges: "bottom", className: cn("px-6 mt-6 pb-1 min-h-0 flex flex-col gap-4 text-left", className), ...props }, children));
87
+ }
88
+ /** Sticky footer row — action left, cancel right. */
89
+ export function DialogFooter({ className, ...props }) {
90
+ return React.createElement("div", { className: cn("p-6 flex justify-start gap-3 shrink-0", className), ...props });
91
+ }
92
+ /** Layout-neutral `<form>` shell (`display: contents`) wrapping header/body/footer. */
93
+ export function DialogForm({ className, ...props }) {
94
+ return React.createElement("form", { className: cn("contents", className), ...props });
95
+ }
96
+ /** Recommended action button (primary, default size). */
97
+ export function DialogAction({ isLoading, variant = "primary", size = "default", type = "button", ...props }) {
98
+ return (React.createElement(LoadingButton, { type: type, variant: variant, size: size, isLoading: Boolean(isLoading), ...props }));
99
+ }
100
+ /** Alternate button (secondary, default size) that closes the dialog. */
101
+ export function DialogCancel({ className, variant = "secondary", size = "default", onClick, ...props }) {
102
+ const ctx = useDialog();
103
+ return (React.createElement(Button, { variant: variant, size: size, className: className, onClick: (e) => {
104
+ onClick?.(e);
105
+ ctx.setOpen(false);
106
+ }, ...props }));
107
+ }
108
+ /** Closes the dialog. `asChild` merges onto the child element. */
109
+ export function DialogClose({ children, asChild, onClick, ...props }) {
110
+ const ctx = useDialog();
111
+ const Comp = asChild ? Slot : "button";
112
+ return (React.createElement(Comp, { ...(asChild ? {} : { type: "button" }), onClick: (e) => {
113
+ onClick?.(e);
114
+ ctx.setOpen(false);
115
+ }, ...props }, children));
116
+ }
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Drawer — BASIC bottom-sheet fork of Studio's `Drawer` (which is a large
3
+ * Vaul-style component). Same API shape for the parts we need: Root / Trigger /
4
+ * Content (overlay + sheet + drag handle) / Title / Header / Body / Footer /
5
+ * Close. Surface classes ported 1:1 from Studio (tokens remapped). Slides up
6
+ * from the bottom; dismisses on `Escape` and overlay click.
7
+ *
8
+ * TODO(a11y): focus trap + restore, drag-to-dismiss / snap points, scroll-lock,
9
+ * portal, enter/exit animation. Private to the chat module.
10
+ *
11
+ * @module react/components/chat/ui/drawer
12
+ */
13
+ import * as React from "../../../../../react/react.js";
14
+ /** Props accepted by `<Drawer>`. */
15
+ export interface DrawerProps {
16
+ children: React.ReactNode;
17
+ open?: boolean;
18
+ defaultOpen?: boolean;
19
+ onOpenChange?: (open: boolean) => void;
20
+ }
21
+ /** Drawer root — owns open state. */
22
+ export declare function Drawer({ children, open, defaultOpen, onOpenChange, }: DrawerProps): React.ReactElement;
23
+ /** Trigger — opens the drawer. `asChild` merges onto the child element. */
24
+ export declare function DrawerTrigger({ children, asChild, onClick, ...props }: React.ButtonHTMLAttributes<HTMLButtonElement> & {
25
+ asChild?: boolean;
26
+ }): React.ReactElement;
27
+ /** Bottom sheet — overlay + sliding surface with a drag handle. */
28
+ export declare function DrawerContent({ children, className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.ReactElement | null;
29
+ /** Drawer title — 18px medium (Studio Heading-ish). Add `sr-only` to hide. */
30
+ export declare function DrawerTitle({ className, ...props }: React.HTMLAttributes<HTMLHeadingElement>): React.ReactElement;
31
+ /** Header column wrapper. */
32
+ export declare function DrawerHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.ReactElement;
33
+ /** Scrollable body area. */
34
+ export declare function DrawerBody({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.ReactElement;
35
+ /** Sticky footer, full-width stacked actions. */
36
+ export declare function DrawerFooter({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.ReactElement;
37
+ /** Closes the drawer. `asChild` merges onto the child element. */
38
+ export declare function DrawerClose({ children, asChild, onClick, ...props }: React.ButtonHTMLAttributes<HTMLButtonElement> & {
39
+ asChild?: boolean;
40
+ }): React.ReactElement;
41
+ //# sourceMappingURL=drawer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../../../../src/src/react/components/chat/ui/drawer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,KAAK,MAAM,+BAA+B,CAAC;AAcvD,oCAAoC;AACpC,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC;AAED,qCAAqC;AACrC,wBAAgB,MAAM,CAAC,EACrB,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,YAAY,GACb,EAAE,WAAW,GAAG,KAAK,CAAC,YAAY,CAalC;AAED,2EAA2E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,92 @@
1
+ /**
2
+ * Drawer — BASIC bottom-sheet fork of Studio's `Drawer` (which is a large
3
+ * Vaul-style component). Same API shape for the parts we need: Root / Trigger /
4
+ * Content (overlay + sheet + drag handle) / Title / Header / Body / Footer /
5
+ * Close. Surface classes ported 1:1 from Studio (tokens remapped). Slides up
6
+ * from the bottom; dismisses on `Escape` and overlay click.
7
+ *
8
+ * TODO(a11y): focus trap + restore, drag-to-dismiss / snap points, scroll-lock,
9
+ * portal, enter/exit animation. Private to the chat module.
10
+ *
11
+ * @module react/components/chat/ui/drawer
12
+ */
13
+ import * as React from "../../../../../react/react.js";
14
+ import { cn } from "../theme.js";
15
+ import { Slot } from "./slot.js";
16
+ const DrawerContext = React.createContext(null);
17
+ function useDrawer() {
18
+ const ctx = React.useContext(DrawerContext);
19
+ if (!ctx)
20
+ throw new Error("Drawer parts must be used within <Drawer>");
21
+ return ctx;
22
+ }
23
+ /** Drawer root — owns open state. */
24
+ export function Drawer({ children, open, defaultOpen, onOpenChange, }) {
25
+ const [internal, setInternal] = React.useState(defaultOpen ?? false);
26
+ const isControlled = open !== undefined;
27
+ const isOpen = isControlled ? open : internal;
28
+ const setOpen = React.useCallback((next) => {
29
+ if (!isControlled)
30
+ setInternal(next);
31
+ onOpenChange?.(next);
32
+ }, [isControlled, onOpenChange]);
33
+ return (React.createElement(DrawerContext.Provider, { value: { open: isOpen, setOpen } }, children));
34
+ }
35
+ /** Trigger — opens the drawer. `asChild` merges onto the child element. */
36
+ export function DrawerTrigger({ children, asChild, onClick, ...props }) {
37
+ const ctx = useDrawer();
38
+ const Comp = asChild ? Slot : "button";
39
+ return (React.createElement(Comp, { ...(asChild ? {} : { type: "button" }), onClick: (e) => {
40
+ onClick?.(e);
41
+ ctx.setOpen(true);
42
+ }, ...props }, children));
43
+ }
44
+ /** Bottom sheet — overlay + sliding surface with a drag handle. */
45
+ export function DrawerContent({ children, className, ...props }) {
46
+ const ctx = useDrawer();
47
+ const sheetRef = React.useRef(null);
48
+ React.useEffect(() => {
49
+ if (!ctx.open)
50
+ return;
51
+ const onKeyDown = (e) => {
52
+ if (e.key === "Escape")
53
+ ctx.setOpen(false);
54
+ };
55
+ document.addEventListener("keydown", onKeyDown);
56
+ const focusable = sheetRef.current?.querySelector('input:not([disabled]), textarea:not([disabled]), button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])');
57
+ (focusable ?? sheetRef.current)?.focus();
58
+ return () => document.removeEventListener("keydown", onKeyDown);
59
+ }, [ctx.open]);
60
+ if (!ctx.open)
61
+ return null;
62
+ return (React.createElement("div", { className: "fixed inset-0 z-50" },
63
+ React.createElement("div", { className: "fixed inset-0 bg-[var(--overlay)]", onClick: () => ctx.setOpen(false) }),
64
+ React.createElement("div", { ref: sheetRef, role: "dialog", "aria-modal": "true", tabIndex: -1, className: cn("fixed inset-x-0 bottom-0 z-50 flex flex-col max-h-[85vh] w-full rounded-t-xl bg-[var(--drawer)] text-[var(--foreground)] outline-none", className), ...props },
65
+ React.createElement("div", { "aria-hidden": "true", className: "mx-auto mt-3 h-[3px] w-[30px] shrink-0 rounded-full bg-[var(--outline-border)]" }),
66
+ children)));
67
+ }
68
+ /** Drawer title — 18px medium (Studio Heading-ish). Add `sr-only` to hide. */
69
+ export function DrawerTitle({ className, ...props }) {
70
+ return (React.createElement("h2", { className: cn("text-lg font-medium text-[var(--foreground)]", className), ...props }));
71
+ }
72
+ /** Header column wrapper. */
73
+ export function DrawerHeader({ className, ...props }) {
74
+ return React.createElement("div", { className: cn("flex flex-col px-4.5 pt-1 pb-2 shrink-0", className), ...props });
75
+ }
76
+ /** Scrollable body area. */
77
+ export function DrawerBody({ className, ...props }) {
78
+ return (React.createElement("div", { className: cn("flex-1 overflow-y-auto px-4.5 pb-4", className), ...props }));
79
+ }
80
+ /** Sticky footer, full-width stacked actions. */
81
+ export function DrawerFooter({ className, ...props }) {
82
+ return (React.createElement("div", { className: cn("shrink-0 px-4 pb-4 pt-3 flex flex-col gap-3 [&>button]:w-full", className), ...props }));
83
+ }
84
+ /** Closes the drawer. `asChild` merges onto the child element. */
85
+ export function DrawerClose({ children, asChild, onClick, ...props }) {
86
+ const ctx = useDrawer();
87
+ const Comp = asChild ? Slot : "button";
88
+ return (React.createElement(Comp, { ...(asChild ? {} : { type: "button" }), onClick: (e) => {
89
+ onClick?.(e);
90
+ ctx.setOpen(false);
91
+ }, ...props }, children));
92
+ }
@@ -0,0 +1,63 @@
1
+ /**
2
+ * DropdownMenu — BASIC fork of @radix-ui/react-dropdown-menu with the same API
3
+ * shape (Root / Trigger / Content / Group / Item / ItemMeta / Separator /
4
+ * Label). Classes are ported 1:1 from Studio's `DropdownMenu` (token names
5
+ * remapped to veryfront's `[var(--token)]` vocabulary). Opens below the
6
+ * trigger; dismisses on outside-click, `Escape`, and item select.
7
+ *
8
+ * TODO(a11y): roving focus + arrow-key navigation, typeahead, `Tab` handling,
9
+ * portal + collision-aware positioning (flip/shift), `aria-activedescendant`,
10
+ * RadioItem/CheckboxItem/Sub menus. Private to the chat module.
11
+ *
12
+ * @module react/components/chat/ui/dropdown-menu
13
+ */
14
+ import * as React from "../../../../../react/react.js";
15
+ /** Props accepted by `<DropdownMenu>`. */
16
+ export interface DropdownMenuProps {
17
+ children: React.ReactNode;
18
+ open?: boolean;
19
+ defaultOpen?: boolean;
20
+ onOpenChange?: (open: boolean) => void;
21
+ }
22
+ /** DropdownMenu root — owns open state and the positioning anchor. */
23
+ export declare function DropdownMenu({ children, open, defaultOpen, onOpenChange, }: DropdownMenuProps): React.ReactElement;
24
+ /** Trigger — toggles the menu. `asChild` merges onto the child element. */
25
+ export declare function DropdownMenuTrigger({ children, asChild, onClick, ...props }: React.ButtonHTMLAttributes<HTMLButtonElement> & {
26
+ asChild?: boolean;
27
+ }): React.ReactElement;
28
+ /** Props accepted by `<DropdownMenuContent>`. */
29
+ export interface DropdownMenuContentProps extends React.HTMLAttributes<HTMLDivElement> {
30
+ /** Horizontal alignment relative to the trigger. */
31
+ align?: "start" | "end";
32
+ }
33
+ /** Menu surface — rendered below the trigger while open. No border (Studio). */
34
+ export declare function DropdownMenuContent({ children, className, align, ...props }: DropdownMenuContentProps): React.ReactElement | null;
35
+ /** Groups related items with a tight inner gap (Studio: `gap-px p-0.5`). */
36
+ export declare function DropdownMenuGroup({ children, className }: {
37
+ children: React.ReactNode;
38
+ className?: string;
39
+ }): React.ReactElement;
40
+ /** Props accepted by `<DropdownMenuItem>`. */
41
+ export interface DropdownMenuItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
42
+ /** Called when the item is chosen (also closes the menu). */
43
+ onSelect?: () => void;
44
+ /** `asChild` merges item styling onto your own element. */
45
+ asChild?: boolean;
46
+ }
47
+ /** A selectable menu item. Icons render at `size-3.5` (14px). */
48
+ export declare function DropdownMenuItem({ children, className, onSelect, onClick, disabled, asChild, ...props }: DropdownMenuItemProps): React.ReactElement;
49
+ /** Trailing metadata text — keyboard shortcuts, counts, badges. */
50
+ export declare function DropdownMenuItemMeta({ children, className, }: {
51
+ children: React.ReactNode;
52
+ className?: string;
53
+ }): React.ReactElement;
54
+ /** Full-width divider between groups (Studio: `-mx-2.5 my-2`). */
55
+ export declare function DropdownMenuSeparator({ className }: {
56
+ className?: string;
57
+ }): React.ReactElement;
58
+ /** Non-interactive section label — full-strength foreground (Studio). */
59
+ export declare function DropdownMenuLabel({ children, className, }: {
60
+ children: React.ReactNode;
61
+ className?: string;
62
+ }): React.ReactElement;
63
+ //# sourceMappingURL=dropdown-menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../../../../../src/src/react/components/chat/ui/dropdown-menu.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,KAAK,MAAM,+BAA+B,CAAC;AAavD,0CAA0C;AAC1C,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WA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