@vertesia/ui 1.5.0-dev.20260714.072725Z → 1.5.0-dev.20260722.120446Z
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/modal/dialog.js +1 -1
- package/lib/core/components/shadcn/modal/dialog.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/env/index.d.ts +19 -0
- package/lib/env/index.d.ts.map +1 -1
- package/lib/env/index.js +6 -0
- package/lib/env/index.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/ArtifactsTab.d.ts.map +1 -1
- package/lib/features/agent/chat/ArtifactsTab.js +68 -11
- package/lib/features/agent/chat/ArtifactsTab.js.map +1 -1
- 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.js +52 -49
- 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 +5 -5
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
- 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.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js +2 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.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/hooks/useArtifacts.d.ts +8 -1
- package/lib/features/agent/chat/hooks/useArtifacts.d.ts.map +1 -1
- package/lib/features/agent/chat/hooks/useArtifacts.js +28 -10
- package/lib/features/agent/chat/hooks/useArtifacts.js.map +1 -1
- package/lib/features/document-viewer/UniversalDocumentViewer.d.ts +73 -0
- package/lib/features/document-viewer/UniversalDocumentViewer.d.ts.map +1 -0
- package/lib/features/document-viewer/UniversalDocumentViewer.js +415 -0
- package/lib/features/document-viewer/UniversalDocumentViewer.js.map +1 -0
- package/lib/features/document-viewer/index.d.ts +2 -0
- package/lib/features/document-viewer/index.d.ts.map +1 -0
- package/lib/features/document-viewer/index.js +2 -0
- package/lib/features/document-viewer/index.js.map +1 -0
- 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 +3 -0
- package/lib/features/index.d.ts.map +1 -1
- package/lib/features/index.js +3 -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.d.ts +2 -3
- package/lib/features/permissions/UserPermissionsProvider.d.ts.map +1 -1
- package/lib/features/permissions/UserPermissionsProvider.js +31 -38
- 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 +2 -2
- 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.map +1 -1
- package/lib/features/store/objects/components/ContentOverview.js +148 -31
- package/lib/features/store/objects/components/ContentOverview.js.map +1 -1
- package/lib/features/store/objects/components/DocumentIcon.js +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/useContentPanelHooks.d.ts +1 -2
- package/lib/features/store/objects/components/useContentPanelHooks.d.ts.map +1 -1
- package/lib/features/store/objects/components/useContentPanelHooks.js +4 -8
- package/lib/features/store/objects/components/useContentPanelHooks.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/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 +18 -0
- package/lib/i18n/locales/de.json +14 -0
- package/lib/i18n/locales/en.json +246 -32
- package/lib/i18n/locales/es.json +15 -0
- package/lib/i18n/locales/fr.json +15 -0
- package/lib/i18n/locales/it.json +15 -0
- package/lib/i18n/locales/ja.json +13 -0
- package/lib/i18n/locales/ko.json +13 -0
- package/lib/i18n/locales/pt.json +15 -0
- package/lib/i18n/locales/ru.json +16 -0
- package/lib/i18n/locales/tr.json +14 -0
- package/lib/i18n/locales/zh-TW.json +13 -0
- package/lib/i18n/locales/zh.json +13 -0
- package/lib/router/HistoryNavigator.d.ts.map +1 -1
- package/lib/router/HistoryNavigator.js +27 -14
- package/lib/router/HistoryNavigator.js.map +1 -1
- package/lib/router/Nav.d.ts.map +1 -1
- package/lib/router/Nav.js +21 -6
- package/lib/router/Nav.js.map +1 -1
- package/lib/router/Router.d.ts.map +1 -1
- package/lib/router/Router.js +19 -4
- package/lib/router/Router.js.map +1 -1
- package/lib/router/path.d.ts +15 -0
- package/lib/router/path.d.ts.map +1 -1
- package/lib/router/path.js +43 -0
- package/lib/router/path.js.map +1 -1
- package/lib/session/UserSession.d.ts +6 -0
- package/lib/session/UserSession.d.ts.map +1 -1
- package/lib/session/UserSession.js +36 -12
- package/lib/session/UserSession.js.map +1 -1
- package/lib/session/UserSessionProvider.d.ts.map +1 -1
- package/lib/session/UserSessionProvider.js +111 -49
- package/lib/session/UserSessionProvider.js.map +1 -1
- package/lib/session/auth/composable.d.ts.map +1 -1
- package/lib/session/auth/composable.js +52 -3
- package/lib/session/auth/composable.js.map +1 -1
- package/lib/session/auth/domainRouting.d.ts +25 -0
- package/lib/session/auth/domainRouting.d.ts.map +1 -1
- package/lib/session/auth/domainRouting.js +36 -0
- package/lib/session/auth/domainRouting.js.map +1 -1
- package/lib/shell/login/SignInRestrictedEnvStep.d.ts +1 -1
- package/lib/shell/login/SignInRestrictedEnvStep.js +1 -1
- package/lib/shell/login/SigninScreen.js +9 -1
- package/lib/shell/login/SigninScreen.js.map +1 -1
- package/lib/shell/login/productionUrl.d.ts +0 -14
- package/lib/shell/login/productionUrl.d.ts.map +1 -1
- package/lib/shell/login/productionUrl.js +14 -5
- package/lib/shell/login/productionUrl.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-env.js +1 -1
- package/lib/vertesia-ui-env.js.map +1 -1
- package/lib/vertesia-ui-features.js +35 -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-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 +7 -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/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/llms.txt +70 -70
- package/package.json +33 -32
- package/src/__tests__/a11y.test.tsx +73 -0
- package/src/core/components/SidePanel.tsx +1 -1
- package/src/core/components/shadcn/button.tsx +67 -12
- package/src/core/components/shadcn/modal/dialog.tsx +1 -1
- package/src/core/components/shadcn/theme/ThemeSwitcher.tsx +1 -1
- package/src/env/index.ts +24 -0
- 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/ArtifactsTab.tsx +165 -21
- package/src/features/agent/chat/ImageLightbox.tsx +0 -1
- package/src/features/agent/chat/ModernAgentConversation.test.tsx +48 -0
- package/src/features/agent/chat/ModernAgentConversation.tsx +53 -51
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.test.tsx +6 -1
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +21 -15
- 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 +4 -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/hooks/useArtifacts.ts +44 -11
- package/src/features/document-viewer/UniversalDocumentViewer.test.tsx +123 -0
- package/src/features/document-viewer/UniversalDocumentViewer.tsx +746 -0
- package/src/features/document-viewer/index.ts +1 -0
- package/src/features/environment/SelectEnvironment.tsx +186 -0
- package/src/features/environment/index.ts +1 -0
- package/src/features/index.ts +3 -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 +36 -39
- package/src/features/store/objects/DocumentQuickFilter.tsx +13 -15
- package/src/features/store/objects/DocumentSearchResults.tsx +3 -6
- package/src/features/store/objects/components/ContentDispositionButton.tsx +5 -1
- package/src/features/store/objects/components/ContentOverview.tsx +240 -67
- package/src/features/store/objects/components/DocumentIcon.tsx +1 -1
- package/src/features/store/objects/components/VectorSearchWidget.tsx +2 -2
- package/src/features/store/objects/components/useContentPanelHooks.ts +3 -15
- package/src/features/store/objects/layout/renderers.tsx +1 -2
- package/src/features/store/objects/selection/SelectionActions.tsx +1 -1
- 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 +18 -0
- package/src/i18n/locales/de.json +14 -0
- package/src/i18n/locales/en.json +965 -751
- package/src/i18n/locales/es.json +15 -0
- package/src/i18n/locales/fr.json +15 -0
- package/src/i18n/locales/it.json +15 -0
- package/src/i18n/locales/ja.json +13 -0
- package/src/i18n/locales/ko.json +13 -0
- package/src/i18n/locales/pt.json +15 -0
- package/src/i18n/locales/ru.json +16 -0
- package/src/i18n/locales/tr.json +14 -0
- package/src/i18n/locales/zh-TW.json +13 -0
- package/src/i18n/locales/zh.json +13 -0
- package/src/router/HistoryNavigator.test.ts +48 -0
- package/src/router/HistoryNavigator.ts +28 -14
- package/src/router/Nav.tsx +24 -8
- package/src/router/Router.tsx +18 -4
- package/src/router/path.test.ts +87 -0
- package/src/router/path.ts +38 -0
- package/src/session/UserSession.test.ts +39 -0
- package/src/session/UserSession.ts +37 -12
- package/src/session/UserSessionProvider.tsx +138 -62
- package/src/session/auth/composable.test.ts +111 -0
- package/src/session/auth/composable.ts +58 -3
- package/src/session/auth/domainRouting.test.ts +28 -1
- package/src/session/auth/domainRouting.ts +38 -0
- package/src/shell/login/SignInRestrictedEnvStep.tsx +1 -1
- package/src/shell/login/SigninScreen.tsx +9 -1
- package/src/shell/login/productionUrl.test.ts +8 -5
- package/src/shell/login/productionUrl.ts +15 -5
- 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/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
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
ContentNature,
|
|
3
3
|
type ContentObject,
|
|
4
4
|
ContentObjectStatus,
|
|
5
|
+
type ContentObjectTypeItem,
|
|
5
6
|
type DocAnalyzerProgress,
|
|
6
|
-
type DocProcessorOutputFormat,
|
|
7
7
|
type DocumentMetadata,
|
|
8
8
|
MarkdownRenditionFormat,
|
|
9
9
|
PDF_RENDITION_NAME,
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
WorkflowExecutionStatus,
|
|
12
12
|
} from '@vertesia/common';
|
|
13
13
|
import {
|
|
14
|
+
Badge,
|
|
14
15
|
Button,
|
|
15
16
|
Dropdown,
|
|
16
17
|
MenuItem,
|
|
@@ -25,14 +26,24 @@ import {
|
|
|
25
26
|
import { useUITranslation } from '@vertesia/ui/i18n';
|
|
26
27
|
import { NavLink } from '@vertesia/ui/router';
|
|
27
28
|
import { useUserSession } from '@vertesia/ui/session';
|
|
28
|
-
import { JSONDisplay,
|
|
29
|
-
import { AlertTriangle, Copy, Download, FileSearch, SquarePen } from 'lucide-react';
|
|
30
|
-
import { memo, type RefObject, useEffect, useRef, useState } from 'react';
|
|
29
|
+
import { JSONDisplay, Progress } from '@vertesia/ui/widgets';
|
|
30
|
+
import { AlertTriangle, Copy, Download, FileSearch, ScanSearch, SquarePen } from 'lucide-react';
|
|
31
|
+
import { memo, type RefObject, useEffect, useMemo, useRef, useState } from 'react';
|
|
32
|
+
import {
|
|
33
|
+
type UniversalDocumentConverter,
|
|
34
|
+
type UniversalDocumentSource,
|
|
35
|
+
UniversalDocumentViewer,
|
|
36
|
+
} from '../../../document-viewer/UniversalDocumentViewer.js';
|
|
31
37
|
import { MagicPdfView } from '../../../magic-pdf';
|
|
38
|
+
import {
|
|
39
|
+
GroundedExtractionView,
|
|
40
|
+
useGroundedExtractionAvailable,
|
|
41
|
+
useGroundedSummary,
|
|
42
|
+
} from '../../../magic-pdf/GroundedExtractionView.js';
|
|
32
43
|
import { AudioPanel, ImagePanel, VideoPanel } from '../../../media-viewer';
|
|
33
|
-
import { SimplePdfViewer } from '../../../pdf-viewer';
|
|
34
44
|
import { SecureButton } from '../../../permissions/SecureButton.js';
|
|
35
45
|
import { getWorkflowStatusColor, getWorkflowStatusName, isPreviewableAsPdf } from '../../../utils/index.js';
|
|
46
|
+
import { resolveTypeCached } from '../../types/typeCatalogCache.js';
|
|
36
47
|
import { PropertiesEditorModal } from './PropertiesEditorModal';
|
|
37
48
|
import { TextEditorPanel } from './TextEditorPanel.js';
|
|
38
49
|
import { useObjectText, useOfficePdfConversion, usePdfProcessingStatus } from './useContentPanelHooks.js';
|
|
@@ -59,11 +70,12 @@ interface TextPanelProps {
|
|
|
59
70
|
}
|
|
60
71
|
|
|
61
72
|
interface OfficePdfPreviewPanelProps {
|
|
73
|
+
object: ContentObject;
|
|
62
74
|
pdfRendition?: { content?: { source?: string } };
|
|
63
75
|
officePdfUrl?: string;
|
|
76
|
+
converters: UniversalDocumentConverter[];
|
|
64
77
|
officePdfConverting: boolean;
|
|
65
78
|
officePdfError?: string;
|
|
66
|
-
onConvert: () => void;
|
|
67
79
|
}
|
|
68
80
|
|
|
69
81
|
interface OfficePdfActionsProps {
|
|
@@ -230,6 +242,7 @@ function PropertiesPanel({
|
|
|
230
242
|
const { t } = useUITranslation();
|
|
231
243
|
const [viewCode, setViewCode] = useState(false);
|
|
232
244
|
const [isPropertiesModalOpen, setPropertiesModalOpen] = useState(false);
|
|
245
|
+
const groundedSummary = useGroundedSummary(object.id);
|
|
233
246
|
|
|
234
247
|
const handleOpenPropertiesModal = () => {
|
|
235
248
|
setPropertiesModalOpen(true);
|
|
@@ -247,7 +260,7 @@ function PropertiesPanel({
|
|
|
247
260
|
<Button
|
|
248
261
|
variant={`${viewCode ? 'ghost' : 'primary'}`}
|
|
249
262
|
size="sm"
|
|
250
|
-
|
|
263
|
+
title={t('store.previewProperties')}
|
|
251
264
|
onClick={() => setViewCode(!viewCode)}
|
|
252
265
|
>
|
|
253
266
|
Properties
|
|
@@ -255,7 +268,7 @@ function PropertiesPanel({
|
|
|
255
268
|
<Button
|
|
256
269
|
variant={`${viewCode ? 'primary' : 'ghost'}`}
|
|
257
270
|
size="sm"
|
|
258
|
-
|
|
271
|
+
title={t('store.viewInJsonFormat')}
|
|
259
272
|
onClick={() => setViewCode(!viewCode)}
|
|
260
273
|
>
|
|
261
274
|
JSON
|
|
@@ -289,6 +302,26 @@ function PropertiesPanel({
|
|
|
289
302
|
</div>
|
|
290
303
|
</div>
|
|
291
304
|
|
|
305
|
+
{groundedSummary && object.properties && (
|
|
306
|
+
<div className="flex items-center gap-2 px-2 pb-2">
|
|
307
|
+
{typeof groundedSummary.confidence === 'number' && (
|
|
308
|
+
<Badge
|
|
309
|
+
variant={groundedSummary.confidence >= 0.95 ? 'success' : 'attention'}
|
|
310
|
+
title={t('grounded.confidenceHint')}
|
|
311
|
+
>
|
|
312
|
+
{t('grounded.confidence', {
|
|
313
|
+
percent: Math.floor(groundedSummary.confidence * 100),
|
|
314
|
+
})}
|
|
315
|
+
</Badge>
|
|
316
|
+
)}
|
|
317
|
+
<Badge variant={groundedSummary.verified === groundedSummary.total ? 'success' : 'attention'}>
|
|
318
|
+
{t('grounded.verifiedOf', {
|
|
319
|
+
verified: groundedSummary.verified,
|
|
320
|
+
total: groundedSummary.total,
|
|
321
|
+
})}
|
|
322
|
+
</Badge>
|
|
323
|
+
</div>
|
|
324
|
+
)}
|
|
292
325
|
{object.properties ? (
|
|
293
326
|
<div className="flex-1 min-h-0 px-2">
|
|
294
327
|
<JSONDisplay value={object.properties} viewCode={viewCode} />
|
|
@@ -309,17 +342,52 @@ function PropertiesPanel({
|
|
|
309
342
|
);
|
|
310
343
|
}
|
|
311
344
|
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
handleCopyContent,
|
|
316
|
-
refetch,
|
|
317
|
-
}: {
|
|
345
|
+
type IntakeDefaultView = NonNullable<NonNullable<ContentObjectTypeItem['intake']>['default_view']>;
|
|
346
|
+
|
|
347
|
+
interface DataPanelProps {
|
|
318
348
|
object: ContentObject;
|
|
319
349
|
loadText: boolean;
|
|
320
350
|
handleCopyContent: (content: string, type: 'text' | 'properties') => Promise<void>;
|
|
321
351
|
refetch?: () => Promise<unknown>;
|
|
322
|
-
}
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Resolves the object's content-type intake policy BEFORE the initial panel is chosen so
|
|
356
|
+
* `default_view` can drive it. Renders a spinner until the type is resolved — never the
|
|
357
|
+
* MIME-guessed panel first (no guess-then-flip). Objects without a type render immediately.
|
|
358
|
+
*/
|
|
359
|
+
function DataPanel(props: DataPanelProps) {
|
|
360
|
+
const { client } = useUserSession();
|
|
361
|
+
const typeRef = props.object.type;
|
|
362
|
+
const typeId = typeRef?.id;
|
|
363
|
+
// Fast path: single-object reads carry the display hint on the API-enriched type ref.
|
|
364
|
+
const refView = typeRef?.default_view;
|
|
365
|
+
// Fallback (list-fed contexts, older servers): session-cached catalog lookup.
|
|
366
|
+
// null = resolved with no default view; undefined = not resolved yet.
|
|
367
|
+
const { data: fetchedView } = useFetch<IntakeDefaultView | null>(async () => {
|
|
368
|
+
if (!typeId || refView) return null;
|
|
369
|
+
const type = await resolveTypeCached(client, typeId);
|
|
370
|
+
return type?.intake?.default_view ?? null;
|
|
371
|
+
}, [typeId, refView]);
|
|
372
|
+
const defaultView = refView ?? fetchedView;
|
|
373
|
+
if (typeId && !refView && fetchedView === undefined) {
|
|
374
|
+
return (
|
|
375
|
+
<div className="flex h-full items-center justify-center">
|
|
376
|
+
<Spinner size="lg" />
|
|
377
|
+
</div>
|
|
378
|
+
);
|
|
379
|
+
}
|
|
380
|
+
return <DataPanelContent {...props} defaultView={defaultView ?? undefined} />;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
function DataPanelContent({
|
|
384
|
+
object,
|
|
385
|
+
loadText,
|
|
386
|
+
handleCopyContent,
|
|
387
|
+
refetch,
|
|
388
|
+
defaultView,
|
|
389
|
+
}: DataPanelProps & { defaultView?: IntakeDefaultView }) {
|
|
390
|
+
const { client } = useUserSession();
|
|
323
391
|
const { t } = useUITranslation();
|
|
324
392
|
const isImage = object?.metadata?.type === ContentNature.Image;
|
|
325
393
|
const isVideo = object?.metadata?.type === ContentNature.Video;
|
|
@@ -333,14 +401,32 @@ function DataPanel({
|
|
|
333
401
|
const metadata = object.metadata as DocumentMetadata;
|
|
334
402
|
const pdfRendition = metadata?.renditions?.find((r) => r.name === PDF_RENDITION_NAME);
|
|
335
403
|
|
|
336
|
-
// Determine initial panel view
|
|
404
|
+
// Determine initial panel view: the type's default_view wins when it applies to this
|
|
405
|
+
// object; otherwise fall back to the nature/MIME heuristics.
|
|
337
406
|
const getInitialView = (): PanelView => {
|
|
407
|
+
switch (defaultView) {
|
|
408
|
+
case 'text':
|
|
409
|
+
return PanelView.Text;
|
|
410
|
+
case 'pdf':
|
|
411
|
+
if (isPdf || isPreviewableAsPdfDoc || pdfRendition) return PanelView.Pdf;
|
|
412
|
+
break;
|
|
413
|
+
case 'image':
|
|
414
|
+
if (isImage) return PanelView.Image;
|
|
415
|
+
break;
|
|
416
|
+
case 'properties':
|
|
417
|
+
// Properties live in the right-hand panel which is always visible; the text
|
|
418
|
+
// panel shows the rendered property card for extraction-only types.
|
|
419
|
+
return PanelView.Text;
|
|
420
|
+
default:
|
|
421
|
+
break;
|
|
422
|
+
}
|
|
338
423
|
if (isVideo) return PanelView.Video;
|
|
339
424
|
if (isAudio) return PanelView.Audio;
|
|
340
425
|
if (isImage) return PanelView.Image;
|
|
341
426
|
return PanelView.Text;
|
|
342
427
|
};
|
|
343
428
|
|
|
429
|
+
const groundedAvailable = useGroundedExtractionAvailable(object.id);
|
|
344
430
|
const [currentPanel, setCurrentPanel] = useState<PanelView>(getInitialView());
|
|
345
431
|
const [hasVisitedPdfPanel, setHasVisitedPdfPanel] = useState(currentPanel === PanelView.Pdf);
|
|
346
432
|
|
|
@@ -380,7 +466,6 @@ function DataPanel({
|
|
|
380
466
|
const {
|
|
381
467
|
progress: pdfProgress,
|
|
382
468
|
status: pdfStatus,
|
|
383
|
-
outputFormat: pdfOutputFormat,
|
|
384
469
|
isComplete: processingComplete,
|
|
385
470
|
} = usePdfProcessingStatus(object.id, shouldPollProgress);
|
|
386
471
|
|
|
@@ -392,6 +477,38 @@ function DataPanel({
|
|
|
392
477
|
triggerConversion: triggerOfficePdfConversion,
|
|
393
478
|
} = useOfficePdfConversion(object.id, isPreviewableAsPdfDoc);
|
|
394
479
|
|
|
480
|
+
const officePdfConverters = useMemo<UniversalDocumentConverter[]>(
|
|
481
|
+
() => [
|
|
482
|
+
{
|
|
483
|
+
id: 'office-pdf-rendition',
|
|
484
|
+
target: 'pdf',
|
|
485
|
+
canConvert: ({ contentType, extension }) =>
|
|
486
|
+
isPreviewableAsPdfDoc ||
|
|
487
|
+
(contentType ? isPreviewableAsPdf(contentType) : false) ||
|
|
488
|
+
['doc', 'docx', 'ppt', 'pptx'].includes(extension),
|
|
489
|
+
convert: async () => {
|
|
490
|
+
const response = await client.objects.getRendition(object.id, {
|
|
491
|
+
format: MarkdownRenditionFormat.pdf,
|
|
492
|
+
generate_if_missing: true,
|
|
493
|
+
sign_url: true,
|
|
494
|
+
block_on_generation: true,
|
|
495
|
+
});
|
|
496
|
+
|
|
497
|
+
if (response.status === 'found' && response.renditions?.length) {
|
|
498
|
+
return {
|
|
499
|
+
url: response.renditions[0],
|
|
500
|
+
contentType: 'application/pdf',
|
|
501
|
+
fileName: `${object.name || 'document'}.pdf`,
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
return null;
|
|
506
|
+
},
|
|
507
|
+
},
|
|
508
|
+
],
|
|
509
|
+
[client, isPreviewableAsPdfDoc, object.id, object.name],
|
|
510
|
+
);
|
|
511
|
+
|
|
395
512
|
// Load text once processing completes without triggering a full object refetch
|
|
396
513
|
// (which would flash the page-level loading spinner).
|
|
397
514
|
useEffect(() => {
|
|
@@ -422,7 +539,7 @@ function DataPanel({
|
|
|
422
539
|
<Button
|
|
423
540
|
variant={currentPanel === PanelView.Image ? 'primary' : 'ghost'}
|
|
424
541
|
size="sm"
|
|
425
|
-
|
|
542
|
+
title={t('store.viewImage')}
|
|
426
543
|
onClick={() => setCurrentPanel(PanelView.Image)}
|
|
427
544
|
>
|
|
428
545
|
Image
|
|
@@ -432,7 +549,7 @@ function DataPanel({
|
|
|
432
549
|
<Button
|
|
433
550
|
variant={currentPanel === PanelView.Video ? 'primary' : 'ghost'}
|
|
434
551
|
size="sm"
|
|
435
|
-
|
|
552
|
+
title={t('store.viewVideo')}
|
|
436
553
|
onClick={() => setCurrentPanel(PanelView.Video)}
|
|
437
554
|
>
|
|
438
555
|
Video
|
|
@@ -442,7 +559,7 @@ function DataPanel({
|
|
|
442
559
|
<Button
|
|
443
560
|
variant={currentPanel === PanelView.Audio ? 'primary' : 'ghost'}
|
|
444
561
|
size="sm"
|
|
445
|
-
|
|
562
|
+
title={t('store.viewAudio')}
|
|
446
563
|
onClick={() => setCurrentPanel(PanelView.Audio)}
|
|
447
564
|
>
|
|
448
565
|
Audio
|
|
@@ -452,7 +569,7 @@ function DataPanel({
|
|
|
452
569
|
<Button
|
|
453
570
|
variant={currentPanel === PanelView.Transcript ? 'primary' : 'ghost'}
|
|
454
571
|
size="sm"
|
|
455
|
-
|
|
572
|
+
title={t('store.viewTranscript')}
|
|
456
573
|
onClick={() => setCurrentPanel(PanelView.Transcript)}
|
|
457
574
|
>
|
|
458
575
|
Transcript
|
|
@@ -461,7 +578,7 @@ function DataPanel({
|
|
|
461
578
|
<Button
|
|
462
579
|
variant={currentPanel === PanelView.Text ? 'primary' : 'ghost'}
|
|
463
580
|
size="sm"
|
|
464
|
-
|
|
581
|
+
title={t('store.viewText')}
|
|
465
582
|
onClick={() => setCurrentPanel(PanelView.Text)}
|
|
466
583
|
>
|
|
467
584
|
Text
|
|
@@ -470,7 +587,7 @@ function DataPanel({
|
|
|
470
587
|
<Button
|
|
471
588
|
variant={currentPanel === PanelView.Pdf ? 'primary' : 'ghost'}
|
|
472
589
|
size="sm"
|
|
473
|
-
|
|
590
|
+
title={t('store.viewPdf')}
|
|
474
591
|
onClick={() => setCurrentPanel(PanelView.Pdf)}
|
|
475
592
|
>
|
|
476
593
|
PDF
|
|
@@ -480,7 +597,7 @@ function DataPanel({
|
|
|
480
597
|
<Button
|
|
481
598
|
variant={currentPanel === PanelView.Pdf ? 'primary' : 'ghost'}
|
|
482
599
|
size="sm"
|
|
483
|
-
|
|
600
|
+
title={t('store.viewAsPdf')}
|
|
484
601
|
onClick={() => {
|
|
485
602
|
setCurrentPanel(PanelView.Pdf);
|
|
486
603
|
if (!pdfRendition && !officePdfUrl && !officePdfConverting) {
|
|
@@ -493,7 +610,10 @@ function DataPanel({
|
|
|
493
610
|
</Button>
|
|
494
611
|
)}
|
|
495
612
|
</div>
|
|
496
|
-
<
|
|
613
|
+
<div className="flex items-center gap-1">
|
|
614
|
+
<PdfActions object={object} />
|
|
615
|
+
<GroundedActions objectId={object.id} available={groundedAvailable} />
|
|
616
|
+
</div>
|
|
497
617
|
</div>
|
|
498
618
|
{currentPanel === PanelView.Text && !showProcessingPanel && !isEditing && (
|
|
499
619
|
<TextActions
|
|
@@ -539,17 +659,18 @@ function DataPanel({
|
|
|
539
659
|
{isPreviewableAsPdfDoc && keepPdfPreviewMounted && (
|
|
540
660
|
<div className={getPanelVisibility(showPdfPreviewPanel)}>
|
|
541
661
|
<OfficePdfPreviewPanel
|
|
662
|
+
object={object}
|
|
542
663
|
pdfRendition={pdfRendition}
|
|
543
664
|
officePdfUrl={officePdfUrl}
|
|
665
|
+
converters={officePdfConverters}
|
|
544
666
|
officePdfConverting={officePdfConverting}
|
|
545
667
|
officePdfError={officePdfError}
|
|
546
|
-
onConvert={triggerOfficePdfConversion}
|
|
547
668
|
/>
|
|
548
669
|
</div>
|
|
549
670
|
)}
|
|
550
671
|
{showPdfProcessingPanel && (
|
|
551
672
|
<div className={getPanelVisibility(true)}>
|
|
552
|
-
<PdfProcessingPanel progress={pdfProgress} status={pdfStatus}
|
|
673
|
+
<PdfProcessingPanel progress={pdfProgress} status={pdfStatus} />
|
|
553
674
|
</div>
|
|
554
675
|
)}
|
|
555
676
|
{currentPanel === PanelView.Text && !showProcessingPanel && !isEditing && isLoadingText && (
|
|
@@ -599,9 +720,6 @@ function TextActions({ object, text, fullText, handleCopyContent, onToggleEdit,
|
|
|
599
720
|
|
|
600
721
|
const isMarkdown = content?.type && content.type === 'text/markdown';
|
|
601
722
|
|
|
602
|
-
// Get content processor type for file extension detection
|
|
603
|
-
const contentProcessorType = getContentProcessorType(object);
|
|
604
|
-
|
|
605
723
|
const handleExportDocument = async (format: MarkdownRenditionFormat, useDefaultTemplate?: boolean) => {
|
|
606
724
|
// Prevent multiple concurrent exports
|
|
607
725
|
if (isDownloading) return;
|
|
@@ -636,10 +754,10 @@ function TextActions({ object, text, fullText, handleCopyContent, onToggleEdit,
|
|
|
636
754
|
// Determine file extension based on content processor type
|
|
637
755
|
let ext = 'txt';
|
|
638
756
|
let mimeType = 'text/plain';
|
|
639
|
-
if (
|
|
757
|
+
if (content?.type === 'application/xml' || content?.type === 'text/xml') {
|
|
640
758
|
ext = 'xml';
|
|
641
759
|
mimeType = 'text/xml';
|
|
642
|
-
} else if (
|
|
760
|
+
} else if (isMarkdown) {
|
|
643
761
|
ext = 'md';
|
|
644
762
|
mimeType = 'text/markdown';
|
|
645
763
|
}
|
|
@@ -687,7 +805,7 @@ function TextActions({ object, text, fullText, handleCopyContent, onToggleEdit,
|
|
|
687
805
|
</>
|
|
688
806
|
)}
|
|
689
807
|
{isDownloading ? (
|
|
690
|
-
<Button variant="ghost" size="sm" disabled className="flex items-center gap-2"
|
|
808
|
+
<Button variant="ghost" size="sm" disabled className="flex items-center gap-2" title="download">
|
|
691
809
|
<Spinner size="sm" />
|
|
692
810
|
</Button>
|
|
693
811
|
) : (
|
|
@@ -698,7 +816,7 @@ function TextActions({ object, text, fullText, handleCopyContent, onToggleEdit,
|
|
|
698
816
|
size="sm"
|
|
699
817
|
disabled={!text}
|
|
700
818
|
className="flex items-center gap-2"
|
|
701
|
-
|
|
819
|
+
title="download"
|
|
702
820
|
>
|
|
703
821
|
<Download className="size-4" />
|
|
704
822
|
</Button>
|
|
@@ -743,18 +861,24 @@ function TextActions({ object, text, fullText, handleCopyContent, onToggleEdit,
|
|
|
743
861
|
|
|
744
862
|
const TextPanel = memo(({ object, text, isTextCropped, textContainerRef }: TextPanelProps) => {
|
|
745
863
|
const { t } = useUITranslation();
|
|
746
|
-
const content = object.content;
|
|
747
864
|
const isCreatedOrProcessing = isCreatedOrProcessingStatus(object?.status);
|
|
748
|
-
|
|
749
|
-
// Check content processor type for XML
|
|
865
|
+
const content = object.content;
|
|
750
866
|
const contentProcessorType = getContentProcessorType(object);
|
|
751
|
-
const isXml = contentProcessorType === 'xml';
|
|
867
|
+
const isXml = contentProcessorType === 'xml' || content?.type === 'application/xml' || content?.type === 'text/xml';
|
|
752
868
|
|
|
753
869
|
// Check if content type is markdown or plain text
|
|
754
870
|
const isMarkdownOrText = content?.type && (content.type === 'text/markdown' || content.type === 'text/plain');
|
|
755
871
|
|
|
756
872
|
// Render as markdown if it's markdown/text type OR if text looks like markdown (but not if XML)
|
|
757
873
|
const shouldRenderAsMarkdown = !isXml && (isMarkdownOrText || looksLikeMarkdown(text));
|
|
874
|
+
const source: UniversalDocumentSource = {
|
|
875
|
+
id: object.id,
|
|
876
|
+
title: object.name,
|
|
877
|
+
fileName: object.content?.name || object.name,
|
|
878
|
+
contentType: isXml ? 'text/xml' : shouldRenderAsMarkdown ? 'text/markdown' : object.content?.type,
|
|
879
|
+
content: text,
|
|
880
|
+
sourcePath: object.content?.source,
|
|
881
|
+
};
|
|
758
882
|
|
|
759
883
|
return text ? (
|
|
760
884
|
<>
|
|
@@ -767,17 +891,12 @@ const TextPanel = memo(({ object, text, isTextCropped, textContainerRef }: TextP
|
|
|
767
891
|
</div>
|
|
768
892
|
)}
|
|
769
893
|
<div className={`max-w-7xl px-2 h-full overflow-auto`} ref={textContainerRef}>
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
<MarkdownRenderer components={createMarkdownComponents()}>{text}</MarkdownRenderer>
|
|
777
|
-
</div>
|
|
778
|
-
) : (
|
|
779
|
-
<pre className="text-wrap bg-muted text-muted p-2">{text}</pre>
|
|
780
|
-
)}
|
|
894
|
+
<UniversalDocumentViewer
|
|
895
|
+
source={source}
|
|
896
|
+
className="h-full"
|
|
897
|
+
bodyClassName="overflow-auto"
|
|
898
|
+
markdownComponents={createMarkdownComponents()}
|
|
899
|
+
/>
|
|
781
900
|
</div>
|
|
782
901
|
</>
|
|
783
902
|
) : (
|
|
@@ -853,9 +972,8 @@ function TranscriptPanel({
|
|
|
853
972
|
function PdfActions({ object }: { object: ContentObject }) {
|
|
854
973
|
const [isPdfPreviewOpen, setPdfPreviewOpen] = useState(false);
|
|
855
974
|
|
|
856
|
-
// Check if PDF has been processed (content_processor.type is xml or markdown)
|
|
857
975
|
const contentProcessorType = getContentProcessorType(object);
|
|
858
|
-
const hasPdfAnalysis = contentProcessorType === '
|
|
976
|
+
const hasPdfAnalysis = contentProcessorType === 'markdown';
|
|
859
977
|
|
|
860
978
|
if (!hasPdfAnalysis) return null;
|
|
861
979
|
|
|
@@ -873,6 +991,32 @@ function PdfActions({ object }: { object: ContentObject }) {
|
|
|
873
991
|
);
|
|
874
992
|
}
|
|
875
993
|
|
|
994
|
+
function GroundedActions({ objectId, available }: { objectId: string; available: boolean }) {
|
|
995
|
+
const { t } = useUITranslation();
|
|
996
|
+
const [isGroundedOpen, setGroundedOpen] = useState(false);
|
|
997
|
+
|
|
998
|
+
if (!available) return null;
|
|
999
|
+
|
|
1000
|
+
return (
|
|
1001
|
+
<>
|
|
1002
|
+
<Button
|
|
1003
|
+
variant="ghost"
|
|
1004
|
+
size="sm"
|
|
1005
|
+
onClick={() => setGroundedOpen(true)}
|
|
1006
|
+
title={t('grounded.title')}
|
|
1007
|
+
aria-label={t('grounded.title')}
|
|
1008
|
+
>
|
|
1009
|
+
<ScanSearch className="size-4" />
|
|
1010
|
+
</Button>
|
|
1011
|
+
{isGroundedOpen && (
|
|
1012
|
+
<Portal>
|
|
1013
|
+
<GroundedExtractionView objectId={objectId} onClose={() => setGroundedOpen(false)} />
|
|
1014
|
+
</Portal>
|
|
1015
|
+
)}
|
|
1016
|
+
</>
|
|
1017
|
+
);
|
|
1018
|
+
}
|
|
1019
|
+
|
|
876
1020
|
function OfficePdfActions({ object, pdfRendition, officePdfUrl }: OfficePdfActionsProps) {
|
|
877
1021
|
const { client } = useUserSession();
|
|
878
1022
|
const toast = useToast();
|
|
@@ -921,9 +1065,17 @@ function OfficePdfActions({ object, pdfRendition, officePdfUrl }: OfficePdfActio
|
|
|
921
1065
|
}
|
|
922
1066
|
|
|
923
1067
|
function PdfPreviewPanel({ object }: { object: ContentObject }) {
|
|
1068
|
+
const source: UniversalDocumentSource = {
|
|
1069
|
+
id: object.id,
|
|
1070
|
+
title: object.name,
|
|
1071
|
+
fileName: object.content?.name || object.name,
|
|
1072
|
+
contentType: object.content?.type,
|
|
1073
|
+
sourcePath: object.content?.source,
|
|
1074
|
+
};
|
|
1075
|
+
|
|
924
1076
|
return (
|
|
925
1077
|
<div className="h-full">
|
|
926
|
-
<
|
|
1078
|
+
<UniversalDocumentViewer source={source} className="h-full" />
|
|
927
1079
|
</div>
|
|
928
1080
|
);
|
|
929
1081
|
}
|
|
@@ -933,11 +1085,12 @@ function PdfPreviewPanel({ object }: { object: ContentObject }) {
|
|
|
933
1085
|
* Handles the various states: converting, error, showing PDF.
|
|
934
1086
|
*/
|
|
935
1087
|
function OfficePdfPreviewPanel({
|
|
1088
|
+
object,
|
|
936
1089
|
pdfRendition,
|
|
937
1090
|
officePdfUrl,
|
|
1091
|
+
converters,
|
|
938
1092
|
officePdfConverting,
|
|
939
1093
|
officePdfError,
|
|
940
|
-
onConvert,
|
|
941
1094
|
}: OfficePdfPreviewPanelProps) {
|
|
942
1095
|
const { t } = useUITranslation();
|
|
943
1096
|
if (officePdfConverting) {
|
|
@@ -959,24 +1112,48 @@ function OfficePdfPreviewPanel({
|
|
|
959
1112
|
}
|
|
960
1113
|
|
|
961
1114
|
if (pdfRendition?.content?.source) {
|
|
1115
|
+
const source: UniversalDocumentSource = {
|
|
1116
|
+
id: object.id,
|
|
1117
|
+
title: object.name,
|
|
1118
|
+
fileName: `${object.name || 'document'}.pdf`,
|
|
1119
|
+
contentType: 'application/pdf',
|
|
1120
|
+
sourcePath: pdfRendition.content.source,
|
|
1121
|
+
};
|
|
1122
|
+
|
|
962
1123
|
return (
|
|
963
1124
|
<div className="h-full">
|
|
964
|
-
<
|
|
1125
|
+
<UniversalDocumentViewer source={source} className="h-full" />
|
|
965
1126
|
</div>
|
|
966
1127
|
);
|
|
967
1128
|
}
|
|
968
1129
|
|
|
969
1130
|
if (officePdfUrl) {
|
|
1131
|
+
const source: UniversalDocumentSource = {
|
|
1132
|
+
id: object.id,
|
|
1133
|
+
title: object.name,
|
|
1134
|
+
fileName: `${object.name || 'document'}.pdf`,
|
|
1135
|
+
contentType: 'application/pdf',
|
|
1136
|
+
url: officePdfUrl,
|
|
1137
|
+
};
|
|
1138
|
+
|
|
970
1139
|
return (
|
|
971
1140
|
<div className="h-full">
|
|
972
|
-
<
|
|
1141
|
+
<UniversalDocumentViewer source={source} className="h-full" />
|
|
973
1142
|
</div>
|
|
974
1143
|
);
|
|
975
1144
|
}
|
|
976
1145
|
|
|
1146
|
+
const source: UniversalDocumentSource = {
|
|
1147
|
+
id: object.id,
|
|
1148
|
+
title: object.name,
|
|
1149
|
+
fileName: object.content?.name || object.name,
|
|
1150
|
+
contentType: object.content?.type,
|
|
1151
|
+
sourcePath: object.content?.source,
|
|
1152
|
+
};
|
|
1153
|
+
|
|
977
1154
|
return (
|
|
978
|
-
<div className="
|
|
979
|
-
<
|
|
1155
|
+
<div className="h-full">
|
|
1156
|
+
<UniversalDocumentViewer source={source} converters={converters} className="h-full" />
|
|
980
1157
|
</div>
|
|
981
1158
|
);
|
|
982
1159
|
}
|
|
@@ -984,18 +1161,14 @@ function OfficePdfPreviewPanel({
|
|
|
984
1161
|
function PdfProcessingPanel({
|
|
985
1162
|
progress,
|
|
986
1163
|
status,
|
|
987
|
-
outputFormat,
|
|
988
1164
|
}: {
|
|
989
1165
|
progress?: DocAnalyzerProgress;
|
|
990
1166
|
status?: WorkflowExecutionStatus;
|
|
991
|
-
outputFormat?: DocProcessorOutputFormat;
|
|
992
1167
|
}) {
|
|
993
1168
|
const { t } = useUITranslation();
|
|
994
1169
|
const statusColor = getWorkflowStatusColor(status);
|
|
995
1170
|
const statusName = getWorkflowStatusName(status);
|
|
996
|
-
|
|
997
|
-
// Show detailed progress (tables, images, visuals) for XML processing
|
|
998
|
-
const isXmlProcessing = outputFormat === 'xml';
|
|
1171
|
+
const isGroundedExtraction = progress?.phase === 'grounded_extraction';
|
|
999
1172
|
|
|
1000
1173
|
// Ensure percent is a valid number (handle undefined and NaN from division by zero)
|
|
1001
1174
|
const percent = progress?.percent != null && !Number.isNaN(progress.percent) ? progress.percent : 0;
|
|
@@ -1006,14 +1179,14 @@ function PdfProcessingPanel({
|
|
|
1006
1179
|
<div className="space-y-2">
|
|
1007
1180
|
<div className="flex flex-col gap-1">
|
|
1008
1181
|
<ProgressLine
|
|
1009
|
-
name={
|
|
1182
|
+
name={isGroundedExtraction ? 'Prepare Evidence' : 'Analyze Page'}
|
|
1010
1183
|
progress={progress.pages}
|
|
1011
1184
|
/>
|
|
1012
|
-
{
|
|
1185
|
+
{isGroundedExtraction && (
|
|
1013
1186
|
<>
|
|
1014
|
-
<ProgressLine name="
|
|
1015
|
-
<ProgressLine name="
|
|
1016
|
-
<ProgressLine name="
|
|
1187
|
+
<ProgressLine name="Run OCR" progress={progress.images} />
|
|
1188
|
+
<ProgressLine name="Extract Grounded Data" progress={progress.tables} />
|
|
1189
|
+
<ProgressLine name="Review and Annotate" progress={progress.visuals} />
|
|
1017
1190
|
</>
|
|
1018
1191
|
)}
|
|
1019
1192
|
</div>
|
|
@@ -141,7 +141,7 @@ export function VectorSearchWidget({ onChange, isLoading, refresh, searchTypes }
|
|
|
141
141
|
<Button
|
|
142
142
|
variant="ghost"
|
|
143
143
|
onClick={() => setShowSettings(true)}
|
|
144
|
-
|
|
144
|
+
title={t('store.semanticSearchSettings')}
|
|
145
145
|
className="ms-1"
|
|
146
146
|
>
|
|
147
147
|
<Settings size={18} />
|
|
@@ -194,7 +194,7 @@ export function VectorSearchWidget({ onChange, isLoading, refresh, searchTypes }
|
|
|
194
194
|
isLoading={isLoading}
|
|
195
195
|
onClick={fireSearch}
|
|
196
196
|
isDisabled={!isReady}
|
|
197
|
-
|
|
197
|
+
title={t('store.semanticSearch')}
|
|
198
198
|
>
|
|
199
199
|
{t('store.search')}
|
|
200
200
|
</Button>
|