@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.
- package/lib/esm/core/components/InputList.js +1 -1
- package/lib/esm/core/components/InputList.js.map +1 -1
- package/lib/esm/core/components/Overlay.js +1 -1
- package/lib/esm/core/components/Overlay.js.map +1 -1
- package/lib/esm/core/components/SidePanel.js +8 -2
- package/lib/esm/core/components/SidePanel.js.map +1 -1
- package/lib/esm/core/components/Switch.js +1 -1
- package/lib/esm/core/components/Switch.js.map +1 -1
- package/lib/esm/core/components/index.js +0 -8
- package/lib/esm/core/components/index.js.map +1 -1
- package/lib/esm/core/components/shadcn/MessageBox.js.map +1 -0
- package/lib/esm/core/components/shadcn/Panel.js +13 -0
- package/lib/esm/core/components/shadcn/Panel.js.map +1 -0
- package/lib/esm/core/components/{Badge.js → shadcn/badge.js} +2 -2
- package/lib/esm/core/components/shadcn/badge.js.map +1 -0
- package/lib/esm/core/components/shadcn/command.js +1 -1
- package/lib/esm/core/components/shadcn/command.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/filterBar.js +73 -83
- package/lib/esm/core/components/shadcn/filters/filterBar.js.map +1 -1
- package/lib/esm/core/components/shadcn/index.js +4 -2
- package/lib/esm/core/components/shadcn/index.js.map +1 -1
- package/lib/esm/core/components/shadcn/modal/ConfirmModal.js +10 -0
- package/lib/esm/core/components/shadcn/modal/ConfirmModal.js.map +1 -0
- package/lib/esm/core/components/{DeleteModal.js → shadcn/modal/DeleteModal.js} +1 -1
- package/lib/esm/core/components/shadcn/modal/DeleteModal.js.map +1 -0
- package/lib/esm/core/components/shadcn/{dialog.js → modal/dialog.js} +19 -15
- package/lib/esm/core/components/shadcn/modal/dialog.js.map +1 -0
- package/lib/esm/core/components/shadcn/modal/index.js +4 -0
- package/lib/esm/core/components/shadcn/modal/index.js.map +1 -0
- package/lib/esm/core/components/shadcn/popover.js +4 -2
- package/lib/esm/core/components/shadcn/popover.js.map +1 -1
- package/lib/esm/core/components/shadcn/selectBox.js +19 -15
- package/lib/esm/core/components/shadcn/selectBox.js.map +1 -1
- package/lib/esm/core/components/shadcn/tabs.js +16 -14
- package/lib/esm/core/components/shadcn/tabs.js.map +1 -1
- package/lib/esm/core/components/shadcn/textarea.js +30 -2
- package/lib/esm/core/components/shadcn/textarea.js.map +1 -1
- package/lib/esm/core/components/shadcn/tooltip.js +5 -1
- package/lib/esm/core/components/shadcn/tooltip.js.map +1 -1
- package/lib/esm/features/agent/PayloadBuilder.js +45 -0
- package/lib/esm/features/agent/PayloadBuilder.js.map +1 -1
- package/lib/esm/features/agent/chat/AgentChart.js +12 -232
- package/lib/esm/features/agent/chat/AgentChart.js.map +1 -1
- package/lib/esm/features/agent/chat/AskUserWidget.js +2 -1
- package/lib/esm/features/agent/chat/AskUserWidget.js.map +1 -1
- package/lib/esm/features/agent/chat/DocumentPanel.js +46 -0
- package/lib/esm/features/agent/chat/DocumentPanel.js.map +1 -0
- package/lib/esm/features/agent/chat/DocumentTabBar.js +17 -0
- package/lib/esm/features/agent/chat/DocumentTabBar.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentConversation.js +159 -402
- package/lib/esm/features/agent/chat/ModernAgentConversation.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +99 -57
- package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/BatchProgressPanel.js +4 -4
- package/lib/esm/features/agent/chat/ModernAgentOutput/BatchProgressPanel.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js +4 -4
- package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js +3 -3
- package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageInput.js +25 -22
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageInput.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js +110 -55
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/StreamingMessage.js +2 -2
- package/lib/esm/features/agent/chat/ModernAgentOutput/StreamingMessage.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/ToolCallGroup.js +146 -55
- package/lib/esm/features/agent/chat/ModernAgentOutput/ToolCallGroup.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js +5 -6
- package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js +110 -2
- package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js.map +1 -1
- package/lib/esm/features/agent/chat/SkillWidgetProvider.js +28 -15
- package/lib/esm/features/agent/chat/SkillWidgetProvider.js.map +1 -1
- package/lib/esm/features/agent/chat/hooks/useAgentPlans.js +146 -0
- package/lib/esm/features/agent/chat/hooks/useAgentPlans.js.map +1 -0
- package/lib/esm/features/agent/chat/hooks/useAgentStream.js +180 -0
- package/lib/esm/features/agent/chat/hooks/useAgentStream.js.map +1 -0
- package/lib/esm/features/agent/chat/hooks/useDocumentPanel.js +100 -0
- package/lib/esm/features/agent/chat/hooks/useDocumentPanel.js.map +1 -0
- package/lib/esm/features/agent/chat/hooks/useFileProcessing.js +90 -0
- package/lib/esm/features/agent/chat/hooks/useFileProcessing.js.map +1 -0
- package/lib/esm/features/agent/chat/index.js +6 -5
- package/lib/esm/features/agent/chat/index.js.map +1 -1
- package/lib/esm/features/agent/chat/types/document.js +2 -0
- package/lib/esm/features/agent/chat/types/document.js.map +1 -0
- package/lib/esm/features/agent/index.js +0 -2
- package/lib/esm/features/agent/index.js.map +1 -1
- package/lib/esm/features/store/collections/BrowseCollectionView.js +4 -6
- package/lib/esm/features/store/collections/BrowseCollectionView.js.map +1 -1
- package/lib/esm/features/store/collections/CreateCollection.js +4 -4
- package/lib/esm/features/store/collections/CreateCollection.js.map +1 -1
- package/lib/esm/features/store/collections/EditCollectionView.js +1 -1
- package/lib/esm/features/store/collections/EditCollectionView.js.map +1 -1
- package/lib/esm/features/store/objects/DocumentSearchResults.js +5 -5
- package/lib/esm/features/store/objects/DocumentSearchResults.js.map +1 -1
- package/lib/esm/features/store/objects/ExportPropertiesModal.js +3 -3
- package/lib/esm/features/store/objects/ExportPropertiesModal.js.map +1 -1
- package/lib/esm/features/store/objects/components/ContentOverview.js +19 -120
- package/lib/esm/features/store/objects/components/ContentOverview.js.map +1 -1
- package/lib/esm/features/store/objects/components/PropertiesEditorModal.js +1 -1
- package/lib/esm/features/store/objects/components/PropertiesEditorModal.js.map +1 -1
- package/lib/esm/features/store/objects/components/SelectDocumentModal.js +2 -2
- package/lib/esm/features/store/objects/components/SelectDocumentModal.js.map +1 -1
- package/lib/esm/features/store/objects/components/VectorSearchWidget.js +1 -1
- package/lib/esm/features/store/objects/components/VectorSearchWidget.js.map +1 -1
- package/lib/esm/features/store/objects/components/index.js +1 -1
- package/lib/esm/features/store/objects/components/index.js.map +1 -1
- package/lib/esm/features/store/objects/components/useDownloadFile.js +192 -0
- package/lib/esm/features/store/objects/components/useDownloadFile.js.map +1 -0
- package/lib/esm/features/store/objects/search/DocumentSearchContext.js +1 -2
- package/lib/esm/features/store/objects/search/DocumentSearchContext.js.map +1 -1
- package/lib/esm/features/store/objects/selection/SelectionActions.js +5 -8
- package/lib/esm/features/store/objects/selection/SelectionActions.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js +4 -4
- package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/ChangeTypeAction.js +2 -2
- package/lib/esm/features/store/objects/selection/actions/ChangeTypeAction.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js +1 -1
- package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/StartWorkflowComponent.js +3 -3
- package/lib/esm/features/store/objects/selection/actions/StartWorkflowComponent.js.map +1 -1
- package/lib/esm/features/store/objects/upload/DocumentUploadModal.js +13 -13
- package/lib/esm/features/store/objects/upload/DocumentUploadModal.js.map +1 -1
- package/lib/esm/features/store/objects/upload/useSmartFileUploadProcessing.js +15 -8
- package/lib/esm/features/store/objects/upload/useSmartFileUploadProcessing.js.map +1 -1
- package/lib/esm/features/store/types/ObjectSchemaEditor.js +6 -5
- package/lib/esm/features/store/types/ObjectSchemaEditor.js.map +1 -1
- package/lib/esm/features/store/types/SelectContentType.js +3 -3
- package/lib/esm/features/store/types/SelectContentType.js.map +1 -1
- package/lib/esm/features/store/types/SelectContentTypeModal.js +5 -4
- package/lib/esm/features/store/types/SelectContentTypeModal.js.map +1 -1
- package/lib/esm/features/store/types/TableLayoutEditor.js +4 -4
- package/lib/esm/features/store/types/TableLayoutEditor.js.map +1 -1
- package/lib/esm/features/user/UserInfo.js +73 -9
- package/lib/esm/features/user/UserInfo.js.map +1 -1
- package/lib/esm/features/utils/print.js +0 -1
- package/lib/esm/features/utils/print.js.map +1 -1
- package/lib/esm/layout/AppLayout.js +3 -4
- package/lib/esm/layout/AppLayout.js.map +1 -1
- package/lib/esm/layout/Sidebar.js +5 -5
- package/lib/esm/layout/Sidebar.js.map +1 -1
- package/lib/esm/router/HistoryNavigator.js +7 -1
- package/lib/esm/router/HistoryNavigator.js.map +1 -1
- package/lib/esm/router/Nav.js +2 -2
- package/lib/esm/router/Nav.js.map +1 -1
- package/lib/esm/session/UserSession.js +35 -9
- package/lib/esm/session/UserSession.js.map +1 -1
- package/lib/esm/session/UserSessionProvider.js +3 -2
- package/lib/esm/session/UserSessionProvider.js.map +1 -1
- package/lib/esm/shell/apps/AppProjectSelector.js +2 -2
- package/lib/esm/shell/apps/AppProjectSelector.js.map +1 -1
- package/lib/esm/shell/apps/StandaloneApp.js +2 -2
- package/lib/esm/shell/apps/StandaloneApp.js.map +1 -1
- package/lib/esm/shell/login/InviteAcceptModal.js +2 -2
- package/lib/esm/shell/login/InviteAcceptModal.js.map +1 -1
- package/lib/esm/shell/login/SignInModal.js +1 -1
- package/lib/esm/shell/login/SignInModal.js.map +1 -1
- package/lib/esm/shell/login/SignupForm.js +2 -2
- package/lib/esm/shell/login/SignupForm.js.map +1 -1
- package/lib/esm/shell/login/UserInfo.js +2 -2
- package/lib/esm/shell/login/UserInfo.js.map +1 -1
- package/lib/esm/widgets/json-view/JSONCode.js +1 -1
- package/lib/esm/widgets/json-view/JSONCode.js.map +1 -1
- package/lib/esm/widgets/json-view/JSONDisplay.js +1 -1
- package/lib/esm/widgets/json-view/JSONDisplay.js.map +1 -1
- package/lib/esm/widgets/markdown/ArtifactContentRenderer.js +84 -13
- package/lib/esm/widgets/markdown/ArtifactContentRenderer.js.map +1 -1
- package/lib/esm/widgets/markdown/MarkdownFigure.js +40 -0
- package/lib/esm/widgets/markdown/MarkdownFigure.js.map +1 -0
- package/lib/esm/widgets/markdown/MarkdownRenderer.js +42 -7
- package/lib/esm/widgets/markdown/MarkdownRenderer.js.map +1 -1
- package/lib/esm/widgets/markdown/MermaidDiagram.js +80 -5
- package/lib/esm/widgets/markdown/MermaidDiagram.js.map +1 -1
- package/lib/esm/widgets/markdown/codeBlockHandlers.js +33 -33
- package/lib/esm/widgets/markdown/codeBlockHandlers.js.map +1 -1
- package/lib/esm/widgets/markdown/codeBlockHandlers.test.js +2 -29
- package/lib/esm/widgets/markdown/codeBlockHandlers.test.js.map +1 -1
- package/lib/esm/widgets/markdown/index.js +1 -0
- package/lib/esm/widgets/markdown/index.js.map +1 -1
- package/lib/esm/widgets/markdown/normalizeCustomSchemeLinks.js +77 -0
- package/lib/esm/widgets/markdown/normalizeCustomSchemeLinks.js.map +1 -0
- package/lib/esm/widgets/markdown/normalizeDirectives.js +45 -0
- package/lib/esm/widgets/markdown/normalizeDirectives.js.map +1 -0
- package/lib/esm/widgets/markdown/remarkDirectiveHandler.js +96 -0
- package/lib/esm/widgets/markdown/remarkDirectiveHandler.js.map +1 -0
- package/lib/esm/widgets/monacoEditor/MonacoEditor.js +8 -14
- package/lib/esm/widgets/monacoEditor/MonacoEditor.js.map +1 -1
- package/lib/esm/widgets/schema-editor/ManagedSchema.js.map +1 -1
- package/lib/esm/widgets/schema-editor/editor/PropertyEditor.js +3 -3
- package/lib/esm/widgets/schema-editor/editor/PropertyEditor.js.map +1 -1
- package/lib/esm/widgets/schema-editor/json-schema4-utils.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/core/components/SidePanel.d.ts +4 -1
- package/lib/types/core/components/SidePanel.d.ts.map +1 -1
- package/lib/types/core/components/index.d.ts +0 -8
- package/lib/types/core/components/index.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/MessageBox.d.ts.map +1 -0
- package/lib/types/core/components/{Panel.d.ts → shadcn/Panel.d.ts} +3 -1
- package/lib/types/core/components/shadcn/Panel.d.ts.map +1 -0
- package/lib/types/core/components/{Badge.d.ts → shadcn/badge.d.ts} +4 -4
- package/lib/types/core/components/shadcn/badge.d.ts.map +1 -0
- package/lib/types/core/components/shadcn/button.d.ts +1 -1
- package/lib/types/core/components/shadcn/filters/filterBar.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/index.d.ts +4 -2
- package/lib/types/core/components/shadcn/index.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/input.d.ts +1 -1
- package/lib/types/core/components/shadcn/modal/ConfirmModal.d.ts.map +1 -0
- package/lib/types/core/components/shadcn/modal/DeleteModal.d.ts.map +1 -0
- package/lib/types/core/components/shadcn/{dialog.d.ts → modal/dialog.d.ts} +7 -4
- package/lib/types/core/components/shadcn/modal/dialog.d.ts.map +1 -0
- package/lib/types/core/components/shadcn/modal/index.d.ts +4 -0
- package/lib/types/core/components/shadcn/modal/index.d.ts.map +1 -0
- package/lib/types/core/components/shadcn/popover.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/selectBox.d.ts +9 -5
- package/lib/types/core/components/shadcn/selectBox.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/tabs.d.ts +14 -5
- package/lib/types/core/components/shadcn/tabs.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/textarea.d.ts +6 -2
- package/lib/types/core/components/shadcn/textarea.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/tooltip.d.ts.map +1 -1
- package/lib/types/features/agent/PayloadBuilder.d.ts +22 -4
- package/lib/types/features/agent/PayloadBuilder.d.ts.map +1 -1
- package/lib/types/features/agent/chat/AgentChart.d.ts +3 -44
- package/lib/types/features/agent/chat/AgentChart.d.ts.map +1 -1
- package/lib/types/features/agent/chat/AskUserWidget.d.ts.map +1 -1
- package/lib/types/features/agent/chat/DocumentPanel.d.ts +16 -0
- package/lib/types/features/agent/chat/DocumentPanel.d.ts.map +1 -0
- package/lib/types/features/agent/chat/DocumentTabBar.d.ts +10 -0
- package/lib/types/features/agent/chat/DocumentTabBar.d.ts.map +1 -0
- package/lib/types/features/agent/chat/ModernAgentConversation.d.ts +69 -1
- package/lib/types/features/agent/chat/ModernAgentConversation.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts +36 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/BatchProgressPanel.d.ts +18 -2
- package/lib/types/features/agent/chat/ModernAgentOutput/BatchProgressPanel.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts +4 -7
- package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/MessageInput.d.ts +2 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/MessageInput.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/MessageItem.d.ts +35 -7
- package/lib/types/features/agent/chat/ModernAgentOutput/MessageItem.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/StreamingMessage.d.ts +11 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/StreamingMessage.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/ToolCallGroup.d.ts +20 -2
- package/lib/types/features/agent/chat/ModernAgentOutput/ToolCallGroup.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/WorkstreamTabs.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/utils.d.ts +18 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/utils.d.ts.map +1 -1
- package/lib/types/features/agent/chat/SkillWidgetProvider.d.ts.map +1 -1
- package/lib/types/features/agent/chat/hooks/useAgentPlans.d.ts +22 -0
- package/lib/types/features/agent/chat/hooks/useAgentPlans.d.ts.map +1 -0
- package/lib/types/features/agent/chat/hooks/useAgentStream.d.ts +42 -0
- package/lib/types/features/agent/chat/hooks/useAgentStream.d.ts.map +1 -0
- package/lib/types/features/agent/chat/hooks/useDocumentPanel.d.ts +22 -0
- package/lib/types/features/agent/chat/hooks/useDocumentPanel.d.ts.map +1 -0
- package/lib/types/features/agent/chat/hooks/useFileProcessing.d.ts +27 -0
- package/lib/types/features/agent/chat/hooks/useFileProcessing.d.ts.map +1 -0
- package/lib/types/features/agent/chat/index.d.ts +12 -8
- package/lib/types/features/agent/chat/index.d.ts.map +1 -1
- package/lib/types/features/agent/chat/types/document.d.ts +5 -0
- package/lib/types/features/agent/chat/types/document.d.ts.map +1 -0
- package/lib/types/features/agent/index.d.ts +0 -2
- package/lib/types/features/agent/index.d.ts.map +1 -1
- package/lib/types/features/store/collections/BrowseCollectionView.d.ts.map +1 -1
- package/lib/types/features/store/objects/ExportPropertiesModal.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/ContentOverview.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/PropertiesEditorModal.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/index.d.ts +1 -1
- package/lib/types/features/store/objects/components/index.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/useDownloadFile.d.ts +35 -0
- package/lib/types/features/store/objects/components/useDownloadFile.d.ts.map +1 -0
- package/lib/types/features/store/objects/search/DocumentSearchContext.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/SelectionActions.d.ts +1 -1
- package/lib/types/features/store/objects/selection/SelectionActions.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/actions/ChangeTypeAction.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/actions/ExportPropertiesAction.d.ts.map +1 -1
- package/lib/types/features/store/objects/upload/useSmartFileUploadProcessing.d.ts.map +1 -1
- package/lib/types/features/store/types/ObjectSchemaEditor.d.ts +2 -1
- package/lib/types/features/store/types/ObjectSchemaEditor.d.ts.map +1 -1
- package/lib/types/features/store/types/SelectContentTypeModal.d.ts +1 -1
- package/lib/types/features/store/types/SelectContentTypeModal.d.ts.map +1 -1
- package/lib/types/features/store/types/TableLayoutEditor.d.ts +2 -1
- package/lib/types/features/store/types/TableLayoutEditor.d.ts.map +1 -1
- package/lib/types/features/user/UserInfo.d.ts +12 -1
- package/lib/types/features/user/UserInfo.d.ts.map +1 -1
- package/lib/types/features/utils/print.d.ts.map +1 -1
- package/lib/types/layout/AppLayout.d.ts.map +1 -1
- package/lib/types/layout/Sidebar.d.ts +4 -2
- package/lib/types/layout/Sidebar.d.ts.map +1 -1
- package/lib/types/router/HistoryNavigator.d.ts.map +1 -1
- package/lib/types/router/Nav.d.ts +6 -1
- package/lib/types/router/Nav.d.ts.map +1 -1
- package/lib/types/session/UserSession.d.ts.map +1 -1
- package/lib/types/session/UserSessionProvider.d.ts +1 -0
- package/lib/types/session/UserSessionProvider.d.ts.map +1 -1
- package/lib/types/widgets/json-view/JSONCode.d.ts.map +1 -1
- package/lib/types/widgets/markdown/ArtifactContentRenderer.d.ts +10 -1
- package/lib/types/widgets/markdown/ArtifactContentRenderer.d.ts.map +1 -1
- package/lib/types/widgets/markdown/MarkdownFigure.d.ts +15 -0
- package/lib/types/widgets/markdown/MarkdownFigure.d.ts.map +1 -0
- package/lib/types/widgets/markdown/MarkdownRenderer.d.ts.map +1 -1
- package/lib/types/widgets/markdown/MermaidDiagram.d.ts.map +1 -1
- package/lib/types/widgets/markdown/codeBlockHandlers.d.ts +5 -2
- package/lib/types/widgets/markdown/codeBlockHandlers.d.ts.map +1 -1
- package/lib/types/widgets/markdown/index.d.ts +1 -0
- package/lib/types/widgets/markdown/index.d.ts.map +1 -1
- package/lib/types/widgets/markdown/normalizeCustomSchemeLinks.d.ts +9 -0
- package/lib/types/widgets/markdown/normalizeCustomSchemeLinks.d.ts.map +1 -0
- package/lib/types/widgets/markdown/normalizeDirectives.d.ts +20 -0
- package/lib/types/widgets/markdown/normalizeDirectives.d.ts.map +1 -0
- package/lib/types/widgets/markdown/remarkDirectiveHandler.d.ts +2 -0
- package/lib/types/widgets/markdown/remarkDirectiveHandler.d.ts.map +1 -0
- package/lib/types/widgets/monacoEditor/MonacoEditor.d.ts +1 -3
- package/lib/types/widgets/monacoEditor/MonacoEditor.d.ts.map +1 -1
- package/lib/types/widgets/schema-editor/ManagedSchema.d.ts +1 -1
- package/lib/types/widgets/schema-editor/ManagedSchema.d.ts.map +1 -1
- package/lib/vertesia-ui-core.js +1 -1
- package/lib/vertesia-ui-core.js.map +1 -1
- package/lib/vertesia-ui-features.js +1 -1
- package/lib/vertesia-ui-features.js.map +1 -1
- package/lib/vertesia-ui-layout.js +1 -1
- package/lib/vertesia-ui-layout.js.map +1 -1
- package/lib/vertesia-ui-router.js +1 -1
- package/lib/vertesia-ui-router.js.map +1 -1
- package/lib/vertesia-ui-session.js +1 -1
- package/lib/vertesia-ui-session.js.map +1 -1
- package/lib/vertesia-ui-shell.js +1 -1
- package/lib/vertesia-ui-shell.js.map +1 -1
- package/lib/vertesia-ui-widgets.js +1 -1
- package/lib/vertesia-ui-widgets.js.map +1 -1
- package/package.json +14 -10
- package/src/core/components/InputList.tsx +1 -1
- package/src/core/components/Overlay.tsx +1 -1
- package/src/core/components/SidePanel.tsx +29 -15
- package/src/core/components/Switch.tsx +1 -1
- package/src/core/components/index.ts +0 -8
- package/src/core/components/shadcn/Panel.tsx +50 -0
- package/src/core/components/{Badge.tsx → shadcn/badge.tsx} +3 -3
- package/src/core/components/shadcn/command.tsx +1 -1
- package/src/core/components/shadcn/filters/filterBar.tsx +76 -87
- package/src/core/components/shadcn/index.ts +5 -3
- package/src/core/components/{ConfirmModal.tsx → shadcn/modal/ConfirmModal.tsx} +8 -8
- package/src/core/components/{DeleteModal.tsx → shadcn/modal/DeleteModal.tsx} +1 -1
- package/src/core/components/shadcn/{dialog.tsx → modal/dialog.tsx} +43 -32
- package/src/core/components/shadcn/modal/index.ts +3 -0
- package/src/core/components/shadcn/popover.tsx +4 -2
- package/src/core/components/shadcn/selectBox.tsx +71 -52
- package/src/core/components/shadcn/tabs.tsx +36 -19
- package/src/core/components/shadcn/textarea.tsx +43 -2
- package/src/core/components/shadcn/tooltip.tsx +23 -17
- package/src/features/agent/PayloadBuilder.tsx +70 -9
- package/src/features/agent/chat/AgentChart.tsx +46 -678
- package/src/features/agent/chat/AskUserWidget.tsx +4 -3
- package/src/features/agent/chat/DocumentPanel.tsx +120 -0
- package/src/features/agent/chat/DocumentTabBar.tsx +49 -0
- package/src/features/agent/chat/ModernAgentConversation.tsx +403 -549
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +162 -55
- package/src/features/agent/chat/ModernAgentOutput/BatchProgressPanel.tsx +40 -10
- package/src/features/agent/chat/ModernAgentOutput/Header.tsx +12 -16
- package/src/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.tsx +3 -3
- package/src/features/agent/chat/ModernAgentOutput/MessageInput.tsx +68 -75
- package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +206 -94
- package/src/features/agent/chat/ModernAgentOutput/StreamingMessage.tsx +22 -5
- package/src/features/agent/chat/ModernAgentOutput/ToolCallGroup.tsx +295 -113
- package/src/features/agent/chat/ModernAgentOutput/WorkstreamTabs.tsx +11 -8
- package/src/features/agent/chat/ModernAgentOutput/utils.ts +133 -4
- package/src/features/agent/chat/SkillWidgetProvider.tsx +32 -15
- package/src/features/agent/chat/hooks/useAgentPlans.ts +190 -0
- package/src/features/agent/chat/hooks/useAgentStream.ts +239 -0
- package/src/features/agent/chat/hooks/useDocumentPanel.ts +118 -0
- package/src/features/agent/chat/hooks/useFileProcessing.ts +126 -0
- package/src/features/agent/chat/index.ts +18 -17
- package/src/features/agent/chat/types/document.ts +4 -0
- package/src/features/agent/index.ts +0 -2
- package/src/features/store/collections/BrowseCollectionView.tsx +5 -8
- package/src/features/store/collections/CreateCollection.tsx +8 -8
- package/src/features/store/collections/EditCollectionView.tsx +1 -1
- package/src/features/store/objects/DocumentSearchResults.tsx +9 -13
- package/src/features/store/objects/ExportPropertiesModal.tsx +9 -7
- package/src/features/store/objects/components/ContentOverview.tsx +29 -155
- package/src/features/store/objects/components/PropertiesEditorModal.tsx +0 -1
- package/src/features/store/objects/components/SelectDocumentModal.tsx +6 -6
- package/src/features/store/objects/components/VectorSearchWidget.tsx +2 -2
- package/src/features/store/objects/components/index.ts +1 -1
- package/src/features/store/objects/components/useDownloadFile.ts +237 -0
- package/src/features/store/objects/search/DocumentSearchContext.ts +1 -2
- package/src/features/store/objects/selection/SelectionActions.tsx +0 -4
- package/src/features/store/objects/selection/actions/AddToCollectionAction.tsx +13 -13
- package/src/features/store/objects/selection/actions/ChangeTypeAction.tsx +2 -6
- package/src/features/store/objects/selection/actions/ExportPropertiesAction.tsx +1 -3
- package/src/features/store/objects/selection/actions/StartWorkflowComponent.tsx +8 -8
- package/src/features/store/objects/upload/DocumentUploadModal.tsx +25 -25
- package/src/features/store/objects/upload/useSmartFileUploadProcessing.ts +16 -10
- package/src/features/store/types/ObjectSchemaEditor.tsx +32 -29
- package/src/features/store/types/SelectContentType.tsx +3 -3
- package/src/features/store/types/SelectContentTypeModal.tsx +17 -30
- package/src/features/store/types/TableLayoutEditor.tsx +14 -18
- package/src/features/user/UserInfo.tsx +176 -10
- package/src/features/utils/print.ts +0 -1
- package/src/layout/AppLayout.tsx +16 -44
- package/src/layout/Sidebar.tsx +7 -5
- package/src/router/HistoryNavigator.ts +9 -1
- package/src/router/Nav.tsx +7 -2
- package/src/session/UserSession.ts +38 -9
- package/src/session/UserSessionProvider.tsx +3 -2
- package/src/shell/apps/AppProjectSelector.tsx +2 -2
- package/src/shell/apps/StandaloneApp.tsx +3 -3
- package/src/shell/login/InviteAcceptModal.tsx +6 -6
- package/src/shell/login/SignInModal.tsx +1 -1
- package/src/shell/login/SignupForm.tsx +3 -3
- package/src/shell/login/UserInfo.tsx +5 -5
- package/src/widgets/json-view/JSONCode.tsx +1 -3
- package/src/widgets/json-view/JSONDisplay.tsx +1 -1
- package/src/widgets/markdown/ArtifactContentRenderer.tsx +115 -14
- package/src/widgets/markdown/MarkdownFigure.tsx +100 -0
- package/src/widgets/markdown/MarkdownRenderer.tsx +62 -9
- package/src/widgets/markdown/MermaidDiagram.tsx +97 -5
- package/src/widgets/markdown/codeBlockHandlers.test.tsx +3 -34
- package/src/widgets/markdown/codeBlockHandlers.tsx +47 -42
- package/src/widgets/markdown/index.ts +1 -0
- package/src/widgets/markdown/markdown.css +192 -0
- package/src/widgets/markdown/normalizeCustomSchemeLinks.test.ts +86 -0
- package/src/widgets/markdown/normalizeCustomSchemeLinks.ts +91 -0
- package/src/widgets/markdown/normalizeDirectives.ts +50 -0
- package/src/widgets/markdown/remarkDirectiveHandler.ts +119 -0
- package/src/widgets/monacoEditor/MonacoEditor.tsx +8 -22
- package/src/widgets/schema-editor/ManagedSchema.ts +1 -1
- package/src/widgets/schema-editor/editor/PropertyEditor.tsx +5 -5
- package/src/widgets/schema-editor/json-schema4-utils.ts +1 -1
- package/lib/esm/core/components/Badge.js.map +0 -1
- package/lib/esm/core/components/Button.js +0 -32
- package/lib/esm/core/components/Button.js.map +0 -1
- package/lib/esm/core/components/ConfirmModal.js +0 -10
- package/lib/esm/core/components/ConfirmModal.js.map +0 -1
- package/lib/esm/core/components/DeleteModal.js.map +0 -1
- package/lib/esm/core/components/MessageBox.js.map +0 -1
- package/lib/esm/core/components/Modal.js +0 -26
- package/lib/esm/core/components/Modal.js.map +0 -1
- package/lib/esm/core/components/Panel.js +0 -8
- package/lib/esm/core/components/Panel.js.map +0 -1
- package/lib/esm/core/components/SelectBox.js +0 -67
- package/lib/esm/core/components/SelectBox.js.map +0 -1
- package/lib/esm/core/components/shadcn/dialog.js.map +0 -1
- package/lib/esm/core/components/tabs/Tabs.js +0 -78
- package/lib/esm/core/components/tabs/Tabs.js.map +0 -1
- package/lib/esm/core/components/tabs/TabsContext.js +0 -7
- package/lib/esm/core/components/tabs/TabsContext.js.map +0 -1
- package/lib/esm/core/components/tabs/index.js +0 -3
- package/lib/esm/core/components/tabs/index.js.map +0 -1
- package/lib/esm/features/agent/createChartTool.js +0 -632
- package/lib/esm/features/agent/createChartTool.js.map +0 -1
- package/lib/esm/features/agent/examples.js +0 -295
- package/lib/esm/features/agent/examples.js.map +0 -1
- package/lib/esm/features/agent/visualization.js +0 -165
- package/lib/esm/features/agent/visualization.js.map +0 -1
- package/lib/esm/features/store/objects/components/useDownloadObject.js +0 -21
- package/lib/esm/features/store/objects/components/useDownloadObject.js.map +0 -1
- package/lib/types/core/components/Badge.d.ts.map +0 -1
- package/lib/types/core/components/Button.d.ts +0 -14
- package/lib/types/core/components/Button.d.ts.map +0 -1
- package/lib/types/core/components/ConfirmModal.d.ts.map +0 -1
- package/lib/types/core/components/DeleteModal.d.ts.map +0 -1
- package/lib/types/core/components/MessageBox.d.ts.map +0 -1
- package/lib/types/core/components/Modal.d.ts +0 -30
- package/lib/types/core/components/Modal.d.ts.map +0 -1
- package/lib/types/core/components/Panel.d.ts.map +0 -1
- package/lib/types/core/components/SelectBox.d.ts +0 -36
- package/lib/types/core/components/SelectBox.d.ts.map +0 -1
- package/lib/types/core/components/shadcn/dialog.d.ts.map +0 -1
- package/lib/types/core/components/tabs/Tabs.d.ts +0 -25
- package/lib/types/core/components/tabs/Tabs.d.ts.map +0 -1
- package/lib/types/core/components/tabs/TabsContext.d.ts +0 -17
- package/lib/types/core/components/tabs/TabsContext.d.ts.map +0 -1
- package/lib/types/core/components/tabs/index.d.ts +0 -3
- package/lib/types/core/components/tabs/index.d.ts.map +0 -1
- package/lib/types/features/agent/createChartTool.d.ts +0 -178
- package/lib/types/features/agent/createChartTool.d.ts.map +0 -1
- package/lib/types/features/agent/examples.d.ts +0 -59
- package/lib/types/features/agent/examples.d.ts.map +0 -1
- package/lib/types/features/agent/visualization.d.ts +0 -95
- package/lib/types/features/agent/visualization.d.ts.map +0 -1
- package/lib/types/features/store/objects/components/useDownloadObject.d.ts +0 -4
- package/lib/types/features/store/objects/components/useDownloadObject.d.ts.map +0 -1
- package/src/core/components/Button.tsx +0 -63
- package/src/core/components/Modal.tsx +0 -144
- package/src/core/components/Panel.tsx +0 -34
- package/src/core/components/SelectBox.tsx +0 -188
- package/src/core/components/tabs/Tabs.tsx +0 -132
- package/src/core/components/tabs/TabsContext.ts +0 -25
- package/src/core/components/tabs/index.ts +0 -2
- package/src/features/agent/CHART_INSTRUCTIONS.md +0 -228
- package/src/features/agent/createChartTool.ts +0 -643
- package/src/features/agent/examples.ts +0 -321
- package/src/features/agent/visualization.ts +0 -227
- package/src/features/store/objects/components/useDownloadObject.ts +0 -29
- /package/lib/esm/core/components/{MessageBox.js → shadcn/MessageBox.js} +0 -0
- /package/lib/types/core/components/{MessageBox.d.ts → shadcn/MessageBox.d.ts} +0 -0
- /package/lib/types/core/components/{ConfirmModal.d.ts → shadcn/modal/ConfirmModal.d.ts} +0 -0
- /package/lib/types/core/components/{DeleteModal.d.ts → shadcn/modal/DeleteModal.d.ts} +0 -0
- /package/src/core/components/{MessageBox.tsx → shadcn/MessageBox.tsx} +0 -0
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
import { Listbox, ListboxButton, ListboxOption, ListboxOptions } from "@headlessui/react";
|
|
2
|
-
import { X, Check, ChevronsUpDownIcon } from "lucide-react";
|
|
3
|
-
import clsx from "clsx";
|
|
4
|
-
import { ComponentType, KeyboardEvent, ReactNode, SyntheticEvent, useState, useEffect, useRef } from "react";
|
|
5
|
-
import { Button } from "./Button";
|
|
6
|
-
import { Center } from "./Center";
|
|
7
|
-
|
|
8
|
-
type OnChangeClearableSelectFn<T> = (option: T | undefined) => void;
|
|
9
|
-
type OnChangeNonClearableSelectFn<T> = (option: T) => void;
|
|
10
|
-
|
|
11
|
-
interface SelectBoxBaseProps<T> {
|
|
12
|
-
options: T[] | undefined
|
|
13
|
-
optionLabel?: (option: T) => ReactNode
|
|
14
|
-
value?: T
|
|
15
|
-
onChange: OnChangeNonClearableSelectFn<T>
|
|
16
|
-
className?: string
|
|
17
|
-
// compare for equality by field or comparison function
|
|
18
|
-
by?: (keyof T & string) | ((a: T, z: T) => boolean)
|
|
19
|
-
placeholder?: ReactNode
|
|
20
|
-
addNew?: () => void
|
|
21
|
-
addNewLabel?: string
|
|
22
|
-
disabled?: boolean
|
|
23
|
-
isClearable?: false
|
|
24
|
-
showFilter?: boolean | string
|
|
25
|
-
filterBy?: string | ((o: T) => string)
|
|
26
|
-
ClearIcon?: ComponentType<any>
|
|
27
|
-
clearTitle?: string | undefined
|
|
28
|
-
label?: string | undefined
|
|
29
|
-
}
|
|
30
|
-
interface ClearableSelectBoxProps<T> extends Omit<SelectBoxBaseProps<T>, 'isClearable' | 'onChange'> {
|
|
31
|
-
onChange: OnChangeClearableSelectFn<T>
|
|
32
|
-
isClearable: true
|
|
33
|
-
}
|
|
34
|
-
// interface NonClearableSelectBoxProps<T> extends Omit<SelectBoxBaseProps<T>, 'onChange'> {
|
|
35
|
-
// onChange: OnChangeNonClearableSelectFn<T>
|
|
36
|
-
// }
|
|
37
|
-
|
|
38
|
-
type SelectBoxProps<T> = ClearableSelectBoxProps<T> | SelectBoxBaseProps<T>
|
|
39
|
-
|
|
40
|
-
function getFilterByFn<T>(filterBy?: string | ((o: T) => string)) {
|
|
41
|
-
if (!filterBy) {
|
|
42
|
-
return (o: T) => String(o).toLowerCase();
|
|
43
|
-
} else if (typeof filterBy === 'string') {
|
|
44
|
-
return (o: any) => String(o[filterBy]).toLowerCase();
|
|
45
|
-
} else {
|
|
46
|
-
return filterBy;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export function SelectBox<T>({ clearTitle, ClearIcon = X, showFilter, filterBy, isClearable, disabled, by, options, value, onChange, className, addNew, addNewLabel, placeholder, optionLabel = (option) => String(option), label }: SelectBoxProps<T>) {
|
|
51
|
-
const [filter, setFilter] = useState<string>();
|
|
52
|
-
const buttonRef = useRef<HTMLButtonElement>(null);
|
|
53
|
-
const [buttonWidth, setButtonWidth] = useState<number>();
|
|
54
|
-
|
|
55
|
-
useEffect(() => {
|
|
56
|
-
if (buttonRef.current) {
|
|
57
|
-
const resizeObserver = new ResizeObserver((entries) => {
|
|
58
|
-
setButtonWidth(entries[0].contentRect.width);
|
|
59
|
-
});
|
|
60
|
-
resizeObserver.observe(buttonRef.current);
|
|
61
|
-
return () => resizeObserver.disconnect();
|
|
62
|
-
}
|
|
63
|
-
}, []);
|
|
64
|
-
|
|
65
|
-
const onClear = (e: SyntheticEvent) => {
|
|
66
|
-
e.preventDefault();
|
|
67
|
-
e.stopPropagation();
|
|
68
|
-
if (isClearable) {
|
|
69
|
-
(onChange as any)(undefined);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
const onFilterChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
73
|
-
setFilter(e.target.value);
|
|
74
|
-
}
|
|
75
|
-
let filteredOptions = options || [];
|
|
76
|
-
if (showFilter === undefined) {
|
|
77
|
-
showFilter = filteredOptions?.length >= 10;
|
|
78
|
-
}
|
|
79
|
-
if (showFilter && filter) {
|
|
80
|
-
const filterLc = filter.toLowerCase();
|
|
81
|
-
const filterFn = getFilterByFn(filterBy);
|
|
82
|
-
filteredOptions = filteredOptions.filter(o => filterFn(o).includes(filterLc))
|
|
83
|
-
}
|
|
84
|
-
const onFilterKeyDown = (e: KeyboardEvent<HTMLInputElement>) => {
|
|
85
|
-
if (e.key !== "Escape"
|
|
86
|
-
&& e.key !== "Enter"
|
|
87
|
-
&& e.key !== "ArrowDown"
|
|
88
|
-
&& e.key !== "ArrowUp") {
|
|
89
|
-
e.stopPropagation()
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
return (
|
|
93
|
-
<Listbox value={value ?? undefined} onChange={onChange} by={by} disabled={disabled}>
|
|
94
|
-
{() => (
|
|
95
|
-
<div className={'overflow-y-visible ' + className}>
|
|
96
|
-
<div className="relative">
|
|
97
|
-
<ListboxButton
|
|
98
|
-
ref={buttonRef}
|
|
99
|
-
className="relative w-full cursor-default rounded-md bg-white py-1.5 text-left text-gray-900 shadow-2xs ring-1 ring-inset ring-gray-300 focus:outline-hidden focus:ring-2 focus:ring-indigo-600 dark:ring-slate-600 dark:text-slate-50 dark:bg-slate-800 sm:text-sm sm:leading-6 hover:cursor-pointer"
|
|
100
|
-
>
|
|
101
|
-
{label && <div className='w-full text-gray-500 text-left px-2'>{label}</div>}
|
|
102
|
-
<span className="block truncate pl-3 pr-14">{value ? optionLabel(value) : placeholder}</span>
|
|
103
|
-
{
|
|
104
|
-
isClearable && value != null && <span className="absolute inset-y-0 right-0 mr-5 flex items-center pr-2" onClick={onClear}>
|
|
105
|
-
<ClearIcon title={clearTitle} className="size-5 text-gray-400 hover:text-red-500 cursor-pointer" aria-hidden="true" />
|
|
106
|
-
</span>
|
|
107
|
-
}
|
|
108
|
-
{
|
|
109
|
-
!disabled &&
|
|
110
|
-
<span className="pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2">
|
|
111
|
-
<ChevronsUpDownIcon className="size-5 text-gray-400" aria-hidden="true" />
|
|
112
|
-
</span>
|
|
113
|
-
}
|
|
114
|
-
</ListboxButton>
|
|
115
|
-
{/*
|
|
116
|
-
<Transition
|
|
117
|
-
show={open}
|
|
118
|
-
as={Fragment}
|
|
119
|
-
leave="transition ease-in duration-100"
|
|
120
|
-
leaveFrom="opacity-100"
|
|
121
|
-
leaveTo="opacity-0"
|
|
122
|
-
>
|
|
123
|
-
*/}
|
|
124
|
-
<ListboxOptions
|
|
125
|
-
anchor="bottom"
|
|
126
|
-
style={{ width: buttonWidth, zIndex: 100000000 }}
|
|
127
|
-
className="absolute z-10 mt-1 overflow-auto rounded-md bg-white dark:ring-slate-600 dark:text-slate-50 dark:bg-slate-800 py-1 text-base shadow-lg ring-1 ring-gray-300 ring-opacity-5 focus:outline-hidden sm:text-sm"
|
|
128
|
-
>
|
|
129
|
-
{showFilter &&
|
|
130
|
-
<div className="p-1">
|
|
131
|
-
<input type="text" value={filter || ''} onKeyDown={onFilterKeyDown} onChange={onFilterChange} className="w-full p-1 border border-gray-300 rounded-md dark:bg-slate-700 dark:text-slate-50" placeholder="Filter..." />
|
|
132
|
-
</div>
|
|
133
|
-
}
|
|
134
|
-
<div className="overflow-y-auto max-h-60">
|
|
135
|
-
{filteredOptions.map((option, i) =>
|
|
136
|
-
<ListOption key={i} option={option} optionLabel={optionLabel} className="hover:cursor-pointer"></ListOption>
|
|
137
|
-
)}
|
|
138
|
-
</div>
|
|
139
|
-
{addNew &&
|
|
140
|
-
<Center className="font-semibold py-2 border-t">
|
|
141
|
-
<Button variant='secondary' onClick={addNew}>{addNewLabel}</Button>
|
|
142
|
-
</Center>
|
|
143
|
-
}
|
|
144
|
-
</ListboxOptions>
|
|
145
|
-
|
|
146
|
-
{/*</Transition>*/}
|
|
147
|
-
</div>
|
|
148
|
-
</div>
|
|
149
|
-
)
|
|
150
|
-
}
|
|
151
|
-
</Listbox >
|
|
152
|
-
)
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
export function ListOption<T>({ option, optionLabel, onClick, className }: { option: T, optionLabel: (option: T) => ReactNode, onClick?: () => void, value?: T, className?: string }) {
|
|
157
|
-
return (
|
|
158
|
-
<ListboxOption
|
|
159
|
-
className={({ active }) =>
|
|
160
|
-
clsx(
|
|
161
|
-
active ? 'bg-indigo-600 text-white dark:bg-indigo-800 dark:text-white' : 'text-gray-900 dark:text-slate-50',
|
|
162
|
-
'relative cursor-default select-none py-2 pl-3 pr-9',
|
|
163
|
-
className
|
|
164
|
-
)
|
|
165
|
-
}
|
|
166
|
-
value={option}
|
|
167
|
-
onClick={onClick}
|
|
168
|
-
>
|
|
169
|
-
{({ selected, active }) => (
|
|
170
|
-
<>
|
|
171
|
-
<div className={clsx(selected ? 'font-semibold' : 'font-inherit', 'block truncate')}>
|
|
172
|
-
{optionLabel(option)}
|
|
173
|
-
</div>
|
|
174
|
-
|
|
175
|
-
{selected ? (
|
|
176
|
-
<div
|
|
177
|
-
className={clsx(
|
|
178
|
-
active ? 'text-white' : 'text-indigo-600',
|
|
179
|
-
'absolute inset-y-0 right-0 flex items-center pr-4'
|
|
180
|
-
)}
|
|
181
|
-
>
|
|
182
|
-
<Check className="size-5" aria-hidden="true" />
|
|
183
|
-
</div>
|
|
184
|
-
) : null}
|
|
185
|
-
</>
|
|
186
|
-
)}
|
|
187
|
-
</ListboxOption>)
|
|
188
|
-
}
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import clsx from 'clsx';
|
|
2
|
-
import { ComponentType, isValidElement, ReactNode, SyntheticEvent, useEffect, useState } from 'react';
|
|
3
|
-
|
|
4
|
-
import { Tab, TabsContext, useTabs } from './TabsContext.js';
|
|
5
|
-
|
|
6
|
-
function applyCurrentTab(tabs: Tab[], current?: string | (() => string)) {
|
|
7
|
-
const name = typeof current === 'function' ? current() : current;
|
|
8
|
-
let currentTab: Tab | null = null;
|
|
9
|
-
const newTabs = [];
|
|
10
|
-
for (const tab of tabs) {
|
|
11
|
-
const newTab = { ...tab };
|
|
12
|
-
newTab.current = false;
|
|
13
|
-
newTabs.push(newTab);
|
|
14
|
-
if (newTab.name === name) {
|
|
15
|
-
currentTab = newTab;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
if (!currentTab) {
|
|
19
|
-
currentTab = newTabs[0];
|
|
20
|
-
}
|
|
21
|
-
currentTab.current = true;
|
|
22
|
-
return newTabs;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
interface TabsProps {
|
|
26
|
-
current?: string | (() => string);
|
|
27
|
-
/**
|
|
28
|
-
* Return false to prevent the tab from being selected
|
|
29
|
-
* @param tab
|
|
30
|
-
* @returns
|
|
31
|
-
*/
|
|
32
|
-
onSelect?: (tab: Tab) => void | boolean;
|
|
33
|
-
tabs: Tab[];
|
|
34
|
-
children: ReactNode | ReactNode[];
|
|
35
|
-
navigate?: (path: string) => void;
|
|
36
|
-
}
|
|
37
|
-
export function Tabs({ current, onSelect, tabs, children, navigate }: TabsProps) {
|
|
38
|
-
const [_tabs, _setTabs] = useState<Tab[]>([]);
|
|
39
|
-
useEffect(() => {
|
|
40
|
-
_setTabs(applyCurrentTab(tabs, current));
|
|
41
|
-
}, [current, tabs]);
|
|
42
|
-
const context = {
|
|
43
|
-
tabs: _tabs,
|
|
44
|
-
select: (tab: Tab) => {
|
|
45
|
-
if (onSelect) {
|
|
46
|
-
if (onSelect(tab) === false) {
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
if (tab.href) {
|
|
51
|
-
if (navigate) {
|
|
52
|
-
navigate(tab.href);
|
|
53
|
-
} else {
|
|
54
|
-
window.location.href = tab.href;
|
|
55
|
-
}
|
|
56
|
-
} else {
|
|
57
|
-
_setTabs([...applyCurrentTab(_tabs, tab.name)]);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
return (
|
|
63
|
-
<TabsContext.Provider value={context}>
|
|
64
|
-
<div className="flex flex-col h-full">
|
|
65
|
-
{children}
|
|
66
|
-
</div>
|
|
67
|
-
</TabsContext.Provider>
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
interface TabsBarProps {
|
|
72
|
-
actions?: ReactNode | ReactNode[];
|
|
73
|
-
className?: string;
|
|
74
|
-
}
|
|
75
|
-
export function TabsBar({ actions, className }: TabsBarProps) {
|
|
76
|
-
const { tabs, select } = useTabs();
|
|
77
|
-
const _onClick = (e: SyntheticEvent, tab: Tab) => {
|
|
78
|
-
e.preventDefault();
|
|
79
|
-
e.stopPropagation();
|
|
80
|
-
// ignore if disabled
|
|
81
|
-
!tab.disabled && select(tab);
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
return (
|
|
85
|
-
<div className="border-b flex items-start justify-between">
|
|
86
|
-
<nav className="flex space-x-4 px-4" aria-label="Tabs">
|
|
87
|
-
{tabs.map((tab) => {
|
|
88
|
-
const cursor = tab.disabled ? 'cursor-not-allowed' : 'cursor-pointer';
|
|
89
|
-
return (
|
|
90
|
-
<a
|
|
91
|
-
key={tab.name}
|
|
92
|
-
href={tab.href || '#' + tab.name}
|
|
93
|
-
onClick={(e) => _onClick(e, tab)}
|
|
94
|
-
className={clsx(
|
|
95
|
-
tab.current
|
|
96
|
-
? 'border-indigo-500 text-indigo-600 dark:border-indigo-400 dark:text-indigo-50'
|
|
97
|
-
: 'border-transparent text-gray-500 dark:text-slate-300 hover:border-slate-400 hover:text-gray-700 dark:hover:border-slate-200 dark:hover:text-gray-200 ',
|
|
98
|
-
className,
|
|
99
|
-
'whitespace-nowrap border-b-2 py-2 px-1 text-sm font-medium',
|
|
100
|
-
cursor
|
|
101
|
-
)}
|
|
102
|
-
aria-current={tab.current ? 'page' : undefined}
|
|
103
|
-
>
|
|
104
|
-
{tab.label}
|
|
105
|
-
</a>
|
|
106
|
-
);
|
|
107
|
-
})}
|
|
108
|
-
</nav>
|
|
109
|
-
<div className="flex gap-x-1">{actions}</div>
|
|
110
|
-
</div>
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
interface TabsPanelProps { }
|
|
115
|
-
export function TabsPanel({ }: TabsPanelProps) {
|
|
116
|
-
const { tabs } = useTabs();
|
|
117
|
-
const content = tabs.find((t) => t.current)?.content;
|
|
118
|
-
if (!content) {
|
|
119
|
-
return null;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
if (isValidElement(content)) {
|
|
123
|
-
return <div className="h-full overflow-y-auto flex-1">{content}</div>;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
const Component = content as unknown as ComponentType;
|
|
127
|
-
return (
|
|
128
|
-
<div className="h-full overflow-y-auto flex-1">
|
|
129
|
-
<Component />
|
|
130
|
-
</div>
|
|
131
|
-
);
|
|
132
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ReactNode, createContext, useContext } from "react";
|
|
2
|
-
|
|
3
|
-
export interface Tab {
|
|
4
|
-
name: string;
|
|
5
|
-
current?: boolean;
|
|
6
|
-
href?: string;
|
|
7
|
-
label: ReactNode;
|
|
8
|
-
content: ReactNode;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface TabsContextProps {
|
|
13
|
-
tabs: Tab[];
|
|
14
|
-
select: (tab: Tab) => void;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export function useTabs() {
|
|
18
|
-
return useContext(TabsContext);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const TabsContext = createContext<TabsContextProps>({} as TabsContextProps);
|
|
22
|
-
|
|
23
|
-
export {
|
|
24
|
-
TabsContext
|
|
25
|
-
};
|
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
# Chart Creation Instructions for AI Agents
|
|
2
|
-
|
|
3
|
-
This document provides instructions for AI agents on how to create interactive charts that will be rendered in the UI.
|
|
4
|
-
|
|
5
|
-
## Overview
|
|
6
|
-
|
|
7
|
-
You can create charts by including a special markdown code block with the language `chart`. The UI will automatically detect and render these as interactive Recharts visualizations.
|
|
8
|
-
|
|
9
|
-
## Basic Format
|
|
10
|
-
|
|
11
|
-
```markdown
|
|
12
|
-
\`\`\`chart
|
|
13
|
-
{
|
|
14
|
-
"version": "1.0",
|
|
15
|
-
"library": "recharts",
|
|
16
|
-
"chart": "bar" | "line" | "composed",
|
|
17
|
-
"title": "Chart Title",
|
|
18
|
-
"description": "Optional description",
|
|
19
|
-
"data": [ /* array of data objects */ ],
|
|
20
|
-
"xKey": "fieldName",
|
|
21
|
-
"series": [ /* array of series configurations */ ],
|
|
22
|
-
"yAxis": { /* optional axis labels */ },
|
|
23
|
-
"options": { /* optional chart options */ }
|
|
24
|
-
}
|
|
25
|
-
\`\`\`
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## Chart Types
|
|
29
|
-
|
|
30
|
-
### 1. Bar Chart
|
|
31
|
-
Used for comparing values across categories.
|
|
32
|
-
|
|
33
|
-
```chart
|
|
34
|
-
{
|
|
35
|
-
"version": "1.0",
|
|
36
|
-
"chart": "bar",
|
|
37
|
-
"title": "Revenue by Quarter",
|
|
38
|
-
"data": [
|
|
39
|
-
{ "quarter": "Q1", "revenue": 100000 },
|
|
40
|
-
{ "quarter": "Q2", "revenue": 150000 },
|
|
41
|
-
{ "quarter": "Q3", "revenue": 120000 }
|
|
42
|
-
],
|
|
43
|
-
"xKey": "quarter",
|
|
44
|
-
"series": [
|
|
45
|
-
{ "key": "revenue", "label": "Revenue", "type": "bar" }
|
|
46
|
-
]
|
|
47
|
-
}
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
### 2. Line Chart
|
|
51
|
-
Used for showing trends over time.
|
|
52
|
-
|
|
53
|
-
```chart
|
|
54
|
-
{
|
|
55
|
-
"version": "1.0",
|
|
56
|
-
"chart": "line",
|
|
57
|
-
"title": "Performance Over Time",
|
|
58
|
-
"data": [
|
|
59
|
-
{ "period": "2024-Q1", "tvpi": 1.2, "dpi": 0.3 },
|
|
60
|
-
{ "period": "2024-Q2", "tvpi": 1.5, "dpi": 0.5 },
|
|
61
|
-
{ "period": "2024-Q3", "tvpi": 1.8, "dpi": 0.7 }
|
|
62
|
-
],
|
|
63
|
-
"xKey": "period",
|
|
64
|
-
"series": [
|
|
65
|
-
{ "key": "tvpi", "label": "TVPI", "color": "#4f46e5", "dot": false },
|
|
66
|
-
{ "key": "dpi", "label": "DPI", "color": "#16a34a", "dot": false }
|
|
67
|
-
],
|
|
68
|
-
"yAxis": {
|
|
69
|
-
"left": { "label": "Multiple (x)" }
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### 3. Composed Chart
|
|
75
|
-
Used for mixing bar and line charts (e.g., bars for cashflows, line for net).
|
|
76
|
-
|
|
77
|
-
```chart
|
|
78
|
-
{
|
|
79
|
-
"version": "1.0",
|
|
80
|
-
"chart": "composed",
|
|
81
|
-
"title": "Cashflow Timeline",
|
|
82
|
-
"data": [
|
|
83
|
-
{ "period": "2024-Q1", "calls": 1000000, "distributions": 500000, "netCashflow": -500000 },
|
|
84
|
-
{ "period": "2024-Q2", "calls": 800000, "distributions": 1200000, "netCashflow": 400000 }
|
|
85
|
-
],
|
|
86
|
-
"xKey": "period",
|
|
87
|
-
"series": [
|
|
88
|
-
{ "key": "calls", "label": "Calls", "type": "bar", "color": "#ef4444" },
|
|
89
|
-
{ "key": "distributions", "label": "Distributions", "type": "bar", "color": "#22c55e" },
|
|
90
|
-
{ "key": "netCashflow", "label": "Net CF", "type": "line", "color": "#0ea5e9", "yAxisId": "right", "dot": false }
|
|
91
|
-
],
|
|
92
|
-
"yAxis": {
|
|
93
|
-
"left": { "label": "Amount" },
|
|
94
|
-
"right": { "label": "Net" }
|
|
95
|
-
},
|
|
96
|
-
"options": {
|
|
97
|
-
"referenceZero": true
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
## Series Configuration
|
|
103
|
-
|
|
104
|
-
Each series can have:
|
|
105
|
-
|
|
106
|
-
- `key`: (required) The field name in the data
|
|
107
|
-
- `label`: Display name for the legend
|
|
108
|
-
- `type`: "bar" or "line" (for composed charts)
|
|
109
|
-
- `color`: Hex color code (e.g., "#4f46e5")
|
|
110
|
-
- `yAxisId`: "left" (default) or "right" for dual Y-axis
|
|
111
|
-
- `stackId`: Group bars for stacking
|
|
112
|
-
- `dot`: true/false - show dots on line charts
|
|
113
|
-
|
|
114
|
-
## Options
|
|
115
|
-
|
|
116
|
-
- `stacked`: true/false - Stack bars in bar charts
|
|
117
|
-
- `referenceZero`: true/false - Show a reference line at y=0
|
|
118
|
-
- `collapsible`: true/false - Allow users to collapse the chart (default: true)
|
|
119
|
-
- `collapseInitially`: true/false - Start in collapsed state
|
|
120
|
-
|
|
121
|
-
## Number Formatting
|
|
122
|
-
|
|
123
|
-
Numbers are automatically formatted:
|
|
124
|
-
- 1,000 → 1K
|
|
125
|
-
- 1,000,000 → 1M
|
|
126
|
-
- 1,000,000,000 → 1B
|
|
127
|
-
|
|
128
|
-
## Pre-built Chart Builders (TypeScript)
|
|
129
|
-
|
|
130
|
-
If you're writing TypeScript code, you can use these helper functions:
|
|
131
|
-
|
|
132
|
-
```typescript
|
|
133
|
-
import {
|
|
134
|
-
buildCashflowComposedChart,
|
|
135
|
-
buildPerformanceLineChart,
|
|
136
|
-
buildScenarioComparisonBarChart,
|
|
137
|
-
toChartMarkdown
|
|
138
|
-
} from '@vertesia/ui/features';
|
|
139
|
-
|
|
140
|
-
// Example: Create a cashflow chart
|
|
141
|
-
const chart = buildCashflowComposedChart({
|
|
142
|
-
title: 'Fund Cashflow',
|
|
143
|
-
rows: [
|
|
144
|
-
{ period: '2024-Q1', calls: 1000000, distributions: 500000 },
|
|
145
|
-
{ period: '2024-Q2', calls: 800000, distributions: 1200000 }
|
|
146
|
-
]
|
|
147
|
-
});
|
|
148
|
-
|
|
149
|
-
// Convert to markdown
|
|
150
|
-
const markdown = toChartMarkdown(chart);
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
### Available Builders
|
|
154
|
-
|
|
155
|
-
1. `buildCashflowComposedChart` - Calls/Distributions + Net CF
|
|
156
|
-
2. `buildPerformanceLineChart` - TVPI/DPI/RVPI J-curve
|
|
157
|
-
3. `buildScenarioComparisonBarChart` - Side-by-side comparison
|
|
158
|
-
4. `buildScenarioDeltaPercentChart` - % change visualization
|
|
159
|
-
5. `buildTvpiOverlayChart` - TVPI comparison between scenarios
|
|
160
|
-
6. `buildNavLineChart` - NAV over time
|
|
161
|
-
|
|
162
|
-
## Best Practices
|
|
163
|
-
|
|
164
|
-
1. **Use appropriate chart types**:
|
|
165
|
-
- Bar charts for comparisons
|
|
166
|
-
- Line charts for trends
|
|
167
|
-
- Composed charts for mixed metrics
|
|
168
|
-
|
|
169
|
-
2. **Keep data concise**:
|
|
170
|
-
- Limit to 20-30 data points for readability
|
|
171
|
-
- Use aggregation for large datasets
|
|
172
|
-
|
|
173
|
-
3. **Color consistency**:
|
|
174
|
-
- Use the default color palette for consistency
|
|
175
|
-
- Red (#ef4444) for negative/costs
|
|
176
|
-
- Green (#22c55e) for positive/gains
|
|
177
|
-
- Blue (#0ea5e9) for neutral metrics
|
|
178
|
-
|
|
179
|
-
4. **Add context**:
|
|
180
|
-
- Always include a descriptive title
|
|
181
|
-
- Add a description when the chart needs explanation
|
|
182
|
-
- Use axis labels for clarity
|
|
183
|
-
|
|
184
|
-
5. **Dual Y-axis**:
|
|
185
|
-
- Use when comparing metrics with different scales
|
|
186
|
-
- Example: Amount (left) vs Count (right)
|
|
187
|
-
|
|
188
|
-
## Example: Complete Workflow
|
|
189
|
-
|
|
190
|
-
When a user asks "Show me the fund performance":
|
|
191
|
-
|
|
192
|
-
1. Fetch or calculate the data
|
|
193
|
-
2. Format it as a chart spec
|
|
194
|
-
3. Include it in your response:
|
|
195
|
-
|
|
196
|
-
```markdown
|
|
197
|
-
Here's the fund performance over time:
|
|
198
|
-
|
|
199
|
-
\`\`\`chart
|
|
200
|
-
{
|
|
201
|
-
"version": "1.0",
|
|
202
|
-
"chart": "line",
|
|
203
|
-
"title": "Fund Performance",
|
|
204
|
-
"data": [
|
|
205
|
-
{ "period": "2024-Q1", "tvpi": 1.2 },
|
|
206
|
-
{ "period": "2024-Q2", "tvpi": 1.5 }
|
|
207
|
-
],
|
|
208
|
-
"xKey": "period",
|
|
209
|
-
"series": [
|
|
210
|
-
{ "key": "tvpi", "label": "TVPI", "color": "#4f46e5" }
|
|
211
|
-
]
|
|
212
|
-
}
|
|
213
|
-
\`\`\`
|
|
214
|
-
|
|
215
|
-
The fund shows strong performance with TVPI increasing from 1.2x to 1.5x.
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
## Common Pitfalls
|
|
219
|
-
|
|
220
|
-
❌ **Don't** include line breaks in the JSON
|
|
221
|
-
❌ **Don't** use single quotes in JSON (use double quotes)
|
|
222
|
-
❌ **Don't** forget to specify the chart type
|
|
223
|
-
❌ **Don't** mix up xKey with data field names
|
|
224
|
-
|
|
225
|
-
✅ **Do** validate your JSON before including it
|
|
226
|
-
✅ **Do** include descriptive labels
|
|
227
|
-
✅ **Do** test with sample data first
|
|
228
|
-
✅ **Do** provide context around the chart
|