@vertesia/ui 1.5.0-dev.20260807.073259Z → 1.5.0-dev.20260901.005903Z

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 (502) hide show
  1. package/README.md +1 -7
  2. package/lib/core/components/FormItem.d.ts.map +1 -1
  3. package/lib/core/components/FormItem.js +2 -3
  4. package/lib/core/components/FormItem.js.map +1 -1
  5. package/lib/core/components/InfoTip.d.ts +20 -0
  6. package/lib/core/components/InfoTip.d.ts.map +1 -0
  7. package/lib/core/components/InfoTip.js +18 -0
  8. package/lib/core/components/InfoTip.js.map +1 -0
  9. package/lib/core/components/index.d.ts +1 -0
  10. package/lib/core/components/index.d.ts.map +1 -1
  11. package/lib/core/components/index.js +1 -0
  12. package/lib/core/components/index.js.map +1 -1
  13. package/lib/core/components/shadcn/Panel.d.ts.map +1 -1
  14. package/lib/core/components/shadcn/Panel.js +3 -3
  15. package/lib/core/components/shadcn/Panel.js.map +1 -1
  16. package/lib/core/components/shadcn/filters/comboBox/DateCombobox.js +1 -1
  17. package/lib/core/components/shadcn/filters/comboBox/DateCombobox.js.map +1 -1
  18. package/lib/core/components/shadcn/filters/filter/dateFilter.d.ts.map +1 -1
  19. package/lib/core/components/shadcn/filters/filter/dateFilter.js +1 -1
  20. package/lib/core/components/shadcn/filters/filter/dateFilter.js.map +1 -1
  21. package/lib/core/components/shadcn/filters/filters.d.ts.map +1 -1
  22. package/lib/core/components/shadcn/filters/filters.js +1 -1
  23. package/lib/core/components/shadcn/filters/filters.js.map +1 -1
  24. package/lib/core/components/shadcn/index.d.ts +1 -0
  25. package/lib/core/components/shadcn/index.d.ts.map +1 -1
  26. package/lib/core/components/shadcn/index.js +1 -0
  27. package/lib/core/components/shadcn/index.js.map +1 -1
  28. package/lib/core/components/shadcn/modal/dialog.d.ts.map +1 -1
  29. package/lib/core/components/shadcn/modal/dialog.js +1 -3
  30. package/lib/core/components/shadcn/modal/dialog.js.map +1 -1
  31. package/lib/core/components/shadcn/overflowTabs.d.ts +59 -0
  32. package/lib/core/components/shadcn/overflowTabs.d.ts.map +1 -0
  33. package/lib/core/components/shadcn/overflowTabs.js +173 -0
  34. package/lib/core/components/shadcn/overflowTabs.js.map +1 -0
  35. package/lib/core/components/shadcn/selectBox.js +2 -2
  36. package/lib/core/components/shadcn/selectBox.js.map +1 -1
  37. package/lib/core/components/shadcn/theme/ThemeProvider.d.ts +3 -1
  38. package/lib/core/components/shadcn/theme/ThemeProvider.d.ts.map +1 -1
  39. package/lib/core/components/shadcn/theme/ThemeProvider.js +8 -9
  40. package/lib/core/components/shadcn/theme/ThemeProvider.js.map +1 -1
  41. package/lib/core/utils/dayjs.d.ts +12 -0
  42. package/lib/core/utils/dayjs.d.ts.map +1 -0
  43. package/lib/core/utils/dayjs.js +16 -0
  44. package/lib/core/utils/dayjs.js.map +1 -0
  45. package/lib/env/index.d.ts +17 -0
  46. package/lib/env/index.d.ts.map +1 -1
  47. package/lib/env/index.js +18 -1
  48. package/lib/env/index.js.map +1 -1
  49. package/lib/features/agent/PayloadBuilder.d.ts +1 -0
  50. package/lib/features/agent/PayloadBuilder.d.ts.map +1 -1
  51. package/lib/features/agent/PayloadBuilder.js +22 -5
  52. package/lib/features/agent/PayloadBuilder.js.map +1 -1
  53. package/lib/features/agent/chat/AgentRightPanel.d.ts.map +1 -1
  54. package/lib/features/agent/chat/AgentRightPanel.js +3 -135
  55. package/lib/features/agent/chat/AgentRightPanel.js.map +1 -1
  56. package/lib/features/agent/chat/ArtifactsTab.d.ts.map +1 -1
  57. package/lib/features/agent/chat/ArtifactsTab.js +1 -1
  58. package/lib/features/agent/chat/ArtifactsTab.js.map +1 -1
  59. package/lib/features/agent/chat/AskUserWidget.d.ts.map +1 -1
  60. package/lib/features/agent/chat/AskUserWidget.js +19 -4
  61. package/lib/features/agent/chat/AskUserWidget.js.map +1 -1
  62. package/lib/features/agent/chat/ModernAgentConversation.d.ts +6 -0
  63. package/lib/features/agent/chat/ModernAgentConversation.d.ts.map +1 -1
  64. package/lib/features/agent/chat/ModernAgentConversation.js +99 -29
  65. package/lib/features/agent/chat/ModernAgentConversation.js.map +1 -1
  66. package/lib/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.d.ts.map +1 -1
  67. package/lib/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.js +10 -9
  68. package/lib/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.js.map +1 -1
  69. package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
  70. package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +5 -8
  71. package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
  72. package/lib/features/agent/chat/ModernAgentOutput/AttachmentPreview.d.ts.map +1 -1
  73. package/lib/features/agent/chat/ModernAgentOutput/AttachmentPreview.js +45 -4
  74. package/lib/features/agent/chat/ModernAgentOutput/AttachmentPreview.js.map +1 -1
  75. package/lib/features/agent/chat/ModernAgentOutput/BatchProgressPanel.js +1 -1
  76. package/lib/features/agent/chat/ModernAgentOutput/BatchProgressPanel.js.map +1 -1
  77. package/lib/features/agent/chat/ModernAgentOutput/Header.d.ts.map +1 -1
  78. package/lib/features/agent/chat/ModernAgentOutput/Header.js +3 -3
  79. package/lib/features/agent/chat/ModernAgentOutput/Header.js.map +1 -1
  80. package/lib/features/agent/chat/ModernAgentOutput/MessageItem.d.ts.map +1 -1
  81. package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js +1 -1
  82. package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -1
  83. package/lib/features/agent/chat/ModernAgentOutput/StreamingMessage.d.ts.map +1 -1
  84. package/lib/features/agent/chat/ModernAgentOutput/StreamingMessage.js +1 -1
  85. package/lib/features/agent/chat/ModernAgentOutput/StreamingMessage.js.map +1 -1
  86. package/lib/features/agent/chat/ModernAgentOutput/ToolCallGroup.js +1 -1
  87. package/lib/features/agent/chat/ModernAgentOutput/ToolCallGroup.js.map +1 -1
  88. package/lib/features/agent/chat/ModernAgentOutput/WorkstreamTabs.d.ts.map +1 -1
  89. package/lib/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js +9 -121
  90. package/lib/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js.map +1 -1
  91. package/lib/features/agent/chat/ModernAgentOutput/utils.d.ts +6 -0
  92. package/lib/features/agent/chat/ModernAgentOutput/utils.d.ts.map +1 -1
  93. package/lib/features/agent/chat/ModernAgentOutput/utils.js +19 -11
  94. package/lib/features/agent/chat/ModernAgentOutput/utils.js.map +1 -1
  95. package/lib/features/agent/chat/VegaLiteChart.d.ts.map +1 -1
  96. package/lib/features/agent/chat/VegaLiteChart.js +11 -3
  97. package/lib/features/agent/chat/VegaLiteChart.js.map +1 -1
  98. package/lib/features/agent/chat/hooks/useAgentStream.d.ts.map +1 -1
  99. package/lib/features/agent/chat/hooks/useAgentStream.js +3 -0
  100. package/lib/features/agent/chat/hooks/useAgentStream.js.map +1 -1
  101. package/lib/features/document-viewer/UniversalDocumentViewer.d.ts.map +1 -1
  102. package/lib/features/document-viewer/UniversalDocumentViewer.js +1 -1
  103. package/lib/features/document-viewer/UniversalDocumentViewer.js.map +1 -1
  104. package/lib/features/facets/AgentRunnerFacetsNav.d.ts +14 -2
  105. package/lib/features/facets/AgentRunnerFacetsNav.d.ts.map +1 -1
  106. package/lib/features/facets/AgentRunnerFacetsNav.js +20 -2
  107. package/lib/features/facets/AgentRunnerFacetsNav.js.map +1 -1
  108. package/lib/features/facets/CollectionsFacetsNav.d.ts +3 -3
  109. package/lib/features/facets/CollectionsFacetsNav.d.ts.map +1 -1
  110. package/lib/features/facets/CollectionsFacetsNav.js +6 -1
  111. package/lib/features/facets/CollectionsFacetsNav.js.map +1 -1
  112. package/lib/features/facets/DocumentsFacetsNav.d.ts +3 -3
  113. package/lib/features/facets/DocumentsFacetsNav.d.ts.map +1 -1
  114. package/lib/features/facets/DocumentsFacetsNav.js +20 -8
  115. package/lib/features/facets/DocumentsFacetsNav.js.map +1 -1
  116. package/lib/features/facets/InteractionsFacetsNav.d.ts +3 -3
  117. package/lib/features/facets/InteractionsFacetsNav.d.ts.map +1 -1
  118. package/lib/features/facets/InteractionsFacetsNav.js +11 -1
  119. package/lib/features/facets/InteractionsFacetsNav.js.map +1 -1
  120. package/lib/features/facets/PromptsFacetsNav.d.ts +3 -3
  121. package/lib/features/facets/PromptsFacetsNav.d.ts.map +1 -1
  122. package/lib/features/facets/PromptsFacetsNav.js +6 -1
  123. package/lib/features/facets/PromptsFacetsNav.js.map +1 -1
  124. package/lib/features/facets/RunsFacetsNav.d.ts +4 -14
  125. package/lib/features/facets/RunsFacetsNav.d.ts.map +1 -1
  126. package/lib/features/facets/RunsFacetsNav.js +26 -15
  127. package/lib/features/facets/RunsFacetsNav.js.map +1 -1
  128. package/lib/features/facets/WorkflowExecutionsFacetsNav.d.ts +4 -3
  129. package/lib/features/facets/WorkflowExecutionsFacetsNav.d.ts.map +1 -1
  130. package/lib/features/facets/WorkflowExecutionsFacetsNav.js +18 -10
  131. package/lib/features/facets/WorkflowExecutionsFacetsNav.js.map +1 -1
  132. package/lib/features/facets/index.d.ts +1 -1
  133. package/lib/features/facets/index.d.ts.map +1 -1
  134. package/lib/features/facets/index.js.map +1 -1
  135. package/lib/features/facets/utils/SearchInterface.d.ts +4 -3
  136. package/lib/features/facets/utils/SearchInterface.d.ts.map +1 -1
  137. package/lib/features/facets/utils/SearchInterface.js +4 -0
  138. package/lib/features/facets/utils/SearchInterface.js.map +1 -1
  139. package/lib/features/layout/GenericPageNavHeader.d.ts +8 -1
  140. package/lib/features/layout/GenericPageNavHeader.d.ts.map +1 -1
  141. package/lib/features/layout/GenericPageNavHeader.js +9 -1
  142. package/lib/features/layout/GenericPageNavHeader.js.map +1 -1
  143. package/lib/features/magic-pdf/DownloadPopover.d.ts +3 -2
  144. package/lib/features/magic-pdf/DownloadPopover.d.ts.map +1 -1
  145. package/lib/features/magic-pdf/DownloadPopover.js.map +1 -1
  146. package/lib/features/magic-pdf/GroundedExtractionView.d.ts.map +1 -1
  147. package/lib/features/magic-pdf/GroundedExtractionView.js +51 -64
  148. package/lib/features/magic-pdf/GroundedExtractionView.js.map +1 -1
  149. package/lib/features/oauth/McpConnectionsButton.d.ts +1 -1
  150. package/lib/features/oauth/McpConnectionsButton.d.ts.map +1 -1
  151. package/lib/features/oauth/McpConnectionsButton.js +2 -2
  152. package/lib/features/oauth/McpConnectionsButton.js.map +1 -1
  153. package/lib/features/oauth/McpConnectionsDialog.d.ts +1 -1
  154. package/lib/features/oauth/McpConnectionsDialog.js +2 -2
  155. package/lib/features/oauth/McpConnectionsDialog.js.map +1 -1
  156. package/lib/features/oauth/useMcpConnections.d.ts +4 -5
  157. package/lib/features/oauth/useMcpConnections.d.ts.map +1 -1
  158. package/lib/features/oauth/useMcpConnections.js +20 -4
  159. package/lib/features/oauth/useMcpConnections.js.map +1 -1
  160. package/lib/features/pdf-viewer/PdfPageRenderer.d.ts.map +1 -1
  161. package/lib/features/pdf-viewer/PdfPageRenderer.js +9 -11
  162. package/lib/features/pdf-viewer/PdfPageRenderer.js.map +1 -1
  163. package/lib/features/pdf-viewer/lazyReactPdf.d.ts +10 -0
  164. package/lib/features/pdf-viewer/lazyReactPdf.d.ts.map +1 -0
  165. package/lib/features/pdf-viewer/lazyReactPdf.js +25 -0
  166. package/lib/features/pdf-viewer/lazyReactPdf.js.map +1 -0
  167. package/lib/features/store/collections/CollectionsTable.d.ts.map +1 -1
  168. package/lib/features/store/collections/CollectionsTable.js +1 -3
  169. package/lib/features/store/collections/CollectionsTable.js.map +1 -1
  170. package/lib/features/store/collections/EditCollectionView.js +1 -1
  171. package/lib/features/store/collections/EditCollectionView.js.map +1 -1
  172. package/lib/features/store/objects/ExportPropertiesModal.d.ts +3 -1
  173. package/lib/features/store/objects/ExportPropertiesModal.d.ts.map +1 -1
  174. package/lib/features/store/objects/ExportPropertiesModal.js +5 -5
  175. package/lib/features/store/objects/ExportPropertiesModal.js.map +1 -1
  176. package/lib/features/store/objects/components/ContentOverview.d.ts.map +1 -1
  177. package/lib/features/store/objects/components/ContentOverview.js +4 -10
  178. package/lib/features/store/objects/components/ContentOverview.js.map +1 -1
  179. package/lib/features/store/objects/components/TextEditorPanel.d.ts.map +1 -1
  180. package/lib/features/store/objects/components/TextEditorPanel.js +8 -3
  181. package/lib/features/store/objects/components/TextEditorPanel.js.map +1 -1
  182. package/lib/features/store/objects/layout/renderers.d.ts.map +1 -1
  183. package/lib/features/store/objects/layout/renderers.js +1 -5
  184. package/lib/features/store/objects/layout/renderers.js.map +1 -1
  185. package/lib/features/store/objects/search/DocumentSearchContext.d.ts +44 -62
  186. package/lib/features/store/objects/search/DocumentSearchContext.d.ts.map +1 -1
  187. package/lib/features/store/objects/search/DocumentSearchContext.js +47 -2
  188. package/lib/features/store/objects/search/DocumentSearchContext.js.map +1 -1
  189. package/lib/features/store/objects/selection/actions/DeleteObjectsAction.d.ts.map +1 -1
  190. package/lib/features/store/objects/selection/actions/DeleteObjectsAction.js +5 -0
  191. package/lib/features/store/objects/selection/actions/DeleteObjectsAction.js.map +1 -1
  192. package/lib/features/store/objects/upload/DocumentUploadModal.d.ts +6 -1
  193. package/lib/features/store/objects/upload/DocumentUploadModal.d.ts.map +1 -1
  194. package/lib/features/store/objects/upload/DocumentUploadModal.js +4 -3
  195. package/lib/features/store/objects/upload/DocumentUploadModal.js.map +1 -1
  196. package/lib/features/store/objects/upload/useSmartFileUploadProcessing.d.ts.map +1 -1
  197. package/lib/features/store/objects/upload/useSmartFileUploadProcessing.js +2 -2
  198. package/lib/features/store/objects/upload/useSmartFileUploadProcessing.js.map +1 -1
  199. package/lib/features/store/types/ContentObjectTypesTable.d.ts.map +1 -1
  200. package/lib/features/store/types/ContentObjectTypesTable.js +1 -3
  201. package/lib/features/store/types/ContentObjectTypesTable.js.map +1 -1
  202. package/lib/features/store/types/IntakePolicyEditor.d.ts.map +1 -1
  203. package/lib/features/store/types/IntakePolicyEditor.js +12 -2
  204. package/lib/features/store/types/IntakePolicyEditor.js.map +1 -1
  205. package/lib/features/store/types/IntakePolicyForm.d.ts.map +1 -1
  206. package/lib/features/store/types/IntakePolicyForm.js +15 -15
  207. package/lib/features/store/types/IntakePolicyForm.js.map +1 -1
  208. package/lib/features/store/types/ObjectSchemaEditor.d.ts.map +1 -1
  209. package/lib/features/store/types/ObjectSchemaEditor.js +6 -2
  210. package/lib/features/store/types/ObjectSchemaEditor.js.map +1 -1
  211. package/lib/features/store/types/TableLayoutEditor.d.ts.map +1 -1
  212. package/lib/features/store/types/TableLayoutEditor.js +2 -0
  213. package/lib/features/store/types/TableLayoutEditor.js.map +1 -1
  214. package/lib/features/store/types/TypeRegistry.d.ts +282 -0
  215. package/lib/features/store/types/TypeRegistry.d.ts.map +1 -1
  216. package/lib/features/store/types/search/ObjectTypeSearchContext.d.ts +281 -0
  217. package/lib/features/store/types/search/ObjectTypeSearchContext.d.ts.map +1 -1
  218. package/lib/features/user/UserInfo.d.ts.map +1 -1
  219. package/lib/features/user/UserInfo.js +2 -4
  220. package/lib/features/user/UserInfo.js.map +1 -1
  221. package/lib/features/views/ViewActions.d.ts +32 -0
  222. package/lib/features/views/ViewActions.d.ts.map +1 -0
  223. package/lib/features/views/ViewActions.js +186 -0
  224. package/lib/features/views/ViewActions.js.map +1 -0
  225. package/lib/features/views/ViewDropTarget.d.ts +15 -0
  226. package/lib/features/views/ViewDropTarget.d.ts.map +1 -0
  227. package/lib/features/views/ViewDropTarget.js +79 -0
  228. package/lib/features/views/ViewDropTarget.js.map +1 -0
  229. package/lib/features/views/ViewExperience.d.ts +3 -2
  230. package/lib/features/views/ViewExperience.d.ts.map +1 -1
  231. package/lib/features/views/ViewExperience.js +103 -12
  232. package/lib/features/views/ViewExperience.js.map +1 -1
  233. package/lib/features/views/ViewNavigation.d.ts +1 -1
  234. package/lib/features/views/ViewNavigation.d.ts.map +1 -1
  235. package/lib/features/views/ViewNavigation.js +14 -5
  236. package/lib/features/views/ViewNavigation.js.map +1 -1
  237. package/lib/features/views/ViewResults.d.ts +1 -1
  238. package/lib/features/views/ViewResults.d.ts.map +1 -1
  239. package/lib/features/views/ViewResults.js +124 -34
  240. package/lib/features/views/ViewResults.js.map +1 -1
  241. package/lib/features/views/index.d.ts +1 -0
  242. package/lib/features/views/index.d.ts.map +1 -1
  243. package/lib/features/views/index.js +1 -0
  244. package/lib/features/views/index.js.map +1 -1
  245. package/lib/features/views/types.d.ts +46 -1
  246. package/lib/features/views/types.d.ts.map +1 -1
  247. package/lib/features/views/viewState.d.ts.map +1 -1
  248. package/lib/features/views/viewState.js +34 -0
  249. package/lib/features/views/viewState.js.map +1 -1
  250. package/lib/i18n/LanguageProvider.d.ts +3 -1
  251. package/lib/i18n/LanguageProvider.d.ts.map +1 -1
  252. package/lib/i18n/LanguageProvider.js +9 -7
  253. package/lib/i18n/LanguageProvider.js.map +1 -1
  254. package/lib/i18n/instance.d.ts +2 -0
  255. package/lib/i18n/instance.d.ts.map +1 -1
  256. package/lib/i18n/instance.js +45 -26
  257. package/lib/i18n/instance.js.map +1 -1
  258. package/lib/i18n/locales/ar.json +296 -15
  259. package/lib/i18n/locales/de.json +294 -13
  260. package/lib/i18n/locales/en.json +65 -4
  261. package/lib/i18n/locales/es.json +295 -14
  262. package/lib/i18n/locales/fr.json +294 -13
  263. package/lib/i18n/locales/it.json +294 -13
  264. package/lib/i18n/locales/ja.json +292 -10
  265. package/lib/i18n/locales/ko.json +292 -10
  266. package/lib/i18n/locales/pt.json +294 -13
  267. package/lib/i18n/locales/ru.json +291 -10
  268. package/lib/i18n/locales/tr.json +291 -10
  269. package/lib/i18n/locales/zh-TW.json +292 -10
  270. package/lib/i18n/locales/zh.json +292 -10
  271. package/lib/router/RouteComponent.d.ts +8 -0
  272. package/lib/router/RouteComponent.d.ts.map +1 -1
  273. package/lib/router/RouteComponent.js +41 -9
  274. package/lib/router/RouteComponent.js.map +1 -1
  275. package/lib/session/UserSessionProvider.d.ts.map +1 -1
  276. package/lib/session/UserSessionProvider.js +20 -29
  277. package/lib/session/UserSessionProvider.js.map +1 -1
  278. package/lib/session/auth/composable.d.ts.map +1 -1
  279. package/lib/session/auth/composable.js +25 -19
  280. package/lib/session/auth/composable.js.map +1 -1
  281. package/lib/session/auth/domainRouting.d.ts +11 -0
  282. package/lib/session/auth/domainRouting.d.ts.map +1 -1
  283. package/lib/session/auth/domainRouting.js +13 -0
  284. package/lib/session/auth/domainRouting.js.map +1 -1
  285. package/lib/session/auth/firebase.js +1 -1
  286. package/lib/session/auth/firebase.js.map +1 -1
  287. package/lib/session/useUXTracking.d.ts.map +1 -1
  288. package/lib/session/useUXTracking.js +6 -1
  289. package/lib/session/useUXTracking.js.map +1 -1
  290. package/lib/shell/VertesiaShell.d.ts.map +1 -1
  291. package/lib/shell/VertesiaShell.js +2 -1
  292. package/lib/shell/VertesiaShell.js.map +1 -1
  293. package/lib/shell/apps/AppInstallationProvider.d.ts +4 -2
  294. package/lib/shell/apps/AppInstallationProvider.d.ts.map +1 -1
  295. package/lib/shell/apps/IframeAppContextSync.d.ts +3 -0
  296. package/lib/shell/apps/IframeAppContextSync.d.ts.map +1 -0
  297. package/lib/shell/apps/IframeAppContextSync.js +95 -0
  298. package/lib/shell/apps/IframeAppContextSync.js.map +1 -0
  299. package/lib/shell/apps/iframe-auth.d.ts +55 -0
  300. package/lib/shell/apps/iframe-auth.d.ts.map +1 -0
  301. package/lib/shell/apps/iframe-auth.js +154 -0
  302. package/lib/shell/apps/iframe-auth.js.map +1 -0
  303. package/lib/shell/apps/index.d.ts +2 -0
  304. package/lib/shell/apps/index.d.ts.map +1 -1
  305. package/lib/shell/apps/index.js +2 -0
  306. package/lib/shell/apps/index.js.map +1 -1
  307. package/lib/vertesia-ui-core.js +199 -4
  308. package/lib/vertesia-ui-core.js.map +1 -1
  309. package/lib/vertesia-ui-env.js +1 -1
  310. package/lib/vertesia-ui-env.js.map +1 -1
  311. package/lib/vertesia-ui-features.js +975 -35
  312. package/lib/vertesia-ui-features.js.map +1 -1
  313. package/lib/vertesia-ui-i18n.BJBGsq-8.chunk.js +5 -0
  314. package/lib/vertesia-ui-i18n.BJBGsq-8.chunk.js.map +1 -0
  315. package/lib/vertesia-ui-i18n.BY5YG5cX.chunk.js +5 -0
  316. package/lib/vertesia-ui-i18n.BY5YG5cX.chunk.js.map +1 -0
  317. package/lib/vertesia-ui-i18n.Bd5_1BXO.chunk.js +5 -0
  318. package/lib/vertesia-ui-i18n.Bd5_1BXO.chunk.js.map +1 -0
  319. package/lib/vertesia-ui-i18n.Bvwej2HH.chunk.js +5 -0
  320. package/lib/vertesia-ui-i18n.Bvwej2HH.chunk.js.map +1 -0
  321. package/lib/vertesia-ui-i18n.CMT3f4gf.chunk.js +5 -0
  322. package/lib/vertesia-ui-i18n.CMT3f4gf.chunk.js.map +1 -0
  323. package/lib/vertesia-ui-i18n.D56DNPJW.chunk.js +5 -0
  324. package/lib/vertesia-ui-i18n.D56DNPJW.chunk.js.map +1 -0
  325. package/lib/vertesia-ui-i18n.DDzKLNx6.chunk.js +5 -0
  326. package/lib/vertesia-ui-i18n.DDzKLNx6.chunk.js.map +1 -0
  327. package/lib/vertesia-ui-i18n.D_Am1LpF.chunk.js +5 -0
  328. package/lib/vertesia-ui-i18n.D_Am1LpF.chunk.js.map +1 -0
  329. package/lib/vertesia-ui-i18n.DrZizgGV.chunk.js +5 -0
  330. package/lib/vertesia-ui-i18n.DrZizgGV.chunk.js.map +1 -0
  331. package/lib/vertesia-ui-i18n.DwHsq86z.chunk.js +5 -0
  332. package/lib/vertesia-ui-i18n.DwHsq86z.chunk.js.map +1 -0
  333. package/lib/vertesia-ui-i18n.PLpo0Bbz.chunk.js +5 -0
  334. package/lib/vertesia-ui-i18n.PLpo0Bbz.chunk.js.map +1 -0
  335. package/lib/vertesia-ui-i18n.js +2 -38
  336. package/lib/vertesia-ui-i18n.js.map +1 -1
  337. package/lib/vertesia-ui-i18n.xVbXALqz.chunk.js +5 -0
  338. package/lib/vertesia-ui-i18n.xVbXALqz.chunk.js.map +1 -0
  339. package/lib/vertesia-ui-layout.js +80 -1
  340. package/lib/vertesia-ui-layout.js.map +1 -1
  341. package/lib/vertesia-ui-rich-text.js +278 -4
  342. package/lib/vertesia-ui-rich-text.js.map +1 -1
  343. package/lib/vertesia-ui-router.js +1 -1
  344. package/lib/vertesia-ui-router.js.map +1 -1
  345. package/lib/vertesia-ui-session.js +1 -1
  346. package/lib/vertesia-ui-session.js.map +1 -1
  347. package/lib/vertesia-ui-shell.js +118 -1
  348. package/lib/vertesia-ui-shell.js.map +1 -1
  349. package/lib/vertesia-ui-widgets.js +336 -20
  350. package/lib/vertesia-ui-widgets.js.map +1 -1
  351. package/lib/widgets/markdown/MarkdownRenderer.d.ts.map +1 -1
  352. package/lib/widgets/markdown/MarkdownRenderer.js +43 -2
  353. package/lib/widgets/markdown/MarkdownRenderer.js.map +1 -1
  354. package/lib/widgets/markdown/MermaidDiagram.d.ts.map +1 -1
  355. package/lib/widgets/markdown/MermaidDiagram.js +35 -22
  356. package/lib/widgets/markdown/MermaidDiagram.js.map +1 -1
  357. package/lib/widgets/monacoEditor/MonacoEditor.d.ts.map +1 -1
  358. package/lib/widgets/monacoEditor/MonacoEditor.js +14 -10
  359. package/lib/widgets/monacoEditor/MonacoEditor.js.map +1 -1
  360. package/lib/widgets/xml-viewer/hooks/useCollapsible.d.ts +1 -1
  361. package/package.json +24 -29
  362. package/src/core/components/FormItem.tsx +2 -5
  363. package/src/core/components/InfoTip.test.tsx +33 -0
  364. package/src/core/components/InfoTip.tsx +32 -0
  365. package/src/core/components/index.ts +1 -0
  366. package/src/core/components/shadcn/Panel.tsx +3 -7
  367. package/src/core/components/shadcn/filters/comboBox/DateCombobox.tsx +1 -1
  368. package/src/core/components/shadcn/filters/filter/dateFilter.tsx +1 -1
  369. package/src/core/components/shadcn/filters/filters.tsx +1 -1
  370. package/src/core/components/shadcn/index.ts +1 -0
  371. package/src/core/components/shadcn/modal/dialog.test.tsx +35 -0
  372. package/src/core/components/shadcn/modal/dialog.tsx +0 -4
  373. package/src/core/components/shadcn/overflowTabs.tsx +320 -0
  374. package/src/core/components/shadcn/selectBox.tsx +2 -2
  375. package/src/core/components/shadcn/theme/ThemeProvider.tsx +10 -9
  376. package/src/core/utils/dayjs.ts +17 -0
  377. package/src/css/base.css +78 -0
  378. package/src/env/index.test.ts +94 -0
  379. package/src/env/index.ts +36 -1
  380. package/src/features/agent/PayloadBuilder.test.ts +68 -0
  381. package/src/features/agent/PayloadBuilder.tsx +28 -4
  382. package/src/features/agent/chat/AgentRightPanel.tsx +2 -252
  383. package/src/features/agent/chat/ArtifactsTab.tsx +1 -0
  384. package/src/features/agent/chat/AskUserWidget.test.tsx +20 -1
  385. package/src/features/agent/chat/AskUserWidget.tsx +22 -6
  386. package/src/features/agent/chat/ModernAgentConversation.test.tsx +160 -0
  387. package/src/features/agent/chat/ModernAgentConversation.tsx +111 -31
  388. package/src/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.tsx +86 -67
  389. package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.test.tsx +90 -7
  390. package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +4 -6
  391. package/src/features/agent/chat/ModernAgentOutput/AttachmentPreview.test.ts +103 -1
  392. package/src/features/agent/chat/ModernAgentOutput/AttachmentPreview.tsx +50 -4
  393. package/src/features/agent/chat/ModernAgentOutput/BatchProgressPanel.tsx +1 -1
  394. package/src/features/agent/chat/ModernAgentOutput/Header.tsx +18 -1
  395. package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +1 -1
  396. package/src/features/agent/chat/ModernAgentOutput/StreamingMessage.tsx +1 -1
  397. package/src/features/agent/chat/ModernAgentOutput/ToolCallGroup.tsx +1 -1
  398. package/src/features/agent/chat/ModernAgentOutput/WorkstreamTabs.tsx +37 -167
  399. package/src/features/agent/chat/ModernAgentOutput/utils.test.ts +94 -0
  400. package/src/features/agent/chat/ModernAgentOutput/utils.ts +19 -10
  401. package/src/features/agent/chat/VegaLiteChart.tsx +32 -14
  402. package/src/features/agent/chat/hooks/useAgentStream.test.tsx +18 -0
  403. package/src/features/agent/chat/hooks/useAgentStream.ts +3 -0
  404. package/src/features/document-viewer/UniversalDocumentViewer.tsx +1 -1
  405. package/src/features/facets/AgentRunnerFacetsNav.tsx +44 -4
  406. package/src/features/facets/CollectionsFacetsNav.tsx +15 -4
  407. package/src/features/facets/DocumentsFacetsNav.tsx +25 -8
  408. package/src/features/facets/FacetQueryHandlers.test.ts +84 -0
  409. package/src/features/facets/InteractionsFacetsNav.tsx +20 -4
  410. package/src/features/facets/PromptsFacetsNav.tsx +15 -4
  411. package/src/features/facets/RunsFacetsNav.test.ts +59 -0
  412. package/src/features/facets/RunsFacetsNav.tsx +40 -30
  413. package/src/features/facets/WorkflowExecutionsFacetsNav.test.ts +57 -0
  414. package/src/features/facets/WorkflowExecutionsFacetsNav.tsx +36 -16
  415. package/src/features/facets/index.ts +1 -0
  416. package/src/features/facets/utils/SearchInterface.tsx +12 -3
  417. package/src/features/layout/GenericPageNavHeader.tsx +16 -0
  418. package/src/features/magic-pdf/DownloadPopover.tsx +1 -2
  419. package/src/features/magic-pdf/GroundedExtractionView.test.tsx +7 -1
  420. package/src/features/magic-pdf/GroundedExtractionView.tsx +162 -242
  421. package/src/features/oauth/McpConnectionsButton.test.tsx +18 -1
  422. package/src/features/oauth/McpConnectionsButton.tsx +6 -2
  423. package/src/features/oauth/McpConnectionsDialog.tsx +3 -3
  424. package/src/features/oauth/useMcpConnections.test.ts +1 -0
  425. package/src/features/oauth/useMcpConnections.ts +24 -7
  426. package/src/features/pdf-viewer/PdfPageRenderer.tsx +76 -71
  427. package/src/features/pdf-viewer/lazyReactPdf.ts +33 -0
  428. package/src/features/store/collections/CollectionsTable.tsx +1 -4
  429. package/src/features/store/collections/EditCollectionView.tsx +1 -1
  430. package/src/features/store/objects/ExportPropertiesModal.tsx +25 -16
  431. package/src/features/store/objects/components/ContentOverview.tsx +2 -28
  432. package/src/features/store/objects/components/TextEditorPanel.tsx +13 -3
  433. package/src/features/store/objects/layout/renderers.tsx +1 -6
  434. package/src/features/store/objects/search/DocumentSearchContext.test.ts +45 -0
  435. package/src/features/store/objects/search/DocumentSearchContext.ts +54 -4
  436. package/src/features/store/objects/selection/actions/DeleteObjectsAction.tsx +5 -0
  437. package/src/features/store/objects/upload/DocumentUploadModal.tsx +10 -3
  438. package/src/features/store/objects/upload/useSmartFileUploadProcessing.ts +15 -6
  439. package/src/features/store/types/ContentObjectTypesTable.tsx +1 -4
  440. package/src/features/store/types/IntakePolicyEditor.tsx +14 -5
  441. package/src/features/store/types/IntakePolicyForm.tsx +120 -20
  442. package/src/features/store/types/ObjectSchemaEditor.tsx +6 -2
  443. package/src/features/store/types/TableLayoutEditor.tsx +2 -0
  444. package/src/features/user/UserInfo.test.tsx +10 -0
  445. package/src/features/user/UserInfo.tsx +2 -7
  446. package/src/features/views/ViewActions.test.tsx +80 -0
  447. package/src/features/views/ViewActions.tsx +352 -0
  448. package/src/features/views/ViewDropTarget.test.tsx +150 -0
  449. package/src/features/views/ViewDropTarget.tsx +140 -0
  450. package/src/features/views/ViewExperience.test.tsx +72 -0
  451. package/src/features/views/ViewExperience.tsx +189 -22
  452. package/src/features/views/ViewMedia.test.tsx +180 -0
  453. package/src/features/views/ViewNavigation.test.tsx +42 -0
  454. package/src/features/views/ViewNavigation.tsx +43 -5
  455. package/src/features/views/ViewResults.tsx +243 -26
  456. package/src/features/views/index.ts +1 -0
  457. package/src/features/views/types.ts +50 -0
  458. package/src/features/views/viewState.test.ts +7 -1
  459. package/src/features/views/viewState.ts +32 -0
  460. package/src/i18n/LanguageProvider.tsx +15 -8
  461. package/src/i18n/instance.test.ts +30 -0
  462. package/src/i18n/instance.ts +67 -40
  463. package/src/i18n/locales/ar.json +1192 -911
  464. package/src/i18n/locales/de.json +1148 -867
  465. package/src/i18n/locales/en.json +65 -4
  466. package/src/i18n/locales/es.json +1159 -878
  467. package/src/i18n/locales/fr.json +1159 -878
  468. package/src/i18n/locales/it.json +1159 -878
  469. package/src/i18n/locales/ja.json +1148 -866
  470. package/src/i18n/locales/ko.json +1148 -866
  471. package/src/i18n/locales/pt.json +1159 -878
  472. package/src/i18n/locales/ru.json +1170 -889
  473. package/src/i18n/locales/tr.json +1148 -867
  474. package/src/i18n/locales/zh-TW.json +1148 -866
  475. package/src/i18n/locales/zh.json +1148 -866
  476. package/src/i18n/rtl.test.ts +16 -7
  477. package/src/rich-text/VertesiaRichTextEditor.test.tsx +33 -1
  478. package/src/router/RouteComponent.test.tsx +139 -0
  479. package/src/router/RouteComponent.tsx +54 -9
  480. package/src/session/UserSessionProvider.tsx +20 -31
  481. package/src/session/auth/composable.scope.test.ts +1 -1
  482. package/src/session/auth/composable.test.ts +61 -1
  483. package/src/session/auth/composable.ts +29 -23
  484. package/src/session/auth/domainRouting.test.ts +24 -1
  485. package/src/session/auth/domainRouting.ts +29 -0
  486. package/src/session/auth/firebase.ts +1 -1
  487. package/src/session/useUXTracking.tsx +6 -1
  488. package/src/shell/VertesiaShell.tsx +2 -0
  489. package/src/shell/apps/IframeAppContextSync.test.tsx +196 -0
  490. package/src/shell/apps/IframeAppContextSync.tsx +101 -0
  491. package/src/shell/apps/iframe-auth.test.ts +118 -0
  492. package/src/shell/apps/iframe-auth.ts +193 -0
  493. package/src/shell/apps/index.ts +2 -0
  494. package/src/widgets/markdown/ArtifactEditingSurface.test.tsx +12 -3
  495. package/src/widgets/markdown/MarkdownRenderer.tsx +50 -2
  496. package/src/widgets/markdown/MermaidDiagram.tsx +38 -22
  497. package/src/widgets/monacoEditor/MonacoEditor.tsx +27 -20
  498. package/lib/features/magic-pdf/GroundedExtractionAssistantPanel.d.ts +0 -25
  499. package/lib/features/magic-pdf/GroundedExtractionAssistantPanel.d.ts.map +0 -1
  500. package/lib/features/magic-pdf/GroundedExtractionAssistantPanel.js +0 -42
  501. package/lib/features/magic-pdf/GroundedExtractionAssistantPanel.js.map +0 -1
  502. package/src/features/magic-pdf/GroundedExtractionAssistantPanel.tsx +0 -86
