@vertesia/ui 1.0.0-dev.20260128.144200 → 1.0.0-dev.20260225.024852Z

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 (500) hide show
  1. package/lib/esm/core/components/InputList.js +1 -1
  2. package/lib/esm/core/components/InputList.js.map +1 -1
  3. package/lib/esm/core/components/Overlay.js +1 -1
  4. package/lib/esm/core/components/Overlay.js.map +1 -1
  5. package/lib/esm/core/components/SidePanel.js +8 -2
  6. package/lib/esm/core/components/SidePanel.js.map +1 -1
  7. package/lib/esm/core/components/Switch.js +1 -1
  8. package/lib/esm/core/components/Switch.js.map +1 -1
  9. package/lib/esm/core/components/index.js +0 -8
  10. package/lib/esm/core/components/index.js.map +1 -1
  11. package/lib/esm/core/components/shadcn/MessageBox.js.map +1 -0
  12. package/lib/esm/core/components/shadcn/Panel.js +13 -0
  13. package/lib/esm/core/components/shadcn/Panel.js.map +1 -0
  14. package/lib/esm/core/components/{Badge.js → shadcn/badge.js} +2 -2
  15. package/lib/esm/core/components/shadcn/badge.js.map +1 -0
  16. package/lib/esm/core/components/shadcn/command.js +1 -1
  17. package/lib/esm/core/components/shadcn/command.js.map +1 -1
  18. package/lib/esm/core/components/shadcn/filters/filterBar.js +73 -83
  19. package/lib/esm/core/components/shadcn/filters/filterBar.js.map +1 -1
  20. package/lib/esm/core/components/shadcn/index.js +4 -2
  21. package/lib/esm/core/components/shadcn/index.js.map +1 -1
  22. package/lib/esm/core/components/shadcn/modal/ConfirmModal.js +10 -0
  23. package/lib/esm/core/components/shadcn/modal/ConfirmModal.js.map +1 -0
  24. package/lib/esm/core/components/{DeleteModal.js → shadcn/modal/DeleteModal.js} +1 -1
  25. package/lib/esm/core/components/shadcn/modal/DeleteModal.js.map +1 -0
  26. package/lib/esm/core/components/shadcn/{dialog.js → modal/dialog.js} +19 -15
  27. package/lib/esm/core/components/shadcn/modal/dialog.js.map +1 -0
  28. package/lib/esm/core/components/shadcn/modal/index.js +4 -0
  29. package/lib/esm/core/components/shadcn/modal/index.js.map +1 -0
  30. package/lib/esm/core/components/shadcn/popover.js +4 -2
  31. package/lib/esm/core/components/shadcn/popover.js.map +1 -1
  32. package/lib/esm/core/components/shadcn/selectBox.js +19 -15
  33. package/lib/esm/core/components/shadcn/selectBox.js.map +1 -1
  34. package/lib/esm/core/components/shadcn/tabs.js +16 -14
  35. package/lib/esm/core/components/shadcn/tabs.js.map +1 -1
  36. package/lib/esm/core/components/shadcn/textarea.js +30 -2
  37. package/lib/esm/core/components/shadcn/textarea.js.map +1 -1
  38. package/lib/esm/core/components/shadcn/tooltip.js +5 -1
  39. package/lib/esm/core/components/shadcn/tooltip.js.map +1 -1
  40. package/lib/esm/features/agent/PayloadBuilder.js +45 -0
  41. package/lib/esm/features/agent/PayloadBuilder.js.map +1 -1
  42. package/lib/esm/features/agent/chat/AgentChart.js +12 -232
  43. package/lib/esm/features/agent/chat/AgentChart.js.map +1 -1
  44. package/lib/esm/features/agent/chat/AskUserWidget.js +2 -1
  45. package/lib/esm/features/agent/chat/AskUserWidget.js.map +1 -1
  46. package/lib/esm/features/agent/chat/DocumentPanel.js +46 -0
  47. package/lib/esm/features/agent/chat/DocumentPanel.js.map +1 -0
  48. package/lib/esm/features/agent/chat/DocumentTabBar.js +17 -0
  49. package/lib/esm/features/agent/chat/DocumentTabBar.js.map +1 -0
  50. package/lib/esm/features/agent/chat/ModernAgentConversation.js +159 -402
  51. package/lib/esm/features/agent/chat/ModernAgentConversation.js.map +1 -1
  52. package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +99 -57
  53. package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
  54. package/lib/esm/features/agent/chat/ModernAgentOutput/BatchProgressPanel.js +4 -4
  55. package/lib/esm/features/agent/chat/ModernAgentOutput/BatchProgressPanel.js.map +1 -1
  56. package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js +4 -4
  57. package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js.map +1 -1
  58. package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js +3 -3
  59. package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js.map +1 -1
  60. package/lib/esm/features/agent/chat/ModernAgentOutput/MessageInput.js +25 -22
  61. package/lib/esm/features/agent/chat/ModernAgentOutput/MessageInput.js.map +1 -1
  62. package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js +110 -55
  63. package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -1
  64. package/lib/esm/features/agent/chat/ModernAgentOutput/StreamingMessage.js +2 -2
  65. package/lib/esm/features/agent/chat/ModernAgentOutput/StreamingMessage.js.map +1 -1
  66. package/lib/esm/features/agent/chat/ModernAgentOutput/ToolCallGroup.js +146 -55
  67. package/lib/esm/features/agent/chat/ModernAgentOutput/ToolCallGroup.js.map +1 -1
  68. package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js +5 -6
  69. package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js.map +1 -1
  70. package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js +110 -2
  71. package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js.map +1 -1
  72. package/lib/esm/features/agent/chat/SkillWidgetProvider.js +28 -15
  73. package/lib/esm/features/agent/chat/SkillWidgetProvider.js.map +1 -1
  74. package/lib/esm/features/agent/chat/hooks/useAgentPlans.js +146 -0
  75. package/lib/esm/features/agent/chat/hooks/useAgentPlans.js.map +1 -0
  76. package/lib/esm/features/agent/chat/hooks/useAgentStream.js +180 -0
  77. package/lib/esm/features/agent/chat/hooks/useAgentStream.js.map +1 -0
  78. package/lib/esm/features/agent/chat/hooks/useDocumentPanel.js +100 -0
  79. package/lib/esm/features/agent/chat/hooks/useDocumentPanel.js.map +1 -0
  80. package/lib/esm/features/agent/chat/hooks/useFileProcessing.js +90 -0
  81. package/lib/esm/features/agent/chat/hooks/useFileProcessing.js.map +1 -0
  82. package/lib/esm/features/agent/chat/index.js +6 -5
  83. package/lib/esm/features/agent/chat/index.js.map +1 -1
  84. package/lib/esm/features/agent/chat/types/document.js +2 -0
  85. package/lib/esm/features/agent/chat/types/document.js.map +1 -0
  86. package/lib/esm/features/agent/index.js +0 -2
  87. package/lib/esm/features/agent/index.js.map +1 -1
  88. package/lib/esm/features/store/collections/BrowseCollectionView.js +4 -6
  89. package/lib/esm/features/store/collections/BrowseCollectionView.js.map +1 -1
  90. package/lib/esm/features/store/collections/CreateCollection.js +4 -4
  91. package/lib/esm/features/store/collections/CreateCollection.js.map +1 -1
  92. package/lib/esm/features/store/collections/EditCollectionView.js +1 -1
  93. package/lib/esm/features/store/collections/EditCollectionView.js.map +1 -1
  94. package/lib/esm/features/store/objects/DocumentSearchResults.js +5 -5
  95. package/lib/esm/features/store/objects/DocumentSearchResults.js.map +1 -1
  96. package/lib/esm/features/store/objects/ExportPropertiesModal.js +3 -3
  97. package/lib/esm/features/store/objects/ExportPropertiesModal.js.map +1 -1
  98. package/lib/esm/features/store/objects/components/ContentOverview.js +19 -120
  99. package/lib/esm/features/store/objects/components/ContentOverview.js.map +1 -1
  100. package/lib/esm/features/store/objects/components/PropertiesEditorModal.js +1 -1
  101. package/lib/esm/features/store/objects/components/PropertiesEditorModal.js.map +1 -1
  102. package/lib/esm/features/store/objects/components/SelectDocumentModal.js +2 -2
  103. package/lib/esm/features/store/objects/components/SelectDocumentModal.js.map +1 -1
  104. package/lib/esm/features/store/objects/components/VectorSearchWidget.js +1 -1
  105. package/lib/esm/features/store/objects/components/VectorSearchWidget.js.map +1 -1
  106. package/lib/esm/features/store/objects/components/index.js +1 -1
  107. package/lib/esm/features/store/objects/components/index.js.map +1 -1
  108. package/lib/esm/features/store/objects/components/useDownloadFile.js +192 -0
  109. package/lib/esm/features/store/objects/components/useDownloadFile.js.map +1 -0
  110. package/lib/esm/features/store/objects/search/DocumentSearchContext.js +1 -2
  111. package/lib/esm/features/store/objects/search/DocumentSearchContext.js.map +1 -1
  112. package/lib/esm/features/store/objects/selection/SelectionActions.js +5 -8
  113. package/lib/esm/features/store/objects/selection/SelectionActions.js.map +1 -1
  114. package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js +4 -4
  115. package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js.map +1 -1
  116. package/lib/esm/features/store/objects/selection/actions/ChangeTypeAction.js +2 -2
  117. package/lib/esm/features/store/objects/selection/actions/ChangeTypeAction.js.map +1 -1
  118. package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js +1 -1
  119. package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js.map +1 -1
  120. package/lib/esm/features/store/objects/selection/actions/StartWorkflowComponent.js +3 -3
  121. package/lib/esm/features/store/objects/selection/actions/StartWorkflowComponent.js.map +1 -1
  122. package/lib/esm/features/store/objects/upload/DocumentUploadModal.js +13 -13
  123. package/lib/esm/features/store/objects/upload/DocumentUploadModal.js.map +1 -1
  124. package/lib/esm/features/store/objects/upload/useSmartFileUploadProcessing.js +15 -8
  125. package/lib/esm/features/store/objects/upload/useSmartFileUploadProcessing.js.map +1 -1
  126. package/lib/esm/features/store/types/ObjectSchemaEditor.js +6 -5
  127. package/lib/esm/features/store/types/ObjectSchemaEditor.js.map +1 -1
  128. package/lib/esm/features/store/types/SelectContentType.js +3 -3
  129. package/lib/esm/features/store/types/SelectContentType.js.map +1 -1
  130. package/lib/esm/features/store/types/SelectContentTypeModal.js +5 -4
  131. package/lib/esm/features/store/types/SelectContentTypeModal.js.map +1 -1
  132. package/lib/esm/features/store/types/TableLayoutEditor.js +4 -4
  133. package/lib/esm/features/store/types/TableLayoutEditor.js.map +1 -1
  134. package/lib/esm/features/user/UserInfo.js +73 -9
  135. package/lib/esm/features/user/UserInfo.js.map +1 -1
  136. package/lib/esm/features/utils/print.js +0 -1
  137. package/lib/esm/features/utils/print.js.map +1 -1
  138. package/lib/esm/layout/AppLayout.js +3 -4
  139. package/lib/esm/layout/AppLayout.js.map +1 -1
  140. package/lib/esm/layout/Sidebar.js +5 -5
  141. package/lib/esm/layout/Sidebar.js.map +1 -1
  142. package/lib/esm/router/HistoryNavigator.js +7 -1
  143. package/lib/esm/router/HistoryNavigator.js.map +1 -1
  144. package/lib/esm/router/Nav.js +2 -2
  145. package/lib/esm/router/Nav.js.map +1 -1
  146. package/lib/esm/session/UserSession.js +35 -9
  147. package/lib/esm/session/UserSession.js.map +1 -1
  148. package/lib/esm/session/UserSessionProvider.js +3 -2
  149. package/lib/esm/session/UserSessionProvider.js.map +1 -1
  150. package/lib/esm/shell/apps/AppProjectSelector.js +2 -2
  151. package/lib/esm/shell/apps/AppProjectSelector.js.map +1 -1
  152. package/lib/esm/shell/apps/StandaloneApp.js +2 -2
  153. package/lib/esm/shell/apps/StandaloneApp.js.map +1 -1
  154. package/lib/esm/shell/login/InviteAcceptModal.js +2 -2
  155. package/lib/esm/shell/login/InviteAcceptModal.js.map +1 -1
  156. package/lib/esm/shell/login/SignInModal.js +1 -1
  157. package/lib/esm/shell/login/SignInModal.js.map +1 -1
  158. package/lib/esm/shell/login/SignupForm.js +2 -2
  159. package/lib/esm/shell/login/SignupForm.js.map +1 -1
  160. package/lib/esm/shell/login/UserInfo.js +2 -2
  161. package/lib/esm/shell/login/UserInfo.js.map +1 -1
  162. package/lib/esm/widgets/json-view/JSONCode.js +1 -1
  163. package/lib/esm/widgets/json-view/JSONCode.js.map +1 -1
  164. package/lib/esm/widgets/json-view/JSONDisplay.js +1 -1
  165. package/lib/esm/widgets/json-view/JSONDisplay.js.map +1 -1
  166. package/lib/esm/widgets/markdown/ArtifactContentRenderer.js +84 -13
  167. package/lib/esm/widgets/markdown/ArtifactContentRenderer.js.map +1 -1
  168. package/lib/esm/widgets/markdown/MarkdownFigure.js +40 -0
  169. package/lib/esm/widgets/markdown/MarkdownFigure.js.map +1 -0
  170. package/lib/esm/widgets/markdown/MarkdownRenderer.js +42 -7
  171. package/lib/esm/widgets/markdown/MarkdownRenderer.js.map +1 -1
  172. package/lib/esm/widgets/markdown/MermaidDiagram.js +80 -5
  173. package/lib/esm/widgets/markdown/MermaidDiagram.js.map +1 -1
  174. package/lib/esm/widgets/markdown/codeBlockHandlers.js +33 -33
  175. package/lib/esm/widgets/markdown/codeBlockHandlers.js.map +1 -1
  176. package/lib/esm/widgets/markdown/codeBlockHandlers.test.js +2 -29
  177. package/lib/esm/widgets/markdown/codeBlockHandlers.test.js.map +1 -1
  178. package/lib/esm/widgets/markdown/index.js +1 -0
  179. package/lib/esm/widgets/markdown/index.js.map +1 -1
  180. package/lib/esm/widgets/markdown/normalizeCustomSchemeLinks.js +77 -0
  181. package/lib/esm/widgets/markdown/normalizeCustomSchemeLinks.js.map +1 -0
  182. package/lib/esm/widgets/markdown/normalizeDirectives.js +45 -0
  183. package/lib/esm/widgets/markdown/normalizeDirectives.js.map +1 -0
  184. package/lib/esm/widgets/markdown/remarkDirectiveHandler.js +96 -0
  185. package/lib/esm/widgets/markdown/remarkDirectiveHandler.js.map +1 -0
  186. package/lib/esm/widgets/monacoEditor/MonacoEditor.js +8 -14
  187. package/lib/esm/widgets/monacoEditor/MonacoEditor.js.map +1 -1
  188. package/lib/esm/widgets/schema-editor/ManagedSchema.js.map +1 -1
  189. package/lib/esm/widgets/schema-editor/editor/PropertyEditor.js +3 -3
  190. package/lib/esm/widgets/schema-editor/editor/PropertyEditor.js.map +1 -1
  191. package/lib/esm/widgets/schema-editor/json-schema4-utils.js.map +1 -1
  192. package/lib/tsconfig.tsbuildinfo +1 -1
  193. package/lib/types/core/components/SidePanel.d.ts +4 -1
  194. package/lib/types/core/components/SidePanel.d.ts.map +1 -1
  195. package/lib/types/core/components/index.d.ts +0 -8
  196. package/lib/types/core/components/index.d.ts.map +1 -1
  197. package/lib/types/core/components/shadcn/MessageBox.d.ts.map +1 -0
  198. package/lib/types/core/components/{Panel.d.ts → shadcn/Panel.d.ts} +3 -1
  199. package/lib/types/core/components/shadcn/Panel.d.ts.map +1 -0
  200. package/lib/types/core/components/{Badge.d.ts → shadcn/badge.d.ts} +4 -4
  201. package/lib/types/core/components/shadcn/badge.d.ts.map +1 -0
  202. package/lib/types/core/components/shadcn/button.d.ts +1 -1
  203. package/lib/types/core/components/shadcn/filters/filterBar.d.ts.map +1 -1
  204. package/lib/types/core/components/shadcn/index.d.ts +4 -2
  205. package/lib/types/core/components/shadcn/index.d.ts.map +1 -1
  206. package/lib/types/core/components/shadcn/input.d.ts +1 -1
  207. package/lib/types/core/components/shadcn/modal/ConfirmModal.d.ts.map +1 -0
  208. package/lib/types/core/components/shadcn/modal/DeleteModal.d.ts.map +1 -0
  209. package/lib/types/core/components/shadcn/{dialog.d.ts → modal/dialog.d.ts} +7 -4
  210. package/lib/types/core/components/shadcn/modal/dialog.d.ts.map +1 -0
  211. package/lib/types/core/components/shadcn/modal/index.d.ts +4 -0
  212. package/lib/types/core/components/shadcn/modal/index.d.ts.map +1 -0
  213. package/lib/types/core/components/shadcn/popover.d.ts.map +1 -1
  214. package/lib/types/core/components/shadcn/selectBox.d.ts +9 -5
  215. package/lib/types/core/components/shadcn/selectBox.d.ts.map +1 -1
  216. package/lib/types/core/components/shadcn/tabs.d.ts +14 -5
  217. package/lib/types/core/components/shadcn/tabs.d.ts.map +1 -1
  218. package/lib/types/core/components/shadcn/textarea.d.ts +6 -2
  219. package/lib/types/core/components/shadcn/textarea.d.ts.map +1 -1
  220. package/lib/types/core/components/shadcn/tooltip.d.ts.map +1 -1
  221. package/lib/types/features/agent/PayloadBuilder.d.ts +22 -4
  222. package/lib/types/features/agent/PayloadBuilder.d.ts.map +1 -1
  223. package/lib/types/features/agent/chat/AgentChart.d.ts +3 -44
  224. package/lib/types/features/agent/chat/AgentChart.d.ts.map +1 -1
  225. package/lib/types/features/agent/chat/AskUserWidget.d.ts.map +1 -1
  226. package/lib/types/features/agent/chat/DocumentPanel.d.ts +16 -0
  227. package/lib/types/features/agent/chat/DocumentPanel.d.ts.map +1 -0
  228. package/lib/types/features/agent/chat/DocumentTabBar.d.ts +10 -0
  229. package/lib/types/features/agent/chat/DocumentTabBar.d.ts.map +1 -0
  230. package/lib/types/features/agent/chat/ModernAgentConversation.d.ts +69 -1
  231. package/lib/types/features/agent/chat/ModernAgentConversation.d.ts.map +1 -1
  232. package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts +36 -1
  233. package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
  234. package/lib/types/features/agent/chat/ModernAgentOutput/BatchProgressPanel.d.ts +18 -2
  235. package/lib/types/features/agent/chat/ModernAgentOutput/BatchProgressPanel.d.ts.map +1 -1
  236. package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts +4 -7
  237. package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts.map +1 -1
  238. package/lib/types/features/agent/chat/ModernAgentOutput/MessageInput.d.ts +2 -1
  239. package/lib/types/features/agent/chat/ModernAgentOutput/MessageInput.d.ts.map +1 -1
  240. package/lib/types/features/agent/chat/ModernAgentOutput/MessageItem.d.ts +35 -7
  241. package/lib/types/features/agent/chat/ModernAgentOutput/MessageItem.d.ts.map +1 -1
  242. package/lib/types/features/agent/chat/ModernAgentOutput/StreamingMessage.d.ts +11 -1
  243. package/lib/types/features/agent/chat/ModernAgentOutput/StreamingMessage.d.ts.map +1 -1
  244. package/lib/types/features/agent/chat/ModernAgentOutput/ToolCallGroup.d.ts +20 -2
  245. package/lib/types/features/agent/chat/ModernAgentOutput/ToolCallGroup.d.ts.map +1 -1
  246. package/lib/types/features/agent/chat/ModernAgentOutput/WorkstreamTabs.d.ts.map +1 -1
  247. package/lib/types/features/agent/chat/ModernAgentOutput/utils.d.ts +18 -1
  248. package/lib/types/features/agent/chat/ModernAgentOutput/utils.d.ts.map +1 -1
  249. package/lib/types/features/agent/chat/SkillWidgetProvider.d.ts.map +1 -1
  250. package/lib/types/features/agent/chat/hooks/useAgentPlans.d.ts +22 -0
  251. package/lib/types/features/agent/chat/hooks/useAgentPlans.d.ts.map +1 -0
  252. package/lib/types/features/agent/chat/hooks/useAgentStream.d.ts +42 -0
  253. package/lib/types/features/agent/chat/hooks/useAgentStream.d.ts.map +1 -0
  254. package/lib/types/features/agent/chat/hooks/useDocumentPanel.d.ts +22 -0
  255. package/lib/types/features/agent/chat/hooks/useDocumentPanel.d.ts.map +1 -0
  256. package/lib/types/features/agent/chat/hooks/useFileProcessing.d.ts +27 -0
  257. package/lib/types/features/agent/chat/hooks/useFileProcessing.d.ts.map +1 -0
  258. package/lib/types/features/agent/chat/index.d.ts +12 -8
  259. package/lib/types/features/agent/chat/index.d.ts.map +1 -1
  260. package/lib/types/features/agent/chat/types/document.d.ts +5 -0
  261. package/lib/types/features/agent/chat/types/document.d.ts.map +1 -0
  262. package/lib/types/features/agent/index.d.ts +0 -2
  263. package/lib/types/features/agent/index.d.ts.map +1 -1
  264. package/lib/types/features/store/collections/BrowseCollectionView.d.ts.map +1 -1
  265. package/lib/types/features/store/objects/ExportPropertiesModal.d.ts.map +1 -1
  266. package/lib/types/features/store/objects/components/ContentOverview.d.ts.map +1 -1
  267. package/lib/types/features/store/objects/components/PropertiesEditorModal.d.ts.map +1 -1
  268. package/lib/types/features/store/objects/components/index.d.ts +1 -1
  269. package/lib/types/features/store/objects/components/index.d.ts.map +1 -1
  270. package/lib/types/features/store/objects/components/useDownloadFile.d.ts +35 -0
  271. package/lib/types/features/store/objects/components/useDownloadFile.d.ts.map +1 -0
  272. package/lib/types/features/store/objects/search/DocumentSearchContext.d.ts.map +1 -1
  273. package/lib/types/features/store/objects/selection/SelectionActions.d.ts +1 -1
  274. package/lib/types/features/store/objects/selection/SelectionActions.d.ts.map +1 -1
  275. package/lib/types/features/store/objects/selection/actions/ChangeTypeAction.d.ts.map +1 -1
  276. package/lib/types/features/store/objects/selection/actions/ExportPropertiesAction.d.ts.map +1 -1
  277. package/lib/types/features/store/objects/upload/useSmartFileUploadProcessing.d.ts.map +1 -1
  278. package/lib/types/features/store/types/ObjectSchemaEditor.d.ts +2 -1
  279. package/lib/types/features/store/types/ObjectSchemaEditor.d.ts.map +1 -1
  280. package/lib/types/features/store/types/SelectContentTypeModal.d.ts +1 -1
  281. package/lib/types/features/store/types/SelectContentTypeModal.d.ts.map +1 -1
  282. package/lib/types/features/store/types/TableLayoutEditor.d.ts +2 -1
  283. package/lib/types/features/store/types/TableLayoutEditor.d.ts.map +1 -1
  284. package/lib/types/features/user/UserInfo.d.ts +12 -1
  285. package/lib/types/features/user/UserInfo.d.ts.map +1 -1
  286. package/lib/types/features/utils/print.d.ts.map +1 -1
  287. package/lib/types/layout/AppLayout.d.ts.map +1 -1
  288. package/lib/types/layout/Sidebar.d.ts +4 -2
  289. package/lib/types/layout/Sidebar.d.ts.map +1 -1
  290. package/lib/types/router/HistoryNavigator.d.ts.map +1 -1
  291. package/lib/types/router/Nav.d.ts +6 -1
  292. package/lib/types/router/Nav.d.ts.map +1 -1
  293. package/lib/types/session/UserSession.d.ts.map +1 -1
  294. package/lib/types/session/UserSessionProvider.d.ts +1 -0
  295. package/lib/types/session/UserSessionProvider.d.ts.map +1 -1
  296. package/lib/types/widgets/json-view/JSONCode.d.ts.map +1 -1
  297. package/lib/types/widgets/markdown/ArtifactContentRenderer.d.ts +10 -1
  298. package/lib/types/widgets/markdown/ArtifactContentRenderer.d.ts.map +1 -1
  299. package/lib/types/widgets/markdown/MarkdownFigure.d.ts +15 -0
  300. package/lib/types/widgets/markdown/MarkdownFigure.d.ts.map +1 -0
  301. package/lib/types/widgets/markdown/MarkdownRenderer.d.ts.map +1 -1
  302. package/lib/types/widgets/markdown/MermaidDiagram.d.ts.map +1 -1
  303. package/lib/types/widgets/markdown/codeBlockHandlers.d.ts +5 -2
  304. package/lib/types/widgets/markdown/codeBlockHandlers.d.ts.map +1 -1
  305. package/lib/types/widgets/markdown/index.d.ts +1 -0
  306. package/lib/types/widgets/markdown/index.d.ts.map +1 -1
  307. package/lib/types/widgets/markdown/normalizeCustomSchemeLinks.d.ts +9 -0
  308. package/lib/types/widgets/markdown/normalizeCustomSchemeLinks.d.ts.map +1 -0
  309. package/lib/types/widgets/markdown/normalizeDirectives.d.ts +20 -0
  310. package/lib/types/widgets/markdown/normalizeDirectives.d.ts.map +1 -0
  311. package/lib/types/widgets/markdown/remarkDirectiveHandler.d.ts +2 -0
  312. package/lib/types/widgets/markdown/remarkDirectiveHandler.d.ts.map +1 -0
  313. package/lib/types/widgets/monacoEditor/MonacoEditor.d.ts +1 -3
  314. package/lib/types/widgets/monacoEditor/MonacoEditor.d.ts.map +1 -1
  315. package/lib/types/widgets/schema-editor/ManagedSchema.d.ts +1 -1
  316. package/lib/types/widgets/schema-editor/ManagedSchema.d.ts.map +1 -1
  317. package/lib/vertesia-ui-core.js +1 -1
  318. package/lib/vertesia-ui-core.js.map +1 -1
  319. package/lib/vertesia-ui-features.js +1 -1
  320. package/lib/vertesia-ui-features.js.map +1 -1
  321. package/lib/vertesia-ui-layout.js +1 -1
  322. package/lib/vertesia-ui-layout.js.map +1 -1
  323. package/lib/vertesia-ui-router.js +1 -1
  324. package/lib/vertesia-ui-router.js.map +1 -1
  325. package/lib/vertesia-ui-session.js +1 -1
  326. package/lib/vertesia-ui-session.js.map +1 -1
  327. package/lib/vertesia-ui-shell.js +1 -1
  328. package/lib/vertesia-ui-shell.js.map +1 -1
  329. package/lib/vertesia-ui-widgets.js +1 -1
  330. package/lib/vertesia-ui-widgets.js.map +1 -1
  331. package/package.json +14 -10
  332. package/src/core/components/InputList.tsx +1 -1
  333. package/src/core/components/Overlay.tsx +1 -1
  334. package/src/core/components/SidePanel.tsx +29 -15
  335. package/src/core/components/Switch.tsx +1 -1
  336. package/src/core/components/index.ts +0 -8
  337. package/src/core/components/shadcn/Panel.tsx +50 -0
  338. package/src/core/components/{Badge.tsx → shadcn/badge.tsx} +3 -3
  339. package/src/core/components/shadcn/command.tsx +1 -1
  340. package/src/core/components/shadcn/filters/filterBar.tsx +76 -87
  341. package/src/core/components/shadcn/index.ts +5 -3
  342. package/src/core/components/{ConfirmModal.tsx → shadcn/modal/ConfirmModal.tsx} +8 -8
  343. package/src/core/components/{DeleteModal.tsx → shadcn/modal/DeleteModal.tsx} +1 -1
  344. package/src/core/components/shadcn/{dialog.tsx → modal/dialog.tsx} +43 -32
  345. package/src/core/components/shadcn/modal/index.ts +3 -0
  346. package/src/core/components/shadcn/popover.tsx +4 -2
  347. package/src/core/components/shadcn/selectBox.tsx +71 -52
  348. package/src/core/components/shadcn/tabs.tsx +36 -19
  349. package/src/core/components/shadcn/textarea.tsx +43 -2
  350. package/src/core/components/shadcn/tooltip.tsx +23 -17
  351. package/src/features/agent/PayloadBuilder.tsx +70 -9
  352. package/src/features/agent/chat/AgentChart.tsx +46 -678
  353. package/src/features/agent/chat/AskUserWidget.tsx +4 -3
  354. package/src/features/agent/chat/DocumentPanel.tsx +120 -0
  355. package/src/features/agent/chat/DocumentTabBar.tsx +49 -0
  356. package/src/features/agent/chat/ModernAgentConversation.tsx +403 -549
  357. package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +162 -55
  358. package/src/features/agent/chat/ModernAgentOutput/BatchProgressPanel.tsx +40 -10
  359. package/src/features/agent/chat/ModernAgentOutput/Header.tsx +12 -16
  360. package/src/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.tsx +3 -3
  361. package/src/features/agent/chat/ModernAgentOutput/MessageInput.tsx +68 -75
  362. package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +206 -94
  363. package/src/features/agent/chat/ModernAgentOutput/StreamingMessage.tsx +22 -5
  364. package/src/features/agent/chat/ModernAgentOutput/ToolCallGroup.tsx +295 -113
  365. package/src/features/agent/chat/ModernAgentOutput/WorkstreamTabs.tsx +11 -8
  366. package/src/features/agent/chat/ModernAgentOutput/utils.ts +133 -4
  367. package/src/features/agent/chat/SkillWidgetProvider.tsx +32 -15
  368. package/src/features/agent/chat/hooks/useAgentPlans.ts +190 -0
  369. package/src/features/agent/chat/hooks/useAgentStream.ts +239 -0
  370. package/src/features/agent/chat/hooks/useDocumentPanel.ts +118 -0
  371. package/src/features/agent/chat/hooks/useFileProcessing.ts +126 -0
  372. package/src/features/agent/chat/index.ts +18 -17
  373. package/src/features/agent/chat/types/document.ts +4 -0
  374. package/src/features/agent/index.ts +0 -2
  375. package/src/features/store/collections/BrowseCollectionView.tsx +5 -8
  376. package/src/features/store/collections/CreateCollection.tsx +8 -8
  377. package/src/features/store/collections/EditCollectionView.tsx +1 -1
  378. package/src/features/store/objects/DocumentSearchResults.tsx +9 -13
  379. package/src/features/store/objects/ExportPropertiesModal.tsx +9 -7
  380. package/src/features/store/objects/components/ContentOverview.tsx +29 -155
  381. package/src/features/store/objects/components/PropertiesEditorModal.tsx +0 -1
  382. package/src/features/store/objects/components/SelectDocumentModal.tsx +6 -6
  383. package/src/features/store/objects/components/VectorSearchWidget.tsx +2 -2
  384. package/src/features/store/objects/components/index.ts +1 -1
  385. package/src/features/store/objects/components/useDownloadFile.ts +237 -0
  386. package/src/features/store/objects/search/DocumentSearchContext.ts +1 -2
  387. package/src/features/store/objects/selection/SelectionActions.tsx +0 -4
  388. package/src/features/store/objects/selection/actions/AddToCollectionAction.tsx +13 -13
  389. package/src/features/store/objects/selection/actions/ChangeTypeAction.tsx +2 -6
  390. package/src/features/store/objects/selection/actions/ExportPropertiesAction.tsx +1 -3
  391. package/src/features/store/objects/selection/actions/StartWorkflowComponent.tsx +8 -8
  392. package/src/features/store/objects/upload/DocumentUploadModal.tsx +25 -25
  393. package/src/features/store/objects/upload/useSmartFileUploadProcessing.ts +16 -10
  394. package/src/features/store/types/ObjectSchemaEditor.tsx +32 -29
  395. package/src/features/store/types/SelectContentType.tsx +3 -3
  396. package/src/features/store/types/SelectContentTypeModal.tsx +17 -30
  397. package/src/features/store/types/TableLayoutEditor.tsx +14 -18
  398. package/src/features/user/UserInfo.tsx +176 -10
  399. package/src/features/utils/print.ts +0 -1
  400. package/src/layout/AppLayout.tsx +16 -44
  401. package/src/layout/Sidebar.tsx +7 -5
  402. package/src/router/HistoryNavigator.ts +9 -1
  403. package/src/router/Nav.tsx +7 -2
  404. package/src/session/UserSession.ts +38 -9
  405. package/src/session/UserSessionProvider.tsx +3 -2
  406. package/src/shell/apps/AppProjectSelector.tsx +2 -2
  407. package/src/shell/apps/StandaloneApp.tsx +3 -3
  408. package/src/shell/login/InviteAcceptModal.tsx +6 -6
  409. package/src/shell/login/SignInModal.tsx +1 -1
  410. package/src/shell/login/SignupForm.tsx +3 -3
  411. package/src/shell/login/UserInfo.tsx +5 -5
  412. package/src/widgets/json-view/JSONCode.tsx +1 -3
  413. package/src/widgets/json-view/JSONDisplay.tsx +1 -1
  414. package/src/widgets/markdown/ArtifactContentRenderer.tsx +115 -14
  415. package/src/widgets/markdown/MarkdownFigure.tsx +100 -0
  416. package/src/widgets/markdown/MarkdownRenderer.tsx +62 -9
  417. package/src/widgets/markdown/MermaidDiagram.tsx +97 -5
  418. package/src/widgets/markdown/codeBlockHandlers.test.tsx +3 -34
  419. package/src/widgets/markdown/codeBlockHandlers.tsx +47 -42
  420. package/src/widgets/markdown/index.ts +1 -0
  421. package/src/widgets/markdown/markdown.css +192 -0
  422. package/src/widgets/markdown/normalizeCustomSchemeLinks.test.ts +86 -0
  423. package/src/widgets/markdown/normalizeCustomSchemeLinks.ts +91 -0
  424. package/src/widgets/markdown/normalizeDirectives.ts +50 -0
  425. package/src/widgets/markdown/remarkDirectiveHandler.ts +119 -0
  426. package/src/widgets/monacoEditor/MonacoEditor.tsx +8 -22
  427. package/src/widgets/schema-editor/ManagedSchema.ts +1 -1
  428. package/src/widgets/schema-editor/editor/PropertyEditor.tsx +5 -5
  429. package/src/widgets/schema-editor/json-schema4-utils.ts +1 -1
  430. package/lib/esm/core/components/Badge.js.map +0 -1
  431. package/lib/esm/core/components/Button.js +0 -32
  432. package/lib/esm/core/components/Button.js.map +0 -1
  433. package/lib/esm/core/components/ConfirmModal.js +0 -10
  434. package/lib/esm/core/components/ConfirmModal.js.map +0 -1
  435. package/lib/esm/core/components/DeleteModal.js.map +0 -1
  436. package/lib/esm/core/components/MessageBox.js.map +0 -1
  437. package/lib/esm/core/components/Modal.js +0 -26
  438. package/lib/esm/core/components/Modal.js.map +0 -1
  439. package/lib/esm/core/components/Panel.js +0 -8
  440. package/lib/esm/core/components/Panel.js.map +0 -1
  441. package/lib/esm/core/components/SelectBox.js +0 -67
  442. package/lib/esm/core/components/SelectBox.js.map +0 -1
  443. package/lib/esm/core/components/shadcn/dialog.js.map +0 -1
  444. package/lib/esm/core/components/tabs/Tabs.js +0 -78
  445. package/lib/esm/core/components/tabs/Tabs.js.map +0 -1
  446. package/lib/esm/core/components/tabs/TabsContext.js +0 -7
  447. package/lib/esm/core/components/tabs/TabsContext.js.map +0 -1
  448. package/lib/esm/core/components/tabs/index.js +0 -3
  449. package/lib/esm/core/components/tabs/index.js.map +0 -1
  450. package/lib/esm/features/agent/createChartTool.js +0 -632
  451. package/lib/esm/features/agent/createChartTool.js.map +0 -1
  452. package/lib/esm/features/agent/examples.js +0 -295
  453. package/lib/esm/features/agent/examples.js.map +0 -1
  454. package/lib/esm/features/agent/visualization.js +0 -165
  455. package/lib/esm/features/agent/visualization.js.map +0 -1
  456. package/lib/esm/features/store/objects/components/useDownloadObject.js +0 -21
  457. package/lib/esm/features/store/objects/components/useDownloadObject.js.map +0 -1
  458. package/lib/types/core/components/Badge.d.ts.map +0 -1
  459. package/lib/types/core/components/Button.d.ts +0 -14
  460. package/lib/types/core/components/Button.d.ts.map +0 -1
  461. package/lib/types/core/components/ConfirmModal.d.ts.map +0 -1
  462. package/lib/types/core/components/DeleteModal.d.ts.map +0 -1
  463. package/lib/types/core/components/MessageBox.d.ts.map +0 -1
  464. package/lib/types/core/components/Modal.d.ts +0 -30
  465. package/lib/types/core/components/Modal.d.ts.map +0 -1
  466. package/lib/types/core/components/Panel.d.ts.map +0 -1
  467. package/lib/types/core/components/SelectBox.d.ts +0 -36
  468. package/lib/types/core/components/SelectBox.d.ts.map +0 -1
  469. package/lib/types/core/components/shadcn/dialog.d.ts.map +0 -1
  470. package/lib/types/core/components/tabs/Tabs.d.ts +0 -25
  471. package/lib/types/core/components/tabs/Tabs.d.ts.map +0 -1
  472. package/lib/types/core/components/tabs/TabsContext.d.ts +0 -17
  473. package/lib/types/core/components/tabs/TabsContext.d.ts.map +0 -1
  474. package/lib/types/core/components/tabs/index.d.ts +0 -3
  475. package/lib/types/core/components/tabs/index.d.ts.map +0 -1
  476. package/lib/types/features/agent/createChartTool.d.ts +0 -178
  477. package/lib/types/features/agent/createChartTool.d.ts.map +0 -1
  478. package/lib/types/features/agent/examples.d.ts +0 -59
  479. package/lib/types/features/agent/examples.d.ts.map +0 -1
  480. package/lib/types/features/agent/visualization.d.ts +0 -95
  481. package/lib/types/features/agent/visualization.d.ts.map +0 -1
  482. package/lib/types/features/store/objects/components/useDownloadObject.d.ts +0 -4
  483. package/lib/types/features/store/objects/components/useDownloadObject.d.ts.map +0 -1
  484. package/src/core/components/Button.tsx +0 -63
  485. package/src/core/components/Modal.tsx +0 -144
  486. package/src/core/components/Panel.tsx +0 -34
  487. package/src/core/components/SelectBox.tsx +0 -188
  488. package/src/core/components/tabs/Tabs.tsx +0 -132
  489. package/src/core/components/tabs/TabsContext.ts +0 -25
  490. package/src/core/components/tabs/index.ts +0 -2
  491. package/src/features/agent/CHART_INSTRUCTIONS.md +0 -228
  492. package/src/features/agent/createChartTool.ts +0 -643
  493. package/src/features/agent/examples.ts +0 -321
  494. package/src/features/agent/visualization.ts +0 -227
  495. package/src/features/store/objects/components/useDownloadObject.ts +0 -29
  496. /package/lib/esm/core/components/{MessageBox.js → shadcn/MessageBox.js} +0 -0
  497. /package/lib/types/core/components/{MessageBox.d.ts → shadcn/MessageBox.d.ts} +0 -0
  498. /package/lib/types/core/components/{ConfirmModal.d.ts → shadcn/modal/ConfirmModal.d.ts} +0 -0
  499. /package/lib/types/core/components/{DeleteModal.d.ts → shadcn/modal/DeleteModal.d.ts} +0 -0
  500. /package/src/core/components/{MessageBox.tsx → shadcn/MessageBox.tsx} +0 -0
