@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,55 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { WidgetImageRenderBootstrap } from "./widget-image-render.types";
|
|
3
|
+
import type { createWidgetImageReadiness } from "./widget-image-readiness";
|
|
4
|
+
/**
|
|
5
|
+
* Capture-only components by wire name: a frozen render shows the widget's visual from its complete snapshot, without
|
|
6
|
+
* mounting the live fetch / OAuth / polling wrappers. An app adds its own with `registerStaticWidgetImageComponents`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const staticWidgetImageComponents: Record<string, React.ComponentType<Record<string, unknown>>>;
|
|
9
|
+
/** Adds an app's capture-only components (wire name → component). Runs outside React, before the first render. */
|
|
10
|
+
export declare const registerStaticWidgetImageComponents: (components: Readonly<Record<string, React.ComponentType<Record<string, unknown>>>>) => void;
|
|
11
|
+
type Readiness = ReturnType<typeof createWidgetImageReadiness>;
|
|
12
|
+
type HostProps = {
|
|
13
|
+
bootstrap: WidgetImageRenderBootstrap;
|
|
14
|
+
readiness: Readiness;
|
|
15
|
+
};
|
|
16
|
+
export declare class WidgetImageCaptureBoundary extends React.Component<{
|
|
17
|
+
children: React.ReactNode;
|
|
18
|
+
fail: Readiness["fail"];
|
|
19
|
+
}, {
|
|
20
|
+
failed: boolean;
|
|
21
|
+
}> {
|
|
22
|
+
state: {
|
|
23
|
+
failed: boolean;
|
|
24
|
+
};
|
|
25
|
+
static getDerivedStateFromError(): {
|
|
26
|
+
failed: boolean;
|
|
27
|
+
};
|
|
28
|
+
componentDidCatch(): void;
|
|
29
|
+
render(): React.ReactNode;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The static image render of one widget (the e-mail capture): the registered widget in its e-mail presentation, inside
|
|
33
|
+
* the read-only widget context, with the capture's frozen or live hydration. A frozen render takes the widget's static
|
|
34
|
+
* capture component when the app registered one (`registerStaticWidgetImageComponents`). The app mounts it inside its
|
|
35
|
+
* own store and theme (`WidgetImageCaptureBoundary` around it).
|
|
36
|
+
*/
|
|
37
|
+
export declare const WidgetImageRender: (props: HostProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
38
|
+
/** The slice the capture reads its hydration state from; any store that carries it (the capture's, a spec's). */
|
|
39
|
+
interface StoreWithWidgetHydration {
|
|
40
|
+
getState: () => {
|
|
41
|
+
AIExtensionsWidgetHydration: {
|
|
42
|
+
widgets: Record<string, {
|
|
43
|
+
status: string;
|
|
44
|
+
}>;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
subscribe: (listener: () => void) => () => void;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Holds the capture's readiness open while any widget hydration is idle or loading, and fails it on a hydration error.
|
|
51
|
+
* Every shared hydrator counts — a widget's own, and each `$source` binding of a `ComposedView` tree, which reads through
|
|
52
|
+
* the same slice (`ComposedViewDataSource:<name>`), so the shot waits for the tree's mail-time rows.
|
|
53
|
+
*/
|
|
54
|
+
export declare const followWidgetHydrationReadiness: (store: StoreWithWidgetHydration, readiness: Readiness) => () => void;
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Null in the regular app. Supplied results apply only in explicit frozen-test mode. */
|
|
2
|
+
export declare const WidgetImageRenderContext: import("react").Context<Record<string, unknown> | null>;
|
|
3
|
+
export declare const useWidgetImageRender: () => Record<string, unknown> | null;
|
|
4
|
+
export declare const WidgetImageLiveHydrationContext: import("react").Context<boolean>;
|
|
5
|
+
export declare const useWidgetImageLiveHydration: () => boolean;
|
|
6
|
+
export declare const WidgetImageReadinessContext: import("react").Context<{
|
|
7
|
+
ready: (element: HTMLElement, isCurrent?: () => boolean) => Promise<void>;
|
|
8
|
+
observe: (element: HTMLElement) => () => void;
|
|
9
|
+
fail: (code: string) => void;
|
|
10
|
+
isFailed: () => boolean;
|
|
11
|
+
beginRequest: () => () => void;
|
|
12
|
+
setHydrationPending: (pending: boolean) => void;
|
|
13
|
+
} | null>;
|
|
14
|
+
export declare const readFrozenHydration: (hydration: Record<string, unknown>, type: string, key: string) => unknown;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ComposedViewTree } from "../renderer/widget-tree/composed-view-tree";
|
|
2
|
+
/**
|
|
3
|
+
* Which data paths of a `ComposedView` tree carry a time the report e-mail must state: the turn-time
|
|
4
|
+
* `$from` snapshots (the tool results the backend wrote into the block when the report message was stored) and the
|
|
5
|
+
* mail-time reads (a `$source` binding or an embedded domain widget, both read live while the e-mail is captured).
|
|
6
|
+
* Inline data carries its own source line and no time.
|
|
7
|
+
*/
|
|
8
|
+
export interface ComposedViewDataTimes {
|
|
9
|
+
/** The tree binds at least one `$from` tool result. */
|
|
10
|
+
hasTurnTimeSnapshot: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* The newest `resolvedAt` (ISO 8601) the persist-time resolution wrote into a resolved `$from` snapshot, when it
|
|
13
|
+
* wrote one; otherwise undefined and the caption names the report time without a clock time.
|
|
14
|
+
*/
|
|
15
|
+
turnTimeResolvedAt: string | undefined;
|
|
16
|
+
/** The tree reads at least one `$source` or embeds a self-hydrating domain widget. */
|
|
17
|
+
hasMailTimeRead: boolean;
|
|
18
|
+
}
|
|
19
|
+
/** The data paths with a time of a checked tree: its datasets and every node's props, embedded widgets included. */
|
|
20
|
+
export declare const readComposedViewDataTimes: (tree: ComposedViewTree) => ComposedViewDataTimes;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { WidgetImageRenderBootstrap } from "./widget-image-render.types";
|
|
2
|
+
import type { createWidgetImageReadiness } from "./widget-image-readiness";
|
|
3
|
+
/** Loaded only by the capture entry. SDK signatures stay unchanged; no ambient credentials are sent. */
|
|
4
|
+
export declare const installLiveWidgetRequests: (bootstrap: WidgetImageRenderBootstrap, readiness: ReturnType<typeof createWidgetImageReadiness>) => () => void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether a capture renders a Google map and so may load the Maps SDK (the narrow CSP and transport exception).
|
|
3
|
+
* The twin of the backend's check that opens the page's CSP: the app's map widgets themselves
|
|
4
|
+
* (`AgentsEnvironment.googleMapWidgetNames`), and a `ComposedView` whose tree holds a `Map` node or embeds one of them.
|
|
5
|
+
* The payload is read as written; a payload that does not parse renders no map.
|
|
6
|
+
*/
|
|
7
|
+
export declare const isGoogleMapCapture: (widgetName: string, props: Record<string, unknown>) => boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { WidgetImageReadiness } from "./widget-image-render.types";
|
|
2
|
+
/** The `window` property the image capture waits on. */
|
|
3
|
+
export declare const WIDGET_IMAGE_READINESS_GLOBAL_NAME = "__AGENTS_WIDGET_IMAGE_V1__";
|
|
4
|
+
/**
|
|
5
|
+
* Every name the image readiness signal is published under: the package's own, then each name the app declares
|
|
6
|
+
* (`AgentsEnvironment.sandboxLegacyAliases.imageReadinessGlobalNames`) — read at each publish, so an app may declare
|
|
7
|
+
* them after a readiness was created.
|
|
8
|
+
*/
|
|
9
|
+
export declare const readWidgetImageReadinessGlobalNames: () => string[];
|
|
10
|
+
/** Publishes (or with `undefined` clears) the image readiness signal under every name. */
|
|
11
|
+
export declare const publishWidgetImageReadiness: (readiness: WidgetImageReadiness | undefined) => void;
|
|
12
|
+
/**
|
|
13
|
+
* The published image readiness signal. A `failed` value under ANY name wins — the app's own capture code may have
|
|
14
|
+
* written it under a name it declared — otherwise the value under the package's name, otherwise the first value found.
|
|
15
|
+
*/
|
|
16
|
+
export declare const readWidgetImageReadiness: () => WidgetImageReadiness | undefined;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { WidgetImageRenderBootstrap } from "./widget-image-render.types";
|
|
2
|
+
export declare const createWidgetImageReadiness: (bootstrap: WidgetImageRenderBootstrap) => {
|
|
3
|
+
ready: (element: HTMLElement, isCurrent?: () => boolean) => Promise<void>;
|
|
4
|
+
observe: (element: HTMLElement) => () => void;
|
|
5
|
+
fail: (code: string) => void;
|
|
6
|
+
isFailed: () => boolean;
|
|
7
|
+
beginRequest: () => () => void;
|
|
8
|
+
setHydrationPending: (pending: boolean) => void;
|
|
9
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export interface WidgetImageRenderInput {
|
|
2
|
+
mode?: "live" | "frozen";
|
|
3
|
+
widgetName: string;
|
|
4
|
+
props: Record<string, unknown>;
|
|
5
|
+
/** Hydrator type (or exact derived cache key) → already resolved, authorized result. */
|
|
6
|
+
hydration: Record<string, unknown>;
|
|
7
|
+
/** Optional frozen GET responses for older widgets that do not use the shared hydrator. */
|
|
8
|
+
responses?: Record<string, unknown>;
|
|
9
|
+
settings: Record<string, unknown>;
|
|
10
|
+
locale: string;
|
|
11
|
+
translations?: Record<string, string>;
|
|
12
|
+
width?: number;
|
|
13
|
+
maxHeight?: number;
|
|
14
|
+
}
|
|
15
|
+
export interface WidgetImageRenderBootstrap {
|
|
16
|
+
snapshotId: string;
|
|
17
|
+
attemptId: string;
|
|
18
|
+
inputSha256: string;
|
|
19
|
+
renderVersion: string;
|
|
20
|
+
userId: number;
|
|
21
|
+
siteId: number;
|
|
22
|
+
expiresAt: number;
|
|
23
|
+
/** Account bearer token for live hydration; frozen renders have no API credentials. */
|
|
24
|
+
authToken: string | null;
|
|
25
|
+
input: WidgetImageRenderInput;
|
|
26
|
+
}
|
|
27
|
+
export interface WidgetImageReadiness {
|
|
28
|
+
version: 1;
|
|
29
|
+
state: "loading" | "ready" | "failed";
|
|
30
|
+
snapshot_id?: string;
|
|
31
|
+
attempt_id?: string;
|
|
32
|
+
input_sha256?: string;
|
|
33
|
+
render_version?: string;
|
|
34
|
+
rect?: {
|
|
35
|
+
x: number;
|
|
36
|
+
y: number;
|
|
37
|
+
width: number;
|
|
38
|
+
height: number;
|
|
39
|
+
};
|
|
40
|
+
error_code?: string;
|
|
41
|
+
}
|
|
42
|
+
declare global {
|
|
43
|
+
interface Window {
|
|
44
|
+
/** The image capture's readiness signal (`publishWidgetImageReadiness` also writes it under the app's declared names). */
|
|
45
|
+
__AGENTS_WIDGET_IMAGE_V1__?: WidgetImageReadiness;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PayloadConversationWidgetProps } from "../renderer/conversation-widget-props";
|
|
2
|
+
/**
|
|
3
|
+
* The composable widget kit: the model composes a TREE of kit components — layout, text, data,
|
|
4
|
+
* media, inputs — with local state, computed values and a closed list of actions, in one ```widget fence of type
|
|
5
|
+
* `ComposedView`. The payload is read into typed objects and checked against the generated node schema
|
|
6
|
+
* (`widget-tree/composed-view-tree.ts`, the twin of the backend reader); what is invalid is dropped and reported, the
|
|
7
|
+
* rest renders. Inputs change local state only (no chat turn, no write), so a replay stays usable; the e-mail capture
|
|
8
|
+
* freezes them at their initial state.
|
|
9
|
+
*
|
|
10
|
+
* The kit's components register themselves by folder (`components/**\/*.composed.tsx`); this widget only parses,
|
|
11
|
+
* renders, reports and opens the `entityDetail` canvas for an `openEntity` action whose reference the backend resolved
|
|
12
|
+
* (a reference still unresolved opens nothing; without a message id — a streaming reply — nothing opens either).
|
|
13
|
+
*/
|
|
14
|
+
export declare const ComposedViewConversationWidget: (props: PayloadConversationWidgetProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ComposedViewSourceBinding } from "../renderer/widget-tree/composed-view-data-sources";
|
|
2
|
+
import type { ExpressionValue } from "../renderer/widget-tree/expression/evaluate-expression";
|
|
3
|
+
import type { ComposedViewSourceValue } from "../renderer/widget-tree/resolve-composed-view-values";
|
|
4
|
+
interface ComposedViewDataSourceLoaderProps {
|
|
5
|
+
sourceBinding: ComposedViewSourceBinding;
|
|
6
|
+
state: Record<string, ExpressionValue>;
|
|
7
|
+
agentSpaceKey: number | undefined;
|
|
8
|
+
/** Whether this tree may start another read (the per-tree budget); a refused change keeps the last parameters. */
|
|
9
|
+
mayRead: () => boolean;
|
|
10
|
+
onValue: (bindingKey: string, sourceValue: ComposedViewSourceValue) => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Reads ONE `$source` binding of a tree through the widget-hydration mechanism and hands the rows up.
|
|
14
|
+
* Renders nothing; one component per binding, so the number of hooks never depends on the tree. The hydration reads
|
|
15
|
+
* again whenever the payload changes, so a parameter change is first debounced, then counted against the tree's budget
|
|
16
|
+
* (`maxSourceRequestsPerTreePerMinute`); a refused change keeps the rows of the last accepted parameters. A source
|
|
17
|
+
* without a registered frontend fetcher fails at once (`UNRESOLVED_BINDING` in the report).
|
|
18
|
+
*/
|
|
19
|
+
export declare const ComposedViewDataSourceLoader: (props: ComposedViewDataSourceLoaderProps) => null;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ComposedViewAction, ComposedViewTree } from "../renderer/widget-tree/composed-view-tree";
|
|
2
|
+
import { ExpressionValue } from "../renderer/widget-tree/expression/evaluate-expression";
|
|
3
|
+
import type { WidgetRenderReportEntry } from "../renderer/render-report/widget-render-report";
|
|
4
|
+
/**
|
|
5
|
+
* Renders a checked `ComposedView` tree: one state store per instance, the datasets and computed
|
|
6
|
+
* values for the current state, then the node tree — each node through its registered component, each slot node in its
|
|
7
|
+
* own error boundary, the slot's size class handed down. The renderer folds the tree's findings, the expression
|
|
8
|
+
* errors, the nodes' own reports and the pending bindings into ONE block status for the render report. A finding that
|
|
9
|
+
* drops nothing (the schema's `noteFindingCodes`: figures without a source, a choice state outside its choices, a set
|
|
10
|
+
* state nothing reads, an `$item` field the rows lack, a slot under its minimum) never fails the block: a block that rendered reports `mounted`
|
|
11
|
+
* with that code as a note, which the chat tells the model.
|
|
12
|
+
*/
|
|
13
|
+
export interface ComposedViewRendererProps {
|
|
14
|
+
tree: ComposedViewTree;
|
|
15
|
+
interactive: boolean;
|
|
16
|
+
isEmailRender: boolean;
|
|
17
|
+
messageId?: string | number;
|
|
18
|
+
agentSpaceKey?: string | number;
|
|
19
|
+
/** The block status, whenever it changes. */
|
|
20
|
+
onReport: (entry: WidgetRenderReportEntry) => void;
|
|
21
|
+
/**
|
|
22
|
+
* Runs an `openEntity` action — the `entityDetail` canvas. A platform-minted reference carries the entity the backend
|
|
23
|
+
* resolved it to; a row-bound action (`ref: {"$item":"entityRef"}`) comes with `currentRow`, the row it fired in,
|
|
24
|
+
* whose `entity` it opens (`readOpenEntityActionTarget(action, currentRow)`).
|
|
25
|
+
*/
|
|
26
|
+
onOpenEntity?: (action: ComposedViewAction, currentRow?: ExpressionValue) => void;
|
|
27
|
+
testId?: string;
|
|
28
|
+
}
|
|
29
|
+
/** The `ComposedView` tree, rendered. */
|
|
30
|
+
export declare const ComposedViewRenderer: (props: ComposedViewRendererProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface ComposedViewSlotErrorBoundaryProps {
|
|
3
|
+
/** Where the node sits in the tree (`view.children[2]`), for the report. */
|
|
4
|
+
nodePath: string;
|
|
5
|
+
nodeType: string;
|
|
6
|
+
onRenderFailed: (nodePath: string, nodeType: string) => void;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
interface ComposedViewSlotErrorBoundaryState {
|
|
10
|
+
hasFailed: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* One node of a `ComposedView` tree inside its own error boundary (per-slot context): a node that throws
|
|
14
|
+
* renders nothing and is reported `failed` (`RENDER_FAILED`), the rest of the tree stays. React error boundaries
|
|
15
|
+
* require a class.
|
|
16
|
+
*/
|
|
17
|
+
export declare class ComposedViewSlotErrorBoundary extends React.Component<ComposedViewSlotErrorBoundaryProps, ComposedViewSlotErrorBoundaryState> {
|
|
18
|
+
state: ComposedViewSlotErrorBoundaryState;
|
|
19
|
+
static getDerivedStateFromError(): ComposedViewSlotErrorBoundaryState;
|
|
20
|
+
componentDidCatch(error: Error): void;
|
|
21
|
+
render(): React.ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Text } from "../../provider/components";
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
|
+
export type ModelTextProps = Omit<ComponentProps<typeof Text>, "children" | "translate"> & {
|
|
4
|
+
/** The model's words — shown as written: never translated, never parsed as markup. */
|
|
5
|
+
children: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* The component library's `Text` for a string the MODEL wrote (`model-text.ts`): `translate={false}` and the string
|
|
9
|
+
* escaped, so `<b onmouseover="…">` or `<link href="…">` in a model's label renders as those characters. Every other
|
|
10
|
+
* `Text` prop passes through.
|
|
11
|
+
*/
|
|
12
|
+
export declare const ModelText: (props: ModelTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { WidgetRenderReportCode, WidgetRenderStatus } from "../../../renderer/render-report/widget-render-report";
|
|
2
|
+
export interface EmbeddedConversationWidgetProps {
|
|
3
|
+
/** The wire name as written (a legacy `…Directive` name resolves as everywhere). */
|
|
4
|
+
widgetName: string;
|
|
5
|
+
/** The widget's own fields — its `payload`, exactly as its own fence would carry them next to `type`. */
|
|
6
|
+
fields: Record<string, unknown>;
|
|
7
|
+
/** The key of the tree's agent space; the key in the fields wins. */
|
|
8
|
+
agentSpaceKey?: string | number;
|
|
9
|
+
interactive: boolean;
|
|
10
|
+
messageId?: string | number;
|
|
11
|
+
/**
|
|
12
|
+
* Where the widget's own render report goes — the tree's report at the node's path, never the host block's reporter
|
|
13
|
+
* (an embedded widget and the tree would otherwise overwrite each other's report).
|
|
14
|
+
*/
|
|
15
|
+
reportStatus: (status: WidgetRenderStatus, code?: WidgetRenderReportCode, detail?: string) => void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* A domain widget rendered inside a `ComposedView` — as a `Widget` node in the tree, or as a widget the readers LIFTED
|
|
19
|
+
* out of it and show after the view. It renders the registered component with the tree's
|
|
20
|
+
* context: `interactive` and `messageId` of the host message, the agent space, and `justDelivered = false`, so it never
|
|
21
|
+
* auto-opens a canvas (the owner opens it by clicking). It gets its OWN render-report context, which forwards its
|
|
22
|
+
* statuses into the tree's report, names the widget in the detail, and turns a crash (`RENDER_FAILED`) or an unknown
|
|
23
|
+
* name (`INVALID_NODE`) into a report instead of a silent nothing. The registry's feature gate applies as it does to
|
|
24
|
+
* the widget's own fence. The registry is read at render time, never at module load (the registry imports this kit).
|
|
25
|
+
*/
|
|
26
|
+
export declare const EmbeddedConversationWidget: (props: EmbeddedConversationWidgetProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type ComposedViewNode, type ComposedViewTree } from "../../../renderer/widget-tree/composed-view-tree";
|
|
2
|
+
/**
|
|
3
|
+
* Which `Map` node a `mapFullScreen` canvas shows. A canvas is a pointer to its anchor message, so the
|
|
4
|
+
* instance id carries only the message and a short hash of the node — its id and its
|
|
5
|
+
* wire props — and the body finds the node again in the message's `ComposedView` fences. Two identical maps in one
|
|
6
|
+
* message are one canvas; a map whose message no longer carries it opens nothing.
|
|
7
|
+
*
|
|
8
|
+
* Format `mapFullScreen:message:<messageId>:map-<hash>` — the `map-` part keeps it apart from the payload-hash form
|
|
9
|
+
* (`payloadHashOfInstanceId`), which the shared canvas helpers would otherwise read as a fence hash.
|
|
10
|
+
*/
|
|
11
|
+
export declare const MAP_NODE_TYPE = "Map";
|
|
12
|
+
/** The short hash of a map node: its id and its props as written (bindings unresolved), so it is stable across renders. */
|
|
13
|
+
export declare const buildMapNodeKey: (mapNode: ComposedViewNode) => string;
|
|
14
|
+
export declare const canvasInstanceIdForMapFullScreen: (messageId: number, mapNode: ComposedViewNode) => string;
|
|
15
|
+
/** The map node key a `mapFullScreen` instance id carries, or undefined for another shape. */
|
|
16
|
+
export declare const readMapNodeKeyOfInstanceId: (instanceId: string) => string | undefined;
|
|
17
|
+
export interface MapNodeInComposedView {
|
|
18
|
+
/** The whole tree the map sits in — its state, data, computed values and actions resolve the map's bindings. */
|
|
19
|
+
tree: ComposedViewTree;
|
|
20
|
+
mapNode: ComposedViewNode;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The `Map` node with this key among the `ComposedView` fences of a message, with its tree. Total: an unparsable
|
|
24
|
+
* message or a missing map gives undefined, never a throw (a canvas body runs outside the message's error boundary).
|
|
25
|
+
*/
|
|
26
|
+
export declare const findMapNodeInMarkdown: (markdown: string, mapNodeKey: string) => MapNodeInComposedView | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where a `Map` node renders: `inline` in the chat (the map card with its carousel and the expand
|
|
3
|
+
* control), or `fullScreen` in the `mapFullScreen` canvas (the map filling the pane beside the list of points). The
|
|
4
|
+
* canvas body renders the same node through the same renderer and provides `fullScreen`; nothing else changes.
|
|
5
|
+
*/
|
|
6
|
+
export type MapPresentation = "inline" | "fullScreen";
|
|
7
|
+
export declare const MapPresentationContext: import("react").Context<MapPresentation>;
|
|
8
|
+
export declare const useMapPresentation: () => MapPresentation;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ExpressionValue } from "../../../../renderer/widget-tree/expression/evaluate-expression";
|
|
2
|
+
import type { ComposedViewRuntime } from "../../../composed-view-component-types";
|
|
3
|
+
/**
|
|
4
|
+
* The value readers the text components of the `ComposedView` kit share. A prop arrives with its binding
|
|
5
|
+
* resolved, so it may be anything an expression yields — every reader takes `ExpressionValue` and never throws: a value
|
|
6
|
+
* that does not fit gives `invalid`, a missing one `missing`, and the component renders nothing for both and reports it.
|
|
7
|
+
*/
|
|
8
|
+
/** What a text prop holds: the text to show, nothing, or a value no text can be made of (an object, a list). */
|
|
9
|
+
export type TextNodeContent = {
|
|
10
|
+
kind: "text";
|
|
11
|
+
text: string;
|
|
12
|
+
} | {
|
|
13
|
+
kind: "missing";
|
|
14
|
+
} | {
|
|
15
|
+
kind: "invalid";
|
|
16
|
+
};
|
|
17
|
+
/** A string, a finite number or a boolean is text; `null`, `undefined` and the empty string are missing; the rest is invalid. */
|
|
18
|
+
export declare const readTextNodeContent: (value: ExpressionValue) => TextNodeContent;
|
|
19
|
+
/** The value when it is one of `allowedValues`, else `fallback` — an enum prop bound to state may hold anything. */
|
|
20
|
+
export declare const readAllowedValue: <T extends string>(value: ExpressionValue, allowedValues: readonly T[], fallback: T) => T;
|
|
21
|
+
/**
|
|
22
|
+
* The address when it is an absolute http(s) URL, else null — `javascript:`, `data:`, `mailto:`, a relative path and a
|
|
23
|
+
* malformed string are never a link target in the kit (the `openUrl` action holds the same rule).
|
|
24
|
+
*/
|
|
25
|
+
export declare const readSafeHttpUrl: (value: ExpressionValue) => string | null;
|
|
26
|
+
/** The site's host name (without `www.`) of an http(s) URL or a bare domain (`wdr.de`), else null. */
|
|
27
|
+
export declare const readSiteHostname: (value: ExpressionValue) => string | null;
|
|
28
|
+
/** The favicon of a host, from the Google favicon service — the source the web search references use. */
|
|
29
|
+
export declare const buildFaviconUrl: (hostname: string) => string;
|
|
30
|
+
/** What one text node reports: still waiting for a bound value, shown, nothing to show, or a value it cannot show. */
|
|
31
|
+
export type TextNodeRenderState = "pending" | "shown" | "empty" | "invalid";
|
|
32
|
+
/**
|
|
33
|
+
* Reports a text node's render state into the block report whenever it changes — never a silent nothing:
|
|
34
|
+
* `empty` when there is nothing to show, `failed INVALID_PROP` when the value cannot be shown, `pending` while a bound
|
|
35
|
+
* value waits for its data.
|
|
36
|
+
*/
|
|
37
|
+
export declare const useReportTextNodeRenderState: (runtime: ComposedViewRuntime, renderState: TextNodeRenderState, nodeType: string, invalidDetail?: string) => void;
|
|
38
|
+
/** The render state of a node whose one text prop decides it. */
|
|
39
|
+
export declare const readTextNodeRenderState: (isPending: boolean, content: TextNodeContent) => TextNodeRenderState;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { ComposedSizeClass } from "../renderer/widget-tree/composed-node-schema";
|
|
3
|
+
import type { ComposedViewNode } from "../renderer/widget-tree/composed-view-tree";
|
|
4
|
+
import type { ExpressionValue } from "../renderer/widget-tree/expression/evaluate-expression";
|
|
5
|
+
import type { WidgetRenderReportCode, WidgetRenderStatus } from "../renderer/render-report/widget-render-report";
|
|
6
|
+
/**
|
|
7
|
+
* The contract between the `ComposedView` renderer and ONE kit component. A component is added as
|
|
8
|
+
* one file `components/<group>/<Name>.composed.tsx` that exports `composedViewComponent` — the folder glob of
|
|
9
|
+
* `composed-view-components.ts` registers it; no list is edited. The component receives its node, its props with every
|
|
10
|
+
* binding resolved, its slots already rendered (each slot node inside its own error boundary), the size class of the
|
|
11
|
+
* slot it sits in and the runtime of the tree instance.
|
|
12
|
+
*/
|
|
13
|
+
export interface ComposedViewRuntime {
|
|
14
|
+
/** The instance state, read-only (inputs write through {@link setStateValue}). */
|
|
15
|
+
state: Record<string, ExpressionValue>;
|
|
16
|
+
/** Write a state value (an input's `onChange: {"set": "<name>"}`); ignored when the tree is frozen (email). */
|
|
17
|
+
setStateValue: (stateName: string, value: unknown) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Run an event prop (`{"set": …}` with a value, or `{"action": …}`). `eventRow` is the row the event fires for when
|
|
20
|
+
* it is not {@link currentRow} (a `Map` point); an `openEntity` action bound to the row (`ref: {"$item":"entityRef"}`)
|
|
21
|
+
* opens that row's `entity`.
|
|
22
|
+
*/
|
|
23
|
+
runEvent: (eventWireValue: unknown, eventValue?: unknown, eventRow?: ExpressionValue) => void;
|
|
24
|
+
/**
|
|
25
|
+
* The row of the innermost item scope this node renders in (`$item` of a `Repeat`, a table row), undefined outside
|
|
26
|
+
* one — the row a row-bound `openEntity` action opens the `entity` of.
|
|
27
|
+
*/
|
|
28
|
+
currentRow?: ExpressionValue;
|
|
29
|
+
/** The controls may be used (a live message or the newest reply; a replay keeps local inputs usable). */
|
|
30
|
+
interactive: boolean;
|
|
31
|
+
/** The e-mail capture renders the tree: inputs frozen at their initial state, no controls. */
|
|
32
|
+
isEmailRender: boolean;
|
|
33
|
+
/** The host message (canvas anchor) and the key of the agent space the tree is scoped to. */
|
|
34
|
+
messageId?: string | number;
|
|
35
|
+
agentSpaceKey?: string | number;
|
|
36
|
+
/** The tree's named action (an own property of `actions`), or undefined — lets a node tell a resolvable `openEntity` from a dangling name. */
|
|
37
|
+
findAction?: (actionName: string) => Record<string, unknown> | undefined;
|
|
38
|
+
/** Report this node's render status into the block's report. */
|
|
39
|
+
reportNodeStatus: (status: WidgetRenderStatus, code?: WidgetRenderReportCode, detail?: string) => void;
|
|
40
|
+
}
|
|
41
|
+
export interface ComposedViewComponentProps {
|
|
42
|
+
node: ComposedViewNode;
|
|
43
|
+
/** The node's props, bindings resolved; an unresolved binding is `undefined`. */
|
|
44
|
+
props: Record<string, ExpressionValue>;
|
|
45
|
+
/** Whether a bound prop is still waiting for its data (`$from` before its snapshot, `$source` before hydration) — render a skeleton. */
|
|
46
|
+
isPending: boolean;
|
|
47
|
+
/** The rendered nodes of each slot (`children` = the default slot). A slot of an item-scope node is rendered per row through {@link renderSlotForItem}. */
|
|
48
|
+
slots: Record<string, React.ReactNode[]>;
|
|
49
|
+
/** The room this node has, from the slot it sits in (`full` at the root). */
|
|
50
|
+
sizeClass: ComposedSizeClass;
|
|
51
|
+
/** Renders a slot once per row with `$item` bound to the row — for item-scope nodes (`Repeat`, table bodies). */
|
|
52
|
+
renderSlotForItem: (slotName: string, item: ExpressionValue, itemIndex: number) => React.ReactNode[];
|
|
53
|
+
runtime: ComposedViewRuntime;
|
|
54
|
+
/** QA selector of this node: `<widget test id>-<node type>-<node id or tree path>`; the component derives its parts from it. */
|
|
55
|
+
testId: string;
|
|
56
|
+
}
|
|
57
|
+
export interface ComposedViewComponentDefinition {
|
|
58
|
+
/** The node type (the backend `NODE_TYPE`). */
|
|
59
|
+
nodeType: string;
|
|
60
|
+
component: React.ComponentType<ComposedViewComponentProps>;
|
|
61
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ComposedViewComponentDefinition } from "./composed-view-component-types";
|
|
2
|
+
export declare const buildComposedViewComponentRegistry: (definitions: ComposedViewComponentDefinition[]) => Readonly<Record<string, ComposedViewComponentDefinition>>;
|
|
3
|
+
/** Node type → component, from the folder. */
|
|
4
|
+
export declare const composedViewComponents: Readonly<Record<string, ComposedViewComponentDefinition>>;
|
|
5
|
+
/** The registry the renderer uses — the folder's by default; a story or a spec may provide its own stub components. */
|
|
6
|
+
export declare const ComposedViewComponentsContext: import("react").Context<Readonly<Record<string, ComposedViewComponentDefinition>>>;
|
|
7
|
+
export declare const useComposedViewComponents: () => Readonly<Record<string, ComposedViewComponentDefinition>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ONE tone list of the composable kit (the backend twin is `ComposedViewTone.php`):
|
|
3
|
+
* the judgement or role a text, a badge, a value, an icon or a map status line takes. Every node with a `tone` prop
|
|
4
|
+
* reads it through {@link readComposedViewTone}, so a model that learned one word uses it everywhere. The words some
|
|
5
|
+
* nodes accepted before the list existed stay accepted on the wire (both tree readers list them as allowed values) and
|
|
6
|
+
* read as their tone here: `default` (Text) is `neutral`, `positive` / `negative` (Map status lines) are `success` /
|
|
7
|
+
* `danger`.
|
|
8
|
+
*/
|
|
9
|
+
export declare const COMPOSED_VIEW_TONES: readonly ["neutral", "muted", "success", "warning", "danger", "info"];
|
|
10
|
+
export type ComposedViewTone = (typeof COMPOSED_VIEW_TONES)[number];
|
|
11
|
+
/** The older words, accepted on the wire and read as their tone. */
|
|
12
|
+
export declare const COMPOSED_VIEW_TONE_ALIASES: Readonly<Record<string, ComposedViewTone>>;
|
|
13
|
+
/** The tone a prop names — one of the list or an alias — else `fallback` (a bound value may hold anything). */
|
|
14
|
+
export declare const readComposedViewTone: (value: unknown, fallback?: ComposedViewTone) => ComposedViewTone;
|
|
15
|
+
/** The tone a prop names, or `undefined` when it names none (a status line without a tone stays plain). */
|
|
16
|
+
export declare const readOptionalComposedViewTone: (value: unknown) => ComposedViewTone | undefined;
|
|
17
|
+
/** The text colour of a tone, for the component library's `Text`'s `color` prop — judgement text in the 900 step (500 on dark). */
|
|
18
|
+
export declare const COMPOSED_VIEW_TONE_TEXT_COLOR: Readonly<Record<ComposedViewTone, string>>;
|
|
19
|
+
/** The graphic colour of a tone — an icon fill in the 500 step. */
|
|
20
|
+
export declare const COMPOSED_VIEW_TONE_GRAPHIC_COLOR: Readonly<Record<ComposedViewTone, string>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CanvasBodyProps } from "../../renderer/canvas/canvas-body-props";
|
|
2
|
+
/**
|
|
3
|
+
* The `entityDetail` CANVAS BODY (`canvasBodies.tsx`): the shell around one entity's detail. It reads
|
|
4
|
+
* WHICH entity from the canvas instance id (`entityDetail:<entityType>:<id>`) and mounts the body registered for that
|
|
5
|
+
* entity type; the body self-hydrates by id. An entity type without a body renders a short notice instead of nothing,
|
|
6
|
+
* so a click never lands on an empty pane. "Ask about this" stays at the pane's foot while the detail scrolls and
|
|
7
|
+
* names the entity in its chip once the body reported the name (`useReportEntityDetailName`).
|
|
8
|
+
*/
|
|
9
|
+
export declare const EntityDetailCanvasBody: ({ canvas, agentSpaceKey }: CanvasBodyProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* The bodies of the `entityDetail` canvas, one per entity type: every `*.entity-detail-body.tsx` below
|
|
4
|
+
* `widgets/` that exports `entityDetailBody` registers itself by folder glob — an entity type is added with
|
|
5
|
+
* the backend `<Type>EntityReferenceResolver` and this one file, and edits no list. A second body for one entity type
|
|
6
|
+
* is a build error (thrown at module load).
|
|
7
|
+
*/
|
|
8
|
+
export interface EntityDetailBodyProps {
|
|
9
|
+
entityType: string;
|
|
10
|
+
/** The id as the backend resolved it (a row id or an external id). */
|
|
11
|
+
entityId: string;
|
|
12
|
+
/** The key of the agent space the chat is scoped to, for a body whose read endpoint is agent-space-scoped. */
|
|
13
|
+
agentSpaceKey?: number;
|
|
14
|
+
}
|
|
15
|
+
export interface EntityDetailBodyDefinition {
|
|
16
|
+
/** The backend resolver's `ENTITY_TYPE`. */
|
|
17
|
+
entityType: string;
|
|
18
|
+
/** Self-hydrates the entity by id through its own read endpoint (the endpoint's entity rights apply). */
|
|
19
|
+
component: React.ComponentType<EntityDetailBodyProps>;
|
|
20
|
+
}
|
|
21
|
+
export declare const buildEntityDetailBodyRegistry: (definitions: EntityDetailBodyDefinition[]) => Readonly<Record<string, EntityDetailBodyDefinition>>;
|
|
22
|
+
/** The body definitions a set of `*.entity-detail-body.tsx` modules export (the package's or an app's glob). */
|
|
23
|
+
export declare const readEntityDetailBodyDefinitions: (modules: Record<string, {
|
|
24
|
+
entityDetailBody?: EntityDetailBodyDefinition;
|
|
25
|
+
}>) => EntityDetailBodyDefinition[];
|
|
26
|
+
/** Entity type → body: the package's folder, then what an app registers (`registerEntityDetailBodies`). */
|
|
27
|
+
export declare const entityDetailBodies: Record<string, EntityDetailBodyDefinition>;
|
|
28
|
+
/** Adds an app's entity detail bodies. Runs outside React, before the first render; an entity type registers once. */
|
|
29
|
+
export declare const registerEntityDetailBodies: (definitions: readonly EntityDetailBodyDefinition[]) => void;
|
|
30
|
+
/** The registry the canvas body uses — the folder's by default; a spec or a story may provide stubs. */
|
|
31
|
+
export declare const EntityDetailBodiesContext: React.Context<Readonly<Record<string, EntityDetailBodyDefinition>>>;
|
|
32
|
+
export declare const useEntityDetailBodies: () => Readonly<Record<string, EntityDetailBodyDefinition>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The name of the entity the `entityDetail` canvas shows: a detail body knows it only once it hydrated,
|
|
3
|
+
* the shell needs it for the "Ask about this" chip — ChatGPT's follow-up chip names the business, a chip without it
|
|
4
|
+
* says "About this entry". A body reports the name with {@link useReportEntityDetailName}; outside the shell (a story,
|
|
5
|
+
* a spec of the body alone) the report goes nowhere.
|
|
6
|
+
*/
|
|
7
|
+
export declare const EntityDetailNameReportContext: import("react").Context<(entityName: string | undefined) => void>;
|
|
8
|
+
/** Reports the shown entity's name (the hydrated business, keyword or review title) to the `entityDetail` shell. */
|
|
9
|
+
export declare const useReportEntityDetailName: (entityName: string | undefined) => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CanvasBodyProps } from "../../renderer/canvas/canvas-body-props";
|
|
2
|
+
/**
|
|
3
|
+
* The `mapFullScreen` CANVAS BODY (`canvasBodies.tsx`): one `Map` node of the anchor
|
|
4
|
+
* message, full screen — the map filling the pane beside the list of its points. It finds the node through the
|
|
5
|
+
* message's `ComposedView` fences and the node key its instance id carries (`map-full-screen-instance.ts`), then
|
|
6
|
+
* renders it through the same `ComposedViewRenderer` with the node's own tree, so its bindings (`$data`, `$from`,
|
|
7
|
+
* `$source`, `$computed`, `$state` at its initial value) and its actions resolve exactly as inline; the
|
|
8
|
+
* `MapPresentationContext` switches the node to its full-screen layout. A point's `openEntity` action opens the
|
|
9
|
+
* `entityDetail` canvas on the same anchor message (it replaces this canvas, as a click on an inline point would).
|
|
10
|
+
*/
|
|
11
|
+
export declare const MapFullScreenCanvasBody: (props: CanvasBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { WidgetPreviewReadiness } from "./widget-preview-readiness";
|
|
2
|
+
import type { WidgetPreviewBootstrap, WidgetPreviewFixture } from "./widget-preview.types";
|
|
3
|
+
/**
|
|
4
|
+
* The widget preview host: ONE widget from ONE fixture, outside the chat, in the mode the script
|
|
5
|
+
* asks for. Unlike the e-mail capture host it keeps a working canvas pane (an `openCanvas` request mounts the canvas
|
|
6
|
+
* body beside the widget, its anchor message being the fixture's fence) and a composer log (what the widget sent,
|
|
7
|
+
* prefilled or signalled), so the interactions of the ChatGPT reference can be driven and checked. The app mounts it in
|
|
8
|
+
* its store (the capture's store state); every request is served from the fixture (`widget-preview-requests.ts`). The fixture's
|
|
9
|
+
* `hydration` is the capture's frozen hydration only in `email` mode; `interactive` and `replay` serve it through the
|
|
10
|
+
* preview's hydrators (`widget-preview-hydration.ts`), so the widget runs as in the chat (a canvas auto-opens).
|
|
11
|
+
*/
|
|
12
|
+
/** The key of the agent space a fixture without its own renders for. */
|
|
13
|
+
export declare const PREVIEW_AGENT_SPACE_KEY = 1;
|
|
14
|
+
export interface WidgetPreviewProps {
|
|
15
|
+
bootstrap: WidgetPreviewBootstrap;
|
|
16
|
+
fixture: WidgetPreviewFixture;
|
|
17
|
+
readiness: WidgetPreviewReadiness;
|
|
18
|
+
hasHydrationError: () => boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare const WidgetPreview: (props: WidgetPreviewProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ComposedViewComponentDefinition } from "../kit/composed-view-component-types";
|
|
2
|
+
/** The folder registry with a stub for every node type that has no component of its own. */
|
|
3
|
+
export declare const buildPreviewComposedViewComponents: () => Readonly<Record<string, ComposedViewComponentDefinition>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { WidgetPreviewFixture, WidgetPreviewFixtureFile } from "./widget-preview.types";
|
|
2
|
+
/** Every fixture file, sorted by wire name; filled in place by `registerWidgetPreviewFixtureFiles`. */
|
|
3
|
+
export declare const widgetPreviewFixtureFiles: WidgetPreviewFixtureFile[];
|
|
4
|
+
/** Adds an app's fixture files (its glob stays in its code). Runs before the preview reads a fixture. */
|
|
5
|
+
export declare const registerWidgetPreviewFixtureFiles: (fixtureFiles: readonly WidgetPreviewFixtureFile[]) => void;
|
|
6
|
+
/**
|
|
7
|
+
* The fixtures of a widget from EVERY file naming it — a `ComposedView` component can add its own file next to it
|
|
8
|
+
* instead of editing the widget's — or an empty list. A fixture an app registers under the name of a package fixture
|
|
9
|
+
* of the same widget replaces it in place (an app's copy with its own entity types and endpoints). Each is read under
|
|
10
|
+
* the agent space key field the app declares (`mapFixtureToDeclaredAgentSpaceKeyFieldName`; the package's files name
|
|
11
|
+
* `agentSpaceId`), at call time: an app installs its environment after this module is loaded.
|
|
12
|
+
*/
|
|
13
|
+
export declare const findWidgetPreviewFixtures: (widgetName: string) => readonly WidgetPreviewFixture[];
|
|
14
|
+
/** One named fixture, or undefined. */
|
|
15
|
+
export declare const findWidgetPreviewFixture: (widgetName: string, fixtureName: string) => WidgetPreviewFixture | undefined;
|
|
16
|
+
/** The fence the fixture stands for — what a canvas body re-reads as its anchor message. */
|
|
17
|
+
export declare const buildWidgetPreviewFence: (widgetName: string, fixture: WidgetPreviewFixture) => string;
|