@mgamadeus/ddd-agents 0.0.0-stage → 0.1.0-alpha.21
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/LICENSE +21 -0
- package/README.md +14 -2
- package/dist/chat.js +5263 -0
- package/dist/chat.js.map +1 -0
- package/dist/chunks/AgentsConversationClientContext-C4T7g_Qk.js +22 -0
- package/dist/chunks/AgentsConversationClientContext-C4T7g_Qk.js.map +1 -0
- package/dist/chunks/ConversationMarkdown-W7NHglmL.js +399 -0
- package/dist/chunks/ConversationMarkdown-W7NHglmL.js.map +1 -0
- package/dist/chunks/WebSearchResultsConversationWidget-BvnLWHyi.js +5059 -0
- package/dist/chunks/WebSearchResultsConversationWidget-BvnLWHyi.js.map +1 -0
- package/dist/chunks/canvas-behaviours-BRFR1ALE.js +45 -0
- package/dist/chunks/canvas-behaviours-BRFR1ALE.js.map +1 -0
- package/dist/chunks/canvas-feature-flags-BmmxC3bz.js +11 -0
- package/dist/chunks/canvas-feature-flags-BmmxC3bz.js.map +1 -0
- package/dist/chunks/canvasBodies-9SuF6NAB.js +289 -0
- package/dist/chunks/canvasBodies-9SuF6NAB.js.map +1 -0
- package/dist/chunks/d3-7.6.1.min.js-DTmPafrl.js +6 -0
- package/dist/chunks/d3-7.6.1.min.js-DTmPafrl.js.map +1 -0
- package/dist/chunks/decide-canvas-open-Ct-wnNEJ.js +20 -0
- package/dist/chunks/decide-canvas-open-Ct-wnNEJ.js.map +1 -0
- package/dist/chunks/widget-image-readiness-signal-DeOuL89j.js +25 -0
- package/dist/chunks/widget-image-readiness-signal-DeOuL89j.js.map +1 -0
- package/dist/chunks/widget-name-resolver-DyIY6Zu4.js +9736 -0
- package/dist/chunks/widget-name-resolver-DyIY6Zu4.js.map +1 -0
- package/dist/chunks/withPollingChangeSubscription-BLDAWF-o.js +251 -0
- package/dist/chunks/withPollingChangeSubscription-BLDAWF-o.js.map +1 -0
- package/dist/client-testing.js +346 -0
- package/dist/client-testing.js.map +1 -0
- package/dist/client.js +16 -0
- package/dist/client.js.map +1 -0
- package/dist/contract.js +31 -0
- package/dist/contract.js.map +1 -0
- package/dist/image-render.js +334 -0
- package/dist/image-render.js.map +1 -0
- package/dist/index.js +80 -0
- package/dist/index.js.map +1 -0
- package/dist/kit.js +13 -0
- package/dist/kit.js.map +1 -0
- package/dist/preview.js +733 -0
- package/dist/preview.js.map +1 -0
- package/dist/renderer.js +115 -0
- package/dist/renderer.js.map +1 -0
- package/dist/styles.css +6768 -0
- package/dist/types/chat/AgentChat/AgentChat.d.ts +37 -0
- package/dist/types/chat/AgentChatActivityHistory/AgentChatActivityHistory.d.ts +6 -0
- package/dist/types/chat/AgentChatActivityIndicator/AgentChatActivityIndicator.d.ts +8 -0
- package/dist/types/chat/CanvasPane/CanvasPane.d.ts +15 -0
- package/dist/types/chat/CanvasResizeHandle/CanvasResizeHandle.d.ts +10 -0
- package/dist/types/chat/CanvasResizeHandle/use-canvas-resize.d.ts +43 -0
- package/dist/types/chat/ConversationClosedBar/ConversationClosedBar.d.ts +10 -0
- package/dist/types/chat/ConversationErrorCard/ConversationErrorCard.d.ts +13 -0
- package/dist/types/chat/ConversationIntroCard/ConversationIntroCard.d.ts +10 -0
- package/dist/types/chat/ConversationLoadingStates.d.ts +2 -0
- package/dist/types/chat/ConversationMessage/ConversationCallMarkerChip/ConversationCallMarkerChip.d.ts +14 -0
- package/dist/types/chat/ConversationMessage/ConversationCallMarkerChip/VoiceBarsIcon/VoiceBarsIcon.d.ts +8 -0
- package/dist/types/chat/ConversationMessage/ConversationMessageSystem/ConversationMessageSystem.d.ts +8 -0
- package/dist/types/chat/ConversationMessage/ConversationMessageSystem/ConversationMessageSystemHeader/ConversationMessageSystemHeader.d.ts +9 -0
- package/dist/types/chat/ConversationMessage/ConversationMessageUser/ConversationMessageUser.d.ts +7 -0
- package/dist/types/chat/ConversationMessage/ConversationMessageUser/ConversationMessageUserWidgets.d.ts +14 -0
- package/dist/types/chat/ConversationMessage/ConversationMessageWidgets/ConversationMessageHeader/ConversationMessageHeader.d.ts +7 -0
- package/dist/types/chat/ConversationMessage/ConversationMessageWidgets/ConversationMessageThinking/ConversationMessageThinking.d.ts +7 -0
- package/dist/types/chat/ConversationMessage/ConversationMessageWidgets/ConversationMessageWidgets.d.ts +29 -0
- package/dist/types/chat/ConversationMessage/ConversationMessageWidgets/copyRichToClipboard.d.ts +1 -0
- package/dist/types/chat/ConversationMessage/ConversationMessageWidgets/hooks/useFreshMessageBlockReveal.d.ts +14 -0
- package/dist/types/chat/ConversationMessage/ConversationMessageWidgets/hooks/useStreamingText.d.ts +8 -0
- package/dist/types/chat/ConversationMessage/ConversationMessageWidgets/hooks/useTypewriter.d.ts +12 -0
- package/dist/types/chat/ConversationMessage/ConversationTaskInstructionDisclosure/ConversationTaskInstructionDisclosure.d.ts +12 -0
- package/dist/types/chat/ConversationMessageInput/ConversationMessageInput.d.ts +111 -0
- package/dist/types/chat/ConversationMessageInput/ConversationMessageInputAttachments/ConversationMessageInputAttachmentPreviewCard.d.ts +34 -0
- package/dist/types/chat/ConversationMessageInput/ConversationMessageInputAttachments/ConversationMessageInputAttachmentsErrorBox.d.ts +22 -0
- package/dist/types/chat/ConversationMessageInput/ConversationMessageInputAttachments/ConversationMessageInputAttachmentsPreviewStrip.d.ts +12 -0
- package/dist/types/chat/ConversationMessageInput/ConversationMessageInputAttachments/convert-bytes-to-size-string.d.ts +2 -0
- package/dist/types/chat/ConversationMessageInput/ConversationMessageInputComposerWidgets/ConversationMessageInputComposerWidgets.d.ts +12 -0
- package/dist/types/chat/ConversationMessageList/ConversationMessageList.d.ts +75 -0
- package/dist/types/chat/ConversationScrollToLatestMessageButton/ConversationScrollToLatestMessageButton.d.ts +6 -0
- package/dist/types/chat/ConversationSuggestionCard/ConversationSuggestionCard.d.ts +7 -0
- package/dist/types/chat/ConversationView.d.ts +216 -0
- package/dist/types/chat/ConversationViewBody/ConversationViewBody.d.ts +214 -0
- package/dist/types/chat/ConversationViewBody/hooks/useIsMessagesBottomOutOfView.d.ts +2 -0
- package/dist/types/chat/ConversationViewBody/hooks/usePinQuestionOnSend.d.ts +24 -0
- package/dist/types/chat/assistant-message-has-renderable-markdown.d.ts +13 -0
- package/dist/types/chat/chat-assistant-identity.d.ts +24 -0
- package/dist/types/chat/chat-message.d.ts +11 -0
- package/dist/types/chat/controller/AgentChatController.d.ts +97 -0
- package/dist/types/chat/controller/activity-ticker.d.ts +120 -0
- package/dist/types/chat/controller/changed-messages-request.d.ts +12 -0
- package/dist/types/chat/controller/chat-scroll-target.d.ts +10 -0
- package/dist/types/chat/controller/conversation-change-signal-rules.d.ts +64 -0
- package/dist/types/chat/controller/derive-agent-activity.d.ts +31 -0
- package/dist/types/chat/controller/merge-activity-elements.d.ts +25 -0
- package/dist/types/chat/controller/pending-start-request.d.ts +38 -0
- package/dist/types/chat/controller/use-activity-ticker.d.ts +60 -0
- package/dist/types/chat/controller/use-conversation-activity.d.ts +38 -0
- package/dist/types/chat/controller/use-conversation-live-updates.d.ts +30 -0
- package/dist/types/chat/controller/use-conversation-message-pages.d.ts +24 -0
- package/dist/types/chat/controller/use-conversation-scroll-jump.d.ts +47 -0
- package/dist/types/chat/controller/use-conversation-search.d.ts +31 -0
- package/dist/types/chat/controller/use-conversation-signals.d.ts +44 -0
- package/dist/types/chat/controller/use-debounced-semantic-search.d.ts +15 -0
- package/dist/types/chat/conversation-send-message.d.ts +43 -0
- package/dist/types/chat/last-wire-message-is-unanswered-user-message.d.ts +22 -0
- package/dist/types/chat/normalize-server-message-to-markdown.d.ts +23 -0
- package/dist/types/chat/store/agents-chat-state.d.ts +132 -0
- package/dist/types/chat/store/conversation-error-type.d.ts +32 -0
- package/dist/types/chat/store/create-agents-chat-store.d.ts +23 -0
- package/dist/types/chat/store/index.d.ts +5 -0
- package/dist/types/chat/store/merge-chat-messages.d.ts +20 -0
- package/dist/types/chat/store/reduce-agents-chat-state.d.ts +7 -0
- package/dist/types/chat/store/use-agents-chat-store.d.ts +22 -0
- package/dist/types/chat/strip-pre-call-message-marker.d.ts +12 -0
- package/dist/types/chat/use-canvas-shell-transitions.d.ts +25 -0
- package/dist/types/client/AgentsConversationClient.d.ts +93 -0
- package/dist/types/client/AgentsConversationClientContext.d.ts +17 -0
- package/dist/types/client/polling/createPollingConversationChangeSubscription.d.ts +62 -0
- package/dist/types/client/polling/withPollingChangeSubscription.d.ts +11 -0
- package/dist/types/client/testing/createInMemoryAgentsConversationClient.d.ts +139 -0
- package/dist/types/contract/conversation.d.ts +370 -0
- package/dist/types/entries/chat.d.ts +21 -0
- package/dist/types/entries/client-testing.d.ts +1 -0
- package/dist/types/entries/client.d.ts +4 -0
- package/dist/types/entries/contract.d.ts +1 -0
- package/dist/types/entries/image-render.d.ts +9 -0
- package/dist/types/entries/index.d.ts +9 -0
- package/dist/types/entries/kit.d.ts +4 -0
- package/dist/types/entries/preview.d.ts +8 -0
- package/dist/types/entries/renderer.d.ts +15 -0
- package/dist/types/entries/widgets.d.ts +16 -0
- package/dist/types/image-render/ComposedViewEmailDataTimes/ComposedViewEmailDataTimes.d.ts +15 -0
- package/dist/types/image-render/WidgetImageRender.d.ts +55 -0
- package/dist/types/image-render/WidgetImageRenderContext.d.ts +14 -0
- package/dist/types/image-render/composed-view-data-times.d.ts +20 -0
- package/dist/types/image-render/frozen-widget-requests.d.ts +2 -0
- package/dist/types/image-render/live-widget-requests.d.ts +4 -0
- package/dist/types/image-render/widget-image-google-map.d.ts +7 -0
- package/dist/types/image-render/widget-image-readiness-signal.d.ts +16 -0
- package/dist/types/image-render/widget-image-readiness.d.ts +9 -0
- package/dist/types/image-render/widget-image-render.types.d.ts +47 -0
- package/dist/types/kit/ComposedViewConversationWidget.d.ts +14 -0
- package/dist/types/kit/ComposedViewDataSourceLoader.d.ts +20 -0
- package/dist/types/kit/ComposedViewRenderer.d.ts +30 -0
- package/dist/types/kit/ComposedViewSlotErrorBoundary.d.ts +23 -0
- package/dist/types/kit/ModelText/ModelText.d.ts +12 -0
- package/dist/types/kit/components/embedding/EmbeddedConversationWidget.d.ts +26 -0
- package/dist/types/kit/components/map/map-full-screen-instance.d.ts +26 -0
- package/dist/types/kit/components/map/map-presentation-context.d.ts +8 -0
- package/dist/types/kit/components/text/shared/text-node-values.d.ts +39 -0
- package/dist/types/kit/composed-view-component-types.d.ts +61 -0
- package/dist/types/kit/composed-view-components.d.ts +7 -0
- package/dist/types/kit/composed-view-tones.d.ts +20 -0
- package/dist/types/kit/entity-detail/EntityDetailCanvasBody.d.ts +9 -0
- package/dist/types/kit/entity-detail/entity-detail-bodies.d.ts +32 -0
- package/dist/types/kit/entity-detail/entity-detail-name.d.ts +9 -0
- package/dist/types/kit/hooks/use-debounced-value.d.ts +2 -0
- package/dist/types/kit/map-full-screen/MapFullScreenCanvasBody.d.ts +11 -0
- package/dist/types/preview/WidgetPreviewHost.d.ts +20 -0
- package/dist/types/preview/preview-stub-components.d.ts +3 -0
- package/dist/types/preview/widget-preview-fixtures.d.ts +17 -0
- package/dist/types/preview/widget-preview-hydration.d.ts +10 -0
- package/dist/types/preview/widget-preview-readiness.d.ts +27 -0
- package/dist/types/preview/widget-preview-requests.d.ts +16 -0
- package/dist/types/preview/widget-preview-signal.d.ts +10 -0
- package/dist/types/preview/widget-preview.types.d.ts +134 -0
- package/dist/types/provider/AgentsProvider.d.ts +33 -0
- package/dist/types/provider/class-names.d.ts +7 -0
- package/dist/types/provider/components/default-components.d.ts +3 -0
- package/dist/types/provider/components/icon-names.d.ts +9 -0
- package/dist/types/provider/components/index.d.ts +39 -0
- package/dist/types/provider/components/types.d.ts +463 -0
- package/dist/types/provider/environment.d.ts +262 -0
- package/dist/types/provider/index.d.ts +4 -0
- package/dist/types/renderer/ConversationDeepLinkedWidget.d.ts +18 -0
- package/dist/types/renderer/ConversationMarkdown.d.ts +21 -0
- package/dist/types/renderer/ConversationWidgetActions/ConversationWidgetActions.d.ts +7 -0
- package/dist/types/renderer/ConversationWidgetCallbacksContext.d.ts +234 -0
- package/dist/types/renderer/ConversationWidgetContext.d.ts +32 -0
- package/dist/types/renderer/ConversationWidgetErrorBoundary.d.ts +25 -0
- package/dist/types/renderer/ConversationWidgetHost.d.ts +36 -0
- package/dist/types/renderer/ConversationWidgetRenderContext.d.ts +3 -0
- package/dist/types/renderer/MarkdownLink.d.ts +6 -0
- package/dist/types/renderer/WindowedWidget/WindowedWidget.d.ts +16 -0
- package/dist/types/renderer/_access/ConversationWidgetFeatureGate.d.ts +21 -0
- package/dist/types/renderer/_agent-space/ConversationWidgetAgentSpaceFrame.d.ts +12 -0
- package/dist/types/renderer/_agent-space/ConversationWidgetAgentSpaceHeader.d.ts +15 -0
- package/dist/types/renderer/_agent-space/agent-space-name.hydrator.d.ts +7 -0
- package/dist/types/renderer/_agent-space/declared-agent-space-key-field-name.d.ts +8 -0
- package/dist/types/renderer/_agent-space/use-resolved-conversation-widget-agent-space-key.d.ts +16 -0
- package/dist/types/renderer/_agent-space/widget-agent-space-key-attribute.d.ts +13 -0
- package/dist/types/renderer/balanced-json-object.d.ts +12 -0
- package/dist/types/renderer/canvas/CanvasRestoreOnMount.d.ts +19 -0
- package/dist/types/renderer/canvas/canvas-behaviours.d.ts +84 -0
- package/dist/types/renderer/canvas/canvas-body-props.d.ts +18 -0
- package/dist/types/renderer/canvas/canvas-feature-flags.d.ts +11 -0
- package/dist/types/renderer/canvas/canvas-reducers.d.ts +46 -0
- package/dist/types/renderer/canvas/canvas-state.d.ts +107 -0
- package/dist/types/renderer/canvas/canvasBodies.d.ts +19 -0
- package/dist/types/renderer/canvas/canvasStorage.d.ts +25 -0
- package/dist/types/renderer/canvas/decide-canvas-open.d.ts +32 -0
- package/dist/types/renderer/canvas/entity-detail-instance.d.ts +27 -0
- package/dist/types/renderer/canvas/find-widget-fences-in-markdown.d.ts +32 -0
- package/dist/types/renderer/canvas/use-anchor-widget-payload.d.ts +8 -0
- package/dist/types/renderer/composer-widget-fence.d.ts +30 -0
- package/dist/types/renderer/conversation-composer-widget.d.ts +13 -0
- package/dist/types/renderer/conversation-widget-props.d.ts +54 -0
- package/dist/types/renderer/conversation-widget-state-partition.d.ts +31 -0
- package/dist/types/renderer/conversationWidgetAstPlugin.d.ts +11 -0
- package/dist/types/renderer/conversationWidgetRegistry.d.ts +74 -0
- package/dist/types/renderer/detect-unrendered-widgets.d.ts +42 -0
- package/dist/types/renderer/markdown-contains-widget.d.ts +13 -0
- package/dist/types/renderer/reference-naked-widget-json.d.ts +1 -0
- package/dist/types/renderer/remarkWidgetFencePlugin.d.ts +22 -0
- package/dist/types/renderer/render-report/widget-render-report-collector.d.ts +57 -0
- package/dist/types/renderer/render-report/widget-render-report.d.ts +29 -0
- package/dist/types/renderer/repair-malformed-widget-fences.d.ts +11 -0
- package/dist/types/renderer/resolve-deep-linkable-widget.d.ts +25 -0
- package/dist/types/renderer/restoreTextDirectivesPlugin.d.ts +12 -0
- package/dist/types/renderer/widget-click-signal-sources.d.ts +15 -0
- package/dist/types/renderer/widget-fence-json.d.ts +16 -0
- package/dist/types/renderer/widget-fence-syntax.d.ts +25 -0
- package/dist/types/renderer/widget-hydration/index.d.ts +8 -0
- package/dist/types/renderer/widget-hydration/section-hydration.d.ts +41 -0
- package/dist/types/renderer/widget-hydration/use-widget-hydration.d.ts +27 -0
- package/dist/types/renderer/widget-hydration/widget-hydration-state-store.d.ts +27 -0
- package/dist/types/renderer/widget-hydration/widget-hydration.reducer.d.ts +39 -0
- package/dist/types/renderer/widget-hydration/widget-hydration.registry.d.ts +7 -0
- package/dist/types/renderer/widget-hydration/widget-hydration.slice.d.ts +8 -0
- package/dist/types/renderer/widget-hydration/widget-hydration.types.d.ts +27 -0
- package/dist/types/renderer/widget-name-resolver.d.ts +22 -0
- package/dist/types/renderer/widget-tree/bounded-json.d.ts +23 -0
- package/dist/types/renderer/widget-tree/composed-node-schema.d.ts +143 -0
- package/dist/types/renderer/widget-tree/composed-view-data-sources.d.ts +41 -0
- package/dist/types/renderer/widget-tree/composed-view-tree.d.ts +111 -0
- package/dist/types/renderer/widget-tree/expression/evaluate-expression.d.ts +65 -0
- package/dist/types/renderer/widget-tree/expression/parse-expression.d.ts +71 -0
- package/dist/types/renderer/widget-tree/resolve-composed-view-values.d.ts +49 -0
- package/dist/types/renderer/widget-tree/use-composed-view-state.d.ts +16 -0
- package/dist/types/renderer/widget-windowing.d.ts +25 -0
- package/dist/types/widgets/CanvasWidgetCard/CanvasWidgetCard.d.ts +79 -0
- package/dist/types/widgets/CanvasWidgetCard/CanvasWidgetSwitch.d.ts +61 -0
- package/dist/types/widgets/CanvasWidgetCard/canvas-for-message-widget.d.ts +8 -0
- package/dist/types/widgets/CanvasWidgetCard/use-canvas-viable.d.ts +15 -0
- package/dist/types/widgets/ClockConversationWidget/ClockConversationWidget.d.ts +11 -0
- package/dist/types/widgets/ClockConversationWidget/ClockWidget/AnalogClockFace.d.ts +12 -0
- package/dist/types/widgets/ClockConversationWidget/ClockWidget/ClockRow.d.ts +23 -0
- package/dist/types/widgets/ClockConversationWidget/ClockWidget/ClockWidget.d.ts +21 -0
- package/dist/types/widgets/ClockConversationWidget/ClockWidget/DayNightGlyph.d.ts +8 -0
- package/dist/types/widgets/ClockConversationWidget/shared/clock-time.d.ts +52 -0
- package/dist/types/widgets/ClockConversationWidget/shared/clock-widget-payload.d.ts +23 -0
- package/dist/types/widgets/ClockConversationWidget/shared/use-clock-settings.d.ts +18 -0
- package/dist/types/widgets/ConceptExplainerConversationWidget/ConceptExplainerConversationWidget.d.ts +14 -0
- package/dist/types/widgets/ConceptExplainerConversationWidget/ConceptExplainerWidget/ConceptExplainerWidget.d.ts +27 -0
- package/dist/types/widgets/ConceptExplainerConversationWidget/shared/ConceptExplainerTextView.d.ts +11 -0
- package/dist/types/widgets/ConceptExplainerConversationWidget/shared/concept-explainer-type.d.ts +89 -0
- package/dist/types/widgets/ConceptExplainerConversationWidget/shared/concept-explainer-types.d.ts +17 -0
- package/dist/types/widgets/ConceptExplainerConversationWidget/shared/concept-explainer-widget-payload.d.ts +25 -0
- package/dist/types/widgets/ConceptExplainerConversationWidget/shared/use-concept-explainer-language.d.ts +8 -0
- package/dist/types/widgets/ConversationSearchResultsConversationWidget/ConversationSearchResultsCanvas.d.ts +9 -0
- package/dist/types/widgets/ConversationSearchResultsConversationWidget/ConversationSearchResultsCanvasBody.d.ts +7 -0
- package/dist/types/widgets/ConversationSearchResultsConversationWidget/ConversationSearchResultsConversationWidget.d.ts +15 -0
- package/dist/types/widgets/ConversationSearchResultsConversationWidget/shared/conversation-search-results-widget-payload.d.ts +42 -0
- package/dist/types/widgets/ConversationSearchResultsConversationWidget/shared/search-hit-excerpt.d.ts +1 -0
- package/dist/types/widgets/CurrencyConverterConversationWidget/CurrencyConverterConversationWidget.d.ts +8 -0
- package/dist/types/widgets/CurrencyConverterConversationWidget/CurrencyConverterWidget/CurrencyConverterWidget.d.ts +17 -0
- package/dist/types/widgets/CurrencyConverterConversationWidget/CurrencyConverterWidget/CurrencyLabel/CurrencyLabel.d.ts +9 -0
- package/dist/types/widgets/CurrencyConverterConversationWidget/shared/currency-converter-widget-payload.d.ts +22 -0
- package/dist/types/widgets/CurrencyConverterConversationWidget/shared/currency-display.d.ts +30 -0
- package/dist/types/widgets/CustomVisualizationConversationWidget/CustomVisualizationConversationWidget.d.ts +11 -0
- package/dist/types/widgets/CustomVisualizationConversationWidget/CustomVisualizationWidget/CustomVisualizationFrame.d.ts +14 -0
- package/dist/types/widgets/CustomVisualizationConversationWidget/CustomVisualizationWidget/CustomVisualizationWidget.d.ts +15 -0
- package/dist/types/widgets/CustomVisualizationConversationWidget/shared/custom-visualization-frame-protocol.d.ts +77 -0
- package/dist/types/widgets/CustomVisualizationConversationWidget/shared/custom-visualization-libraries.d.ts +25 -0
- package/dist/types/widgets/CustomVisualizationConversationWidget/shared/custom-visualization-sandbox-config.d.ts +21 -0
- package/dist/types/widgets/CustomVisualizationConversationWidget/shared/custom-visualization-widget-payload.d.ts +55 -0
- package/dist/types/widgets/CustomVisualizationConversationWidget/shared/read-custom-visualization-theme.d.ts +5 -0
- package/dist/types/widgets/EntityMentionConversationWidget/EntityMentionAskButton/EntityMentionAskButton.d.ts +13 -0
- package/dist/types/widgets/EntityMentionConversationWidget/EntityMentionCard/EntityMentionCard.d.ts +11 -0
- package/dist/types/widgets/EntityMentionConversationWidget/EntityMentionConversationWidget.d.ts +9 -0
- package/dist/types/widgets/EntityMentionConversationWidget/shared/entity-mention-presentation.d.ts +4 -0
- package/dist/types/widgets/EntityMentionConversationWidget/shared/entity-mention.d.ts +33 -0
- package/dist/types/widgets/EntityMentionConversationWidget/shared/use-entity-mention-composer.d.ts +17 -0
- package/dist/types/widgets/MultiChoiceConversationWidget/MultiChoiceConversationWidget.d.ts +2 -0
- package/dist/types/widgets/MultiChoiceConversationWidget/shared/multi-choice-widget-payload.d.ts +16 -0
- package/dist/types/widgets/QuickRepliesConversationWidget/QuickRepliesConversationWidget.d.ts +38 -0
- package/dist/types/widgets/QuickRepliesConversationWidget/shared/quick-replies-widget-payload.d.ts +20 -0
- package/dist/types/widgets/SuggestedActions/SuggestedActions.d.ts +10 -0
- package/dist/types/widgets/ToolTraceConversationWidget/ToolTraceConversationWidget.d.ts +8 -0
- package/dist/types/widgets/WebSearchResultsConversationWidget/SourceFavicon.d.ts +10 -0
- package/dist/types/widgets/WebSearchResultsConversationWidget/WebSearchAnswer.d.ts +6 -0
- package/dist/types/widgets/WebSearchResultsConversationWidget/WebSearchReferences.d.ts +12 -0
- package/dist/types/widgets/WebSearchResultsConversationWidget/WebSearchResultsCanvas.d.ts +10 -0
- package/dist/types/widgets/WebSearchResultsConversationWidget/WebSearchResultsCanvasBody.d.ts +7 -0
- package/dist/types/widgets/WebSearchResultsConversationWidget/WebSearchResultsConversationWidget.d.ts +14 -0
- package/dist/types/widgets/WebSearchResultsConversationWidget/WebSearchSourcesList.d.ts +10 -0
- package/dist/types/widgets/WebSearchResultsConversationWidget/shared/display-hostname.d.ts +9 -0
- package/dist/types/widgets/WebSearchResultsConversationWidget/shared/web-search-results-widget-payload.d.ts +30 -0
- package/dist/types/widgets/WritingDraftConversationWidget/WritingDraftConversationWidget.d.ts +14 -0
- package/dist/types/widgets/WritingDraftConversationWidget/WritingDraftWidget/WritingDraftBody.d.ts +9 -0
- package/dist/types/widgets/WritingDraftConversationWidget/WritingDraftWidget/WritingDraftWidget.d.ts +44 -0
- package/dist/types/widgets/WritingDraftConversationWidget/shared/draft-mail-link.d.ts +17 -0
- package/dist/types/widgets/WritingDraftConversationWidget/shared/draft-plain-text.d.ts +7 -0
- package/dist/types/widgets/WritingDraftConversationWidget/shared/remark-draft-line-breaks.d.ts +13 -0
- package/dist/types/widgets/WritingDraftConversationWidget/shared/writing-draft-widget-payload.d.ts +23 -0
- package/dist/types/widgets/_shared/ConversationWidgetButton.d.ts +4 -0
- package/dist/types/widgets/_shared/DonePill.d.ts +14 -0
- package/dist/types/widgets/_shared/modern/WidgetKpiValue.d.ts +24 -0
- package/dist/types/widgets/_shared/modern/WidgetListRow.d.ts +14 -0
- package/dist/types/widgets/_shared/modern/WidgetStatusChip.d.ts +8 -0
- package/dist/types/widgets/_shared/modern/WidgetSurface.d.ts +13 -0
- package/dist/types/widgets/_shared/modern/WidgetSurfaceSkeleton.d.ts +11 -0
- package/dist/types/widgets/_shared/modern/index.d.ts +16 -0
- package/dist/types/widgets/_shared/skeleton-primitives.d.ts +20 -0
- package/dist/types/widgets/_shared/use-stack-when-wrapped.d.ts +6 -0
- package/dist/types/widgets/_shared/widget-payload-validation.d.ts +22 -0
- package/dist/widgets.js +84 -0
- package/dist/widgets.js.map +1 -0
- package/package.json +147 -3
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { K as getFurtherCanvasBehaviours } from "./WebSearchResultsConversationWidget-BvnLWHyi.js";
|
|
3
|
+
const DEFAULT_CANVAS_WIDTH_PERCENT = 50;
|
|
4
|
+
const CANVAS_MIN_WIDTH_PX = 420;
|
|
5
|
+
const CHAT_COLUMN_MIN_WIDTH_PX = 360;
|
|
6
|
+
const CANVAS_BOXED_INSET_PX = 8;
|
|
7
|
+
const CANVAS_FILLS_SCREEN_WIDTH_PERCENT = 72;
|
|
8
|
+
const packageCanvasBehaviours = {
|
|
9
|
+
conversationSearchResults: { lifetime: "turn", layout: "split", narrowViewport: "none", fullBleed: false },
|
|
10
|
+
webSearchResults: { lifetime: "turn", layout: "split", narrowViewport: "none", fullBleed: false },
|
|
11
|
+
// One entity's detail, opened from a ComposedView row (`openEntity`) — a click, never a live delivery.
|
|
12
|
+
entityDetail: { lifetime: "turn", layout: "split", widthPercent: 40, narrowViewport: "none", fullBleed: false },
|
|
13
|
+
// A ComposedView `Map` node, full screen — the widest split a turn canvas takes, the map flush.
|
|
14
|
+
mapFullScreen: { lifetime: "turn", layout: "split", widthPercent: 65, narrowViewport: "none", fullBleed: true }
|
|
15
|
+
};
|
|
16
|
+
const hasOwnCanvasBehaviour = (behaviours, canvasId) => Object.prototype.hasOwnProperty.call(behaviours, canvasId);
|
|
17
|
+
const canvasBehaviourOf = (canvasId) => {
|
|
18
|
+
if (hasOwnCanvasBehaviour(packageCanvasBehaviours, canvasId)) {
|
|
19
|
+
return packageCanvasBehaviours[canvasId];
|
|
20
|
+
}
|
|
21
|
+
const furtherCanvasBehaviours = getFurtherCanvasBehaviours();
|
|
22
|
+
return hasOwnCanvasBehaviour(furtherCanvasBehaviours, canvasId) ? furtherCanvasBehaviours[canvasId] : void 0;
|
|
23
|
+
};
|
|
24
|
+
const getDeclaredCanvasIds = () => {
|
|
25
|
+
const packageCanvasIds = Object.keys(packageCanvasBehaviours);
|
|
26
|
+
const furtherCanvasIds = Object.keys(getFurtherCanvasBehaviours()).filter(
|
|
27
|
+
(canvasId) => !packageCanvasIds.includes(canvasId)
|
|
28
|
+
);
|
|
29
|
+
return [...packageCanvasIds, ...furtherCanvasIds];
|
|
30
|
+
};
|
|
31
|
+
const isCanvasId = (value) => typeof value === "string" && canvasBehaviourOf(value) !== void 0;
|
|
32
|
+
const canvasWidthPercentOf = (behaviour) => behaviour.layout === "canvasFillsScreen" ? CANVAS_FILLS_SCREEN_WIDTH_PERCENT : behaviour.widthPercent ?? DEFAULT_CANVAS_WIDTH_PERCENT;
|
|
33
|
+
export {
|
|
34
|
+
CANVAS_BOXED_INSET_PX as C,
|
|
35
|
+
DEFAULT_CANVAS_WIDTH_PERCENT as D,
|
|
36
|
+
CANVAS_FILLS_SCREEN_WIDTH_PERCENT as a,
|
|
37
|
+
CANVAS_MIN_WIDTH_PX as b,
|
|
38
|
+
CHAT_COLUMN_MIN_WIDTH_PX as c,
|
|
39
|
+
canvasBehaviourOf as d,
|
|
40
|
+
canvasWidthPercentOf as e,
|
|
41
|
+
getDeclaredCanvasIds as g,
|
|
42
|
+
isCanvasId as i,
|
|
43
|
+
packageCanvasBehaviours as p
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=canvas-behaviours-BRFR1ALE.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canvas-behaviours-BRFR1ALE.js","sources":["../../src/renderer/canvas/canvas-behaviours.ts"],"sourcesContent":["import { getFurtherCanvasBehaviours } from \"../../provider/environment\";\n\n/**\n * The CANVAS BEHAVIOURS — one declaration per canvas of how it lives on the surface: how long it stays (`lifetime`),\n * how it takes the screen (`layout`), what happens on a narrow viewport and whether its body starts flush at the top.\n *\n * Keyed on a CANVAS id, not a widget name: one body may have several openers, and one widget can be inline with a\n * detail canvas. The widget registry lists which canvases a widget may open (`opensCanvases`); the canvas BODIES (React\n * components) live in `canvasBodies.tsx`, imported only by the shell. The package declares the canvases of its own\n * widgets here (`packageCanvasBehaviours`); an app declares the canvases of its widgets on its agents environment\n * (`AgentsEnvironment.furtherCanvasBehaviours`), read at every lookup. This module imports nothing but the environment\n * module (which has no runtime imports), so the conversation slice and its specs can read it during store\n * initialisation (the widget registry is downstream of the store; a slice → registry import forms a temporal-dead-zone\n * cycle).\n */\n\n/** The canvases of the package's own widgets. */\nexport type PackageCanvasId = \"conversationSearchResults\" | \"webSearchResults\" | \"entityDetail\" | \"mapFullScreen\";\n\n/**\n * The id of a canvas: one of the package's (`PackageCanvasId`) or one an app declares\n * (`AgentsEnvironment.furtherCanvasBehaviours`). Append-only while a stored pointer (`canvasStorage.ts`) may still name\n * the id. A string, because the app's ids are not known to the package; `isCanvasId` checks a value against both.\n */\nexport type CanvasId = PackageCanvasId | (string & {});\n\n/**\n * `turn`: the canvas belongs to one question — the next SEND closes it for good (the card in the transcript is the\n * way back). `pinned`: a work surface for the whole conversation — it stays through sends and stays re-openable after\n * the customer closes it. Lifetime says nothing about a reload: the canvas open at reload time is restored for BOTH.\n */\nexport type CanvasLifetime = \"turn\" | \"pinned\";\n\n/**\n * `split`: the canvas is the right pane beside the chat. `canvasFillsScreen`: the canvas takes the screen and the chat\n * becomes the narrow companion (a full work surface such as an editor); the host's compact mode is overridden while it\n * is open.\n */\nexport type CanvasLayout = \"split\" | \"canvasFillsScreen\";\n\n/**\n * Below the viable split width (`CANVAS_VIABLE_MIN_WIDTH`): `none` — a live delivery does not take the phone screen\n * over (the card stays, the customer taps it), and the wide → narrow crossing closes an open canvas; `overlay` — the\n * canvas is the widget's only surface, so it opens as the full-screen overlay and survives the crossing.\n */\nexport type CanvasNarrowViewport = \"none\" | \"overlay\";\n\nexport interface CanvasBehaviour {\n readonly lifetime: CanvasLifetime;\n readonly layout: CanvasLayout;\n /** Width of the canvas pane as a percentage of the split. Only read for `layout: \"split\"`; default 50. */\n readonly widthPercent?: number;\n readonly narrowViewport: CanvasNarrowViewport;\n /**\n * The body starts flush at its top edge (a hero image, an iframe) — the pane keeps its gap under the close row, unless\n * `overlayCloseButton` floats the row over the body.\n */\n readonly fullBleed: boolean;\n /**\n * The close button floats over the body's top edge instead of reserving a row of its own, and the pane drops its top\n * and side padding — for a body whose top (a hero image) may sit under the button. The button is then muted\n * `inverted` + `onDark`, since it sits on the dark image. Default false: the row stays in flow so it never covers\n * content.\n */\n readonly overlayCloseButton?: boolean;\n}\n\n/** Width of the canvas pane (% of the split) when a behaviour declares none. */\nexport const DEFAULT_CANVAS_WIDTH_PERCENT = 50;\n\n/** The narrowest the customer can pull the canvas (px); pulling further and holding folds the tab into \"close\". */\nexport const CANVAS_MIN_WIDTH_PX = 420;\n\n/** What the chat column keeps beside the widest canvas (px). */\nexport const CHAT_COLUMN_MIN_WIDTH_PX = 360;\n\n/**\n * The boxed canvas card's inset from its pane edge (px) — the pull tab sits on the card's edge, not the pane's. The\n * pane's padding reads it as `--agents-canvas-inset` (`.splitViewPaneBoxed`), so this is the one place it is set.\n */\nexport const CANVAS_BOXED_INSET_PX = 8;\n\n/** Width of the canvas pane for `layout: \"canvasFillsScreen\"` — the chat keeps a narrow companion column. */\nexport const CANVAS_FILLS_SCREEN_WIDTH_PERCENT = 72;\n\n/** The canvases of the package's own widgets. */\nexport const packageCanvasBehaviours: Readonly<Record<PackageCanvasId, CanvasBehaviour>> = {\n conversationSearchResults: { lifetime: \"turn\", layout: \"split\", narrowViewport: \"none\", fullBleed: false },\n webSearchResults: { lifetime: \"turn\", layout: \"split\", narrowViewport: \"none\", fullBleed: false },\n // One entity's detail, opened from a ComposedView row (`openEntity`) — a click, never a live delivery.\n entityDetail: { lifetime: \"turn\", layout: \"split\", widthPercent: 40, narrowViewport: \"none\", fullBleed: false },\n // A ComposedView `Map` node, full screen — the widest split a turn canvas takes, the map flush.\n mapFullScreen: { lifetime: \"turn\", layout: \"split\", widthPercent: 65, narrowViewport: \"none\", fullBleed: true },\n};\n\nconst hasOwnCanvasBehaviour = (behaviours: Readonly<Record<string, CanvasBehaviour>>, canvasId: string): boolean =>\n Object.prototype.hasOwnProperty.call(behaviours, canvasId);\n\n/**\n * The behaviour of a canvas: the package's own, else the one the app declares\n * (`AgentsEnvironment.furtherCanvasBehaviours`); undefined for an id nobody declared (a stale stored pointer, a typo —\n * the opening rule ignores it). An app cannot replace a package canvas's behaviour.\n */\nexport const canvasBehaviourOf = (canvasId: CanvasId): CanvasBehaviour | undefined => {\n if (hasOwnCanvasBehaviour(packageCanvasBehaviours, canvasId)) {\n return packageCanvasBehaviours[canvasId as PackageCanvasId];\n }\n const furtherCanvasBehaviours = getFurtherCanvasBehaviours();\n return hasOwnCanvasBehaviour(furtherCanvasBehaviours, canvasId) ? furtherCanvasBehaviours[canvasId] : undefined;\n};\n\n/** Every declared canvas id: the package's own first, then the app's further ones. */\nexport const getDeclaredCanvasIds = (): readonly CanvasId[] => {\n const packageCanvasIds = Object.keys(packageCanvasBehaviours);\n const furtherCanvasIds = Object.keys(getFurtherCanvasBehaviours()).filter(\n (canvasId) => !packageCanvasIds.includes(canvasId),\n );\n return [...packageCanvasIds, ...furtherCanvasIds];\n};\n\n/** Type guard for a value read from untrusted input (`sessionStorage`, a URL): is it a declared canvas id? */\nexport const isCanvasId = (value: unknown): value is CanvasId =>\n typeof value === \"string\" && canvasBehaviourOf(value) !== undefined;\n\nexport const canvasWidthPercentOf = (behaviour: CanvasBehaviour): number =>\n behaviour.layout === \"canvasFillsScreen\"\n ? CANVAS_FILLS_SCREEN_WIDTH_PERCENT\n : (behaviour.widthPercent ?? DEFAULT_CANVAS_WIDTH_PERCENT);\n"],"names":[],"mappings":";;AAoEO,MAAM,+BAA+B;AAGrC,MAAM,sBAAsB;AAG5B,MAAM,2BAA2B;AAMjC,MAAM,wBAAwB;AAG9B,MAAM,oCAAoC;AAG1C,MAAM,0BAA8E;AAAA,EACzF,2BAA2B,EAAE,UAAU,QAAQ,QAAQ,SAAS,gBAAgB,QAAQ,WAAW,MAAA;AAAA,EACnG,kBAAkB,EAAE,UAAU,QAAQ,QAAQ,SAAS,gBAAgB,QAAQ,WAAW,MAAA;AAAA;AAAA,EAE1F,cAAc,EAAE,UAAU,QAAQ,QAAQ,SAAS,cAAc,IAAI,gBAAgB,QAAQ,WAAW,MAAA;AAAA;AAAA,EAExG,eAAe,EAAE,UAAU,QAAQ,QAAQ,SAAS,cAAc,IAAI,gBAAgB,QAAQ,WAAW,KAAA;AAC3G;AAEA,MAAM,wBAAwB,CAAC,YAAuD,aACpF,OAAO,UAAU,eAAe,KAAK,YAAY,QAAQ;AAOpD,MAAM,oBAAoB,CAAC,aAAoD;AACpF,MAAI,sBAAsB,yBAAyB,QAAQ,GAAG;AAC5D,WAAO,wBAAwB,QAA2B;AAAA,EAC5D;AACA,QAAM,0BAA0B,2BAAA;AAChC,SAAO,sBAAsB,yBAAyB,QAAQ,IAAI,wBAAwB,QAAQ,IAAI;AACxG;AAGO,MAAM,uBAAuB,MAA2B;AAC7D,QAAM,mBAAmB,OAAO,KAAK,uBAAuB;AAC5D,QAAM,mBAAmB,OAAO,KAAK,2BAAA,CAA4B,EAAE;AAAA,IACjE,CAAC,aAAa,CAAC,iBAAiB,SAAS,QAAQ;AAAA,EAAA;AAEnD,SAAO,CAAC,GAAG,kBAAkB,GAAG,gBAAgB;AAClD;AAGO,MAAM,aAAa,CAAC,UACzB,OAAO,UAAU,YAAY,kBAAkB,KAAK,MAAM;AAErD,MAAM,uBAAuB,CAAC,cACnC,UAAU,WAAW,sBACjB,oCACC,UAAU,gBAAgB;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const canvasFeatureFlags = {};
|
|
3
|
+
const registerCanvasFeatureFlags = (featureFlags) => {
|
|
4
|
+
Object.assign(canvasFeatureFlags, featureFlags);
|
|
5
|
+
};
|
|
6
|
+
const canvasFeatureFlagOf = (canvasId) => canvasFeatureFlags[canvasId];
|
|
7
|
+
export {
|
|
8
|
+
canvasFeatureFlagOf as c,
|
|
9
|
+
registerCanvasFeatureFlags as r
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=canvas-feature-flags-BmmxC3bz.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canvas-feature-flags-BmmxC3bz.js","sources":["../../src/renderer/canvas/canvas-feature-flags.ts"],"sourcesContent":["import type { CanvasId } from \"./canvas-behaviours\";\n\n/**\n * The requirement (an app feature flag, opaque to the package) a CANVAS requires — the same one its opening widget\n * declares in the registry. Owned by the canvas (not read off an opener) because a restored or page-opened canvas has\n * no widget mount to inherit it from; the shell wraps a gated body in `ConversationWidgetFeatureGate`. An app names\n * the requirements of its canvases with `registerCanvasFeatureFlags`; the package's own canvases are ungated.\n */\nexport const canvasFeatureFlags: Partial<Record<CanvasId, string>> = {};\n\n/** Adds the requirements of an app's canvases. Runs outside React, before the first render. */\nexport const registerCanvasFeatureFlags = (featureFlags: Readonly<Partial<Record<CanvasId, string>>>): void => {\n Object.assign(canvasFeatureFlags, featureFlags);\n};\n\nexport const canvasFeatureFlagOf = (canvasId: CanvasId): string | undefined => canvasFeatureFlags[canvasId];\n"],"names":[],"mappings":";AAQO,MAAM,qBAAwD,CAAA;AAG9D,MAAM,6BAA6B,CAAC,iBAAoE;AAC7G,SAAO,OAAO,oBAAoB,YAAY;AAChD;AAEO,MAAM,sBAAsB,CAAC,aAA2C,mBAAmB,QAAQ;"}
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useMemo, useCallback, useContext, createContext, useState } from "react";
|
|
4
|
+
import { ax as payloadHashOfInstanceId, q as Text, a as ConversationSearchResultsList, aA as useConversationWidgetContext, b5 as parseConversationSearchResultsPayload, b6 as WebSearchAnswer, b7 as WebSearchSourcesList, b8 as parseWebSearchResultsPayload, b9 as ENTITY_MENTION_WIDGET_NAME, ba as buildEntityMentionFields, bb as normalizeEntityMentionFields, bc as entityMentionKey, bd as MAX_ENTITY_MENTIONS_PER_MESSAGE, be as toEntityMentionWireFields, bf as useIsEmailWidgetRender, bg as ConversationWidgetButton } from "./WebSearchResultsConversationWidget-BvnLWHyi.js";
|
|
5
|
+
import { z as findWidgetFenceByPayloadHash, B as findWidgetFencesInMarkdown, D as readEntityDetailInstanceId, E as readMapNodeKeyOfInstanceId, F as findMapNodeInMarkdown, G as readOpenEntityActionTarget, H as canvasInstanceIdForEntityDetail, I as mapStyles, M as MapPresentationContext, e as ComposedViewRenderer } from "./widget-name-resolver-DyIY6Zu4.js";
|
|
6
|
+
const useAnchorWidgetPayload = (canvas, anchorMessageMarkdown, widgetName) => useMemo(() => {
|
|
7
|
+
if (canvas.anchor.kind !== "message" || anchorMessageMarkdown === null) return void 0;
|
|
8
|
+
const payloadHash = payloadHashOfInstanceId(canvas.instanceId);
|
|
9
|
+
if (payloadHash !== void 0) {
|
|
10
|
+
return findWidgetFenceByPayloadHash(anchorMessageMarkdown, widgetName, payloadHash)?.payload;
|
|
11
|
+
}
|
|
12
|
+
return findWidgetFencesInMarkdown(anchorMessageMarkdown).find((fence) => fence.name === widgetName)?.payload;
|
|
13
|
+
}, [canvas.anchor, canvas.instanceId, anchorMessageMarkdown, widgetName]);
|
|
14
|
+
const canvasStyle$1 = {
|
|
15
|
+
width: "100%",
|
|
16
|
+
height: "100%",
|
|
17
|
+
display: "flex",
|
|
18
|
+
flexDirection: "column",
|
|
19
|
+
minHeight: 0,
|
|
20
|
+
background: "var(--agents-bg)"
|
|
21
|
+
};
|
|
22
|
+
const scrollStyle$1 = {
|
|
23
|
+
flex: 1,
|
|
24
|
+
minHeight: 0,
|
|
25
|
+
overflowY: "auto"
|
|
26
|
+
};
|
|
27
|
+
const contentStyle$1 = {
|
|
28
|
+
padding: "16px 24px 24px"
|
|
29
|
+
};
|
|
30
|
+
const ConversationSearchResultsCanvas = (props) => /* @__PURE__ */ jsx("div", { style: canvasStyle$1, "data-testid": "conversation-search-results-widget-canvas", children: /* @__PURE__ */ jsx("div", { style: scrollStyle$1, children: /* @__PURE__ */ jsxs("div", { style: contentStyle$1, "data-testid": "conversation-search-results-widget-canvas-results", children: [
|
|
31
|
+
/* @__PURE__ */ jsx(
|
|
32
|
+
Text,
|
|
33
|
+
{
|
|
34
|
+
role: "title",
|
|
35
|
+
replacements: { query: props.query },
|
|
36
|
+
testId: "conversation-search-results-widget-canvas-title",
|
|
37
|
+
children: 'Search results for "%query%"'
|
|
38
|
+
}
|
|
39
|
+
),
|
|
40
|
+
/* @__PURE__ */ jsx(ConversationSearchResultsList, { groups: props.groups, query: props.query, onOpenConversation: props.onOpenConversation })
|
|
41
|
+
] }) }) });
|
|
42
|
+
const ConversationSearchResultsCanvasBody = ({ canvas, anchorMessageMarkdown }) => {
|
|
43
|
+
const { onOpenConversation } = useConversationWidgetContext();
|
|
44
|
+
const payload = useAnchorWidgetPayload(canvas, anchorMessageMarkdown, "ConversationSearchResults");
|
|
45
|
+
const parsed = useMemo(
|
|
46
|
+
() => payload === void 0 ? null : parseConversationSearchResultsPayload(payload),
|
|
47
|
+
[payload]
|
|
48
|
+
);
|
|
49
|
+
if (parsed === null || parsed.groups.length === 0) return null;
|
|
50
|
+
return /* @__PURE__ */ jsx(
|
|
51
|
+
ConversationSearchResultsCanvas,
|
|
52
|
+
{
|
|
53
|
+
query: parsed.query,
|
|
54
|
+
groups: parsed.groups,
|
|
55
|
+
onOpenConversation: (conversationId, messageId) => onOpenConversation?.(conversationId, messageId)
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
const canvasStyle = {
|
|
60
|
+
width: "100%",
|
|
61
|
+
height: "100%",
|
|
62
|
+
display: "flex",
|
|
63
|
+
flexDirection: "column",
|
|
64
|
+
minHeight: 0,
|
|
65
|
+
background: "var(--agents-bg)"
|
|
66
|
+
};
|
|
67
|
+
const scrollStyle = { flex: 1, minHeight: 0, overflowY: "auto" };
|
|
68
|
+
const contentStyle = { padding: "16px 24px 24px" };
|
|
69
|
+
const WebSearchResultsCanvas = (props) => /* @__PURE__ */ jsx("div", { style: canvasStyle, "data-testid": "web-search-results-widget-canvas", children: /* @__PURE__ */ jsx("div", { style: scrollStyle, children: /* @__PURE__ */ jsxs("div", { style: contentStyle, children: [
|
|
70
|
+
props.query ? /* @__PURE__ */ jsx(
|
|
71
|
+
Text,
|
|
72
|
+
{
|
|
73
|
+
role: "title",
|
|
74
|
+
replacements: { query: props.query },
|
|
75
|
+
testId: "web-search-results-widget-canvas-title",
|
|
76
|
+
children: '"%query%"'
|
|
77
|
+
}
|
|
78
|
+
) : /* @__PURE__ */ jsx(Text, { role: "title", testId: "web-search-results-widget-canvas-title", children: "Web search" }),
|
|
79
|
+
/* @__PURE__ */ jsx("div", { style: { marginTop: 12 }, children: /* @__PURE__ */ jsx(WebSearchAnswer, { answer: props.answer }) }),
|
|
80
|
+
/* @__PURE__ */ jsx(
|
|
81
|
+
WebSearchSourcesList,
|
|
82
|
+
{
|
|
83
|
+
sources: props.sources,
|
|
84
|
+
provider: props.provider,
|
|
85
|
+
testId: "web-search-results-widget-canvas"
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
] }) }) });
|
|
89
|
+
const WebSearchResultsCanvasBody = ({ canvas, anchorMessageMarkdown }) => {
|
|
90
|
+
const payload = useAnchorWidgetPayload(canvas, anchorMessageMarkdown, "WebSearchResults");
|
|
91
|
+
const parsed = useMemo(() => payload === void 0 ? null : parseWebSearchResultsPayload(payload), [payload]);
|
|
92
|
+
if (parsed === null || parsed.answer.trim() === "" && parsed.sources.length === 0) return null;
|
|
93
|
+
return /* @__PURE__ */ jsx(
|
|
94
|
+
WebSearchResultsCanvas,
|
|
95
|
+
{
|
|
96
|
+
query: parsed.query,
|
|
97
|
+
answer: parsed.answer,
|
|
98
|
+
sources: parsed.sources,
|
|
99
|
+
provider: parsed.provider
|
|
100
|
+
}
|
|
101
|
+
);
|
|
102
|
+
};
|
|
103
|
+
const useEntityMentionComposer = () => {
|
|
104
|
+
const { composerWidgets, addComposerWidget, replaceComposerWidgetFields } = useConversationWidgetContext();
|
|
105
|
+
const findMentionWidgets = useCallback(
|
|
106
|
+
() => composerWidgets.filter((composerWidget) => composerWidget.widgetName === ENTITY_MENTION_WIDGET_NAME),
|
|
107
|
+
[composerWidgets]
|
|
108
|
+
);
|
|
109
|
+
const isMentioned = useCallback(
|
|
110
|
+
(target) => {
|
|
111
|
+
const mention = buildEntityMentionFields(target);
|
|
112
|
+
if (mention === null) return false;
|
|
113
|
+
return findMentionWidgets().some((composerWidget) => {
|
|
114
|
+
const heldMention = normalizeEntityMentionFields(composerWidget.fields);
|
|
115
|
+
return heldMention !== null && entityMentionKey(heldMention) === entityMentionKey(mention);
|
|
116
|
+
});
|
|
117
|
+
},
|
|
118
|
+
[findMentionWidgets]
|
|
119
|
+
);
|
|
120
|
+
const mentionEntity = useCallback(
|
|
121
|
+
(target) => {
|
|
122
|
+
const mention = buildEntityMentionFields(target);
|
|
123
|
+
if (mention === null) return false;
|
|
124
|
+
if (isMentioned(target)) return true;
|
|
125
|
+
const mentionWidgets = findMentionWidgets();
|
|
126
|
+
if (mentionWidgets.length >= MAX_ENTITY_MENTIONS_PER_MESSAGE) {
|
|
127
|
+
replaceComposerWidgetFields(mentionWidgets[0].composerWidgetId, toEntityMentionWireFields(mention));
|
|
128
|
+
} else {
|
|
129
|
+
addComposerWidget(ENTITY_MENTION_WIDGET_NAME, toEntityMentionWireFields(mention));
|
|
130
|
+
}
|
|
131
|
+
return true;
|
|
132
|
+
},
|
|
133
|
+
[isMentioned, findMentionWidgets, replaceComposerWidgetFields, addComposerWidget]
|
|
134
|
+
);
|
|
135
|
+
return { isMentioned, mentionEntity };
|
|
136
|
+
};
|
|
137
|
+
const EntityMentionAskButton = (props) => {
|
|
138
|
+
const { entityType, entityId, label, agentSpaceKey, testId = "entity-mention-ask" } = props;
|
|
139
|
+
const isEmailRender = useIsEmailWidgetRender();
|
|
140
|
+
const { isMentioned, mentionEntity } = useEntityMentionComposer();
|
|
141
|
+
const target = { entityType, entityId, label, agentSpaceKey };
|
|
142
|
+
if (isEmailRender) return null;
|
|
143
|
+
const isAlreadyMentioned = isMentioned(target);
|
|
144
|
+
return /* @__PURE__ */ jsx(
|
|
145
|
+
ConversationWidgetButton,
|
|
146
|
+
{
|
|
147
|
+
variant: "primary",
|
|
148
|
+
size: "medium",
|
|
149
|
+
icon: isAlreadyMentioned ? "check" : "message",
|
|
150
|
+
disabled: isAlreadyMentioned,
|
|
151
|
+
onClick: () => mentionEntity(target),
|
|
152
|
+
testId,
|
|
153
|
+
children: isAlreadyMentioned ? "Added to your message" : "Ask about this"
|
|
154
|
+
}
|
|
155
|
+
);
|
|
156
|
+
};
|
|
157
|
+
const bodyModules = /* @__PURE__ */ Object.assign({});
|
|
158
|
+
const buildEntityDetailBodyRegistry = (definitions) => {
|
|
159
|
+
const registry = {};
|
|
160
|
+
for (const definition of definitions) {
|
|
161
|
+
if (Object.prototype.hasOwnProperty.call(registry, definition.entityType)) {
|
|
162
|
+
throw new Error(`Two entity detail bodies register the entity type "${definition.entityType}".`);
|
|
163
|
+
}
|
|
164
|
+
registry[definition.entityType] = definition;
|
|
165
|
+
}
|
|
166
|
+
return registry;
|
|
167
|
+
};
|
|
168
|
+
const readEntityDetailBodyDefinitions = (modules) => Object.values(modules).map((bodyModule) => bodyModule.entityDetailBody).filter((definition) => definition !== void 0);
|
|
169
|
+
const entityDetailBodies = {
|
|
170
|
+
...buildEntityDetailBodyRegistry(readEntityDetailBodyDefinitions(bodyModules))
|
|
171
|
+
};
|
|
172
|
+
const registerEntityDetailBodies = (definitions) => {
|
|
173
|
+
Object.assign(
|
|
174
|
+
entityDetailBodies,
|
|
175
|
+
buildEntityDetailBodyRegistry([...Object.values(entityDetailBodies), ...definitions])
|
|
176
|
+
);
|
|
177
|
+
};
|
|
178
|
+
const EntityDetailBodiesContext = createContext(entityDetailBodies);
|
|
179
|
+
const useEntityDetailBodies = () => useContext(EntityDetailBodiesContext);
|
|
180
|
+
const EntityDetailNameReportContext = createContext(() => void 0);
|
|
181
|
+
const entityDetail = "agents_entityDetail_QEy9QH";
|
|
182
|
+
const entityDetailFooter = "agents_entityDetailFooter_IQGMt2";
|
|
183
|
+
const styles = {
|
|
184
|
+
entityDetail,
|
|
185
|
+
entityDetailFooter
|
|
186
|
+
};
|
|
187
|
+
const EntityDetailCanvasBody = ({ canvas, agentSpaceKey }) => {
|
|
188
|
+
const bodies = useEntityDetailBodies();
|
|
189
|
+
const [reportedEntity, setReportedEntity] = useState();
|
|
190
|
+
const reportEntityName = useCallback(
|
|
191
|
+
(entityName2) => setReportedEntity({ instanceId: canvas.instanceId, name: entityName2 }),
|
|
192
|
+
[canvas.instanceId]
|
|
193
|
+
);
|
|
194
|
+
const target = readEntityDetailInstanceId(canvas.instanceId);
|
|
195
|
+
if (target === void 0) return null;
|
|
196
|
+
const definition = Object.prototype.hasOwnProperty.call(bodies, target.entityType) ? bodies[target.entityType] : void 0;
|
|
197
|
+
if (!definition) {
|
|
198
|
+
return /* @__PURE__ */ jsx("div", { className: styles.entityDetail, "data-testid": "entity-detail-canvas", children: /* @__PURE__ */ jsx(Text, { role: "help", color: "var(--agents-fg-light)", testId: "entity-detail-canvas-unsupported", children: "This detail cannot be shown here yet." }) });
|
|
199
|
+
}
|
|
200
|
+
const Body = definition.component;
|
|
201
|
+
const entityName = reportedEntity?.instanceId === canvas.instanceId ? reportedEntity.name : void 0;
|
|
202
|
+
return /* @__PURE__ */ jsxs("div", { className: styles.entityDetail, "data-testid": "entity-detail-canvas", children: [
|
|
203
|
+
/* @__PURE__ */ jsx(EntityDetailNameReportContext.Provider, { value: reportEntityName, children: /* @__PURE__ */ jsx(Body, { entityType: target.entityType, entityId: target.entityId, agentSpaceKey }) }),
|
|
204
|
+
/* @__PURE__ */ jsx("div", { className: styles.entityDetailFooter, children: /* @__PURE__ */ jsx(
|
|
205
|
+
EntityMentionAskButton,
|
|
206
|
+
{
|
|
207
|
+
entityType: target.entityType,
|
|
208
|
+
entityId: target.entityId,
|
|
209
|
+
label: entityName,
|
|
210
|
+
agentSpaceKey
|
|
211
|
+
}
|
|
212
|
+
) })
|
|
213
|
+
] });
|
|
214
|
+
};
|
|
215
|
+
const ignoreRenderReport = () => {
|
|
216
|
+
};
|
|
217
|
+
const MapFullScreenCanvasBody = (props) => {
|
|
218
|
+
const { canvas, anchorMessageMarkdown, agentSpaceKey } = props;
|
|
219
|
+
const { openCanvas } = useConversationWidgetContext();
|
|
220
|
+
const mapNodeKey = readMapNodeKeyOfInstanceId(canvas.instanceId);
|
|
221
|
+
const mapTree = useMemo(() => {
|
|
222
|
+
if (anchorMessageMarkdown === null || mapNodeKey === void 0) return void 0;
|
|
223
|
+
const mapNodeInComposedView = findMapNodeInMarkdown(anchorMessageMarkdown, mapNodeKey);
|
|
224
|
+
if (!mapNodeInComposedView) return void 0;
|
|
225
|
+
return { ...mapNodeInComposedView.tree, title: null, view: mapNodeInComposedView.mapNode, findings: [] };
|
|
226
|
+
}, [anchorMessageMarkdown, mapNodeKey]);
|
|
227
|
+
const anchor = canvas.anchor;
|
|
228
|
+
const onOpenEntity = useCallback(
|
|
229
|
+
(action, currentRow) => {
|
|
230
|
+
const target = readOpenEntityActionTarget(action, currentRow);
|
|
231
|
+
if (target === void 0 || anchor.kind !== "message") return;
|
|
232
|
+
openCanvas({
|
|
233
|
+
canvasId: "entityDetail",
|
|
234
|
+
instanceId: canvasInstanceIdForEntityDetail(target),
|
|
235
|
+
anchor,
|
|
236
|
+
origin: "cardClick",
|
|
237
|
+
justDelivered: false
|
|
238
|
+
});
|
|
239
|
+
},
|
|
240
|
+
[openCanvas, anchor]
|
|
241
|
+
);
|
|
242
|
+
if (!mapTree) {
|
|
243
|
+
return /* @__PURE__ */ jsx(
|
|
244
|
+
"div",
|
|
245
|
+
{
|
|
246
|
+
className: mapStyles.fullScreenNotice,
|
|
247
|
+
"data-canvas-instance": canvas.instanceId,
|
|
248
|
+
"data-testid": "map-full-screen-canvas-unavailable",
|
|
249
|
+
children: /* @__PURE__ */ jsx(Text, { role: "help", color: "var(--agents-fg-light)", children: "This map is no longer available." })
|
|
250
|
+
}
|
|
251
|
+
);
|
|
252
|
+
}
|
|
253
|
+
return /* @__PURE__ */ jsx(
|
|
254
|
+
"div",
|
|
255
|
+
{
|
|
256
|
+
className: mapStyles.fullScreenBody,
|
|
257
|
+
"data-canvas-instance": canvas.instanceId,
|
|
258
|
+
"data-testid": "map-full-screen-canvas",
|
|
259
|
+
children: /* @__PURE__ */ jsx(MapPresentationContext.Provider, { value: "fullScreen", children: /* @__PURE__ */ jsx(
|
|
260
|
+
ComposedViewRenderer,
|
|
261
|
+
{
|
|
262
|
+
tree: mapTree,
|
|
263
|
+
interactive: true,
|
|
264
|
+
isEmailRender: false,
|
|
265
|
+
messageId: anchor.kind === "message" ? anchor.messageId : void 0,
|
|
266
|
+
agentSpaceKey,
|
|
267
|
+
onReport: ignoreRenderReport,
|
|
268
|
+
onOpenEntity,
|
|
269
|
+
testId: "map-full-screen-canvas-view"
|
|
270
|
+
}
|
|
271
|
+
) })
|
|
272
|
+
}
|
|
273
|
+
);
|
|
274
|
+
};
|
|
275
|
+
const canvasBodies = {
|
|
276
|
+
conversationSearchResults: ConversationSearchResultsCanvasBody,
|
|
277
|
+
webSearchResults: WebSearchResultsCanvasBody,
|
|
278
|
+
entityDetail: EntityDetailCanvasBody,
|
|
279
|
+
mapFullScreen: MapFullScreenCanvasBody
|
|
280
|
+
};
|
|
281
|
+
const registerCanvasBodies = (bodies) => {
|
|
282
|
+
Object.assign(canvasBodies, bodies);
|
|
283
|
+
};
|
|
284
|
+
export {
|
|
285
|
+
registerEntityDetailBodies as a,
|
|
286
|
+
canvasBodies as c,
|
|
287
|
+
registerCanvasBodies as r
|
|
288
|
+
};
|
|
289
|
+
//# sourceMappingURL=canvasBodies-9SuF6NAB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canvasBodies-9SuF6NAB.js","sources":["../../src/renderer/canvas/use-anchor-widget-payload.ts","../../src/widgets/ConversationSearchResultsConversationWidget/ConversationSearchResultsCanvas.tsx","../../src/widgets/ConversationSearchResultsConversationWidget/ConversationSearchResultsCanvasBody.tsx","../../src/widgets/WebSearchResultsConversationWidget/WebSearchResultsCanvas.tsx","../../src/widgets/WebSearchResultsConversationWidget/WebSearchResultsCanvasBody.tsx","../../src/widgets/EntityMentionConversationWidget/shared/use-entity-mention-composer.ts","../../src/widgets/EntityMentionConversationWidget/EntityMentionAskButton/EntityMentionAskButton.tsx","../../src/kit/entity-detail/entity-detail-bodies.ts","../../src/kit/entity-detail/entity-detail-name.ts","../../src/kit/entity-detail/EntityDetailCanvasBody.tsx","../../src/kit/map-full-screen/MapFullScreenCanvasBody.tsx","../../src/renderer/canvas/canvasBodies.tsx"],"sourcesContent":["import { useMemo } from \"react\";\nimport type { CanvasState } from \"./canvas-state\";\nimport { payloadHashOfInstanceId } from \"./canvas-state\";\nimport { findWidgetFenceByPayloadHash, findWidgetFencesInMarkdown } from \"./find-widget-fences-in-markdown\";\n\n/**\n * The payload string of the widget a message-anchored canvas was opened from: the fence of `widgetName` in the anchor\n * message whose payload hash the canvas instance id carries (`canvasInstanceIdForMessagePayload`); when the instance\n * id carries no hash (one canvas per message), the first fence of that name. Undefined for a page anchor, a missing\n * anchor message, or a message that no longer carries the fence — the body then renders nothing.\n */\nexport const useAnchorWidgetPayload = (\n canvas: CanvasState,\n anchorMessageMarkdown: string | null,\n widgetName: string,\n): string | undefined =>\n useMemo(() => {\n if (canvas.anchor.kind !== \"message\" || anchorMessageMarkdown === null) return undefined;\n const payloadHash = payloadHashOfInstanceId(canvas.instanceId);\n if (payloadHash !== undefined) {\n return findWidgetFenceByPayloadHash(anchorMessageMarkdown, widgetName, payloadHash)?.payload;\n }\n return findWidgetFencesInMarkdown(anchorMessageMarkdown).find((fence) => fence.name === widgetName)?.payload;\n }, [canvas.anchor, canvas.instanceId, anchorMessageMarkdown, widgetName]);\n","import { ConversationSearchResultsList, Text } from \"../../provider/components\";\nimport React from \"react\";\nimport { parseConversationSearchResultsPayload } from \"./shared/conversation-search-results-widget-payload\";\n\ntype ConversationSearchResultsCanvasProps = {\n query: string;\n groups: ReturnType<typeof parseConversationSearchResultsPayload>[\"groups\"];\n onOpenConversation: (conversationId: number, messageId?: number) => void;\n};\n\n// Canvas body styles — the same as every list canvas body, so the full-screen panel behaves the same:\n// a full-height flex column whose inner area SCROLLS (scrollStyle: flex 1 + overflowY auto — without it the content\n// overflows the panel with no scrollbar), plus a horizontal inset (contentStyle) because the results list is built\n// for the narrow inline chat column where the bubble provides the gutter — in the canvas there is no bubble, so it would\n// otherwise render edge-to-edge.\nconst canvasStyle: React.CSSProperties = {\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n flexDirection: \"column\",\n minHeight: 0,\n background: \"var(--agents-bg)\",\n};\nconst scrollStyle: React.CSSProperties = {\n flex: 1,\n minHeight: 0,\n overflowY: \"auto\",\n};\nconst contentStyle: React.CSSProperties = {\n padding: \"16px 24px 24px\",\n};\n\n/** The canvas body — a titled wrapper around the same grouped results, scrollable + inset like the other canvas widgets. */\nexport const ConversationSearchResultsCanvas = (props: ConversationSearchResultsCanvasProps) => (\n <div style={canvasStyle} data-testid=\"conversation-search-results-widget-canvas\">\n <div style={scrollStyle}>\n <div style={contentStyle} data-testid=\"conversation-search-results-widget-canvas-results\">\n <Text\n role=\"title\"\n replacements={{ query: props.query }}\n testId=\"conversation-search-results-widget-canvas-title\"\n >\n {'Search results for \"%query%\"'}\n </Text>\n <ConversationSearchResultsList groups={props.groups} query={props.query} onOpenConversation={props.onOpenConversation} />\n </div>\n </div>\n </div>\n);\n","import React, { useMemo } from \"react\";\nimport type { CanvasBodyProps } from \"../../renderer/canvas/canvas-body-props\";\nimport { useConversationWidgetContext } from \"../../renderer/ConversationWidgetCallbacksContext\";\nimport { useAnchorWidgetPayload } from \"../../renderer/canvas/use-anchor-widget-payload\";\nimport { parseConversationSearchResultsPayload } from \"./shared/conversation-search-results-widget-payload\";\nimport { ConversationSearchResultsCanvas } from \"./ConversationSearchResultsCanvas\";\n\n/**\n * The `conversationSearchResults` CANVAS BODY (`canvasBodies.tsx`): re-reads the `ConversationSearchResults` fence of\n * the anchor message — the same payload the inline widget rendered from — and shows the grouped results. Nothing was\n * stored for it but the pointer. Renders nothing when the anchor message no longer carries the fence.\n */\nexport const ConversationSearchResultsCanvasBody = ({ canvas, anchorMessageMarkdown }: CanvasBodyProps) => {\n const { onOpenConversation } = useConversationWidgetContext();\n const payload = useAnchorWidgetPayload(canvas, anchorMessageMarkdown, \"ConversationSearchResults\");\n const parsed = useMemo(\n () => (payload === undefined ? null : parseConversationSearchResultsPayload(payload)),\n [payload],\n );\n if (parsed === null || parsed.groups.length === 0) return null;\n return (\n <ConversationSearchResultsCanvas\n query={parsed.query}\n groups={parsed.groups}\n onOpenConversation={(conversationId, messageId) => onOpenConversation?.(conversationId, messageId)}\n />\n );\n};\n","import { Text } from \"../../provider/components\";\nimport React from \"react\";\nimport { WebSearchResultSource } from \"./shared/web-search-results-widget-payload\";\nimport { WebSearchAnswer } from \"./WebSearchAnswer\";\nimport { WebSearchSourcesList } from \"./WebSearchSourcesList\";\n\ntype WebSearchResultsCanvasProps = {\n query: string;\n answer: string;\n sources: WebSearchResultSource[];\n provider?: string;\n};\n\n// Canvas body styles — mirror the ConversationSearchResults / listReviews drawer widgets: a full-height flex column\n// whose inner area SCROLLS (flex 1 + overflowY auto) with a horizontal inset (there is no chat bubble gutter in the canvas).\nconst canvasStyle: React.CSSProperties = {\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n flexDirection: \"column\",\n minHeight: 0,\n background: \"var(--agents-bg)\",\n};\nconst scrollStyle: React.CSSProperties = { flex: 1, minHeight: 0, overflowY: \"auto\" };\nconst contentStyle: React.CSSProperties = { padding: \"16px 24px 24px\" };\n\n/** The canvas body — the full answer + sources, scrollable + inset like the other canvas widgets. */\nexport const WebSearchResultsCanvas = (props: WebSearchResultsCanvasProps) => (\n <div style={canvasStyle} data-testid=\"web-search-results-widget-canvas\">\n <div style={scrollStyle}>\n <div style={contentStyle}>\n {props.query ? (\n <Text\n role=\"title\"\n replacements={{ query: props.query }}\n testId=\"web-search-results-widget-canvas-title\"\n >\n {'\"%query%\"'}\n </Text>\n ) : (\n <Text role=\"title\" testId=\"web-search-results-widget-canvas-title\">\n Web search\n </Text>\n )}\n <div style={{ marginTop: 12 }}>\n <WebSearchAnswer answer={props.answer} />\n </div>\n <WebSearchSourcesList\n sources={props.sources}\n provider={props.provider}\n testId=\"web-search-results-widget-canvas\"\n />\n </div>\n </div>\n </div>\n);\n","import React, { useMemo } from \"react\";\nimport type { CanvasBodyProps } from \"../../renderer/canvas/canvas-body-props\";\nimport { useAnchorWidgetPayload } from \"../../renderer/canvas/use-anchor-widget-payload\";\nimport { parseWebSearchResultsPayload } from \"./shared/web-search-results-widget-payload\";\nimport { WebSearchResultsCanvas } from \"./WebSearchResultsCanvas\";\n\n/**\n * The `webSearchResults` CANVAS BODY (`canvasBodies.tsx`): re-reads the `WebSearchResults` fence of the anchor message\n * — the answer and its cited sources the inline widget rendered from — and shows them in the canvas. Renders nothing\n * when the anchor message no longer carries the fence.\n */\nexport const WebSearchResultsCanvasBody = ({ canvas, anchorMessageMarkdown }: CanvasBodyProps) => {\n const payload = useAnchorWidgetPayload(canvas, anchorMessageMarkdown, \"WebSearchResults\");\n const parsed = useMemo(() => (payload === undefined ? null : parseWebSearchResultsPayload(payload)), [payload]);\n if (parsed === null || (parsed.answer.trim() === \"\" && parsed.sources.length === 0)) return null;\n return (\n <WebSearchResultsCanvas\n query={parsed.query}\n answer={parsed.answer}\n sources={parsed.sources}\n provider={parsed.provider}\n />\n );\n};\n","import { useCallback } from \"react\";\nimport { useConversationWidgetContext } from \"../../../renderer/ConversationWidgetCallbacksContext\";\nimport {\n buildEntityMentionFields,\n ENTITY_MENTION_WIDGET_NAME,\n entityMentionKey,\n EntityMentionTarget,\n MAX_ENTITY_MENTIONS_PER_MESSAGE,\n normalizeEntityMentionFields,\n toEntityMentionWireFields,\n} from \"./entity-mention\";\n\nexport interface UseEntityMentionComposerResult {\n /** Whether this entity is already mentioned in the composer. */\n isMentioned: (target: EntityMentionTarget) => boolean;\n /**\n * Puts the entity into the composer as an `EntityMention` chip — once per entity (a second click is a no-op); past\n * {@link MAX_ENTITY_MENTIONS_PER_MESSAGE} the new entity takes the place of the oldest mention (one write: a remove\n * and an add in one event would both read the list before either). Sends nothing: the owner writes the question.\n * Returns false for a target that names no entity.\n */\n mentionEntity: (target: EntityMentionTarget) => boolean;\n}\n\n/**\n * The opener side of the `EntityMention` composer widget: what the detail panel's \"Ask about this\"\n * button calls. Reads and writes the composer widgets of the chat's widget context; the composer strip renders them.\n */\nexport const useEntityMentionComposer = (): UseEntityMentionComposerResult => {\n const { composerWidgets, addComposerWidget, replaceComposerWidgetFields } = useConversationWidgetContext();\n\n const findMentionWidgets = useCallback(\n () => composerWidgets.filter((composerWidget) => composerWidget.widgetName === ENTITY_MENTION_WIDGET_NAME),\n [composerWidgets],\n );\n\n const isMentioned = useCallback(\n (target: EntityMentionTarget) => {\n const mention = buildEntityMentionFields(target);\n if (mention === null) return false;\n return findMentionWidgets().some((composerWidget) => {\n const heldMention = normalizeEntityMentionFields(composerWidget.fields);\n return heldMention !== null && entityMentionKey(heldMention) === entityMentionKey(mention);\n });\n },\n [findMentionWidgets],\n );\n\n const mentionEntity = useCallback(\n (target: EntityMentionTarget) => {\n const mention = buildEntityMentionFields(target);\n if (mention === null) return false;\n if (isMentioned(target)) return true;\n const mentionWidgets = findMentionWidgets();\n if (mentionWidgets.length >= MAX_ENTITY_MENTIONS_PER_MESSAGE) {\n replaceComposerWidgetFields(mentionWidgets[0].composerWidgetId, toEntityMentionWireFields(mention));\n } else {\n addComposerWidget(ENTITY_MENTION_WIDGET_NAME, toEntityMentionWireFields(mention));\n }\n return true;\n },\n [isMentioned, findMentionWidgets, replaceComposerWidgetFields, addComposerWidget],\n );\n\n return { isMentioned, mentionEntity };\n};\n","import { useIsEmailWidgetRender } from \"../../../renderer/ConversationWidgetRenderContext\";\nimport { ConversationWidgetButton } from \"../../_shared/ConversationWidgetButton\";\nimport type { EntityMentionTarget } from \"../shared/entity-mention\";\nimport { useEntityMentionComposer } from \"../shared/use-entity-mention-composer\";\n\nexport interface EntityMentionAskButtonProps extends EntityMentionTarget {\n testId?: string;\n}\n\n/**\n * The detail panel's \"Ask about this\" button (ChatGPT's \"Anschlussfrage stellen\"):\n * puts the entity into the chat input as an `EntityMention` chip and sends NOTHING — the owner writes the question,\n * the chip rides in that message as a fence, and the backend reads which entity the question is about. Not a\n * next-step CTA: it posts no prompt. A second click on the same entity changes nothing; the\n * label turns into \"Added to your message\". Mounted by the `entityDetail` canvas (the shell or a domain body) with\n * the entity the panel shows; renders nothing in the e-mail capture or for a target that names no entity.\n */\nexport const EntityMentionAskButton = (props: EntityMentionAskButtonProps) => {\n const { entityType, entityId, label, agentSpaceKey, testId = \"entity-mention-ask\" } = props;\n const isEmailRender = useIsEmailWidgetRender();\n const { isMentioned, mentionEntity } = useEntityMentionComposer();\n const target = { entityType, entityId, label, agentSpaceKey };\n if (isEmailRender) return null;\n const isAlreadyMentioned = isMentioned(target);\n return (\n <ConversationWidgetButton\n variant=\"primary\"\n size=\"medium\"\n icon={isAlreadyMentioned ? \"check\" : \"message\"}\n disabled={isAlreadyMentioned}\n onClick={() => mentionEntity(target)}\n testId={testId}\n >\n {isAlreadyMentioned ? \"Added to your message\" : \"Ask about this\"}\n </ConversationWidgetButton>\n );\n};\n","import type React from \"react\";\nimport { createContext, useContext } from \"react\";\n\n/**\n * The bodies of the `entityDetail` canvas, one per entity type: every `*.entity-detail-body.tsx` below\n * `widgets/` that exports `entityDetailBody` registers itself by folder glob — an entity type is added with\n * the backend `<Type>EntityReferenceResolver` and this one file, and edits no list. A second body for one entity type\n * is a build error (thrown at module load).\n */\n\nexport interface EntityDetailBodyProps {\n entityType: string;\n /** The id as the backend resolved it (a row id or an external id). */\n entityId: string;\n /** The key of the agent space the chat is scoped to, for a body whose read endpoint is agent-space-scoped. */\n agentSpaceKey?: number;\n}\n\nexport interface EntityDetailBodyDefinition {\n /** The backend resolver's `ENTITY_TYPE`. */\n entityType: string;\n /** Self-hydrates the entity by id through its own read endpoint (the endpoint's entity rights apply). */\n component: React.ComponentType<EntityDetailBodyProps>;\n}\n\nconst bodyModules = import.meta.glob<{ entityDetailBody?: EntityDetailBodyDefinition }>(\n [\"../../widgets/**/*.entity-detail-body.tsx\", \"../**/*.entity-detail-body.tsx\"],\n { eager: true },\n);\n\nexport const buildEntityDetailBodyRegistry = (\n definitions: EntityDetailBodyDefinition[],\n): Readonly<Record<string, EntityDetailBodyDefinition>> => {\n const registry: Record<string, EntityDetailBodyDefinition> = {};\n for (const definition of definitions) {\n if (Object.prototype.hasOwnProperty.call(registry, definition.entityType)) {\n throw new Error(`Two entity detail bodies register the entity type \"${definition.entityType}\".`);\n }\n registry[definition.entityType] = definition;\n }\n return registry;\n};\n\n/** The body definitions a set of `*.entity-detail-body.tsx` modules export (the package's or an app's glob). */\nexport const readEntityDetailBodyDefinitions = (\n modules: Record<string, { entityDetailBody?: EntityDetailBodyDefinition }>,\n): EntityDetailBodyDefinition[] =>\n Object.values(modules)\n .map((bodyModule) => bodyModule.entityDetailBody)\n .filter((definition): definition is EntityDetailBodyDefinition => definition !== undefined);\n\n/** Entity type → body: the package's folder, then what an app registers (`registerEntityDetailBodies`). */\nexport const entityDetailBodies: Record<string, EntityDetailBodyDefinition> = {\n ...buildEntityDetailBodyRegistry(readEntityDetailBodyDefinitions(bodyModules)),\n};\n\n/** Adds an app's entity detail bodies. Runs outside React, before the first render; an entity type registers once. */\nexport const registerEntityDetailBodies = (definitions: readonly EntityDetailBodyDefinition[]): void => {\n Object.assign(\n entityDetailBodies,\n buildEntityDetailBodyRegistry([...Object.values(entityDetailBodies), ...definitions]),\n );\n};\n\n/** The registry the canvas body uses — the folder's by default; a spec or a story may provide stubs. */\nexport const EntityDetailBodiesContext =\n createContext<Readonly<Record<string, EntityDetailBodyDefinition>>>(entityDetailBodies);\n\nexport const useEntityDetailBodies = () => useContext(EntityDetailBodiesContext);\n","import { createContext, useContext, useEffect } from \"react\";\n\n/**\n * The name of the entity the `entityDetail` canvas shows: a detail body knows it only once it hydrated,\n * the shell needs it for the \"Ask about this\" chip — ChatGPT's follow-up chip names the business, a chip without it\n * says \"About this entry\". A body reports the name with {@link useReportEntityDetailName}; outside the shell (a story,\n * a spec of the body alone) the report goes nowhere.\n */\nexport const EntityDetailNameReportContext = createContext<(entityName: string | undefined) => void>(() => undefined);\n\n/** Reports the shown entity's name (the hydrated business, keyword or review title) to the `entityDetail` shell. */\nexport const useReportEntityDetailName = (entityName: string | undefined): void => {\n const reportEntityName = useContext(EntityDetailNameReportContext);\n const trimmedName = entityName?.trim() || undefined;\n useEffect(() => {\n reportEntityName(trimmedName);\n }, [reportEntityName, trimmedName]);\n};\n","import { Text } from \"../../provider/components\";\nimport { useCallback, useState } from \"react\";\nimport type { CanvasBodyProps } from \"../../renderer/canvas/canvas-body-props\";\nimport { readEntityDetailInstanceId } from \"../../renderer/canvas/entity-detail-instance\";\nimport { EntityMentionAskButton } from \"../../widgets/EntityMentionConversationWidget/EntityMentionAskButton/EntityMentionAskButton\";\nimport { useEntityDetailBodies } from \"./entity-detail-bodies\";\nimport { EntityDetailNameReportContext } from \"./entity-detail-name\";\nimport styles from \"./EntityDetailCanvasBody.module.scss\";\n\n/**\n * The `entityDetail` CANVAS BODY (`canvasBodies.tsx`): the shell around one entity's detail. It reads\n * WHICH entity from the canvas instance id (`entityDetail:<entityType>:<id>`) and mounts the body registered for that\n * entity type; the body self-hydrates by id. An entity type without a body renders a short notice instead of nothing,\n * so a click never lands on an empty pane. \"Ask about this\" stays at the pane's foot while the detail scrolls and\n * names the entity in its chip once the body reported the name (`useReportEntityDetailName`).\n */\nexport const EntityDetailCanvasBody = ({ canvas, agentSpaceKey }: CanvasBodyProps) => {\n const bodies = useEntityDetailBodies();\n const [reportedEntity, setReportedEntity] = useState<{ instanceId: string; name: string | undefined }>();\n const reportEntityName = useCallback(\n (entityName: string | undefined) => setReportedEntity({ instanceId: canvas.instanceId, name: entityName }),\n [canvas.instanceId],\n );\n const target = readEntityDetailInstanceId(canvas.instanceId);\n if (target === undefined) return null;\n const definition = Object.prototype.hasOwnProperty.call(bodies, target.entityType)\n ? bodies[target.entityType]\n : undefined;\n if (!definition) {\n return (\n <div className={styles.entityDetail} data-testid=\"entity-detail-canvas\">\n <Text role=\"help\" color=\"var(--agents-fg-light)\" testId=\"entity-detail-canvas-unsupported\">\n {\"This detail cannot be shown here yet.\"}\n </Text>\n </div>\n );\n }\n const Body = definition.component;\n // A name reported for the previous entity never labels the next one's chip.\n const entityName = reportedEntity?.instanceId === canvas.instanceId ? reportedEntity.name : undefined;\n return (\n <div className={styles.entityDetail} data-testid=\"entity-detail-canvas\">\n <EntityDetailNameReportContext.Provider value={reportEntityName}>\n <Body entityType={target.entityType} entityId={target.entityId} agentSpaceKey={agentSpaceKey} />\n </EntityDetailNameReportContext.Provider>\n <div className={styles.entityDetailFooter}>\n <EntityMentionAskButton\n entityType={target.entityType}\n entityId={target.entityId}\n label={entityName}\n agentSpaceKey={agentSpaceKey}\n />\n </div>\n </div>\n );\n};\n","import { Text } from \"../../provider/components\";\nimport { useCallback, useMemo } from \"react\";\nimport type { CanvasBodyProps } from \"../../renderer/canvas/canvas-body-props\";\nimport { useConversationWidgetContext } from \"../../renderer/ConversationWidgetCallbacksContext\";\nimport {\n canvasInstanceIdForEntityDetail,\n readOpenEntityActionTarget,\n} from \"../../renderer/canvas/entity-detail-instance\";\nimport type {\n ComposedViewAction,\n ComposedViewTree,\n} from \"../../renderer/widget-tree/composed-view-tree\";\nimport type { ExpressionValue } from \"../../renderer/widget-tree/expression/evaluate-expression\";\nimport { ComposedViewRenderer } from \"../ComposedViewRenderer\";\nimport { findMapNodeInMarkdown, readMapNodeKeyOfInstanceId } from \"../components/map/map-full-screen-instance\";\nimport { MapPresentationContext } from \"../components/map/map-presentation-context\";\nimport mapStyles from \"../components/map/Map.module.scss\";\n\n/** The body reports nothing of its own: the inline block already reported this map to the model. */\nconst ignoreRenderReport = () => {};\n\n/**\n * The `mapFullScreen` CANVAS BODY (`canvasBodies.tsx`): one `Map` node of the anchor\n * message, full screen — the map filling the pane beside the list of its points. It finds the node through the\n * message's `ComposedView` fences and the node key its instance id carries (`map-full-screen-instance.ts`), then\n * renders it through the same `ComposedViewRenderer` with the node's own tree, so its bindings (`$data`, `$from`,\n * `$source`, `$computed`, `$state` at its initial value) and its actions resolve exactly as inline; the\n * `MapPresentationContext` switches the node to its full-screen layout. A point's `openEntity` action opens the\n * `entityDetail` canvas on the same anchor message (it replaces this canvas, as a click on an inline point would).\n */\nexport const MapFullScreenCanvasBody = (props: CanvasBodyProps) => {\n const { canvas, anchorMessageMarkdown, agentSpaceKey } = props;\n const { openCanvas } = useConversationWidgetContext();\n const mapNodeKey = readMapNodeKeyOfInstanceId(canvas.instanceId);\n\n const mapTree = useMemo<ComposedViewTree | undefined>(() => {\n if (anchorMessageMarkdown === null || mapNodeKey === undefined) return undefined;\n const mapNodeInComposedView = findMapNodeInMarkdown(anchorMessageMarkdown, mapNodeKey);\n if (!mapNodeInComposedView) return undefined;\n // The map alone, with its tree's state, data, computed values and actions; the tree's findings were the inline\n // block's to report.\n return { ...mapNodeInComposedView.tree, title: null, view: mapNodeInComposedView.mapNode, findings: [] };\n }, [anchorMessageMarkdown, mapNodeKey]);\n\n const anchor = canvas.anchor;\n const onOpenEntity = useCallback(\n (action: ComposedViewAction, currentRow?: ExpressionValue) => {\n const target = readOpenEntityActionTarget(action, currentRow);\n if (target === undefined || anchor.kind !== \"message\") return;\n openCanvas({\n canvasId: \"entityDetail\",\n instanceId: canvasInstanceIdForEntityDetail(target),\n anchor,\n origin: \"cardClick\",\n justDelivered: false,\n });\n },\n [openCanvas, anchor],\n );\n\n if (!mapTree) {\n return (\n <div\n className={mapStyles.fullScreenNotice}\n data-canvas-instance={canvas.instanceId}\n data-testid=\"map-full-screen-canvas-unavailable\"\n >\n <Text role=\"help\" color=\"var(--agents-fg-light)\">\n {\"This map is no longer available.\"}\n </Text>\n </div>\n );\n }\n return (\n <div\n className={mapStyles.fullScreenBody}\n data-canvas-instance={canvas.instanceId}\n data-testid=\"map-full-screen-canvas\"\n >\n <MapPresentationContext.Provider value=\"fullScreen\">\n <ComposedViewRenderer\n tree={mapTree}\n interactive\n isEmailRender={false}\n messageId={anchor.kind === \"message\" ? anchor.messageId : undefined}\n agentSpaceKey={agentSpaceKey}\n onReport={ignoreRenderReport}\n onOpenEntity={onOpenEntity}\n testId=\"map-full-screen-canvas-view\"\n />\n </MapPresentationContext.Provider>\n </div>\n );\n};\n","import type React from \"react\";\nimport type { CanvasId } from \"./canvas-behaviours\";\nimport type { CanvasBodyProps } from \"./canvas-body-props\";\nimport { ConversationSearchResultsCanvasBody } from \"../../widgets/ConversationSearchResultsConversationWidget/ConversationSearchResultsCanvasBody\";\nimport { WebSearchResultsCanvasBody } from \"../../widgets/WebSearchResultsConversationWidget/WebSearchResultsCanvasBody\";\nimport { EntityDetailCanvasBody } from \"../../kit/entity-detail/EntityDetailCanvasBody\";\nimport { MapFullScreenCanvasBody } from \"../../kit/map-full-screen/MapFullScreenCanvasBody\";\n\nexport type { CanvasBodyProps } from \"./canvas-body-props\";\nexport { canvasFeatureFlagOf } from \"./canvas-feature-flags\";\n\n/**\n * THE CANVAS BODIES — canvas id → the React component the shell mounts in the canvas pane. The one module that knows\n * both the canvas ids and React components, and it is imported ONLY by `CanvasPane` (the shell), never by\n * the slice, the behaviours or a widget — that is the import layering that keeps the store-init temporal-dead-zone\n * cycle away. The bodies themselves are small: a body that hosts a heavy page (an app's list page or editor)\n * lazy-loads that page, exactly as its widget did. Every canvas has a body; nothing\n * else hands the pane a rendered node.\n *\n * The package's own bodies are listed here; an app adds the bodies of its canvases with `registerCanvasBodies` before\n * the first render. The object is filled in place, so the shell reads every registration.\n */\nexport const canvasBodies = {\n conversationSearchResults: ConversationSearchResultsCanvasBody,\n webSearchResults: WebSearchResultsCanvasBody,\n entityDetail: EntityDetailCanvasBody,\n mapFullScreen: MapFullScreenCanvasBody,\n} as Record<CanvasId, React.ComponentType<CanvasBodyProps>>;\n\n/** Adds an app's canvas bodies (canvas id → body). Runs outside React, before the first render. */\nexport const registerCanvasBodies = (\n bodies: Readonly<Partial<Record<CanvasId, React.ComponentType<CanvasBodyProps>>>>,\n): void => {\n Object.assign(canvasBodies, bodies);\n};\n"],"names":["canvasStyle","scrollStyle","contentStyle","entityName"],"mappings":";;;;;AAWO,MAAM,yBAAyB,CACpC,QACA,uBACA,eAEA,QAAQ,MAAM;AACZ,MAAI,OAAO,OAAO,SAAS,aAAa,0BAA0B,KAAM,QAAO;AAC/E,QAAM,cAAc,wBAAwB,OAAO,UAAU;AAC7D,MAAI,gBAAgB,QAAW;AAC7B,WAAO,6BAA6B,uBAAuB,YAAY,WAAW,GAAG;AAAA,EACvF;AACA,SAAO,2BAA2B,qBAAqB,EAAE,KAAK,CAAC,UAAU,MAAM,SAAS,UAAU,GAAG;AACvG,GAAG,CAAC,OAAO,QAAQ,OAAO,YAAY,uBAAuB,UAAU,CAAC;ACR1E,MAAMA,gBAAmC;AAAA,EACvC,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,eAAe;AAAA,EACf,WAAW;AAAA,EACX,YAAY;AACd;AACA,MAAMC,gBAAmC;AAAA,EACvC,MAAM;AAAA,EACN,WAAW;AAAA,EACX,WAAW;AACb;AACA,MAAMC,iBAAoC;AAAA,EACxC,SAAS;AACX;AAGO,MAAM,kCAAkC,CAAC,8BAC7C,OAAA,EAAI,OAAOF,eAAa,eAAY,6CACnC,UAAA,oBAAC,OAAA,EAAI,OAAOC,eACV,UAAA,qBAAC,SAAI,OAAOC,gBAAc,eAAY,qDACpC,UAAA;AAAA,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,cAAc,EAAE,OAAO,MAAM,MAAA;AAAA,MAC7B,QAAO;AAAA,MAEN,UAAA;AAAA,IAAA;AAAA,EAAA;AAAA,EAEH,oBAAC,+BAAA,EAA8B,QAAQ,MAAM,QAAQ,OAAO,MAAM,OAAO,oBAAoB,MAAM,mBAAA,CAAoB;AAAA,EAAA,CACzH,GACF,GACF;ACnCK,MAAM,sCAAsC,CAAC,EAAE,QAAQ,4BAA6C;A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