@vertesia/ui 1.5.0-dev.20260725.083715Z → 1.5.0-dev.20260806.125520Z
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/ComboBox.d.ts.map +1 -1
- package/lib/core/components/ComboBox.js +4 -4
- package/lib/core/components/ComboBox.js.map +1 -1
- package/lib/core/components/FileUpload.js.map +1 -1
- package/lib/core/components/MenuList.d.ts +2 -1
- package/lib/core/components/MenuList.d.ts.map +1 -1
- package/lib/core/components/TagsInput.js +1 -1
- package/lib/core/components/popup/PopupController.d.ts.map +1 -1
- package/lib/core/components/popup/PopupController.js.map +1 -1
- package/lib/core/components/popup/position.js.map +1 -1
- package/lib/core/components/popup/utils.js.map +1 -1
- package/lib/core/components/shadcn/LanguageSwitcher.js.map +1 -1
- package/lib/core/components/shadcn/MessageBox.js.map +1 -1
- package/lib/core/components/shadcn/Panel.js +1 -1
- package/lib/core/components/shadcn/badge.d.ts +2 -2
- package/lib/core/components/shadcn/button.d.ts +2 -2
- package/lib/core/components/shadcn/button.js +1 -1
- package/lib/core/components/shadcn/command.d.ts +4 -4
- package/lib/core/components/shadcn/command.d.ts.map +1 -1
- package/lib/core/components/shadcn/filters/DynamicLabel.js +1 -1
- package/lib/core/components/shadcn/filters/comboBox/DateCombobox.d.ts.map +1 -1
- package/lib/core/components/shadcn/filters/comboBox/DateCombobox.js +1 -1
- package/lib/core/components/shadcn/filters/comboBox/SelectCombobox.d.ts.map +1 -1
- package/lib/core/components/shadcn/filters/comboBox/SelectCombobox.js +1 -1
- package/lib/core/components/shadcn/filters/comboBox/StringListCombobox.d.ts.map +1 -1
- package/lib/core/components/shadcn/filters/comboBox/TextCombobox.d.ts.map +1 -1
- package/lib/core/components/shadcn/filters/filter/dateFilter.js +1 -1
- package/lib/core/components/shadcn/filters/filterBar.d.ts.map +1 -1
- package/lib/core/components/shadcn/filters/filters.js.map +1 -1
- package/lib/core/components/shadcn/input.d.ts +2 -2
- package/lib/core/components/shadcn/modal/dialog.d.ts.map +1 -1
- package/lib/core/components/shadcn/popover.d.ts +1 -1
- package/lib/core/components/shadcn/popover.d.ts.map +1 -1
- package/lib/core/components/shadcn/popover.js.map +1 -1
- package/lib/core/components/shadcn/radioGroup.d.ts.map +1 -1
- package/lib/core/components/shadcn/selectBox.js +1 -1
- package/lib/core/components/shadcn/tabs.d.ts.map +1 -1
- package/lib/core/components/shadcn/tabs.js +1 -1
- package/lib/core/components/shadcn/text.d.ts +2 -2
- package/lib/core/components/shadcn/theme/ThemeSwitcher.js.map +1 -1
- package/lib/core/components/toast/ToastProvider.js +1 -1
- package/lib/core/hooks/CompositeState.d.ts +1 -1
- package/lib/core/hooks/CompositeState.d.ts.map +1 -1
- package/lib/core/hooks/CompositeState.js.map +1 -1
- package/lib/core/hooks/SharedState.d.ts.map +1 -1
- package/lib/core/hooks/useFetch.d.ts.map +1 -1
- package/lib/core/hooks/useFetch.js +2 -1
- package/lib/core/hooks/useFetch.js.map +1 -1
- package/lib/core/hooks/useFlag.d.ts.map +1 -1
- package/lib/core/hooks/useIntersectionObserver.js.map +1 -1
- package/lib/core/hooks/useSafeLayoutEffect.d.ts +2 -2
- package/lib/core/hooks/useSafeLayoutEffect.d.ts.map +1 -1
- package/lib/core/hooks/useScrollableSearch.d.ts +1 -1
- package/lib/core/hooks/useScrollableSearch.d.ts.map +1 -1
- package/lib/core/hooks/useScrollableSearch.js +15 -2
- package/lib/core/hooks/useScrollableSearch.js.map +1 -1
- package/lib/core/hooks/useSharedValue.d.ts.map +1 -1
- package/lib/core/hooks/useSharedValue.js.map +1 -1
- package/lib/core/utils/a11y.d.ts.map +1 -1
- package/lib/env/index.d.ts +4 -0
- package/lib/env/index.d.ts.map +1 -1
- package/lib/env/index.js.map +1 -1
- package/lib/features/agent/PayloadBuilder.d.ts +1 -1
- package/lib/features/agent/PayloadBuilder.d.ts.map +1 -1
- package/lib/features/agent/PayloadBuilder.js.map +1 -1
- package/lib/features/agent/chat/AgentRequestInputOverlay.d.ts +1 -1
- package/lib/features/agent/chat/AgentRequestInputOverlay.d.ts.map +1 -1
- package/lib/features/agent/chat/AgentRequestInputOverlay.js +3 -8
- package/lib/features/agent/chat/AgentRequestInputOverlay.js.map +1 -1
- package/lib/features/agent/chat/ArtifactsTab.js +1 -1
- package/lib/features/agent/chat/AskUserWidget.js +1 -1
- package/lib/features/agent/chat/DocumentEditingActionCard.js +1 -1
- package/lib/features/agent/chat/ModernAgentConversation.d.ts +8 -1
- package/lib/features/agent/chat/ModernAgentConversation.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentConversation.js +79 -20
- package/lib/features/agent/chat/ModernAgentConversation.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.d.ts +2 -1
- package/lib/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.js +25 -10
- package/lib/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AgentMarkdownAnchor.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AgentMarkdownAnchor.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +25 -10
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AttachmentPreview.d.ts +7 -0
- package/lib/features/agent/chat/ModernAgentOutput/AttachmentPreview.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AttachmentPreview.js +40 -3
- package/lib/features/agent/chat/ModernAgentOutput/AttachmentPreview.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/BatchProgressPanel.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/Header.js +2 -2
- package/lib/features/agent/chat/ModernAgentOutput/Header.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageInput.d.ts +2 -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 -2
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/ResourceChip.js +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/SlideInPanel.js +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/StreamingMessage.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/SummaryConversation.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/SummaryConversation.js +8 -0
- package/lib/features/agent/chat/ModernAgentOutput/SummaryConversation.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/ToolCallGroup.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/ToolCallGroup.js +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.d.ts +9 -1
- package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.js +97 -2
- package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/utils.d.ts.map +1 -1
- package/lib/features/agent/chat/SlidingThinkingIndicator.js +1 -1
- package/lib/features/agent/chat/VegaLiteChart.js +1 -1
- package/lib/features/agent/chat/VegaLiteChart.js.map +1 -1
- package/lib/features/agent/chat/hooks/useAgentStream.d.ts.map +1 -1
- package/lib/features/agent/chat/hooks/useAgentStream.js +38 -3
- package/lib/features/agent/chat/hooks/useAgentStream.js.map +1 -1
- package/lib/features/agent/chat/hooks/useFileProcessing.d.ts +8 -1
- package/lib/features/agent/chat/hooks/useFileProcessing.d.ts.map +1 -1
- package/lib/features/agent/chat/hooks/useFileProcessing.js +31 -2
- package/lib/features/agent/chat/hooks/useFileProcessing.js.map +1 -1
- package/lib/features/agent/chat/index.d.ts +1 -1
- package/lib/features/agent/chat/index.d.ts.map +1 -1
- package/lib/features/agent/chat/index.js.map +1 -1
- package/lib/features/agent/chat/useArtifactUrlCache.js.map +1 -1
- package/lib/features/agent/chat/workstreams.d.ts +1 -1
- package/lib/features/facets/AgentRunnerFacetsNav.d.ts.map +1 -1
- package/lib/features/facets/CollectionsFacetsNav.d.ts.map +1 -1
- package/lib/features/facets/DocumentsFacetsNav.d.ts.map +1 -1
- package/lib/features/facets/InteractionsFacetsNav.d.ts.map +1 -1
- package/lib/features/facets/PromptsFacetsNav.d.ts +8 -6
- package/lib/features/facets/PromptsFacetsNav.d.ts.map +1 -1
- package/lib/features/facets/PromptsFacetsNav.js +8 -3
- package/lib/features/facets/PromptsFacetsNav.js.map +1 -1
- package/lib/features/facets/RunsFacetsNav.d.ts.map +1 -1
- package/lib/features/facets/WorkflowExecutionsFacetsNav.d.ts.map +1 -1
- package/lib/features/magic-pdf/GroundedExtractionView.js +1 -1
- package/lib/features/magic-pdf/MagicPdfProvider.d.ts.map +1 -1
- package/lib/features/magic-pdf/MagicPdfProvider.js.map +1 -1
- package/lib/features/oauth/McpConnectionsButton.js +1 -1
- package/lib/features/oauth/OAuthProviderConnectButton.js +1 -1
- package/lib/features/oauth/RemoteMcpConnectionButton.js +1 -1
- package/lib/features/pdf-viewer/PdfPageRenderer.js +1 -1
- package/lib/features/pdf-viewer/PdfPageSlider.js +1 -1
- package/lib/features/permissions/UserPermissionsProvider.d.ts.map +1 -1
- package/lib/features/permissions/UserPermissionsProvider.js.map +1 -1
- package/lib/features/store/collections/CollectionsTable.js +2 -2
- package/lib/features/store/collections/CollectionsTable.js.map +1 -1
- package/lib/features/store/collections/CreateCollection.js +1 -1
- package/lib/features/store/collections/EditCollectionView.js +1 -1
- package/lib/features/store/objects/DocumentQuickFilter.js +1 -1
- package/lib/features/store/objects/DocumentSelectionProvider.d.ts.map +1 -1
- package/lib/features/store/objects/DocumentSelectionProvider.js.map +1 -1
- package/lib/features/store/objects/components/ContentDispositionButton.d.ts +2 -1
- package/lib/features/store/objects/components/ContentDispositionButton.d.ts.map +1 -1
- package/lib/features/store/objects/components/ContentOverview.js +5 -2
- package/lib/features/store/objects/components/ContentOverview.js.map +1 -1
- package/lib/features/store/objects/components/DocumentEditingPanel.js +1 -1
- package/lib/features/store/objects/components/PropertiesEditorModal.js +1 -1
- package/lib/features/store/objects/components/TextEditorPanel.js +1 -1
- package/lib/features/store/objects/components/documentEditingTarget.d.ts.map +1 -1
- package/lib/features/store/objects/components/useContentPanelHooks.d.ts +31 -3
- package/lib/features/store/objects/components/useContentPanelHooks.d.ts.map +1 -1
- package/lib/features/store/objects/layout/DocumentTableColumn.d.ts +1 -1
- package/lib/features/store/objects/layout/DocumentTableColumn.d.ts.map +1 -1
- package/lib/features/store/objects/layout/DocumentTableColumn.js.map +1 -1
- package/lib/features/store/objects/layout/documentLayout.js +1 -1
- package/lib/features/store/objects/layout/renderers.d.ts.map +1 -1
- package/lib/features/store/objects/search/DocumentSearchContext.d.ts +129 -7
- package/lib/features/store/objects/search/DocumentSearchContext.d.ts.map +1 -1
- package/lib/features/store/objects/search/DocumentSearchContext.js.map +1 -1
- package/lib/features/store/objects/selection/ObjectsActionContext.d.ts +2 -2
- package/lib/features/store/objects/selection/ObjectsActionContext.d.ts.map +1 -1
- package/lib/features/store/objects/selection/ObjectsActionContextClass.d.ts.map +1 -1
- package/lib/features/store/objects/selection/ObjectsActionContextClass.js.map +1 -1
- package/lib/features/store/objects/selection/ObjectsActionSpec.d.ts +2 -2
- package/lib/features/store/objects/selection/ObjectsActionSpec.d.ts.map +1 -1
- package/lib/features/store/objects/selection/SelectionActions.d.ts +2 -2
- package/lib/features/store/objects/selection/SelectionActions.d.ts.map +1 -1
- package/lib/features/store/objects/selection/SelectionActions.js +1 -1
- package/lib/features/store/objects/selection/actions/ConfirmAction.js +1 -1
- package/lib/features/store/objects/selection/actions/DeleteObjectsAction.js +1 -1
- package/lib/features/store/objects/selection/actions/StartWorkflowButton.js +1 -1
- package/lib/features/store/objects/upload/DocumentUploadModal.js +1 -1
- package/lib/features/store/objects/upload/DocumentUploadModal.js.map +1 -1
- package/lib/features/store/objects/upload/useSmartFileUploadProcessing.d.ts.map +1 -1
- package/lib/features/store/objects/upload/useUploadHandler.d.ts.map +1 -1
- package/lib/features/store/types/ContentObjectTypesSearch.js +1 -1
- package/lib/features/store/types/IntakePolicyEditor.d.ts +2 -2
- package/lib/features/store/types/IntakePolicyEditor.d.ts.map +1 -1
- package/lib/features/store/types/IntakePolicyEditor.js +6 -2
- package/lib/features/store/types/IntakePolicyEditor.js.map +1 -1
- package/lib/features/store/types/IntakePolicyForm.d.ts.map +1 -1
- package/lib/features/store/types/IntakePolicyForm.js +2 -2
- package/lib/features/store/types/IntakePolicyForm.js.map +1 -1
- package/lib/features/store/types/ObjectSchemaEditor.d.ts +2 -2
- package/lib/features/store/types/ObjectSchemaEditor.d.ts.map +1 -1
- package/lib/features/store/types/SelectContentType.d.ts +2 -2
- package/lib/features/store/types/SelectContentType.d.ts.map +1 -1
- package/lib/features/store/types/SelectContentType.js.map +1 -1
- package/lib/features/store/types/SelectContentTypeModal.d.ts +2 -2
- package/lib/features/store/types/SelectContentTypeModal.d.ts.map +1 -1
- package/lib/features/store/types/SelectContentTypeModal.js.map +1 -1
- package/lib/features/store/types/TableLayoutEditor.d.ts +2 -2
- package/lib/features/store/types/TableLayoutEditor.d.ts.map +1 -1
- package/lib/features/store/types/TypeRegistry.d.ts +1267 -6
- package/lib/features/store/types/TypeRegistry.d.ts.map +1 -1
- package/lib/features/store/types/TypeRegistry.js +5 -0
- package/lib/features/store/types/TypeRegistry.js.map +1 -1
- package/lib/features/store/types/intake-policy-editor.logic.d.ts +9 -1
- package/lib/features/store/types/intake-policy-editor.logic.d.ts.map +1 -1
- package/lib/features/store/types/intake-policy-editor.logic.js +9 -1
- package/lib/features/store/types/intake-policy-editor.logic.js.map +1 -1
- package/lib/features/store/types/search/ObjectTypeSearchContext.d.ts +1252 -2
- package/lib/features/store/types/search/ObjectTypeSearchContext.d.ts.map +1 -1
- package/lib/features/store/types/search/ObjectTypeSearchContext.js.map +1 -1
- package/lib/features/store/types/typeCatalogCache.d.ts +2 -2
- package/lib/features/store/types/typeCatalogCache.d.ts.map +1 -1
- package/lib/features/store/types/typeCatalogCache.js +4 -0
- package/lib/features/store/types/typeCatalogCache.js.map +1 -1
- package/lib/features/user/UserInfo.d.ts +118 -7
- package/lib/features/user/UserInfo.d.ts.map +1 -1
- package/lib/features/user/UserInfo.js +1 -1
- package/lib/features/user/UserInfo.js.map +1 -1
- package/lib/features/utils/mimeType.d.ts.map +1 -1
- package/lib/features/utils/rendition.js.map +1 -1
- package/lib/features/utils/text.js.map +1 -1
- package/lib/i18n/locales/ar.json +27 -1
- package/lib/i18n/locales/de.json +27 -1
- package/lib/i18n/locales/en.json +30 -1
- package/lib/i18n/locales/es.json +27 -1
- package/lib/i18n/locales/fr.json +27 -1
- package/lib/i18n/locales/it.json +27 -1
- package/lib/i18n/locales/ja.json +27 -1
- package/lib/i18n/locales/ko.json +27 -1
- package/lib/i18n/locales/pt.json +27 -1
- package/lib/i18n/locales/ru.json +27 -1
- package/lib/i18n/locales/tr.json +27 -1
- package/lib/i18n/locales/zh-TW.json +27 -1
- package/lib/i18n/locales/zh.json +27 -1
- package/lib/i18n/rtl.d.ts +1 -1
- package/lib/i18n/rtl.d.ts.map +1 -1
- package/lib/layout/FullHeightLayout.d.ts +7 -6
- package/lib/layout/FullHeightLayout.d.ts.map +1 -1
- package/lib/layout/Sidebar.d.ts +1 -1
- package/lib/layout/Sidebar.js +1 -1
- package/lib/rich-text/EditorToolbar.js +1 -1
- package/lib/router/HistoryNavigator.d.ts +2 -2
- package/lib/router/HistoryNavigator.d.ts.map +1 -1
- package/lib/router/HistoryNavigator.js.map +1 -1
- package/lib/router/PathMatcher.d.ts.map +1 -1
- package/lib/router/PathMatcher.js.map +1 -1
- package/lib/router/PathWithParams.d.ts.map +1 -1
- package/lib/router/Redirect.js.map +1 -1
- package/lib/router/Route404.js +1 -1
- package/lib/router/Router.d.ts.map +1 -1
- package/lib/router/Router.js.map +1 -1
- package/lib/session/UserSession.d.ts +18 -4
- package/lib/session/UserSession.d.ts.map +1 -1
- package/lib/session/UserSession.js.map +1 -1
- package/lib/session/UserSessionProvider.d.ts +2 -0
- package/lib/session/UserSessionProvider.d.ts.map +1 -1
- package/lib/session/UserSessionProvider.js +81 -53
- package/lib/session/UserSessionProvider.js.map +1 -1
- package/lib/session/auth/composable.d.ts +49 -1
- package/lib/session/auth/composable.d.ts.map +1 -1
- package/lib/session/auth/composable.js +179 -53
- package/lib/session/auth/composable.js.map +1 -1
- package/lib/shell/VertesiaShell.js +1 -1
- package/lib/shell/apps/AppInstallationProvider.d.ts +230 -2
- package/lib/shell/apps/AppInstallationProvider.d.ts.map +1 -1
- package/lib/shell/apps/AppProjectSelector.js +1 -1
- package/lib/shell/login/InviteAcceptModal.js.map +1 -1
- package/lib/shell/login/SignInEmailStep.js +1 -1
- package/lib/shell/login/SignInPrimitives.d.ts +21 -20
- package/lib/shell/login/SignInPrimitives.d.ts.map +1 -1
- package/lib/shell/login/SignInPrimitives.js.map +1 -1
- package/lib/shell/login/SignInRecoveryStep.d.ts +22 -0
- package/lib/shell/login/SignInRecoveryStep.d.ts.map +1 -0
- package/lib/shell/login/SignInRecoveryStep.js +59 -0
- package/lib/shell/login/SignInRecoveryStep.js.map +1 -0
- package/lib/shell/login/SigninScreen.d.ts.map +1 -1
- package/lib/shell/login/SigninScreen.js +84 -11
- package/lib/shell/login/SigninScreen.js.map +1 -1
- package/lib/shell/login/SignupForm.js +1 -1
- package/lib/shell/login/TerminalLogin.js +1 -1
- package/lib/shell/login/UserSessionMenu.js +1 -1
- package/lib/vertesia-ui-core.js +1 -1
- package/lib/vertesia-ui-core.js.map +1 -1
- package/lib/vertesia-ui-features.js +34 -34
- package/lib/vertesia-ui-features.js.map +1 -1
- package/lib/vertesia-ui-i18n.js +13 -13
- package/lib/vertesia-ui-layout.js.map +1 -1
- package/lib/vertesia-ui-rich-text.js.map +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 +18 -18
- package/lib/vertesia-ui-widgets.js.map +1 -1
- package/lib/widgets/form/FormContext.d.ts.map +1 -1
- package/lib/widgets/form/FormContext.js.map +1 -1
- package/lib/widgets/form/ManagedObject.d.ts +2 -2
- package/lib/widgets/form/ManagedObject.d.ts.map +1 -1
- package/lib/widgets/form/ManagedObject.js.map +1 -1
- package/lib/widgets/form/schema.d.ts.map +1 -1
- package/lib/widgets/form/schema.js.map +1 -1
- package/lib/widgets/json-view/JSONCode.js +1 -1
- package/lib/widgets/json-view/JSONTable.js +1 -1
- package/lib/widgets/markdown/ArtifactContentRenderer.js.map +1 -1
- package/lib/widgets/markdown/CodeBlockPlaceholder.d.ts +1 -1
- package/lib/widgets/markdown/CodeBlockPlaceholder.d.ts.map +1 -1
- package/lib/widgets/markdown/CodeBlockPlaceholder.js +1 -1
- package/lib/widgets/markdown/CodeBlockRendering.d.ts.map +1 -1
- package/lib/widgets/markdown/CollaborativeMarkdownRenderer.js +1 -1
- package/lib/widgets/markdown/remarkDirectiveHandler.d.ts.map +1 -1
- package/lib/widgets/markdown/textDiff.js.map +1 -1
- package/lib/widgets/monacoEditor/MonacoEditor.d.ts +7 -1
- package/lib/widgets/monacoEditor/MonacoEditor.d.ts.map +1 -1
- package/lib/widgets/monacoEditor/MonacoEditor.js +62 -6
- package/lib/widgets/monacoEditor/MonacoEditor.js.map +1 -1
- package/lib/widgets/schema-editor/ManagedSchema.d.ts.map +1 -1
- package/lib/widgets/schema-editor/editor/PropertyEditor.js +1 -1
- package/lib/widgets/schema-editor/json-schema4-utils.js.map +1 -1
- package/lib/widgets/xml-viewer/components/Elements/index.js +1 -1
- package/lib/widgets/xml-viewer/components/Tag/index.js +1 -1
- package/lib/widgets/xml-viewer/constants/index.d.ts.map +1 -1
- package/lib/widgets/xml-viewer/helpers/index.d.ts +1 -1
- package/lib/widgets/xml-viewer/hooks/useCollapsible.d.ts +1 -1
- package/lib/widgets/xml-viewer/hooks/useCollapsible.d.ts.map +1 -1
- package/package.json +33 -33
- package/src/core/hooks/useFetch.ts +2 -1
- package/src/core/hooks/useScrollableSearch.test.tsx +139 -0
- package/src/core/hooks/useScrollableSearch.tsx +17 -3
- package/src/env/index.ts +2 -0
- package/src/features/agent/chat/AgentChatPlaybackControls.test.tsx +2 -0
- package/src/features/agent/chat/AgentRequestInputOverlay.test.tsx +51 -6
- package/src/features/agent/chat/AgentRequestInputOverlay.tsx +5 -7
- package/src/features/agent/chat/ModernAgentConversation.test.tsx +208 -3
- package/src/features/agent/chat/ModernAgentConversation.tsx +130 -25
- package/src/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.tsx +75 -20
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.test.tsx +112 -0
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +62 -10
- package/src/features/agent/chat/ModernAgentOutput/AttachmentPreview.test.ts +38 -0
- package/src/features/agent/chat/ModernAgentOutput/AttachmentPreview.tsx +62 -4
- package/src/features/agent/chat/ModernAgentOutput/Header.tsx +2 -2
- package/src/features/agent/chat/ModernAgentOutput/MessageInput.test.tsx +71 -0
- package/src/features/agent/chat/ModernAgentOutput/MessageInput.tsx +3 -1
- package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +18 -4
- package/src/features/agent/chat/ModernAgentOutput/SummaryConversation.ts +9 -0
- package/src/features/agent/chat/ModernAgentOutput/requestInputMessages.test.ts +95 -0
- package/src/features/agent/chat/ModernAgentOutput/requestInputMessages.ts +111 -1
- package/src/features/agent/chat/ModernAgentOutput/utils.test.ts +21 -0
- package/src/features/agent/chat/hooks/useAgentStream.test.tsx +172 -0
- package/src/features/agent/chat/hooks/useAgentStream.ts +38 -3
- package/src/features/agent/chat/hooks/useFileProcessing.test.tsx +87 -0
- package/src/features/agent/chat/hooks/useFileProcessing.ts +32 -1
- package/src/features/agent/chat/index.ts +1 -0
- package/src/features/facets/PromptsFacetsNav.tsx +17 -9
- package/src/features/store/collections/CollectionsTable.tsx +1 -1
- package/src/features/store/objects/components/ContentOverview.tsx +4 -1
- package/src/features/store/objects/selection/ObjectsActionContext.tsx +2 -2
- package/src/features/store/objects/selection/ObjectsActionSpec.ts +2 -2
- package/src/features/store/objects/selection/SelectionActions.tsx +2 -2
- package/src/features/store/objects/upload/DocumentUploadModal.tsx +2 -2
- package/src/features/store/types/IntakePolicyEditor.tsx +12 -4
- package/src/features/store/types/IntakePolicyForm.tsx +25 -0
- package/src/features/store/types/ObjectSchemaEditor.tsx +2 -2
- package/src/features/store/types/SelectContentType.tsx +9 -9
- package/src/features/store/types/SelectContentTypeModal.tsx +5 -5
- package/src/features/store/types/TableLayoutEditor.tsx +2 -2
- package/src/features/store/types/TypeRegistry.ts +8 -3
- package/src/features/store/types/intake-policy-editor.logic.ts +10 -2
- package/src/features/store/types/typeCatalogCache.ts +10 -3
- package/src/i18n/locales/ar.json +27 -1
- package/src/i18n/locales/de.json +27 -1
- package/src/i18n/locales/en.json +30 -1
- package/src/i18n/locales/es.json +27 -1
- package/src/i18n/locales/fr.json +27 -1
- package/src/i18n/locales/it.json +27 -1
- package/src/i18n/locales/ja.json +27 -1
- package/src/i18n/locales/ko.json +27 -1
- package/src/i18n/locales/pt.json +27 -1
- package/src/i18n/locales/ru.json +27 -1
- package/src/i18n/locales/tr.json +27 -1
- package/src/i18n/locales/zh-TW.json +27 -1
- package/src/i18n/locales/zh.json +27 -1
- package/src/session/UserSessionProvider.test.ts +69 -0
- package/src/session/UserSessionProvider.tsx +96 -60
- package/src/session/auth/composable.scope.test.ts +88 -0
- package/src/session/auth/composable.test.ts +205 -0
- package/src/session/auth/composable.ts +227 -58
- package/src/shell/login/InviteAcceptModal.tsx +4 -4
- package/src/shell/login/SignInPrimitives.tsx +1 -0
- package/src/shell/login/SignInRecoveryStep.test.tsx +112 -0
- package/src/shell/login/SignInRecoveryStep.tsx +177 -0
- package/src/shell/login/SigninScreen.tsx +145 -27
- package/src/widgets/markdown/ArtifactEditingSurface.test.tsx +13 -9
- package/src/widgets/monacoEditor/MonacoEditor.tsx +83 -7
|
@@ -149,6 +149,11 @@ describe('useFileProcessing', () => {
|
|
|
149
149
|
|
|
150
150
|
await act(async () => {
|
|
151
151
|
resolveUpload?.({ url: 'https://example.test/upload', path: 'files/wrong.png' });
|
|
152
|
+
// biome 2.5.6 regression: the nursery rule mis-types `await` on a `Promise | undefined`
|
|
153
|
+
// variable assigned inside a callback, and its own fix suggests `await await`. It only
|
|
154
|
+
// fires on Linux CI, not on macOS, so the suppression may read as unused locally.
|
|
155
|
+
// Drop it once the rule is fixed upstream.
|
|
156
|
+
// biome-ignore lint/nursery/noFloatingPromises: false positive — already awaited
|
|
152
157
|
await uploadPromise;
|
|
153
158
|
});
|
|
154
159
|
|
|
@@ -188,4 +193,86 @@ describe('useFileProcessing', () => {
|
|
|
188
193
|
vi.unstubAllGlobals();
|
|
189
194
|
}
|
|
190
195
|
});
|
|
196
|
+
|
|
197
|
+
it('excludes files already delivered via a sent message (survives reload)', () => {
|
|
198
|
+
const client = createClient();
|
|
199
|
+
const toast = vi.fn();
|
|
200
|
+
const delivered: ConversationFile = {
|
|
201
|
+
...createReadyFile('file-1'),
|
|
202
|
+
artifact_path: 'files/wrong.png',
|
|
203
|
+
reference: 'artifact:files/wrong.png',
|
|
204
|
+
};
|
|
205
|
+
const serverFileUpdates = new Map([['file-1', delivered]]);
|
|
206
|
+
|
|
207
|
+
// No delivered refs → the file shows as a pending composer attachment.
|
|
208
|
+
const { result, rerender } = renderHook(
|
|
209
|
+
({ refs }: { refs: Set<string> | undefined }) =>
|
|
210
|
+
useFileProcessing(client, 'agent-run-1', serverFileUpdates, toast, refs),
|
|
211
|
+
{ initialProps: { refs: undefined as Set<string> | undefined } },
|
|
212
|
+
);
|
|
213
|
+
expect(result.current.processingFiles.has('file-1')).toBe(true);
|
|
214
|
+
|
|
215
|
+
// Once its artifact reference appears in message history, it is excluded — matching by
|
|
216
|
+
// either the full `artifact:` reference or the bare path.
|
|
217
|
+
rerender({ refs: new Set(['artifact:files/wrong.png']) });
|
|
218
|
+
expect(result.current.processingFiles.has('file-1')).toBe(false);
|
|
219
|
+
|
|
220
|
+
rerender({ refs: new Set(['files/wrong.png']) });
|
|
221
|
+
expect(result.current.processingFiles.has('file-1')).toBe(false);
|
|
222
|
+
});
|
|
223
|
+
|
|
224
|
+
it('excludes files marked consumed by the workflow without relying on message history', () => {
|
|
225
|
+
const client = createClient();
|
|
226
|
+
const toast = vi.fn();
|
|
227
|
+
const consumed: ConversationFile = {
|
|
228
|
+
...createReadyFile('file-1'),
|
|
229
|
+
artifact_path: 'files/wrong.png',
|
|
230
|
+
reference: 'artifact:files/wrong.png',
|
|
231
|
+
consumed_at: 1_100,
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
const { result } = renderHook(() =>
|
|
235
|
+
useFileProcessing(client, 'agent-run-1', new Map([['file-1', consumed]]), toast),
|
|
236
|
+
);
|
|
237
|
+
|
|
238
|
+
expect(result.current.processingFiles.has('file-1')).toBe(false);
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
it('drops a staged local entry when the server marks that file consumed', async () => {
|
|
242
|
+
const client = createClient();
|
|
243
|
+
const toast = vi.fn();
|
|
244
|
+
const { result, rerender } = renderHook(
|
|
245
|
+
({ updates }) => useFileProcessing(client, 'agent-run-1', updates, toast),
|
|
246
|
+
{ initialProps: { updates: new Map<string, ConversationFile>() } },
|
|
247
|
+
);
|
|
248
|
+
|
|
249
|
+
const file = new File(['pdf'], 'report.pdf', { type: 'application/pdf' });
|
|
250
|
+
await act(async () => {
|
|
251
|
+
await result.current.handleFileUpload([file]);
|
|
252
|
+
});
|
|
253
|
+
const [fileId] = Array.from(result.current.processingFiles.entries())[0];
|
|
254
|
+
expect(result.current.processingFiles.has(fileId)).toBe(true);
|
|
255
|
+
|
|
256
|
+
// The turn was consumed elsewhere (another tab, or an agent-initiated turn), so
|
|
257
|
+
// clearProcessingFiles() never ran here and the optimistic entry is still staged.
|
|
258
|
+
// Merging local first means skipping the server update is not enough to hide it.
|
|
259
|
+
rerender({
|
|
260
|
+
updates: new Map<string, ConversationFile>([
|
|
261
|
+
[
|
|
262
|
+
fileId,
|
|
263
|
+
{
|
|
264
|
+
id: fileId,
|
|
265
|
+
name: 'report.pdf',
|
|
266
|
+
content_type: 'application/pdf',
|
|
267
|
+
size: 0,
|
|
268
|
+
status: FileProcessingStatus.READY,
|
|
269
|
+
started_at: 1_000,
|
|
270
|
+
consumed_at: 1_100,
|
|
271
|
+
},
|
|
272
|
+
],
|
|
273
|
+
]),
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
expect(result.current.processingFiles.has(fileId)).toBe(false);
|
|
277
|
+
});
|
|
191
278
|
});
|
|
@@ -51,6 +51,13 @@ export function useFileProcessing(
|
|
|
51
51
|
agentRunId: string,
|
|
52
52
|
serverFileUpdates: Map<string, ConversationFile>,
|
|
53
53
|
toast: ToastFn,
|
|
54
|
+
/**
|
|
55
|
+
* Artifact references (`artifact:...` and bare paths) that already appear in sent user
|
|
56
|
+
* messages. Files matching these have been delivered to the agent, so they must not resurface
|
|
57
|
+
* as pending composer attachments after a reload — the durable, server-agnostic counterpart to
|
|
58
|
+
* the in-session `removedFileIds` suppression.
|
|
59
|
+
*/
|
|
60
|
+
deliveredArtifactRefs?: Set<string>,
|
|
54
61
|
): UseFileProcessingResult {
|
|
55
62
|
const t = i18nInstance.getFixedT(null, NAMESPACE);
|
|
56
63
|
// Local optimistic file state (uploads initiated from the UI)
|
|
@@ -103,6 +110,17 @@ export function useFileProcessing(
|
|
|
103
110
|
}
|
|
104
111
|
});
|
|
105
112
|
serverFileUpdates.forEach((file, id) => {
|
|
113
|
+
// consumed_at is the workflow's authoritative delivered marker. Filter it here in
|
|
114
|
+
// addition to message-history refs: older runs may lack the marker, while some
|
|
115
|
+
// server-originated messages may not preserve the rendered attachment block.
|
|
116
|
+
if (file.consumed_at) {
|
|
117
|
+
// Drop any optimistic local entry as well. clearProcessingFiles() normally
|
|
118
|
+
// retires it when this client sends the message, but a turn consumed
|
|
119
|
+
// elsewhere (another tab, or an agent-initiated turn) leaves this session's
|
|
120
|
+
// chip staged. Skipping the server update alone would keep it visible.
|
|
121
|
+
merged.delete(id);
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
106
124
|
if (!removedFileIds.has(id)) {
|
|
107
125
|
// Server updates are authoritative for status, but may omit fields the local
|
|
108
126
|
// optimistic entry already knows: preview_url is never sent by the server, and
|
|
@@ -117,8 +135,21 @@ export function useFileProcessing(
|
|
|
117
135
|
} as LocalConversationFile);
|
|
118
136
|
}
|
|
119
137
|
});
|
|
138
|
+
// Drop files already delivered via a sent message. Unlike removedFileIds (session-only),
|
|
139
|
+
// this is reconstructed from message history on every mount. It also covers runs created
|
|
140
|
+
// before the workflow began stamping consumed_at.
|
|
141
|
+
if (deliveredArtifactRefs && deliveredArtifactRefs.size > 0) {
|
|
142
|
+
for (const [id, file] of merged) {
|
|
143
|
+
if (
|
|
144
|
+
(file.reference && deliveredArtifactRefs.has(file.reference)) ||
|
|
145
|
+
(file.artifact_path && deliveredArtifactRefs.has(file.artifact_path))
|
|
146
|
+
) {
|
|
147
|
+
merged.delete(id);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
120
151
|
return merged;
|
|
121
|
-
}, [localFiles, removedFileIds, serverFileUpdates]);
|
|
152
|
+
}, [localFiles, removedFileIds, serverFileUpdates, deliveredArtifactRefs]);
|
|
122
153
|
|
|
123
154
|
const hasProcessingFiles = useMemo(
|
|
124
155
|
() =>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FacetBucket } from '@vertesia/common';
|
|
1
|
+
import type { ComputedFacetResponse, FacetBucket } from '@vertesia/common';
|
|
2
2
|
import {
|
|
3
3
|
type Filter as BaseFilter,
|
|
4
4
|
FilterBar,
|
|
@@ -11,11 +11,13 @@ import { useState } from 'react';
|
|
|
11
11
|
import { filterValueToQueryValue, type SearchInterface, setSearchQueryValue } from './utils/SearchInterface';
|
|
12
12
|
|
|
13
13
|
interface PromptsFacetsNavProps {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
/**
|
|
15
|
+
* The facet response as the endpoint publishes it: `total` plus one entry per facet the caller
|
|
16
|
+
* asked for. The names are chosen per request, so the buckets are narrowed below rather than
|
|
17
|
+
* declared here — the previous `{ role, status, tags }` shape named facets this component never
|
|
18
|
+
* requests and could not describe a caller that asks for a different one.
|
|
19
|
+
*/
|
|
20
|
+
facets: ComputedFacetResponse;
|
|
19
21
|
search: SearchInterface;
|
|
20
22
|
/**
|
|
21
23
|
* Optional controlled filter state. When provided, the parent owns the filter list (and is
|
|
@@ -28,8 +30,14 @@ interface PromptsFacetsNavProps {
|
|
|
28
30
|
filterGroups?: FilterGroup[];
|
|
29
31
|
}
|
|
30
32
|
|
|
33
|
+
function facetBuckets(facets: ComputedFacetResponse, name: string): FacetBucket[] {
|
|
34
|
+
const value = facets[name];
|
|
35
|
+
return Array.isArray(value) ? (value as FacetBucket[]) : [];
|
|
36
|
+
}
|
|
37
|
+
|
|
31
38
|
// Hook to create filter groups for prompts
|
|
32
39
|
export function usePromptsFilterGroups(facets: PromptsFacetsNavProps['facets']): FilterGroup[] {
|
|
40
|
+
const roleBuckets = facetBuckets(facets, 'role');
|
|
33
41
|
const customFilterGroups: FilterGroup[] = [];
|
|
34
42
|
|
|
35
43
|
// Add name filter as text type
|
|
@@ -42,12 +50,12 @@ export function usePromptsFilterGroups(facets: PromptsFacetsNavProps['facets']):
|
|
|
42
50
|
customFilterGroups.push(nameFilterGroup);
|
|
43
51
|
|
|
44
52
|
// Add role filter as select type if role facets are available
|
|
45
|
-
if (
|
|
53
|
+
if (roleBuckets.length > 0) {
|
|
46
54
|
const rolesFilterGroup = {
|
|
47
55
|
name: 'role',
|
|
48
56
|
placeholder: 'Role',
|
|
49
57
|
type: 'select' as const,
|
|
50
|
-
options:
|
|
58
|
+
options: roleBuckets.map((facet) => ({
|
|
51
59
|
label: facet._id,
|
|
52
60
|
value: facet._id,
|
|
53
61
|
count: facet.count,
|
|
@@ -62,7 +70,7 @@ export function usePromptsFilterGroups(facets: PromptsFacetsNavProps['facets']):
|
|
|
62
70
|
placeholder: 'Tags',
|
|
63
71
|
type: 'stringList' as const,
|
|
64
72
|
multiple: true,
|
|
65
|
-
options: (facets
|
|
73
|
+
options: facetBuckets(facets, 'tags').map((facet) => ({
|
|
66
74
|
label: facet._id,
|
|
67
75
|
value: facet._id,
|
|
68
76
|
})),
|
|
@@ -843,7 +843,10 @@ function TextActions({
|
|
|
843
843
|
() => (project ? client.projects.retrieve(project.id) : Promise.resolve(undefined)),
|
|
844
844
|
[project?.id],
|
|
845
845
|
);
|
|
846
|
-
|
|
846
|
+
// `null` is how the setting is cleared, and it means the same thing here as an absent value: no
|
|
847
|
+
// custom template, so the export falls back to the built-in one. Collapsing the two spellings at
|
|
848
|
+
// the read keeps `templateObjectId` below a plain optional string.
|
|
849
|
+
const pdfTemplateObjectId = fullProject?.configuration?.pdf_template_object_id ?? undefined;
|
|
847
850
|
|
|
848
851
|
const isMarkdown = isMarkdownContentType(content?.type);
|
|
849
852
|
const isDocumentEditingContent = isDocumentEditingContentType(content?.type);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ContentObjectTypeCatalogEntry } from '@vertesia/common';
|
|
2
2
|
import { useToast } from '@vertesia/ui/core';
|
|
3
3
|
import { useUserSession } from '@vertesia/ui/session';
|
|
4
4
|
import { type ReactNode, useMemo } from 'react';
|
|
@@ -25,7 +25,7 @@ const DEFAULT_ACTIONS: ObjectsActionSpec[] = [
|
|
|
25
25
|
|
|
26
26
|
interface ObjectsActionContextProps {
|
|
27
27
|
children: ReactNode;
|
|
28
|
-
type?:
|
|
28
|
+
type?: ContentObjectTypeCatalogEntry;
|
|
29
29
|
}
|
|
30
30
|
export function ObjectsActionContextProvider({ children, type }: ObjectsActionContextProps) {
|
|
31
31
|
const selection = useDocumentSelection();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { VertesiaClient } from '@vertesia/client';
|
|
2
|
-
import type { ColumnLayout,
|
|
2
|
+
import type { ColumnLayout, ContentObjectTypeCatalogEntry } from '@vertesia/common';
|
|
3
3
|
import type { ToastFn } from '@vertesia/ui/core';
|
|
4
4
|
import type { DocumentSelection } from '../DocumentSelectionProvider';
|
|
5
5
|
import type { DocumentSearch } from '../search/DocumentSearchContext';
|
|
@@ -22,7 +22,7 @@ export interface ObjectsActionParams {
|
|
|
22
22
|
toast: ToastFn;
|
|
23
23
|
search: DocumentSearch;
|
|
24
24
|
table_layout?: ColumnLayout[];
|
|
25
|
-
type?:
|
|
25
|
+
type?: ContentObjectTypeCatalogEntry;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export interface ActionComponentTypeProps {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ContentObjectTypeCatalogEntry } from '@vertesia/common';
|
|
2
2
|
import { Button, Popover, PopoverContent, PopoverTrigger, SelectList } from '@vertesia/ui/core';
|
|
3
3
|
import { useUITranslation } from '@vertesia/ui/i18n';
|
|
4
4
|
import clsx from 'clsx';
|
|
@@ -13,7 +13,7 @@ import { useObjectsActionContext } from './ObjectsActionHooks';
|
|
|
13
13
|
import type { ObjectsActionSpec } from './ObjectsActionSpec';
|
|
14
14
|
|
|
15
15
|
interface SelectionActionsProps {
|
|
16
|
-
type?:
|
|
16
|
+
type?: ContentObjectTypeCatalogEntry;
|
|
17
17
|
allowMutations?: boolean;
|
|
18
18
|
allowDelete?: boolean;
|
|
19
19
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Collection,
|
|
1
|
+
import type { Collection, ContentObjectTypeCatalogEntry, DynamicCollection } from '@vertesia/common';
|
|
2
2
|
import {
|
|
3
3
|
Button,
|
|
4
4
|
errorMessage,
|
|
@@ -90,7 +90,7 @@ export function DocumentUploadModal({
|
|
|
90
90
|
const [files, setFiles] = useState<File[]>([]);
|
|
91
91
|
const [processedFiles, setProcessedFiles] = useState<FileWithMetadata[]>([]);
|
|
92
92
|
const [processingDone, setProcessingDone] = useState(false);
|
|
93
|
-
const [selectedType, setSelectedType] = useState<
|
|
93
|
+
const [selectedType, setSelectedType] = useState<ContentObjectTypeCatalogEntry | null>(null);
|
|
94
94
|
const [fileStatuses, setFileStatuses] = useState<FileUploadStatus[]>([]);
|
|
95
95
|
const [isUploading, setIsUploading] = useState(false);
|
|
96
96
|
const [uploadComplete, setUploadComplete] = useState(false);
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
type ContentObjectTypeCatalogEntry,
|
|
3
|
+
type ContentTypeIntakePolicy,
|
|
4
|
+
ContentTypeIntakePolicySchema,
|
|
5
|
+
} from '@vertesia/common';
|
|
2
6
|
import {
|
|
3
7
|
Badge,
|
|
4
8
|
Button,
|
|
@@ -25,7 +29,7 @@ import { IntakePolicyForm, type IntakePolicyFormSection } from './IntakePolicyFo
|
|
|
25
29
|
|
|
26
30
|
interface IntakePolicyEditorProps {
|
|
27
31
|
/** Content type whose intake policy is edited; omit when editing a standalone policy. */
|
|
28
|
-
objectType?:
|
|
32
|
+
objectType?: ContentObjectTypeCatalogEntry;
|
|
29
33
|
/** Initial policy value when no objectType is given (e.g. the project default policy). */
|
|
30
34
|
value?: ContentTypeIntakePolicy;
|
|
31
35
|
/** Custom persistence (e.g. save to project configuration). Returns the saved policy.
|
|
@@ -644,13 +648,17 @@ function stringifyPolicy(policy: ContentTypeIntakePolicy | undefined) {
|
|
|
644
648
|
return JSON.stringify(policy ?? EMPTY_POLICY, null, 2);
|
|
645
649
|
}
|
|
646
650
|
|
|
647
|
-
function createPolicyValidator() {
|
|
651
|
+
function createPolicyValidator(): ValidateFunction<ContentTypeIntakePolicy> {
|
|
648
652
|
const ajv = new Ajv({
|
|
649
653
|
strict: false,
|
|
650
654
|
allErrors: true,
|
|
651
655
|
});
|
|
652
656
|
addFormats(ajv);
|
|
653
|
-
|
|
657
|
+
// The schema is plain JSON — generated from the canonical Zod schema, and deliberately typed as
|
|
658
|
+
// opaque data so the package root can export it without pulling Zod into the browser bundle. AJV
|
|
659
|
+
// therefore infers `unknown`; the type argument states what compiling THIS schema validates, and
|
|
660
|
+
// `store.contract.test.ts` is what keeps the claim true.
|
|
661
|
+
return ajv.compile<ContentTypeIntakePolicy>(ContentTypeIntakePolicySchema);
|
|
654
662
|
}
|
|
655
663
|
|
|
656
664
|
function parseAndValidatePolicy(
|
|
@@ -152,6 +152,13 @@ export function IntakePolicyForm({ policy, section, onChange, readonly = false }
|
|
|
152
152
|
onChange={(value) => setValue(['text_conversion', 'scope'], value)}
|
|
153
153
|
readonly={readonly}
|
|
154
154
|
/>
|
|
155
|
+
<NumberField
|
|
156
|
+
label={t('intakePolicy.field.renderDpi')}
|
|
157
|
+
value={policy.text_conversion?.render_dpi}
|
|
158
|
+
min={72}
|
|
159
|
+
onChange={(value) => setValue(['text_conversion', 'render_dpi'], value)}
|
|
160
|
+
readonly={readonly}
|
|
161
|
+
/>
|
|
155
162
|
</div>
|
|
156
163
|
<TextAreaField
|
|
157
164
|
label={t('intakePolicy.field.instructions')}
|
|
@@ -161,6 +168,15 @@ export function IntakePolicyForm({ policy, section, onChange, readonly = false }
|
|
|
161
168
|
/>
|
|
162
169
|
</FormSection>
|
|
163
170
|
|
|
171
|
+
<FormSection title={t('intakePolicy.section.conversionModel')}>
|
|
172
|
+
<ModelConfigFields
|
|
173
|
+
title={t('intakePolicy.field.model')}
|
|
174
|
+
config={policy.text_conversion?.config}
|
|
175
|
+
onChange={(value) => setValue(['text_conversion', 'config'], value)}
|
|
176
|
+
readonly={readonly}
|
|
177
|
+
/>
|
|
178
|
+
</FormSection>
|
|
179
|
+
|
|
164
180
|
{policy.text_conversion?.method === 'custom' && (
|
|
165
181
|
<FormSection title={t('intakePolicy.section.customConversion')}>
|
|
166
182
|
<div className="grid gap-4 md:grid-cols-2">
|
|
@@ -243,6 +259,15 @@ export function IntakePolicyForm({ policy, section, onChange, readonly = false }
|
|
|
243
259
|
/>
|
|
244
260
|
</FormSection>
|
|
245
261
|
|
|
262
|
+
<FormSection title={t('intakePolicy.section.extractionModel')}>
|
|
263
|
+
<ModelConfigFields
|
|
264
|
+
title={t('intakePolicy.field.model')}
|
|
265
|
+
config={policy.extraction?.config}
|
|
266
|
+
onChange={(value) => setValue(['extraction', 'config'], value)}
|
|
267
|
+
readonly={readonly}
|
|
268
|
+
/>
|
|
269
|
+
</FormSection>
|
|
270
|
+
|
|
246
271
|
<FormSection title={t('intakePolicy.section.visionBudget')}>
|
|
247
272
|
<div className="grid gap-4 md:grid-cols-2 xl:grid-cols-3">
|
|
248
273
|
<SelectField
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ContentObjectTypeCatalogEntry } from '@vertesia/common';
|
|
2
2
|
import { Button, errorMessage, Panel, useTheme, useToast } from '@vertesia/ui/core';
|
|
3
3
|
import { useUITranslation } from '@vertesia/ui/i18n';
|
|
4
4
|
import { useUserSession } from '@vertesia/ui/session';
|
|
@@ -7,7 +7,7 @@ import { Ajv } from 'ajv';
|
|
|
7
7
|
import { useMemo, useRef, useState } from 'react';
|
|
8
8
|
|
|
9
9
|
interface ObjectSchemaEditorProps {
|
|
10
|
-
objectType:
|
|
10
|
+
objectType: ContentObjectTypeCatalogEntry;
|
|
11
11
|
onSchemaUpdate: (jsonSchema: unknown) => void;
|
|
12
12
|
readonly?: boolean;
|
|
13
13
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ContentObjectTypeCatalogEntry } from '@vertesia/common';
|
|
2
2
|
import { SelectBox } from '@vertesia/ui/core';
|
|
3
3
|
import { useUITranslation } from '@vertesia/ui/i18n';
|
|
4
4
|
import { useEffect, useState } from 'react';
|
|
@@ -6,7 +6,7 @@ import { useTypeRegistry } from './TypeRegistryProvider.js';
|
|
|
6
6
|
|
|
7
7
|
interface SelectContentTypeProps {
|
|
8
8
|
defaultValue?: string | string[] | null; // the typeId
|
|
9
|
-
onChange: (type:
|
|
9
|
+
onChange: (type: ContentObjectTypeCatalogEntry | null | ContentObjectTypeCatalogEntry[]) => void;
|
|
10
10
|
className?: string;
|
|
11
11
|
isClearable?: boolean;
|
|
12
12
|
multiple?: boolean;
|
|
@@ -22,7 +22,7 @@ export function SelectContentType({
|
|
|
22
22
|
const { registry: typeRegistry } = useTypeRegistry();
|
|
23
23
|
const [isMounted, setIsMounted] = useState(false);
|
|
24
24
|
|
|
25
|
-
const optionLabel = (type:
|
|
25
|
+
const optionLabel = (type: ContentObjectTypeCatalogEntry | null) => {
|
|
26
26
|
if (type === null) return t('store.none');
|
|
27
27
|
|
|
28
28
|
return (
|
|
@@ -32,8 +32,8 @@ export function SelectContentType({
|
|
|
32
32
|
</div>
|
|
33
33
|
);
|
|
34
34
|
};
|
|
35
|
-
const [selectedType, setSelectedType] = useState<
|
|
36
|
-
const [selectedTypes, setSelectedTypes] = useState<
|
|
35
|
+
const [selectedType, setSelectedType] = useState<ContentObjectTypeCatalogEntry | undefined>();
|
|
36
|
+
const [selectedTypes, setSelectedTypes] = useState<ContentObjectTypeCatalogEntry[]>([]);
|
|
37
37
|
|
|
38
38
|
useEffect(() => {
|
|
39
39
|
if (!isMounted) {
|
|
@@ -51,12 +51,12 @@ export function SelectContentType({
|
|
|
51
51
|
}
|
|
52
52
|
}, [isMounted, typeRegistry, defaultValue, multiple]);
|
|
53
53
|
|
|
54
|
-
const _onChange = (option:
|
|
54
|
+
const _onChange = (option: ContentObjectTypeCatalogEntry | null) => {
|
|
55
55
|
setSelectedType(option || undefined);
|
|
56
56
|
onChange(option);
|
|
57
57
|
};
|
|
58
58
|
|
|
59
|
-
const _onChangeMultiple = (options:
|
|
59
|
+
const _onChangeMultiple = (options: ContentObjectTypeCatalogEntry[]) => {
|
|
60
60
|
setSelectedTypes(options);
|
|
61
61
|
onChange(options);
|
|
62
62
|
};
|
|
@@ -64,7 +64,7 @@ export function SelectContentType({
|
|
|
64
64
|
if (multiple) {
|
|
65
65
|
return (
|
|
66
66
|
<div className="flex flex-col gap-4 content-between">
|
|
67
|
-
<SelectBox<
|
|
67
|
+
<SelectBox<ContentObjectTypeCatalogEntry>
|
|
68
68
|
options={typeRegistry?.types || []}
|
|
69
69
|
value={selectedTypes}
|
|
70
70
|
onChange={_onChangeMultiple}
|
|
@@ -81,7 +81,7 @@ export function SelectContentType({
|
|
|
81
81
|
|
|
82
82
|
return (
|
|
83
83
|
<div className="flex flex-col gap-4 content-between">
|
|
84
|
-
<SelectBox<
|
|
84
|
+
<SelectBox<ContentObjectTypeCatalogEntry>
|
|
85
85
|
options={typeRegistry?.types || []}
|
|
86
86
|
value={selectedType}
|
|
87
87
|
onChange={_onChange}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ContentObjectTypeCatalogEntry } from '@vertesia/common';
|
|
2
2
|
import { Button, Modal, ModalBody, ModalFooter, ModalTitle, SelectBox, VTooltip } from '@vertesia/ui/core';
|
|
3
3
|
import { useUITranslation } from '@vertesia/ui/i18n';
|
|
4
4
|
import { CheckCircleIcon, Info } from 'lucide-react';
|
|
@@ -18,7 +18,7 @@ interface SelectContentTypeModalProps {
|
|
|
18
18
|
/** Children to render in the modal */
|
|
19
19
|
children?: ReactNode;
|
|
20
20
|
/** Optional initial selected type */
|
|
21
|
-
initialSelectedType?:
|
|
21
|
+
initialSelectedType?: ContentObjectTypeCatalogEntry | null;
|
|
22
22
|
/** Optional description text */
|
|
23
23
|
description?: string;
|
|
24
24
|
/** Label for the confirm button */
|
|
@@ -45,7 +45,7 @@ export function SelectContentTypeModal({
|
|
|
45
45
|
const { t } = useUITranslation();
|
|
46
46
|
const resolvedTitle = title ?? t('store.selectContentType');
|
|
47
47
|
const { registry: typeRegistry } = useTypeRegistry();
|
|
48
|
-
const [selectedType, setSelectedType] = useState<
|
|
48
|
+
const [selectedType, setSelectedType] = useState<ContentObjectTypeCatalogEntry | null>(initialSelectedType);
|
|
49
49
|
|
|
50
50
|
// Get available types from the registry
|
|
51
51
|
const types = typeRegistry?.types || [];
|
|
@@ -79,7 +79,7 @@ export function SelectContentTypeModal({
|
|
|
79
79
|
value={selectedType}
|
|
80
80
|
optionLabel={(type) => (type ? type.name : t('store.selectContentTypeLabel'))}
|
|
81
81
|
placeholder={t('store.selectContentTypeAuto')}
|
|
82
|
-
onChange={(selected:
|
|
82
|
+
onChange={(selected: ContentObjectTypeCatalogEntry | null | undefined) =>
|
|
83
83
|
setSelectedType(selected || null)
|
|
84
84
|
}
|
|
85
85
|
filterBy="name"
|
|
@@ -91,7 +91,7 @@ export function SelectContentTypeModal({
|
|
|
91
91
|
value={selectedType}
|
|
92
92
|
optionLabel={(type) => (type ? type.name : t('store.selectContentTypeLabel'))}
|
|
93
93
|
placeholder={t('store.selectContentTypeLabel')}
|
|
94
|
-
onChange={(selected:
|
|
94
|
+
onChange={(selected: ContentObjectTypeCatalogEntry | null | undefined) =>
|
|
95
95
|
setSelectedType(selected || null)
|
|
96
96
|
}
|
|
97
97
|
filterBy="name"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ColumnLayout,
|
|
1
|
+
import type { ColumnLayout, ContentObjectTypeCatalogEntry } from '@vertesia/common';
|
|
2
2
|
import { Button, errorMessage, Panel, useTheme, useToast } from '@vertesia/ui/core';
|
|
3
3
|
import { useUITranslation } from '@vertesia/ui/i18n';
|
|
4
4
|
import { useUserSession } from '@vertesia/ui/session';
|
|
@@ -6,7 +6,7 @@ import { type EditorApi, MonacoEditor } from '@vertesia/ui/widgets';
|
|
|
6
6
|
import { useMemo, useRef, useState } from 'react';
|
|
7
7
|
|
|
8
8
|
interface TableLayoutEditorProps {
|
|
9
|
-
objectType:
|
|
9
|
+
objectType: ContentObjectTypeCatalogEntry;
|
|
10
10
|
onLayoutUpdate: (value: ColumnLayout[] | undefined) => void;
|
|
11
11
|
readonly?: boolean;
|
|
12
12
|
}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ContentObjectTypeCatalogEntry } from '@vertesia/common';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Holds the type catalog, which is `ContentObjectTypeCatalogEntry` rather than
|
|
5
|
+
* `ContentObjectTypeItem`: the listing includes system and app types, which are declared in code and
|
|
6
|
+
* therefore carry none of the four audit fields.
|
|
7
|
+
*/
|
|
3
8
|
export class TypeRegistry {
|
|
4
|
-
map: Record<string,
|
|
5
|
-
constructor(public types:
|
|
9
|
+
map: Record<string, ContentObjectTypeCatalogEntry> = {};
|
|
10
|
+
constructor(public types: ContentObjectTypeCatalogEntry[]) {
|
|
6
11
|
//sort types
|
|
7
12
|
types.sort((a, b) => a.name.localeCompare(b.name));
|
|
8
13
|
for (const type of types) {
|
|
@@ -34,13 +34,21 @@ export function updateIntakePolicy(
|
|
|
34
34
|
return next as ContentTypeIntakePolicy;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
/**
|
|
38
|
+
* `number[][]` in, `[number, number][]` out.
|
|
39
|
+
*
|
|
40
|
+
* The policy type says `number[][]` — JSON has no tuples, and the published component has always
|
|
41
|
+
* described a two-element array rather than a pair — so the editor takes what the policy holds and
|
|
42
|
+
* returns the pair shape the form rows render. The `[1, 1]` default is what makes the result honest:
|
|
43
|
+
* a short row read out of a stored policy is completed rather than assumed.
|
|
44
|
+
*/
|
|
37
45
|
export function replaceIntakeRange(
|
|
38
|
-
ranges: [
|
|
46
|
+
ranges: number[][] | undefined,
|
|
39
47
|
index: number,
|
|
40
48
|
endpoint: 0 | 1,
|
|
41
49
|
value: number,
|
|
42
50
|
): [number, number][] {
|
|
43
|
-
const next = ranges?.map((range) => [
|
|
51
|
+
const next: [number, number][] = ranges?.map((range) => [range[0] ?? 1, range[1] ?? 1]) ?? [];
|
|
44
52
|
const current = next[index] ?? [1, 1];
|
|
45
53
|
current[endpoint] = value;
|
|
46
54
|
next[index] = current;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { VertesiaClient } from '@vertesia/client';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ContentObjectTypeCatalogEntry } from '@vertesia/common';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Browser-session cache for content-type catalog lookups, so render-time consumers
|
|
@@ -11,10 +11,17 @@ import type { ContentObjectTypeItem } from '@vertesia/common';
|
|
|
11
11
|
* lookups self-evict so the next view retries. In-app type edits must call
|
|
12
12
|
* `invalidateTypeCache` — edits made elsewhere (assistant, another tab) are picked up on
|
|
13
13
|
* the next session.
|
|
14
|
+
*
|
|
15
|
+
* Entries are `ContentObjectTypeCatalogEntry`, not `ContentObjectTypeItem`: the catalog resolves
|
|
16
|
+
* in-code types contributed by plugins, whose audit fields are absent, so `created_by` and its three
|
|
17
|
+
* siblings are optional here.
|
|
14
18
|
*/
|
|
15
|
-
const cachePerClient = new WeakMap<VertesiaClient, Map<string, Promise<
|
|
19
|
+
const cachePerClient = new WeakMap<VertesiaClient, Map<string, Promise<ContentObjectTypeCatalogEntry | undefined>>>();
|
|
16
20
|
|
|
17
|
-
export function resolveTypeCached(
|
|
21
|
+
export function resolveTypeCached(
|
|
22
|
+
client: VertesiaClient,
|
|
23
|
+
typeId: string,
|
|
24
|
+
): Promise<ContentObjectTypeCatalogEntry | undefined> {
|
|
18
25
|
let cache = cachePerClient.get(client);
|
|
19
26
|
if (!cache) {
|
|
20
27
|
cache = new Map();
|