@@ -0,0 +1,35 @@
1
+ import { fireEvent, screen, waitFor } from '@testing-library/react';
2
+ import { useState } from 'react';
3
+ import { describe, expect, it } from 'vitest';
4
+ import { renderWithProviders } from '../../../../__tests__/test-utils.js';
5
+ import { Modal, ModalBody, ModalTitle } from './dialog.js';
6
+
7
+ describe('Modal', () => {
8
+ it('moves focus into the dialog when it opens', async () => {
9
+ function Harness() {
10
+ const [open, setOpen] = useState(false);
11
+ return (
12
+ <>
13
+ <button type="button" onClick={() => setOpen(true)}>
14
+ Open modal
15
+ </button>
16
+ <Modal isOpen={open} onClose={() => setOpen(false)} noCloseButton>
17
+ <ModalTitle>Example modal</ModalTitle>
18
+ <ModalBody>
19
+ <input aria-label="Modal input" />
20
+ </ModalBody>
21
+ </Modal>
22
+ </>
23
+ );
24
+ }
25
+
26
+ renderWithProviders(<Harness />);
27
+ const trigger = screen.getByRole('button', { name: 'Open modal' });
28
+ trigger.focus();
29
+ fireEvent.click(trigger);
30
+
31
+ const dialog = await screen.findByRole('dialog', { name: 'Example modal' });
32
+ await waitFor(() => expect(dialog.contains(document.activeElement)).toBe(true));
33
+ expect(document.activeElement).toBe(screen.getByRole('textbox', { name: 'Modal input' }));
34
+ });
35
+ });
@@ -205,10 +205,6 @@ const DialogContent = React.forwardRef<
205
205
  <DialogOverlay />