@@ -1,12 +1,12 @@
1
1
  import React, { useMemo } from 'react';
2
2
  import type { CodeBlockRendererProps } from './CodeBlockRendering';
3
3
  import { CodeBlockPlaceholder, CodeBlockErrorBoundary } from './CodeBlockPlaceholder';
4
- import { AgentChart, type AgentChartSpec } from '../../features/agent/chat/AgentChart';
4
+ import type { VegaLiteChartSpec } from '../../features/agent/chat/AgentChart';
5
5
  import { VegaLiteChart } from '../../features/agent/chat/VegaLiteChart';
6
6
  import { MermaidDiagram } from './MermaidDiagram';
7
7
  import { AskUserWidget, type AskUserWidgetProps } from '../../features/agent/chat/AskUserWidget';
8
8
  import { useArtifactContent } from './useArtifactContent';
9
- import { ArtifactContentRenderer, type ExpandRenderType } from './ArtifactContentRenderer';
9
+ import { ArtifactContentRenderer, type ExpandRenderType, sanitizeSvg, makeSvgResponsive } from './ArtifactContentRenderer';
10
10
 
11
11
  /**
12
12
  * Context for passing artifact run ID and callbacks to code block handlers
@@ -125,7 +125,7 @@ function parseChartJson(code: string): Record<string, unknown> | null {
125
125
  */
