stream-chat-react-native-core 9.12.1 → 9.14.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/ai-components/conversation/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 +237 -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 +64 -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 +374 -0
- package/lib/commonjs/ai-components/conversation/AIConversation.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/index.js +15 -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 +53 -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/useConversationRows.js +117 -0
- package/lib/commonjs/ai-components/conversation/useConversationRows.js.map +1 -0
- package/lib/commonjs/ai-components/conversation-state/controller/AIAgentError.js +13 -0
- package/lib/commonjs/ai-components/conversation-state/controller/AIAgentError.js.map +1 -0
- package/lib/commonjs/ai-components/conversation-state/controller/AIConversationController.js +431 -0
- package/lib/commonjs/ai-components/conversation-state/controller/AIConversationController.js.map +1 -0
- package/lib/commonjs/ai-components/conversation-state/controller/AIConversationExchange.js +89 -0
- package/lib/commonjs/ai-components/conversation-state/controller/AIConversationExchange.js.map +1 -0
- package/lib/commonjs/ai-components/conversation-state/controller/index.js +48 -0
- package/lib/commonjs/ai-components/conversation-state/controller/index.js.map +1 -0
- package/lib/commonjs/ai-components/conversation-state/controller/offers.js +35 -0
- package/lib/commonjs/ai-components/conversation-state/controller/offers.js.map +1 -0
- package/lib/commonjs/ai-components/conversation-state/controller/types.js +13 -0
- package/lib/commonjs/ai-components/conversation-state/controller/types.js.map +1 -0
- package/lib/commonjs/ai-components/conversation-state/controller/useAIConversationState.js +8 -0
- package/lib/commonjs/ai-components/conversation-state/controller/useAIConversationState.js.map +1 -0
- package/lib/commonjs/ai-components/conversation-state/fromStreamMessage.js +67 -0
- package/lib/commonjs/ai-components/conversation-state/fromStreamMessage.js.map +1 -0
- package/lib/commonjs/ai-components/conversation-state/index.js +37 -0
- package/lib/commonjs/ai-components/conversation-state/index.js.map +1 -0
- package/lib/commonjs/ai-components/conversation-state/types.js +4 -0
- package/lib/commonjs/ai-components/conversation-state/types.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 +197 -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/keyboard.js +40 -0
- package/lib/commonjs/ai-components/internal/keyboard.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 +64 -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 +4 -2
- 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 +146 -20
- package/lib/commonjs/ai-components/message-composer/ComposerView.js.map +1 -1
- package/lib/commonjs/ai-components/message-composer/EditingMessageChip.js +81 -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 +133 -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 +40 -1
- package/lib/commonjs/i18n/en.json +40 -1
- package/lib/commonjs/i18n/es.json +40 -1
- package/lib/commonjs/i18n/fr.json +40 -1
- package/lib/commonjs/i18n/he.json +40 -1
- package/lib/commonjs/i18n/hi.json +40 -1
- package/lib/commonjs/i18n/it.json +40 -1
- package/lib/commonjs/i18n/ja.json +40 -1
- package/lib/commonjs/i18n/ko.json +40 -1
- package/lib/commonjs/i18n/nl.json +40 -1
- package/lib/commonjs/i18n/pt-br.json +40 -1
- package/lib/commonjs/i18n/ru.json +40 -1
- package/lib/commonjs/i18n/tr.json +40 -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 +237 -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 +64 -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 +374 -0
- package/lib/module/ai-components/conversation/AIConversation.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/index.js +15 -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 +53 -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/useConversationRows.js +117 -0
- package/lib/module/ai-components/conversation/useConversationRows.js.map +1 -0
- package/lib/module/ai-components/conversation-state/controller/AIAgentError.js +13 -0
- package/lib/module/ai-components/conversation-state/controller/AIAgentError.js.map +1 -0
- package/lib/module/ai-components/conversation-state/controller/AIConversationController.js +431 -0
- package/lib/module/ai-components/conversation-state/controller/AIConversationController.js.map +1 -0
- package/lib/module/ai-components/conversation-state/controller/AIConversationExchange.js +89 -0
- package/lib/module/ai-components/conversation-state/controller/AIConversationExchange.js.map +1 -0
- package/lib/module/ai-components/conversation-state/controller/index.js +48 -0
- package/lib/module/ai-components/conversation-state/controller/index.js.map +1 -0
- package/lib/module/ai-components/conversation-state/controller/offers.js +35 -0
- package/lib/module/ai-components/conversation-state/controller/offers.js.map +1 -0
- package/lib/module/ai-components/conversation-state/controller/types.js +13 -0
- package/lib/module/ai-components/conversation-state/controller/types.js.map +1 -0
- package/lib/module/ai-components/conversation-state/controller/useAIConversationState.js +8 -0
- package/lib/module/ai-components/conversation-state/controller/useAIConversationState.js.map +1 -0
- package/lib/module/ai-components/conversation-state/fromStreamMessage.js +67 -0
- package/lib/module/ai-components/conversation-state/fromStreamMessage.js.map +1 -0
- package/lib/module/ai-components/conversation-state/index.js +37 -0
- package/lib/module/ai-components/conversation-state/index.js.map +1 -0
- package/lib/module/ai-components/conversation-state/types.js +4 -0
- package/lib/module/ai-components/conversation-state/types.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 +197 -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/keyboard.js +40 -0
- package/lib/module/ai-components/internal/keyboard.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 +64 -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 +4 -2
- 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 +146 -20
- package/lib/module/ai-components/message-composer/ComposerView.js.map +1 -1
- package/lib/module/ai-components/message-composer/EditingMessageChip.js +81 -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 +133 -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 +40 -1
- package/lib/module/i18n/en.json +40 -1
- package/lib/module/i18n/es.json +40 -1
- package/lib/module/i18n/fr.json +40 -1
- package/lib/module/i18n/he.json +40 -1
- package/lib/module/i18n/hi.json +40 -1
- package/lib/module/i18n/it.json +40 -1
- package/lib/module/i18n/ja.json +40 -1
- package/lib/module/i18n/ko.json +40 -1
- package/lib/module/i18n/nl.json +40 -1
- package/lib/module/i18n/pt-br.json +40 -1
- package/lib/module/i18n/ru.json +40 -1
- package/lib/module/i18n/tr.json +40 -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 +133 -0
- package/lib/typescript/ai-components/conversation/AIConversation.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/index.d.ts +3 -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/useConversationRows.d.ts +66 -0
- package/lib/typescript/ai-components/conversation/useConversationRows.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation-state/controller/AIAgentError.d.ts +10 -0
- package/lib/typescript/ai-components/conversation-state/controller/AIAgentError.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation-state/controller/AIConversationController.d.ts +173 -0
- package/lib/typescript/ai-components/conversation-state/controller/AIConversationController.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation-state/controller/AIConversationExchange.d.ts +23 -0
- package/lib/typescript/ai-components/conversation-state/controller/AIConversationExchange.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation-state/controller/index.d.ts +5 -0
- package/lib/typescript/ai-components/conversation-state/controller/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation-state/controller/offers.d.ts +25 -0
- package/lib/typescript/ai-components/conversation-state/controller/offers.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation-state/controller/types.d.ts +142 -0
- package/lib/typescript/ai-components/conversation-state/controller/types.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation-state/controller/useAIConversationState.d.ts +9 -0
- package/lib/typescript/ai-components/conversation-state/controller/useAIConversationState.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation-state/fromStreamMessage.d.ts +25 -0
- package/lib/typescript/ai-components/conversation-state/fromStreamMessage.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation-state/index.d.ts +4 -0
- package/lib/typescript/ai-components/conversation-state/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/conversation-state/types.d.ts +55 -0
- package/lib/typescript/ai-components/conversation-state/types.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 +76 -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/keyboard.d.ts +9 -0
- package/lib/typescript/ai-components/internal/keyboard.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 +1 -1
- 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 +39 -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 +40 -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 +40 -1
- package/lib/typescript/i18n/en.json +40 -1
- package/lib/typescript/i18n/es.json +40 -1
- package/lib/typescript/i18n/fr.json +40 -1
- package/lib/typescript/i18n/he.json +40 -1
- package/lib/typescript/i18n/hi.json +40 -1
- package/lib/typescript/i18n/it.json +40 -1
- package/lib/typescript/i18n/ja.json +40 -1
- package/lib/typescript/i18n/ko.json +40 -1
- package/lib/typescript/i18n/nl.json +40 -1
- package/lib/typescript/i18n/pt-br.json +40 -1
- package/lib/typescript/i18n/ru.json +40 -1
- package/lib/typescript/i18n/tr.json +40 -1
- package/lib/typescript/utils/i18n/Streami18n.d.ts +41 -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 +270 -0
- package/src/a2ui/__tests__/A2UIInstructions.test.ts +233 -0
- package/src/a2ui/__tests__/A2UIRenderer.test.tsx +1559 -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 +64 -3
- package/src/ai-components/StreamingMessageView.tsx +27 -3
- package/src/ai-components/__tests__/ComposerView.test.tsx +247 -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 +787 -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 +606 -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 +385 -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/__tests__/withoutKeyboardController.test.tsx +60 -0
- 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 +612 -0
- package/src/ai-components/conversation/entries.ts +177 -0
- package/src/ai-components/conversation/index.ts +2 -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 +52 -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/useConversationRows.ts +231 -0
- package/src/ai-components/conversation-state/controller/AIAgentError.ts +14 -0
- package/src/ai-components/conversation-state/controller/AIConversationController.ts +628 -0
- package/src/ai-components/conversation-state/controller/AIConversationExchange.ts +132 -0
- package/src/ai-components/conversation-state/controller/index.ts +4 -0
- package/src/ai-components/conversation-state/controller/offers.ts +53 -0
- package/src/ai-components/conversation-state/controller/types.ts +154 -0
- package/src/ai-components/conversation-state/controller/useAIConversationState.ts +21 -0
- package/src/ai-components/conversation-state/fromStreamMessage.ts +89 -0
- package/src/ai-components/conversation-state/index.ts +3 -0
- package/src/ai-components/conversation-state/types.ts +57 -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 +229 -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/keyboard.tsx +34 -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 +100 -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 +10 -5
- 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 +194 -30
- package/src/ai-components/message-composer/EditingMessageChip.tsx +62 -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 +145 -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 +40 -1
- package/src/i18n/en.json +40 -1
- package/src/i18n/es.json +40 -1
- package/src/i18n/fr.json +40 -1
- package/src/i18n/he.json +40 -1
- package/src/i18n/hi.json +40 -1
- package/src/i18n/it.json +40 -1
- package/src/i18n/ja.json +40 -1
- package/src/i18n/ko.json +40 -1
- package/src/i18n/nl.json +40 -1
- package/src/i18n/pt-br.json +40 -1
- package/src/i18n/ru.json +40 -1
- package/src/i18n/tr.json +40 -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,324 @@
|
|
|
1
|
+
import React, { type ReactElement } from 'react';
|
|
2
|
+
|
|
3
|
+
import { act, fireEvent, render, screen } from '@testing-library/react-native';
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
AIClientIdentity,
|
|
7
|
+
AIConnectorSignInError,
|
|
8
|
+
AIMessagePart,
|
|
9
|
+
type AIToolApprover,
|
|
10
|
+
AIToolApproverProvider,
|
|
11
|
+
AIToolAuthorization,
|
|
12
|
+
AIToolAuthorizationCard,
|
|
13
|
+
type AIToolAuthorizer,
|
|
14
|
+
type AIToolCallPart,
|
|
15
|
+
createAuthSessionAuthorizer,
|
|
16
|
+
parseMessagePart,
|
|
17
|
+
readConnectorSignInResult,
|
|
18
|
+
signInLaunchUrl,
|
|
19
|
+
StreamTheme,
|
|
20
|
+
} from '../index';
|
|
21
|
+
import { forgetCallStates } from '../message-parts/callStates';
|
|
22
|
+
import NativeAIAgent from '../native-specs/NativeAIAgent';
|
|
23
|
+
|
|
24
|
+
// Each test's questions start unanswered, though tests reuse calls.
|
|
25
|
+
afterEach(forgetCallStates);
|
|
26
|
+
|
|
27
|
+
jest.mock('../native-specs/NativeAIAgent', () => ({
|
|
28
|
+
__esModule: true,
|
|
29
|
+
default: { installId: jest.fn(), openAuthSession: jest.fn() },
|
|
30
|
+
}));
|
|
31
|
+
|
|
32
|
+
const native = NativeAIAgent as unknown as {
|
|
33
|
+
installId: jest.Mock;
|
|
34
|
+
openAuthSession: jest.Mock;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const renderWithTheme = (ui: ReactElement) => {
|
|
38
|
+
const result = render(<StreamTheme>{ui}</StreamTheme>);
|
|
39
|
+
return {
|
|
40
|
+
...result,
|
|
41
|
+
rerender: (next: ReactElement) => result.rerender(<StreamTheme>{next}</StreamTheme>),
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const signIn = parseMessagePart({
|
|
46
|
+
authorization: {
|
|
47
|
+
handoff_token: 'tok',
|
|
48
|
+
provider: 'linear',
|
|
49
|
+
provider_name: 'Linear',
|
|
50
|
+
title: 'Connect Linear',
|
|
51
|
+
type: 'oauth',
|
|
52
|
+
url: 'https://router.example.com/launch/abc',
|
|
53
|
+
},
|
|
54
|
+
id: 'call_2',
|
|
55
|
+
name: 'linear_create_issue',
|
|
56
|
+
status: 'awaiting_authorization',
|
|
57
|
+
target_user_id: 'alex',
|
|
58
|
+
type: 'ai_tool_call',
|
|
59
|
+
})?.toolCall as AIToolCallPart;
|
|
60
|
+
|
|
61
|
+
const approverWith = (authorizer?: AIToolAuthorizer): AIToolApprover => ({
|
|
62
|
+
authorizer,
|
|
63
|
+
clientId: 'ios-1',
|
|
64
|
+
decide: jest.fn(() => Promise.resolve()),
|
|
65
|
+
userId: 'alex',
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
describe('AIToolAuthorization', () => {
|
|
69
|
+
it('asks nothing without an authorizer, or of another person', () => {
|
|
70
|
+
const { rerender } = renderWithTheme(
|
|
71
|
+
<AIToolAuthorization approver={approverWith()} part={signIn} />,
|
|
72
|
+
);
|
|
73
|
+
expect(screen.queryByText('Connect Linear')).toBeNull();
|
|
74
|
+
rerender(
|
|
75
|
+
<AIToolAuthorization
|
|
76
|
+
approver={{ ...approverWith({ connect: jest.fn(), decline: jest.fn() }), userId: 'sam' }}
|
|
77
|
+
part={signIn}
|
|
78
|
+
/>,
|
|
79
|
+
);
|
|
80
|
+
expect(screen.queryByText('Connect Linear')).toBeNull();
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
it('connects, and lets the person try again when the sign-in ends unconnected', async () => {
|
|
84
|
+
let finish: (connected: boolean) => void = () => undefined;
|
|
85
|
+
const connect = jest.fn(
|
|
86
|
+
() =>
|
|
87
|
+
new Promise<boolean>((resolve) => {
|
|
88
|
+
finish = resolve;
|
|
89
|
+
}),
|
|
90
|
+
);
|
|
91
|
+
renderWithTheme(
|
|
92
|
+
<AIToolAuthorization
|
|
93
|
+
approver={approverWith({ connect, decline: jest.fn() })}
|
|
94
|
+
part={signIn}
|
|
95
|
+
/>,
|
|
96
|
+
);
|
|
97
|
+
fireEvent.press(screen.getByRole('button', { name: 'Connect' }));
|
|
98
|
+
expect(connect).toHaveBeenCalledWith(signIn);
|
|
99
|
+
expect(screen.getByRole('button', { name: 'Connecting...' })).toBeDisabled();
|
|
100
|
+
// Not now stays available while the sign-in is open.
|
|
101
|
+
expect(screen.getByRole('button', { name: 'Not now' })).toBeEnabled();
|
|
102
|
+
|
|
103
|
+
await act(async () => {
|
|
104
|
+
finish(false);
|
|
105
|
+
await Promise.resolve();
|
|
106
|
+
});
|
|
107
|
+
expect(screen.getByRole('button', { name: 'Connect' })).toBeEnabled();
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
it('declines a sign-in the person closed, which cannot be opened again', async () => {
|
|
111
|
+
const decline = jest.fn(() => Promise.reject(new Error('offline')));
|
|
112
|
+
renderWithTheme(
|
|
113
|
+
<AIToolAuthorization
|
|
114
|
+
approver={approverWith({ connect: () => Promise.resolve('closed'), decline })}
|
|
115
|
+
part={signIn}
|
|
116
|
+
/>,
|
|
117
|
+
);
|
|
118
|
+
fireEvent.press(screen.getByRole('button', { name: 'Connect' }));
|
|
119
|
+
await act(() => Promise.resolve());
|
|
120
|
+
expect(decline).toHaveBeenCalledWith(signIn);
|
|
121
|
+
|
|
122
|
+
// As with "Not now", an answer that couldn't be sent can be given again.
|
|
123
|
+
await act(() => Promise.resolve());
|
|
124
|
+
expect(screen.getByText("Your answer couldn't be sent. Try again.")).toBeTruthy();
|
|
125
|
+
expect(screen.getByRole('button', { name: 'Not now' })).toBeEnabled();
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
it('keeps connecting once connected, until the step changes', async () => {
|
|
129
|
+
renderWithTheme(
|
|
130
|
+
<AIToolAuthorization
|
|
131
|
+
approver={approverWith({ connect: () => Promise.resolve(true), decline: jest.fn() })}
|
|
132
|
+
part={signIn}
|
|
133
|
+
/>,
|
|
134
|
+
);
|
|
135
|
+
fireEvent.press(screen.getByRole('button', { name: 'Connect' }));
|
|
136
|
+
await act(() => Promise.resolve());
|
|
137
|
+
expect(screen.getByRole('button', { name: 'Connecting...' })).toBeDisabled();
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
it('says when the sign-in could not open, and lets the person try again', async () => {
|
|
141
|
+
const connect = jest.fn(() => Promise.reject(new AIConnectorSignInError('failed')));
|
|
142
|
+
renderWithTheme(
|
|
143
|
+
<AIToolAuthorization
|
|
144
|
+
approver={approverWith({ connect, decline: jest.fn() })}
|
|
145
|
+
part={signIn}
|
|
146
|
+
/>,
|
|
147
|
+
);
|
|
148
|
+
fireEvent.press(screen.getByRole('button', { name: 'Connect' }));
|
|
149
|
+
await act(() => Promise.resolve());
|
|
150
|
+
expect(screen.getByText("The sign-in couldn't be opened. Try again.")).toBeTruthy();
|
|
151
|
+
expect(screen.getByRole('button', { name: 'Connect' })).toBeEnabled();
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
it('declines, and lets the person answer again when that fails', async () => {
|
|
155
|
+
const decline = jest.fn(() => Promise.reject(new Error('offline')));
|
|
156
|
+
renderWithTheme(
|
|
157
|
+
<AIToolAuthorization
|
|
158
|
+
approver={approverWith({ connect: jest.fn(), decline })}
|
|
159
|
+
part={signIn}
|
|
160
|
+
/>,
|
|
161
|
+
);
|
|
162
|
+
fireEvent.press(screen.getByRole('button', { name: 'Not now' }));
|
|
163
|
+
expect(decline).toHaveBeenCalledWith(signIn);
|
|
164
|
+
expect(screen.getByRole('button', { name: 'Not now' })).toBeDisabled();
|
|
165
|
+
await act(() => Promise.resolve());
|
|
166
|
+
expect(screen.getByText("Your answer couldn't be sent. Try again.")).toBeTruthy();
|
|
167
|
+
expect(screen.getByRole('button', { name: 'Not now' })).toBeEnabled();
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
it.each([
|
|
171
|
+
['connected', 'Connected to Linear'],
|
|
172
|
+
['declined', 'Not connected'],
|
|
173
|
+
['failed', "The sign-in didn't complete."],
|
|
174
|
+
['expired', 'This sign-in has expired.'],
|
|
175
|
+
])('says how a %s sign-in ended, without buttons', (status, outcome) => {
|
|
176
|
+
renderWithTheme(
|
|
177
|
+
<AIToolAuthorizationCard
|
|
178
|
+
authorization={{ ...signIn.authorization!, status }}
|
|
179
|
+
onConnect={jest.fn()}
|
|
180
|
+
onDecline={jest.fn()}
|
|
181
|
+
/>,
|
|
182
|
+
);
|
|
183
|
+
expect(screen.getByText(outcome)).toBeTruthy();
|
|
184
|
+
expect(screen.queryByRole('button', { name: 'Connect' })).toBeNull();
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
it('can no longer be opened past its expiry', () => {
|
|
188
|
+
renderWithTheme(
|
|
189
|
+
<AIToolAuthorizationCard
|
|
190
|
+
authorization={{ ...signIn.authorization!, expiresAt: Date.now() - 1 }}
|
|
191
|
+
onConnect={jest.fn()}
|
|
192
|
+
onDecline={jest.fn()}
|
|
193
|
+
/>,
|
|
194
|
+
);
|
|
195
|
+
expect(screen.getByText('This sign-in has expired.')).toBeTruthy();
|
|
196
|
+
expect(screen.queryByRole('button', { name: 'Connect' })).toBeNull();
|
|
197
|
+
expect(screen.getByRole('button', { name: 'Not now' })).toBeEnabled();
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
it('is asked under its tool call, with the approver of the provider', () => {
|
|
201
|
+
renderWithTheme(
|
|
202
|
+
<AIToolApproverProvider approver={approverWith({ connect: jest.fn(), decline: jest.fn() })}>
|
|
203
|
+
<AIMessagePart part={parseMessagePart({ ...signInAttachment, type: 'ai_tool_call' })!} />
|
|
204
|
+
</AIToolApproverProvider>,
|
|
205
|
+
);
|
|
206
|
+
expect(screen.getByText('Connect Linear')).toBeTruthy();
|
|
207
|
+
expect(screen.getByText('Waiting for you to sign in')).toBeTruthy();
|
|
208
|
+
});
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
const signInAttachment = {
|
|
212
|
+
authorization: {
|
|
213
|
+
handoff_token: 'tok',
|
|
214
|
+
provider: 'linear',
|
|
215
|
+
title: 'Connect Linear',
|
|
216
|
+
type: 'oauth',
|
|
217
|
+
url: 'https://router.example.com/launch/abc',
|
|
218
|
+
},
|
|
219
|
+
id: 'call_3',
|
|
220
|
+
name: 'linear_list_issues',
|
|
221
|
+
status: 'awaiting_authorization',
|
|
222
|
+
target_user_id: 'alex',
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
describe('createAuthSessionAuthorizer', () => {
|
|
226
|
+
beforeEach(() => jest.clearAllMocks());
|
|
227
|
+
|
|
228
|
+
it('puts the handoff token in the launch page’s fragment, encoded', () => {
|
|
229
|
+
expect(signInLaunchUrl({ ...signIn.authorization!, handoffToken: 'a+b&c=d/e' })).toBe(
|
|
230
|
+
'https://router.example.com/launch/abc#handoff_token=a%2Bb%26c%3Dd%2Fe',
|
|
231
|
+
);
|
|
232
|
+
expect(signInLaunchUrl({ ...signIn.authorization!, handoffToken: undefined })).toBe(
|
|
233
|
+
'https://router.example.com/launch/abc',
|
|
234
|
+
);
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
it('opens the sign-in for the app’s scheme, and reads how it ended', async () => {
|
|
238
|
+
const decline = jest.fn(() => Promise.resolve());
|
|
239
|
+
const authorizer = createAuthSessionAuthorizer({ callbackScheme: 'myapp', decline });
|
|
240
|
+
|
|
241
|
+
native.openAuthSession.mockResolvedValueOnce(
|
|
242
|
+
'myapp://signed-in?connection_id=c1&status=connected',
|
|
243
|
+
);
|
|
244
|
+
await expect(authorizer.connect(signIn)).resolves.toBe(true);
|
|
245
|
+
expect(native.openAuthSession).toHaveBeenCalledWith(
|
|
246
|
+
'https://router.example.com/launch/abc#handoff_token=tok',
|
|
247
|
+
'myapp',
|
|
248
|
+
);
|
|
249
|
+
|
|
250
|
+
native.openAuthSession.mockResolvedValueOnce(
|
|
251
|
+
'myapp://signed-in?connection_id=c1&status=denied',
|
|
252
|
+
);
|
|
253
|
+
await expect(authorizer.connect(signIn)).resolves.toBe(false);
|
|
254
|
+
|
|
255
|
+
// The person closed the sheet: the sign-in can't be opened again.
|
|
256
|
+
native.openAuthSession.mockResolvedValueOnce('');
|
|
257
|
+
await expect(authorizer.connect(signIn)).resolves.toBe('closed');
|
|
258
|
+
|
|
259
|
+
await authorizer.decline(signIn);
|
|
260
|
+
expect(decline).toHaveBeenCalledWith(signIn);
|
|
261
|
+
});
|
|
262
|
+
|
|
263
|
+
it('takes the app’s scheme written as the start of a URL', async () => {
|
|
264
|
+
for (const written of ['myapp://', 'myapp:', ' myapp:/ ']) {
|
|
265
|
+
const authorizer = createAuthSessionAuthorizer({
|
|
266
|
+
callbackScheme: written,
|
|
267
|
+
decline: jest.fn(),
|
|
268
|
+
});
|
|
269
|
+
expect(authorizer.callbackScheme).toBe('myapp');
|
|
270
|
+
native.openAuthSession.mockResolvedValueOnce('');
|
|
271
|
+
await authorizer.connect(signIn);
|
|
272
|
+
expect(native.openAuthSession).toHaveBeenLastCalledWith(expect.any(String), 'myapp');
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
it('lets a closed sign-in be tried again with declineOnClose off', async () => {
|
|
277
|
+
const authorizer = createAuthSessionAuthorizer({
|
|
278
|
+
callbackScheme: 'myapp',
|
|
279
|
+
decline: jest.fn(),
|
|
280
|
+
declineOnClose: false,
|
|
281
|
+
});
|
|
282
|
+
native.openAuthSession.mockResolvedValueOnce('');
|
|
283
|
+
await expect(authorizer.connect(signIn)).resolves.toBe(false);
|
|
284
|
+
});
|
|
285
|
+
|
|
286
|
+
it('rejects when the sign-in could not be opened', async () => {
|
|
287
|
+
const authorizer = createAuthSessionAuthorizer({ callbackScheme: 'myapp', decline: jest.fn() });
|
|
288
|
+
|
|
289
|
+
native.openAuthSession.mockRejectedValueOnce(new Error('No browser'));
|
|
290
|
+
await expect(authorizer.connect(signIn)).rejects.toMatchObject({
|
|
291
|
+
message: 'No browser',
|
|
292
|
+
reason: 'failed',
|
|
293
|
+
});
|
|
294
|
+
await expect(authorizer.connect({ ...signIn, authorization: undefined })).rejects.toMatchObject(
|
|
295
|
+
{ reason: 'unavailable' },
|
|
296
|
+
);
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
it('reads only an outcome the router sends', () => {
|
|
300
|
+
expect(readConnectorSignInResult('myapp://x?status=connected&connection_id=conn-1')).toEqual({
|
|
301
|
+
connectionId: 'conn-1',
|
|
302
|
+
status: 'connected',
|
|
303
|
+
});
|
|
304
|
+
expect(readConnectorSignInResult('myapp://x?status=maybe&connection_id=conn-1')).toBeNull();
|
|
305
|
+
expect(readConnectorSignInResult('myapp://x?status=connected')).toBeNull();
|
|
306
|
+
expect(readConnectorSignInResult('myapp://x')).toBeNull();
|
|
307
|
+
});
|
|
308
|
+
});
|
|
309
|
+
|
|
310
|
+
describe('AIClientIdentity', () => {
|
|
311
|
+
it('is the install id the native module keeps', () => {
|
|
312
|
+
native.installId.mockReturnValue('ios-ABC');
|
|
313
|
+
expect(AIClientIdentity.installId()).toBe('ios-ABC');
|
|
314
|
+
});
|
|
315
|
+
|
|
316
|
+
it('lives in memory, unchanged, when the native module has none', () => {
|
|
317
|
+
native.installId.mockImplementation(() => {
|
|
318
|
+
throw new Error('not linked');
|
|
319
|
+
});
|
|
320
|
+
const first = AIClientIdentity.installId();
|
|
321
|
+
expect(first).toMatch(/^(ios|android)-[0-9a-f]{32}$/);
|
|
322
|
+
expect(AIClientIdentity.installId()).toBe(first);
|
|
323
|
+
});
|
|
324
|
+
});
|
|
@@ -38,4 +38,22 @@ describe('ai-components theme', () => {
|
|
|
38
38
|
});
|
|
39
39
|
expect(preMerged.current.theme).toBe(mergedStyle);
|
|
40
40
|
});
|
|
41
|
+
it('draws the conversation’s parts in the app’s palette when it changes it, as for dark mode', () => {
|
|
42
|
+
const dark = mergeThemes({
|
|
43
|
+
style: {
|
|
44
|
+
colors: { black: '#FFFFFF', grey_whisper: '#27272F', white: '#050509' },
|
|
45
|
+
suggestions: { text: '#FF0000' },
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
expect(dark.message?.userMessageBackground).toBe('#27272F');
|
|
49
|
+
expect(dark.message?.userMessageText).toBe('#FFFFFF');
|
|
50
|
+
expect(dark.conversation?.scrollButtonBackground).toBe('#050509');
|
|
51
|
+
// A part the style sets keeps its own; one drawn in a color it left alone keeps the design's.
|
|
52
|
+
expect(dark.suggestions?.text).toBe('#FF0000');
|
|
53
|
+
expect(dark.chatOptions?.chipText).toBe(defaultTheme.chatOptions?.chipText);
|
|
54
|
+
// Without palette changes, the design's own colors stay.
|
|
55
|
+
expect(mergeThemes({ style: { conversation: {} } }).message?.userMessageBackground).toBe(
|
|
56
|
+
defaultTheme.message?.userMessageBackground,
|
|
57
|
+
);
|
|
58
|
+
});
|
|
41
59
|
});
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import React, { type PropsWithChildren } from 'react';
|
|
2
|
+
|
|
3
|
+
import { renderHook } from '@testing-library/react-native';
|
|
4
|
+
import type { TFunction } from 'i18next';
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
TranslationProvider as ChatTranslationProvider,
|
|
8
|
+
type TranslationContextValue,
|
|
9
|
+
} from '../../contexts/translationContext';
|
|
10
|
+
import { Streami18n } from '../../utils/i18n/Streami18n';
|
|
11
|
+
import {
|
|
12
|
+
type AITranslate,
|
|
13
|
+
defaultAITranslate,
|
|
14
|
+
interpolateAIString,
|
|
15
|
+
TranslationProvider,
|
|
16
|
+
useAITranslation,
|
|
17
|
+
} from '../contexts';
|
|
18
|
+
|
|
19
|
+
const withValue =
|
|
20
|
+
(value: TranslationContextValue) =>
|
|
21
|
+
({ children }: PropsWithChildren) => (
|
|
22
|
+
<ChatTranslationProvider value={value}>{children}</ChatTranslationProvider>
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
describe('AI translation', () => {
|
|
26
|
+
it('fills placeholders and leaves unknown ones', () => {
|
|
27
|
+
expect(interpolateAIString('Thought for {{ duration }}', { duration: '12s' })).toBe(
|
|
28
|
+
'Thought for 12s',
|
|
29
|
+
);
|
|
30
|
+
expect(interpolateAIString('Connected to {{provider}}', { provider: 'Linear' })).toBe(
|
|
31
|
+
'Connected to Linear',
|
|
32
|
+
);
|
|
33
|
+
expect(interpolateAIString('Thought for {{ duration }}', {})).toBe(
|
|
34
|
+
'Thought for {{ duration }}',
|
|
35
|
+
);
|
|
36
|
+
expect(interpolateAIString('Thinking...')).toBe('Thinking...');
|
|
37
|
+
expect(interpolateAIString('{{ count }} files', { count: 0 })).toBe('0 files');
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
it('is English without <Chat>', () => {
|
|
41
|
+
const { result } = renderHook(() => useAITranslation());
|
|
42
|
+
expect(result.current.t).toBe(defaultAITranslate);
|
|
43
|
+
expect(result.current.t('Thinking... {{ duration }}', { duration: '4s' })).toBe(
|
|
44
|
+
'Thinking... 4s',
|
|
45
|
+
);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it('follows the chat SDK translator, as inside <Chat>', async () => {
|
|
49
|
+
const i18n = new Streami18n({ language: 'fr' });
|
|
50
|
+
// `registerTranslation` only takes keys in `en.json`; the AI keys join it with the views.
|
|
51
|
+
i18n.registerTranslation('fr', {
|
|
52
|
+
'Thought for {{ duration }}': 'Réfléchi pendant {{ duration }}',
|
|
53
|
+
} as Parameters<typeof i18n.registerTranslation>[1]);
|
|
54
|
+
const translators = (await i18n.getTranslators()) as unknown as TranslationContextValue;
|
|
55
|
+
|
|
56
|
+
const { result } = renderHook(() => useAITranslation(), {
|
|
57
|
+
wrapper: withValue({ ...translators, userLanguage: 'fr' }),
|
|
58
|
+
});
|
|
59
|
+
expect(result.current.t('Thought for {{ duration }}', { duration: '12s' })).toBe(
|
|
60
|
+
'Réfléchi pendant 12s',
|
|
61
|
+
);
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
it('is the same provider as the chat SDK, for apps without <Chat>', () => {
|
|
65
|
+
expect(TranslationProvider).toBe(ChatTranslationProvider);
|
|
66
|
+
const t = ((key: string) => `[es] ${key}`) as unknown as TFunction;
|
|
67
|
+
const { result } = renderHook(() => useAITranslation(), {
|
|
68
|
+
wrapper: ({ children }: PropsWithChildren) => (
|
|
69
|
+
<TranslationProvider
|
|
70
|
+
value={{ t, tDateTimeParser: (input) => input ?? 0, userLanguage: 'es' }}
|
|
71
|
+
>
|
|
72
|
+
{children}
|
|
73
|
+
</TranslationProvider>
|
|
74
|
+
),
|
|
75
|
+
});
|
|
76
|
+
expect(result.current.t('Allow')).toBe('[es] Allow');
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
it('takes the chat SDK translator as it is', () => {
|
|
80
|
+
// A compile-time check: core's `t` (i18next's TFunction) must be assignable without a cast.
|
|
81
|
+
const coreT = ((key: string) => key) as unknown as TFunction;
|
|
82
|
+
const t: AITranslate = coreT;
|
|
83
|
+
expect(t('Allow')).toBe('Allow');
|
|
84
|
+
});
|
|
85
|
+
});
|
|
@@ -21,9 +21,6 @@ import {
|
|
|
21
21
|
} from '../voice-visualization/driver';
|
|
22
22
|
import type { Hsv, VoiceAgentState } from '../voice-visualization/types';
|
|
23
23
|
|
|
24
|
-
// Ported from stream-chat-android's VoiceVisualizationDriverTest and VoiceVisualizationBounceTest,
|
|
25
|
-
// so the platforms keep moving alike.
|
|
26
|
-
|
|
27
24
|
const blue: Hsv = { hue: 218 / 360, saturation: 1, value: 1 };
|
|
28
25
|
const red: Hsv = { hue: 0, saturation: 1, value: 1 };
|
|
29
26
|
const FRAME = 1 / 60;
|
|
@@ -84,7 +84,7 @@ describe('voice visualization inputs', () => {
|
|
|
84
84
|
|
|
85
85
|
describe('voice visualization noise', () => {
|
|
86
86
|
it('matches the shader’s simplex noise as a GPU computes it', () => {
|
|
87
|
-
// Read back from the shader's own snoise on a GPU
|
|
87
|
+
// Read back from the shader's own snoise on a GPU.
|
|
88
88
|
const gpu: Array<[number, number, number, number]> = [
|
|
89
89
|
[0.3, 21, 0, 0.7696],
|
|
90
90
|
[1.7, 5, 0, 0.208],
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Keyboard, Text } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { act, fireEvent, render, screen } from '@testing-library/react-native';
|
|
5
|
+
|
|
6
|
+
import { ComposerView, sheetStore, sheetStoreApi, StreamTheme } from '../index';
|
|
7
|
+
import { dismissKeyboard, KeyboardStickyView, keyboardHeight } from '../internal/keyboard';
|
|
8
|
+
|
|
9
|
+
jest.mock('react-native-keyboard-controller', () => {
|
|
10
|
+
throw new Error("Cannot find module 'react-native-keyboard-controller'");
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const flushPromises = () => new Promise<void>((resolve) => setTimeout(resolve, 0));
|
|
14
|
+
|
|
15
|
+
describe('without react-native-keyboard-controller', () => {
|
|
16
|
+
afterEach(() => {
|
|
17
|
+
act(() => {
|
|
18
|
+
sheetStoreApi.closeSheet();
|
|
19
|
+
});
|
|
20
|
+
jest.restoreAllMocks();
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it('lays the sticky view out as a plain view', () => {
|
|
24
|
+
render(
|
|
25
|
+
<KeyboardStickyView offset={{ closed: 0, opened: 34 }} testID='sticky'>
|
|
26
|
+
<Text>inside</Text>
|
|
27
|
+
</KeyboardStickyView>,
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
const sticky = screen.getByTestId('sticky');
|
|
31
|
+
expect(sticky.type).toBe('View');
|
|
32
|
+
expect(sticky.props.offset).toBeUndefined();
|
|
33
|
+
expect(screen.getByText('inside')).toBeTruthy();
|
|
34
|
+
expect(keyboardHeight()).toBe(0);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it('closes the keyboard with React Native', async () => {
|
|
38
|
+
const dismiss = jest.spyOn(Keyboard, 'dismiss');
|
|
39
|
+
|
|
40
|
+
await expect(dismissKeyboard()).resolves.toBeUndefined();
|
|
41
|
+
expect(dismiss).toHaveBeenCalled();
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
it('renders the composer and opens its sheet', async () => {
|
|
45
|
+
const dismiss = jest.spyOn(Keyboard, 'dismiss');
|
|
46
|
+
render(
|
|
47
|
+
<StreamTheme>
|
|
48
|
+
<ComposerView onSendMessage={() => Promise.resolve()} />
|
|
49
|
+
</StreamTheme>,
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
await act(async () => {
|
|
53
|
+
fireEvent.press(screen.getByText('+'));
|
|
54
|
+
await flushPromises();
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
expect(dismiss).toHaveBeenCalled();
|
|
58
|
+
expect(sheetStore.getLatestValue().open).toBe(true);
|
|
59
|
+
});
|
|
60
|
+
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StyleSheet, Text, View } from 'react-native';
|
|
3
3
|
|
|
4
|
+
import { primitives } from '../../internal/tokens';
|
|
4
5
|
import type { Datum } from '../types';
|
|
5
6
|
|
|
6
7
|
export const PieLegend = ({ items, maxRows = 3 }: { items: Datum[]; maxRows?: number }) => {
|
|
@@ -45,6 +46,6 @@ const styles = StyleSheet.create({
|
|
|
45
46
|
height: 12,
|
|
46
47
|
},
|
|
47
48
|
label: {
|
|
48
|
-
fontSize:
|
|
49
|
+
fontSize: primitives.typographyFontSizeXs,
|
|
49
50
|
},
|
|
50
51
|
});
|
|
@@ -15,7 +15,9 @@ import {
|
|
|
15
15
|
|
|
16
16
|
import { PieLegend } from './PieLegend';
|
|
17
17
|
|
|
18
|
+
import { primitives } from '../../internal/tokens';
|
|
18
19
|
import type { ChartSpec } from '../types';
|
|
20
|
+
import { formatTimeLabel } from '../utils/format-time-label';
|
|
19
21
|
|
|
20
22
|
const font = matchFont({
|
|
21
23
|
fontFamily: Platform.select({
|
|
@@ -23,7 +25,7 @@ const font = matchFont({
|
|
|
23
25
|
android: 'sans-serif',
|
|
24
26
|
default: 'serif',
|
|
25
27
|
}),
|
|
26
|
-
fontSize:
|
|
28
|
+
fontSize: primitives.typographyFontSizeXxs,
|
|
27
29
|
fontWeight: 'normal',
|
|
28
30
|
fontStyle: 'normal',
|
|
29
31
|
});
|
|
@@ -96,8 +98,13 @@ export const VictoryChart = (props: VictoryChartProps) => {
|
|
|
96
98
|
),
|
|
97
99
|
);
|
|
98
100
|
|
|
101
|
+
// A time axis is labelled short (`29 Oct`, `13:45`), so it is never turned on its side.
|
|
99
102
|
const hasLongLabels =
|
|
100
|
-
(visibleBars > 4 ? maxTickCharCount > 1 : maxTickCharCount > 5) &&
|
|
103
|
+
(visibleBars > 4 ? maxTickCharCount > 1 : maxTickCharCount > 5) &&
|
|
104
|
+
!spec.isNumericDim &&
|
|
105
|
+
!spec.isTemporalDim;
|
|
106
|
+
const times = spec.isTemporalDim ? table.map((entry) => new Date(entry.x).getTime()) : [];
|
|
107
|
+
const timeSpan = times.length > 1 ? Math.max(...times) - Math.min(...times) : 0;
|
|
101
108
|
|
|
102
109
|
const lowestValue = minY < 0 ? minY - 20 : 0;
|
|
103
110
|
|
|
@@ -116,6 +123,7 @@ export const VictoryChart = (props: VictoryChartProps) => {
|
|
|
116
123
|
xAxis={{
|
|
117
124
|
font,
|
|
118
125
|
formatXLabel: (label: number | string) => {
|
|
126
|
+
if (spec.isTemporalDim) return formatTimeLabel(label, timeSpan);
|
|
119
127
|
const parsedLabel = (typeof label === 'number' ? String(label) : label) ?? '';
|
|
120
128
|
if (hasLongLabels && parsedLabel.length > 4) {
|
|
121
129
|
return `${parsedLabel.slice(0, 3)}...`;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const MONTHS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
2
|
+
|
|
3
|
+
const DAY_MS = 24 * 60 * 60 * 1000;
|
|
4
|
+
|
|
5
|
+
const twoDigits = (value: number) => String(value).padStart(2, '0');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* A short label for a point on a time axis: the time of day when the chart spans a day or less,
|
|
9
|
+
* such as `13:45`, and otherwise the day and month, such as `29 Oct`. A date written out in full
|
|
10
|
+
* doesn't fit under a point. Anything that isn't a date is labelled as it is.
|
|
11
|
+
*/
|
|
12
|
+
export const formatTimeLabel = (value: unknown, spanMs: number): string => {
|
|
13
|
+
const date =
|
|
14
|
+
value instanceof Date ? value : typeof value === 'number' ? new Date(value) : undefined;
|
|
15
|
+
if (!date || Number.isNaN(date.getTime())) return String(value ?? '');
|
|
16
|
+
if (spanMs <= DAY_MS) return `${twoDigits(date.getHours())}:${twoDigits(date.getMinutes())}`;
|
|
17
|
+
return `${date.getDate()} ${MONTHS[date.getMonth()]}`;
|
|
18
|
+
};
|
|
@@ -56,7 +56,7 @@ const BaseVL = z.object({
|
|
|
56
56
|
values: z.array(z.record(z.string(), z.unknown())),
|
|
57
57
|
}),
|
|
58
58
|
mark: z.union([MarkName, MarkDef, z.string()]).optional(),
|
|
59
|
-
layer: z.array(z.looseObject({ mark: MarkDef })).optional(),
|
|
59
|
+
layer: z.array(z.looseObject({ mark: z.union([MarkDef, z.string()]) })).optional(),
|
|
60
60
|
marks: z.array(MarkDef).optional(),
|
|
61
61
|
markName: MarkName,
|
|
62
62
|
});
|
|
@@ -95,12 +95,29 @@ const deriveMarkName = (o: any): string | undefined => {
|
|
|
95
95
|
return Array.isArray(o?.marks) && o.marks.length > 0 ? normalizeMarkName(o.marks[0]) : undefined;
|
|
96
96
|
};
|
|
97
97
|
|
|
98
|
+
const DRAWN_MARKS = new Set<string>(MarkName.options);
|
|
99
|
+
|
|
100
|
+
// A layered chart keeps its encoding, and often its data, in its layers: it is drawn as the first
|
|
101
|
+
// layer that draws data the way this renders, with the chart's data when the layer has none.
|
|
102
|
+
// Other layers, such as a rule marking a threshold or text labels, are left out.
|
|
103
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- untyped JSON input, validated by the zod schema below
|
|
104
|
+
const withPrimaryLayer = (o: any) => {
|
|
105
|
+
if (o?.encoding || !Array.isArray(o?.layer)) return o;
|
|
106
|
+
const layer = o.layer.find(
|
|
107
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- an untyped layer of the input
|
|
108
|
+
(each: any) => each?.encoding && DRAWN_MARKS.has(normalizeMarkName(each.mark) ?? ''),
|
|
109
|
+
);
|
|
110
|
+
return layer
|
|
111
|
+
? { ...o, data: layer.data ?? o.data, encoding: layer.encoding, mark: layer.mark }
|
|
112
|
+
: o;
|
|
113
|
+
};
|
|
114
|
+
|
|
98
115
|
export const VegaLiteCore = z.discriminatedUnion('type', [VL_XY, VL_PIE]);
|
|
99
116
|
|
|
100
117
|
/* final schema: preprocess to inject needed metadata, then discriminated union */
|
|
101
118
|
export const VegaLiteSchema = z.preprocess((raw) => {
|
|
102
119
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- untyped JSON input, validated by the zod schema below
|
|
103
|
-
const o: any = raw ?? {};
|
|
120
|
+
const o: any = withPrimaryLayer(raw ?? {});
|
|
104
121
|
const markName = deriveMarkName(o);
|
|
105
122
|
const hasTheta = !!o?.encoding?.theta;
|
|
106
123
|
|