@vertesia/ui 1.5.0-dev.20260717.131047Z → 1.5.0-dev.20260725.083715Z
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/SidePanel.js +1 -1
- package/lib/core/components/SidePanel.js.map +1 -1
- package/lib/core/components/shadcn/button.d.ts +10 -3
- package/lib/core/components/shadcn/button.d.ts.map +1 -1
- package/lib/core/components/shadcn/button.js +41 -9
- package/lib/core/components/shadcn/button.js.map +1 -1
- package/lib/core/components/shadcn/filters/filterBar.d.ts.map +1 -1
- package/lib/core/components/shadcn/filters/filterBar.js +1 -1
- package/lib/core/components/shadcn/filters/filterBar.js.map +1 -1
- package/lib/core/components/shadcn/modal/dialog.d.ts +1 -1
- package/lib/core/components/shadcn/modal/dialog.d.ts.map +1 -1
- package/lib/core/components/shadcn/modal/dialog.js +3 -1
- package/lib/core/components/shadcn/modal/dialog.js.map +1 -1
- package/lib/core/components/shadcn/tabs.d.ts +12 -1
- package/lib/core/components/shadcn/tabs.d.ts.map +1 -1
- package/lib/core/components/shadcn/tabs.js +12 -4
- package/lib/core/components/shadcn/tabs.js.map +1 -1
- package/lib/core/components/shadcn/theme/ThemeSwitcher.js +1 -1
- package/lib/core/components/shadcn/theme/ThemeSwitcher.js.map +1 -1
- package/lib/features/agent/chat/AgentChatPlaybackControls.d.ts.map +1 -1
- package/lib/features/agent/chat/AgentChatPlaybackControls.js +2 -2
- package/lib/features/agent/chat/AgentChatPlaybackControls.js.map +1 -1
- package/lib/features/agent/chat/AgentRequestInputOverlay.d.ts.map +1 -1
- package/lib/features/agent/chat/AgentRequestInputOverlay.js +2 -2
- package/lib/features/agent/chat/AgentRequestInputOverlay.js.map +1 -1
- package/lib/features/agent/chat/AgentRightPanel.d.ts +5 -1
- package/lib/features/agent/chat/AgentRightPanel.d.ts.map +1 -1
- package/lib/features/agent/chat/AgentRightPanel.js +2 -2
- package/lib/features/agent/chat/AgentRightPanel.js.map +1 -1
- package/lib/features/agent/chat/ArtifactsTab.d.ts +5 -1
- package/lib/features/agent/chat/ArtifactsTab.d.ts.map +1 -1
- package/lib/features/agent/chat/ArtifactsTab.js +53 -13
- package/lib/features/agent/chat/ArtifactsTab.js.map +1 -1
- package/lib/features/agent/chat/DocumentEditingActionCard.d.ts +6 -0
- package/lib/features/agent/chat/DocumentEditingActionCard.d.ts.map +1 -0
- package/lib/features/agent/chat/DocumentEditingActionCard.js +129 -0
- package/lib/features/agent/chat/DocumentEditingActionCard.js.map +1 -0
- package/lib/features/agent/chat/ImageLightbox.d.ts.map +1 -1
- package/lib/features/agent/chat/ImageLightbox.js +1 -1
- package/lib/features/agent/chat/ImageLightbox.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentConversation.d.ts +19 -1
- package/lib/features/agent/chat/ModernAgentConversation.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentConversation.js +125 -27
- package/lib/features/agent/chat/ModernAgentConversation.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AgentMarkdownAnchor.d.ts +45 -0
- package/lib/features/agent/chat/ModernAgentOutput/AgentMarkdownAnchor.d.ts.map +1 -0
- package/lib/features/agent/chat/ModernAgentOutput/AgentMarkdownAnchor.js +40 -0
- package/lib/features/agent/chat/ModernAgentOutput/AgentMarkdownAnchor.js.map +1 -0
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts +3 -1
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +96 -51
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AttachmentPreview.d.ts +2 -1
- package/lib/features/agent/chat/ModernAgentOutput/AttachmentPreview.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AttachmentPreview.js +9 -5
- package/lib/features/agent/chat/ModernAgentOutput/AttachmentPreview.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/CollapsibleAgentMarkdown.d.ts +25 -0
- package/lib/features/agent/chat/ModernAgentOutput/CollapsibleAgentMarkdown.d.ts.map +1 -0
- package/lib/features/agent/chat/ModernAgentOutput/CollapsibleAgentMarkdown.js +33 -0
- package/lib/features/agent/chat/ModernAgentOutput/CollapsibleAgentMarkdown.js.map +1 -0
- package/lib/features/agent/chat/ModernAgentOutput/Header.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/Header.js +4 -2
- package/lib/features/agent/chat/ModernAgentOutput/Header.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageInput.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageInput.js +2 -2
- package/lib/features/agent/chat/ModernAgentOutput/MessageInput.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.d.ts +3 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js +23 -24
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/ResourceChangeSummary.d.ts +14 -0
- package/lib/features/agent/chat/ModernAgentOutput/ResourceChangeSummary.d.ts.map +1 -0
- package/lib/features/agent/chat/ModernAgentOutput/ResourceChangeSummary.js +21 -0
- package/lib/features/agent/chat/ModernAgentOutput/ResourceChangeSummary.js.map +1 -0
- package/lib/features/agent/chat/ModernAgentOutput/ResourceChip.d.ts +30 -0
- package/lib/features/agent/chat/ModernAgentOutput/ResourceChip.d.ts.map +1 -0
- package/lib/features/agent/chat/ModernAgentOutput/ResourceChip.js +53 -0
- package/lib/features/agent/chat/ModernAgentOutput/ResourceChip.js.map +1 -0
- package/lib/features/agent/chat/ModernAgentOutput/ToolCallGroup.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/ToolCallGroup.js +21 -2
- package/lib/features/agent/chat/ModernAgentOutput/ToolCallGroup.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.d.ts +6 -0
- package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.js +15 -1
- package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/resourceLinks.d.ts +6 -0
- package/lib/features/agent/chat/ModernAgentOutput/resourceLinks.d.ts.map +1 -0
- package/lib/features/agent/chat/ModernAgentOutput/resourceLinks.js +29 -0
- package/lib/features/agent/chat/ModernAgentOutput/resourceLinks.js.map +1 -0
- package/lib/features/agent/chat/ModernAgentOutput/resourceSummary.d.ts +33 -0
- package/lib/features/agent/chat/ModernAgentOutput/resourceSummary.d.ts.map +1 -0
- package/lib/features/agent/chat/ModernAgentOutput/resourceSummary.js +129 -0
- package/lib/features/agent/chat/ModernAgentOutput/resourceSummary.js.map +1 -0
- package/lib/features/agent/chat/ModernAgentOutput/utils.d.ts +7 -0
- package/lib/features/agent/chat/ModernAgentOutput/utils.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/utils.js +11 -1
- package/lib/features/agent/chat/ModernAgentOutput/utils.js.map +1 -1
- package/lib/features/agent/chat/hooks/useAgentStream.d.ts +1 -1
- package/lib/features/agent/chat/hooks/useAgentStream.d.ts.map +1 -1
- package/lib/features/agent/chat/hooks/useAgentStream.js +24 -9
- package/lib/features/agent/chat/hooks/useAgentStream.js.map +1 -1
- package/lib/features/agent/chat/index.d.ts +2 -1
- package/lib/features/agent/chat/index.d.ts.map +1 -1
- package/lib/features/agent/chat/index.js +3 -0
- package/lib/features/agent/chat/index.js.map +1 -1
- package/lib/features/environment/SelectEnvironment.d.ts +28 -0
- package/lib/features/environment/SelectEnvironment.d.ts.map +1 -0
- package/lib/features/environment/SelectEnvironment.js +97 -0
- package/lib/features/environment/SelectEnvironment.js.map +1 -0
- package/lib/features/environment/index.d.ts +2 -0
- package/lib/features/environment/index.d.ts.map +1 -0
- package/lib/features/environment/index.js +2 -0
- package/lib/features/environment/index.js.map +1 -0
- package/lib/features/index.d.ts +2 -0
- package/lib/features/index.d.ts.map +1 -1
- package/lib/features/index.js +2 -0
- package/lib/features/index.js.map +1 -1
- package/lib/features/magic-pdf/AnnotatedImageSlider.js +12 -12
- package/lib/features/magic-pdf/AnnotatedImageSlider.js.map +1 -1
- package/lib/features/magic-pdf/DownloadPopover.d.ts.map +1 -1
- package/lib/features/magic-pdf/DownloadPopover.js +3 -17
- package/lib/features/magic-pdf/DownloadPopover.js.map +1 -1
- package/lib/features/magic-pdf/ExtractedContentView.js +2 -6
- package/lib/features/magic-pdf/ExtractedContentView.js.map +1 -1
- package/lib/features/magic-pdf/GroundedExtractionAssistantPanel.d.ts +25 -0
- package/lib/features/magic-pdf/GroundedExtractionAssistantPanel.d.ts.map +1 -0
- package/lib/features/magic-pdf/GroundedExtractionAssistantPanel.js +42 -0
- package/lib/features/magic-pdf/GroundedExtractionAssistantPanel.js.map +1 -0
- package/lib/features/magic-pdf/GroundedExtractionView.d.ts +27 -0
- package/lib/features/magic-pdf/GroundedExtractionView.d.ts.map +1 -0
- package/lib/features/magic-pdf/GroundedExtractionView.js +377 -0
- package/lib/features/magic-pdf/GroundedExtractionView.js.map +1 -0
- package/lib/features/magic-pdf/MagicPdfProvider.d.ts +0 -2
- package/lib/features/magic-pdf/MagicPdfProvider.d.ts.map +1 -1
- package/lib/features/magic-pdf/MagicPdfProvider.js +15 -42
- package/lib/features/magic-pdf/MagicPdfProvider.js.map +1 -1
- package/lib/features/magic-pdf/MagicPdfView.d.ts.map +1 -1
- package/lib/features/magic-pdf/MagicPdfView.js +2 -19
- package/lib/features/magic-pdf/MagicPdfView.js.map +1 -1
- package/lib/features/magic-pdf/index.d.ts +1 -0
- package/lib/features/magic-pdf/index.d.ts.map +1 -1
- package/lib/features/magic-pdf/index.js +1 -0
- package/lib/features/magic-pdf/index.js.map +1 -1
- package/lib/features/magic-pdf/types.d.ts +1 -1
- package/lib/features/magic-pdf/types.d.ts.map +1 -1
- package/lib/features/oauth/McpConnectionsButton.d.ts.map +1 -1
- package/lib/features/oauth/McpConnectionsButton.js +2 -2
- 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 +1 -1
- package/lib/features/oauth/McpConnectionsDialog.js.map +1 -1
- package/lib/features/oauth/RemoteMcpConnectionButton.d.ts.map +1 -1
- package/lib/features/oauth/RemoteMcpConnectionButton.js +1 -1
- package/lib/features/oauth/RemoteMcpConnectionButton.js.map +1 -1
- package/lib/features/pdf-viewer/PdfPageSlider.js +2 -2
- package/lib/features/pdf-viewer/PdfPageSlider.js.map +1 -1
- package/lib/features/pdf-viewer/SimplePdfViewer.d.ts.map +1 -1
- package/lib/features/pdf-viewer/SimplePdfViewer.js +3 -3
- package/lib/features/pdf-viewer/SimplePdfViewer.js.map +1 -1
- package/lib/features/permissions/UserPermissionsProvider.js +1 -1
- package/lib/features/permissions/UserPermissionsProvider.js.map +1 -1
- package/lib/features/store/objects/DocumentQuickFilter.d.ts.map +1 -1
- package/lib/features/store/objects/DocumentQuickFilter.js +5 -5
- package/lib/features/store/objects/DocumentQuickFilter.js.map +1 -1
- package/lib/features/store/objects/DocumentSearchResults.d.ts.map +1 -1
- package/lib/features/store/objects/DocumentSearchResults.js +4 -4
- package/lib/features/store/objects/DocumentSearchResults.js.map +1 -1
- package/lib/features/store/objects/components/ContentDispositionButton.d.ts.map +1 -1
- package/lib/features/store/objects/components/ContentDispositionButton.js +1 -1
- package/lib/features/store/objects/components/ContentDispositionButton.js.map +1 -1
- package/lib/features/store/objects/components/ContentOverview.d.ts +2 -1
- package/lib/features/store/objects/components/ContentOverview.d.ts.map +1 -1
- package/lib/features/store/objects/components/ContentOverview.js +159 -31
- package/lib/features/store/objects/components/ContentOverview.js.map +1 -1
- package/lib/features/store/objects/components/DocumentEditingConfigurationSelector.d.ts +16 -0
- package/lib/features/store/objects/components/DocumentEditingConfigurationSelector.d.ts.map +1 -0
- package/lib/features/store/objects/components/DocumentEditingConfigurationSelector.js +116 -0
- package/lib/features/store/objects/components/DocumentEditingConfigurationSelector.js.map +1 -0
- package/lib/features/store/objects/components/DocumentEditingLockStatus.d.ts +7 -0
- package/lib/features/store/objects/components/DocumentEditingLockStatus.d.ts.map +1 -0
- package/lib/features/store/objects/components/DocumentEditingLockStatus.js +13 -0
- package/lib/features/store/objects/components/DocumentEditingLockStatus.js.map +1 -0
- package/lib/features/store/objects/components/DocumentEditingPanel.d.ts +48 -0
- package/lib/features/store/objects/components/DocumentEditingPanel.d.ts.map +1 -0
- package/lib/features/store/objects/components/DocumentEditingPanel.js +720 -0
- package/lib/features/store/objects/components/DocumentEditingPanel.js.map +1 -0
- package/lib/features/store/objects/components/DocumentIcon.js +1 -1
- package/lib/features/store/objects/components/TextEditorPanel.d.ts.map +1 -1
- package/lib/features/store/objects/components/TextEditorPanel.js +22 -9
- package/lib/features/store/objects/components/TextEditorPanel.js.map +1 -1
- package/lib/features/store/objects/components/VectorSearchWidget.js +1 -1
- package/lib/features/store/objects/components/VectorSearchWidget.js.map +1 -1
- package/lib/features/store/objects/components/documentArtifactRefs.d.ts +26 -0
- package/lib/features/store/objects/components/documentArtifactRefs.d.ts.map +1 -0
- package/lib/features/store/objects/components/documentArtifactRefs.js +52 -0
- package/lib/features/store/objects/components/documentArtifactRefs.js.map +1 -0
- package/lib/features/store/objects/components/documentEditingAgentConfig.d.ts +4 -0
- package/lib/features/store/objects/components/documentEditingAgentConfig.d.ts.map +1 -0
- package/lib/features/store/objects/components/documentEditingAgentConfig.js +40 -0
- package/lib/features/store/objects/components/documentEditingAgentConfig.js.map +1 -0
- package/lib/features/store/objects/components/documentEditingPrompts.d.ts +3 -0
- package/lib/features/store/objects/components/documentEditingPrompts.d.ts.map +1 -0
- package/lib/features/store/objects/components/documentEditingPrompts.js +13 -0
- package/lib/features/store/objects/components/documentEditingPrompts.js.map +1 -0
- package/lib/features/store/objects/components/documentEditingRun.d.ts +27 -0
- package/lib/features/store/objects/components/documentEditingRun.d.ts.map +1 -0
- package/lib/features/store/objects/components/documentEditingRun.js +126 -0
- package/lib/features/store/objects/components/documentEditingRun.js.map +1 -0
- package/lib/features/store/objects/components/documentEditingTarget.d.ts +20 -0
- package/lib/features/store/objects/components/documentEditingTarget.d.ts.map +1 -0
- package/lib/features/store/objects/components/documentEditingTarget.js +40 -0
- package/lib/features/store/objects/components/documentEditingTarget.js.map +1 -0
- package/lib/features/store/objects/components/index.d.ts +1 -0
- package/lib/features/store/objects/components/index.d.ts.map +1 -1
- package/lib/features/store/objects/components/index.js +1 -0
- package/lib/features/store/objects/components/index.js.map +1 -1
- package/lib/features/store/objects/components/useContentPanelHooks.d.ts +6 -3
- package/lib/features/store/objects/components/useContentPanelHooks.d.ts.map +1 -1
- package/lib/features/store/objects/components/useContentPanelHooks.js +57 -37
- package/lib/features/store/objects/components/useContentPanelHooks.js.map +1 -1
- package/lib/features/store/objects/components/useDownloadFile.d.ts +2 -1
- package/lib/features/store/objects/components/useDownloadFile.d.ts.map +1 -1
- package/lib/features/store/objects/components/useDownloadFile.js +3 -0
- package/lib/features/store/objects/components/useDownloadFile.js.map +1 -1
- package/lib/features/store/objects/layout/renderers.d.ts.map +1 -1
- package/lib/features/store/objects/layout/renderers.js +2 -2
- package/lib/features/store/objects/layout/renderers.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/objects/selection/actions/StartWorkflowButton.js +1 -1
- package/lib/features/store/objects/selection/actions/StartWorkflowButton.js.map +1 -1
- package/lib/features/store/types/ContentObjectTypesTable.d.ts.map +1 -1
- package/lib/features/store/types/ContentObjectTypesTable.js +4 -4
- package/lib/features/store/types/ContentObjectTypesTable.js.map +1 -1
- package/lib/features/store/types/IntakePolicyEditor.d.ts +15 -0
- package/lib/features/store/types/IntakePolicyEditor.d.ts.map +1 -0
- package/lib/features/store/types/IntakePolicyEditor.js +455 -0
- package/lib/features/store/types/IntakePolicyEditor.js.map +1 -0
- package/lib/features/store/types/IntakePolicyForm.d.ts +11 -0
- package/lib/features/store/types/IntakePolicyForm.d.ts.map +1 -0
- package/lib/features/store/types/IntakePolicyForm.js +91 -0
- package/lib/features/store/types/IntakePolicyForm.js.map +1 -0
- package/lib/features/store/types/SelectContentTypeModal.js +1 -1
- package/lib/features/store/types/SelectContentTypeModal.js.map +1 -1
- package/lib/features/store/types/index.d.ts +2 -0
- package/lib/features/store/types/index.d.ts.map +1 -1
- package/lib/features/store/types/index.js +2 -0
- package/lib/features/store/types/index.js.map +1 -1
- package/lib/features/store/types/intake-policy-editor.logic.d.ts +7 -0
- package/lib/features/store/types/intake-policy-editor.logic.d.ts.map +1 -0
- package/lib/features/store/types/intake-policy-editor.logic.js +60 -0
- package/lib/features/store/types/intake-policy-editor.logic.js.map +1 -0
- package/lib/features/store/types/typeCatalogCache.d.ts +5 -0
- package/lib/features/store/types/typeCatalogCache.d.ts.map +1 -0
- package/lib/features/store/types/typeCatalogCache.js +40 -0
- package/lib/features/store/types/typeCatalogCache.js.map +1 -0
- package/lib/features/user/UserInfo.js +7 -3
- package/lib/features/user/UserInfo.js.map +1 -1
- package/lib/features/views/ViewExperience.d.ts +20 -0
- package/lib/features/views/ViewExperience.d.ts.map +1 -0
- package/lib/features/views/ViewExperience.js +188 -0
- package/lib/features/views/ViewExperience.js.map +1 -0
- package/lib/features/views/ViewNavigation.d.ts +3 -0
- package/lib/features/views/ViewNavigation.d.ts.map +1 -0
- package/lib/features/views/ViewNavigation.js +36 -0
- package/lib/features/views/ViewNavigation.js.map +1 -0
- package/lib/features/views/ViewResults.d.ts +9 -0
- package/lib/features/views/ViewResults.d.ts.map +1 -0
- package/lib/features/views/ViewResults.js +229 -0
- package/lib/features/views/ViewResults.js.map +1 -0
- package/lib/features/views/ViewSearch.d.ts +3 -0
- package/lib/features/views/ViewSearch.d.ts.map +1 -0
- package/lib/features/views/ViewSearch.js +74 -0
- package/lib/features/views/ViewSearch.js.map +1 -0
- package/lib/features/views/index.d.ts +7 -0
- package/lib/features/views/index.d.ts.map +1 -0
- package/lib/features/views/index.js +7 -0
- package/lib/features/views/index.js.map +1 -0
- package/lib/features/views/types.d.ts +39 -0
- package/lib/features/views/types.d.ts.map +1 -0
- package/lib/features/views/types.js +2 -0
- package/lib/features/views/types.js.map +1 -0
- package/lib/features/views/viewState.d.ts +14 -0
- package/lib/features/views/viewState.d.ts.map +1 -0
- package/lib/features/views/viewState.js +117 -0
- package/lib/features/views/viewState.js.map +1 -0
- package/lib/i18n/locales/ar.json +134 -1
- package/lib/i18n/locales/de.json +130 -1
- package/lib/i18n/locales/en.json +363 -33
- package/lib/i18n/locales/es.json +131 -1
- package/lib/i18n/locales/fr.json +131 -1
- package/lib/i18n/locales/it.json +131 -1
- package/lib/i18n/locales/ja.json +129 -1
- package/lib/i18n/locales/ko.json +129 -1
- package/lib/i18n/locales/pt.json +131 -1
- package/lib/i18n/locales/ru.json +132 -1
- package/lib/i18n/locales/tr.json +130 -1
- package/lib/i18n/locales/zh-TW.json +129 -1
- package/lib/i18n/locales/zh.json +129 -1
- package/lib/rich-text/EditorToolbar.d.ts +37 -0
- package/lib/rich-text/EditorToolbar.d.ts.map +1 -0
- package/lib/rich-text/EditorToolbar.js +215 -0
- package/lib/rich-text/EditorToolbar.js.map +1 -0
- package/lib/rich-text/VertesiaRichTextEditor.d.ts +26 -0
- package/lib/rich-text/VertesiaRichTextEditor.d.ts.map +1 -0
- package/lib/rich-text/VertesiaRichTextEditor.js +67 -0
- package/lib/rich-text/VertesiaRichTextEditor.js.map +1 -0
- package/lib/rich-text/index.d.ts +2 -0
- package/lib/rich-text/index.d.ts.map +1 -0
- package/lib/rich-text/index.js +2 -0
- package/lib/rich-text/index.js.map +1 -0
- package/lib/router/HistoryNavigator.d.ts.map +1 -1
- package/lib/router/HistoryNavigator.js +23 -13
- package/lib/router/HistoryNavigator.js.map +1 -1
- package/lib/router/Nav.d.ts.map +1 -1
- package/lib/router/Nav.js +15 -6
- package/lib/router/Nav.js.map +1 -1
- package/lib/session/UserSession.d.ts.map +1 -1
- package/lib/session/UserSession.js +5 -3
- package/lib/session/UserSession.js.map +1 -1
- package/lib/vertesia-ui-core.js +4 -4
- package/lib/vertesia-ui-core.js.map +1 -1
- package/lib/vertesia-ui-features.js +40 -28
- package/lib/vertesia-ui-features.js.map +1 -1
- package/lib/vertesia-ui-i18n.js +15 -15
- package/lib/vertesia-ui-i18n.js.map +1 -1
- package/lib/vertesia-ui-rich-text.js +5 -0
- package/lib/vertesia-ui-rich-text.js.map +1 -0
- 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 +25 -7
- package/lib/vertesia-ui-widgets.js.map +1 -1
- package/lib/widgets/form/Form.js +1 -1
- package/lib/widgets/form/Form.js.map +1 -1
- package/lib/widgets/json-view/JSONSwitcher.js +1 -1
- package/lib/widgets/json-view/JSONSwitcher.js.map +1 -1
- package/lib/widgets/json-view/JSONView.js +6 -6
- package/lib/widgets/json-view/JSONView.js.map +1 -1
- package/lib/widgets/markdown/AgentResourceResolver.d.ts +31 -0
- package/lib/widgets/markdown/AgentResourceResolver.d.ts.map +1 -0
- package/lib/widgets/markdown/AgentResourceResolver.js +39 -0
- package/lib/widgets/markdown/AgentResourceResolver.js.map +1 -0
- package/lib/widgets/markdown/ArtifactEditingSurface.d.ts +63 -0
- package/lib/widgets/markdown/ArtifactEditingSurface.d.ts.map +1 -0
- package/lib/widgets/markdown/ArtifactEditingSurface.js +582 -0
- package/lib/widgets/markdown/ArtifactEditingSurface.js.map +1 -0
- package/lib/widgets/markdown/CollaborativeMarkdownRenderer.d.ts +69 -0
- package/lib/widgets/markdown/CollaborativeMarkdownRenderer.d.ts.map +1 -0
- package/lib/widgets/markdown/CollaborativeMarkdownRenderer.js +374 -0
- package/lib/widgets/markdown/CollaborativeMarkdownRenderer.js.map +1 -0
- package/lib/widgets/markdown/MarkdownLink.d.ts +3 -1
- package/lib/widgets/markdown/MarkdownLink.d.ts.map +1 -1
- package/lib/widgets/markdown/MarkdownLink.js +41 -14
- package/lib/widgets/markdown/MarkdownLink.js.map +1 -1
- package/lib/widgets/markdown/MarkdownRenderer.d.ts +8 -1
- package/lib/widgets/markdown/MarkdownRenderer.d.ts.map +1 -1
- package/lib/widgets/markdown/MarkdownRenderer.js +20 -4
- package/lib/widgets/markdown/MarkdownRenderer.js.map +1 -1
- package/lib/widgets/markdown/index.d.ts +5 -1
- package/lib/widgets/markdown/index.d.ts.map +1 -1
- package/lib/widgets/markdown/index.js +5 -1
- package/lib/widgets/markdown/index.js.map +1 -1
- package/lib/widgets/markdown/normalizeCustomSchemeLinks.d.ts.map +1 -1
- package/lib/widgets/markdown/normalizeCustomSchemeLinks.js +14 -2
- package/lib/widgets/markdown/normalizeCustomSchemeLinks.js.map +1 -1
- package/lib/widgets/markdown/textDiff.d.ts +52 -0
- package/lib/widgets/markdown/textDiff.d.ts.map +1 -0
- package/lib/widgets/markdown/textDiff.js +362 -0
- package/lib/widgets/markdown/textDiff.js.map +1 -0
- package/lib/widgets/markdown/useArtifactContent.d.ts +5 -3
- package/lib/widgets/markdown/useArtifactContent.d.ts.map +1 -1
- package/lib/widgets/markdown/useArtifactContent.js +6 -3
- package/lib/widgets/markdown/useArtifactContent.js.map +1 -1
- package/lib/widgets/markdown/useResolvedUrl.d.ts +1 -5
- package/lib/widgets/markdown/useResolvedUrl.d.ts.map +1 -1
- package/lib/widgets/markdown/useResolvedUrl.js +19 -31
- package/lib/widgets/markdown/useResolvedUrl.js.map +1 -1
- package/lib/widgets/monacoEditor/MonacoEditor.d.ts.map +1 -1
- package/lib/widgets/monacoEditor/MonacoEditor.js +29 -0
- package/lib/widgets/monacoEditor/MonacoEditor.js.map +1 -1
- package/lib/widgets/schema-editor/ManagedSchema.d.ts +8 -0
- package/lib/widgets/schema-editor/ManagedSchema.d.ts.map +1 -1
- package/lib/widgets/schema-editor/ManagedSchema.js +16 -0
- package/lib/widgets/schema-editor/ManagedSchema.js.map +1 -1
- package/lib/widgets/schema-editor/editor/EditableSchemaProperty.d.ts +2 -0
- package/lib/widgets/schema-editor/editor/EditableSchemaProperty.d.ts.map +1 -1
- package/lib/widgets/schema-editor/editor/EditableSchemaProperty.js +1 -0
- package/lib/widgets/schema-editor/editor/EditableSchemaProperty.js.map +1 -1
- package/lib/widgets/schema-editor/editor/PropertyViewer.d.ts.map +1 -1
- package/lib/widgets/schema-editor/editor/PropertyViewer.js +4 -1
- package/lib/widgets/schema-editor/editor/PropertyViewer.js.map +1 -1
- package/lib/widgets/schema-editor/editor/SchemaEditor.d.ts.map +1 -1
- package/lib/widgets/schema-editor/editor/SchemaEditor.js +22 -11
- package/lib/widgets/schema-editor/editor/SchemaEditor.js.map +1 -1
- package/lib/widgets/xml-viewer/hooks/useXMLViewer.d.ts +9 -0
- package/lib/widgets/xml-viewer/hooks/useXMLViewer.d.ts.map +1 -1
- package/lib/widgets/xml-viewer/hooks/useXMLViewer.js +20 -17
- package/lib/widgets/xml-viewer/hooks/useXMLViewer.js.map +1 -1
- package/package.json +37 -33
- package/src/__tests__/a11y.test.tsx +77 -1
- package/src/__tests__/axe-helper.ts +17 -7
- package/src/__tests__/setup.ts +25 -0
- package/src/core/components/SidePanel.tsx +1 -1
- package/src/core/components/shadcn/button.tsx +67 -12
- package/src/core/components/shadcn/filters/filterBar.tsx +1 -0
- package/src/core/components/shadcn/modal/dialog.tsx +4 -2
- package/src/core/components/shadcn/tabs.test.tsx +65 -0
- package/src/core/components/shadcn/tabs.tsx +25 -3
- package/src/core/components/shadcn/theme/ThemeSwitcher.tsx +1 -1
- package/src/features/agent/chat/AgentChatPlaybackControls.tsx +0 -5
- package/src/features/agent/chat/AgentRequestInputOverlay.test.tsx +31 -0
- package/src/features/agent/chat/AgentRequestInputOverlay.tsx +6 -2
- package/src/features/agent/chat/AgentRightPanel.tsx +16 -1
- package/src/features/agent/chat/ArtifactsTab.test.tsx +55 -0
- package/src/features/agent/chat/ArtifactsTab.tsx +222 -61
- package/src/features/agent/chat/DocumentEditingActionCard.test.tsx +105 -0
- package/src/features/agent/chat/DocumentEditingActionCard.tsx +210 -0
- package/src/features/agent/chat/ImageLightbox.tsx +0 -1
- package/src/features/agent/chat/ModernAgentConversation.test.tsx +285 -40
- package/src/features/agent/chat/ModernAgentConversation.tsx +247 -77
- package/src/features/agent/chat/ModernAgentOutput/AgentMarkdownAnchor.test.tsx +79 -0
- package/src/features/agent/chat/ModernAgentOutput/AgentMarkdownAnchor.tsx +94 -0
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.test.tsx +263 -35
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +236 -118
- package/src/features/agent/chat/ModernAgentOutput/AttachmentPreview.tsx +17 -0
- package/src/features/agent/chat/ModernAgentOutput/CollapsibleAgentMarkdown.test.tsx +44 -0
- package/src/features/agent/chat/ModernAgentOutput/CollapsibleAgentMarkdown.tsx +88 -0
- package/src/features/agent/chat/ModernAgentOutput/Header.tsx +3 -3
- package/src/features/agent/chat/ModernAgentOutput/MessageInput.tsx +0 -2
- package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +34 -47
- package/src/features/agent/chat/ModernAgentOutput/ResourceChangeSummary.tsx +40 -0
- package/src/features/agent/chat/ModernAgentOutput/ResourceChip.test.tsx +148 -0
- package/src/features/agent/chat/ModernAgentOutput/ResourceChip.tsx +141 -0
- package/src/features/agent/chat/ModernAgentOutput/ToolCallGroup.tsx +33 -1
- package/src/features/agent/chat/ModernAgentOutput/requestInputMessages.test.ts +80 -0
- package/src/features/agent/chat/ModernAgentOutput/requestInputMessages.ts +21 -1
- package/src/features/agent/chat/ModernAgentOutput/resourceLinks.tsx +43 -0
- package/src/features/agent/chat/ModernAgentOutput/resourceSummary.test.ts +229 -0
- package/src/features/agent/chat/ModernAgentOutput/resourceSummary.ts +152 -0
- package/src/features/agent/chat/ModernAgentOutput/utils.test.ts +17 -0
- package/src/features/agent/chat/ModernAgentOutput/utils.ts +14 -1
- package/src/features/agent/chat/hooks/useAgentStream.test.tsx +188 -0
- package/src/features/agent/chat/hooks/useAgentStream.ts +28 -8
- package/src/features/agent/chat/index.ts +11 -0
- package/src/features/environment/SelectEnvironment.tsx +186 -0
- package/src/features/environment/index.ts +1 -0
- package/src/features/index.ts +2 -0
- package/src/features/magic-pdf/AnnotatedImageSlider.tsx +62 -66
- package/src/features/magic-pdf/DownloadPopover.tsx +5 -48
- package/src/features/magic-pdf/ExtractedContentView.tsx +2 -14
- package/src/features/magic-pdf/GroundedExtractionAssistantPanel.tsx +86 -0
- package/src/features/magic-pdf/GroundedExtractionView.test.tsx +65 -0
- package/src/features/magic-pdf/GroundedExtractionView.tsx +1055 -0
- package/src/features/magic-pdf/MagicPdfProvider.tsx +17 -47
- package/src/features/magic-pdf/MagicPdfView.tsx +3 -51
- package/src/features/magic-pdf/index.ts +1 -0
- package/src/features/magic-pdf/types.ts +1 -1
- package/src/features/oauth/McpConnectionsButton.tsx +0 -2
- package/src/features/oauth/McpConnectionsDialog.tsx +0 -1
- package/src/features/oauth/RemoteMcpConnectionButton.tsx +0 -1
- package/src/features/pdf-viewer/PdfPageSlider.tsx +5 -5
- package/src/features/pdf-viewer/SimplePdfViewer.tsx +11 -12
- package/src/features/permissions/UserPermissionsProvider.tsx +1 -1
- package/src/features/store/objects/DocumentQuickFilter.tsx +13 -15
- package/src/features/store/objects/DocumentSearchResults.tsx +5 -8
- package/src/features/store/objects/components/ContentDispositionButton.tsx +5 -1
- package/src/features/store/objects/components/ContentOverview.tsx +356 -105
- package/src/features/store/objects/components/DocumentEditingConfigurationSelector.test.ts +34 -0
- package/src/features/store/objects/components/DocumentEditingConfigurationSelector.tsx +211 -0
- package/src/features/store/objects/components/DocumentEditingLockStatus.test.tsx +32 -0
- package/src/features/store/objects/components/DocumentEditingLockStatus.tsx +45 -0
- package/src/features/store/objects/components/DocumentEditingPanel.test.tsx +336 -0
- package/src/features/store/objects/components/DocumentEditingPanel.tsx +1236 -0
- package/src/features/store/objects/components/DocumentIcon.tsx +1 -1
- package/src/features/store/objects/components/TextEditorPanel.test.tsx +48 -0
- package/src/features/store/objects/components/TextEditorPanel.tsx +41 -20
- package/src/features/store/objects/components/VectorSearchWidget.tsx +2 -2
- package/src/features/store/objects/components/documentArtifactRefs.test.ts +65 -0
- package/src/features/store/objects/components/documentArtifactRefs.ts +72 -0
- package/src/features/store/objects/components/documentEditingAgentConfig.test.ts +28 -0
- package/src/features/store/objects/components/documentEditingAgentConfig.ts +41 -0
- package/src/features/store/objects/components/documentEditingPrompts.test.ts +26 -0
- package/src/features/store/objects/components/documentEditingPrompts.ts +12 -0
- package/src/features/store/objects/components/documentEditingRun.test.ts +176 -0
- package/src/features/store/objects/components/documentEditingRun.ts +184 -0
- package/src/features/store/objects/components/documentEditingTarget.test.ts +96 -0
- package/src/features/store/objects/components/documentEditingTarget.ts +63 -0
- package/src/features/store/objects/components/index.ts +1 -0
- package/src/features/store/objects/components/useContentPanelHooks.ts +55 -42
- package/src/features/store/objects/components/useDownloadFile.test.ts +20 -0
- package/src/features/store/objects/components/useDownloadFile.ts +5 -1
- package/src/features/store/objects/layout/renderers.tsx +1 -2
- package/src/features/store/objects/selection/SelectionActions.tsx +1 -1
- package/src/features/store/objects/selection/actions/StartWorkflowButton.tsx +2 -2
- package/src/features/store/types/ContentObjectTypesTable.tsx +12 -14
- package/src/features/store/types/IntakePolicyEditor.tsx +679 -0
- package/src/features/store/types/IntakePolicyForm.tsx +838 -0
- package/src/features/store/types/SelectContentTypeModal.tsx +2 -2
- package/src/features/store/types/index.ts +2 -0
- package/src/features/store/types/intake-policy-editor.logic.test.ts +109 -0
- package/src/features/store/types/intake-policy-editor.logic.ts +87 -0
- package/src/features/store/types/typeCatalogCache.ts +45 -0
- package/src/features/user/UserInfo.tsx +7 -7
- package/src/features/views/ViewExperience.test.tsx +273 -0
- package/src/features/views/ViewExperience.tsx +408 -0
- package/src/features/views/ViewNavigation.test.tsx +86 -0
- package/src/features/views/ViewNavigation.tsx +187 -0
- package/src/features/views/ViewResults.test.ts +82 -0
- package/src/features/views/ViewResults.tsx +609 -0
- package/src/features/views/ViewSearch.test.tsx +147 -0
- package/src/features/views/ViewSearch.tsx +205 -0
- package/src/features/views/index.ts +6 -0
- package/src/features/views/types.ts +57 -0
- package/src/features/views/viewState.test.ts +111 -0
- package/src/features/views/viewState.ts +132 -0
- package/src/i18n/locales/ar.json +134 -1
- package/src/i18n/locales/de.json +130 -1
- package/src/i18n/locales/en.json +1083 -753
- package/src/i18n/locales/es.json +131 -1
- package/src/i18n/locales/fr.json +131 -1
- package/src/i18n/locales/it.json +131 -1
- package/src/i18n/locales/ja.json +129 -1
- package/src/i18n/locales/ko.json +129 -1
- package/src/i18n/locales/pt.json +131 -1
- package/src/i18n/locales/ru.json +132 -1
- package/src/i18n/locales/tr.json +130 -1
- package/src/i18n/locales/zh-TW.json +129 -1
- package/src/i18n/locales/zh.json +129 -1
- package/src/rich-text/EditorToolbar.tsx +708 -0
- package/src/rich-text/VertesiaRichTextEditor.test.tsx +211 -0
- package/src/rich-text/VertesiaRichTextEditor.tsx +241 -0
- package/src/rich-text/index.ts +9 -0
- package/src/router/HistoryNavigator.test.ts +48 -0
- package/src/router/HistoryNavigator.ts +24 -13
- package/src/router/Nav.tsx +18 -8
- package/src/session/UserSession.test.ts +39 -0
- package/src/session/UserSession.ts +5 -3
- package/src/widgets/form/Form.tsx +1 -1
- package/src/widgets/json-view/JSONSwitcher.tsx +2 -2
- package/src/widgets/json-view/JSONView.tsx +7 -7
- package/src/widgets/markdown/AgentResourceResolver.test.ts +24 -0
- package/src/widgets/markdown/AgentResourceResolver.tsx +70 -0
- package/src/widgets/markdown/ArtifactEditingSurface.test.tsx +537 -0
- package/src/widgets/markdown/ArtifactEditingSurface.tsx +878 -0
- package/src/widgets/markdown/CollaborativeMarkdownRenderer.test.tsx +484 -0
- package/src/widgets/markdown/CollaborativeMarkdownRenderer.tsx +825 -0
- package/src/widgets/markdown/MarkdownLink.test.tsx +122 -0
- package/src/widgets/markdown/MarkdownLink.tsx +102 -17
- package/src/widgets/markdown/MarkdownRenderer.tsx +30 -3
- package/src/widgets/markdown/index.ts +39 -1
- package/src/widgets/markdown/normalizeCustomSchemeLinks.ts +15 -2
- package/src/widgets/markdown/textDiff.test.ts +156 -0
- package/src/widgets/markdown/textDiff.ts +399 -0
- package/src/widgets/markdown/useArtifactContent.ts +9 -3
- package/src/widgets/markdown/useResolvedUrl.test.ts +29 -40
- package/src/widgets/markdown/useResolvedUrl.ts +33 -35
- package/src/widgets/monacoEditor/MonacoEditor.tsx +29 -0
- package/src/widgets/schema-editor/ManagedSchema.ts +22 -0
- package/src/widgets/schema-editor/editor/EditableSchemaProperty.tsx +3 -0
- package/src/widgets/schema-editor/editor/PropertyViewer.tsx +14 -3
- package/src/widgets/schema-editor/editor/SchemaEditor.tsx +80 -29
- package/src/widgets/xml-viewer/hooks/useXMLViewer.test.ts +26 -0
- package/src/widgets/xml-viewer/hooks/useXMLViewer.ts +23 -18
|
@@ -0,0 +1,484 @@
|
|
|
1
|
+
/** @vitest-environment jsdom */
|
|
2
|
+
|
|
3
|
+
import { cleanup, fireEvent, render, screen, waitFor, within } from '@testing-library/react';
|
|
4
|
+
import userEvent from '@testing-library/user-event';
|
|
5
|
+
import type { Element } from 'hast';
|
|
6
|
+
import { afterEach, describe, expect, it, vi } from 'vitest';
|
|
7
|
+
import { I18nProvider } from '../../i18n/index.js';
|
|
8
|
+
import {
|
|
9
|
+
applyMarkdownEditingChange,
|
|
10
|
+
CollaborativeMarkdownRenderer,
|
|
11
|
+
createMarkdownBlockAnchor,
|
|
12
|
+
formatMarkdownEditingAction,
|
|
13
|
+
type MarkdownEditingAction,
|
|
14
|
+
} from './CollaborativeMarkdownRenderer.js';
|
|
15
|
+
|
|
16
|
+
afterEach(() => {
|
|
17
|
+
cleanup();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
function elementAt(start: number, end: number): Element {
|
|
21
|
+
return {
|
|
22
|
+
type: 'element',
|
|
23
|
+
tagName: 'p',
|
|
24
|
+
properties: {},
|
|
25
|
+
children: [],
|
|
26
|
+
position: {
|
|
27
|
+
start: { line: 1, column: start + 1, offset: start },
|
|
28
|
+
end: { line: 1, column: end + 1, offset: end },
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
describe('collaborative Markdown actions', () => {
|
|
34
|
+
it('anchors a block with its range and surrounding source context', () => {
|
|
35
|
+
const markdown = 'Before\n\nSelected paragraph\n\nAfter';
|
|
36
|
+
const start = markdown.indexOf('Selected');
|
|
37
|
+
const end = start + 'Selected paragraph'.length;
|
|
38
|
+
|
|
39
|
+
expect(createMarkdownBlockAnchor(markdown, elementAt(start, end), 'paragraph')).toEqual({
|
|
40
|
+
block_id: `paragraph:${start}:${end}`,
|
|
41
|
+
block_type: 'paragraph',
|
|
42
|
+
source_range: { start, end },
|
|
43
|
+
exact_text: 'Selected paragraph',
|
|
44
|
+
prefix: 'Before\n\n',
|
|
45
|
+
suffix: '\n\nAfter',
|
|
46
|
+
occurrence_index: 0,
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it('disambiguates repeated blocks under the same heading', () => {
|
|
51
|
+
const markdown = '# Section\n\nRepeated\n\nRepeated';
|
|
52
|
+
const start = markdown.lastIndexOf('Repeated');
|
|
53
|
+
const end = start + 'Repeated'.length;
|
|
54
|
+
|
|
55
|
+
expect(createMarkdownBlockAnchor(markdown, elementAt(start, end), 'paragraph')).toEqual(
|
|
56
|
+
expect.objectContaining({
|
|
57
|
+
heading_path: ['Section'],
|
|
58
|
+
exact_text: 'Repeated',
|
|
59
|
+
occurrence_index: 1,
|
|
60
|
+
}),
|
|
61
|
+
);
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
it('formats a direct artifact edit as an actionable agent message', () => {
|
|
65
|
+
const action: MarkdownEditingAction = {
|
|
66
|
+
operation_id: 'operation-1',
|
|
67
|
+
resource: { kind: 'agent_artifact', run_id: 'run-1', path: 'draft.md' },
|
|
68
|
+
base_version: 'etag-1',
|
|
69
|
+
action: 'edit',
|
|
70
|
+
anchor: {
|
|
71
|
+
block_id: 'paragraph:0:3',
|
|
72
|
+
block_type: 'paragraph',
|
|
73
|
+
exact_text: 'Old',
|
|
74
|
+
},
|
|
75
|
+
user_change: { before: 'Old', after: 'New' },
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
expect(formatMarkdownEditingAction(action)).toContain('artifact:draft.md (run run-1)');
|
|
79
|
+
expect(formatMarkdownEditingAction(action)).toContain('Before:\n```markdown\nOld');
|
|
80
|
+
expect(formatMarkdownEditingAction(action)).toContain('After:\n```markdown\nNew');
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
it('uses a longer message fence when selected source contains a fenced code block', () => {
|
|
84
|
+
const action: MarkdownEditingAction = {
|
|
85
|
+
operation_id: 'operation-1',
|
|
86
|
+
resource: { kind: 'agent_artifact', run_id: 'run-1', path: 'draft.md' },
|
|
87
|
+
action: 'comment',
|
|
88
|
+
anchor: {
|
|
89
|
+
block_id: 'code_block:0:21',
|
|
90
|
+
block_type: 'code_block',
|
|
91
|
+
exact_text: '```ts\nconst n = 1;\n```',
|
|
92
|
+
},
|
|
93
|
+
comment: 'Rename this variable.',
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
expect(formatMarkdownEditingAction(action)).toContain(
|
|
97
|
+
'Selected content:\n````markdown\n```ts\nconst n = 1;\n```\n````',
|
|
98
|
+
);
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
it('submits a comment with the selected source block and version', async () => {
|
|
102
|
+
const onAction = vi.fn();
|
|
103
|
+
render(
|
|
104
|
+
<I18nProvider lng="en">
|
|
105
|
+
<CollaborativeMarkdownRenderer
|
|
106
|
+
resource={{ kind: 'store_document', document_id: 'document-1' }}
|
|
107
|
+
baseVersion="etag-1"
|
|
108
|
+
onAction={onAction}
|
|
109
|
+
>
|
|
110
|
+
{'First paragraph.\n\nSecond paragraph.'}
|
|
111
|
+
</CollaborativeMarkdownRenderer>
|
|
112
|
+
</I18nProvider>,
|
|
113
|
+
);
|
|
114
|
+
|
|
115
|
+
const selectedBlock = screen.getByText('Second paragraph.').parentElement;
|
|
116
|
+
if (!selectedBlock) throw new Error('Expected the paragraph to have a collaborative block parent');
|
|
117
|
+
fireEvent.click(within(selectedBlock).getByRole('button', { name: 'Comment on selection' }));
|
|
118
|
+
fireEvent.change(within(selectedBlock).getByRole('textbox'), {
|
|
119
|
+
target: { value: 'Make this more specific.' },
|
|
120
|
+
});
|
|
121
|
+
fireEvent.click(screen.getByRole('button', { name: 'Send' }));
|
|
122
|
+
|
|
123
|
+
await waitFor(() => expect(onAction).toHaveBeenCalledTimes(1));
|
|
124
|
+
expect(onAction).toHaveBeenCalledWith(
|
|
125
|
+
expect.objectContaining({
|
|
126
|
+
resource: { kind: 'store_document', document_id: 'document-1' },
|
|
127
|
+
base_version: 'etag-1',
|
|
128
|
+
action: 'comment',
|
|
129
|
+
comment: 'Make this more specific.',
|
|
130
|
+
anchor: expect.objectContaining({
|
|
131
|
+
block_type: 'paragraph',
|
|
132
|
+
exact_text: 'Second paragraph.',
|
|
133
|
+
}),
|
|
134
|
+
}),
|
|
135
|
+
);
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
it('briefly highlights blocks that changed between document revisions', async () => {
|
|
139
|
+
const onAction = vi.fn();
|
|
140
|
+
const { rerender } = render(
|
|
141
|
+
<I18nProvider lng="en">
|
|
142
|
+
<CollaborativeMarkdownRenderer
|
|
143
|
+
resource={{ kind: 'store_document', document_id: 'document-1' }}
|
|
144
|
+
onAction={onAction}
|
|
145
|
+
>
|
|
146
|
+
{'Original paragraph.'}
|
|
147
|
+
</CollaborativeMarkdownRenderer>
|
|
148
|
+
</I18nProvider>,
|
|
149
|
+
);
|
|
150
|
+
|
|
151
|
+
rerender(
|
|
152
|
+
<I18nProvider lng="en">
|
|
153
|
+
<CollaborativeMarkdownRenderer
|
|
154
|
+
resource={{ kind: 'store_document', document_id: 'document-2' }}
|
|
155
|
+
highlightChangesFrom="Original paragraph."
|
|
156
|
+
highlightVersion={1}
|
|
157
|
+
onAction={onAction}
|
|
158
|
+
>
|
|
159
|
+
{'Updated paragraph.'}
|
|
160
|
+
</CollaborativeMarkdownRenderer>
|
|
161
|
+
</I18nProvider>,
|
|
162
|
+
);
|
|
163
|
+
|
|
164
|
+
await waitFor(() => {
|
|
165
|
+
expect(screen.getByText('Updated paragraph.').parentElement?.className).toContain('bg-mixer-success/15');
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
it('preserves a typed draft when a document refresh invalidates its block anchor', async () => {
|
|
170
|
+
const onAction = vi.fn();
|
|
171
|
+
const { rerender } = render(
|
|
172
|
+
<I18nProvider lng="en">
|
|
173
|
+
<CollaborativeMarkdownRenderer
|
|
174
|
+
resource={{ kind: 'store_document', document_id: 'document-1' }}
|
|
175
|
+
onAction={onAction}
|
|
176
|
+
>
|
|
177
|
+
{'Original paragraph.'}
|
|
178
|
+
</CollaborativeMarkdownRenderer>
|
|
179
|
+
</I18nProvider>,
|
|
180
|
+
);
|
|
181
|
+
|
|
182
|
+
const selectedBlock = screen.getByText('Original paragraph.').parentElement;
|
|
183
|
+
if (!selectedBlock) throw new Error('Expected a collaborative block parent');
|
|
184
|
+
fireEvent.click(within(selectedBlock).getByRole('button', { name: 'Comment on selection' }));
|
|
185
|
+
fireEvent.change(within(selectedBlock).getByRole('textbox'), {
|
|
186
|
+
target: { value: 'Keep this draft recoverable.' },
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
rerender(
|
|
190
|
+
<I18nProvider lng="en">
|
|
191
|
+
<CollaborativeMarkdownRenderer
|
|
192
|
+
resource={{ kind: 'store_document', document_id: 'document-2' }}
|
|
193
|
+
onAction={onAction}
|
|
194
|
+
>
|
|
195
|
+
{'Inserted paragraph.\n\nOriginal paragraph.'}
|
|
196
|
+
</CollaborativeMarkdownRenderer>
|
|
197
|
+
</I18nProvider>,
|
|
198
|
+
);
|
|
199
|
+
|
|
200
|
+
await waitFor(() => {
|
|
201
|
+
expect(screen.getByText('Your draft was preserved')).not.toBeNull();
|
|
202
|
+
expect(screen.getByDisplayValue('Keep this draft recoverable.')).not.toBeNull();
|
|
203
|
+
});
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
it('keeps source anchors aligned when normal rendering would rewrite earlier Markdown', async () => {
|
|
207
|
+
const onAction = vi.fn();
|
|
208
|
+
render(
|
|
209
|
+
<I18nProvider lng="en">
|
|
210
|
+
<CollaborativeMarkdownRenderer
|
|
211
|
+
resource={{ kind: 'store_document', document_id: 'document-1' }}
|
|
212
|
+
onAction={onAction}
|
|
213
|
+
>
|
|
214
|
+
{'Revenue was between $100M and $500M.\n\nKeep this exact.'}
|
|
215
|
+
</CollaborativeMarkdownRenderer>
|
|
216
|
+
</I18nProvider>,
|
|
217
|
+
);
|
|
218
|
+
|
|
219
|
+
const selectedBlock = screen.getByText('Keep this exact.').parentElement;
|
|
220
|
+
if (!selectedBlock) throw new Error('Expected the paragraph to have a collaborative block parent');
|
|
221
|
+
fireEvent.click(within(selectedBlock).getByRole('button', { name: 'Comment on selection' }));
|
|
222
|
+
fireEvent.change(within(selectedBlock).getByRole('textbox'), {
|
|
223
|
+
target: { value: 'Add evidence.' },
|
|
224
|
+
});
|
|
225
|
+
fireEvent.click(screen.getByRole('button', { name: 'Send' }));
|
|
226
|
+
|
|
227
|
+
await waitFor(() => expect(onAction).toHaveBeenCalledTimes(1));
|
|
228
|
+
expect(onAction).toHaveBeenCalledWith(
|
|
229
|
+
expect.objectContaining({
|
|
230
|
+
anchor: expect.objectContaining({
|
|
231
|
+
exact_text: 'Keep this exact.',
|
|
232
|
+
source_range: {
|
|
233
|
+
start: 'Revenue was between $100M and $500M.\n\n'.length,
|
|
234
|
+
end: 'Revenue was between $100M and $500M.\n\nKeep this exact.'.length,
|
|
235
|
+
},
|
|
236
|
+
}),
|
|
237
|
+
}),
|
|
238
|
+
);
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
it('hides editing controls on a read-only surface', () => {
|
|
242
|
+
render(
|
|
243
|
+
<I18nProvider lng="en">
|
|
244
|
+
<CollaborativeMarkdownRenderer
|
|
245
|
+
resource={{ kind: 'agent_artifact', run_id: 'run-1', path: 'draft.md' }}
|
|
246
|
+
readOnly
|
|
247
|
+
onAction={vi.fn()}
|
|
248
|
+
>
|
|
249
|
+
{'Read only paragraph.'}
|
|
250
|
+
</CollaborativeMarkdownRenderer>
|
|
251
|
+
</I18nProvider>,
|
|
252
|
+
);
|
|
253
|
+
|
|
254
|
+
expect(screen.queryByRole('button', { name: 'Comment on selection' })).toBeNull();
|
|
255
|
+
expect(screen.queryByRole('button', { name: 'Edit selection' })).toBeNull();
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
it('keeps comments enabled while content mutations are locked', async () => {
|
|
259
|
+
const onAction = vi.fn();
|
|
260
|
+
render(
|
|
261
|
+
<I18nProvider lng="en">
|
|
262
|
+
<CollaborativeMarkdownRenderer
|
|
263
|
+
resource={{ kind: 'agent_artifact', run_id: 'run-1', path: 'draft.md' }}
|
|
264
|
+
readOnly
|
|
265
|
+
allowComments
|
|
266
|
+
onAction={onAction}
|
|
267
|
+
>
|
|
268
|
+
{'Locked paragraph.'}
|
|
269
|
+
</CollaborativeMarkdownRenderer>
|
|
270
|
+
</I18nProvider>,
|
|
271
|
+
);
|
|
272
|
+
|
|
273
|
+
expect(screen.queryByRole('button', { name: 'Edit selection' })).toBeNull();
|
|
274
|
+
fireEvent.click(screen.getByRole('button', { name: 'Comment on selection' }));
|
|
275
|
+
fireEvent.change(screen.getByRole('textbox'), { target: { value: 'Add supporting evidence.' } });
|
|
276
|
+
fireEvent.click(screen.getByRole('button', { name: 'Send' }));
|
|
277
|
+
|
|
278
|
+
await waitFor(() => expect(onAction).toHaveBeenCalledTimes(1));
|
|
279
|
+
expect(onAction).toHaveBeenCalledWith(
|
|
280
|
+
expect.objectContaining({
|
|
281
|
+
action: 'comment',
|
|
282
|
+
comment: 'Add supporting evidence.',
|
|
283
|
+
anchor: expect.objectContaining({ exact_text: 'Locked paragraph.' }),
|
|
284
|
+
}),
|
|
285
|
+
);
|
|
286
|
+
});
|
|
287
|
+
|
|
288
|
+
it('prevents an open component editor from submitting after the surface becomes read-only', () => {
|
|
289
|
+
const onAction = vi.fn();
|
|
290
|
+
const view = render(
|
|
291
|
+
<I18nProvider lng="en">
|
|
292
|
+
<CollaborativeMarkdownRenderer
|
|
293
|
+
resource={{ kind: 'agent_artifact', run_id: 'run-1', path: 'draft.md' }}
|
|
294
|
+
onAction={onAction}
|
|
295
|
+
>
|
|
296
|
+
{'Editable paragraph.'}
|
|
297
|
+
</CollaborativeMarkdownRenderer>
|
|
298
|
+
</I18nProvider>,
|
|
299
|
+
);
|
|
300
|
+
|
|
301
|
+
fireEvent.click(screen.getByRole('button', { name: 'Comment on selection' }));
|
|
302
|
+
fireEvent.change(screen.getByRole('textbox'), { target: { value: 'Keep this draft.' } });
|
|
303
|
+
|
|
304
|
+
view.rerender(
|
|
305
|
+
<I18nProvider lng="en">
|
|
306
|
+
<CollaborativeMarkdownRenderer
|
|
307
|
+
resource={{ kind: 'agent_artifact', run_id: 'run-1', path: 'draft.md' }}
|
|
308
|
+
readOnly
|
|
309
|
+
onAction={onAction}
|
|
310
|
+
>
|
|
311
|
+
{'Editable paragraph.'}
|
|
312
|
+
</CollaborativeMarkdownRenderer>
|
|
313
|
+
</I18nProvider>,
|
|
314
|
+
);
|
|
315
|
+
|
|
316
|
+
expect(screen.getByRole('textbox')).toHaveProperty('disabled', true);
|
|
317
|
+
const sendButton = screen.getByRole('button', { name: 'Send' });
|
|
318
|
+
expect(sendButton).toHaveProperty('disabled', true);
|
|
319
|
+
fireEvent.click(sendButton);
|
|
320
|
+
expect(onAction).not.toHaveBeenCalled();
|
|
321
|
+
});
|
|
322
|
+
|
|
323
|
+
it('selects a list as one group instead of individual bullets', async () => {
|
|
324
|
+
const onAction = vi.fn();
|
|
325
|
+
const markdown = '- First bullet\n- Second bullet';
|
|
326
|
+
render(
|
|
327
|
+
<I18nProvider lng="en">
|
|
328
|
+
<CollaborativeMarkdownRenderer
|
|
329
|
+
resource={{ kind: 'store_document', document_id: 'document-1' }}
|
|
330
|
+
onAction={onAction}
|
|
331
|
+
>
|
|
332
|
+
{markdown}
|
|
333
|
+
</CollaborativeMarkdownRenderer>
|
|
334
|
+
</I18nProvider>,
|
|
335
|
+
);
|
|
336
|
+
|
|
337
|
+
// One control set for the whole list, none per bullet.
|
|
338
|
+
expect(screen.getAllByRole('button', { name: 'Comment on selection' })).toHaveLength(1);
|
|
339
|
+
|
|
340
|
+
fireEvent.click(screen.getByRole('button', { name: 'Edit selection' }));
|
|
341
|
+
fireEvent.change(screen.getByRole('textbox'), {
|
|
342
|
+
target: { value: '- First bullet\n- Second bullet\n- Third bullet' },
|
|
343
|
+
});
|
|
344
|
+
fireEvent.click(screen.getByRole('button', { name: 'Send' }));
|
|
345
|
+
|
|
346
|
+
await waitFor(() => expect(onAction).toHaveBeenCalledTimes(1));
|
|
347
|
+
expect(onAction).toHaveBeenCalledWith(
|
|
348
|
+
expect.objectContaining({
|
|
349
|
+
action: 'edit',
|
|
350
|
+
anchor: expect.objectContaining({
|
|
351
|
+
block_type: 'list',
|
|
352
|
+
exact_text: '- First bullet\n- Second bullet',
|
|
353
|
+
}),
|
|
354
|
+
user_change: {
|
|
355
|
+
before: '- First bullet\n- Second bullet',
|
|
356
|
+
after: '- First bullet\n- Second bullet\n- Third bullet',
|
|
357
|
+
},
|
|
358
|
+
}),
|
|
359
|
+
);
|
|
360
|
+
});
|
|
361
|
+
|
|
362
|
+
it('uses the rich component editor for a selected block', async () => {
|
|
363
|
+
// delay:null types synchronously so ProseMirror doesn't drop characters between renders.
|
|
364
|
+
const user = userEvent.setup({ delay: null });
|
|
365
|
+
const onAction = vi.fn();
|
|
366
|
+
render(
|
|
367
|
+
<I18nProvider lng="en">
|
|
368
|
+
<CollaborativeMarkdownRenderer
|
|
369
|
+
resource={{ kind: 'store_document', document_id: 'document-1' }}
|
|
370
|
+
onAction={onAction}
|
|
371
|
+
>
|
|
372
|
+
{'Original paragraph.'}
|
|
373
|
+
</CollaborativeMarkdownRenderer>
|
|
374
|
+
</I18nProvider>,
|
|
375
|
+
);
|
|
376
|
+
|
|
377
|
+
fireEvent.click(screen.getByRole('button', { name: 'Edit selection' }));
|
|
378
|
+
const editor = await screen.findByRole('textbox');
|
|
379
|
+
// Wait for the draft to hydrate, then select the whole paragraph and paste the replacement
|
|
380
|
+
// in one operation — char-by-char typing races ProseMirror in jsdom and drops chars.
|
|
381
|
+
await waitFor(() => expect(editor.textContent ?? '').toContain('Original paragraph.'));
|
|
382
|
+
await user.tripleClick(editor);
|
|
383
|
+
await user.paste('Revised paragraph.');
|
|
384
|
+
fireEvent.click(screen.getByRole('button', { name: 'Send' }));
|
|
385
|
+
|
|
386
|
+
await waitFor(() => expect(onAction).toHaveBeenCalledTimes(1));
|
|
387
|
+
expect(onAction).toHaveBeenCalledWith(
|
|
388
|
+
expect.objectContaining({
|
|
389
|
+
action: 'edit',
|
|
390
|
+
user_change: {
|
|
391
|
+
before: 'Original paragraph.',
|
|
392
|
+
after: expect.stringContaining('Revised paragraph.'),
|
|
393
|
+
},
|
|
394
|
+
}),
|
|
395
|
+
);
|
|
396
|
+
});
|
|
397
|
+
|
|
398
|
+
it('inserts a new component after a selected block as an already-applicable edit', async () => {
|
|
399
|
+
const user = userEvent.setup({ delay: null });
|
|
400
|
+
const onAction = vi.fn();
|
|
401
|
+
render(
|
|
402
|
+
<I18nProvider lng="en">
|
|
403
|
+
<CollaborativeMarkdownRenderer
|
|
404
|
+
resource={{ kind: 'agent_artifact', run_id: 'run-1', path: 'draft.md' }}
|
|
405
|
+
onAction={onAction}
|
|
406
|
+
>
|
|
407
|
+
{'Original paragraph.'}
|
|
408
|
+
</CollaborativeMarkdownRenderer>
|
|
409
|
+
</I18nProvider>,
|
|
410
|
+
);
|
|
411
|
+
|
|
412
|
+
await user.click(screen.getByRole('button', { name: 'Insert component after this block' }));
|
|
413
|
+
await user.click(await screen.findByRole('menuitem', { name: 'Paragraph' }));
|
|
414
|
+
|
|
415
|
+
const editor = await screen.findByRole('textbox');
|
|
416
|
+
await user.click(editor);
|
|
417
|
+
// Paste in one operation — char-by-char typing races ProseMirror in jsdom and drops chars.
|
|
418
|
+
await user.paste('Inserted paragraph.');
|
|
419
|
+
await waitFor(() => expect(editor.textContent ?? '').toContain('Inserted paragraph.'));
|
|
420
|
+
fireEvent.click(screen.getByRole('button', { name: 'Send' }));
|
|
421
|
+
|
|
422
|
+
await waitFor(() => expect(onAction).toHaveBeenCalledTimes(1));
|
|
423
|
+
expect(onAction).toHaveBeenCalledWith(
|
|
424
|
+
expect.objectContaining({
|
|
425
|
+
action: 'edit',
|
|
426
|
+
user_change: {
|
|
427
|
+
before: 'Original paragraph.',
|
|
428
|
+
after: expect.stringMatching(/^Original paragraph\.\n\n.*Inserted paragraph\.$/),
|
|
429
|
+
},
|
|
430
|
+
}),
|
|
431
|
+
);
|
|
432
|
+
});
|
|
433
|
+
|
|
434
|
+
it('applies an anchored edit to the markdown source', () => {
|
|
435
|
+
const markdown = '# Title\n\n- First bullet\n- Second bullet\n\nTail paragraph.';
|
|
436
|
+
const start = markdown.indexOf('- First');
|
|
437
|
+
const end = markdown.indexOf('\n\nTail');
|
|
438
|
+
const action: MarkdownEditingAction = {
|
|
439
|
+
operation_id: 'operation-1',
|
|
440
|
+
resource: { kind: 'store_document', document_id: 'document-1' },
|
|
441
|
+
action: 'edit',
|
|
442
|
+
anchor: {
|
|
443
|
+
block_id: `list:${start}:${end}`,
|
|
444
|
+
block_type: 'list',
|
|
445
|
+
source_range: { start, end },
|
|
446
|
+
exact_text: markdown.slice(start, end),
|
|
447
|
+
},
|
|
448
|
+
user_change: {
|
|
449
|
+
before: markdown.slice(start, end),
|
|
450
|
+
after: '- First bullet\n- Second bullet\n- Third bullet',
|
|
451
|
+
},
|
|
452
|
+
};
|
|
453
|
+
|
|
454
|
+
expect(applyMarkdownEditingChange(markdown, action)).toBe(
|
|
455
|
+
'# Title\n\n- First bullet\n- Second bullet\n- Third bullet\n\nTail paragraph.',
|
|
456
|
+
);
|
|
457
|
+
});
|
|
458
|
+
|
|
459
|
+
it('recovers a shifted anchor through its prefix context and rejects ambiguity', () => {
|
|
460
|
+
const shifted: MarkdownEditingAction = {
|
|
461
|
+
operation_id: 'operation-2',
|
|
462
|
+
resource: { kind: 'store_document', document_id: 'document-1' },
|
|
463
|
+
action: 'edit',
|
|
464
|
+
anchor: {
|
|
465
|
+
block_id: 'paragraph:0:0',
|
|
466
|
+
block_type: 'paragraph',
|
|
467
|
+
source_range: { start: 0, end: 6 },
|
|
468
|
+
exact_text: 'Target',
|
|
469
|
+
prefix: 'Intro.\n\n',
|
|
470
|
+
},
|
|
471
|
+
user_change: { before: 'Target', after: 'Changed' },
|
|
472
|
+
};
|
|
473
|
+
|
|
474
|
+
// The range no longer matches, but the prefix disambiguates the occurrence.
|
|
475
|
+
expect(applyMarkdownEditingChange('Header.\n\nIntro.\n\nTarget', shifted)).toBe('Header.\n\nIntro.\n\nChanged');
|
|
476
|
+
// Range mismatch, two occurrences, and no usable prefix: refuse to guess.
|
|
477
|
+
expect(
|
|
478
|
+
applyMarkdownEditingChange('Intro.\n\nTarget\n\nTarget', {
|
|
479
|
+
...shifted,
|
|
480
|
+
anchor: { ...shifted.anchor, prefix: undefined },
|
|
481
|
+
}),
|
|
482
|
+
).toBeUndefined();
|
|
483
|
+
});
|
|
484
|
+
});
|