@vertesia/ui 1.5.0-dev.20260901.052906Z → 1.5.0-dev.20260910.051115Z
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/core/components/Avatar.d.ts.map +1 -1
- package/lib/core/components/Avatar.js +3 -3
- package/lib/core/components/Avatar.js.map +1 -1
- package/lib/core/components/ComboBox.js +1 -1
- package/lib/core/components/ComboBox.js.map +1 -1
- package/lib/core/components/FileUpload.js +1 -1
- package/lib/core/components/FileUpload.js.map +1 -1
- package/lib/core/components/Link.js +1 -1
- package/lib/core/components/Link.js.map +1 -1
- package/lib/core/components/SelectList.js +1 -1
- package/lib/core/components/SelectList.js.map +1 -1
- package/lib/core/components/SidePanel.js +1 -1
- package/lib/core/components/SidePanel.js.map +1 -1
- package/lib/core/components/Spinner.js +1 -1
- package/lib/core/components/Spinner.js.map +1 -1
- package/lib/core/components/TagsInput.js +8 -8
- package/lib/core/components/TagsInput.js.map +1 -1
- package/lib/core/components/shadcn/MessageBox.js +1 -1
- package/lib/core/components/shadcn/MessageBox.js.map +1 -1
- package/lib/core/components/shadcn/button.js +1 -1
- package/lib/core/components/shadcn/button.js.map +1 -1
- package/lib/core/components/shadcn/card.d.ts.map +1 -1
- package/lib/core/components/shadcn/card.js +1 -1
- package/lib/core/components/shadcn/card.js.map +1 -1
- package/lib/core/components/shadcn/command.js +5 -5
- package/lib/core/components/shadcn/command.js.map +1 -1
- package/lib/core/components/shadcn/filters/DynamicLabel.js +1 -1
- package/lib/core/components/shadcn/filters/DynamicLabel.js.map +1 -1
- package/lib/core/components/shadcn/filters/comboBox/DateCombobox.js +3 -3
- package/lib/core/components/shadcn/filters/comboBox/DateCombobox.js.map +1 -1
- package/lib/core/components/shadcn/input.js +3 -3
- package/lib/core/components/shadcn/input.js.map +1 -1
- package/lib/core/components/shadcn/modal/ConfirmModal.js +1 -1
- package/lib/core/components/shadcn/modal/ConfirmModal.js.map +1 -1
- package/lib/core/components/shadcn/modal/dialog.d.ts.map +1 -1
- package/lib/core/components/shadcn/modal/dialog.js +2 -2
- package/lib/core/components/shadcn/modal/dialog.js.map +1 -1
- package/lib/core/components/shadcn/overflowTabs.js +2 -2
- package/lib/core/components/shadcn/overflowTabs.js.map +1 -1
- package/lib/core/components/shadcn/popover.js +1 -1
- package/lib/core/components/shadcn/popover.js.map +1 -1
- package/lib/core/components/shadcn/radioGroup.d.ts.map +1 -1
- package/lib/core/components/shadcn/radioGroup.js +3 -3
- package/lib/core/components/shadcn/radioGroup.js.map +1 -1
- package/lib/core/components/shadcn/selectBox.js +1 -1
- package/lib/core/components/shadcn/selectBox.js.map +1 -1
- package/lib/core/components/shadcn/tabs.d.ts.map +1 -1
- package/lib/core/components/shadcn/tabs.js +5 -2
- package/lib/core/components/shadcn/tabs.js.map +1 -1
- package/lib/core/components/styles.js +1 -1
- package/lib/core/components/styles.js.map +1 -1
- package/lib/core/components/table/index.js +1 -1
- package/lib/core/hooks/useFetch.d.ts.map +1 -1
- package/lib/core/hooks/useFetch.js +2 -0
- package/lib/core/hooks/useFetch.js.map +1 -1
- package/lib/features/activity-doc/ActivityDoc.js +8 -8
- package/lib/features/activity-doc/ActivityDoc.js.map +1 -1
- package/lib/features/agent/chat/AgentChart.js +1 -1
- package/lib/features/agent/chat/AgentChart.js.map +1 -1
- package/lib/features/agent/chat/AgentRightPanel.d.ts +2 -3
- package/lib/features/agent/chat/AgentRightPanel.d.ts.map +1 -1
- package/lib/features/agent/chat/AgentRightPanel.js +3 -3
- package/lib/features/agent/chat/AgentRightPanel.js.map +1 -1
- package/lib/features/agent/chat/AskUserWidget.d.ts.map +1 -1
- package/lib/features/agent/chat/AskUserWidget.js +13 -13
- package/lib/features/agent/chat/AskUserWidget.js.map +1 -1
- package/lib/features/agent/chat/DocumentPanel.d.ts +7 -7
- package/lib/features/agent/chat/DocumentPanel.d.ts.map +1 -1
- package/lib/features/agent/chat/DocumentPanel.js +6 -12
- package/lib/features/agent/chat/DocumentPanel.js.map +1 -1
- package/lib/features/agent/chat/DocumentsTab.d.ts +15 -0
- package/lib/features/agent/chat/DocumentsTab.d.ts.map +1 -0
- package/lib/features/agent/chat/DocumentsTab.js +33 -0
- package/lib/features/agent/chat/DocumentsTab.js.map +1 -0
- package/lib/features/agent/chat/JumpingDots.js +1 -1
- package/lib/features/agent/chat/JumpingDots.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentConversation.js +3 -3
- package/lib/features/agent/chat/ModernAgentConversation.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +22 -9
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/BatchProgressPanel.js +5 -5
- package/lib/features/agent/chat/ModernAgentOutput/BatchProgressPanel.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/Header.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/Header.js +16 -11
- package/lib/features/agent/chat/ModernAgentOutput/Header.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.js +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageInput.js +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageInput.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js +7 -7
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessagesContainer.js +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessagesContainer.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/PlanPanel.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/PlanPanel.js +10 -10
- package/lib/features/agent/chat/ModernAgentOutput/PlanPanel.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/SlideInPanel.js +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/SlideInPanel.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/SlidingMessages.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/SlidingMessages.js +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/SlidingMessages.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js +17 -17
- package/lib/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/StreamingMessage.js +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/StreamingMessage.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/SummaryConversation.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/SummaryConversation.js +14 -2
- package/lib/features/agent/chat/ModernAgentOutput/SummaryConversation.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/ToolCallGroup.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/ToolCallGroup.js +15 -15
- package/lib/features/agent/chat/ModernAgentOutput/ToolCallGroup.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.js +18 -0
- package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.js.map +1 -1
- package/lib/features/agent/chat/SlidingThinkingIndicator.d.ts.map +1 -1
- package/lib/features/agent/chat/SlidingThinkingIndicator.js +5 -2
- package/lib/features/agent/chat/SlidingThinkingIndicator.js.map +1 -1
- package/lib/features/agent/chat/VegaLiteChart.d.ts.map +1 -1
- package/lib/features/agent/chat/VegaLiteChart.js +6 -2
- package/lib/features/agent/chat/VegaLiteChart.js.map +1 -1
- package/lib/features/agent/chat/hooks/useDocumentPanel.d.ts +2 -2
- package/lib/features/agent/chat/hooks/useDocumentPanel.d.ts.map +1 -1
- package/lib/features/agent/chat/hooks/useDocumentPanel.js +0 -18
- package/lib/features/agent/chat/hooks/useDocumentPanel.js.map +1 -1
- package/lib/features/errors/RowErrorBoundary.js +1 -1
- package/lib/features/errors/RowErrorBoundary.js.map +1 -1
- package/lib/features/facets/AgentRunnerFacetsNav.js +1 -1
- package/lib/features/facets/AgentRunnerFacetsNav.js.map +1 -1
- package/lib/features/facets/utils/VInteractionFacet.d.ts +3 -5
- package/lib/features/facets/utils/VInteractionFacet.d.ts.map +1 -1
- package/lib/features/facets/utils/VInteractionFacet.js +10 -23
- package/lib/features/facets/utils/VInteractionFacet.js.map +1 -1
- package/lib/features/facets/utils/VUserFacet.js +1 -1
- package/lib/features/facets/utils/VUserFacet.js.map +1 -1
- package/lib/features/layout/GenericPageNavHeader.d.ts.map +1 -1
- package/lib/features/layout/GenericPageNavHeader.js +4 -1
- package/lib/features/layout/GenericPageNavHeader.js.map +1 -1
- package/lib/features/layout/NotFoundView.js +1 -1
- package/lib/features/layout/NotFoundView.js.map +1 -1
- package/lib/features/magic-pdf/AnnotatedImageSlider.js +4 -12
- package/lib/features/magic-pdf/AnnotatedImageSlider.js.map +1 -1
- package/lib/features/magic-pdf/ExtractedContentView.js +4 -4
- package/lib/features/magic-pdf/ExtractedContentView.js.map +1 -1
- package/lib/features/magic-pdf/MagicPdfView.js +1 -1
- package/lib/features/magic-pdf/MagicPdfView.js.map +1 -1
- package/lib/features/oauth/McpConnectionsButton.d.ts.map +1 -1
- package/lib/features/oauth/McpConnectionsButton.js +4 -1
- package/lib/features/oauth/McpConnectionsButton.js.map +1 -1
- package/lib/features/oauth/McpConnectionsDialog.d.ts.map +1 -1
- package/lib/features/oauth/McpConnectionsDialog.js +3 -2
- package/lib/features/oauth/McpConnectionsDialog.js.map +1 -1
- package/lib/features/oauth/useMcpConnections.d.ts +6 -7
- package/lib/features/oauth/useMcpConnections.d.ts.map +1 -1
- package/lib/features/oauth/useMcpConnections.js +27 -20
- package/lib/features/oauth/useMcpConnections.js.map +1 -1
- package/lib/features/pdf-viewer/PdfPageRenderer.js +2 -2
- package/lib/features/pdf-viewer/PdfPageRenderer.js.map +1 -1
- package/lib/features/pdf-viewer/PdfPageSlider.js +3 -3
- package/lib/features/pdf-viewer/PdfPageSlider.js.map +1 -1
- package/lib/features/pdf-viewer/SimplePdfViewer.js +1 -1
- package/lib/features/pdf-viewer/SimplePdfViewer.js.map +1 -1
- package/lib/features/permissions/UserPermissionsProvider.d.ts +2 -1
- package/lib/features/permissions/UserPermissionsProvider.d.ts.map +1 -1
- package/lib/features/permissions/UserPermissionsProvider.js +35 -22
- package/lib/features/permissions/UserPermissionsProvider.js.map +1 -1
- package/lib/features/permissions/useRoleMappings.d.ts +19 -0
- package/lib/features/permissions/useRoleMappings.d.ts.map +1 -0
- package/lib/features/permissions/useRoleMappings.js +87 -0
- package/lib/features/permissions/useRoleMappings.js.map +1 -0
- package/lib/features/store/collections/SelectCollection.js +1 -1
- package/lib/features/store/collections/SelectCollection.js.map +1 -1
- package/lib/features/store/objects/DocumentPreviewPanel.d.ts.map +1 -1
- package/lib/features/store/objects/DocumentPreviewPanel.js +9 -9
- package/lib/features/store/objects/DocumentPreviewPanel.js.map +1 -1
- package/lib/features/store/objects/DocumentTable.js +1 -1
- package/lib/features/store/objects/DocumentTable.js.map +1 -1
- package/lib/features/store/objects/components/DocumentIcon.js +2 -2
- package/lib/features/store/objects/components/DocumentIcon.js.map +1 -1
- package/lib/features/store/objects/components/DocumentInput.js +1 -1
- package/lib/features/store/objects/components/DocumentInput.js.map +1 -1
- package/lib/features/store/objects/components/PropertiesEditorModal.js +1 -1
- package/lib/features/store/objects/components/PropertiesEditorModal.js.map +1 -1
- package/lib/features/store/objects/components/SaveVersionConfirmModal.js +1 -1
- package/lib/features/store/objects/components/SaveVersionConfirmModal.js.map +1 -1
- package/lib/features/store/objects/layout/documentLayout.d.ts.map +1 -1
- package/lib/features/store/objects/layout/documentLayout.js +2 -2
- package/lib/features/store/objects/layout/documentLayout.js.map +1 -1
- package/lib/features/store/objects/selection/SelectionActions.js +1 -1
- package/lib/features/store/objects/selection/SelectionActions.js.map +1 -1
- package/lib/features/store/types/IntakePolicyEditor.d.ts +10 -1
- package/lib/features/store/types/IntakePolicyEditor.d.ts.map +1 -1
- package/lib/features/store/types/IntakePolicyEditor.js +29 -19
- package/lib/features/store/types/IntakePolicyEditor.js.map +1 -1
- package/lib/features/store/types/IntakePolicyForm.d.ts +1 -1
- package/lib/features/store/types/IntakePolicyForm.d.ts.map +1 -1
- package/lib/features/store/types/IntakePolicyForm.js +5 -3
- package/lib/features/store/types/IntakePolicyForm.js.map +1 -1
- package/lib/features/store/types/SelectContentTypeModal.js +1 -1
- package/lib/features/store/types/SelectContentTypeModal.js.map +1 -1
- package/lib/features/store/types/TypeRegistry.d.ts +10 -5
- package/lib/features/store/types/TypeRegistry.d.ts.map +1 -1
- package/lib/features/store/types/search/ObjectTypeSearchContext.d.ts +10 -5
- package/lib/features/store/types/search/ObjectTypeSearchContext.d.ts.map +1 -1
- package/lib/features/user/UserAvatar.js +2 -2
- package/lib/features/user/UserAvatar.js.map +1 -1
- package/lib/features/user/UserInfo.d.ts.map +1 -1
- package/lib/features/user/UserInfo.js +7 -7
- package/lib/features/user/UserInfo.js.map +1 -1
- package/lib/features/utils/index.d.ts +1 -0
- package/lib/features/utils/index.d.ts.map +1 -1
- package/lib/features/utils/index.js +1 -0
- package/lib/features/utils/index.js.map +1 -1
- package/lib/features/utils/interaction.d.ts +55 -0
- package/lib/features/utils/interaction.d.ts.map +1 -0
- package/lib/features/utils/interaction.js +77 -0
- package/lib/features/utils/interaction.js.map +1 -0
- package/lib/features/views/ViewResults.js +2 -2
- package/lib/features/views/ViewResults.js.map +1 -1
- package/lib/i18n/locales/ar.json +17 -1
- package/lib/i18n/locales/de.json +13 -1
- package/lib/i18n/locales/en.json +13 -1
- package/lib/i18n/locales/es.json +13 -1
- package/lib/i18n/locales/fr.json +13 -1
- package/lib/i18n/locales/it.json +13 -1
- package/lib/i18n/locales/ja.json +13 -1
- package/lib/i18n/locales/ko.json +13 -1
- package/lib/i18n/locales/pt.json +13 -1
- package/lib/i18n/locales/ru.json +15 -1
- package/lib/i18n/locales/tr.json +13 -1
- package/lib/i18n/locales/zh-TW.json +13 -1
- package/lib/i18n/locales/zh.json +13 -1
- package/lib/layout/FullHeightLayout.js +2 -2
- package/lib/layout/FullHeightLayout.js.map +1 -1
- package/lib/layout/Navbar.js +4 -4
- package/lib/layout/Navbar.js.map +1 -1
- package/lib/layout/Sidebar.js +1 -1
- package/lib/layout/Sidebar.js.map +1 -1
- package/lib/router/NestedNavigationContext.d.ts +3 -1
- package/lib/router/NestedNavigationContext.d.ts.map +1 -1
- package/lib/router/NestedNavigationContext.js +2 -2
- package/lib/router/NestedNavigationContext.js.map +1 -1
- package/lib/session/UserSessionProvider.d.ts.map +1 -1
- package/lib/session/UserSessionProvider.js +2 -13
- package/lib/session/UserSessionProvider.js.map +1 -1
- package/lib/session/auth/authState.d.ts +13 -0
- package/lib/session/auth/authState.d.ts.map +1 -0
- package/lib/session/auth/authState.js +37 -0
- package/lib/session/auth/authState.js.map +1 -0
- package/lib/session/auth/domainRouting.d.ts +39 -0
- package/lib/session/auth/domainRouting.d.ts.map +1 -1
- package/lib/session/auth/domainRouting.js +85 -0
- package/lib/session/auth/domainRouting.js.map +1 -1
- package/lib/session/auth/useAuthState.d.ts +4 -7
- package/lib/session/auth/useAuthState.d.ts.map +1 -1
- package/lib/session/auth/useAuthState.js +5 -41
- package/lib/session/auth/useAuthState.js.map +1 -1
- package/lib/session/index.d.ts +1 -0
- package/lib/session/index.d.ts.map +1 -1
- package/lib/session/index.js +2 -0
- package/lib/session/index.js.map +1 -1
- package/lib/shell/SplashScreen.d.ts +1 -1
- package/lib/shell/SplashScreen.d.ts.map +1 -1
- package/lib/shell/SplashScreen.js +6 -2
- package/lib/shell/SplashScreen.js.map +1 -1
- package/lib/shell/VertesiaShell.js +1 -1
- package/lib/shell/VertesiaShell.js.map +1 -1
- package/lib/shell/apps/AppProjectSelector.js +1 -1
- package/lib/shell/apps/AppProjectSelector.js.map +1 -1
- package/lib/shell/apps/StandaloneApp.js +2 -2
- package/lib/shell/apps/StandaloneApp.js.map +1 -1
- package/lib/shell/login/SignInPrimitives.js +2 -2
- package/lib/shell/login/SignInPrimitives.js.map +1 -1
- package/lib/shell/login/SigninScreen.js +1 -1
- package/lib/shell/login/SigninScreen.js.map +1 -1
- package/lib/shell/login/SignupForm.js +1 -1
- package/lib/shell/login/SignupForm.js.map +1 -1
- package/lib/shell/login/TerminalLogin.js +2 -2
- package/lib/shell/login/TerminalLogin.js.map +1 -1
- package/lib/shell/login/UserInfo.d.ts.map +1 -1
- package/lib/shell/login/UserInfo.js +1 -1
- package/lib/shell/login/UserInfo.js.map +1 -1
- package/lib/shell/login/UserSessionMenu.js +1 -1
- package/lib/shell/login/UserSessionMenu.js.map +1 -1
- package/lib/vertesia-ui-core.js +7 -7
- package/lib/vertesia-ui-core.js.map +1 -1
- package/lib/vertesia-ui-features.js +179 -182
- package/lib/vertesia-ui-features.js.map +1 -1
- package/lib/vertesia-ui-i18n.BfN7iOHb.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.BfN7iOHb.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.BjH2zEZw.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.BjH2zEZw.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.BjSwAZXl.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.BjSwAZXl.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.C7PUm5Au.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.C7PUm5Au.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.CF_1mUS5.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.CF_1mUS5.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.ChfUl3_-.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.ChfUl3_-.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.D-Sk-5d1.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.D-Sk-5d1.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.D4rnu1_S.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.D4rnu1_S.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.DDf0-laK.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.DDf0-laK.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.DN79y06J.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.DN79y06J.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.DWLIciYQ.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.DWLIciYQ.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.DvF_YaAJ.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.DvF_YaAJ.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.js +2 -2
- package/lib/vertesia-ui-layout.js +1 -1
- package/lib/vertesia-ui-layout.js.map +1 -1
- package/lib/vertesia-ui-rich-text.js +24 -24
- package/lib/vertesia-ui-rich-text.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 +3 -3
- package/lib/vertesia-ui-shell.js.map +1 -1
- package/lib/vertesia-ui-widgets.js +54 -54
- package/lib/vertesia-ui-widgets.js.map +1 -1
- package/lib/widgets/Progress.js +1 -1
- package/lib/widgets/Progress.js.map +1 -1
- package/lib/widgets/form/Form.js +2 -2
- package/lib/widgets/form/Form.js.map +1 -1
- package/lib/widgets/form/fields.js +2 -2
- package/lib/widgets/form/fields.js.map +1 -1
- package/lib/widgets/json-view/JSONView.js +1 -1
- package/lib/widgets/json-view/JSONView.js.map +1 -1
- package/lib/widgets/markdown/MermaidDiagram.js +1 -1
- package/lib/widgets/markdown/MermaidDiagram.js.map +1 -1
- package/lib/widgets/markdown/remarkDirectiveHandler.d.ts +7 -2
- package/lib/widgets/markdown/remarkDirectiveHandler.d.ts.map +1 -1
- package/lib/widgets/markdown/remarkDirectiveHandler.js +19 -4
- package/lib/widgets/markdown/remarkDirectiveHandler.js.map +1 -1
- package/lib/widgets/monacoEditor/MonacoEditor.d.ts.map +1 -1
- package/lib/widgets/monacoEditor/MonacoEditor.js +4 -2
- package/lib/widgets/monacoEditor/MonacoEditor.js.map +1 -1
- package/lib/widgets/monacoEditor/index.d.ts +1 -0
- package/lib/widgets/monacoEditor/index.d.ts.map +1 -1
- package/lib/widgets/monacoEditor/index.js +1 -0
- package/lib/widgets/monacoEditor/index.js.map +1 -1
- package/lib/widgets/monacoEditor/loadMonaco.d.ts +45 -0
- package/lib/widgets/monacoEditor/loadMonaco.d.ts.map +1 -0
- package/lib/widgets/monacoEditor/loadMonaco.js +62 -0
- package/lib/widgets/monacoEditor/loadMonaco.js.map +1 -0
- package/lib/widgets/properties/PropertiesView.js +1 -1
- package/lib/widgets/properties/PropertiesView.js.map +1 -1
- package/lib/widgets/schema-editor/editor/Editable.js +2 -2
- package/lib/widgets/schema-editor/editor/Editable.js.map +1 -1
- package/lib/widgets/schema-editor/editor/PropertyEditor.js +1 -1
- package/lib/widgets/schema-editor/editor/PropertyEditor.js.map +1 -1
- package/lib/widgets/schema-editor/editor/SchemaEditor.js +2 -2
- package/lib/widgets/schema-editor/editor/SchemaEditor.js.map +1 -1
- package/lib/widgets/upload/DropZone.js +1 -1
- package/lib/widgets/upload/DropZone.js.map +1 -1
- package/lib/widgets/upload/UploadResultCategory.d.ts +1 -1
- package/lib/widgets/upload/UploadResultCategory.d.ts.map +1 -1
- package/lib/widgets/upload/UploadResultCategory.js +3 -3
- package/lib/widgets/upload/UploadResultCategory.js.map +1 -1
- package/lib/widgets/upload/UploadSummary.js +1 -1
- package/lib/widgets/upload/UploadSummary.js.map +1 -1
- package/lib/widgets/xml-viewer/components/XMLViewer.d.ts.map +1 -1
- package/lib/widgets/xml-viewer/components/XMLViewer.js +7 -3
- package/lib/widgets/xml-viewer/components/XMLViewer.js.map +1 -1
- package/lib/widgets/xml-viewer/hooks/useCollapsible.d.ts +1 -1
- package/lib/widgets/xml-viewer/hooks/useXMLViewer.d.ts +11 -13
- package/lib/widgets/xml-viewer/hooks/useXMLViewer.d.ts.map +1 -1
- package/lib/widgets/xml-viewer/hooks/useXMLViewer.js +41 -14
- package/lib/widgets/xml-viewer/hooks/useXMLViewer.js.map +1 -1
- package/package.json +7 -7
- package/src/__tests__/contrast.test.ts +1 -0
- package/src/core/components/Avatar.tsx +3 -3
- package/src/core/components/ComboBox.tsx +1 -1
- package/src/core/components/FileUpload.tsx +4 -4
- package/src/core/components/Link.tsx +1 -1
- package/src/core/components/SelectList.tsx +1 -1
- package/src/core/components/SidePanel.tsx +1 -1
- package/src/core/components/Spinner.tsx +1 -1
- package/src/core/components/TagsInput.tsx +8 -8
- package/src/core/components/shadcn/MessageBox.tsx +1 -1
- package/src/core/components/shadcn/button.tsx +1 -1
- package/src/core/components/shadcn/card.tsx +1 -3
- package/src/core/components/shadcn/command.tsx +5 -5
- package/src/core/components/shadcn/filters/DynamicLabel.tsx +1 -1
- package/src/core/components/shadcn/filters/comboBox/DateCombobox.tsx +3 -3
- package/src/core/components/shadcn/input.tsx +3 -3
- package/src/core/components/shadcn/modal/ConfirmModal.tsx +3 -3
- package/src/core/components/shadcn/modal/dialog.tsx +2 -4
- package/src/core/components/shadcn/overflowTabs.tsx +2 -2
- package/src/core/components/shadcn/popover.tsx +1 -1
- package/src/core/components/shadcn/radioGroup.tsx +5 -7
- package/src/core/components/shadcn/selectBox.tsx +1 -1
- package/src/core/components/shadcn/tabs.tsx +4 -2
- package/src/core/components/styles.ts +1 -1
- package/src/core/components/table/index.tsx +1 -1
- package/src/core/hooks/useFetch.test.ts +20 -0
- package/src/core/hooks/useFetch.ts +2 -0
- package/src/css/base.css +1 -1
- package/src/css/color.css +4 -0
- package/src/css/theme.css +1 -0
- package/src/css/typography.css +2 -2
- package/src/features/activity-doc/ActivityDoc.tsx +11 -11
- package/src/features/agent/chat/AgentChart.tsx +1 -1
- package/src/features/agent/chat/AgentRightPanel.tsx +4 -8
- package/src/features/agent/chat/AskUserWidget.tsx +19 -23
- package/src/features/agent/chat/DocumentPanel.tsx +39 -48
- package/src/features/agent/chat/DocumentsTab.test.tsx +87 -0
- package/src/features/agent/chat/DocumentsTab.tsx +124 -0
- package/src/features/agent/chat/JumpingDots.tsx +3 -3
- package/src/features/agent/chat/ModernAgentConversation.test.tsx +0 -1
- package/src/features/agent/chat/ModernAgentConversation.tsx +3 -5
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.test.tsx +60 -1
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +44 -24
- package/src/features/agent/chat/ModernAgentOutput/BatchProgressPanel.tsx +12 -12
- package/src/features/agent/chat/ModernAgentOutput/Header.tsx +28 -15
- package/src/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.tsx +4 -4
- package/src/features/agent/chat/ModernAgentOutput/MessageInput.tsx +2 -2
- package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +7 -12
- package/src/features/agent/chat/ModernAgentOutput/MessagesContainer.tsx +1 -1
- package/src/features/agent/chat/ModernAgentOutput/PlanPanel.tsx +16 -22
- package/src/features/agent/chat/ModernAgentOutput/SlideInPanel.tsx +4 -4
- package/src/features/agent/chat/ModernAgentOutput/SlidingMessages.tsx +2 -4
- package/src/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.tsx +21 -21
- package/src/features/agent/chat/ModernAgentOutput/StreamingMessage.tsx +4 -4
- package/src/features/agent/chat/ModernAgentOutput/SummaryConversation.ts +16 -1
- package/src/features/agent/chat/ModernAgentOutput/ToolCallGroup.tsx +19 -40
- package/src/features/agent/chat/ModernAgentOutput/requestInputMessages.test.ts +41 -0
- package/src/features/agent/chat/ModernAgentOutput/requestInputMessages.ts +19 -0
- package/src/features/agent/chat/ModernAgentOutput/utils.test.ts +93 -0
- package/src/features/agent/chat/SlidingThinkingIndicator.tsx +5 -2
- package/src/features/agent/chat/VegaLiteChart.tsx +6 -2
- package/src/features/agent/chat/hooks/useDocumentPanel.test.tsx +33 -0
- package/src/features/agent/chat/hooks/useDocumentPanel.ts +3 -20
- package/src/features/errors/RowErrorBoundary.tsx +1 -1
- package/src/features/facets/AgentRunnerFacetsNav.tsx +1 -1
- package/src/features/facets/utils/VInteractionFacet.tsx +22 -34
- package/src/features/facets/utils/VUserFacet.tsx +1 -1
- package/src/features/layout/GenericPageNavHeader.tsx +9 -1
- package/src/features/layout/NotFoundView.tsx +1 -1
- package/src/features/magic-pdf/AnnotatedImageSlider.tsx +8 -16
- package/src/features/magic-pdf/ExtractedContentView.tsx +4 -4
- package/src/features/magic-pdf/MagicPdfView.tsx +1 -1
- package/src/features/oauth/McpConnectionsButton.test.tsx +79 -8
- package/src/features/oauth/McpConnectionsButton.tsx +6 -3
- package/src/features/oauth/McpConnectionsDialog.tsx +9 -3
- package/src/features/oauth/useMcpConnections.ts +33 -27
- package/src/features/pdf-viewer/PdfPageRenderer.tsx +2 -2
- package/src/features/pdf-viewer/PdfPageSlider.tsx +4 -4
- package/src/features/pdf-viewer/SimplePdfViewer.tsx +1 -1
- package/src/features/permissions/UserPermissionsProvider.test.tsx +172 -0
- package/src/features/permissions/UserPermissionsProvider.tsx +68 -21
- package/src/features/permissions/useRoleMappings.ts +105 -0
- package/src/features/store/collections/SelectCollection.tsx +1 -1
- package/src/features/store/objects/DocumentPreviewPanel.tsx +43 -53
- package/src/features/store/objects/DocumentTable.tsx +2 -2
- package/src/features/store/objects/components/DocumentIcon.tsx +4 -4
- package/src/features/store/objects/components/DocumentInput.tsx +3 -3
- package/src/features/store/objects/components/PropertiesEditorModal.tsx +2 -2
- package/src/features/store/objects/components/SaveVersionConfirmModal.tsx +2 -2
- package/src/features/store/objects/layout/documentLayout.tsx +2 -4
- package/src/features/store/objects/selection/SelectionActions.tsx +1 -1
- package/src/features/store/types/IntakePolicyEditor.tsx +70 -36
- package/src/features/store/types/IntakePolicyForm.tsx +11 -3
- package/src/features/store/types/SelectContentTypeModal.tsx +1 -1
- package/src/features/user/UserAvatar.tsx +3 -3
- package/src/features/user/UserInfo.tsx +11 -16
- package/src/features/utils/index.ts +1 -0
- package/src/features/utils/interaction.test.tsx +93 -0
- package/src/features/utils/interaction.tsx +125 -0
- package/src/features/views/ViewResults.tsx +3 -3
- package/src/i18n/locales/ar.json +17 -1
- package/src/i18n/locales/de.json +13 -1
- package/src/i18n/locales/en.json +13 -1
- package/src/i18n/locales/es.json +13 -1
- package/src/i18n/locales/fr.json +13 -1
- package/src/i18n/locales/it.json +13 -1
- package/src/i18n/locales/ja.json +13 -1
- package/src/i18n/locales/ko.json +13 -1
- package/src/i18n/locales/pt.json +13 -1
- package/src/i18n/locales/ru.json +15 -1
- package/src/i18n/locales/tr.json +13 -1
- package/src/i18n/locales/zh-TW.json +13 -1
- package/src/i18n/locales/zh.json +13 -1
- package/src/layout/FullHeightLayout.tsx +2 -2
- package/src/layout/Navbar.tsx +5 -5
- package/src/layout/Sidebar.tsx +1 -1
- package/src/router/NestedNavigationContext.test.tsx +54 -0
- package/src/router/NestedNavigationContext.tsx +9 -2
- package/src/session/UserSessionProvider.tsx +2 -15
- package/src/session/auth/authState.test.ts +35 -0
- package/src/session/auth/authState.ts +42 -0
- package/src/session/auth/domainRouting.test.ts +169 -1
- package/src/session/auth/domainRouting.ts +89 -0
- package/src/session/auth/useAuthState.ts +5 -49
- package/src/session/index.ts +6 -0
- package/src/shell/SplashScreen.test.tsx +22 -0
- package/src/shell/SplashScreen.tsx +6 -2
- package/src/shell/VertesiaShell.tsx +1 -1
- package/src/shell/apps/AppProjectSelector.tsx +1 -1
- package/src/shell/apps/StandaloneApp.tsx +9 -9
- package/src/shell/login/SignInPrimitives.tsx +2 -2
- package/src/shell/login/SigninScreen.tsx +1 -1
- package/src/shell/login/SignupForm.tsx +2 -2
- package/src/shell/login/TerminalLogin.tsx +5 -5
- package/src/shell/login/UserInfo.tsx +2 -5
- package/src/shell/login/UserSessionMenu.tsx +2 -2
- package/src/widgets/Progress.tsx +2 -2
- package/src/widgets/form/Form.tsx +4 -4
- package/src/widgets/form/fields.tsx +2 -2
- package/src/widgets/json-view/JSONView.tsx +1 -6
- package/src/widgets/markdown/ArtifactEditingSurface.test.tsx +33 -29
- package/src/widgets/markdown/MarkdownRenderer.test.tsx +52 -0
- package/src/widgets/markdown/MermaidDiagram.tsx +2 -2
- package/src/widgets/markdown/remarkDirectiveHandler.ts +21 -5
- package/src/widgets/monacoEditor/MonacoEditor.tsx +4 -2
- package/src/widgets/monacoEditor/index.ts +1 -0
- package/src/widgets/monacoEditor/loadMonaco.test.ts +63 -0
- package/src/widgets/monacoEditor/loadMonaco.ts +70 -0
- package/src/widgets/properties/PropertiesView.tsx +1 -1
- package/src/widgets/schema-editor/editor/Editable.tsx +2 -2
- package/src/widgets/schema-editor/editor/PropertyEditor.tsx +1 -1
- package/src/widgets/schema-editor/editor/SchemaEditor.tsx +2 -2
- package/src/widgets/upload/DropZone.tsx +1 -1
- package/src/widgets/upload/UploadResultCategory.tsx +7 -7
- package/src/widgets/upload/UploadSummary.tsx +4 -4
- package/src/widgets/xml-viewer/components/XMLViewer.tsx +7 -3
- package/src/widgets/xml-viewer/hooks/useXMLViewer.test.ts +60 -7
- package/src/widgets/xml-viewer/hooks/useXMLViewer.ts +70 -16
- package/lib/features/agent/chat/DocumentTabBar.d.ts +0 -9
- package/lib/features/agent/chat/DocumentTabBar.d.ts.map +0 -1
- package/lib/features/agent/chat/DocumentTabBar.js +0 -9
- package/lib/features/agent/chat/DocumentTabBar.js.map +0 -1
- package/lib/vertesia-ui-i18n.BJBGsq-8.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.BJBGsq-8.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.BY5YG5cX.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.BY5YG5cX.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.Bd5_1BXO.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.Bd5_1BXO.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.Bvwej2HH.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.Bvwej2HH.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.CMT3f4gf.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.CMT3f4gf.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.D56DNPJW.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.D56DNPJW.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.DDzKLNx6.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.DDzKLNx6.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.D_Am1LpF.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.D_Am1LpF.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.DrZizgGV.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.DrZizgGV.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.DwHsq86z.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.DwHsq86z.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.PLpo0Bbz.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.PLpo0Bbz.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.xVbXALqz.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.xVbXALqz.chunk.js.map +0 -1
- package/src/features/agent/chat/DocumentTabBar.tsx +0 -41
|
@@ -44,12 +44,7 @@ interface BlockElementProps {
|
|
|
44
44
|
}
|
|
45
45
|
function BlockElement({ children, className }: BlockElementProps) {
|
|
46
46
|
return (
|
|
47
|
-
<div
|
|
48
|
-
className={clsx(
|
|
49
|
-
'flex flex-col gap-4 py-2 ps-4 border-s-4 border-s-solid border-s-slate-100 dark:border-s-slate-600',
|
|
50
|
-
className,
|
|
51
|
-
)}
|
|
52
|
-
>
|
|
47
|
+
<div className={clsx('flex flex-col gap-4 py-2 ps-4 border-s-4 border-s-solid border-s-border', className)}>
|
|
53
48
|
{children}
|
|
54
49
|
</div>
|
|
55
50
|
);
|
|
@@ -17,6 +17,19 @@ import type { MarkdownEditingAction } from './CollaborativeMarkdownRenderer.js';
|
|
|
17
17
|
// first document-mode test can legitimately take longer than Testing Library's one-second default.
|
|
18
18
|
const LAZY_EDITOR_WAIT = { timeout: 5_000 } as const;
|
|
19
19
|
|
|
20
|
+
// Waiting up to 5 s for the editor and then driving a save through it does not fit in vitest's 5 s
|
|
21
|
+
// default, so a slow machine turned a passing test into a timeout. Raised for the file rather than
|
|
22
|
+
// per test: every document-mode case here pays the same lazy-load cost.
|
|
23
|
+
vi.setConfig({ testTimeout: 20_000 });
|
|
24
|
+
|
|
25
|
+
// Budgets for the two shapes of save assertion in this file. A plain save is one debounce (400 ms)
|
|
26
|
+
// plus one mocked round-trip. A conflict rebase is the same debounce followed by three sequential
|
|
27
|
+
// round-trips -- save, 412, refetch, merge, save again -- so it needs several times the budget, and
|
|
28
|
+
// giving it the plain-save one made it the file's flakiest assertion on a loaded machine: the retry
|
|
29
|
+
// was still in flight when the wait expired, reported as "called only 1 times".
|
|
30
|
+
const SAVE_WAIT = { timeout: 2_500 } as const;
|
|
31
|
+
const REBASE_WAIT = { timeout: 8_000 } as const;
|
|
32
|
+
|
|
20
33
|
const mocks = vi.hoisted(() => {
|
|
21
34
|
const getArtifactContent = vi.fn();
|
|
22
35
|
const updateArtifactContent = vi.fn();
|
|
@@ -161,15 +174,12 @@ describe('ArtifactEditingSurface', () => {
|
|
|
161
174
|
await user.click(editor);
|
|
162
175
|
await user.type(editor, ' revised');
|
|
163
176
|
|
|
164
|
-
await waitFor(
|
|
165
|
-
()
|
|
166
|
-
expect
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
},
|
|
171
|
-
{ timeout: 2500 },
|
|
172
|
-
);
|
|
177
|
+
await waitFor(() => {
|
|
178
|
+
expect(mocks.updateArtifactContent).toHaveBeenCalledWith('run-1', 'drafts/document.md', {
|
|
179
|
+
content: expect.stringContaining('revised'),
|
|
180
|
+
generation: 'generation-1',
|
|
181
|
+
});
|
|
182
|
+
}, SAVE_WAIT);
|
|
173
183
|
});
|
|
174
184
|
|
|
175
185
|
it('uses the floating selection comment control instead of a redundant toolbar button', async () => {
|
|
@@ -280,16 +290,13 @@ describe('ArtifactEditingSurface', () => {
|
|
|
280
290
|
|
|
281
291
|
await user.type(editor, ' local edit');
|
|
282
292
|
|
|
283
|
-
await waitFor(
|
|
284
|
-
()
|
|
285
|
-
|
|
286
|
-
expect
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
},
|
|
291
|
-
{ timeout: 2500 },
|
|
292
|
-
);
|
|
293
|
+
await waitFor(() => {
|
|
294
|
+
expect(mocks.updateArtifactContent).toHaveBeenCalledTimes(1);
|
|
295
|
+
expect(mocks.updateArtifactContent).toHaveBeenLastCalledWith('run-1', 'drafts/document.md', {
|
|
296
|
+
content: expect.stringContaining('local edit'),
|
|
297
|
+
generation: 'generation-1',
|
|
298
|
+
});
|
|
299
|
+
}, SAVE_WAIT);
|
|
293
300
|
});
|
|
294
301
|
|
|
295
302
|
it('rebases focused full-document edits over a non-overlapping agent change after 412', async () => {
|
|
@@ -347,15 +354,12 @@ describe('ArtifactEditingSurface', () => {
|
|
|
347
354
|
selection?.addRange(range);
|
|
348
355
|
await user.type(editor, '!', { skipClick: true });
|
|
349
356
|
|
|
350
|
-
await waitFor(
|
|
351
|
-
()
|
|
352
|
-
expect
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
},
|
|
357
|
-
{ timeout: 2500 },
|
|
358
|
-
);
|
|
357
|
+
await waitFor(() => {
|
|
358
|
+
expect(mocks.updateArtifactContent).toHaveBeenNthCalledWith(2, 'run-1', 'drafts/document.md', {
|
|
359
|
+
content: expect.stringMatching(/updated remotely[\s\S]*Second paragraph\.!/),
|
|
360
|
+
generation: 'generation-agent',
|
|
361
|
+
});
|
|
362
|
+
}, REBASE_WAIT);
|
|
359
363
|
expect(screen.queryByRole('alert')).toBeNull();
|
|
360
364
|
expect(editor.textContent).toContain('First paragraph updated remotely.');
|
|
361
365
|
});
|
|
@@ -429,7 +433,7 @@ describe('ArtifactEditingSurface', () => {
|
|
|
429
433
|
content: 'First paragraph updated remotely.\n\nSecond paragraph edited locally.',
|
|
430
434
|
generation: 'generation-agent',
|
|
431
435
|
});
|
|
432
|
-
});
|
|
436
|
+
}, REBASE_WAIT);
|
|
433
437
|
expect(await screen.findByText('First paragraph updated remotely.')).not.toBeNull();
|
|
434
438
|
expect(await screen.findByText('Second paragraph edited locally.')).not.toBeNull();
|
|
435
439
|
expect(onAction).toHaveBeenCalledWith(
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// @vitest-environment jsdom
|
|
2
|
+
|
|
3
|
+
import { cleanup, render, screen } from '@testing-library/react';
|
|
4
|
+
import { afterEach, describe, expect, it } from 'vitest';
|
|
5
|
+
import { MarkdownRenderer } from './MarkdownRenderer.js';
|
|
6
|
+
|
|
7
|
+
afterEach(cleanup);
|
|
8
|
+
|
|
9
|
+
describe('MarkdownRenderer colon text', () => {
|
|
10
|
+
it('preserves times in headings and agenda lists without inserting block elements', () => {
|
|
11
|
+
const { container } = render(
|
|
12
|
+
<MarkdownRenderer>
|
|
13
|
+
{
|
|
14
|
+
'**DAY 1 — 9:00 a.m. to 4:30 p.m.**\n\n1. 9:00–9:15 (15 min): Welcome\n2. 9:15–9:45 (30 min): Foundations'
|
|
15
|
+
}
|
|
16
|
+
</MarkdownRenderer>,
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
expect(container.querySelector('strong')?.textContent).toBe('DAY 1 — 9:00 a.m. to 4:30 p.m.');
|
|
20
|
+
expect(screen.getAllByRole('listitem').map((item) => item.textContent)).toEqual([
|
|
21
|
+
'9:00–9:15 (15 min): Welcome',
|
|
22
|
+
'9:15–9:45 (30 min): Foundations',
|
|
23
|
+
]);
|
|
24
|
+
expect(container.querySelector('li div, strong div')).toBeNull();
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it('preserves minutes in table cells', () => {
|
|
28
|
+
render(<MarkdownRenderer>{'| Start | End |\n| --- | --- |\n| 9:15 | 10:30 |'}</MarkdownRenderer>);
|
|
29
|
+
|
|
30
|
+
expect(screen.getAllByRole('cell').map((cell) => cell.textContent)).toEqual(['9:15', '10:30']);
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it.each([':unknown[label]{key="value"}', ':note[inline]', ':00', ':unknown[a :nested[b]]'])(
|
|
34
|
+
'preserves unsupported inline syntax exactly: %s',
|
|
35
|
+
(text) => {
|
|
36
|
+
const { container } = render(<MarkdownRenderer>{`Before ${text} after`}</MarkdownRenderer>);
|
|
37
|
+
expect(container.querySelector('p')?.textContent).toBe(`Before ${text} after`);
|
|
38
|
+
},
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
it('continues to render block callouts, generic containers and page breaks', () => {
|
|
42
|
+
const { container } = render(
|
|
43
|
+
<MarkdownRenderer>
|
|
44
|
+
{':::note\nReview at 9:15.\n:::\n\n:::custom\nContent\n:::\n\n::pagebreak'}
|
|
45
|
+
</MarkdownRenderer>,
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
expect(container.querySelector('.md-callout-info')?.textContent).toContain('Review at 9:15.');
|
|
49
|
+
expect(container.querySelector('.md-custom')?.textContent).toContain('Content');
|
|
50
|
+
expect(container.querySelector('hr.md-pagebreak')).not.toBeNull();
|
|
51
|
+
});
|
|
52
|
+
});
|
|
@@ -192,8 +192,8 @@ export function MermaidDiagram({ code, className }: MermaidDiagramProps) {
|
|
|
192
192
|
|
|
193
193
|
if (!svg) {
|
|
194
194
|
return (
|
|
195
|
-
<div className={`my-4 p-4 bg-
|
|
196
|
-
<div className="h-32 bg-
|
|
195
|
+
<div className={`my-4 p-4 bg-muted rounded-lg animate-pulse ${className || ''}`}>
|
|
196
|
+
<div className="h-32 bg-muted rounded"></div>
|
|
197
197
|
</div>
|
|
198
198
|
);
|
|
199
199
|
}
|
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
* :::note / :::warning / :::tip / :::caution / :::important → callout <div>s
|
|
9
9
|
* :::name → <div class="md-name"> (generic fallback)
|
|
10
10
|
*/
|
|
11
|
-
import { type VisitorResult, visit } from 'unist-util-visit';
|
|
11
|
+
import { SKIP, type VisitorResult, visit } from 'unist-util-visit';
|
|
12
12
|
|
|
13
|
-
type
|
|
13
|
+
type RemarkNode = Parameters<typeof visit>[0];
|
|
14
|
+
type RemarkTree = RemarkNode & { children: RemarkNode[] };
|
|
14
15
|
|
|
15
16
|
// Callout types mapped to CSS modifier classes (semantic design system)
|
|
16
17
|
const CALLOUT_TYPES: Record<string, string> = {
|
|
@@ -41,9 +42,24 @@ interface DirectiveNode {
|
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
export function remarkDirectiveHandler() {
|
|
44
|
-
return (tree: RemarkTree) => {
|
|
45
|
-
visit(tree, (node): VisitorResult => {
|
|
46
|
-
if (node.type
|
|
45
|
+
return (tree: RemarkTree, file: { toString(): string }) => {
|
|
46
|
+
visit(tree, (node, index, parent): VisitorResult => {
|
|
47
|
+
if (node.type === 'textDirective') {
|
|
48
|
+
// Only block directives are supported. The parser also recognizes ordinary
|
|
49
|
+
// colon text such as the minutes in 9:15; preserve its exact source spelling.
|
|
50
|
+
const start = node.position?.start.offset;
|
|
51
|
+
const end = node.position?.end.offset;
|
|
52
|
+
if (parent && index !== undefined && start !== undefined && end !== undefined) {
|
|
53
|
+
const textNode = {
|
|
54
|
+
type: 'text',
|
|
55
|
+
value: file.toString().slice(start, end),
|
|
56
|
+
position: node.position,
|
|
57
|
+
};
|
|
58
|
+
parent.children[index] = textNode;
|
|
59
|
+
}
|
|
60
|
+
return SKIP;
|
|
61
|
+
}
|
|
62
|
+
if (node.type !== 'containerDirective' && node.type !== 'leafDirective') {
|
|
47
63
|
return;
|
|
48
64
|
}
|
|
49
65
|
|
|
@@ -4,12 +4,14 @@ import debounce from 'debounce';
|
|
|
4
4
|
import type * as monaco from 'monaco-editor';
|
|
5
5
|
import { lazy, type RefObject, Suspense, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
6
6
|
import { registerCustomFoldingProviders } from './foldingProviders.js';
|
|
7
|
+
import { loadMonacoReact } from './loadMonaco.js';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* The Monaco React wrapper drags in the Monaco loader (and, once mounted, the editor itself) on
|
|
10
|
-
* import. Most screens never open an editor, so it is fetched on first render instead
|
|
11
|
+
* import. Most screens never open an editor, so it is fetched on first render instead --
|
|
12
|
+
* through loadMonacoReact, which applies the runtime version pin before handing the module out.
|
|
11
13
|
*/
|
|
12
|
-
const Editor = lazy(() =>
|
|
14
|
+
const Editor = lazy(() => loadMonacoReact().then(({ Editor: component }) => ({ default: component })));
|
|
13
15
|
|
|
14
16
|
export type Monaco = typeof monaco;
|
|
15
17
|
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { afterEach, describe, expect, it, vi } from 'vitest';
|
|
2
|
+
|
|
3
|
+
// Each case imports the module fresh: loadMonaco keeps the resolved wrapper and the "pin applied"
|
|
4
|
+
// flag in module scope, which is the behavior under test.
|
|
5
|
+
afterEach(() => {
|
|
6
|
+
vi.resetModules();
|
|
7
|
+
vi.doUnmock('@monaco-editor/react');
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
describe('loadMonacoReact', () => {
|
|
11
|
+
it('applies the version pin once and shares one module across callers', async () => {
|
|
12
|
+
const config = vi.fn();
|
|
13
|
+
let imports = 0;
|
|
14
|
+
vi.doMock('@monaco-editor/react', () => {
|
|
15
|
+
imports++;
|
|
16
|
+
return { loader: { config }, Editor: () => null };
|
|
17
|
+
});
|
|
18
|
+
const { loadMonacoReact } = await import('./loadMonaco.js');
|
|
19
|
+
|
|
20
|
+
const [first, second] = await Promise.all([loadMonacoReact(), loadMonacoReact()]);
|
|
21
|
+
|
|
22
|
+
expect(first).toBe(second);
|
|
23
|
+
expect(imports).toBe(1);
|
|
24
|
+
expect(config).toHaveBeenCalledTimes(1);
|
|
25
|
+
expect(config).toHaveBeenCalledWith({ paths: { vs: expect.stringContaining('monaco-editor@') } });
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
// A memoized rejection would make every later attempt fail instantly for the rest of the
|
|
29
|
+
// session, turning one transient chunk error into an editor that never opens again.
|
|
30
|
+
it('retries after a failed import instead of caching the failure', async () => {
|
|
31
|
+
let attempts = 0;
|
|
32
|
+
vi.doMock('@monaco-editor/react', () => {
|
|
33
|
+
attempts++;
|
|
34
|
+
if (attempts === 1) {
|
|
35
|
+
throw new Error('chunk load failed');
|
|
36
|
+
}
|
|
37
|
+
return { loader: { config: vi.fn() }, Editor: () => null };
|
|
38
|
+
});
|
|
39
|
+
const { loadMonacoReact } = await import('./loadMonaco.js');
|
|
40
|
+
|
|
41
|
+
// Not asserted by message: vitest replaces a throwing mock factory's error with its own.
|
|
42
|
+
await expect(loadMonacoReact()).rejects.toThrow();
|
|
43
|
+
await expect(loadMonacoReact()).resolves.toBeDefined();
|
|
44
|
+
expect(attempts).toBe(2);
|
|
45
|
+
});
|
|
46
|
+
it('retries configuration after it throws and only caches a successful configuration', async () => {
|
|
47
|
+
const config = vi
|
|
48
|
+
.fn()
|
|
49
|
+
.mockImplementationOnce(() => {
|
|
50
|
+
throw new Error('configuration failed');
|
|
51
|
+
})
|
|
52
|
+
.mockImplementation(() => undefined);
|
|
53
|
+
vi.doMock('@monaco-editor/react', () => ({ loader: { config }, Editor: () => null }));
|
|
54
|
+
const { loadMonacoReact } = await import('./loadMonaco.js');
|
|
55
|
+
|
|
56
|
+
await expect(loadMonacoReact()).rejects.toThrow('configuration failed');
|
|
57
|
+
const [first, second] = await Promise.all([loadMonacoReact(), loadMonacoReact()]);
|
|
58
|
+
expect(first).toBe(second);
|
|
59
|
+
expect(config).toHaveBeenCalledTimes(2);
|
|
60
|
+
await expect(loadMonacoReact()).resolves.toBe(first);
|
|
61
|
+
expect(config).toHaveBeenCalledTimes(2);
|
|
62
|
+
});
|
|
63
|
+
});
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single entry point for pulling in the Monaco React wrapper, and the single place that pins the
|
|
3
|
+
* Monaco runtime version.
|
|
4
|
+
*
|
|
5
|
+
* Two rules this module exists to enforce:
|
|
6
|
+
*
|
|
7
|
+
* 1. `@monaco-editor/react` must never be reachable from an app's *static* startup graph. It was
|
|
8
|
+
* imported at the top of composable-ui's `main.tsx` (only to call `loader.config`), which put
|
|
9
|
+
* it in the entry chunk and therefore in the generated `<link rel="modulepreload">` closure —
|
|
10
|
+
* every page load fetched the Monaco wrapper, including the ones that never open an editor.
|
|
11
|
+
* 2. Whichever code path loads Monaco first must apply the version pin, because
|
|
12
|
+
* `@monaco-editor/loader` is a process-wide singleton and `config()` is only honored before
|
|
13
|
+
* its `init()`. Routing every consumer through {@link loadMonacoReact} makes the pin travel
|
|
14
|
+
* with the import instead of depending on a boot-time side effect.
|
|
15
|
+
*
|
|
16
|
+
* A consumer that already holds the module (a static `import { Editor } from '@monaco-editor/react'`
|
|
17
|
+
* in a route chunk, where the deferred-loading rule above does not apply) calls
|
|
18
|
+
* {@link configureMonacoLoader} with its own `loader` instead, so both paths share this version.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Pin the Monaco runtime to 0.55.1 to match the locally-installed `monaco-editor` types. The
|
|
23
|
+
* default loader (@monaco-editor/loader@1.5.0) hardcodes 0.52.2, which lacks the top-level
|
|
24
|
+
* `monaco.json` / `monaco.css` namespaces those types reference — editors that set up JSON Schema
|
|
25
|
+
* diagnostics via `monaco.json.jsonDefaults` fail at runtime with "Cannot read properties of
|
|
26
|
+
* undefined (reading 'jsonDefaults')".
|
|
27
|
+
*/
|
|
28
|
+
const MONACO_VS_URL = 'https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs';
|
|
29
|
+
|
|
30
|
+
/** The slice of `@monaco-editor/loader` this module needs, kept structural to avoid an import. */
|
|
31
|
+
interface MonacoLoader {
|
|
32
|
+
config(params: { paths: { vs: string } }): unknown;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
let configured = false;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Point the Monaco loader at the pinned runtime. Idempotent: `config()` is a no-op once the loader
|
|
39
|
+
* has initialized, so repeat calls from several consumers must not fight over it.
|
|
40
|
+
*/
|
|
41
|
+
export function configureMonacoLoader(loader: MonacoLoader): void {
|
|
42
|
+
if (configured) return;
|
|
43
|
+
loader.config({ paths: { vs: MONACO_VS_URL } });
|
|
44
|
+
configured = true;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
let monacoReact: Promise<typeof import('@monaco-editor/react')> | undefined;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Import `@monaco-editor/react` on demand with the version pin applied before the module is handed
|
|
51
|
+
* out, so no caller can mount an `Editor` against the unpinned default. The promise is memoized:
|
|
52
|
+
* concurrent callers share one module instance and one `config()` call.
|
|
53
|
+
*
|
|
54
|
+
* A failed import or configuration is not memoized -- a transient chunk or CDN error would otherwise make every
|
|
55
|
+
* later attempt fail instantly for the rest of the session, with nothing left to retry. Note that
|
|
56
|
+
* this only restores retries for direct callers: `MonacoEditor` reaches this through React's
|
|
57
|
+
* `lazy()`, which keeps a rejection cache of its own that a remount does not clear.
|
|
58
|
+
*/
|
|
59
|
+
export function loadMonacoReact(): Promise<typeof import('@monaco-editor/react')> {
|
|
60
|
+
monacoReact ??= import('@monaco-editor/react')
|
|
61
|
+
.then((mod) => {
|
|
62
|
+
configureMonacoLoader(mod.loader);
|
|
63
|
+
return mod;
|
|
64
|
+
})
|
|
65
|
+
.catch((err: unknown) => {
|
|
66
|
+
monacoReact = undefined;
|
|
67
|
+
throw err;
|
|
68
|
+
});
|
|
69
|
+
return monacoReact;
|
|
70
|
+
}
|
|
@@ -15,7 +15,7 @@ export function PropertiesView({ className, properties }: PropertiesViewProps) {
|
|
|
15
15
|
<span>{property.name}</span>
|
|
16
16
|
{property.description && (
|
|
17
17
|
<VTooltip description={property.description} placement="top">
|
|
18
|
-
<Info className="size-3 ms-2 text-muted
|
|
18
|
+
<Info className="size-3 ms-2 text-muted" />
|
|
19
19
|
</VTooltip>
|
|
20
20
|
)}
|
|
21
21
|
</td>
|
|
@@ -101,7 +101,7 @@ export function Editable<T>({
|
|
|
101
101
|
readonly={readonly}
|
|
102
102
|
/>
|
|
103
103
|
)}
|
|
104
|
-
{validationError && <div className="text-
|
|
104
|
+
{validationError && <div className="text-destructive text-sm">{validationError}</div>}
|
|
105
105
|
</div>
|
|
106
106
|
);
|
|
107
107
|
}
|
|
@@ -214,7 +214,7 @@ function DataEdit<T>({ editor: Editor, value, onSave, onCancel, skipClickOutside
|
|
|
214
214
|
|
|
215
215
|
export function TextDataViewer({ value, placeholder }: DataViewerProps<string>) {
|
|
216
216
|
if (!value) {
|
|
217
|
-
return <span className="text-
|
|
217
|
+
return <span className="text-muted">{placeholder || 'Missing value'}</span>;
|
|
218
218
|
} else {
|
|
219
219
|
return <span>{value == null ? '' : value.toString()}</span>;
|
|
220
220
|
}
|
|
@@ -156,7 +156,7 @@ function EditDescriptionModalForm({ value, onSave }: EditDescriptionModalFormPro
|
|
|
156
156
|
<ModalBody className="h-max">
|
|
157
157
|
<textarea
|
|
158
158
|
ref={ref}
|
|
159
|
-
className="dark:bg-
|
|
159
|
+
className="dark:bg-muted w-full h-full dark:text-white"
|
|
160
160
|
value={currentValue}
|
|
161
161
|
onChange={(e) => setCurrentValue(e.target.value)}
|
|
162
162
|
/>
|
|
@@ -23,7 +23,7 @@ export function SchemaEditor({ schema, readonly = false }: SchemaTreeProps) {
|
|
|
23
23
|
const { t } = useUITranslation();
|
|
24
24
|
return (
|
|
25
25
|
<div className="space-y-1">
|
|
26
|
-
<div className="flex items-center gap-2 px-2 py-1 text-xs font-medium text-muted
|
|
26
|
+
<div className="flex items-center gap-2 px-2 py-1 text-xs font-medium text-muted border-b border-border">
|
|
27
27
|
<div className="flex-1 min-w-0">{t('widgets.schema.propertyColumn')}</div>
|
|
28
28
|
{!readonly && (
|
|
29
29
|
<div className="shrink-0 w-28 text-end pe-1" title={t('widgets.schema.extractFromDocumentHint')}>
|
|
@@ -89,7 +89,7 @@ function ParentItem({ property, readonly }: ParentItemProps) {
|
|
|
89
89
|
</Button>
|
|
90
90
|
</div>
|
|
91
91
|
{isOpen && (
|
|
92
|
-
<ul className="ms-4 border-s border-
|
|
92
|
+
<ul className="ms-4 border-s border-border border-dashed">
|
|
93
93
|
{(property.children || []).map((prop) => renderProperty(prop, readonly))}
|
|
94
94
|
{!readonly ? <AddPropertyButton parent={property} /> : null}
|
|
95
95
|
</ul>
|
|
@@ -257,7 +257,7 @@ export function DropZone({ onDrop, message, buttonLabel, allowFolders = true, cl
|
|
|
257
257
|
// biome-ignore lint/a11y/noStaticElementInteractions: drag/drop target; file selection is exposed via the buttons inside.
|
|
258
258
|
<div
|
|
259
259
|
className={`flex flex-col items-center justify-center py-12 border-2 rounded-lg transition-colors ${
|
|
260
|
-
isDragging ? 'border-
|
|
260
|
+
isDragging ? 'border-primary bg-primary/10' : 'border-dashed border-border'
|
|
261
261
|
} ${className}`}
|
|
262
262
|
onDragOver={handleDragOver}
|
|
263
263
|
onDragLeave={handleDragLeave}
|
|
@@ -23,14 +23,14 @@ export interface UploadResultCategoryProps {
|
|
|
23
23
|
* <UploadResultCategory
|
|
24
24
|
* title="Successfully Uploaded"
|
|
25
25
|
* count={3}
|
|
26
|
-
* icon={<CheckCircleIcon className="h-4 w-4 text-
|
|
26
|
+
* icon={<CheckCircleIcon className="h-4 w-4 text-success" />}
|
|
27
27
|
* items={["document1.pdf", "document2.pdf", "document3.pdf"]}
|
|
28
28
|
* />
|
|
29
29
|
*/
|
|
30
30
|
export function UploadResultCategory({
|
|
31
31
|
title,
|
|
32
32
|
count,
|
|
33
|
-
icon = <CheckCircleIcon className="h-4 w-4 text-
|
|
33
|
+
icon = <CheckCircleIcon className="h-4 w-4 text-success" />,
|
|
34
34
|
items,
|
|
35
35
|
}: UploadResultCategoryProps) {
|
|
36
36
|
const { t } = useUITranslation();
|
|
@@ -38,20 +38,20 @@ export function UploadResultCategory({
|
|
|
38
38
|
const panelId = useId();
|
|
39
39
|
|
|
40
40
|
return (
|
|
41
|
-
<div className="border border-
|
|
41
|
+
<div className="border border-border rounded-md overflow-hidden">
|
|
42
42
|
{/* The header IS the toggle: a real <button> with aria-expanded/aria-controls so
|
|
43
43
|
keyboard users can operate it (Enter / Space) and screen readers announce state. */}
|
|
44
44
|
<button
|
|
45
45
|
type="button"
|
|
46
46
|
aria-expanded={isExpanded}
|
|
47
47
|
aria-controls={panelId}
|
|
48
|
-
className="w-full flex items-center justify-between p-3 bg-
|
|
48
|
+
className="w-full flex items-center justify-between p-3 bg-muted/10 cursor-pointer text-start bg-transparent border-0 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
49
49
|
onClick={() => setIsExpanded(!isExpanded)}
|
|
50
50
|
>
|
|
51
51
|
<span className="flex items-center">
|
|
52
52
|
<span className="me-2">{icon}</span>
|
|
53
53
|
<span className="font-medium">{title}</span>
|
|
54
|
-
<span className="ms-2 px-2 py-0.5 bg-
|
|
54
|
+
<span className="ms-2 px-2 py-0.5 bg-muted/20 rounded-full text-xs">{count}</span>
|
|
55
55
|
</span>
|
|
56
56
|
<span className="text-muted" aria-hidden="true">
|
|
57
57
|
<svg
|
|
@@ -67,11 +67,11 @@ export function UploadResultCategory({
|
|
|
67
67
|
</button>
|
|
68
68
|
|
|
69
69
|
{isExpanded && (
|
|
70
|
-
<div id={panelId} className="p-3 border-t border-
|
|
70
|
+
<div id={panelId} className="p-3 border-t border-border max-h-48 overflow-y-auto">
|
|
71
71
|
{items.length > 0 ? (
|
|
72
72
|
<ul className="space-y-1">
|
|
73
73
|
{items.map((item) => (
|
|
74
|
-
<li key={item} className="text-sm py-1 px-2 rounded hover:bg-
|
|
74
|
+
<li key={item} className="text-sm py-1 px-2 rounded hover:bg-muted/10">
|
|
75
75
|
{item}
|
|
76
76
|
</li>
|
|
77
77
|
))}
|
|
@@ -77,7 +77,7 @@ export function UploadSummary({ files, className = '', location, collection }: U
|
|
|
77
77
|
<UploadResultCategory
|
|
78
78
|
title={t('upload.successfullyUploaded')}
|
|
79
79
|
count={successCount}
|
|
80
|
-
icon={<CheckCircleIcon className="h-4 w-4 text-
|
|
80
|
+
icon={<CheckCircleIcon className="h-4 w-4 text-success" />}
|
|
81
81
|
items={successFiles.map((f) => f.name)}
|
|
82
82
|
/>
|
|
83
83
|
)}
|
|
@@ -87,7 +87,7 @@ export function UploadSummary({ files, className = '', location, collection }: U
|
|
|
87
87
|
<UploadResultCategory
|
|
88
88
|
title={t('upload.successfullyUpdated')}
|
|
89
89
|
count={updatedCount}
|
|
90
|
-
icon={<CheckCircleIcon className="h-4 w-4 text-
|
|
90
|
+
icon={<CheckCircleIcon className="h-4 w-4 text-info" />}
|
|
91
91
|
items={updatedFiles.map((f) => f.name)}
|
|
92
92
|
/>
|
|
93
93
|
)}
|
|
@@ -97,7 +97,7 @@ export function UploadSummary({ files, className = '', location, collection }: U
|
|
|
97
97
|
<UploadResultCategory
|
|
98
98
|
title={t('upload.skippedAlreadyExisted')}
|
|
99
99
|
count={skippedCount}
|
|
100
|
-
icon={<AlertCircleIcon className="h-4 w-4 text-
|
|
100
|
+
icon={<AlertCircleIcon className="h-4 w-4 text-attention" />}
|
|
101
101
|
items={skippedFiles.map((f) => f.name)}
|
|
102
102
|
/>
|
|
103
103
|
)}
|
|
@@ -107,7 +107,7 @@ export function UploadSummary({ files, className = '', location, collection }: U
|
|
|
107
107
|
<UploadResultCategory
|
|
108
108
|
title={t('upload.failedToUpload')}
|
|
109
109
|
count={failedCount}
|
|
110
|
-
icon={<XCircleIcon className="h-4 w-4 text-
|
|
110
|
+
icon={<XCircleIcon className="h-4 w-4 text-destructive" />}
|
|
111
111
|
items={failedFiles.map((f) => f.name)}
|
|
112
112
|
/>
|
|
113
113
|
)}
|
|
@@ -37,7 +37,7 @@ export function XMLViewer(props: XMLViewerProps): React.ReactNode {
|
|
|
37
37
|
return { ...baseTheme, ...customTheme };
|
|
38
38
|
}, [isDarkMode, customTheme]);
|
|
39
39
|
|
|
40
|
-
const
|
|
40
|
+
const parsed = useXMLViewer(xml);
|
|
41
41
|
const context = useMemo(
|
|
42
42
|
() => ({
|
|
43
43
|
theme,
|
|
@@ -48,7 +48,11 @@ export function XMLViewer(props: XMLViewerProps): React.ReactNode {
|
|
|
48
48
|
[theme, collapsible, indentSize, initalCollapsedDepth, initialCollapsedDepth],
|
|
49
49
|
);
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
// The parser is fetched on first use, so the result is not available on the first render.
|
|
52
|
+
if (!parsed) {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
if (!parsed.valid) {
|
|
52
56
|
return invalidXml ? invalidXml : <InvalidXml />;
|
|
53
57
|
}
|
|
54
58
|
|
|
@@ -58,7 +62,7 @@ export function XMLViewer(props: XMLViewerProps): React.ReactNode {
|
|
|
58
62
|
className="rxv-container"
|
|
59
63
|
style={{ whiteSpace: 'pre-wrap', fontFamily: theme.fontFamily, overflowWrap: 'break-word' }}
|
|
60
64
|
>
|
|
61
|
-
<Elements elements={json} />
|
|
65
|
+
<Elements elements={parsed.json} />
|
|
62
66
|
</div>
|
|
63
67
|
</XMLViewerContext.Provider>
|
|
64
68
|
);
|