stream-chat-react-native-core 9.12.1 → 9.13.0
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/a2ui/package.json +6 -0
- package/lib/commonjs/a11y/a11yUtils.js.map +1 -1
- package/lib/commonjs/a11y/hooks/useResolvedModalAccessibilityProps.js.map +1 -1
- package/lib/commonjs/a2ui/A2UIContexts.js +8 -0
- package/lib/commonjs/a2ui/A2UIContexts.js.map +1 -0
- package/lib/commonjs/a2ui/A2UIInstructions.js +49 -0
- package/lib/commonjs/a2ui/A2UIInstructions.js.map +1 -0
- package/lib/commonjs/a2ui/A2UIPlaceholder.js +37 -0
- package/lib/commonjs/a2ui/A2UIPlaceholder.js.map +1 -0
- package/lib/commonjs/a2ui/A2UIRenderer.js +363 -0
- package/lib/commonjs/a2ui/A2UIRenderer.js.map +1 -0
- package/lib/commonjs/a2ui/A2UIStream.js +91 -0
- package/lib/commonjs/a2ui/A2UIStream.js.map +1 -0
- package/lib/commonjs/a2ui/A2UISurface.js +212 -0
- package/lib/commonjs/a2ui/A2UISurface.js.map +1 -0
- package/lib/commonjs/a2ui/basicCatalog.json +1206 -0
- package/lib/commonjs/a2ui/basicFunctions.js +398 -0
- package/lib/commonjs/a2ui/basicFunctions.js.map +1 -0
- package/lib/commonjs/a2ui/catalogDocument.js +80 -0
- package/lib/commonjs/a2ui/catalogDocument.js.map +1 -0
- package/lib/commonjs/a2ui/catalogs.js +105 -0
- package/lib/commonjs/a2ui/catalogs.js.map +1 -0
- package/lib/commonjs/a2ui/components/DateTimeInput.js +445 -0
- package/lib/commonjs/a2ui/components/DateTimeInput.js.map +1 -0
- package/lib/commonjs/a2ui/components/Media.js +316 -0
- package/lib/commonjs/a2ui/components/Media.js.map +1 -0
- package/lib/commonjs/a2ui/components/basicComponents.js +975 -0
- package/lib/commonjs/a2ui/components/basicComponents.js.map +1 -0
- package/lib/commonjs/a2ui/components/iconPaths.js +66 -0
- package/lib/commonjs/a2ui/components/iconPaths.js.map +1 -0
- package/lib/commonjs/a2ui/components/types.js +4 -0
- package/lib/commonjs/a2ui/components/types.js.map +1 -0
- package/lib/commonjs/a2ui/index.js +70 -0
- package/lib/commonjs/a2ui/index.js.map +1 -0
- package/lib/commonjs/a2ui/instructions.js +268 -0
- package/lib/commonjs/a2ui/instructions.js.map +1 -0
- package/lib/commonjs/a2ui/secrets.js +169 -0
- package/lib/commonjs/a2ui/secrets.js.map +1 -0
- package/lib/commonjs/a2ui/useReplyState.js +35 -0
- package/lib/commonjs/a2ui/useReplyState.js.map +1 -0
- package/lib/commonjs/ai-components/AITypingIndicatorView.js +8 -18
- package/lib/commonjs/ai-components/AITypingIndicatorView.js.map +1 -1
- package/lib/commonjs/ai-components/README.md +55 -3
- package/lib/commonjs/ai-components/StreamingMessageView.js +26 -0
- package/lib/commonjs/ai-components/StreamingMessageView.js.map +1 -1
- package/lib/commonjs/ai-components/charts/components/PieLegend.js +2 -1
- package/lib/commonjs/ai-components/charts/components/PieLegend.js.map +1 -1
- package/lib/commonjs/ai-components/charts/components/VictoryChart.js +7 -2
- package/lib/commonjs/ai-components/charts/components/VictoryChart.js.map +1 -1
- package/lib/commonjs/ai-components/charts/utils/format-time-label.js +15 -0
- package/lib/commonjs/ai-components/charts/utils/format-time-label.js.map +1 -0
- package/lib/commonjs/ai-components/charts/vega-lite/schema.js +17 -2
- package/lib/commonjs/ai-components/charts/vega-lite/schema.js.map +1 -1
- package/lib/commonjs/ai-components/contexts/composer-context.js +13 -6
- package/lib/commonjs/ai-components/contexts/composer-context.js.map +1 -1
- package/lib/commonjs/ai-components/contexts/index.js +11 -0
- package/lib/commonjs/ai-components/contexts/index.js.map +1 -1
- package/lib/commonjs/ai-components/contexts/theme-context.js +33 -2
- package/lib/commonjs/ai-components/contexts/theme-context.js.map +1 -1
- package/lib/commonjs/ai-components/contexts/translation-context.js +29 -0
- package/lib/commonjs/ai-components/contexts/translation-context.js.map +1 -0
- package/lib/commonjs/ai-components/conversation/AIConversation.js +366 -0
- package/lib/commonjs/ai-components/conversation/AIConversation.js.map +1 -0
- package/lib/commonjs/ai-components/conversation/controller/AIAgentError.js +13 -0
- package/lib/commonjs/ai-components/conversation/controller/AIAgentError.js.map +1 -0
- package/lib/commonjs/ai-components/conversation/controller/AIConversationController.js +425 -0
- package/lib/commonjs/ai-components/conversation/controller/AIConversationController.js.map +1 -0
- package/lib/commonjs/ai-components/conversation/controller/AIConversationExchange.js +89 -0
- package/lib/commonjs/ai-components/conversation/controller/AIConversationExchange.js.map +1 -0
- package/lib/commonjs/ai-components/conversation/controller/index.js +48 -0
- package/lib/commonjs/ai-components/conversation/controller/index.js.map +1 -0
- package/lib/commonjs/ai-components/conversation/controller/offers.js +29 -0
- package/lib/commonjs/ai-components/conversation/controller/offers.js.map +1 -0
- package/lib/commonjs/ai-components/conversation/controller/types.js +13 -0
- package/lib/commonjs/ai-components/conversation/controller/types.js.map +1 -0
- package/lib/commonjs/ai-components/conversation/controller/useAIConversationState.js +8 -0
- package/lib/commonjs/ai-components/conversation/controller/useAIConversationState.js.map +1 -0
- package/lib/commonjs/ai-components/conversation/entries.js +98 -0
- package/lib/commonjs/ai-components/conversation/entries.js.map +1 -0
- package/lib/commonjs/ai-components/conversation/fromStreamMessage.js +66 -0
- package/lib/commonjs/ai-components/conversation/fromStreamMessage.js.map +1 -0
- package/lib/commonjs/ai-components/conversation/index.js +48 -0
- package/lib/commonjs/ai-components/conversation/index.js.map +1 -0
- package/lib/commonjs/ai-components/conversation/list/AIChatList.js +224 -0
- package/lib/commonjs/ai-components/conversation/list/AIChatList.js.map +1 -0
- package/lib/commonjs/ai-components/conversation/list/useChatListController.js +78 -0
- package/lib/commonjs/ai-components/conversation/list/useChatListController.js.map +1 -0
- package/lib/commonjs/ai-components/conversation/list/useEndInView.js +51 -0
- package/lib/commonjs/ai-components/conversation/list/useEndInView.js.map +1 -0
- package/lib/commonjs/ai-components/conversation/list/useKeyboardOverlap.js +54 -0
- package/lib/commonjs/ai-components/conversation/list/useKeyboardOverlap.js.map +1 -0
- package/lib/commonjs/ai-components/conversation/list/useLoadOlder.js +73 -0
- package/lib/commonjs/ai-components/conversation/list/useLoadOlder.js.map +1 -0
- package/lib/commonjs/ai-components/conversation/list/usePinnedAnchor.js +84 -0
- package/lib/commonjs/ai-components/conversation/list/usePinnedAnchor.js.map +1 -0
- package/lib/commonjs/ai-components/conversation/types.js +4 -0
- package/lib/commonjs/ai-components/conversation/types.js.map +1 -0
- package/lib/commonjs/ai-components/conversation/useConversationRows.js +117 -0
- package/lib/commonjs/ai-components/conversation/useConversationRows.js.map +1 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIAction.js +30 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIAction.js.map +1 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIArguments.js +128 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIArguments.js.map +1 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIComponent.js +50 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIComponent.js.map +1 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIComponentDefinition.js +134 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIComponentDefinition.js.map +1 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIDocument.js +32 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIDocument.js.map +1 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIEntrance.js +193 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIEntrance.js.map +1 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIErrorBoundary.js +30 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIErrorBoundary.js.map +1 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIHelpers.js +54 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIHelpers.js.map +1 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIHost.js +259 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIHost.js.map +1 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIMedia.js +24 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIMedia.js.map +1 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIRenderer.js +10 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIRenderer.js.map +1 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIView.js +57 -0
- package/lib/commonjs/ai-components/generative-ui/AIUIView.js.map +1 -0
- package/lib/commonjs/ai-components/generative-ui/index.js +181 -0
- package/lib/commonjs/ai-components/generative-ui/index.js.map +1 -0
- package/lib/commonjs/ai-components/icons.js +44 -0
- package/lib/commonjs/ai-components/icons.js.map +1 -0
- package/lib/commonjs/ai-components/index.js +96 -0
- package/lib/commonjs/ai-components/index.js.map +1 -1
- package/lib/commonjs/ai-components/internal/Shimmer.js +36 -0
- package/lib/commonjs/ai-components/internal/Shimmer.js.map +1 -0
- package/lib/commonjs/ai-components/internal/format.js +66 -0
- package/lib/commonjs/ai-components/internal/format.js.map +1 -0
- package/lib/commonjs/ai-components/internal/hooks/useBottomSafeArea.js +12 -0
- package/lib/commonjs/ai-components/internal/hooks/useBottomSafeArea.js.map +1 -0
- package/lib/commonjs/ai-components/internal/icons/AgentIcons.js +74 -0
- package/lib/commonjs/ai-components/internal/icons/AgentIcons.js.map +1 -0
- package/lib/commonjs/ai-components/internal/tokens.js +11 -0
- package/lib/commonjs/ai-components/internal/tokens.js.map +1 -0
- package/lib/commonjs/ai-components/internal/uuid.js +21 -0
- package/lib/commonjs/ai-components/internal/uuid.js.map +1 -0
- package/lib/commonjs/ai-components/markdown/components/CodeBlock.js +4 -2
- package/lib/commonjs/ai-components/markdown/components/CodeBlock.js.map +1 -1
- package/lib/commonjs/ai-components/markdown/components/InlineCode.js +1 -0
- package/lib/commonjs/ai-components/markdown/components/InlineCode.js.map +1 -1
- package/lib/commonjs/ai-components/markdown/components/Text.js +11 -2
- package/lib/commonjs/ai-components/markdown/components/Text.js.map +1 -1
- package/lib/commonjs/ai-components/markdown/styles.js +27 -29
- package/lib/commonjs/ai-components/markdown/styles.js.map +1 -1
- package/lib/commonjs/ai-components/message/AIAssistantMessage.js +63 -0
- package/lib/commonjs/ai-components/message/AIAssistantMessage.js.map +1 -0
- package/lib/commonjs/ai-components/message/AIMessageAttachment.js +189 -0
- package/lib/commonjs/ai-components/message/AIMessageAttachment.js.map +1 -0
- package/lib/commonjs/ai-components/message/AIReplyActions.js +132 -0
- package/lib/commonjs/ai-components/message/AIReplyActions.js.map +1 -0
- package/lib/commonjs/ai-components/message/AIUserMessage.js +104 -0
- package/lib/commonjs/ai-components/message/AIUserMessage.js.map +1 -0
- package/lib/commonjs/ai-components/message/UserMessageMenu.js +150 -0
- package/lib/commonjs/ai-components/message/UserMessageMenu.js.map +1 -0
- package/lib/commonjs/ai-components/message/index.js +48 -0
- package/lib/commonjs/ai-components/message/index.js.map +1 -0
- package/lib/commonjs/ai-components/message-composer/ActionButton.js +2 -1
- package/lib/commonjs/ai-components/message-composer/ActionButton.js.map +1 -1
- package/lib/commonjs/ai-components/message-composer/ActionSheet.js +22 -6
- package/lib/commonjs/ai-components/message-composer/ActionSheet.js.map +1 -1
- package/lib/commonjs/ai-components/message-composer/AttachmentButton.js +5 -1
- package/lib/commonjs/ai-components/message-composer/AttachmentButton.js.map +1 -1
- package/lib/commonjs/ai-components/message-composer/ChatOptions.js +147 -0
- package/lib/commonjs/ai-components/message-composer/ChatOptions.js.map +1 -0
- package/lib/commonjs/ai-components/message-composer/ComposerView.js +136 -20
- package/lib/commonjs/ai-components/message-composer/ComposerView.js.map +1 -1
- package/lib/commonjs/ai-components/message-composer/EditingMessageChip.js +80 -0
- package/lib/commonjs/ai-components/message-composer/EditingMessageChip.js.map +1 -0
- package/lib/commonjs/ai-components/message-composer/MediaPreviewList.js +26 -1
- package/lib/commonjs/ai-components/message-composer/MediaPreviewList.js.map +1 -1
- package/lib/commonjs/ai-components/message-composer/index.js +11 -0
- package/lib/commonjs/ai-components/message-composer/index.js.map +1 -1
- package/lib/commonjs/ai-components/message-parts/AIMessageParts.js +110 -0
- package/lib/commonjs/ai-components/message-parts/AIMessageParts.js.map +1 -0
- package/lib/commonjs/ai-components/message-parts/AIToolApproval.js +197 -0
- package/lib/commonjs/ai-components/message-parts/AIToolApproval.js.map +1 -0
- package/lib/commonjs/ai-components/message-parts/AIToolAuthorization.js +250 -0
- package/lib/commonjs/ai-components/message-parts/AIToolAuthorization.js.map +1 -0
- package/lib/commonjs/ai-components/message-parts/AIToolCall.js +159 -0
- package/lib/commonjs/ai-components/message-parts/AIToolCall.js.map +1 -0
- package/lib/commonjs/ai-components/message-parts/callStates.js +54 -0
- package/lib/commonjs/ai-components/message-parts/callStates.js.map +1 -0
- package/lib/commonjs/ai-components/message-parts/index.js +70 -0
- package/lib/commonjs/ai-components/message-parts/index.js.map +1 -0
- package/lib/commonjs/ai-components/message-parts/parseMessageParts.js +126 -0
- package/lib/commonjs/ai-components/message-parts/parseMessageParts.js.map +1 -0
- package/lib/commonjs/ai-components/message-parts/types.js +2 -0
- package/lib/commonjs/ai-components/message-parts/types.js.map +1 -0
- package/lib/commonjs/ai-components/native-specs/NativeAIAgent.js +7 -0
- package/lib/commonjs/ai-components/native-specs/NativeAIAgent.js.map +1 -0
- package/lib/commonjs/ai-components/reasoning/AIReasoning.js +401 -0
- package/lib/commonjs/ai-components/reasoning/AIReasoning.js.map +1 -0
- package/lib/commonjs/ai-components/reasoning/index.js +26 -0
- package/lib/commonjs/ai-components/reasoning/index.js.map +1 -0
- package/lib/commonjs/ai-components/reasoning/thinkingClock.js +63 -0
- package/lib/commonjs/ai-components/reasoning/thinkingClock.js.map +1 -0
- package/lib/commonjs/ai-components/services/clipboard-service/expo.js +7 -2
- package/lib/commonjs/ai-components/services/clipboard-service/expo.js.map +1 -1
- package/lib/commonjs/ai-components/store/composer/store.js.map +1 -1
- package/lib/commonjs/ai-components/store/composer/useComposerChatOption.js +18 -0
- package/lib/commonjs/ai-components/store/composer/useComposerChatOption.js.map +1 -0
- package/lib/commonjs/ai-components/store/composer/useComposerIsEditing.js +18 -0
- package/lib/commonjs/ai-components/store/composer/useComposerIsEditing.js.map +1 -0
- package/lib/commonjs/ai-components/store/index.js +22 -0
- package/lib/commonjs/ai-components/store/index.js.map +1 -1
- package/lib/commonjs/ai-components/suggestions/AISuggestions.js +66 -0
- package/lib/commonjs/ai-components/suggestions/AISuggestions.js.map +1 -0
- package/lib/commonjs/ai-components/suggestions/index.js +15 -0
- package/lib/commonjs/ai-components/suggestions/index.js.map +1 -0
- package/lib/commonjs/ai-components/syntax-highlighting/utils/flatten-nodes.js +2 -1
- package/lib/commonjs/ai-components/syntax-highlighting/utils/flatten-nodes.js.map +1 -1
- package/lib/commonjs/ai-components/syntax-highlighting/utils/renderer.js +3 -2
- package/lib/commonjs/ai-components/syntax-highlighting/utils/renderer.js.map +1 -1
- package/lib/commonjs/ai-components/theme.js +137 -1
- package/lib/commonjs/ai-components/theme.js.map +1 -1
- package/lib/commonjs/ai-components/tool-calls/AIClientIdentity.js +22 -0
- package/lib/commonjs/ai-components/tool-calls/AIClientIdentity.js.map +1 -0
- package/lib/commonjs/ai-components/tool-calls/AIClientToolRunner.js +109 -0
- package/lib/commonjs/ai-components/tool-calls/AIClientToolRunner.js.map +1 -0
- package/lib/commonjs/ai-components/tool-calls/AIToolApprover.js +23 -0
- package/lib/commonjs/ai-components/tool-calls/AIToolApprover.js.map +1 -0
- package/lib/commonjs/ai-components/tool-calls/authSessionAuthorizer.js +88 -0
- package/lib/commonjs/ai-components/tool-calls/authSessionAuthorizer.js.map +1 -0
- package/lib/commonjs/ai-components/tool-calls/index.js +48 -0
- package/lib/commonjs/ai-components/tool-calls/index.js.map +1 -0
- package/lib/commonjs/ai-components/voice-visualization/glowShader.js.map +1 -1
- package/lib/commonjs/components/Accessibility/useAccessibilityAnnouncer.js.map +1 -1
- package/lib/commonjs/components/Message/MessageItemView/utils/renderText.js.map +1 -1
- package/lib/commonjs/contexts/translationContext/TranslationContext.js +2 -2
- package/lib/commonjs/contexts/translationContext/TranslationContext.js.map +1 -1
- package/lib/commonjs/i18n/ar.json +39 -1
- package/lib/commonjs/i18n/en.json +39 -1
- package/lib/commonjs/i18n/es.json +39 -1
- package/lib/commonjs/i18n/fr.json +39 -1
- package/lib/commonjs/i18n/he.json +39 -1
- package/lib/commonjs/i18n/hi.json +39 -1
- package/lib/commonjs/i18n/it.json +39 -1
- package/lib/commonjs/i18n/ja.json +39 -1
- package/lib/commonjs/i18n/ko.json +39 -1
- package/lib/commonjs/i18n/nl.json +39 -1
- package/lib/commonjs/i18n/pt-br.json +39 -1
- package/lib/commonjs/i18n/ru.json +39 -1
- package/lib/commonjs/i18n/tr.json +39 -1
- package/lib/commonjs/mock-builders/a2ui/ohrid.js +84 -0
- package/lib/commonjs/mock-builders/a2ui/ohrid.js.map +1 -0
- package/lib/commonjs/utils/i18n/Streami18n.js +9 -4
- package/lib/commonjs/utils/i18n/Streami18n.js.map +1 -1
- package/lib/commonjs/utils/i18n/utils.js +7 -0
- package/lib/commonjs/utils/i18n/utils.js.map +1 -0
- package/lib/commonjs/version.json +1 -1
- package/lib/module/a11y/a11yUtils.js.map +1 -1
- package/lib/module/a11y/hooks/useResolvedModalAccessibilityProps.js.map +1 -1
- package/lib/module/a2ui/A2UIContexts.js +8 -0
- package/lib/module/a2ui/A2UIContexts.js.map +1 -0
- package/lib/module/a2ui/A2UIInstructions.js +49 -0
- package/lib/module/a2ui/A2UIInstructions.js.map +1 -0
- package/lib/module/a2ui/A2UIPlaceholder.js +37 -0
- package/lib/module/a2ui/A2UIPlaceholder.js.map +1 -0
- package/lib/module/a2ui/A2UIRenderer.js +363 -0
- package/lib/module/a2ui/A2UIRenderer.js.map +1 -0
- package/lib/module/a2ui/A2UIStream.js +91 -0
- package/lib/module/a2ui/A2UIStream.js.map +1 -0
- package/lib/module/a2ui/A2UISurface.js +212 -0
- package/lib/module/a2ui/A2UISurface.js.map +1 -0
- package/lib/module/a2ui/basicCatalog.json +1206 -0
- package/lib/module/a2ui/basicFunctions.js +398 -0
- package/lib/module/a2ui/basicFunctions.js.map +1 -0
- package/lib/module/a2ui/catalogDocument.js +80 -0
- package/lib/module/a2ui/catalogDocument.js.map +1 -0
- package/lib/module/a2ui/catalogs.js +105 -0
- package/lib/module/a2ui/catalogs.js.map +1 -0
- package/lib/module/a2ui/components/DateTimeInput.js +445 -0
- package/lib/module/a2ui/components/DateTimeInput.js.map +1 -0
- package/lib/module/a2ui/components/Media.js +316 -0
- package/lib/module/a2ui/components/Media.js.map +1 -0
- package/lib/module/a2ui/components/basicComponents.js +975 -0
- package/lib/module/a2ui/components/basicComponents.js.map +1 -0
- package/lib/module/a2ui/components/iconPaths.js +66 -0
- package/lib/module/a2ui/components/iconPaths.js.map +1 -0
- package/lib/module/a2ui/components/types.js +4 -0
- package/lib/module/a2ui/components/types.js.map +1 -0
- package/lib/module/a2ui/index.js +70 -0
- package/lib/module/a2ui/index.js.map +1 -0
- package/lib/module/a2ui/instructions.js +268 -0
- package/lib/module/a2ui/instructions.js.map +1 -0
- package/lib/module/a2ui/secrets.js +169 -0
- package/lib/module/a2ui/secrets.js.map +1 -0
- package/lib/module/a2ui/useReplyState.js +35 -0
- package/lib/module/a2ui/useReplyState.js.map +1 -0
- package/lib/module/ai-components/AITypingIndicatorView.js +8 -18
- package/lib/module/ai-components/AITypingIndicatorView.js.map +1 -1
- package/lib/module/ai-components/README.md +55 -3
- package/lib/module/ai-components/StreamingMessageView.js +26 -0
- package/lib/module/ai-components/StreamingMessageView.js.map +1 -1
- package/lib/module/ai-components/charts/components/PieLegend.js +2 -1
- package/lib/module/ai-components/charts/components/PieLegend.js.map +1 -1
- package/lib/module/ai-components/charts/components/VictoryChart.js +7 -2
- package/lib/module/ai-components/charts/components/VictoryChart.js.map +1 -1
- package/lib/module/ai-components/charts/utils/format-time-label.js +15 -0
- package/lib/module/ai-components/charts/utils/format-time-label.js.map +1 -0
- package/lib/module/ai-components/charts/vega-lite/schema.js +17 -2
- package/lib/module/ai-components/charts/vega-lite/schema.js.map +1 -1
- package/lib/module/ai-components/contexts/composer-context.js +13 -6
- package/lib/module/ai-components/contexts/composer-context.js.map +1 -1
- package/lib/module/ai-components/contexts/index.js +11 -0
- package/lib/module/ai-components/contexts/index.js.map +1 -1
- package/lib/module/ai-components/contexts/theme-context.js +33 -2
- package/lib/module/ai-components/contexts/theme-context.js.map +1 -1
- package/lib/module/ai-components/contexts/translation-context.js +29 -0
- package/lib/module/ai-components/contexts/translation-context.js.map +1 -0
- package/lib/module/ai-components/conversation/AIConversation.js +366 -0
- package/lib/module/ai-components/conversation/AIConversation.js.map +1 -0
- package/lib/module/ai-components/conversation/controller/AIAgentError.js +13 -0
- package/lib/module/ai-components/conversation/controller/AIAgentError.js.map +1 -0
- package/lib/module/ai-components/conversation/controller/AIConversationController.js +425 -0
- package/lib/module/ai-components/conversation/controller/AIConversationController.js.map +1 -0
- package/lib/module/ai-components/conversation/controller/AIConversationExchange.js +89 -0
- package/lib/module/ai-components/conversation/controller/AIConversationExchange.js.map +1 -0
- package/lib/module/ai-components/conversation/controller/index.js +48 -0
- package/lib/module/ai-components/conversation/controller/index.js.map +1 -0
- package/lib/module/ai-components/conversation/controller/offers.js +29 -0
- package/lib/module/ai-components/conversation/controller/offers.js.map +1 -0
- package/lib/module/ai-components/conversation/controller/types.js +13 -0
- package/lib/module/ai-components/conversation/controller/types.js.map +1 -0
- package/lib/module/ai-components/conversation/controller/useAIConversationState.js +8 -0
- package/lib/module/ai-components/conversation/controller/useAIConversationState.js.map +1 -0
- package/lib/module/ai-components/conversation/entries.js +98 -0
- package/lib/module/ai-components/conversation/entries.js.map +1 -0
- package/lib/module/ai-components/conversation/fromStreamMessage.js +66 -0
- package/lib/module/ai-components/conversation/fromStreamMessage.js.map +1 -0
- package/lib/module/ai-components/conversation/index.js +48 -0
- package/lib/module/ai-components/conversation/index.js.map +1 -0
- package/lib/module/ai-components/conversation/list/AIChatList.js +224 -0
- package/lib/module/ai-components/conversation/list/AIChatList.js.map +1 -0
- package/lib/module/ai-components/conversation/list/useChatListController.js +78 -0
- package/lib/module/ai-components/conversation/list/useChatListController.js.map +1 -0
- package/lib/module/ai-components/conversation/list/useEndInView.js +51 -0
- package/lib/module/ai-components/conversation/list/useEndInView.js.map +1 -0
- package/lib/module/ai-components/conversation/list/useKeyboardOverlap.js +54 -0
- package/lib/module/ai-components/conversation/list/useKeyboardOverlap.js.map +1 -0
- package/lib/module/ai-components/conversation/list/useLoadOlder.js +73 -0
- package/lib/module/ai-components/conversation/list/useLoadOlder.js.map +1 -0
- package/lib/module/ai-components/conversation/list/usePinnedAnchor.js +84 -0
- package/lib/module/ai-components/conversation/list/usePinnedAnchor.js.map +1 -0
- package/lib/module/ai-components/conversation/types.js +4 -0
- package/lib/module/ai-components/conversation/types.js.map +1 -0
- package/lib/module/ai-components/conversation/useConversationRows.js +117 -0
- package/lib/module/ai-components/conversation/useConversationRows.js.map +1 -0
- package/lib/module/ai-components/generative-ui/AIUIAction.js +30 -0
- package/lib/module/ai-components/generative-ui/AIUIAction.js.map +1 -0
- package/lib/module/ai-components/generative-ui/AIUIArguments.js +128 -0
- package/lib/module/ai-components/generative-ui/AIUIArguments.js.map +1 -0
- package/lib/module/ai-components/generative-ui/AIUIComponent.js +50 -0
- package/lib/module/ai-components/generative-ui/AIUIComponent.js.map +1 -0
- package/lib/module/ai-components/generative-ui/AIUIComponentDefinition.js +134 -0
- package/lib/module/ai-components/generative-ui/AIUIComponentDefinition.js.map +1 -0
- package/lib/module/ai-components/generative-ui/AIUIDocument.js +32 -0
- package/lib/module/ai-components/generative-ui/AIUIDocument.js.map +1 -0
- package/lib/module/ai-components/generative-ui/AIUIEntrance.js +193 -0
- package/lib/module/ai-components/generative-ui/AIUIEntrance.js.map +1 -0
- package/lib/module/ai-components/generative-ui/AIUIErrorBoundary.js +30 -0
- package/lib/module/ai-components/generative-ui/AIUIErrorBoundary.js.map +1 -0
- package/lib/module/ai-components/generative-ui/AIUIHelpers.js +54 -0
- package/lib/module/ai-components/generative-ui/AIUIHelpers.js.map +1 -0
- package/lib/module/ai-components/generative-ui/AIUIHost.js +259 -0
- package/lib/module/ai-components/generative-ui/AIUIHost.js.map +1 -0
- package/lib/module/ai-components/generative-ui/AIUIMedia.js +24 -0
- package/lib/module/ai-components/generative-ui/AIUIMedia.js.map +1 -0
- package/lib/module/ai-components/generative-ui/AIUIRenderer.js +10 -0
- package/lib/module/ai-components/generative-ui/AIUIRenderer.js.map +1 -0
- package/lib/module/ai-components/generative-ui/AIUIView.js +57 -0
- package/lib/module/ai-components/generative-ui/AIUIView.js.map +1 -0
- package/lib/module/ai-components/generative-ui/index.js +181 -0
- package/lib/module/ai-components/generative-ui/index.js.map +1 -0
- package/lib/module/ai-components/icons.js +44 -0
- package/lib/module/ai-components/icons.js.map +1 -0
- package/lib/module/ai-components/index.js +96 -0
- package/lib/module/ai-components/index.js.map +1 -1
- package/lib/module/ai-components/internal/Shimmer.js +36 -0
- package/lib/module/ai-components/internal/Shimmer.js.map +1 -0
- package/lib/module/ai-components/internal/format.js +66 -0
- package/lib/module/ai-components/internal/format.js.map +1 -0
- package/lib/module/ai-components/internal/hooks/useBottomSafeArea.js +12 -0
- package/lib/module/ai-components/internal/hooks/useBottomSafeArea.js.map +1 -0
- package/lib/module/ai-components/internal/icons/AgentIcons.js +74 -0
- package/lib/module/ai-components/internal/icons/AgentIcons.js.map +1 -0
- package/lib/module/ai-components/internal/tokens.js +11 -0
- package/lib/module/ai-components/internal/tokens.js.map +1 -0
- package/lib/module/ai-components/internal/uuid.js +21 -0
- package/lib/module/ai-components/internal/uuid.js.map +1 -0
- package/lib/module/ai-components/markdown/components/CodeBlock.js +4 -2
- package/lib/module/ai-components/markdown/components/CodeBlock.js.map +1 -1
- package/lib/module/ai-components/markdown/components/InlineCode.js +1 -0
- package/lib/module/ai-components/markdown/components/InlineCode.js.map +1 -1
- package/lib/module/ai-components/markdown/components/Text.js +11 -2
- package/lib/module/ai-components/markdown/components/Text.js.map +1 -1
- package/lib/module/ai-components/markdown/styles.js +27 -29
- package/lib/module/ai-components/markdown/styles.js.map +1 -1
- package/lib/module/ai-components/message/AIAssistantMessage.js +63 -0
- package/lib/module/ai-components/message/AIAssistantMessage.js.map +1 -0
- package/lib/module/ai-components/message/AIMessageAttachment.js +189 -0
- package/lib/module/ai-components/message/AIMessageAttachment.js.map +1 -0
- package/lib/module/ai-components/message/AIReplyActions.js +132 -0
- package/lib/module/ai-components/message/AIReplyActions.js.map +1 -0
- package/lib/module/ai-components/message/AIUserMessage.js +104 -0
- package/lib/module/ai-components/message/AIUserMessage.js.map +1 -0
- package/lib/module/ai-components/message/UserMessageMenu.js +150 -0
- package/lib/module/ai-components/message/UserMessageMenu.js.map +1 -0
- package/lib/module/ai-components/message/index.js +48 -0
- package/lib/module/ai-components/message/index.js.map +1 -0
- package/lib/module/ai-components/message-composer/ActionButton.js +2 -1
- package/lib/module/ai-components/message-composer/ActionButton.js.map +1 -1
- package/lib/module/ai-components/message-composer/ActionSheet.js +22 -6
- package/lib/module/ai-components/message-composer/ActionSheet.js.map +1 -1
- package/lib/module/ai-components/message-composer/AttachmentButton.js +5 -1
- package/lib/module/ai-components/message-composer/AttachmentButton.js.map +1 -1
- package/lib/module/ai-components/message-composer/ChatOptions.js +147 -0
- package/lib/module/ai-components/message-composer/ChatOptions.js.map +1 -0
- package/lib/module/ai-components/message-composer/ComposerView.js +136 -20
- package/lib/module/ai-components/message-composer/ComposerView.js.map +1 -1
- package/lib/module/ai-components/message-composer/EditingMessageChip.js +80 -0
- package/lib/module/ai-components/message-composer/EditingMessageChip.js.map +1 -0
- package/lib/module/ai-components/message-composer/MediaPreviewList.js +26 -1
- package/lib/module/ai-components/message-composer/MediaPreviewList.js.map +1 -1
- package/lib/module/ai-components/message-composer/index.js +11 -0
- package/lib/module/ai-components/message-composer/index.js.map +1 -1
- package/lib/module/ai-components/message-parts/AIMessageParts.js +110 -0
- package/lib/module/ai-components/message-parts/AIMessageParts.js.map +1 -0
- package/lib/module/ai-components/message-parts/AIToolApproval.js +197 -0
- package/lib/module/ai-components/message-parts/AIToolApproval.js.map +1 -0
- package/lib/module/ai-components/message-parts/AIToolAuthorization.js +250 -0
- package/lib/module/ai-components/message-parts/AIToolAuthorization.js.map +1 -0
- package/lib/module/ai-components/message-parts/AIToolCall.js +159 -0
- package/lib/module/ai-components/message-parts/AIToolCall.js.map +1 -0
- package/lib/module/ai-components/message-parts/callStates.js +54 -0
- package/lib/module/ai-components/message-parts/callStates.js.map +1 -0
- package/lib/module/ai-components/message-parts/index.js +70 -0
- package/lib/module/ai-components/message-parts/index.js.map +1 -0
- package/lib/module/ai-components/message-parts/parseMessageParts.js +126 -0
- package/lib/module/ai-components/message-parts/parseMessageParts.js.map +1 -0
- package/lib/module/ai-components/message-parts/types.js +2 -0
- package/lib/module/ai-components/message-parts/types.js.map +1 -0
- package/lib/module/ai-components/native-specs/NativeAIAgent.js +7 -0
- package/lib/module/ai-components/native-specs/NativeAIAgent.js.map +1 -0
- package/lib/module/ai-components/reasoning/AIReasoning.js +401 -0
- package/lib/module/ai-components/reasoning/AIReasoning.js.map +1 -0
- package/lib/module/ai-components/reasoning/index.js +26 -0
- package/lib/module/ai-components/reasoning/index.js.map +1 -0
- package/lib/module/ai-components/reasoning/thinkingClock.js +63 -0
- package/lib/module/ai-components/reasoning/thinkingClock.js.map +1 -0
- package/lib/module/ai-components/services/clipboard-service/expo.js +7 -2
- package/lib/module/ai-components/services/clipboard-service/expo.js.map +1 -1
- package/lib/module/ai-components/store/composer/store.js.map +1 -1
- package/lib/module/ai-components/store/composer/useComposerChatOption.js +18 -0
- package/lib/module/ai-components/store/composer/useComposerChatOption.js.map +1 -0
- package/lib/module/ai-components/store/composer/useComposerIsEditing.js +18 -0
- package/lib/module/ai-components/store/composer/useComposerIsEditing.js.map +1 -0
- package/lib/module/ai-components/store/index.js +22 -0
- package/lib/module/ai-components/store/index.js.map +1 -1
- package/lib/module/ai-components/suggestions/AISuggestions.js +66 -0
- package/lib/module/ai-components/suggestions/AISuggestions.js.map +1 -0
- package/lib/module/ai-components/suggestions/index.js +15 -0
- package/lib/module/ai-components/suggestions/index.js.map +1 -0
- package/lib/module/ai-components/syntax-highlighting/utils/flatten-nodes.js +2 -1
- package/lib/module/ai-components/syntax-highlighting/utils/flatten-nodes.js.map +1 -1
- package/lib/module/ai-components/syntax-highlighting/utils/renderer.js +3 -2
- package/lib/module/ai-components/syntax-highlighting/utils/renderer.js.map +1 -1
- package/lib/module/ai-components/theme.js +137 -1
- package/lib/module/ai-components/theme.js.map +1 -1
- package/lib/module/ai-components/tool-calls/AIClientIdentity.js +22 -0
- package/lib/module/ai-components/tool-calls/AIClientIdentity.js.map +1 -0
- package/lib/module/ai-components/tool-calls/AIClientToolRunner.js +109 -0
- package/lib/module/ai-components/tool-calls/AIClientToolRunner.js.map +1 -0
- package/lib/module/ai-components/tool-calls/AIToolApprover.js +23 -0
- package/lib/module/ai-components/tool-calls/AIToolApprover.js.map +1 -0
- package/lib/module/ai-components/tool-calls/authSessionAuthorizer.js +88 -0
- package/lib/module/ai-components/tool-calls/authSessionAuthorizer.js.map +1 -0
- package/lib/module/ai-components/tool-calls/index.js +48 -0
- package/lib/module/ai-components/tool-calls/index.js.map +1 -0
- package/lib/module/ai-components/voice-visualization/glowShader.js.map +1 -1
- package/lib/module/components/Accessibility/useAccessibilityAnnouncer.js.map +1 -1
- package/lib/module/components/Message/MessageItemView/utils/renderText.js.map +1 -1
- package/lib/module/contexts/translationContext/TranslationContext.js +2 -2
- package/lib/module/contexts/translationContext/TranslationContext.js.map +1 -1
- package/lib/module/i18n/ar.json +39 -1
- package/lib/module/i18n/en.json +39 -1
- package/lib/module/i18n/es.json +39 -1
- package/lib/module/i18n/fr.json +39 -1
- package/lib/module/i18n/he.json +39 -1
- package/lib/module/i18n/hi.json +39 -1
- package/lib/module/i18n/it.json +39 -1
- package/lib/module/i18n/ja.json +39 -1
- package/lib/module/i18n/ko.json +39 -1
- package/lib/module/i18n/nl.json +39 -1
- package/lib/module/i18n/pt-br.json +39 -1
- package/lib/module/i18n/ru.json +39 -1
- package/lib/module/i18n/tr.json +39 -1
- package/lib/module/mock-builders/a2ui/ohrid.js +84 -0
- package/lib/module/mock-builders/a2ui/ohrid.js.map +1 -0
- package/lib/module/utils/i18n/Streami18n.js +9 -4
- package/lib/module/utils/i18n/Streami18n.js.map +1 -1
- package/lib/module/utils/i18n/utils.js +7 -0
- package/lib/module/utils/i18n/utils.js.map +1 -0
- package/lib/module/version.json +1 -1
- package/lib/typescript/a11y/a11yUtils.d.ts +0 -1
- package/lib/typescript/a11y/a11yUtils.d.ts.map +1 -1
- package/lib/typescript/a11y/hooks/useResolvedModalAccessibilityProps.d.ts +2 -3
- package/lib/typescript/a11y/hooks/useResolvedModalAccessibilityProps.d.ts.map +1 -1
- package/lib/typescript/a2ui/A2UIContexts.d.ts +9 -0
- package/lib/typescript/a2ui/A2UIContexts.d.ts.map +1 -0
- package/lib/typescript/a2ui/A2UIInstructions.d.ts +47 -0
- package/lib/typescript/a2ui/A2UIInstructions.d.ts.map +1 -0
- package/lib/typescript/a2ui/A2UIPlaceholder.d.ts +4 -0
- package/lib/typescript/a2ui/A2UIPlaceholder.d.ts.map +1 -0
- package/lib/typescript/a2ui/A2UIRenderer.d.ts +130 -0
- package/lib/typescript/a2ui/A2UIRenderer.d.ts.map +1 -0
- package/lib/typescript/a2ui/A2UIStream.d.ts +23 -0
- package/lib/typescript/a2ui/A2UIStream.d.ts.map +1 -0
- package/lib/typescript/a2ui/A2UISurface.d.ts +19 -0
- package/lib/typescript/a2ui/A2UISurface.d.ts.map +1 -0
- package/lib/typescript/a2ui/basicFunctions.d.ts +10 -0
- package/lib/typescript/a2ui/basicFunctions.d.ts.map +1 -0
- package/lib/typescript/a2ui/catalogDocument.d.ts +56 -0
- package/lib/typescript/a2ui/catalogDocument.d.ts.map +1 -0
- package/lib/typescript/a2ui/catalogs.d.ts +42 -0
- package/lib/typescript/a2ui/catalogs.d.ts.map +1 -0
- package/lib/typescript/a2ui/components/DateTimeInput.d.ts +44 -0
- package/lib/typescript/a2ui/components/DateTimeInput.d.ts.map +1 -0
- package/lib/typescript/a2ui/components/Media.d.ts +27 -0
- package/lib/typescript/a2ui/components/Media.d.ts.map +1 -0
- package/lib/typescript/a2ui/components/basicComponents.d.ts +4 -0
- package/lib/typescript/a2ui/components/basicComponents.d.ts.map +1 -0
- package/lib/typescript/a2ui/components/iconPaths.d.ts +2 -0
- package/lib/typescript/a2ui/components/iconPaths.d.ts.map +1 -0
- package/lib/typescript/a2ui/components/types.d.ts +23 -0
- package/lib/typescript/a2ui/components/types.d.ts.map +1 -0
- package/lib/typescript/a2ui/index.d.ts +8 -0
- package/lib/typescript/a2ui/index.d.ts.map +1 -0
- package/lib/typescript/a2ui/instructions.d.ts +39 -0
- package/lib/typescript/a2ui/instructions.d.ts.map +1 -0
- package/lib/typescript/a2ui/secrets.d.ts +20 -0
- package/lib/typescript/a2ui/secrets.d.ts.map +1 -0
- package/lib/typescript/a2ui/useReplyState.d.ts +4 -0
- package/lib/typescript/a2ui/useReplyState.d.ts.map +1 -0
- package/lib/typescript/ai-components/AITypingIndicatorView.d.ts.map +1 -1
- package/lib/typescript/ai-components/StreamingMessageView.d.ts +4 -1
- package/lib/typescript/ai-components/StreamingMessageView.d.ts.map +1 -1
- package/lib/typescript/ai-components/charts/components/PieLegend.d.ts.map +1 -1
- package/lib/typescript/ai-components/charts/components/VictoryChart.d.ts.map +1 -1
- package/lib/typescript/ai-components/charts/utils/format-time-label.d.ts +7 -0
- package/lib/typescript/ai-components/charts/utils/format-time-label.d.ts.map +1 -0
- package/lib/typescript/ai-components/charts/vega-lite/schema.d.ts +8 -8
- package/lib/typescript/ai-components/charts/vega-lite/schema.d.ts.map +1 -1
- package/lib/typescript/ai-components/contexts/composer-context.d.ts +3 -0
- package/lib/typescript/ai-components/contexts/composer-context.d.ts.map +1 -1
- package/lib/typescript/ai-components/contexts/index.d.ts +1 -0
- package/lib/typescript/ai-components/contexts/index.d.ts.map +1 -1
- package/lib/typescript/ai-components/contexts/theme-context.d.ts.map +1 -1
- package/lib/typescript/ai-components/contexts/translation-context.d.ts +19 -0
- package/lib/typescript/ai-components/contexts/translation-context.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation/AIConversation.d.ts +130 -0
- package/lib/typescript/ai-components/conversation/AIConversation.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation/controller/AIAgentError.d.ts +10 -0
- package/lib/typescript/ai-components/conversation/controller/AIAgentError.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation/controller/AIConversationController.d.ts +173 -0
- package/lib/typescript/ai-components/conversation/controller/AIConversationController.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation/controller/AIConversationExchange.d.ts +23 -0
- package/lib/typescript/ai-components/conversation/controller/AIConversationExchange.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation/controller/index.d.ts +5 -0
- package/lib/typescript/ai-components/conversation/controller/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation/controller/offers.d.ts +23 -0
- package/lib/typescript/ai-components/conversation/controller/offers.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation/controller/types.d.ts +142 -0
- package/lib/typescript/ai-components/conversation/controller/types.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation/controller/useAIConversationState.d.ts +9 -0
- package/lib/typescript/ai-components/conversation/controller/useAIConversationState.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation/entries.d.ts +47 -0
- package/lib/typescript/ai-components/conversation/entries.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation/fromStreamMessage.d.ts +25 -0
- package/lib/typescript/ai-components/conversation/fromStreamMessage.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation/index.d.ts +6 -0
- package/lib/typescript/ai-components/conversation/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation/list/AIChatList.d.ts +30 -0
- package/lib/typescript/ai-components/conversation/list/AIChatList.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation/list/useChatListController.d.ts +45 -0
- package/lib/typescript/ai-components/conversation/list/useChatListController.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation/list/useEndInView.d.ts +26 -0
- package/lib/typescript/ai-components/conversation/list/useEndInView.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation/list/useKeyboardOverlap.d.ts +17 -0
- package/lib/typescript/ai-components/conversation/list/useKeyboardOverlap.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation/list/useLoadOlder.d.ts +24 -0
- package/lib/typescript/ai-components/conversation/list/useLoadOlder.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation/list/usePinnedAnchor.d.ts +26 -0
- package/lib/typescript/ai-components/conversation/list/usePinnedAnchor.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation/types.d.ts +55 -0
- package/lib/typescript/ai-components/conversation/types.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation/useConversationRows.d.ts +66 -0
- package/lib/typescript/ai-components/conversation/useConversationRows.d.ts.map +1 -0
- package/lib/typescript/ai-components/generative-ui/AIUIAction.d.ts +48 -0
- package/lib/typescript/ai-components/generative-ui/AIUIAction.d.ts.map +1 -0
- package/lib/typescript/ai-components/generative-ui/AIUIArguments.d.ts +15 -0
- package/lib/typescript/ai-components/generative-ui/AIUIArguments.d.ts.map +1 -0
- package/lib/typescript/ai-components/generative-ui/AIUIComponent.d.ts +51 -0
- package/lib/typescript/ai-components/generative-ui/AIUIComponent.d.ts.map +1 -0
- package/lib/typescript/ai-components/generative-ui/AIUIComponentDefinition.d.ts +84 -0
- package/lib/typescript/ai-components/generative-ui/AIUIComponentDefinition.d.ts.map +1 -0
- package/lib/typescript/ai-components/generative-ui/AIUIDocument.d.ts +50 -0
- package/lib/typescript/ai-components/generative-ui/AIUIDocument.d.ts.map +1 -0
- package/lib/typescript/ai-components/generative-ui/AIUIEntrance.d.ts +75 -0
- package/lib/typescript/ai-components/generative-ui/AIUIEntrance.d.ts.map +1 -0
- package/lib/typescript/ai-components/generative-ui/AIUIErrorBoundary.d.ts +26 -0
- package/lib/typescript/ai-components/generative-ui/AIUIErrorBoundary.d.ts.map +1 -0
- package/lib/typescript/ai-components/generative-ui/AIUIHelpers.d.ts +23 -0
- package/lib/typescript/ai-components/generative-ui/AIUIHelpers.d.ts.map +1 -0
- package/lib/typescript/ai-components/generative-ui/AIUIHost.d.ts +160 -0
- package/lib/typescript/ai-components/generative-ui/AIUIHost.d.ts.map +1 -0
- package/lib/typescript/ai-components/generative-ui/AIUIMedia.d.ts +22 -0
- package/lib/typescript/ai-components/generative-ui/AIUIMedia.d.ts.map +1 -0
- package/lib/typescript/ai-components/generative-ui/AIUIRenderer.d.ts +53 -0
- package/lib/typescript/ai-components/generative-ui/AIUIRenderer.d.ts.map +1 -0
- package/lib/typescript/ai-components/generative-ui/AIUIView.d.ts +35 -0
- package/lib/typescript/ai-components/generative-ui/AIUIView.d.ts.map +1 -0
- package/lib/typescript/ai-components/generative-ui/index.d.ts +11 -0
- package/lib/typescript/ai-components/generative-ui/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/icons.d.ts +66 -0
- package/lib/typescript/ai-components/icons.d.ts.map +1 -0
- package/lib/typescript/ai-components/index.d.ts +8 -0
- package/lib/typescript/ai-components/index.d.ts.map +1 -1
- package/lib/typescript/ai-components/internal/Shimmer.d.ts +14 -0
- package/lib/typescript/ai-components/internal/Shimmer.d.ts.map +1 -0
- package/lib/typescript/ai-components/internal/format.d.ts +7 -0
- package/lib/typescript/ai-components/internal/format.d.ts.map +1 -0
- package/lib/typescript/ai-components/internal/hooks/useBottomSafeArea.d.ts +3 -0
- package/lib/typescript/ai-components/internal/hooks/useBottomSafeArea.d.ts.map +1 -0
- package/lib/typescript/ai-components/internal/icons/AgentIcons.d.ts +31 -0
- package/lib/typescript/ai-components/internal/icons/AgentIcons.d.ts.map +1 -0
- package/lib/typescript/ai-components/internal/tokens.d.ts +2 -0
- package/lib/typescript/ai-components/internal/tokens.d.ts.map +1 -0
- package/lib/typescript/ai-components/internal/uuid.d.ts +2 -0
- package/lib/typescript/ai-components/internal/uuid.d.ts.map +1 -0
- package/lib/typescript/ai-components/markdown/components/CodeBlock.d.ts.map +1 -1
- package/lib/typescript/ai-components/markdown/components/InlineCode.d.ts.map +1 -1
- package/lib/typescript/ai-components/markdown/components/Text.d.ts.map +1 -1
- package/lib/typescript/ai-components/markdown/styles.d.ts +23 -4
- package/lib/typescript/ai-components/markdown/styles.d.ts.map +1 -1
- package/lib/typescript/ai-components/markdown/types.d.ts +1 -0
- package/lib/typescript/ai-components/markdown/types.d.ts.map +1 -1
- package/lib/typescript/ai-components/message/AIAssistantMessage.d.ts +40 -0
- package/lib/typescript/ai-components/message/AIAssistantMessage.d.ts.map +1 -0
- package/lib/typescript/ai-components/message/AIMessageAttachment.d.ts +33 -0
- package/lib/typescript/ai-components/message/AIMessageAttachment.d.ts.map +1 -0
- package/lib/typescript/ai-components/message/AIReplyActions.d.ts +19 -0
- package/lib/typescript/ai-components/message/AIReplyActions.d.ts.map +1 -0
- package/lib/typescript/ai-components/message/AIUserMessage.d.ts +17 -0
- package/lib/typescript/ai-components/message/AIUserMessage.d.ts.map +1 -0
- package/lib/typescript/ai-components/message/UserMessageMenu.d.ts +31 -0
- package/lib/typescript/ai-components/message/UserMessageMenu.d.ts.map +1 -0
- package/lib/typescript/ai-components/message/index.d.ts +5 -0
- package/lib/typescript/ai-components/message/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/message-composer/ActionButton.d.ts.map +1 -1
- package/lib/typescript/ai-components/message-composer/ActionSheet.d.ts +2 -2
- package/lib/typescript/ai-components/message-composer/ActionSheet.d.ts.map +1 -1
- package/lib/typescript/ai-components/message-composer/AttachmentButton.d.ts.map +1 -1
- package/lib/typescript/ai-components/message-composer/ChatOptions.d.ts +35 -0
- package/lib/typescript/ai-components/message-composer/ChatOptions.d.ts.map +1 -0
- package/lib/typescript/ai-components/message-composer/ComposerView.d.ts +34 -3
- package/lib/typescript/ai-components/message-composer/ComposerView.d.ts.map +1 -1
- package/lib/typescript/ai-components/message-composer/EditingMessageChip.d.ts +7 -0
- package/lib/typescript/ai-components/message-composer/EditingMessageChip.d.ts.map +1 -0
- package/lib/typescript/ai-components/message-composer/MediaPreviewList.d.ts.map +1 -1
- package/lib/typescript/ai-components/message-composer/index.d.ts +1 -0
- package/lib/typescript/ai-components/message-composer/index.d.ts.map +1 -1
- package/lib/typescript/ai-components/message-parts/AIMessageParts.d.ts +38 -0
- package/lib/typescript/ai-components/message-parts/AIMessageParts.d.ts.map +1 -0
- package/lib/typescript/ai-components/message-parts/AIToolApproval.d.ts +38 -0
- package/lib/typescript/ai-components/message-parts/AIToolApproval.d.ts.map +1 -0
- package/lib/typescript/ai-components/message-parts/AIToolAuthorization.d.ts +48 -0
- package/lib/typescript/ai-components/message-parts/AIToolAuthorization.d.ts.map +1 -0
- package/lib/typescript/ai-components/message-parts/AIToolCall.d.ts +11 -0
- package/lib/typescript/ai-components/message-parts/AIToolCall.d.ts.map +1 -0
- package/lib/typescript/ai-components/message-parts/callStates.d.ts +9 -0
- package/lib/typescript/ai-components/message-parts/callStates.d.ts.map +1 -0
- package/lib/typescript/ai-components/message-parts/index.d.ts +7 -0
- package/lib/typescript/ai-components/message-parts/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/message-parts/parseMessageParts.d.ts +47 -0
- package/lib/typescript/ai-components/message-parts/parseMessageParts.d.ts.map +1 -0
- package/lib/typescript/ai-components/message-parts/types.d.ts +137 -0
- package/lib/typescript/ai-components/message-parts/types.d.ts.map +1 -0
- package/lib/typescript/ai-components/native-specs/NativeAIAgent.d.ts +22 -0
- package/lib/typescript/ai-components/native-specs/NativeAIAgent.d.ts.map +1 -0
- package/lib/typescript/ai-components/reasoning/AIReasoning.d.ts +63 -0
- package/lib/typescript/ai-components/reasoning/AIReasoning.d.ts.map +1 -0
- package/lib/typescript/ai-components/reasoning/index.d.ts +3 -0
- package/lib/typescript/ai-components/reasoning/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/reasoning/thinkingClock.d.ts +29 -0
- package/lib/typescript/ai-components/reasoning/thinkingClock.d.ts.map +1 -0
- package/lib/typescript/ai-components/services/clipboard-service/expo.d.ts.map +1 -1
- package/lib/typescript/ai-components/store/composer/store.d.ts +8 -0
- package/lib/typescript/ai-components/store/composer/store.d.ts.map +1 -1
- package/lib/typescript/ai-components/store/composer/useComposerChatOption.d.ts +5 -0
- package/lib/typescript/ai-components/store/composer/useComposerChatOption.d.ts.map +1 -0
- package/lib/typescript/ai-components/store/composer/useComposerIsEditing.d.ts +5 -0
- package/lib/typescript/ai-components/store/composer/useComposerIsEditing.d.ts.map +1 -0
- package/lib/typescript/ai-components/store/index.d.ts +2 -0
- package/lib/typescript/ai-components/store/index.d.ts.map +1 -1
- package/lib/typescript/ai-components/suggestions/AISuggestions.d.ts +13 -0
- package/lib/typescript/ai-components/suggestions/AISuggestions.d.ts.map +1 -0
- package/lib/typescript/ai-components/suggestions/index.d.ts +2 -0
- package/lib/typescript/ai-components/suggestions/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/syntax-highlighting/utils/flatten-nodes.d.ts.map +1 -1
- package/lib/typescript/ai-components/syntax-highlighting/utils/renderer.d.ts +1 -1
- package/lib/typescript/ai-components/syntax-highlighting/utils/renderer.d.ts.map +1 -1
- package/lib/typescript/ai-components/theme.d.ts +200 -0
- package/lib/typescript/ai-components/theme.d.ts.map +1 -1
- package/lib/typescript/ai-components/tool-calls/AIClientIdentity.d.ts +14 -0
- package/lib/typescript/ai-components/tool-calls/AIClientIdentity.d.ts.map +1 -0
- package/lib/typescript/ai-components/tool-calls/AIClientToolRunner.d.ts +109 -0
- package/lib/typescript/ai-components/tool-calls/AIClientToolRunner.d.ts.map +1 -0
- package/lib/typescript/ai-components/tool-calls/AIToolApprover.d.ts +48 -0
- package/lib/typescript/ai-components/tool-calls/AIToolApprover.d.ts.map +1 -0
- package/lib/typescript/ai-components/tool-calls/authSessionAuthorizer.d.ts +57 -0
- package/lib/typescript/ai-components/tool-calls/authSessionAuthorizer.d.ts.map +1 -0
- package/lib/typescript/ai-components/tool-calls/index.d.ts +5 -0
- package/lib/typescript/ai-components/tool-calls/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/voice-visualization/glowShader.d.ts.map +1 -1
- package/lib/typescript/ai-components/voice-visualization/simplex.d.ts +1 -1
- package/lib/typescript/components/Accessibility/NotificationAnnouncer.d.ts +5 -5
- package/lib/typescript/components/Accessibility/hooks/useIncomingMessageAnnouncements.d.ts +1 -1
- package/lib/typescript/components/Accessibility/useAccessibilityAnnouncer.d.ts +0 -2
- package/lib/typescript/components/Accessibility/useAccessibilityAnnouncer.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageItemView/utils/renderText.d.ts.map +1 -1
- package/lib/typescript/contexts/translationContext/TranslationContext.d.ts +1 -1
- package/lib/typescript/contexts/translationContext/TranslationContext.d.ts.map +1 -1
- package/lib/typescript/i18n/ar.json +39 -1
- package/lib/typescript/i18n/en.json +39 -1
- package/lib/typescript/i18n/es.json +39 -1
- package/lib/typescript/i18n/fr.json +39 -1
- package/lib/typescript/i18n/he.json +39 -1
- package/lib/typescript/i18n/hi.json +39 -1
- package/lib/typescript/i18n/it.json +39 -1
- package/lib/typescript/i18n/ja.json +39 -1
- package/lib/typescript/i18n/ko.json +39 -1
- package/lib/typescript/i18n/nl.json +39 -1
- package/lib/typescript/i18n/pt-br.json +39 -1
- package/lib/typescript/i18n/ru.json +39 -1
- package/lib/typescript/i18n/tr.json +39 -1
- package/lib/typescript/utils/i18n/Streami18n.d.ts +40 -2
- package/lib/typescript/utils/i18n/Streami18n.d.ts.map +1 -1
- package/lib/typescript/utils/i18n/utils.d.ts +3 -0
- package/lib/typescript/utils/i18n/utils.d.ts.map +1 -0
- package/package.json +10 -2
- package/src/a11y/a11yUtils.ts +0 -1
- package/src/a11y/hooks/useResolvedModalAccessibilityProps.ts +2 -3
- package/src/a2ui/A2UIContexts.ts +15 -0
- package/src/a2ui/A2UIInstructions.ts +102 -0
- package/src/a2ui/A2UIPlaceholder.tsx +24 -0
- package/src/a2ui/A2UIRenderer.tsx +504 -0
- package/src/a2ui/A2UIStream.ts +105 -0
- package/src/a2ui/A2UISurface.tsx +241 -0
- package/src/a2ui/__tests__/A2UIInstructions.test.ts +233 -0
- package/src/a2ui/__tests__/A2UIRenderer.test.tsx +1514 -0
- package/src/a2ui/__tests__/conformance.test.ts +579 -0
- package/src/a2ui/basicCatalog.json +1206 -0
- package/src/a2ui/basicFunctions.ts +429 -0
- package/src/a2ui/catalogDocument.ts +119 -0
- package/src/a2ui/catalogs.ts +185 -0
- package/src/a2ui/components/DateTimeInput.tsx +381 -0
- package/src/a2ui/components/Media.tsx +278 -0
- package/src/a2ui/components/basicComponents.tsx +832 -0
- package/src/a2ui/components/iconPaths.ts +116 -0
- package/src/a2ui/components/types.ts +24 -0
- package/src/a2ui/index.ts +18 -0
- package/src/a2ui/instructions.ts +341 -0
- package/src/a2ui/secrets.ts +154 -0
- package/src/a2ui/useReplyState.ts +26 -0
- package/src/ai-components/AITypingIndicatorView.tsx +6 -22
- package/src/ai-components/README.md +55 -3
- package/src/ai-components/StreamingMessageView.tsx +27 -3
- package/src/ai-components/__tests__/ComposerView.test.tsx +227 -2
- package/src/ai-components/__tests__/Markdown.test.tsx +13 -0
- package/src/ai-components/__tests__/StreamingMessageView.test.tsx +69 -0
- package/src/ai-components/__tests__/charts.test.ts +75 -0
- package/src/ai-components/__tests__/clientToolRunner.test.ts +239 -0
- package/src/ai-components/__tests__/conversation.test.tsx +705 -0
- package/src/ai-components/__tests__/conversationController.test.ts +1561 -0
- package/src/ai-components/__tests__/conversationExchange.test.ts +187 -0
- package/src/ai-components/__tests__/conversationRows.test.ts +207 -0
- package/src/ai-components/__tests__/conversationUI.test.tsx +586 -0
- package/src/ai-components/__tests__/format.test.ts +32 -0
- package/src/ai-components/__tests__/generativeUI.test.ts +634 -0
- package/src/ai-components/__tests__/keyboard.test.ts +14 -0
- package/src/ai-components/__tests__/messagePartViews.test.tsx +343 -0
- package/src/ai-components/__tests__/messageParts.test.ts +336 -0
- package/src/ai-components/__tests__/messageViews.test.tsx +321 -0
- package/src/ai-components/__tests__/signIn.test.tsx +324 -0
- package/src/ai-components/__tests__/theme.test.tsx +18 -0
- package/src/ai-components/__tests__/translation.test.tsx +85 -0
- package/src/ai-components/__tests__/voiceDriver.test.ts +0 -3
- package/src/ai-components/__tests__/voicePalette.test.ts +1 -1
- package/src/ai-components/charts/components/PieLegend.tsx +2 -1
- package/src/ai-components/charts/components/VictoryChart.tsx +10 -2
- package/src/ai-components/charts/utils/format-time-label.ts +18 -0
- package/src/ai-components/charts/vega-lite/schema.ts +19 -2
- package/src/ai-components/contexts/composer-context.tsx +13 -5
- package/src/ai-components/contexts/index.ts +1 -0
- package/src/ai-components/contexts/theme-context.tsx +19 -4
- package/src/ai-components/contexts/translation-context.tsx +44 -0
- package/src/ai-components/conversation/AIConversation.tsx +590 -0
- package/src/ai-components/conversation/controller/AIAgentError.ts +14 -0
- package/src/ai-components/conversation/controller/AIConversationController.ts +623 -0
- package/src/ai-components/conversation/controller/AIConversationExchange.ts +132 -0
- package/src/ai-components/conversation/controller/index.ts +4 -0
- package/src/ai-components/conversation/controller/offers.ts +43 -0
- package/src/ai-components/conversation/controller/types.ts +154 -0
- package/src/ai-components/conversation/controller/useAIConversationState.ts +21 -0
- package/src/ai-components/conversation/entries.ts +177 -0
- package/src/ai-components/conversation/fromStreamMessage.ts +87 -0
- package/src/ai-components/conversation/index.ts +5 -0
- package/src/ai-components/conversation/list/AIChatList.tsx +227 -0
- package/src/ai-components/conversation/list/useChatListController.ts +91 -0
- package/src/ai-components/conversation/list/useEndInView.ts +61 -0
- package/src/ai-components/conversation/list/useKeyboardOverlap.ts +51 -0
- package/src/ai-components/conversation/list/useLoadOlder.ts +97 -0
- package/src/ai-components/conversation/list/usePinnedAnchor.ts +113 -0
- package/src/ai-components/conversation/types.ts +57 -0
- package/src/ai-components/conversation/useConversationRows.ts +230 -0
- package/src/ai-components/generative-ui/AIUIAction.ts +73 -0
- package/src/ai-components/generative-ui/AIUIArguments.ts +117 -0
- package/src/ai-components/generative-ui/AIUIComponent.tsx +106 -0
- package/src/ai-components/generative-ui/AIUIComponentDefinition.ts +163 -0
- package/src/ai-components/generative-ui/AIUIDocument.ts +77 -0
- package/src/ai-components/generative-ui/AIUIEntrance.tsx +223 -0
- package/src/ai-components/generative-ui/AIUIErrorBoundary.tsx +39 -0
- package/src/ai-components/generative-ui/AIUIHelpers.ts +86 -0
- package/src/ai-components/generative-ui/AIUIHost.ts +358 -0
- package/src/ai-components/generative-ui/AIUIMedia.ts +45 -0
- package/src/ai-components/generative-ui/AIUIRenderer.ts +60 -0
- package/src/ai-components/generative-ui/AIUIView.tsx +87 -0
- package/src/ai-components/generative-ui/index.ts +48 -0
- package/src/ai-components/icons.ts +101 -0
- package/src/ai-components/index.ts +10 -0
- package/src/ai-components/internal/Shimmer.tsx +40 -0
- package/src/ai-components/internal/format.ts +69 -0
- package/src/ai-components/internal/hooks/useBottomSafeArea.ts +6 -0
- package/src/ai-components/internal/icons/AgentIcons.tsx +138 -0
- package/src/ai-components/internal/tokens.ts +4 -0
- package/src/ai-components/internal/uuid.ts +17 -0
- package/src/ai-components/markdown/components/CodeBlock.tsx +13 -2
- package/src/ai-components/markdown/components/InlineCode.tsx +1 -0
- package/src/ai-components/markdown/components/Text.tsx +7 -2
- package/src/ai-components/markdown/styles.ts +29 -27
- package/src/ai-components/markdown/types.ts +1 -0
- package/src/ai-components/message/AIAssistantMessage.tsx +99 -0
- package/src/ai-components/message/AIMessageAttachment.tsx +245 -0
- package/src/ai-components/message/AIReplyActions.tsx +139 -0
- package/src/ai-components/message/AIUserMessage.tsx +121 -0
- package/src/ai-components/message/UserMessageMenu.tsx +149 -0
- package/src/ai-components/message/index.ts +4 -0
- package/src/ai-components/message-composer/ActionButton.tsx +5 -1
- package/src/ai-components/message-composer/ActionSheet.tsx +28 -6
- package/src/ai-components/message-composer/AttachmentButton.tsx +9 -1
- package/src/ai-components/message-composer/ChatOptions.tsx +144 -0
- package/src/ai-components/message-composer/ComposerView.tsx +179 -29
- package/src/ai-components/message-composer/EditingMessageChip.tsx +61 -0
- package/src/ai-components/message-composer/MediaPreviewList.tsx +34 -8
- package/src/ai-components/message-composer/index.ts +1 -0
- package/src/ai-components/message-parts/AIMessageParts.tsx +120 -0
- package/src/ai-components/message-parts/AIToolApproval.tsx +196 -0
- package/src/ai-components/message-parts/AIToolAuthorization.tsx +279 -0
- package/src/ai-components/message-parts/AIToolCall.tsx +117 -0
- package/src/ai-components/message-parts/callStates.ts +44 -0
- package/src/ai-components/message-parts/index.ts +6 -0
- package/src/ai-components/message-parts/parseMessageParts.ts +195 -0
- package/src/ai-components/message-parts/types.ts +157 -0
- package/src/ai-components/native-specs/NativeAIAgent.ts +25 -0
- package/src/ai-components/reasoning/AIReasoning.tsx +509 -0
- package/src/ai-components/reasoning/index.ts +2 -0
- package/src/ai-components/reasoning/thinkingClock.ts +109 -0
- package/src/ai-components/services/clipboard-service/expo.ts +18 -4
- package/src/ai-components/store/composer/store.ts +9 -0
- package/src/ai-components/store/composer/useComposerChatOption.ts +15 -0
- package/src/ai-components/store/composer/useComposerIsEditing.ts +15 -0
- package/src/ai-components/store/index.ts +2 -0
- package/src/ai-components/suggestions/AISuggestions.tsx +73 -0
- package/src/ai-components/suggestions/index.ts +1 -0
- package/src/ai-components/syntax-highlighting/utils/flatten-nodes.ts +2 -1
- package/src/ai-components/syntax-highlighting/utils/renderer.tsx +4 -2
- package/src/ai-components/theme.ts +334 -0
- package/src/ai-components/tool-calls/AIClientIdentity.ts +33 -0
- package/src/ai-components/tool-calls/AIClientToolRunner.ts +200 -0
- package/src/ai-components/tool-calls/AIToolApprover.tsx +60 -0
- package/src/ai-components/tool-calls/authSessionAuthorizer.ts +137 -0
- package/src/ai-components/tool-calls/index.ts +4 -0
- package/src/ai-components/voice-visualization/glowShader.ts +1 -3
- package/src/ai-components/voice-visualization/simplex.ts +1 -1
- package/src/components/Accessibility/NotificationAnnouncer.tsx +5 -5
- package/src/components/Accessibility/hooks/useIncomingMessageAnnouncements.ts +1 -1
- package/src/components/Accessibility/useAccessibilityAnnouncer.ts +0 -2
- package/src/components/Message/MessageItemView/utils/renderText.tsx +1 -2
- package/src/contexts/translationContext/TranslationContext.tsx +2 -2
- package/src/i18n/ar.json +39 -1
- package/src/i18n/en.json +39 -1
- package/src/i18n/es.json +39 -1
- package/src/i18n/fr.json +39 -1
- package/src/i18n/he.json +39 -1
- package/src/i18n/hi.json +39 -1
- package/src/i18n/it.json +39 -1
- package/src/i18n/ja.json +39 -1
- package/src/i18n/ko.json +39 -1
- package/src/i18n/nl.json +39 -1
- package/src/i18n/pt-br.json +39 -1
- package/src/i18n/ru.json +39 -1
- package/src/i18n/tr.json +39 -1
- package/src/mock-builders/a2ui/ohrid.ts +106 -0
- package/src/utils/i18n/Streami18n.ts +4 -1
- package/src/utils/i18n/utils.ts +3 -0
- package/src/version.json +1 -1
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2
|
+
value: true
|
|
3
|
+
});
|
|
4
|
+
exports.defineAIUIComponent = exports.AIUIComponentView = void 0;
|
|
5
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
6
|
+
var _AIUIArguments = require("./AIUIArguments");
|
|
7
|
+
var _AIUIEntrance = require("./AIUIEntrance");
|
|
8
|
+
var _AIUIErrorBoundary = require("./AIUIErrorBoundary");
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
var _jsxFileName = "/home/runner/work/stream-chat-react-native/stream-chat-react-native/package/src/ai-components/generative-ui/AIUIComponent.tsx";
|
|
11
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
12
|
+
var defineAIUIComponent = (definition, Component) => ({
|
|
13
|
+
Component: Component,
|
|
14
|
+
definition
|
|
15
|
+
});
|
|
16
|
+
exports.defineAIUIComponent = defineAIUIComponent;
|
|
17
|
+
var attemptOf = (args, isStreaming) => {
|
|
18
|
+
try {
|
|
19
|
+
return `${isStreaming}\u0000${JSON.stringify(args)}`;
|
|
20
|
+
} catch (_unused) {
|
|
21
|
+
return args;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
var AIUIComponentView = ({
|
|
25
|
+
args,
|
|
26
|
+
component,
|
|
27
|
+
context
|
|
28
|
+
}) => {
|
|
29
|
+
var host = context.host,
|
|
30
|
+
isStreaming = context.isStreaming,
|
|
31
|
+
messageId = context.messageId;
|
|
32
|
+
var decoded = (0, _react.useMemo)(() => (0, _AIUIArguments.decodeAIUIArguments)(args, component.definition.parameters), [args, component]);
|
|
33
|
+
var resetKey = (0, _react.useMemo)(() => decoded === undefined ? undefined : attemptOf(decoded, isStreaming), [decoded, isStreaming]);
|
|
34
|
+
if (decoded === undefined) return null;
|
|
35
|
+
var Component = component.Component;
|
|
36
|
+
return (0, _jsxRuntime.jsx)(_AIUIErrorBoundary.AIUIErrorBoundary, {
|
|
37
|
+
onError: error => {
|
|
38
|
+
if (!isStreaming) host.reportRenderError(error, messageId);
|
|
39
|
+
},
|
|
40
|
+
resetKey: resetKey,
|
|
41
|
+
children: (0, _jsxRuntime.jsx)(_AIUIEntrance.AIUIEntrance, {
|
|
42
|
+
children: (0, _jsxRuntime.jsx)(Component, {
|
|
43
|
+
args: decoded,
|
|
44
|
+
context: context
|
|
45
|
+
})
|
|
46
|
+
})
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
exports.AIUIComponentView = AIUIComponentView;
|
|
50
|
+
//# sourceMappingURL=AIUIComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_AIUIArguments","_AIUIEntrance","_AIUIErrorBoundary","_jsxRuntime","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","defineAIUIComponent","definition","Component","exports","attemptOf","args","isStreaming","JSON","stringify","_unused","AIUIComponentView","component","context","host","messageId","decoded","useMemo","decodeAIUIArguments","parameters","resetKey","undefined","jsx","AIUIErrorBoundary","onError","error","reportRenderError","children","AIUIEntrance"],"sourceRoot":"../../../../src","sources":["ai-components/generative-ui/AIUIComponent.tsx"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAD,OAAA;AAEA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AAAwD,IAAAI,WAAA,GAAAJ,OAAA;AAAA,IAAAK,YAAA;AAAA,SAAAN,wBAAAO,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAT,uBAAA,YAAAA,CAAAO,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GA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AQ,GAAG,IAAAH,cAAO,EACtB,MAAOD,OAAO,KAAKK,SAAS,GAAGA,SAAS,GAAGhB,SAAS,CAACW,OAAO,EAAET,WAAW,CAAE,EAC3E,CAACS,OAAO,EAAET,WAAW,CACvB,CAAC;EACD,IAAIS,OAAO,KAAKK,SAAS,EAAE,OAAO,IAAI;EACtC,IAAQlB,SAAS,GAAKS,SAAS,CAAvBT,SAAS;EACjB,OACE,IAAAxB,WAAA,CAAA2C,GAAA,EAAC5C,kBAAA,CAAA6C,iBAAiB;IAChBC,OAAO,EAAGC,KAAK,IAAK;MAElB,IAAI,CAAClB,WAAW,EAAEO,IAAI,CAACY,iBAAiB,CAACD,KAAK,EAAEV,SAAS,CAAC;IAC5D,CAAE;IACFK,QAAQ,EAAEA,QAAS;IAAAO,QAAA,EAEnB,IAAAhD,WAAA,CAAA2C,GAAA,EAAC7C,aAAA,CAAAmD,YAAY;MAAAD,QAAA,EACX,IAAAhD,WAAA,CAAA2C,GAAA,EAACnB,SAAS;QAACG,IAAI,EAAEU,OAAiB;QAACH,OAAO,EAAEA;MAAQ,CAAE;IAAC,CAC3C;EAAC,CACE,CAAC;AAExB,CAAC;AAACT,OAAA,CAAAO,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
exports.requiredAIUIParameter = exports.parseAIUIComponentDefinition = exports.optionalAIUIParameter = exports.aiUIParametersOf = exports.aiUIObjectSchema = exports.aiUIComponentDefinitionJSON = exports.AIUIParameterType = void 0;
|
|
6
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
7
|
+
var _AIUIHelpers = require("./AIUIHelpers");
|
|
8
|
+
var _excluded = ["description"];
|
|
9
|
+
var AIUIParameterType = exports.AIUIParameterType = {
|
|
10
|
+
array: items => ({
|
|
11
|
+
items,
|
|
12
|
+
type: 'array'
|
|
13
|
+
}),
|
|
14
|
+
boolean: {
|
|
15
|
+
type: 'boolean'
|
|
16
|
+
},
|
|
17
|
+
date: {
|
|
18
|
+
format: 'date',
|
|
19
|
+
type: 'string'
|
|
20
|
+
},
|
|
21
|
+
dateTime: {
|
|
22
|
+
format: 'date-time',
|
|
23
|
+
type: 'string'
|
|
24
|
+
},
|
|
25
|
+
enumeration: values => ({
|
|
26
|
+
enum: values,
|
|
27
|
+
type: 'string'
|
|
28
|
+
}),
|
|
29
|
+
integer: {
|
|
30
|
+
type: 'integer'
|
|
31
|
+
},
|
|
32
|
+
number: {
|
|
33
|
+
type: 'number'
|
|
34
|
+
},
|
|
35
|
+
object: fields => aiUIObjectSchema(fields),
|
|
36
|
+
string: {
|
|
37
|
+
type: 'string'
|
|
38
|
+
},
|
|
39
|
+
url: {
|
|
40
|
+
format: 'uri',
|
|
41
|
+
type: 'string'
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
var requiredAIUIParameter = (name, type, description) => ({
|
|
45
|
+
description,
|
|
46
|
+
isRequired: true,
|
|
47
|
+
name,
|
|
48
|
+
type
|
|
49
|
+
});
|
|
50
|
+
exports.requiredAIUIParameter = requiredAIUIParameter;
|
|
51
|
+
var optionalAIUIParameter = (name, type, description) => ({
|
|
52
|
+
description,
|
|
53
|
+
isRequired: false,
|
|
54
|
+
name,
|
|
55
|
+
type
|
|
56
|
+
});
|
|
57
|
+
exports.optionalAIUIParameter = optionalAIUIParameter;
|
|
58
|
+
var ORDER_KEY = 'x-order';
|
|
59
|
+
var strings = value => Array.isArray(value) ? value.filter(item => typeof item === 'string') : [];
|
|
60
|
+
var aiUIObjectSchema = parameters => ({
|
|
61
|
+
[ORDER_KEY]: parameters.map(({
|
|
62
|
+
name
|
|
63
|
+
}) => name),
|
|
64
|
+
properties: Object.fromEntries(parameters.map(({
|
|
65
|
+
description,
|
|
66
|
+
name,
|
|
67
|
+
type
|
|
68
|
+
}) => [name, description === undefined ? type : {
|
|
69
|
+
...type,
|
|
70
|
+
description
|
|
71
|
+
}])),
|
|
72
|
+
required: parameters.filter(({
|
|
73
|
+
isRequired
|
|
74
|
+
}) => isRequired).map(({
|
|
75
|
+
name
|
|
76
|
+
}) => name),
|
|
77
|
+
type: 'object'
|
|
78
|
+
});
|
|
79
|
+
exports.aiUIObjectSchema = aiUIObjectSchema;
|
|
80
|
+
var aiUIParametersOf = schema => {
|
|
81
|
+
if (!(0, _AIUIHelpers.isRecord)(schema)) return [];
|
|
82
|
+
var properties = (0, _AIUIHelpers.isRecord)(schema.properties) ? schema.properties : {};
|
|
83
|
+
var required = new Set(strings(schema.required));
|
|
84
|
+
var ordered = strings(schema[ORDER_KEY]).filter(name => name in properties);
|
|
85
|
+
var rest = Object.keys(properties).filter(name => !ordered.includes(name)).sort();
|
|
86
|
+
return [...ordered, ...rest].flatMap(name => {
|
|
87
|
+
var field = properties[name];
|
|
88
|
+
if (!(0, _AIUIHelpers.isRecord)(field)) return [];
|
|
89
|
+
var description = field.description,
|
|
90
|
+
type = (0, _objectWithoutProperties2.default)(field, _excluded);
|
|
91
|
+
return [{
|
|
92
|
+
description: typeof description === 'string' ? description : undefined,
|
|
93
|
+
isRequired: required.has(name),
|
|
94
|
+
name,
|
|
95
|
+
type
|
|
96
|
+
}];
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
exports.aiUIParametersOf = aiUIParametersOf;
|
|
100
|
+
var parseAIUIComponentDefinition = json => {
|
|
101
|
+
if (!(0, _AIUIHelpers.isRecord)(json) || typeof json.name !== 'string' || json.name === '') {
|
|
102
|
+
return undefined;
|
|
103
|
+
}
|
|
104
|
+
var events = Array.isArray(json.events) ? json.events : [];
|
|
105
|
+
return {
|
|
106
|
+
description: typeof json.description === 'string' ? json.description : '',
|
|
107
|
+
events: events.flatMap(event => (0, _AIUIHelpers.isRecord)(event) && typeof event.name === 'string' ? [{
|
|
108
|
+
description: typeof event.description === 'string' ? event.description : '',
|
|
109
|
+
name: event.name,
|
|
110
|
+
parameters: aiUIParametersOf(event.parameters)
|
|
111
|
+
}] : []),
|
|
112
|
+
name: json.name,
|
|
113
|
+
parameters: aiUIParametersOf(json.parameters)
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
exports.parseAIUIComponentDefinition = parseAIUIComponentDefinition;
|
|
117
|
+
var aiUIComponentDefinitionJSON = definition => ({
|
|
118
|
+
description: definition.description,
|
|
119
|
+
events: definition.events.map(({
|
|
120
|
+
description,
|
|
121
|
+
name,
|
|
122
|
+
parameters
|
|
123
|
+
}) => ({
|
|
124
|
+
description,
|
|
125
|
+
name,
|
|
126
|
+
...(parameters.length ? {
|
|
127
|
+
parameters: aiUIObjectSchema(parameters)
|
|
128
|
+
} : {})
|
|
129
|
+
})),
|
|
130
|
+
name: definition.name,
|
|
131
|
+
parameters: aiUIObjectSchema(definition.parameters)
|
|
132
|
+
});
|
|
133
|
+
exports.aiUIComponentDefinitionJSON = aiUIComponentDefinitionJSON;
|
|
134
|
+
//# sourceMappingURL=AIUIComponentDefinition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_AIUIHelpers","require","_excluded","AIUIParameterType","exports","array","items","type","boolean","date","format","dateTime","enumeration","values","enum","integer","number","object","fields","aiUIObjectSchema","string","url","requiredAIUIParameter","name","description","isRequired","optionalAIUIParameter","ORDER_KEY","strings","value","Array","isArray","filter","item","parameters","map","properties","Object","fromEntries","undefined","required","aiUIParametersOf","schema","isRecord","Set","ordered","rest","keys","includes","sort","flatMap","field","_objectWithoutProperties2","default","has","parseAIUIComponentDefinition","json","events","event","aiUIComponentDefinitionJSON","definition","length"],"sourceRoot":"../../../../src","sources":["ai-components/generative-ui/AIUIComponentDefinition.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAAyC,IAAAC,SAAA;AA+ClC,IAAMC,iBAAiB,GAAAC,OA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,OAAOA,KAAK,CAACnC,IAAI,KAAK,QAAQ,GAC7C,CACE;MACEC,WAAW,EAAE,OAAOkC,KAAK,CAAClC,WAAW,KAAK,QAAQ,GAAGkC,KAAK,CAAClC,WAAW,GAAG,EAAE;MAC3ED,IAAI,EAAEmC,KAAK,CAACnC,IAAI;MAChBW,UAAU,EAAEO,gBAAgB,CAACiB,KAAK,CAACxB,UAAU;IAC/C,CAAC,CACF,GACD,EACN,CAAC;IACDX,IAAI,EAAEiC,IAAI,CAACjC,IAAI;IACfW,UAAU,EAAEO,gBAAgB,CAACe,IAAI,CAACtB,UAAU;EAC9C,CAAC;AACH,CAAC;AAAC9B,OAAA,CAAAmD,4BAAA,GAAAA,4BAAA;AAGK,IAAMI,2BAA2B,GAAIC,UAAmC,KAAM;EACnFpC,WAAW,EAAEoC,UAAU,CAACpC,WAAW;EACnCiC,MAAM,EAAEG,UAAU,CAACH,MAAM,CAACtB,GAAG,CAAC,CAAC;IAAEX,WAAW;IAAED,IAAI;IAAEW;EAAW,CAAC,MAAM;IACpEV,WAAW;IACXD,IAAI;IACJ,IAAIW,UAAU,CAAC2B,MAAM,GAAG;MAAE3B,UAAU,EAAEf,gBAAgB,CAACe,UAAU;IAAE,CAAC,GAAG,CAAC,CAAC;EAC3E,CAAC,CAAC,CAAC;EACHX,IAAI,EAAEqC,UAAU,CAACrC,IAAI;EACrBW,UAAU,EAAEf,gBAAgB,CAACyC,UAAU,CAAC1B,UAAU;AACpD,CAAC,CAAC;AAAC9B,OAAA,CAAAuD,2BAAA,GAAAA,2BAAA","ignoreList":[]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2
|
+
value: true
|
|
3
|
+
});
|
|
4
|
+
exports.parseAIUIDocument = exports.isSameAIUIDocument = exports.aiUIDocumentText = exports.AI_UI_SUPPORTED_VERSION = exports.AI_UI_CUSTOM_DATA_KEY = void 0;
|
|
5
|
+
var _AIUIHelpers = require("./AIUIHelpers");
|
|
6
|
+
var AI_UI_CUSTOM_DATA_KEY = exports.AI_UI_CUSTOM_DATA_KEY = 'ai_ui';
|
|
7
|
+
var AI_UI_SUPPORTED_VERSION = exports.AI_UI_SUPPORTED_VERSION = 1;
|
|
8
|
+
var parseAIUIDocument = field => {
|
|
9
|
+
if (!(0, _AIUIHelpers.isRecord)(field)) return undefined;
|
|
10
|
+
var content = field.content,
|
|
11
|
+
format = field.format,
|
|
12
|
+
status = field.status,
|
|
13
|
+
v = field.v,
|
|
14
|
+
version = field.version;
|
|
15
|
+
if (typeof format !== 'string' || format === '') return undefined;
|
|
16
|
+
if (content === undefined || content === null) return undefined;
|
|
17
|
+
if (typeof v === 'number' && v > AI_UI_SUPPORTED_VERSION) return undefined;
|
|
18
|
+
return {
|
|
19
|
+
content,
|
|
20
|
+
format,
|
|
21
|
+
isStreaming: status === 'streaming',
|
|
22
|
+
...(typeof version === 'string' && version !== '' ? {
|
|
23
|
+
version
|
|
24
|
+
} : {})
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
exports.parseAIUIDocument = parseAIUIDocument;
|
|
28
|
+
var aiUIDocumentText = document => typeof document.content === 'string' ? document.content : undefined;
|
|
29
|
+
exports.aiUIDocumentText = aiUIDocumentText;
|
|
30
|
+
var isSameAIUIDocument = (a, b) => a === b || !!a && !!b && a.format === b.format && a.version === b.version && a.isStreaming === b.isStreaming && (0, _AIUIHelpers.isSameJSON)(a.content, b.content);
|
|
31
|
+
exports.isSameAIUIDocument = isSameAIUIDocument;
|
|
32
|
+
//# sourceMappingURL=AIUIDocument.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_AIUIHelpers","require","AI_UI_CUSTOM_DATA_KEY","exports","AI_UI_SUPPORTED_VERSION","parseAIUIDocument","field","isRecord","undefined","content","format","status","v","version","isStreaming","aiUIDocumentText","document","isSameAIUIDocument","a","b","isSameJSON"],"sourceRoot":"../../../../src","sources":["ai-components/generative-ui/AIUIDocument.ts"],"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C,IACN,CAAC,CAACD,CAAC,IACF,CAAC,CAACC,CAAC,IACHD,CAAC,CAACR,MAAM,KAAKS,CAAC,CAACT,MAAM,IACrBQ,CAAC,CAACL,OAAO,KAAKM,CAAC,CAACN,OAAO,IACvBK,CAAC,CAACJ,WAAW,KAAKK,CAAC,CAACL,WAAW,IAC/B,IAAAM,uBAAU,EAACF,CAAC,CAACT,OAAO,EAAEU,CAAC,CAACV,OAAO,CAAE;AAACN,OAAA,CAAAc,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
exports.useAIUIEntrance = exports.useAIUIComesIn = exports.AIUIEntranceStage = exports.AIUIEntrance = exports.AIUICascade = void 0;
|
|
6
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
10
|
+
var _useReduceMotion = require("../voice-visualization/useReduceMotion");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
var _jsxFileName = "/home/runner/work/stream-chat-react-native/stream-chat-react-native/package/src/ai-components/generative-ui/AIUIEntrance.tsx";
|
|
13
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
14
|
+
class AIUICascade {
|
|
15
|
+
static step = 0.1;
|
|
16
|
+
static longestWait = 0.4;
|
|
17
|
+
next = 0;
|
|
18
|
+
delay(now = (typeof performance === 'undefined' ? Date.now() : performance.now()) / 1000) {
|
|
19
|
+
var start = Math.min(Math.max(now, this.next), now + AIUICascade.longestWait);
|
|
20
|
+
this.next = start + AIUICascade.step;
|
|
21
|
+
return start - now;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.AIUICascade = AIUICascade;
|
|
25
|
+
var AIUIStageContext = (0, _react.createContext)(undefined);
|
|
26
|
+
var SPRING = {
|
|
27
|
+
dampingRatio: 0.88,
|
|
28
|
+
duration: 700
|
|
29
|
+
};
|
|
30
|
+
var FADE = {
|
|
31
|
+
duration: 300,
|
|
32
|
+
easing: _reactNativeReanimated.Easing.out(_reactNativeReanimated.Easing.ease),
|
|
33
|
+
reduceMotion: _reactNativeReanimated.ReduceMotion.Never
|
|
34
|
+
};
|
|
35
|
+
var RISE = 16;
|
|
36
|
+
var START_SCALE = 0.97;
|
|
37
|
+
var START_BLUR = 8;
|
|
38
|
+
var CAN_BLUR = _reactNative.Platform.OS === 'android' && Number(_reactNative.Platform.Version) >= 31;
|
|
39
|
+
var useEntrance = (startsHidden, cascade, resetKey) => {
|
|
40
|
+
var reduceMotion = (0, _useReduceMotion.useReduceMotion)();
|
|
41
|
+
var _useState = (0, _react.useState)(resetKey),
|
|
42
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
43
|
+
shownFor = _useState2[0],
|
|
44
|
+
setShownFor = _useState2[1];
|
|
45
|
+
var _useState3 = (0, _react.useState)(!startsHidden),
|
|
46
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
47
|
+
hasShownState = _useState4[0],
|
|
48
|
+
setHasShown = _useState4[1];
|
|
49
|
+
var isReset = !Object.is(shownFor, resetKey);
|
|
50
|
+
if (isReset) {
|
|
51
|
+
setShownFor(resetKey);
|
|
52
|
+
setHasShown(!startsHidden);
|
|
53
|
+
}
|
|
54
|
+
var hasShown = isReset ? !startsHidden : hasShownState;
|
|
55
|
+
var progress = (0, _reactNativeReanimated.useSharedValue)(startsHidden ? 0 : 1);
|
|
56
|
+
var progressFor = (0, _react.useRef)(resetKey);
|
|
57
|
+
(0, _react.useLayoutEffect)(() => {
|
|
58
|
+
if (Object.is(progressFor.current, resetKey)) return;
|
|
59
|
+
progressFor.current = resetKey;
|
|
60
|
+
progress.value = startsHidden ? 0 : 1;
|
|
61
|
+
});
|
|
62
|
+
(0, _react.useEffect)(() => {
|
|
63
|
+
var _cascade$delay;
|
|
64
|
+
if (hasShown) return;
|
|
65
|
+
var delay = ((_cascade$delay = cascade == null ? void 0 : cascade.delay()) != null ? _cascade$delay : 0) * 1000;
|
|
66
|
+
progress.value = (0, _reactNativeReanimated.withDelay)(delay, reduceMotion ? (0, _reactNativeReanimated.withTiming)(1, FADE) : (0, _reactNativeReanimated.withSpring)(1, SPRING));
|
|
67
|
+
setHasShown(true);
|
|
68
|
+
}, [cascade, hasShown, progress, reduceMotion]);
|
|
69
|
+
var style = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
70
|
+
var shown = Math.min(progress.value, 1);
|
|
71
|
+
if (reduceMotion) return {
|
|
72
|
+
opacity: shown
|
|
73
|
+
};
|
|
74
|
+
return {
|
|
75
|
+
opacity: shown,
|
|
76
|
+
transform: [{
|
|
77
|
+
translateY: (1 - progress.value) * RISE
|
|
78
|
+
}, {
|
|
79
|
+
scale: START_SCALE + (1 - START_SCALE) * progress.value
|
|
80
|
+
}],
|
|
81
|
+
...(CAN_BLUR ? {
|
|
82
|
+
filter: [{
|
|
83
|
+
blur: Math.max(0, 1 - shown) * START_BLUR
|
|
84
|
+
}]
|
|
85
|
+
} : {})
|
|
86
|
+
};
|
|
87
|
+
}, [reduceMotion]);
|
|
88
|
+
return {
|
|
89
|
+
hasShown,
|
|
90
|
+
style
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
var AIUIEntranceStage = ({
|
|
94
|
+
children,
|
|
95
|
+
isStreaming,
|
|
96
|
+
resetKey,
|
|
97
|
+
style
|
|
98
|
+
}) => {
|
|
99
|
+
var _useState5 = (0, _react.useState)(() => ({
|
|
100
|
+
cascade: new AIUICascade(),
|
|
101
|
+
isLive: isStreaming,
|
|
102
|
+
resetKey
|
|
103
|
+
})),
|
|
104
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
105
|
+
held = _useState6[0],
|
|
106
|
+
setHeld = _useState6[1];
|
|
107
|
+
var shown = held;
|
|
108
|
+
if (!Object.is(held.resetKey, resetKey)) {
|
|
109
|
+
shown = {
|
|
110
|
+
cascade: new AIUICascade(),
|
|
111
|
+
isLive: isStreaming,
|
|
112
|
+
resetKey
|
|
113
|
+
};
|
|
114
|
+
setHeld(shown);
|
|
115
|
+
}
|
|
116
|
+
var _shown = shown,
|
|
117
|
+
cascade = _shown.cascade,
|
|
118
|
+
isLive = _shown.isLive;
|
|
119
|
+
var _useEntrance = useEntrance(isLive, cascade, resetKey),
|
|
120
|
+
hasShown = _useEntrance.hasShown,
|
|
121
|
+
entrance = _useEntrance.style;
|
|
122
|
+
var stage = (0, _react.useMemo)(() => ({
|
|
123
|
+
cascade,
|
|
124
|
+
isCarried: !isLive || !hasShown
|
|
125
|
+
}), [cascade, hasShown, isLive]);
|
|
126
|
+
return (0, _jsxRuntime.jsx)(AIUIStageContext.Provider, {
|
|
127
|
+
value: stage,
|
|
128
|
+
children: (0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
129
|
+
style: [styles.entrance, entrance, style],
|
|
130
|
+
children: children
|
|
131
|
+
})
|
|
132
|
+
});
|
|
133
|
+
};
|
|
134
|
+
exports.AIUIEntranceStage = AIUIEntranceStage;
|
|
135
|
+
var useAIUIComesIn = () => {
|
|
136
|
+
var stage = (0, _react.useContext)(AIUIStageContext);
|
|
137
|
+
var _useState7 = (0, _react.useState)(() => !!stage && !stage.isCarried),
|
|
138
|
+
_useState8 = (0, _slicedToArray2.default)(_useState7, 1),
|
|
139
|
+
comesIn = _useState8[0];
|
|
140
|
+
return comesIn;
|
|
141
|
+
};
|
|
142
|
+
exports.useAIUIComesIn = useAIUIComesIn;
|
|
143
|
+
var useAIUIEntrance = () => {
|
|
144
|
+
var stage = (0, _react.useContext)(AIUIStageContext);
|
|
145
|
+
var _useEntrance2 = useEntrance(!!stage && !stage.isCarried, stage == null ? void 0 : stage.cascade),
|
|
146
|
+
hasShown = _useEntrance2.hasShown,
|
|
147
|
+
style = _useEntrance2.style;
|
|
148
|
+
var inner = (0, _react.useMemo)(() => stage && {
|
|
149
|
+
cascade: stage.cascade,
|
|
150
|
+
isCarried: stage.isCarried || !hasShown
|
|
151
|
+
}, [hasShown, stage]);
|
|
152
|
+
var scope = (0, _react.useMemo)(() => children => (0, _jsxRuntime.jsx)(AIUIStageContext.Provider, {
|
|
153
|
+
value: inner,
|
|
154
|
+
children: children
|
|
155
|
+
}), [inner]);
|
|
156
|
+
return {
|
|
157
|
+
scope,
|
|
158
|
+
style: [styles.entrance, style]
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
exports.useAIUIEntrance = useAIUIEntrance;
|
|
162
|
+
var AIUIEntrance = ({
|
|
163
|
+
children,
|
|
164
|
+
style
|
|
165
|
+
}) => {
|
|
166
|
+
var comesIn = useAIUIComesIn();
|
|
167
|
+
return comesIn ? (0, _jsxRuntime.jsx)(EnteringPart, {
|
|
168
|
+
style: style,
|
|
169
|
+
children: children
|
|
170
|
+
}) : (0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
171
|
+
style: [styles.entrance, style],
|
|
172
|
+
children: children
|
|
173
|
+
});
|
|
174
|
+
};
|
|
175
|
+
exports.AIUIEntrance = AIUIEntrance;
|
|
176
|
+
var EnteringPart = ({
|
|
177
|
+
children,
|
|
178
|
+
style
|
|
179
|
+
}) => {
|
|
180
|
+
var _useAIUIEntrance = useAIUIEntrance(),
|
|
181
|
+
scope = _useAIUIEntrance.scope,
|
|
182
|
+
entrance = _useAIUIEntrance.style;
|
|
183
|
+
return (0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
184
|
+
style: [entrance, style],
|
|
185
|
+
children: scope(children)
|
|
186
|
+
});
|
|
187
|
+
};
|
|
188
|
+
var styles = _reactNative.StyleSheet.create({
|
|
189
|
+
entrance: {
|
|
190
|
+
transformOrigin: 'top'
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
//# sourceMappingURL=AIUIEntrance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_useReduceMotion","_jsxRuntime","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","AIUICascade","step","longestWait","next","delay","now","performance","Date","start","Math","min","max","exports","AIUIStageContext","createContext","undefined","SPRING","dampingRatio","duration","FADE","easing","Easing","out","ease","reduceMotion","ReduceMotion","Never","RISE","START_SCALE","START_BLUR","CAN_BLUR","Platform","OS","Number","Version","useEntrance","startsHidden","cascade","resetKey","useReduceMotion","_useState","useState","_useState2","_slicedToArray2","shownFor","setShownFor","_useState3","_useState4","hasShownState","setHasShown","isReset","is","hasShown","progress","useSharedValue","progressFor","useRef","useLayoutEffect","current","value","useEffect","_cascade$delay","withDelay","withTiming","withSpring","style","useAnimatedStyle","shown","opacity","transform","translateY","scale","filter","blur","AIUIEntranceStage","children","isStreaming","_useState5","isLive","_useState6","held","setHeld","_shown","_useEntrance","entrance","stage","useMemo","isCarried","jsx","Provider","View","styles","useAIUIComesIn","useContext","_useState7","_useState8","comesIn","useAIUIEntrance","_useEntrance2","inner","scope","AIUIEntrance","EnteringPart","_useAIUIEntrance","StyleSheet","create","transformOrig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", {
|
|
2
|
+
value: true
|
|
3
|
+
});
|
|
4
|
+
exports.AIUIErrorBoundary = void 0;
|
|
5
|
+
var _react = require("react");
|
|
6
|
+
class AIUIErrorBoundary extends _react.Component {
|
|
7
|
+
state = {
|
|
8
|
+
hasError: false,
|
|
9
|
+
resetKey: this.props.resetKey
|
|
10
|
+
};
|
|
11
|
+
static getDerivedStateFromError() {
|
|
12
|
+
return {
|
|
13
|
+
hasError: true
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
static getDerivedStateFromProps(props, state) {
|
|
17
|
+
return Object.is(props.resetKey, state.resetKey) ? null : {
|
|
18
|
+
hasError: false,
|
|
19
|
+
resetKey: props.resetKey
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
componentDidCatch(error) {
|
|
23
|
+
this.props.onError(error);
|
|
24
|
+
}
|
|
25
|
+
render() {
|
|
26
|
+
return this.state.hasError ? null : this.props.children;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.AIUIErrorBoundary = AIUIErrorBoundary;
|
|
30
|
+
//# sourceMappingURL=AIUIErrorBoundary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","AIUIErrorBoundary","Component","state","hasError","resetKey","props","getDerivedStateFromError","getDerivedStateFromProps","Object","is","componentDidCatch","error","onError","render","children","exports"],"sourceRoot":"../../../../src","sources":["ai-components/generative-ui/AIUIErrorBoundary.tsx"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAeO,MAAMC,iBAAiB,SAASC,gBAAS,CAAiD;EAC/FC,KAAK,GAA2B;IAAEC,QAAQ,EAAE,KAAK;IAAEC,QAAQ,EAAE,IAAI,CAACC,KAAK,CAACD;EAAS,CAAC;EAElF,OAAOE,wBAAwBA,CAAA,EAAG;IAChC,OAAO;MAAEH,QAAQ,EAAE;IAAK,CAAC;EAC3B;EAEA,OAAOI,wBAAwBA,CAC7BF,KAA6B,EAC7BH,KAA6B,EACW;IACxC,OAAOM,MAAM,CAACC,EAAE,CAACJ,KAAK,CAACD,QAAQ,EAAEF,KAAK,CAACE,QAAQ,CAAC,GAC5C,IAAI,GACJ;MAAED,QAAQ,EAAE,KAAK;MAAEC,QAAQ,EAAEC,KAAK,CAACD;IAAS,CAAC;EACnD;EAEAM,iBAAiBA,CAACC,KAAc,EAAE;IAChC,IAAI,CAACN,KAAK,CAACO,OAAO,CAACD,KAAK,CAAC;EAC3B;EAEAE,MAAMA,CAAA,EAAG;IACP,OAAO,IAAI,CAACX,KAAK,CAACC,QAAQ,GAAG,IAAI,GAAG,IAAI,CAACE,KAAK,CAACS,QAAQ;EACzD;AACF;AAACC,OAAA,CAAAf,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2
|
+
value: true
|
|
3
|
+
});
|
|
4
|
+
exports.utf8ByteLength = exports.isSameJSON = exports.isRecord = exports.aiUITypeName = exports.aiUISentence = exports.aiUILinkScheme = void 0;
|
|
5
|
+
var isRecord = value => typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
6
|
+
exports.isRecord = isRecord;
|
|
7
|
+
var isSameJSON = (a, b) => {
|
|
8
|
+
if (Object.is(a, b)) return true;
|
|
9
|
+
if (Array.isArray(a)) {
|
|
10
|
+
return Array.isArray(b) && a.length === b.length && a.every((item, index) => isSameJSON(item, b[index]));
|
|
11
|
+
}
|
|
12
|
+
if (!isRecord(a) || !isRecord(b)) return false;
|
|
13
|
+
var keys = Object.keys(a);
|
|
14
|
+
return keys.length === Object.keys(b).length && keys.every(key => Object.prototype.hasOwnProperty.call(b, key) && isSameJSON(a[key], b[key]));
|
|
15
|
+
};
|
|
16
|
+
exports.isSameJSON = isSameJSON;
|
|
17
|
+
var utf8ByteLength = text => {
|
|
18
|
+
var bytes = 0;
|
|
19
|
+
for (var index = 0; index < text.length; index++) {
|
|
20
|
+
var code = text.charCodeAt(index);
|
|
21
|
+
if (code < 0x80) bytes += 1;else if (code < 0x800) bytes += 2;else if (code >= 0xd800 && code <= 0xdbff && index + 1 < text.length) {
|
|
22
|
+
bytes += 4;
|
|
23
|
+
index++;
|
|
24
|
+
} else bytes += 3;
|
|
25
|
+
}
|
|
26
|
+
return bytes;
|
|
27
|
+
};
|
|
28
|
+
exports.utf8ByteLength = utf8ByteLength;
|
|
29
|
+
var aiUITypeName = name => name.split(/[_\- ]/).filter(Boolean).map(word => word.charAt(0).toUpperCase() + word.slice(1)).join('');
|
|
30
|
+
exports.aiUITypeName = aiUITypeName;
|
|
31
|
+
var aiUISentence = text => {
|
|
32
|
+
var trimmed = text.trim();
|
|
33
|
+
return /[.!?]$/.test(trimmed) ? trimmed : `${trimmed}.`;
|
|
34
|
+
};
|
|
35
|
+
exports.aiUISentence = aiUISentence;
|
|
36
|
+
var LINK = /^([A-Za-z][A-Za-z0-9+.-]*):(\S*)$/;
|
|
37
|
+
var hasControlCharacter = text => {
|
|
38
|
+
for (var index = 0; index < text.length; index++) {
|
|
39
|
+
var code = text.charCodeAt(index);
|
|
40
|
+
if (code < 0x20 || code === 0x7f) return true;
|
|
41
|
+
}
|
|
42
|
+
return false;
|
|
43
|
+
};
|
|
44
|
+
var aiUILinkScheme = link => {
|
|
45
|
+
var trimmed = link.trim();
|
|
46
|
+
var match = hasControlCharacter(trimmed) ? null : LINK.exec(trimmed);
|
|
47
|
+
if (!match) return undefined;
|
|
48
|
+
var scheme = match[1].toLowerCase();
|
|
49
|
+
var rest = match[2];
|
|
50
|
+
if ((scheme === 'http' || scheme === 'https') && !/^\/\/[^/?#]+/.test(rest)) return undefined;
|
|
51
|
+
return scheme;
|
|
52
|
+
};
|
|
53
|
+
exports.aiUILinkScheme = aiUILinkScheme;
|
|
54
|
+
//# sourceMappingURL=AIUIHelpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isRecord","value","Array","isArray","exports","isSameJSON","a","b","Object","is","length","every","item","index","keys","key","prototype","hasOwnProperty","call","utf8ByteLength","text","bytes","code","charCodeAt","aiUITypeName","name","split","filter","Boolean","map","word","charAt","toUpperCase","slice","join","aiUISentence","trimmed","trim","test","LINK","hasControlCharacter","aiUILinkScheme","link","match","exec","undefined","scheme","toLowerCase","rest"],"sourceRoot":"../../../../src","sources":["ai-components/generative-ui/AIUIHelpers.ts"],"mappings":";;;;AAIO,IAAMA,QAAQ,GAAIC,KAAc,IACrC,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,KAAK,IAAI,IAAI,CAACC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC;AAACG,OAAA,CAAAJ,QAAA,GAAAA,QAAA;AAMhE,IAAMK,UAAU,GAAGA,CAACC,CAAU,EAAEC,CAAU,KAAc;EAC7D,IAAIC,MAAM,CAACC,EAAE,CAACH,CAAC,EAAEC,CAAC,CAAC,EAAE,OAAO,IAAI;EAChC,IAAIL,KAAK,CAACC,OAAO,CAACG,CAAC,CAAC,EAAE;IACpB,OACEJ,KAAK,CAACC,OAAO,CAACI,CAAC,CAAC,IAChBD,CAAC,CAACI,MAAM,KAAKH,CAAC,CAACG,MAAM,IACrBJ,CAAC,CAACK,KAAK,CAAC,CAACC,IAAI,EAAEC,KAAK,KAAKR,UAAU,CAACO,IAAI,EAAEL,CAAC,CAACM,KAAK,CAAC,CAAC,CAAC;EAExD;EACA,IAAI,CAACb,QAAQ,CAACM,CAAC,CAAC,IAAI,CAACN,QAAQ,CAACO,CAAC,CAAC,EAAE,OAAO,KAAK;EAC9C,IAAMO,IAAI,GAAGN,MAAM,CAACM,IAAI,CAACR,CAAC,CAAC;EAC3B,OACEQ,IAAI,CAACJ,MAAM,KAAKF,MAAM,CAACM,IAAI,CAACP,CAAC,CAAC,CAACG,MAAM,IACrCI,IAAI,CAACH,KAAK,CAAEI,GAAG,IAAKP,MAAM,CAACQ,SAAS,CAACC,cAAc,CAACC,IAAI,CAACX,CAAC,EAAEQ,GAAG,CAAC,IAAIV,UAAU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