126
126
  function detectChartLibrary(
127
127
  spec: Record<string, unknown>
128
- ): 'vega-lite' | 'recharts' | null {
128
+ ): 'vega-lite' | null {
129
129
  // Detect Vega-Lite by $schema containing "vega"
130
130
  const hasVegaSchema =
131
131
  typeof spec.$schema === 'string' && spec.$schema.includes('vega');
@@ -135,16 +135,6 @@ function detectChartLibrary(
135
135
  return 'vega-lite';
136
136
  }
137
137
 
138
- // Recharts: check for 'chart' property OR library === 'recharts' with data
139
- const isRecharts =
140
- ('chart' in spec || 'type' in spec || spec.library === 'recharts') &&
141
- 'data' in spec &&
142
- Array.isArray(spec.data);
143
-
144
- if (isRecharts) {
145
- return 'recharts';
146
- }
147
-
148
138
  return null;
149
139
  }
150
140
 
@@ -196,8 +186,7 @@ export function VegaLiteCodeBlockHandler({ code }: CodeBlockRendererProps) {
196
186
 
197
187
  /**
198
188
  * Chart code block handler
199
- * Supports both Vega-Lite and Recharts specifications
200
- * Routes directly to the appropriate chart component based on detected library
189
+ * `chart` now accepts Vega-Lite specifications only.
201
190
  */
202
191
  export function ChartCodeBlockHandler({ code }: CodeBlockRendererProps) {
203
192
  const { artifactRunId } = useCodeBlockContext();
@@ -205,27 +194,22 @@ export function ChartCodeBlockHandler({ code }: CodeBlockRendererProps) {
205
194
  // Check if JSON is incomplete (streaming in progress)
206
195
  const incomplete = useMemo(() => isIncompleteJson(code), [code]);
207
196
 
208
- const { chartSpec, isVegaLite } = useMemo(() => {
209
- if (incomplete) return { chartSpec: null, isVegaLite: false };
197
+ const chartSpec = useMemo((): VegaLiteChartSpec | null => {
198
+ if (incomplete) return null;
210
199
 
211
200
  const spec = parseChartJson(code);
212
- if (!spec) return { chartSpec: null, isVegaLite: false };
201
+ if (!spec) return null;
213
202
 
214
203
  const library = detectChartLibrary(spec);
215
- if (!library) return { chartSpec: null, isVegaLite: false };
204
+ if (!library) return null;
216
205
 
217
- // Vega-Lite spec - wrap in expected format
218
- if (library === 'vega-lite') {
219
- // If already wrapped (has library: 'vega-lite' and spec property), use as-is
220
- if (spec.library === 'vega-lite' && 'spec' in spec) {
221
- return { chartSpec: spec, isVegaLite: true };
222
- }
223
- // Native Vega-Lite spec - wrap it
224
- return { chartSpec: { library: 'vega-lite' as const, spec }, isVegaLite: true };
206
+ // If already wrapped, use as-is.
207
+ if (spec.library === 'vega-lite' && 'spec' in spec && typeof spec.spec === 'object') {
208
+ return spec as unknown as VegaLiteChartSpec;
225
209
  }
226
210
 
227
- // Recharts spec
228
- return { chartSpec: spec, isVegaLite: false };
211
+ // Native Vega-Lite spec - wrap it.
212
+ return { library: 'vega-lite' as const, spec };
229
213
  }, [code, incomplete]);
230
214
 
231
215
  // Show loading placeholder for incomplete JSON (streaming)
@@ -242,23 +226,14 @@ export function ChartCodeBlockHandler({ code }: CodeBlockRendererProps) {
242
226
  return (
243
227
  <CodeBlockPlaceholder
244
228
  type="chart"
245
- error="Invalid chart specification"
229
+ error="Invalid Vega-Lite chart specification"
246
230
  />
247
231
  );
248
232
  }
249
233
 
250
- // Route directly to the appropriate chart component
251
- if (isVegaLite) {
252
- return (
253
- <CodeBlockErrorBoundary type="chart" fallbackCode={code}>
254
- <VegaLiteChart spec={chartSpec as any} artifactRunId={artifactRunId} />
255
- </CodeBlockErrorBoundary>
256
- );
257
- }
258
-
259
234
  return (
260
235
  <CodeBlockErrorBoundary type="chart" fallbackCode={code}>
261
- <AgentChart spec={chartSpec as AgentChartSpec} artifactRunId={artifactRunId} />
236
+ <VegaLiteChart spec={chartSpec} artifactRunId={artifactRunId} />
262
237
  </CodeBlockErrorBoundary>
263
238
  );
264
239
  }
@@ -357,6 +332,32 @@ export function ProposalCodeBlockHandler({ code }: CodeBlockRendererProps) {
357
332
  );
358
333
  }
359
334
 
335
+ /**
336
+ * Mockup code block handler — renders inline SVG after sanitization.
337
+ */
338
+ export function MockupCodeBlockHandler({ code }: CodeBlockRendererProps) {
339
+ const processedSvg = useMemo(() => {
340
+ const trimmed = code.trim();
341
+ if (!trimmed) return null;
342
+ return makeSvgResponsive(sanitizeSvg(trimmed));
343
+ }, [code]);
344
+
345
+ if (!processedSvg) {
346
+ return (
347
+ <CodeBlockPlaceholder type="code" error="Empty mockup" />
348
+ );
349
+ }
350
+
351
+ return (
352
+ <CodeBlockErrorBoundary type="code" fallbackCode={code}>
353
+ <div
354
+ style={{ margin: '16px 0', width: '100%', overflowX: 'auto' }}
355
+ dangerouslySetInnerHTML={{ __html: processedSvg }}
356
+ />
357
+ </CodeBlockErrorBoundary>
358
+ );
359
+ }
360
+
360
361
  /**
361
362
  * Expand code block handler - fetches artifact and renders content inline.
362
363
  *
@@ -381,7 +382,7 @@ export function ExpandCodeBlockHandler({ code, language }: CodeBlockRendererProp
381
382
  // Validate known types
382
383
  const validTypes: ExpandRenderType[] = [
383
384
  'chart', 'vega-lite', 'table', 'markdown',
384
- 'fusion-fragment', 'code', 'image', 'auto'
385
+ 'fusion-fragment', 'mockup', 'code', 'image', 'auto'
385
386
  ];
386
387
  return validTypes.includes(type) ? type : 'auto';
387
388
  }, [language]);
@@ -467,7 +468,7 @@ export function createDefaultCodeBlockHandlers(): Record<
467
468
  React.FunctionComponent<CodeBlockRendererProps>
468
469
  > {
469
470
  return {
470
- // Chart handler for generic chart code blocks (auto-detects library)
471
+ // Chart handler for generic chart code blocks (Vega-Lite only)
471
472
  chart: ChartCodeBlockHandler,
472
473
  // Vega-Lite handlers - always treat as Vega-Lite
473
474
  'vega-lite': VegaLiteCodeBlockHandler,
@@ -476,6 +477,10 @@ export function createDefaultCodeBlockHandlers(): Record<
476
477
  // Mermaid handler
477
478
  mermaid: MermaidCodeBlockHandler,
478
479
 
480
+ // Mockup handler (inline SVG)
481
+ mockup: MockupCodeBlockHandler,
482
+ svg: MockupCodeBlockHandler,
483
+
479
484
  // Proposal handlers
480
485
  proposal: ProposalCodeBlockHandler,
481
486
  askuser: ProposalCodeBlockHandler,
@@ -7,6 +7,7 @@ export {
7
7
  export { MarkdownRenderer, type MarkdownRendererProps } from './MarkdownRenderer';
8
8
  export { MarkdownLink, type MarkdownLinkProps } from './MarkdownLink';
9
9
  export { MarkdownImage, type MarkdownImageProps } from './MarkdownImage';
10
+ export { MarkdownFigure, type MarkdownFigureProps } from './MarkdownFigure';
10
11
  export {
11
12
  useResolvedUrl,
12
13
  parseUrlScheme,
@@ -0,0 +1,192 @@
1
+ /*
2
+ * Markdown extension styles for MarkdownRenderer.
3
+ *
4
+ * Uses CSS custom properties from the Tailwind theme so colours
5
+ * adapt automatically to light/dark mode.
6
+ *
7
+ * Consumers must import this file in their app entry point:
8
+ * import '@vertesia/ui/src/widgets/markdown/markdown.css';
9
+ */
10
+
11
+ /* ------------------------------------------------------------------ */
12
+ /* Page break (:::pagebreak) */
13
+ /* Rendered as a subtle divider on the web (actual break in PDF) */
14
+ /* ------------------------------------------------------------------ */
15
+
16
+ .md-pagebreak {
17
+ border: none;
18
+ border-top: 2px dashed var(--color-border);
19
+ margin: 2rem 0;
20
+ }
21
+
22
+ /* ------------------------------------------------------------------ */
23
+ /* Columns layout (:::columns / :::column) */
24
+ /* ------------------------------------------------------------------ */
25
+
26
+ .md-columns {
27
+ display: flex;
28
+ gap: 1rem;
29
+ align-items: flex-start;
30
+ }
31
+
32
+ .md-columns > .md-column {
33
+ flex: 1 1 0%;
34
+ min-width: 0;
35
+ }
36
+
37
+ /* Stack on narrow viewports */
38
+ @media (max-width: 640px) {
39
+ .md-columns {
40
+ flex-direction: column;
41
+ }
42
+ }
43
+
44
+ /* ------------------------------------------------------------------ */
45
+ /* Callout containers (:::note, :::tip, :::warning, etc.) */
46
+ /* ------------------------------------------------------------------ */
47
+
48
+ .md-callout {
49
+ border-left: 4px solid var(--color-border);
50
+ border-radius: var(--radius-sm, 4px);
51
+ padding: 0.75rem 1rem;
52
+ margin: 1rem 0;
53
+ background: var(--color-muted-background, oklch(0.97 0 0));
54
+ }
55
+
56
+ .md-callout .md-callout-title {
57
+ font-weight: 600;
58
+ margin-bottom: 0.25rem;
59
+ }
60
+
61
+ /* Semantic variants */
62
+ .md-callout-info {
63
+ border-left-color: var(--color-info);
64
+ background: color-mix(in oklch, var(--color-info) 8%, var(--color-background));
65
+ }
66
+
67
+ .md-callout-info > .md-callout-title {
68
+ color: var(--color-info);
69
+ }
70
+
71
+ .md-callout-attention {
72
+ border-left-color: var(--color-attention);
73
+ background: color-mix(in oklch, var(--color-attention) 8%, var(--color-background));
74
+ }
75
+
76
+ .md-callout-attention > .md-callout-title {
77
+ color: var(--color-attention);
78
+ }
79
+
80
+ .md-callout-destructive {
81
+ border-left-color: var(--color-destructive);
82
+ background: color-mix(in oklch, var(--color-destructive) 8%, var(--color-background));
83
+ }
84
+
85
+ .md-callout-destructive > .md-callout-title {
86
+ color: var(--color-destructive);
87
+ }
88
+
89
+ /* ------------------------------------------------------------------ */
90
+ /* GitHub-style blockquote alerts (> [!NOTE], > [!WARNING], etc.) */
91
+ /* Uses classes from remark-github-blockquote-alert */
92
+ /* ------------------------------------------------------------------ */
93
+
94
+ .markdown-alert {
95
+ border-left: 4px solid var(--color-border);
96
+ border-radius: var(--radius-sm, 4px);
97
+ padding: 0.75rem 1rem;
98
+ margin: 1rem 0;
99
+ background: var(--color-muted-background, oklch(0.97 0 0));
100
+ }
101
+
102
+ .markdown-alert .markdown-alert-title {
103
+ display: flex;
104
+ align-items: center;
105
+ gap: 0.5rem;
106
+ font-weight: 600;
107
+ margin-bottom: 0.25rem;
108
+ }
109
+
110
+ .markdown-alert .markdown-alert-title svg {
111
+ width: 1em;
112
+ height: 1em;
113
+ flex-shrink: 0;
114
+ }
115
+
116
+ /* NOTE, TIP → info */
117
+ .markdown-alert-note,
118
+ .markdown-alert-tip {
119
+ border-left-color: var(--color-info);
120
+ background: color-mix(in oklch, var(--color-info) 8%, var(--color-background));
121
+ }
122
+
123
+ .markdown-alert-note > .markdown-alert-title,
124
+ .markdown-alert-tip > .markdown-alert-title {
125
+ color: var(--color-info);
126
+ }
127
+
128
+ /* WARNING, IMPORTANT → attention */
129
+ .markdown-alert-warning,
130
+ .markdown-alert-important {
131
+ border-left-color: var(--color-attention);
132
+ background: color-mix(in oklch, var(--color-attention) 8%, var(--color-background));
133
+ }
134
+
135
+ .markdown-alert-warning > .markdown-alert-title,
136
+ .markdown-alert-important > .markdown-alert-title {
137
+ color: var(--color-attention);
138
+ }
139
+
140
+ /* CAUTION → destructive */
141
+ .markdown-alert-caution {
142
+ border-left-color: var(--color-destructive);
143
+ background: color-mix(in oklch, var(--color-destructive) 8%, var(--color-background));
144
+ }
145
+
146
+ .markdown-alert-caution > .markdown-alert-title {
147
+ color: var(--color-destructive);
148
+ }
149
+
150
+ /* ------------------------------------------------------------------ */
151
+ /* Definition lists (<dl>, <dt>, <dd>) */
152
+ /* ------------------------------------------------------------------ */
153
+
154
+ .md-content dl {
155
+ margin: 1rem 0;
156
+ }
157
+
158
+ .md-content dt {
159
+ font-weight: 600;
160
+ margin-top: 0.75rem;
161
+ }
162
+
163
+ .md-content dt:first-child {
164
+ margin-top: 0;
165
+ }
166
+
167
+ .md-content dd {
168
+ margin-left: 1.5rem;
169
+ margin-top: 0.25rem;
170
+ }
171
+
172
+ /* ------------------------------------------------------------------ */
173
+ /* Figures (<figure> / <figcaption>) */
174
+ /* ------------------------------------------------------------------ */
175
+
176
+ .md-content figure {
177
+ margin: 1.5rem 0;
178
+ text-align: center;
179
+ }
180
+
181
+ .md-content figure img {
182
+ max-width: 100%;
183
+ height: auto;
184
+ margin: 0 auto;
185
+ }
186
+
187
+ .md-content figcaption {
188
+ font-size: 0.875rem;
189
+ color: var(--color-muted);
190
+ margin-top: 0.5rem;
191
+ font-style: italic;
192
+ }
@@ -0,0 +1,86 @@
1
+ import { describe, expect, it } from 'vitest';
2
+ import React from 'react';
3
+ import { renderToStaticMarkup } from 'react-dom/server';
4
+ import Markdown from 'react-markdown';
5
+ import remarkGfm from 'remark-gfm';
6
+ import { normalizeCustomSchemeLinks } from './normalizeCustomSchemeLinks';
7
+
8
+ function renderMarkdownToHtml(markdown: string): string {
9
+ return renderToStaticMarkup(
10
+ React.createElement(
11
+ Markdown,
12
+ { remarkPlugins: [remarkGfm], urlTransform: (url: string) => url },
13
+ markdown
14
+ )
15
+ );
16
+ }
17
+
18
+ describe('normalizeCustomSchemeLinks', () => {
19
+ it('proves baseline parser behavior: custom link with spaces is not rendered as an anchor before normalization', () => {
20
+ const input = '[Download PDF](artifact:out/INVOICE 2025-001.pdf)';
21
+ const beforeHtml = renderMarkdownToHtml(input);
22
+ const afterHtml = renderMarkdownToHtml(normalizeCustomSchemeLinks(input));
23
+
24
+ expect(beforeHtml).not.toContain('<a ');
25
+ expect(afterHtml).toContain('<a ');
26
+ });
27
+
28
+ it('wraps artifact destinations so links with spaces remain valid markdown', () => {
29
+ const input = '[Download PDF](artifact:out/INVOICE 2025-001.pdf)';
30
+ const output = normalizeCustomSchemeLinks(input);
31
+ expect(output).toBe('[Download PDF](<artifact:out/INVOICE 2025-001.pdf>)');
32
+ });
33
+
34
+ it('preserves optional markdown link titles', () => {
35
+ const input = '![Invoice](artifact:out/INVOICE 2025-001.pdf "Invoice PDF")';
36
+ const output = normalizeCustomSchemeLinks(input);
37
+ expect(output).toBe('![Invoice](<artifact:out/INVOICE 2025-001.pdf> "Invoice PDF")');
38
+ });
39
+
40
+ it('leaves already bracketed custom links unchanged', () => {
41
+ const input = '[Download](<artifact:out/INVOICE 2025-001.pdf>)';
42
+ const output = normalizeCustomSchemeLinks(input);
43
+ expect(output).toBe(input);
44
+ });
45
+
46
+ it('does not modify standard urls', () => {
47
+ const input = '[Docs](https://example.com/some path)';
48
+ const output = normalizeCustomSchemeLinks(input);
49
+ expect(output).toBe(input);
50
+ });
51
+
52
+ it('normalizes custom links inside table cells', () => {
53
+ const input = '| PDF |\n| --- |\n| [Download](artifact:out/INVOICE 2025-001.pdf) |';
54
+ const output = normalizeCustomSchemeLinks(input);
55
+ expect(output).toContain('[Download](<artifact:out/INVOICE 2025-001.pdf>)');
56
+ });
57
+
58
+ it('proves table-cell behavior: no anchor before normalization, anchor after normalization', () => {
59
+ const input = '| PDF |\n| --- |\n| [Download](artifact:out/INVOICE 2025-001.pdf) |';
60
+ const beforeHtml = renderMarkdownToHtml(input);
61
+ const afterHtml = renderMarkdownToHtml(normalizeCustomSchemeLinks(input));
62
+
63
+ expect(beforeHtml).toContain('<table>');
64
+ expect(beforeHtml).not.toContain('<a ');
65
+ expect(afterHtml).toContain('<table>');
66
+ expect(afterHtml).toContain('<a ');
67
+ });
68
+
69
+ it('does not rewrite inline code or fenced code blocks', () => {
70
+ const input = [
71
+ '`[inline](artifact:out/INVOICE 2025-001.pdf)`',
72
+ '',
73
+ '```md',
74
+ '[fenced](artifact:out/INVOICE 2025-001.pdf)',
75
+ '```',
76
+ '',
77
+ '[regular](artifact:out/INVOICE 2025-001.pdf)',
78
+ ].join('\n');
79
+
80
+ const output = normalizeCustomSchemeLinks(input);
81
+
82
+ expect(output).toContain('`[inline](artifact:out/INVOICE 2025-001.pdf)`');
83
+ expect(output).toContain('[fenced](artifact:out/INVOICE 2025-001.pdf)');
84
+ expect(output).toContain('[regular](<artifact:out/INVOICE 2025-001.pdf>)');
85
+ });
86
+ });
@@ -0,0 +1,91 @@
1
+ const CUSTOM_SCHEME_PREFIXES = [
2
+ 'artifact:',
3
+ 'image:',
4
+ 'store:',
5
+ 'document://',
6
+ 'collection:',
7
+ ];
8
+
9
+ const CUSTOM_LINK_REGEX = /(!?\[[^\]\n]*\]\()((?:artifact:|image:|store:|document:\/\/|collection:)[^)]+)(\))/g;
10
+ const INLINE_CODE_REGEX = /`[^`\n]*`/g;
11
+ const FENCED_CODE_BLOCK_REGEX = /(^|\n)(`{3,}|~{3,})[^\n]*\n[\s\S]*?\n\2(?=\n|$)/g;
12
+ const LINK_TITLE_SUFFIX_REGEX = /\s+("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|\([^)]*\))\s*$/;
13
+
14
+ function hasCustomScheme(destination: string): boolean {
15
+ return CUSTOM_SCHEME_PREFIXES.some(prefix => destination.startsWith(prefix));
16
+ }
17
+
18
+ function wrapCustomDestination(destinationWithOptionalTitle: string): string {
19
+ const trimmed = destinationWithOptionalTitle.trim();
20
+
21
+ // Preserve already angle-bracketed custom destinations.
22
+ if (trimmed.startsWith('<')) {
23
+ const closeIdx = trimmed.indexOf('>');
24
+ if (closeIdx > 0) {
25
+ const bracketedDestination = trimmed.slice(1, closeIdx).trim();
26
+ if (hasCustomScheme(bracketedDestination)) {
27
+ return destinationWithOptionalTitle;
28
+ }
29
+ }
30
+ }
31
+
32
+ const titleMatch = trimmed.match(LINK_TITLE_SUFFIX_REGEX);
33
+ const titleStart = titleMatch?.index ?? -1;
34
+ const destination = (titleStart >= 0 ? trimmed.slice(0, titleStart) : trimmed).trim();
35
+ const title = titleStart >= 0 ? trimmed.slice(titleStart) : '';
36
+
37
+ if (!hasCustomScheme(destination)) {
38
+ return destinationWithOptionalTitle;
39
+ }
40
+
41
+ return `<${destination}>${title}`;
42
+ }
43
+
44
+ function normalizeCustomLinksInText(text: string): string {
45
+ return text.replace(CUSTOM_LINK_REGEX, (_fullMatch, open, destination, close) => {
46
+ return `${open}${wrapCustomDestination(destination)}${close}`;
47
+ });
48
+ }
49
+
50
+ function normalizeOutsideInlineCode(text: string): string {
51
+ let result = '';
52
+ let lastIndex = 0;
53
+ let match: RegExpExecArray | null;
54
+
55
+ INLINE_CODE_REGEX.lastIndex = 0;
56
+ while ((match = INLINE_CODE_REGEX.exec(text)) !== null) {
57
+ result += normalizeCustomLinksInText(text.slice(lastIndex, match.index));
58
+ result += match[0];
59
+ lastIndex = match.index + match[0].length;
60
+ }
61
+
62
+ result += normalizeCustomLinksInText(text.slice(lastIndex));
63
+ return result;
64
+ }
65
+
66
+ /**
67
+ * Normalizes inline markdown links/images with custom URL schemes so they parse
68
+ * correctly even when paths contain spaces (e.g. artifact:out/INVOICE 2025-001.pdf).
69
+ *
70
+ * CommonMark requires destinations with spaces to be wrapped in <...>.
71
+ * We apply this only outside fenced/inline code spans.
72
+ */
73
+ export function normalizeCustomSchemeLinks(markdown: string): string {
74
+ if (!markdown || !CUSTOM_SCHEME_PREFIXES.some(prefix => markdown.includes(prefix))) {
75
+ return markdown;
76
+ }
77
+
78
+ let result = '';
79
+ let lastIndex = 0;
80
+ let match: RegExpExecArray | null;
81
+
82
+ FENCED_CODE_BLOCK_REGEX.lastIndex = 0;
83
+ while ((match = FENCED_CODE_BLOCK_REGEX.exec(markdown)) !== null) {
84
+ result += normalizeOutsideInlineCode(markdown.slice(lastIndex, match.index));
85
+ result += match[0];
86
+ lastIndex = match.index + match[0].length;
87
+ }
88
+
89
+ result += normalizeOutsideInlineCode(markdown.slice(lastIndex));
90
+ return result;
91
+ }
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Normalize Pandoc-style single-line fenced divs into remark-directive syntax.
3
+ *
4
+ * Pandoc allows single-line containers:
5
+ * ::: pagebreak :::
6
+ * ::: tip Some content here. :::
7
+ *
8
+ * remark-directive requires multi-line containers:
9
+ * :::pagebreak
10
+ * :::
11
+ *
12
+ * :::tip
13
+ * Some content here.
14
+ * :::
15
+ *
16
+ * This preprocessor converts the single-line form into multi-line so that
17
+ * remark-directive can parse them correctly.
18
+ */
19
+
20
+ /**
21
+ * Regex matching a single-line fenced div:
22
+ * ::: name optional-content :::
23
+ *
24
+ * Groups:
25
+ * [1] leading indent
26
+ * [2] directive name (word chars only)
27
+ * [3] optional inline content (may be empty)
28
+ *
29
+ * Only matches when both opening and closing ::: are on the SAME line,
30
+ * so it won't interfere with properly formatted multi-line containers.
31
+ */
32
+ const SINGLE_LINE_DIRECTIVE = /^([ \t]*):::\s*(\w+)\s*(.*?)\s*:::[ \t]*$/gm;
33
+
34
+ export function normalizeDirectives(markdown: string): string {
35
+ if (!markdown || !markdown.includes(':::')) {
36
+ return markdown;
37
+ }
38
+
39
+ return markdown.replace(
40
+ SINGLE_LINE_DIRECTIVE,
41
+ (_match, indent: string, name: string, content: string) => {
42
+ if (content) {
43
+ // Has content → multi-line container directive
44
+ return `${indent}:::${name}\n${indent}${content}\n${indent}:::`;
45
+ }
46
+ // No content → leaf directive (::name)
47
+ return `${indent}::${name}`;
48
+ }
49
+ );
50
+ }