206
206
  <DialogPrimitive.Content
207
207
  ref={ref}
208
- autoFocus={false}
209
- onOpenAutoFocus={(event) => {
210
- event.preventDefault();
211
- }}
212
208
  className={cn(
213
209
  // rtl-ok: symmetric centering + slide animations from Radix — left-[50%]/translate-x-[-50%] are mirror-safe
214
210
  'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] border bg-background shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg',
@@ -0,0 +1,320 @@
1
+ import { useUITranslation } from '@vertesia/ui/i18n';
2
+ import { ChevronDownIcon } from 'lucide-react';
3
+ import { type ReactNode, useEffect, useLayoutEffect, useRef, useState } from 'react';
4
+
5
+ import { cn } from '../libs/utils';
6
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from './dropdown';
7
+
8
+ /** Gap between tab items, in px — must match the `gap-1` used by the rendered rows. */
9
+ export const OVERFLOW_TAB_GAP_PX = 4;
10
+
11
+ export type OverflowTabsVariant = 'tabs' | 'pills';
12
+
13
+ /** Tab-item styling, matching the corresponding `TabsTrigger` variants. */
14
+ const VARIANT_CLASSES: Record<OverflowTabsVariant, { base: string; active: string; inactive: string; icon: string }> = {
15
+ tabs: {
16
+ base: 'flex items-center border-b-2 px-2 py-1.5 text-sm font-medium whitespace-nowrap cursor-pointer shrink-0',
17
+ inactive: 'border-transparent text-muted-foreground hover:border-border hover:text-foreground',
18
+ active: 'border-primary text-primary',
19
+ icon: 'ms-1 size-4',
20
+ },
21
+ pills: {
22
+ base: 'flex items-center rounded-md px-2 py-1 text-xs font-medium whitespace-nowrap cursor-pointer shrink-0',
23
+ inactive: 'text-muted-foreground hover:bg-muted/60',
24
+ active: 'bg-muted text-foreground',
25
+ icon: 'ms-0.5 size-3.5',
26
+ },
27
+ };
28
+
29
+ export interface OverflowTabsLayout<T> {
30
+ /** Attach to the element whose width bounds the row; its `clientWidth` is what tabs are fitted into. */
31
+ containerRef: React.RefObject<HTMLDivElement | null>;
32
+ /** Ref callback for the i-th item of the hidden measurement row. */
33
+ setItemRef: (index: number) => (el: HTMLElement | null) => void;
34
+ /** Ref callback for the "More" button of the hidden measurement row. */
35
+ setMoreRef: (el: HTMLElement | null) => void;
36
+ /** Items that fit; when the active item overflowed it is promoted into the last slot. */
37
+ visible: T[];
38
+ /** Items that did not fit and belong in the "More" menu. */
39
+ overflow: T[];
40
+ /** Whether the active item ended up in `overflow` (used to highlight the "More" trigger). */
41
+ activeInOverflow: boolean;
42
+ }
43
+
44
+ /**
45
+ * Splits `items` into a visible row and an overflow list, measured from a hidden row that renders
46
+ * every item at its natural width (see {@link OverflowTabsBar} for the expected markup). The active
47
+ * item is promoted into the last visible slot when it would otherwise be hidden in the menu.
48
+ *
49
+ * Callers own the rendering, so the hidden row must use the same classes and content as the visible
50
+ * one — otherwise the measured widths don't describe what is actually laid out.
51
+ */
52
+ export function useOverflowTabs<T>(
53
+ items: T[],
54
+ isActive: (item: T) => boolean,
55
+ gap = OVERFLOW_TAB_GAP_PX,
56
+ ): OverflowTabsLayout<T> {
57
+ const containerRef = useRef<HTMLDivElement | null>(null);
58
+ const itemRefs = useRef<Array<HTMLElement | null>>([]);
59
+ const moreRef = useRef<HTMLElement | null>(null);
60
+ // `count` leading items are shown. When `promote` is set, the active item is pulled
61
+ // into the last slot (before More) and `count` counts the items shown before it.
62
+ const [layout, setLayout] = useState<{ count: number; promote: boolean }>({
63
+ count: items.length,
64
+ promote: false,
65
+ });
66
+
67
+ const recompute = () => {
68
+ const container = containerRef.current;
69
+ if (!container) return;
70
+ const containerWidth = container.clientWidth;
71
+ const widths = items.map((_, i) => itemRefs.current[i]?.offsetWidth ?? 0);
72
+ const totalAll = widths.reduce((sum, w) => sum + w, 0) + gap * Math.max(0, items.length - 1);
73
+
74
+ // How many items (in order, optionally skipping one) fit within `available`.
75
+ const fitCount = (available: number, skipIndex: number) => {
76
+ let used = 0;
77
+ let fitted = 0;
78
+ for (let i = 0; i < items.length; i++) {
79
+ if (i === skipIndex) continue;
80
+ const cand = used + (fitted > 0 ? gap : 0) + widths[i];
81
+ if (cand > available) break;
82
+ used = cand;
83
+ fitted += 1;
84
+ }
85
+ return fitted;
86
+ };
87
+
88
+ let next: { count: number; promote: boolean };
89
+ if (totalAll <= containerWidth) {
90
+ next = { count: items.length, promote: false };
91
+ } else {
92
+ const moreWidth = moreRef.current?.offsetWidth ?? 0;
93
+ const naturalCount = Math.max(1, fitCount(containerWidth - moreWidth - gap, -1));
94
+ const activeIndex = items.findIndex(isActive);
95
+ if (activeIndex < 0 || activeIndex < naturalCount) {
96
+ next = { count: naturalCount, promote: false };
97
+ } else {
98
+ // Active item overflowed: reserve its slot at the end, fit leading items before it.
99
+ const leadAvailable = containerWidth - moreWidth - widths[activeIndex] - gap * 2;
100
+ next = { count: fitCount(leadAvailable, activeIndex), promote: true };
101
+ }
102
+ }
103
+ setLayout((prev) => (prev.count === next.count && prev.promote === next.promote ? prev : next));
104
+ };
105
+
106
+ // Re-measure after every render (item/label changes) and on container resize.
107
+ const recomputeRef = useRef(recompute);
108
+ recomputeRef.current = recompute;
109
+ useLayoutEffect(() => {
110
+ recomputeRef.current();
111
+ });
112
+ useEffect(() => {
113
+ const container = containerRef.current;
114
+ if (!container || typeof ResizeObserver === 'undefined') return;
115
+ const observer = new ResizeObserver(() => recomputeRef.current());
116
+ observer.observe(container);
117
+ return () => observer.disconnect();
118
+ }, []);
119
+
120
+ const activeIndex = items.findIndex(isActive);
121
+ let visible: T[];
122
+ let overflow: T[];
123
+ if (layout.promote && activeIndex >= 0) {
124
+ // Pull the active item into the last visible slot; the item it displaces overflows.
125
+ const others = items.filter((_, i) => i !== activeIndex);
126
+ visible = [...others.slice(0, layout.count), items[activeIndex]];
127
+ overflow = others.slice(layout.count);
128
+ } else {
129
+ visible = items.slice(0, layout.count);
130
+ overflow = items.slice(layout.count);
131
+ }
132
+
133
+ return {
134
+ containerRef,
135
+ setItemRef: (index: number) => (el: HTMLElement | null) => {
136
+ itemRefs.current[index] = el;
137
+ },
138
+ setMoreRef: (el: HTMLElement | null) => {
139
+ moreRef.current = el;
140
+ },
141
+ visible,
142
+ overflow,
143
+ activeInOverflow: overflow.some(isActive),
144
+ };
145
+ }
146
+
147
+ export interface OverflowMoreMenuProps {
148
+ label: ReactNode;
149
+ /** Classes for the trigger button — pass the same tab-item classes the row uses. */
150
+ triggerClassName?: string;
151
+ /** Icon after the label; the hidden measurement row must render the same one. */
152
+ icon?: ReactNode;
153
+ /** The menu entries, normally `DropdownMenuItem`s rendered by the caller. */
154
+ children: ReactNode;
155
+ }
156
+
157
+ /** Trailing "More" dropdown of overflowed tabs; opens on hover, click, or keyboard. */
158
+ export function OverflowMoreMenu({ label, triggerClassName, icon, children }: OverflowMoreMenuProps) {
159
+ const [open, setOpen] = useState(false);
160
+ const closeTimer = useRef<ReturnType<typeof setTimeout> | null>(null);
161
+ const openedByHover = useRef(false);
162
+
163
+ const cancelClose = () => {
164
+ if (closeTimer.current) {
165
+ clearTimeout(closeTimer.current);
166
+ closeTimer.current = null;
167
+ }
168
+ };
169
+ const openOnHover = () => {
170
+ cancelClose();
171
+ openedByHover.current = true;
172
+ setOpen(true);
173
+ };
174
+ // Delay the close so the pointer can travel across the gap onto the menu.
175
+ const closeAfterDelay = () => {
176
+ cancelClose();
177
+ closeTimer.current = setTimeout(() => setOpen(false), 150);
178
+ };
179
+
180
+ // Clear any pending close timer on unmount.
181
+ useEffect(() => () => clearTimeout(closeTimer.current ?? undefined), []);
182
+
183
+ return (
184
+ // Non-modal: a modal menu sets body `pointer-events: none` while open, which makes
185
+ // the hover open/close flap. It still closes on outside-click / Escape.
186
+ <DropdownMenu
187
+ modal={false}
188
+ open={open}
189
+ onOpenChange={(next) => {
190
+ // Fired by click / keyboard / dismiss (not by hover); keep our state in sync.
191
+ cancelClose();
192
+ if (next) openedByHover.current = false;
193
+ setOpen(next);
194
+ }}
195
+ >
196
+ <DropdownMenuTrigger asChild>
197
+ {/* Tab-bar primitive: raw button is the menu trigger (asChild). */}
198
+ <button
199
+ type="button"
200
+ onMouseEnter={openOnHover}
201
+ onMouseLeave={closeAfterDelay}
202
+ className={triggerClassName}
203
+ >
204
+ {label}
205
+ {icon ?? <ChevronDownIcon className="ms-1 size-4" />}
206
+ </button>
207
+ </DropdownMenuTrigger>
208
+ <DropdownMenuContent
209
+ align="end"
210
+ className="w-max"
211
+ onMouseEnter={cancelClose}
212
+ onMouseLeave={closeAfterDelay}
213
+ onCloseAutoFocus={(e) => {
214
+ // Keep hover-opens from returning the focus ring to the trigger.
215
+ if (openedByHover.current) e.preventDefault();
216
+ }}
217
+ >
218
+ {children}
219
+ </DropdownMenuContent>
220
+ </DropdownMenu>
221
+ );
222
+ }
223
+
224
+ /** Minimal tab shape the bar needs; the richer core `Tab` satisfies it as-is. */
225
+ export interface OverflowTab {
226
+ name: string;
227
+ label: ReactNode;
228
+ disabled?: boolean;
229
+ }
230
+
231
+ export interface OverflowTabsBarProps {
232
+ tabs: OverflowTab[];
233
+ current: string;
234
+ onTabChange: (name: string) => void;
235
+ /** `tabs` draws the underline bar (default), `pills` the compact rounded row. */
236
+ variant?: OverflowTabsVariant;
237
+ className?: string;
238
+ }
239
+
240
+ /**
241
+ * Tabs as a horizontal row; any that don't fit collapse into a trailing "More" dropdown. Unlike
242
+ * `TabsBar` this is a bar only — it does not own the panels — so it suits tab rows whose content is
243
+ * rendered by the caller. The visible/overflow split is measured from a hidden full-width row.
244
+ */
245
+ export function OverflowTabsBar({ tabs, current, onTabChange, variant = 'tabs', className }: OverflowTabsBarProps) {
246
+ const { t } = useUITranslation();
247
+ const styles = VARIANT_CLASSES[variant];
248
+ const { containerRef, setItemRef, setMoreRef, visible, overflow, activeInOverflow } = useOverflowTabs(
249
+ tabs,
250
+ (tab) => tab.name === current,
251
+ );
252
+ const moreLabel = t('agent.moreTabs');
253
+
254
+ return (
255
+ <div ref={containerRef} className={cn('relative', className)}>
256
+ {/* Hidden measurement row: all tabs + More at natural width, kept separate
257
+ from the visible row so measuring can't feed back into the layout. */}
258
+ <div aria-hidden className="pointer-events-none invisible absolute start-0 top-0 flex w-max gap-1">
259
+ {tabs.map((tab, i) => (
260
+ <button
261
+ type="button"
262
+ key={tab.name}
263
+ tabIndex={-1}
264
+ ref={setItemRef(i)}
265
+ className={cn(styles.base, styles.inactive)}
266
+ >
267
+ {tab.label}
268
+ </button>
269
+ ))}
270
+ <button type="button" tabIndex={-1} ref={setMoreRef} className={cn(styles.base, styles.inactive)}>
271
+ {moreLabel}
272
+ <ChevronDownIcon className={styles.icon} />
273
+ </button>
274
+ </div>
275
+
276
+ {/* Visible row */}
277
+ <div className={cn('flex gap-1 overflow-hidden', variant === 'tabs' && '-mb-px border-b')}>
278
+ {visible.map((tab) => {
279
+ const isActive = tab.name === current;
280
+ return (
281
+ // Tab-bar primitive: raw button mirrors core TabsTrigger styling.
282
+ <button
283
+ type="button"
284
+ key={tab.name}
285
+ aria-current={isActive ? 'page' : undefined}
286
+ disabled={tab.disabled}
287
+ onClick={() => onTabChange(tab.name)}
288
+ className={cn(
289
+ styles.base,
290
+ isActive ? styles.active : styles.inactive,
291
+ 'disabled:pointer-events-none disabled:opacity-50',
292
+ )}
293
+ >
294
+ {tab.label}
295
+ </button>
296
+ );
297
+ })}
298
+
299
+ {overflow.length > 0 && (
300
+ <OverflowMoreMenu
301
+ label={moreLabel}
302
+ triggerClassName={cn(styles.base, activeInOverflow ? styles.active : styles.inactive)}
303
+ icon={<ChevronDownIcon className={styles.icon} />}
304
+ >
305
+ {overflow.map((tab) => (
306
+ <DropdownMenuItem
307
+ key={tab.name}
308
+ disabled={tab.disabled}
309
+ onClick={() => onTabChange(tab.name)}
310
+ className={cn(tab.name === current && 'text-primary')}
311
+ >
312
+ {tab.label}
313
+ </DropdownMenuItem>
314
+ ))}
315
+ </OverflowMoreMenu>
316
+ )}
317
+ </div>
318
+ </div>
319
+ );
320
+ }
@@ -448,7 +448,7 @@ export function SelectBox<T = unknown>({
448
448
  variant="link"
449
449
  size="icon"
450
450
  disabled={disabled}
451
- aria-label={clearTitle || 'Clear selection'}
451
+ title={clearTitle || 'Clear selection'}
452
452
  onClick={(e) => {
453
453
  e.stopPropagation();
454
454
  if (multiple) {
@@ -462,7 +462,7 @@ export function SelectBox<T = unknown>({
462
462
  e.stopPropagation();
463
463
  }
464
464
  }}
465
- className="absolute end-8 top-1/2 -translate-y-1/2 hover:bg-muted/20 rounded p-1"
465
+ className="absolute end-2 top-1/2 -translate-y-1/2 hover:bg-muted/20 rounded p-1"
466
466
  >
467
467
  {clearIcon ? clearIcon : <X className="size-4" />}
468
468
  </Button>
@@ -1,4 +1,4 @@
1
- import { createContext, useContext, useEffect, useState } from 'react';
1
+ import { createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react';
2
2
 
3
3
  type Theme = 'dark' | 'light' | 'system';
4
4
 
@@ -10,7 +10,7 @@ type ThemeProviderProps = {
10
10
 
11
11
  type ThemeProviderState = {
12
12
  theme: Theme;
13
- setTheme: (theme: Theme) => void;
13
+ setTheme: (theme: Theme, options?: { persist?: boolean }) => void;
14
14
  };
15
15
 
16
16
  const initialState: ThemeProviderState = {
@@ -28,7 +28,7 @@ export function ThemeProvider({
28
28
  storageKey = 'vite-ui-theme',
29
29
  ...props
30
30
  }: ThemeProviderProps) {
31
- const [theme, setTheme] = useState<Theme>(() => (localStorage.getItem(storageKey) as Theme) || defaultTheme);
31
+ const [theme, setThemeState] = useState<Theme>(() => (localStorage.getItem(storageKey) as Theme) || defaultTheme);
32
32
 
33
33
  useEffect(() => {
34
34
  const root = window.document.documentElement;
@@ -45,13 +45,14 @@ export function ThemeProvider({
45
45
  root.classList.add(theme);
46
46
  }, [theme]);
47
47
 
48
- const value = {
49
- theme,
50
- setTheme: (theme: Theme) => {
51
- localStorage.setItem(storageKey, theme);
52
- setTheme(theme);
48
+ const setTheme = useCallback(
49
+ (nextTheme: Theme, options?: { persist?: boolean }) => {
50
+ if (options?.persist !== false) localStorage.setItem(storageKey, nextTheme);
51
+ setThemeState(nextTheme);
53
52
  },
54
- };
53
+ [storageKey],
54
+ );
55
+ const value = useMemo(() => ({ theme, setTheme }), [setTheme, theme]);
55
56
 
56
57
  return (
57
58
  <ThemeProviderContext.Provider {...props} value={value}>
@@ -0,0 +1,17 @@
1
+ import dayjs from 'dayjs';
2
+ import localizedFormat from 'dayjs/plugin/localizedFormat';
3
+ import relativeTime from 'dayjs/plugin/relativeTime';
4
+
5
+ dayjs.extend(relativeTime);
6
+ dayjs.extend(localizedFormat);
7
+
8
+ /**
9
+ * dayjs with the plugins this package relies on already registered — import this rather than `dayjs`
10
+ * itself.
11
+ *
12
+ * `dayjs.extend()` mutates a singleton, so a module calling `fromNow()` or a localized format token
13
+ * (`L`, `LT`, …) without registering the plugin itself only works while some unrelated module
14
+ * happens to have been loaded first. That is not a dependency a bundler can see, and tree-shaking
15
+ * is free to drop the module that was doing the registering.
16
+ */
17
+ export default dayjs;
package/src/css/base.css CHANGED
@@ -29,3 +29,81 @@
29
29
  scrollbar-width: none; /* Firefox */
30
30
  }
31
31
  }
32
+
33
+ /*
34
+ * Keep this rule unlayered. Autofill must outrank Tailwind's layered background
35
+ * and focus-shadow utilities, while retaining their ring variables.
36
+ */
37
+ input[class]:-webkit-autofill,
38
+ input[class]:-webkit-autofill:hover,
39
+ input[class]:-webkit-autofill:focus,
40
+ textarea[class]:-webkit-autofill,
41
+ textarea[class]:-webkit-autofill:hover,
42
+ textarea[class]:-webkit-autofill:focus,
43
+ select[class]:-webkit-autofill,
44
+ select[class]:-webkit-autofill:hover,
45
+ select[class]:-webkit-autofill:focus {
46
+ -webkit-text-fill-color: var(--color-foreground);
47
+ -webkit-box-shadow:
48
+ 0 0 0 1000px var(--color-background) inset,
49
+ var(--tw-inset-shadow, 0 0 #0000),
50
+ var(--tw-inset-ring-shadow, 0 0 #0000),
51
+ var(--tw-ring-offset-shadow, 0 0 #0000),
52
+ var(--tw-ring-shadow, 0 0 #0000),
53
+ var(--tw-shadow, 0 0 #0000);
54
+ box-shadow:
55
+ 0 0 0 1000px var(--color-background) inset,
56
+ var(--tw-inset-shadow, 0 0 #0000),
57
+ var(--tw-inset-ring-shadow, 0 0 #0000),
58
+ var(--tw-ring-offset-shadow, 0 0 #0000),
59
+ var(--tw-ring-shadow, 0 0 #0000),
60
+ var(--tw-shadow, 0 0 #0000);
61
+ caret-color: var(--color-foreground);
62
+ /* biome-ignore lint/complexity/noImportantStyles: Chromium otherwise animates from its autofill preview font. */
63
+ font-size: var(--autofill-font-size) !important;
64
+ /* biome-ignore lint/complexity/noImportantStyles: Chromium otherwise animates from its autofill preview line height. */
65
+ line-height: var(--autofill-line-height) !important;
66
+ /* biome-ignore lint/complexity/noImportantStyles: Chromium's autofill transition causes a visible typography jump. */
67
+ transition: none !important;
68
+ }
69
+
70
+ input.text-xs {
71
+ --autofill-font-size: var(--text-xs);
72
+ --autofill-line-height: var(--text-xs--line-height);
73
+ }
74
+
75
+ input.text-sm {
76
+ --autofill-font-size: var(--text-sm);
77
+ --autofill-line-height: var(--text-sm--line-height);
78
+ }
79
+
80
+ input.text-base {
81
+ --autofill-font-size: var(--text-base);
82
+ --autofill-line-height: var(--text-base--line-height);
83
+ }
84
+
85
+ input.text-lg {
86
+ --autofill-font-size: var(--text-lg);
87
+ --autofill-line-height: var(--text-lg--line-height);
88
+ }
89
+
90
+ /* Chromium paints accepted autocomplete text through a separate first-line style. */
91
+ input.text-xs:-webkit-autofill::first-line {
92
+ font-size: var(--text-xs);
93
+ line-height: var(--text-xs--line-height);
94
+ }
95
+
96
+ input.text-sm:-webkit-autofill::first-line {
97
+ font-size: var(--text-sm);
98
+ line-height: var(--text-sm--line-height);
99
+ }
100
+
101
+ input.text-base:-webkit-autofill::first-line {
102
+ font-size: var(--text-base);
103
+ line-height: var(--text-base--line-height);
104
+ }
105
+
106
+ input.text-lg:-webkit-autofill::first-line {
107
+ font-size: var(--text-lg);
108
+ line-height: var(--text-lg--line-height);
109
+ }
@@ -0,0 +1,94 @@
1
+ import { afterEach, describe, expect, it, vi } from 'vitest';
2
+ import { type EnvProps, VertesiaEnvironment, type VertesiaRuntimeConfig } from './index';
3
+
4
+ const baseProps: EnvProps = {
5
+ name: 'test-app',
6
+ version: '1.0.0',
7
+ isLocalDev: false,
8
+ isDocker: false,
9
+ type: 'production',
10
+ endpoints: {
11
+ studio: 'https://api.us1.vertesia.io',
12
+ zeno: 'https://api.us1.vertesia.io',
13
+ sts: 'https://sts.us1.vertesia.io',
14
+ },
15
+ };
16
+
17
+ describe('VertesiaEnvironment runtime configuration', () => {
18
+ afterEach(() => {
19
+ vi.unstubAllGlobals();
20
+ });
21
+
22
+ it('uses complete gateway-injected Firebase configuration as an initialization fallback', () => {
23
+ const firebase = {
24
+ apiKey: 'firebase-key',
25
+ authDomain: 'apps.us1.vertesia.io',
26
+ projectId: 'dengenlabs',
27
+ appId: 'firebase-app-id',
28
+ };
29
+ vi.stubGlobal('window', {
30
+ __VERTESIA_RUNTIME_CONFIG__: { authMode: 'firebase', firebase },
31
+ });
32
+
33
+ const env = new VertesiaEnvironment().init(baseProps);
34
+
35
+ expect(env.firebase).toEqual(firebase);
36
+ expect(window.AUTH_MODE).toBe('firebase');
37
+ });
38
+
39
+ it('preserves explicit app configuration and auth mode', () => {
40
+ const explicitFirebase = {
41
+ apiKey: 'explicit-key',
42
+ authDomain: 'explicit.example.com',
43
+ projectId: 'explicit-project',
44
+ appId: 'explicit-app-id',
45
+ };
46
+ vi.stubGlobal('window', {
47
+ AUTH_MODE: 'central',
48
+ __VERTESIA_RUNTIME_CONFIG__: {
49
+ authMode: 'firebase',
50
+ firebase: {
51
+ apiKey: 'runtime-key',
52
+ authDomain: 'apps.us1.vertesia.io',
53
+ projectId: 'dengenlabs',
54
+ appId: 'runtime-app-id',
55
+ },
56
+ },
57
+ });
58
+
59
+ const env = new VertesiaEnvironment().init({ ...baseProps, firebase: explicitFirebase });
60
+
61
+ expect(env.firebase).toEqual(explicitFirebase);
62
+ expect(window.AUTH_MODE).toBe('central');
63
+ });
64
+
65
+ it('ignores incomplete injected Firebase configuration', () => {
66
+ vi.stubGlobal('window', {
67
+ __VERTESIA_RUNTIME_CONFIG__: {
68
+ authMode: 'firebase',
69
+ firebase: {
70
+ apiKey: 'firebase-key',
71
+ authDomain: 'apps.us1.vertesia.io',
72
+ projectId: 'dengenlabs',
73
+ appId: '',
74
+ },
75
+ } satisfies VertesiaRuntimeConfig,
76
+ });
77
+
78
+ const env = new VertesiaEnvironment().init(baseProps);
79
+
80
+ expect(env.firebase).toBeUndefined();
81
+ expect(window.AUTH_MODE).toBeUndefined();
82
+ });
83
+
84
+ it('accepts injected Central Auth mode without Firebase configuration', () => {
85
+ vi.stubGlobal('window', {
86
+ __VERTESIA_RUNTIME_CONFIG__: { authMode: 'central' },
87
+ });
88
+
89
+ const env = new VertesiaEnvironment().init(baseProps);
90
+
91
+ expect(env.firebase).toBeUndefined();
92
+ expect(window.AUTH_MODE).toBe('central');
93
+ });
94
+ });
package/src/env/index.ts CHANGED
@@ -55,11 +55,46 @@ export interface EnvProps {
55
55
  onLogout?: () => void;
56
56
  }
57
57
 
58
+ export type VertesiaRuntimeConfig =
59
+ | {
60
+ authMode: 'firebase';
61
+ firebase: {
62
+ apiKey: string;
63
+ authDomain: string;
64
+ projectId: string;
65
+ appId: string;
66
+ };
67
+ }
68
+ | {
69
+ authMode: 'central';
70
+ };
71
+
72
+ declare global {
73
+ interface Window {
74
+ AUTH_MODE?: 'firebase' | 'central';
75
+ __VERTESIA_RUNTIME_CONFIG__?: VertesiaRuntimeConfig;
76
+ }
77
+ }
78
+
79
+ function injectedRuntimeConfig(): VertesiaRuntimeConfig | undefined {
80
+ if (typeof window === 'undefined') return undefined;
81
+ const runtimeConfig = window.__VERTESIA_RUNTIME_CONFIG__;
82
+ if (runtimeConfig?.authMode === 'central') return runtimeConfig;
83
+ if (runtimeConfig?.authMode !== 'firebase') return undefined;
84
+
85
+ const firebase = runtimeConfig.firebase;
86
+ if (!firebase?.apiKey || !firebase.authDomain || !firebase.projectId || !firebase.appId) return undefined;
87
+ return runtimeConfig;
88
+ }
89
+
58
90
  export class VertesiaEnvironment implements Readonly<EnvProps> {
59
91
  constructor(private _props?: EnvProps | undefined) {}
60
92
 
61
93
  init(props?: EnvProps) {
62
- this._props = props;
94
+ const runtimeConfig = injectedRuntimeConfig();
95
+ const runtimeFirebase = runtimeConfig?.authMode === 'firebase' ? runtimeConfig.firebase : undefined;
96
+ this._props = props && runtimeFirebase && !props.firebase ? { ...props, firebase: runtimeFirebase } : props;
97
+ if (runtimeConfig && window.AUTH_MODE === undefined) window.AUTH_MODE = runtimeConfig.authMode;
63
98
  return this;
64
99
  }
65
100