stream-chat-react-native-core 9.9.4 → 9.10.0-beta.1
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/ai-components/package.json +6 -0
- package/lib/commonjs/ai-components/AITypingIndicatorView.js +49 -0
- package/lib/commonjs/ai-components/AITypingIndicatorView.js.map +1 -0
- package/lib/commonjs/ai-components/README.md +279 -0
- package/lib/commonjs/ai-components/StreamingMessageView.js +75 -0
- package/lib/commonjs/ai-components/StreamingMessageView.js.map +1 -0
- package/lib/commonjs/ai-components/charts/Chart.js +25 -0
- package/lib/commonjs/ai-components/charts/Chart.js.map +1 -0
- package/lib/commonjs/ai-components/charts/components/PieLegend.js +54 -0
- package/lib/commonjs/ai-components/charts/components/PieLegend.js.map +1 -0
- package/lib/commonjs/ai-components/charts/components/VictoryChart.js +183 -0
- package/lib/commonjs/ai-components/charts/components/VictoryChart.js.map +1 -0
- package/lib/commonjs/ai-components/charts/components/index.js +26 -0
- package/lib/commonjs/ai-components/charts/components/index.js.map +1 -0
- package/lib/commonjs/ai-components/charts/index.js +70 -0
- package/lib/commonjs/ai-components/charts/index.js.map +1 -0
- package/lib/commonjs/ai-components/charts/mermaid/index.js +15 -0
- package/lib/commonjs/ai-components/charts/mermaid/index.js.map +1 -0
- package/lib/commonjs/ai-components/charts/mermaid/parser.js +45 -0
- package/lib/commonjs/ai-components/charts/mermaid/parser.js.map +1 -0
- package/lib/commonjs/ai-components/charts/types.js +2 -0
- package/lib/commonjs/ai-components/charts/types.js.map +1 -0
- package/lib/commonjs/ai-components/charts/utils/generate-pie-colors.js +68 -0
- package/lib/commonjs/ai-components/charts/utils/generate-pie-colors.js.map +1 -0
- package/lib/commonjs/ai-components/charts/utils/index.js +26 -0
- package/lib/commonjs/ai-components/charts/utils/index.js.map +1 -0
- package/lib/commonjs/ai-components/charts/utils/parse-json-chart.js +15 -0
- package/lib/commonjs/ai-components/charts/utils/parse-json-chart.js.map +1 -0
- package/lib/commonjs/ai-components/charts/vega-lite/index.js +26 -0
- package/lib/commonjs/ai-components/charts/vega-lite/index.js.map +1 -0
- package/lib/commonjs/ai-components/charts/vega-lite/parser.js +54 -0
- package/lib/commonjs/ai-components/charts/vega-lite/parser.js.map +1 -0
- package/lib/commonjs/ai-components/charts/vega-lite/schema.js +82 -0
- package/lib/commonjs/ai-components/charts/vega-lite/schema.js.map +1 -0
- package/lib/commonjs/ai-components/components/BottomSheet.js +182 -0
- package/lib/commonjs/ai-components/components/BottomSheet.js.map +1 -0
- package/lib/commonjs/ai-components/components/MarkdownReactiveScrollView.js +81 -0
- package/lib/commonjs/ai-components/components/MarkdownReactiveScrollView.js.map +1 -0
- package/lib/commonjs/ai-components/components/index.js +26 -0
- package/lib/commonjs/ai-components/components/index.js.map +1 -0
- package/lib/commonjs/ai-components/contexts/composer-context.js +68 -0
- package/lib/commonjs/ai-components/contexts/composer-context.js.map +1 -0
- package/lib/commonjs/ai-components/contexts/index.js +26 -0
- package/lib/commonjs/ai-components/contexts/index.js.map +1 -0
- package/lib/commonjs/ai-components/contexts/theme-context.js +53 -0
- package/lib/commonjs/ai-components/contexts/theme-context.js.map +1 -0
- package/lib/commonjs/ai-components/index.js +166 -0
- package/lib/commonjs/ai-components/index.js.map +1 -0
- package/lib/commonjs/ai-components/internal/hooks/useStableCallback.js +14 -0
- package/lib/commonjs/ai-components/internal/hooks/useStableCallback.js.map +1 -0
- package/lib/commonjs/ai-components/internal/icons/Camera.js +18 -0
- package/lib/commonjs/ai-components/internal/icons/Camera.js.map +1 -0
- package/lib/commonjs/ai-components/internal/icons/CircleStop.js +24 -0
- package/lib/commonjs/ai-components/internal/icons/CircleStop.js.map +1 -0
- package/lib/commonjs/ai-components/internal/icons/Close.js +18 -0
- package/lib/commonjs/ai-components/internal/icons/Close.js.map +1 -0
- package/lib/commonjs/ai-components/internal/icons/Mic.js +27 -0
- package/lib/commonjs/ai-components/internal/icons/Mic.js.map +1 -0
- package/lib/commonjs/ai-components/internal/icons/Picture.js +21 -0
- package/lib/commonjs/ai-components/internal/icons/Picture.js.map +1 -0
- package/lib/commonjs/ai-components/internal/icons/SendUp.js +28 -0
- package/lib/commonjs/ai-components/internal/icons/SendUp.js.map +1 -0
- package/lib/commonjs/ai-components/internal/icons/utils/base.js +42 -0
- package/lib/commonjs/ai-components/internal/icons/utils/base.js.map +1 -0
- package/lib/commonjs/ai-components/markdown/components/Autolink.js +37 -0
- package/lib/commonjs/ai-components/markdown/components/Autolink.js.map +1 -0
- package/lib/commonjs/ai-components/markdown/components/BlockQuote.js +37 -0
- package/lib/commonjs/ai-components/markdown/components/BlockQuote.js.map +1 -0
- package/lib/commonjs/ai-components/markdown/components/Bold.js +32 -0
- package/lib/commonjs/ai-components/markdown/components/Bold.js.map +1 -0
- package/lib/commonjs/ai-components/markdown/components/CodeBlock.js +114 -0
- package/lib/commonjs/ai-components/markdown/components/CodeBlock.js.map +1 -0
- package/lib/commonjs/ai-components/markdown/components/Emphasis.js +32 -0
- package/lib/commonjs/ai-components/markdown/components/Emphasis.js.map +1 -0
- package/lib/commonjs/ai-components/markdown/components/Heading.js +41 -0
- package/lib/commonjs/ai-components/markdown/components/Heading.js.map +1 -0
- package/lib/commonjs/ai-components/markdown/components/HorizontalRule.js +26 -0
- package/lib/commonjs/ai-components/markdown/components/HorizontalRule.js.map +1 -0
- package/lib/commonjs/ai-components/markdown/components/InlineCode.js +32 -0
- package/lib/commonjs/ai-components/markdown/components/InlineCode.js.map +1 -0
- package/lib/commonjs/ai-components/markdown/components/LineBreak.js +27 -0
- package/lib/commonjs/ai-components/markdown/components/LineBreak.js.map +1 -0
- package/lib/commonjs/ai-components/markdown/components/Link.js +41 -0
- package/lib/commonjs/ai-components/markdown/components/Link.js.map +1 -0
- package/lib/commonjs/ai-components/markdown/components/List.js +85 -0
- package/lib/commonjs/ai-components/markdown/components/List.js.map +1 -0
- package/lib/commonjs/ai-components/markdown/components/Mailto.js +37 -0
- package/lib/commonjs/ai-components/markdown/components/Mailto.js.map +1 -0
- package/lib/commonjs/ai-components/markdown/components/Markdown.js +49 -0
- package/lib/commonjs/ai-components/markdown/components/Markdown.js.map +1 -0
- package/lib/commonjs/ai-components/markdown/components/NewLine.js +27 -0
- package/lib/commonjs/ai-components/markdown/components/NewLine.js.map +1 -0
- package/lib/commonjs/ai-components/markdown/components/Paragraph.js +72 -0
- package/lib/commonjs/ai-components/markdown/components/Paragraph.js.map +1 -0
- package/lib/commonjs/ai-components/markdown/components/Strikethrough.js +32 -0
- package/lib/commonjs/ai-components/markdown/components/Strikethrough.js.map +1 -0
- package/lib/commonjs/ai-components/markdown/components/Table.js +105 -0
- package/lib/commonjs/ai-components/markdown/components/Table.js.map +1 -0
- package/lib/commonjs/ai-components/markdown/components/Text.js +45 -0
- package/lib/commonjs/ai-components/markdown/components/Text.js.map +1 -0
- package/lib/commonjs/ai-components/markdown/components/Url.js +37 -0
- package/lib/commonjs/ai-components/markdown/components/Url.js.map +1 -0
- package/lib/commonjs/ai-components/markdown/components/index.js +213 -0
- package/lib/commonjs/ai-components/markdown/components/index.js.map +1 -0
- package/lib/commonjs/ai-components/markdown/index.js +59 -0
- package/lib/commonjs/ai-components/markdown/index.js.map +1 -0
- package/lib/commonjs/ai-components/markdown/rules.js +152 -0
- package/lib/commonjs/ai-components/markdown/rules.js.map +1 -0
- package/lib/commonjs/ai-components/markdown/styles.js +240 -0
- package/lib/commonjs/ai-components/markdown/styles.js.map +1 -0
- package/lib/commonjs/ai-components/markdown/types.js +4 -0
- package/lib/commonjs/ai-components/markdown/types.js.map +1 -0
- package/lib/commonjs/ai-components/markdown/utils/generate-markdown-text.js +73 -0
- package/lib/commonjs/ai-components/markdown/utils/generate-markdown-text.js.map +1 -0
- package/lib/commonjs/ai-components/markdown/utils/index.js +15 -0
- package/lib/commonjs/ai-components/markdown/utils/index.js.map +1 -0
- package/lib/commonjs/ai-components/message-composer/ActionButton.js +104 -0
- package/lib/commonjs/ai-components/message-composer/ActionButton.js.map +1 -0
- package/lib/commonjs/ai-components/message-composer/ActionSheet.js +197 -0
- package/lib/commonjs/ai-components/message-composer/ActionSheet.js.map +1 -0
- package/lib/commonjs/ai-components/message-composer/AttachmentButton.js +55 -0
- package/lib/commonjs/ai-components/message-composer/AttachmentButton.js.map +1 -0
- package/lib/commonjs/ai-components/message-composer/ComposerView.js +151 -0
- package/lib/commonjs/ai-components/message-composer/ComposerView.js.map +1 -0
- package/lib/commonjs/ai-components/message-composer/MediaPreviewList.js +84 -0
- package/lib/commonjs/ai-components/message-composer/MediaPreviewList.js.map +1 -0
- package/lib/commonjs/ai-components/message-composer/SpeechToTextButton.js +82 -0
- package/lib/commonjs/ai-components/message-composer/SpeechToTextButton.js.map +1 -0
- package/lib/commonjs/ai-components/message-composer/index.js +59 -0
- package/lib/commonjs/ai-components/message-composer/index.js.map +1 -0
- package/lib/commonjs/ai-components/message-composer/utils/withCloseSheet.js +16 -0
- package/lib/commonjs/ai-components/message-composer/utils/withCloseSheet.js.map +1 -0
- package/lib/commonjs/ai-components/native/AIDictation.js +60 -0
- package/lib/commonjs/ai-components/native/AIDictation.js.map +1 -0
- package/lib/commonjs/ai-components/native/PerfText.js +31 -0
- package/lib/commonjs/ai-components/native/PerfText.js.map +1 -0
- package/lib/commonjs/ai-components/native-specs/NativeAIDictation.js +7 -0
- package/lib/commonjs/ai-components/native-specs/NativeAIDictation.js.map +1 -0
- package/lib/commonjs/ai-components/services/clipboard-service/expo.js +13 -0
- package/lib/commonjs/ai-components/services/clipboard-service/expo.js.map +1 -0
- package/lib/commonjs/ai-components/services/clipboard-service/index.js +8 -0
- package/lib/commonjs/ai-components/services/clipboard-service/index.js.map +1 -0
- package/lib/commonjs/ai-components/services/clipboard-service/rncli.js +10 -0
- package/lib/commonjs/ai-components/services/clipboard-service/rncli.js.map +1 -0
- package/lib/commonjs/ai-components/services/index.js +26 -0
- package/lib/commonjs/ai-components/services/index.js.map +1 -0
- package/lib/commonjs/ai-components/services/media-picker-service/AbstractMediaPickerService.js +31 -0
- package/lib/commonjs/ai-components/services/media-picker-service/AbstractMediaPickerService.js.map +1 -0
- package/lib/commonjs/ai-components/services/media-picker-service/expo.js +169 -0
- package/lib/commonjs/ai-components/services/media-picker-service/expo.js.map +1 -0
- package/lib/commonjs/ai-components/services/media-picker-service/hooks/useMediaPickerState.js +14 -0
- package/lib/commonjs/ai-components/services/media-picker-service/hooks/useMediaPickerState.js.map +1 -0
- package/lib/commonjs/ai-components/services/media-picker-service/index.js +8 -0
- package/lib/commonjs/ai-components/services/media-picker-service/index.js.map +1 -0
- package/lib/commonjs/ai-components/services/media-picker-service/optional-modules.d.js +2 -0
- package/lib/commonjs/ai-components/services/media-picker-service/optional-modules.d.js.map +1 -0
- package/lib/commonjs/ai-components/services/media-picker-service/rncli.js +162 -0
- package/lib/commonjs/ai-components/services/media-picker-service/rncli.js.map +1 -0
- package/lib/commonjs/ai-components/store/bottom-sheet/store.js +27 -0
- package/lib/commonjs/ai-components/store/bottom-sheet/store.js.map +1 -0
- package/lib/commonjs/ai-components/store/bottom-sheet/useBottomSheetState.js +16 -0
- package/lib/commonjs/ai-components/store/bottom-sheet/useBottomSheetState.js.map +1 -0
- package/lib/commonjs/ai-components/store/composer/store.js +11 -0
- package/lib/commonjs/ai-components/store/composer/store.js.map +1 -0
- package/lib/commonjs/ai-components/store/composer/useComposerHasText.js +18 -0
- package/lib/commonjs/ai-components/store/composer/useComposerHasText.js.map +1 -0
- package/lib/commonjs/ai-components/store/composer/useComposerText.js +18 -0
- package/lib/commonjs/ai-components/store/composer/useComposerText.js.map +1 -0
- package/lib/commonjs/ai-components/store/dictation/store.js +17 -0
- package/lib/commonjs/ai-components/store/dictation/store.js.map +1 -0
- package/lib/commonjs/ai-components/store/dictation/useDictationState.js +18 -0
- package/lib/commonjs/ai-components/store/dictation/useDictationState.js.map +1 -0
- package/lib/commonjs/ai-components/store/dictation/useDictationTranscript.js +14 -0
- package/lib/commonjs/ai-components/store/dictation/useDictationTranscript.js.map +1 -0
- package/lib/commonjs/ai-components/store/index.js +70 -0
- package/lib/commonjs/ai-components/store/index.js.map +1 -0
- package/lib/commonjs/ai-components/syntax-highlighting/SyntaxHighlighter.js +51 -0
- package/lib/commonjs/ai-components/syntax-highlighting/SyntaxHighlighter.js.map +1 -0
- package/lib/commonjs/ai-components/syntax-highlighting/components/AndroidNativeRenderer.js +35 -0
- package/lib/commonjs/ai-components/syntax-highlighting/components/AndroidNativeRenderer.js.map +1 -0
- package/lib/commonjs/ai-components/syntax-highlighting/components/index.js +15 -0
- package/lib/commonjs/ai-components/syntax-highlighting/components/index.js.map +1 -0
- package/lib/commonjs/ai-components/syntax-highlighting/index.js +48 -0
- package/lib/commonjs/ai-components/syntax-highlighting/index.js.map +1 -0
- package/lib/commonjs/ai-components/syntax-highlighting/prism-config.js +7 -0
- package/lib/commonjs/ai-components/syntax-highlighting/prism-config.js.map +1 -0
- package/lib/commonjs/ai-components/syntax-highlighting/types.js +4 -0
- package/lib/commonjs/ai-components/syntax-highlighting/types.js.map +1 -0
- package/lib/commonjs/ai-components/syntax-highlighting/utils/converter.js +107 -0
- package/lib/commonjs/ai-components/syntax-highlighting/utils/converter.js.map +1 -0
- package/lib/commonjs/ai-components/syntax-highlighting/utils/flatten-nodes.js +139 -0
- package/lib/commonjs/ai-components/syntax-highlighting/utils/flatten-nodes.js.map +1 -0
- package/lib/commonjs/ai-components/syntax-highlighting/utils/index.js +37 -0
- package/lib/commonjs/ai-components/syntax-highlighting/utils/index.js.map +1 -0
- package/lib/commonjs/ai-components/syntax-highlighting/utils/renderer.js +117 -0
- package/lib/commonjs/ai-components/syntax-highlighting/utils/renderer.js.map +1 -0
- package/lib/commonjs/ai-components/theme.js +99 -0
- package/lib/commonjs/ai-components/theme.js.map +1 -0
- package/lib/commonjs/ai-components/transcription/useDictation.js +114 -0
- package/lib/commonjs/ai-components/transcription/useDictation.js.map +1 -0
- package/lib/commonjs/native.js +4 -0
- package/lib/commonjs/native.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/ai-components/AITypingIndicatorView.js +49 -0
- package/lib/module/ai-components/AITypingIndicatorView.js.map +1 -0
- package/lib/module/ai-components/README.md +279 -0
- package/lib/module/ai-components/StreamingMessageView.js +75 -0
- package/lib/module/ai-components/StreamingMessageView.js.map +1 -0
- package/lib/module/ai-components/charts/Chart.js +25 -0
- package/lib/module/ai-components/charts/Chart.js.map +1 -0
- package/lib/module/ai-components/charts/components/PieLegend.js +54 -0
- package/lib/module/ai-components/charts/components/PieLegend.js.map +1 -0
- package/lib/module/ai-components/charts/components/VictoryChart.js +183 -0
- package/lib/module/ai-components/charts/components/VictoryChart.js.map +1 -0
- package/lib/module/ai-components/charts/components/index.js +26 -0
- package/lib/module/ai-components/charts/components/index.js.map +1 -0
- package/lib/module/ai-components/charts/index.js +70 -0
- package/lib/module/ai-components/charts/index.js.map +1 -0
- package/lib/module/ai-components/charts/mermaid/index.js +15 -0
- package/lib/module/ai-components/charts/mermaid/index.js.map +1 -0
- package/lib/module/ai-components/charts/mermaid/parser.js +45 -0
- package/lib/module/ai-components/charts/mermaid/parser.js.map +1 -0
- package/lib/module/ai-components/charts/types.js +2 -0
- package/lib/module/ai-components/charts/types.js.map +1 -0
- package/lib/module/ai-components/charts/utils/generate-pie-colors.js +68 -0
- package/lib/module/ai-components/charts/utils/generate-pie-colors.js.map +1 -0
- package/lib/module/ai-components/charts/utils/index.js +26 -0
- package/lib/module/ai-components/charts/utils/index.js.map +1 -0
- package/lib/module/ai-components/charts/utils/parse-json-chart.js +15 -0
- package/lib/module/ai-components/charts/utils/parse-json-chart.js.map +1 -0
- package/lib/module/ai-components/charts/vega-lite/index.js +26 -0
- package/lib/module/ai-components/charts/vega-lite/index.js.map +1 -0
- package/lib/module/ai-components/charts/vega-lite/parser.js +54 -0
- package/lib/module/ai-components/charts/vega-lite/parser.js.map +1 -0
- package/lib/module/ai-components/charts/vega-lite/schema.js +82 -0
- package/lib/module/ai-components/charts/vega-lite/schema.js.map +1 -0
- package/lib/module/ai-components/components/BottomSheet.js +182 -0
- package/lib/module/ai-components/components/BottomSheet.js.map +1 -0
- package/lib/module/ai-components/components/MarkdownReactiveScrollView.js +81 -0
- package/lib/module/ai-components/components/MarkdownReactiveScrollView.js.map +1 -0
- package/lib/module/ai-components/components/index.js +26 -0
- package/lib/module/ai-components/components/index.js.map +1 -0
- package/lib/module/ai-components/contexts/composer-context.js +68 -0
- package/lib/module/ai-components/contexts/composer-context.js.map +1 -0
- package/lib/module/ai-components/contexts/index.js +26 -0
- package/lib/module/ai-components/contexts/index.js.map +1 -0
- package/lib/module/ai-components/contexts/theme-context.js +53 -0
- package/lib/module/ai-components/contexts/theme-context.js.map +1 -0
- package/lib/module/ai-components/index.js +166 -0
- package/lib/module/ai-components/index.js.map +1 -0
- package/lib/module/ai-components/internal/hooks/useStableCallback.js +14 -0
- package/lib/module/ai-components/internal/hooks/useStableCallback.js.map +1 -0
- package/lib/module/ai-components/internal/icons/Camera.js +18 -0
- package/lib/module/ai-components/internal/icons/Camera.js.map +1 -0
- package/lib/module/ai-components/internal/icons/CircleStop.js +24 -0
- package/lib/module/ai-components/internal/icons/CircleStop.js.map +1 -0
- package/lib/module/ai-components/internal/icons/Close.js +18 -0
- package/lib/module/ai-components/internal/icons/Close.js.map +1 -0
- package/lib/module/ai-components/internal/icons/Mic.js +27 -0
- package/lib/module/ai-components/internal/icons/Mic.js.map +1 -0
- package/lib/module/ai-components/internal/icons/Picture.js +21 -0
- package/lib/module/ai-components/internal/icons/Picture.js.map +1 -0
- package/lib/module/ai-components/internal/icons/SendUp.js +28 -0
- package/lib/module/ai-components/internal/icons/SendUp.js.map +1 -0
- package/lib/module/ai-components/internal/icons/utils/base.js +42 -0
- package/lib/module/ai-components/internal/icons/utils/base.js.map +1 -0
- package/lib/module/ai-components/markdown/components/Autolink.js +37 -0
- package/lib/module/ai-components/markdown/components/Autolink.js.map +1 -0
- package/lib/module/ai-components/markdown/components/BlockQuote.js +37 -0
- package/lib/module/ai-components/markdown/components/BlockQuote.js.map +1 -0
- package/lib/module/ai-components/markdown/components/Bold.js +32 -0
- package/lib/module/ai-components/markdown/components/Bold.js.map +1 -0
- package/lib/module/ai-components/markdown/components/CodeBlock.js +114 -0
- package/lib/module/ai-components/markdown/components/CodeBlock.js.map +1 -0
- package/lib/module/ai-components/markdown/components/Emphasis.js +32 -0
- package/lib/module/ai-components/markdown/components/Emphasis.js.map +1 -0
- package/lib/module/ai-components/markdown/components/Heading.js +41 -0
- package/lib/module/ai-components/markdown/components/Heading.js.map +1 -0
- package/lib/module/ai-components/markdown/components/HorizontalRule.js +26 -0
- package/lib/module/ai-components/markdown/components/HorizontalRule.js.map +1 -0
- package/lib/module/ai-components/markdown/components/InlineCode.js +32 -0
- package/lib/module/ai-components/markdown/components/InlineCode.js.map +1 -0
- package/lib/module/ai-components/markdown/components/LineBreak.js +27 -0
- package/lib/module/ai-components/markdown/components/LineBreak.js.map +1 -0
- package/lib/module/ai-components/markdown/components/Link.js +41 -0
- package/lib/module/ai-components/markdown/components/Link.js.map +1 -0
- package/lib/module/ai-components/markdown/components/List.js +85 -0
- package/lib/module/ai-components/markdown/components/List.js.map +1 -0
- package/lib/module/ai-components/markdown/components/Mailto.js +37 -0
- package/lib/module/ai-components/markdown/components/Mailto.js.map +1 -0
- package/lib/module/ai-components/markdown/components/Markdown.js +49 -0
- package/lib/module/ai-components/markdown/components/Markdown.js.map +1 -0
- package/lib/module/ai-components/markdown/components/NewLine.js +27 -0
- package/lib/module/ai-components/markdown/components/NewLine.js.map +1 -0
- package/lib/module/ai-components/markdown/components/Paragraph.js +72 -0
- package/lib/module/ai-components/markdown/components/Paragraph.js.map +1 -0
- package/lib/module/ai-components/markdown/components/Strikethrough.js +32 -0
- package/lib/module/ai-components/markdown/components/Strikethrough.js.map +1 -0
- package/lib/module/ai-components/markdown/components/Table.js +105 -0
- package/lib/module/ai-components/markdown/components/Table.js.map +1 -0
- package/lib/module/ai-components/markdown/components/Text.js +45 -0
- package/lib/module/ai-components/markdown/components/Text.js.map +1 -0
- package/lib/module/ai-components/markdown/components/Url.js +37 -0
- package/lib/module/ai-components/markdown/components/Url.js.map +1 -0
- package/lib/module/ai-components/markdown/components/index.js +213 -0
- package/lib/module/ai-components/markdown/components/index.js.map +1 -0
- package/lib/module/ai-components/markdown/index.js +59 -0
- package/lib/module/ai-components/markdown/index.js.map +1 -0
- package/lib/module/ai-components/markdown/rules.js +152 -0
- package/lib/module/ai-components/markdown/rules.js.map +1 -0
- package/lib/module/ai-components/markdown/styles.js +240 -0
- package/lib/module/ai-components/markdown/styles.js.map +1 -0
- package/lib/module/ai-components/markdown/types.js +4 -0
- package/lib/module/ai-components/markdown/types.js.map +1 -0
- package/lib/module/ai-components/markdown/utils/generate-markdown-text.js +73 -0
- package/lib/module/ai-components/markdown/utils/generate-markdown-text.js.map +1 -0
- package/lib/module/ai-components/markdown/utils/index.js +15 -0
- package/lib/module/ai-components/markdown/utils/index.js.map +1 -0
- package/lib/module/ai-components/message-composer/ActionButton.js +104 -0
- package/lib/module/ai-components/message-composer/ActionButton.js.map +1 -0
- package/lib/module/ai-components/message-composer/ActionSheet.js +197 -0
- package/lib/module/ai-components/message-composer/ActionSheet.js.map +1 -0
- package/lib/module/ai-components/message-composer/AttachmentButton.js +55 -0
- package/lib/module/ai-components/message-composer/AttachmentButton.js.map +1 -0
- package/lib/module/ai-components/message-composer/ComposerView.js +151 -0
- package/lib/module/ai-components/message-composer/ComposerView.js.map +1 -0
- package/lib/module/ai-components/message-composer/MediaPreviewList.js +84 -0
- package/lib/module/ai-components/message-composer/MediaPreviewList.js.map +1 -0
- package/lib/module/ai-components/message-composer/SpeechToTextButton.js +82 -0
- package/lib/module/ai-components/message-composer/SpeechToTextButton.js.map +1 -0
- package/lib/module/ai-components/message-composer/index.js +59 -0
- package/lib/module/ai-components/message-composer/index.js.map +1 -0
- package/lib/module/ai-components/message-composer/utils/withCloseSheet.js +16 -0
- package/lib/module/ai-components/message-composer/utils/withCloseSheet.js.map +1 -0
- package/lib/module/ai-components/native/AIDictation.js +60 -0
- package/lib/module/ai-components/native/AIDictation.js.map +1 -0
- package/lib/module/ai-components/native/PerfText.js +31 -0
- package/lib/module/ai-components/native/PerfText.js.map +1 -0
- package/lib/module/ai-components/native-specs/NativeAIDictation.js +7 -0
- package/lib/module/ai-components/native-specs/NativeAIDictation.js.map +1 -0
- package/lib/module/ai-components/services/clipboard-service/expo.js +13 -0
- package/lib/module/ai-components/services/clipboard-service/expo.js.map +1 -0
- package/lib/module/ai-components/services/clipboard-service/index.js +8 -0
- package/lib/module/ai-components/services/clipboard-service/index.js.map +1 -0
- package/lib/module/ai-components/services/clipboard-service/rncli.js +10 -0
- package/lib/module/ai-components/services/clipboard-service/rncli.js.map +1 -0
- package/lib/module/ai-components/services/index.js +26 -0
- package/lib/module/ai-components/services/index.js.map +1 -0
- package/lib/module/ai-components/services/media-picker-service/AbstractMediaPickerService.js +31 -0
- package/lib/module/ai-components/services/media-picker-service/AbstractMediaPickerService.js.map +1 -0
- package/lib/module/ai-components/services/media-picker-service/expo.js +169 -0
- package/lib/module/ai-components/services/media-picker-service/expo.js.map +1 -0
- package/lib/module/ai-components/services/media-picker-service/hooks/useMediaPickerState.js +14 -0
- package/lib/module/ai-components/services/media-picker-service/hooks/useMediaPickerState.js.map +1 -0
- package/lib/module/ai-components/services/media-picker-service/index.js +8 -0
- package/lib/module/ai-components/services/media-picker-service/index.js.map +1 -0
- package/lib/module/ai-components/services/media-picker-service/optional-modules.d.js +2 -0
- package/lib/module/ai-components/services/media-picker-service/optional-modules.d.js.map +1 -0
- package/lib/module/ai-components/services/media-picker-service/rncli.js +162 -0
- package/lib/module/ai-components/services/media-picker-service/rncli.js.map +1 -0
- package/lib/module/ai-components/store/bottom-sheet/store.js +27 -0
- package/lib/module/ai-components/store/bottom-sheet/store.js.map +1 -0
- package/lib/module/ai-components/store/bottom-sheet/useBottomSheetState.js +16 -0
- package/lib/module/ai-components/store/bottom-sheet/useBottomSheetState.js.map +1 -0
- package/lib/module/ai-components/store/composer/store.js +11 -0
- package/lib/module/ai-components/store/composer/store.js.map +1 -0
- package/lib/module/ai-components/store/composer/useComposerHasText.js +18 -0
- package/lib/module/ai-components/store/composer/useComposerHasText.js.map +1 -0
- package/lib/module/ai-components/store/composer/useComposerText.js +18 -0
- package/lib/module/ai-components/store/composer/useComposerText.js.map +1 -0
- package/lib/module/ai-components/store/dictation/store.js +17 -0
- package/lib/module/ai-components/store/dictation/store.js.map +1 -0
- package/lib/module/ai-components/store/dictation/useDictationState.js +18 -0
- package/lib/module/ai-components/store/dictation/useDictationState.js.map +1 -0
- package/lib/module/ai-components/store/dictation/useDictationTranscript.js +14 -0
- package/lib/module/ai-components/store/dictation/useDictationTranscript.js.map +1 -0
- package/lib/module/ai-components/store/index.js +70 -0
- package/lib/module/ai-components/store/index.js.map +1 -0
- package/lib/module/ai-components/syntax-highlighting/SyntaxHighlighter.js +51 -0
- package/lib/module/ai-components/syntax-highlighting/SyntaxHighlighter.js.map +1 -0
- package/lib/module/ai-components/syntax-highlighting/components/AndroidNativeRenderer.js +35 -0
- package/lib/module/ai-components/syntax-highlighting/components/AndroidNativeRenderer.js.map +1 -0
- package/lib/module/ai-components/syntax-highlighting/components/index.js +15 -0
- package/lib/module/ai-components/syntax-highlighting/components/index.js.map +1 -0
- package/lib/module/ai-components/syntax-highlighting/index.js +48 -0
- package/lib/module/ai-components/syntax-highlighting/index.js.map +1 -0
- package/lib/module/ai-components/syntax-highlighting/prism-config.js +7 -0
- package/lib/module/ai-components/syntax-highlighting/prism-config.js.map +1 -0
- package/lib/module/ai-components/syntax-highlighting/types.js +4 -0
- package/lib/module/ai-components/syntax-highlighting/types.js.map +1 -0
- package/lib/module/ai-components/syntax-highlighting/utils/converter.js +107 -0
- package/lib/module/ai-components/syntax-highlighting/utils/converter.js.map +1 -0
- package/lib/module/ai-components/syntax-highlighting/utils/flatten-nodes.js +139 -0
- package/lib/module/ai-components/syntax-highlighting/utils/flatten-nodes.js.map +1 -0
- package/lib/module/ai-components/syntax-highlighting/utils/index.js +37 -0
- package/lib/module/ai-components/syntax-highlighting/utils/index.js.map +1 -0
- package/lib/module/ai-components/syntax-highlighting/utils/renderer.js +117 -0
- package/lib/module/ai-components/syntax-highlighting/utils/renderer.js.map +1 -0
- package/lib/module/ai-components/theme.js +99 -0
- package/lib/module/ai-components/theme.js.map +1 -0
- package/lib/module/ai-components/transcription/useDictation.js +114 -0
- package/lib/module/ai-components/transcription/useDictation.js.map +1 -0
- package/lib/module/native.js +4 -0
- package/lib/module/native.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/ai-components/AITypingIndicatorView.d.ts +4 -0
- package/lib/typescript/ai-components/AITypingIndicatorView.d.ts.map +1 -0
- package/lib/typescript/ai-components/StreamingMessageView.d.ts +19 -0
- package/lib/typescript/ai-components/StreamingMessageView.d.ts.map +1 -0
- package/lib/typescript/ai-components/charts/Chart.d.ts +10 -0
- package/lib/typescript/ai-components/charts/Chart.d.ts.map +1 -0
- package/lib/typescript/ai-components/charts/components/PieLegend.d.ts +7 -0
- package/lib/typescript/ai-components/charts/components/PieLegend.d.ts.map +1 -0
- package/lib/typescript/ai-components/charts/components/VictoryChart.d.ts +9 -0
- package/lib/typescript/ai-components/charts/components/VictoryChart.d.ts.map +1 -0
- package/lib/typescript/ai-components/charts/components/index.d.ts +3 -0
- package/lib/typescript/ai-components/charts/components/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/charts/index.d.ts +7 -0
- package/lib/typescript/ai-components/charts/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/charts/mermaid/index.d.ts +2 -0
- package/lib/typescript/ai-components/charts/mermaid/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/charts/mermaid/parser.d.ts +4 -0
- package/lib/typescript/ai-components/charts/mermaid/parser.d.ts.map +1 -0
- package/lib/typescript/ai-components/charts/types.d.ts +23 -0
- package/lib/typescript/ai-components/charts/types.d.ts.map +1 -0
- package/lib/typescript/ai-components/charts/utils/generate-pie-colors.d.ts +9 -0
- package/lib/typescript/ai-components/charts/utils/generate-pie-colors.d.ts.map +1 -0
- package/lib/typescript/ai-components/charts/utils/index.d.ts +3 -0
- package/lib/typescript/ai-components/charts/utils/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/charts/utils/parse-json-chart.d.ts +3 -0
- package/lib/typescript/ai-components/charts/utils/parse-json-chart.d.ts.map +1 -0
- package/lib/typescript/ai-components/charts/vega-lite/index.d.ts +3 -0
- package/lib/typescript/ai-components/charts/vega-lite/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/charts/vega-lite/parser.d.ts +4 -0
- package/lib/typescript/ai-components/charts/vega-lite/parser.d.ts.map +1 -0
- package/lib/typescript/ai-components/charts/vega-lite/schema.d.ts +305 -0
- package/lib/typescript/ai-components/charts/vega-lite/schema.d.ts.map +1 -0
- package/lib/typescript/ai-components/components/BottomSheet.d.ts +5 -0
- package/lib/typescript/ai-components/components/BottomSheet.d.ts.map +1 -0
- package/lib/typescript/ai-components/components/MarkdownReactiveScrollView.d.ts +3 -0
- package/lib/typescript/ai-components/components/MarkdownReactiveScrollView.d.ts.map +1 -0
- package/lib/typescript/ai-components/components/index.d.ts +3 -0
- package/lib/typescript/ai-components/components/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/contexts/composer-context.d.ts +16 -0
- package/lib/typescript/ai-components/contexts/composer-context.d.ts.map +1 -0
- package/lib/typescript/ai-components/contexts/index.d.ts +3 -0
- package/lib/typescript/ai-components/contexts/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/contexts/theme-context.d.ts +23 -0
- package/lib/typescript/ai-components/contexts/theme-context.d.ts.map +1 -0
- package/lib/typescript/ai-components/index.d.ts +15 -0
- package/lib/typescript/ai-components/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/internal/hooks/useStableCallback.d.ts +26 -0
- package/lib/typescript/ai-components/internal/hooks/useStableCallback.d.ts.map +1 -0
- package/lib/typescript/ai-components/internal/icons/Camera.d.ts +4 -0
- package/lib/typescript/ai-components/internal/icons/Camera.d.ts.map +1 -0
- package/lib/typescript/ai-components/internal/icons/CircleStop.d.ts +8 -0
- package/lib/typescript/ai-components/internal/icons/CircleStop.d.ts.map +1 -0
- package/lib/typescript/ai-components/internal/icons/Close.d.ts +4 -0
- package/lib/typescript/ai-components/internal/icons/Close.d.ts.map +1 -0
- package/lib/typescript/ai-components/internal/icons/Mic.d.ts +8 -0
- package/lib/typescript/ai-components/internal/icons/Mic.d.ts.map +1 -0
- package/lib/typescript/ai-components/internal/icons/Picture.d.ts +4 -0
- package/lib/typescript/ai-components/internal/icons/Picture.d.ts.map +1 -0
- package/lib/typescript/ai-components/internal/icons/SendUp.d.ts +8 -0
- package/lib/typescript/ai-components/internal/icons/SendUp.d.ts.map +1 -0
- package/lib/typescript/ai-components/internal/icons/utils/base.d.ts +13 -0
- package/lib/typescript/ai-components/internal/icons/utils/base.d.ts.map +1 -0
- package/lib/typescript/ai-components/markdown/components/Autolink.d.ts +4 -0
- package/lib/typescript/ai-components/markdown/components/Autolink.d.ts.map +1 -0
- package/lib/typescript/ai-components/markdown/components/BlockQuote.d.ts +4 -0
- package/lib/typescript/ai-components/markdown/components/BlockQuote.d.ts.map +1 -0
- package/lib/typescript/ai-components/markdown/components/Bold.d.ts +4 -0
- package/lib/typescript/ai-components/markdown/components/Bold.d.ts.map +1 -0
- package/lib/typescript/ai-components/markdown/components/CodeBlock.d.ts +9 -0
- package/lib/typescript/ai-components/markdown/components/CodeBlock.d.ts.map +1 -0
- package/lib/typescript/ai-components/markdown/components/Emphasis.d.ts +4 -0
- package/lib/typescript/ai-components/markdown/components/Emphasis.d.ts.map +1 -0
- package/lib/typescript/ai-components/markdown/components/Heading.d.ts +4 -0
- package/lib/typescript/ai-components/markdown/components/Heading.d.ts.map +1 -0
- package/lib/typescript/ai-components/markdown/components/HorizontalRule.d.ts +4 -0
- package/lib/typescript/ai-components/markdown/components/HorizontalRule.d.ts.map +1 -0
- package/lib/typescript/ai-components/markdown/components/InlineCode.d.ts +4 -0
- package/lib/typescript/ai-components/markdown/components/InlineCode.d.ts.map +1 -0
- package/lib/typescript/ai-components/markdown/components/LineBreak.d.ts +4 -0
- package/lib/typescript/ai-components/markdown/components/LineBreak.d.ts.map +1 -0
- package/lib/typescript/ai-components/markdown/components/Link.d.ts +4 -0
- package/lib/typescript/ai-components/markdown/components/Link.d.ts.map +1 -0
- package/lib/typescript/ai-components/markdown/components/List.d.ts +4 -0
- package/lib/typescript/ai-components/markdown/components/List.d.ts.map +1 -0
- package/lib/typescript/ai-components/markdown/components/Mailto.d.ts +4 -0
- package/lib/typescript/ai-components/markdown/components/Mailto.d.ts.map +1 -0
- package/lib/typescript/ai-components/markdown/components/Markdown.d.ts +4 -0
- package/lib/typescript/ai-components/markdown/components/Markdown.d.ts.map +1 -0
- package/lib/typescript/ai-components/markdown/components/NewLine.d.ts +4 -0
- package/lib/typescript/ai-components/markdown/components/NewLine.d.ts.map +1 -0
- package/lib/typescript/ai-components/markdown/components/Paragraph.d.ts +5 -0
- package/lib/typescript/ai-components/markdown/components/Paragraph.d.ts.map +1 -0
- package/lib/typescript/ai-components/markdown/components/Strikethrough.d.ts +4 -0
- package/lib/typescript/ai-components/markdown/components/Strikethrough.d.ts.map +1 -0
- package/lib/typescript/ai-components/markdown/components/Table.d.ts +4 -0
- package/lib/typescript/ai-components/markdown/components/Table.d.ts.map +1 -0
- package/lib/typescript/ai-components/markdown/components/Text.d.ts +4 -0
- package/lib/typescript/ai-components/markdown/components/Text.d.ts.map +1 -0
- package/lib/typescript/ai-components/markdown/components/Url.d.ts +4 -0
- package/lib/typescript/ai-components/markdown/components/Url.d.ts.map +1 -0
- package/lib/typescript/ai-components/markdown/components/index.d.ts +20 -0
- package/lib/typescript/ai-components/markdown/components/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/markdown/index.d.ts +6 -0
- package/lib/typescript/ai-components/markdown/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/markdown/rules.d.ts +4 -0
- package/lib/typescript/ai-components/markdown/rules.d.ts.map +1 -0
- package/lib/typescript/ai-components/markdown/styles.d.ts +232 -0
- package/lib/typescript/ai-components/markdown/styles.d.ts.map +1 -0
- package/lib/typescript/ai-components/markdown/types.d.ts +137 -0
- package/lib/typescript/ai-components/markdown/types.d.ts.map +1 -0
- package/lib/typescript/ai-components/markdown/utils/generate-markdown-text.d.ts +5 -0
- package/lib/typescript/ai-components/markdown/utils/generate-markdown-text.d.ts.map +1 -0
- package/lib/typescript/ai-components/markdown/utils/index.d.ts +2 -0
- package/lib/typescript/ai-components/markdown/utils/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/message-composer/ActionButton.d.ts +4 -0
- package/lib/typescript/ai-components/message-composer/ActionButton.d.ts.map +1 -0
- package/lib/typescript/ai-components/message-composer/ActionSheet.d.ts +16 -0
- package/lib/typescript/ai-components/message-composer/ActionSheet.d.ts.map +1 -0
- package/lib/typescript/ai-components/message-composer/AttachmentButton.d.ts +3 -0
- package/lib/typescript/ai-components/message-composer/AttachmentButton.d.ts.map +1 -0
- package/lib/typescript/ai-components/message-composer/ComposerView.d.ts +33 -0
- package/lib/typescript/ai-components/message-composer/ComposerView.d.ts.map +1 -0
- package/lib/typescript/ai-components/message-composer/MediaPreviewList.d.ts +3 -0
- package/lib/typescript/ai-components/message-composer/MediaPreviewList.d.ts.map +1 -0
- package/lib/typescript/ai-components/message-composer/SpeechToTextButton.d.ts +12 -0
- package/lib/typescript/ai-components/message-composer/SpeechToTextButton.d.ts.map +1 -0
- package/lib/typescript/ai-components/message-composer/index.d.ts +6 -0
- package/lib/typescript/ai-components/message-composer/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/message-composer/utils/withCloseSheet.d.ts +2 -0
- package/lib/typescript/ai-components/message-composer/utils/withCloseSheet.d.ts.map +1 -0
- package/lib/typescript/ai-components/native/AIDictation.d.ts +18 -0
- package/lib/typescript/ai-components/native/AIDictation.d.ts.map +1 -0
- package/lib/typescript/ai-components/native/PerfText.d.ts +13 -0
- package/lib/typescript/ai-components/native/PerfText.d.ts.map +1 -0
- package/lib/typescript/ai-components/native-specs/NativeAIDictation.d.ts +40 -0
- package/lib/typescript/ai-components/native-specs/NativeAIDictation.d.ts.map +1 -0
- package/lib/typescript/ai-components/services/clipboard-service/expo.d.ts +2 -0
- package/lib/typescript/ai-components/services/clipboard-service/expo.d.ts.map +1 -0
- package/lib/typescript/ai-components/services/clipboard-service/index.d.ts +2 -0
- package/lib/typescript/ai-components/services/clipboard-service/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/services/clipboard-service/rncli.d.ts +2 -0
- package/lib/typescript/ai-components/services/clipboard-service/rncli.d.ts.map +1 -0
- package/lib/typescript/ai-components/services/index.d.ts +3 -0
- package/lib/typescript/ai-components/services/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/services/media-picker-service/AbstractMediaPickerService.d.ts +40 -0
- package/lib/typescript/ai-components/services/media-picker-service/AbstractMediaPickerService.d.ts.map +1 -0
- package/lib/typescript/ai-components/services/media-picker-service/expo.d.ts +34 -0
- package/lib/typescript/ai-components/services/media-picker-service/expo.d.ts.map +1 -0
- package/lib/typescript/ai-components/services/media-picker-service/hooks/useMediaPickerState.d.ts +11 -0
- package/lib/typescript/ai-components/services/media-picker-service/hooks/useMediaPickerState.d.ts.map +1 -0
- package/lib/typescript/ai-components/services/media-picker-service/index.d.ts +37 -0
- package/lib/typescript/ai-components/services/media-picker-service/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/services/media-picker-service/rncli.d.ts +34 -0
- package/lib/typescript/ai-components/services/media-picker-service/rncli.d.ts.map +1 -0
- package/lib/typescript/ai-components/store/bottom-sheet/store.d.ts +12 -0
- package/lib/typescript/ai-components/store/bottom-sheet/store.d.ts.map +1 -0
- package/lib/typescript/ai-components/store/bottom-sheet/useBottomSheetState.d.ts +5 -0
- package/lib/typescript/ai-components/store/bottom-sheet/useBottomSheetState.d.ts.map +1 -0
- package/lib/typescript/ai-components/store/composer/store.d.ts +7 -0
- package/lib/typescript/ai-components/store/composer/store.d.ts.map +1 -0
- package/lib/typescript/ai-components/store/composer/useComposerHasText.d.ts +4 -0
- package/lib/typescript/ai-components/store/composer/useComposerHasText.d.ts.map +1 -0
- package/lib/typescript/ai-components/store/composer/useComposerText.d.ts +4 -0
- package/lib/typescript/ai-components/store/composer/useComposerText.d.ts.map +1 -0
- package/lib/typescript/ai-components/store/dictation/store.d.ts +13 -0
- package/lib/typescript/ai-components/store/dictation/store.d.ts.map +1 -0
- package/lib/typescript/ai-components/store/dictation/useDictationState.d.ts +6 -0
- package/lib/typescript/ai-components/store/dictation/useDictationState.d.ts.map +1 -0
- package/lib/typescript/ai-components/store/dictation/useDictationTranscript.d.ts +4 -0
- package/lib/typescript/ai-components/store/dictation/useDictationTranscript.d.ts.map +1 -0
- package/lib/typescript/ai-components/store/index.d.ts +7 -0
- package/lib/typescript/ai-components/store/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/syntax-highlighting/SyntaxHighlighter.d.ts +11 -0
- package/lib/typescript/ai-components/syntax-highlighting/SyntaxHighlighter.d.ts.map +1 -0
- package/lib/typescript/ai-components/syntax-highlighting/components/AndroidNativeRenderer.d.ts +10 -0
- package/lib/typescript/ai-components/syntax-highlighting/components/AndroidNativeRenderer.d.ts.map +1 -0
- package/lib/typescript/ai-components/syntax-highlighting/components/index.d.ts +2 -0
- package/lib/typescript/ai-components/syntax-highlighting/components/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/syntax-highlighting/index.d.ts +10 -0
- package/lib/typescript/ai-components/syntax-highlighting/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/syntax-highlighting/prism-config.d.ts +2 -0
- package/lib/typescript/ai-components/syntax-highlighting/prism-config.d.ts.map +1 -0
- package/lib/typescript/ai-components/syntax-highlighting/types.d.ts +21 -0
- package/lib/typescript/ai-components/syntax-highlighting/types.d.ts.map +1 -0
- package/lib/typescript/ai-components/syntax-highlighting/utils/converter.d.ts +5 -0
- package/lib/typescript/ai-components/syntax-highlighting/utils/converter.d.ts.map +1 -0
- package/lib/typescript/ai-components/syntax-highlighting/utils/flatten-nodes.d.ts +19 -0
- package/lib/typescript/ai-components/syntax-highlighting/utils/flatten-nodes.d.ts.map +1 -0
- package/lib/typescript/ai-components/syntax-highlighting/utils/index.d.ts +4 -0
- package/lib/typescript/ai-components/syntax-highlighting/utils/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/syntax-highlighting/utils/renderer.d.ts +30 -0
- package/lib/typescript/ai-components/syntax-highlighting/utils/renderer.d.ts.map +1 -0
- package/lib/typescript/ai-components/theme.d.ts +58 -0
- package/lib/typescript/ai-components/theme.d.ts.map +1 -0
- package/lib/typescript/ai-components/transcription/useDictation.d.ts +8 -0
- package/lib/typescript/ai-components/transcription/useDictation.d.ts.map +1 -0
- package/lib/typescript/native.d.ts +17 -1
- package/lib/typescript/native.d.ts.map +1 -1
- package/package.json +23 -5
- package/src/ai-components/AITypingIndicatorView.tsx +51 -0
- package/src/ai-components/README.md +279 -0
- package/src/ai-components/StreamingMessageView.tsx +85 -0
- package/src/ai-components/__tests__/ComposerView.test.tsx +113 -0
- package/src/ai-components/__tests__/Markdown.test.tsx +94 -0
- package/src/ai-components/__tests__/StreamingMessageView.test.tsx +126 -0
- package/src/ai-components/__tests__/SyntaxHighlighter.test.tsx +136 -0
- package/src/ai-components/__tests__/charts.test.ts +131 -0
- package/src/ai-components/__tests__/dictation.test.tsx +166 -0
- package/src/ai-components/__tests__/generateMarkdownText.test.ts +54 -0
- package/src/ai-components/__tests__/theme.test.tsx +41 -0
- package/src/ai-components/charts/Chart.tsx +20 -0
- package/src/ai-components/charts/components/PieLegend.tsx +50 -0
- package/src/ai-components/charts/components/VictoryChart.tsx +193 -0
- package/src/ai-components/charts/components/index.ts +2 -0
- package/src/ai-components/charts/index.ts +13 -0
- package/src/ai-components/charts/mermaid/index.ts +1 -0
- package/src/ai-components/charts/mermaid/parser.ts +33 -0
- package/src/ai-components/charts/types.ts +25 -0
- package/src/ai-components/charts/utils/generate-pie-colors.ts +82 -0
- package/src/ai-components/charts/utils/index.ts +2 -0
- package/src/ai-components/charts/utils/parse-json-chart.ts +15 -0
- package/src/ai-components/charts/vega-lite/index.ts +2 -0
- package/src/ai-components/charts/vega-lite/parser.ts +49 -0
- package/src/ai-components/charts/vega-lite/schema.ts +112 -0
- package/src/ai-components/components/BottomSheet.tsx +158 -0
- package/src/ai-components/components/MarkdownReactiveScrollView.tsx +92 -0
- package/src/ai-components/components/index.ts +2 -0
- package/src/ai-components/contexts/composer-context.tsx +73 -0
- package/src/ai-components/contexts/index.ts +2 -0
- package/src/ai-components/contexts/theme-context.tsx +68 -0
- package/src/ai-components/index.ts +29 -0
- package/src/ai-components/internal/hooks/useStableCallback.ts +37 -0
- package/src/ai-components/internal/icons/Camera.tsx +12 -0
- package/src/ai-components/internal/icons/CircleStop.tsx +18 -0
- package/src/ai-components/internal/icons/Close.tsx +12 -0
- package/src/ai-components/internal/icons/Mic.tsx +20 -0
- package/src/ai-components/internal/icons/Picture.tsx +16 -0
- package/src/ai-components/internal/icons/SendUp.tsx +21 -0
- package/src/ai-components/internal/icons/utils/base.tsx +44 -0
- package/src/ai-components/markdown/components/Autolink.tsx +26 -0
- package/src/ai-components/markdown/components/BlockQuote.tsx +19 -0
- package/src/ai-components/markdown/components/Bold.tsx +16 -0
- package/src/ai-components/markdown/components/CodeBlock.tsx +96 -0
- package/src/ai-components/markdown/components/Emphasis.tsx +16 -0
- package/src/ai-components/markdown/components/Heading.tsx +30 -0
- package/src/ai-components/markdown/components/HorizontalRule.tsx +9 -0
- package/src/ai-components/markdown/components/InlineCode.tsx +16 -0
- package/src/ai-components/markdown/components/LineBreak.tsx +11 -0
- package/src/ai-components/markdown/components/Link.tsx +28 -0
- package/src/ai-components/markdown/components/List.tsx +65 -0
- package/src/ai-components/markdown/components/Mailto.tsx +26 -0
- package/src/ai-components/markdown/components/Markdown.tsx +59 -0
- package/src/ai-components/markdown/components/NewLine.tsx +11 -0
- package/src/ai-components/markdown/components/Paragraph.tsx +69 -0
- package/src/ai-components/markdown/components/Strikethrough.tsx +16 -0
- package/src/ai-components/markdown/components/Table.tsx +81 -0
- package/src/ai-components/markdown/components/Text.tsx +37 -0
- package/src/ai-components/markdown/components/Url.tsx +26 -0
- package/src/ai-components/markdown/components/index.ts +20 -0
- package/src/ai-components/markdown/index.tsx +5 -0
- package/src/ai-components/markdown/rules.ts +216 -0
- package/src/ai-components/markdown/styles.ts +236 -0
- package/src/ai-components/markdown/types.ts +163 -0
- package/src/ai-components/markdown/utils/generate-markdown-text.ts +117 -0
- package/src/ai-components/markdown/utils/index.ts +1 -0
- package/src/ai-components/message-composer/ActionButton.tsx +99 -0
- package/src/ai-components/message-composer/ActionSheet.tsx +205 -0
- package/src/ai-components/message-composer/AttachmentButton.tsx +49 -0
- package/src/ai-components/message-composer/ComposerView.tsx +187 -0
- package/src/ai-components/message-composer/MediaPreviewList.tsx +84 -0
- package/src/ai-components/message-composer/SpeechToTextButton.tsx +79 -0
- package/src/ai-components/message-composer/index.ts +5 -0
- package/src/ai-components/message-composer/utils/withCloseSheet.ts +11 -0
- package/src/ai-components/native/AIDictation.ts +77 -0
- package/src/ai-components/native/PerfText.tsx +32 -0
- package/src/ai-components/native-specs/NativeAIDictation.ts +48 -0
- package/src/ai-components/services/clipboard-service/expo.ts +11 -0
- package/src/ai-components/services/clipboard-service/index.ts +4 -0
- package/src/ai-components/services/clipboard-service/rncli.ts +11 -0
- package/src/ai-components/services/index.ts +2 -0
- package/src/ai-components/services/media-picker-service/AbstractMediaPickerService.ts +62 -0
- package/src/ai-components/services/media-picker-service/expo.ts +148 -0
- package/src/ai-components/services/media-picker-service/hooks/useMediaPickerState.ts +14 -0
- package/src/ai-components/services/media-picker-service/index.ts +4 -0
- package/src/ai-components/services/media-picker-service/optional-modules.d.ts +25 -0
- package/src/ai-components/services/media-picker-service/rncli.ts +142 -0
- package/src/ai-components/store/bottom-sheet/store.ts +30 -0
- package/src/ai-components/store/bottom-sheet/useBottomSheetState.ts +10 -0
- package/src/ai-components/store/composer/store.ts +12 -0
- package/src/ai-components/store/composer/useComposerHasText.ts +14 -0
- package/src/ai-components/store/composer/useComposerText.ts +14 -0
- package/src/ai-components/store/dictation/store.ts +23 -0
- package/src/ai-components/store/dictation/useDictationState.ts +11 -0
- package/src/ai-components/store/dictation/useDictationTranscript.ts +9 -0
- package/src/ai-components/store/index.ts +11 -0
- package/src/ai-components/syntax-highlighting/SyntaxHighlighter.tsx +66 -0
- package/src/ai-components/syntax-highlighting/components/AndroidNativeRenderer.tsx +29 -0
- package/src/ai-components/syntax-highlighting/components/index.ts +1 -0
- package/src/ai-components/syntax-highlighting/index.ts +11 -0
- package/src/ai-components/syntax-highlighting/prism-config.ts +4 -0
- package/src/ai-components/syntax-highlighting/types.ts +26 -0
- package/src/ai-components/syntax-highlighting/utils/converter.ts +145 -0
- package/src/ai-components/syntax-highlighting/utils/flatten-nodes.ts +150 -0
- package/src/ai-components/syntax-highlighting/utils/index.ts +3 -0
- package/src/ai-components/syntax-highlighting/utils/renderer.tsx +151 -0
- package/src/ai-components/theme.ts +138 -0
- package/src/ai-components/transcription/useDictation.ts +106 -0
- package/src/native.ts +19 -1
- package/src/version.json +1 -1
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2
|
+
value: true
|
|
3
|
+
});
|
|
4
|
+
exports.VegaLiteSchema = exports.VegaLiteCore = exports.VLType = void 0;
|
|
5
|
+
var _zod = require("zod");
|
|
6
|
+
var VLType = exports.VLType = _zod.z.enum(['quantitative', 'ordinal', 'nominal', 'temporal']);
|
|
7
|
+
var FieldRef = _zod.z.object({
|
|
8
|
+
field: _zod.z.string(),
|
|
9
|
+
type: VLType.optional()
|
|
10
|
+
});
|
|
11
|
+
var ColorXY = _zod.z.object({
|
|
12
|
+
field: _zod.z.string().optional(),
|
|
13
|
+
type: VLType.optional()
|
|
14
|
+
});
|
|
15
|
+
var ColorPie = _zod.z.object({
|
|
16
|
+
field: _zod.z.string(),
|
|
17
|
+
type: VLType.optional()
|
|
18
|
+
});
|
|
19
|
+
var MarkName = _zod.z.enum(['bar', 'line', 'area', 'point', 'arc']);
|
|
20
|
+
var MarkDef = _zod.z.looseObject({
|
|
21
|
+
type: _zod.z.union([MarkName, _zod.z.string()]).optional()
|
|
22
|
+
});
|
|
23
|
+
var XyEncoding = _zod.z.object({
|
|
24
|
+
x: FieldRef,
|
|
25
|
+
y: FieldRef,
|
|
26
|
+
color: ColorXY.optional()
|
|
27
|
+
});
|
|
28
|
+
var PieEncoding = _zod.z.object({
|
|
29
|
+
theta: FieldRef,
|
|
30
|
+
color: ColorPie.optional()
|
|
31
|
+
});
|
|
32
|
+
var BaseVL = _zod.z.object({
|
|
33
|
+
archetype: _zod.z.literal('vegalite'),
|
|
34
|
+
$schema: _zod.z.string().optional(),
|
|
35
|
+
data: _zod.z.object({
|
|
36
|
+
values: _zod.z.array(_zod.z.record(_zod.z.string(), _zod.z.unknown()))
|
|
37
|
+
}),
|
|
38
|
+
mark: _zod.z.union([MarkName, MarkDef, _zod.z.string()]).optional(),
|
|
39
|
+
layer: _zod.z.array(_zod.z.looseObject({
|
|
40
|
+
mark: MarkDef
|
|
41
|
+
})).optional(),
|
|
42
|
+
marks: _zod.z.array(MarkDef).optional(),
|
|
43
|
+
markName: MarkName
|
|
44
|
+
});
|
|
45
|
+
var VL_XY = BaseVL.extend({
|
|
46
|
+
type: _zod.z.literal('xy'),
|
|
47
|
+
encoding: XyEncoding
|
|
48
|
+
}).strip();
|
|
49
|
+
var VL_PIE = BaseVL.extend({
|
|
50
|
+
type: _zod.z.literal('pie'),
|
|
51
|
+
encoding: PieEncoding
|
|
52
|
+
}).strip();
|
|
53
|
+
var normalizeMarkName = m => {
|
|
54
|
+
if (typeof m === 'string') return m.toLowerCase();
|
|
55
|
+
if (m && typeof m === 'object' && typeof m.type === 'string') {
|
|
56
|
+
return String(m.type).toLowerCase();
|
|
57
|
+
}
|
|
58
|
+
return undefined;
|
|
59
|
+
};
|
|
60
|
+
var deriveMarkName = o => {
|
|
61
|
+
var _o$layer$;
|
|
62
|
+
var direct = normalizeMarkName(o == null ? void 0 : o.mark);
|
|
63
|
+
if (direct) return direct;
|
|
64
|
+
var firstLayerMark = Array.isArray(o == null ? void 0 : o.layer) && (_o$layer$ = o.layer[0]) != null && _o$layer$.mark ? normalizeMarkName(o.layer[0].mark) : undefined;
|
|
65
|
+
if (firstLayerMark) return firstLayerMark;
|
|
66
|
+
return Array.isArray(o == null ? void 0 : o.marks) && o.marks.length > 0 ? normalizeMarkName(o.marks[0]) : undefined;
|
|
67
|
+
};
|
|
68
|
+
var VegaLiteCore = exports.VegaLiteCore = _zod.z.discriminatedUnion('type', [VL_XY, VL_PIE]);
|
|
69
|
+
var VegaLiteSchema = exports.VegaLiteSchema = _zod.z.preprocess(raw => {
|
|
70
|
+
var _o$encoding;
|
|
71
|
+
var o = raw != null ? raw : {};
|
|
72
|
+
var markName = deriveMarkName(o);
|
|
73
|
+
var hasTheta = !!(o != null && (_o$encoding = o.encoding) != null && _o$encoding.theta);
|
|
74
|
+
var type = markName === 'arc' || hasTheta ? 'pie' : 'xy';
|
|
75
|
+
return {
|
|
76
|
+
...o,
|
|
77
|
+
type,
|
|
78
|
+
archetype: 'vegalite',
|
|
79
|
+
markName
|
|
80
|
+
};
|
|
81
|
+
}, VegaLiteCore);
|
|
82
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_zod","require","VLType","exports","z","enum","FieldRef","object","field","string","type","optional","ColorXY","ColorPie","MarkName","MarkDef","looseObject","union","XyEncoding","x","y","color","PieEncoding","theta","BaseVL","archetype","literal","$schema","data","values","array","record","unknown","mark","layer","marks","markName","VL_XY","extend","encoding","strip","VL_PIE","normalizeMarkName","m","toLowerCase","String","undefined","deriveMarkName","o","_o$layer$","direct","firstLayerMark","Array","isArray","length","VegaLiteCore","discriminatedUnion","VegaLiteSchema","preprocess","raw","_o$encoding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BAAkB,CAAC,MAAM,EAAE,CAACnB,KAAK,EAAEI,MAAM,CAAC,CAAC;AAGlE,IAAMgB,cAAc,GAAAtD,OAAA,CAAAsD,cAAA,GAAGrD,MAAC,CAACsD,UAAU,CAAEC,GAAG,IAAK;EAAA,IAAAC,WAAA;EAElD,IAAMZ,CAAM,GAAGW,GAAG,WAAHA,GAAG,GAAI,CAAC,CAAC;EACxB,IAAMvB,QAAQ,GAAGW,cAAc,CAACC,CAAC,CAAC;EAClC,IAAMa,QAAQ,GAAG,CAAC,EAACb,CAAC,aAAAY,WAAA,GAADZ,CAAC,CAAET,QAAQ,aAAXqB,WAAA,CAAarC,KAAK;EAErC,IAAMb,IAAI,GAAG0B,QAAQ,KAAK,KAAK,IAAIyB,QAAQ,GAAG,KAAK,GAAG,IAAI;EAE1D,OAAO;IAAE,GAAGb,CAAC;IAAEtC,IAAI;IAAEe,SAAS,EAAE,UAAU;IAAEW;EAAS,CAAC;AACxD,CAAC,EAAEmB,YAAY,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
exports.BottomSheet = BottomSheet;
|
|
6
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _reactNativeGestureHandler = require("react-native-gesture-handler");
|
|
10
|
+
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
11
|
+
var _store = require("../store");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
var _jsxFileName = "/home/runner/work/stream-chat-react-native/stream-chat-react-native/package/src/ai-components/components/BottomSheet.tsx";
|
|
14
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
15
|
+
var _Dimensions$get = _reactNative.Dimensions.get('window'),
|
|
16
|
+
SCREEN_H = _Dimensions$get.height;
|
|
17
|
+
var SPRING = {
|
|
18
|
+
duration: 200
|
|
19
|
+
};
|
|
20
|
+
var MAX_BOTTOM_SHEET_HEIGHT = Math.round(SCREEN_H * 0.4);
|
|
21
|
+
var BACKDROP_OPACITY = 0.4;
|
|
22
|
+
function BottomSheet({
|
|
23
|
+
children
|
|
24
|
+
}) {
|
|
25
|
+
var _useBottomSheetState = (0, _store.useBottomSheetState)(),
|
|
26
|
+
open = _useBottomSheetState.open,
|
|
27
|
+
height = _useBottomSheetState.height;
|
|
28
|
+
var _useState = (0, _react.useState)(open),
|
|
29
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
30
|
+
bottomSheetModalOpen = _useState2[0],
|
|
31
|
+
setBottomSheetModalOpen = _useState2[1];
|
|
32
|
+
var maxTranslateY = SCREEN_H;
|
|
33
|
+
var translateY = (0, _reactNativeReanimated.useSharedValue)(maxTranslateY);
|
|
34
|
+
var bottomSheetHeight = (0, _react.useMemo)(() => Math.min(height, MAX_BOTTOM_SHEET_HEIGHT), [height]);
|
|
35
|
+
var bottomSheetY = SCREEN_H - bottomSheetHeight;
|
|
36
|
+
(0, _react.useEffect)(() => {
|
|
37
|
+
if (open) {
|
|
38
|
+
setBottomSheetModalOpen(true);
|
|
39
|
+
} else {
|
|
40
|
+
translateY.value = (0, _reactNativeReanimated.withTiming)(maxTranslateY, SPRING, finished => {
|
|
41
|
+
if (finished) {
|
|
42
|
+
(0, _reactNativeReanimated.runOnJS)(setBottomSheetModalOpen)(false);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}, [setBottomSheetModalOpen, maxTranslateY, open, translateY]);
|
|
47
|
+
(0, _react.useEffect)(() => {
|
|
48
|
+
if (bottomSheetModalOpen && open) {
|
|
49
|
+
translateY.value = (0, _reactNativeReanimated.withTiming)(bottomSheetY, SPRING);
|
|
50
|
+
}
|
|
51
|
+
}, [open, bottomSheetModalOpen, bottomSheetY, translateY]);
|
|
52
|
+
var dragStartY = (0, _react.useRef)(0);
|
|
53
|
+
var panRef = (0, _react.useRef)(undefined);
|
|
54
|
+
var scrollRef = (0, _react.useRef)(undefined);
|
|
55
|
+
var nativeScroll = (0, _react.useMemo)(() => _reactNativeGestureHandler.Gesture.Native().withRef(scrollRef), []);
|
|
56
|
+
var pan = _reactNativeGestureHandler.Gesture.Pan().withRef(panRef).requireExternalGestureToFail(scrollRef).onBegin(() => {
|
|
57
|
+
dragStartY.current = 0;
|
|
58
|
+
}).onUpdate(e => {
|
|
59
|
+
if (dragStartY.current === 0) dragStartY.current = translateY.value;
|
|
60
|
+
var next = dragStartY.current + e.translationY;
|
|
61
|
+
var minY = bottomSheetY;
|
|
62
|
+
var maxY = maxTranslateY;
|
|
63
|
+
var overTop = next < minY;
|
|
64
|
+
var overBottom = next > maxY;
|
|
65
|
+
translateY.value = overTop ? minY - (minY - next) * 0.2 : overBottom ? maxY + (next - maxY) * 0.2 : next;
|
|
66
|
+
}).onEnd(e => {
|
|
67
|
+
var projected = e.translationY + e.velocityY * 0.15;
|
|
68
|
+
var nearest = projected >= bottomSheetHeight * 0.5 ? maxTranslateY : bottomSheetY;
|
|
69
|
+
translateY.value = (0, _reactNativeReanimated.withTiming)(nearest, SPRING, finished => {
|
|
70
|
+
if (finished && nearest === maxTranslateY) (0, _reactNativeReanimated.runOnJS)(_store.sheetStoreApi.closeSheet)();
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
var backdropStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
74
|
+
var minY = bottomSheetY;
|
|
75
|
+
var t = 1 - Math.min(1, Math.max(0, (translateY.value - minY) / (maxTranslateY - minY)));
|
|
76
|
+
return {
|
|
77
|
+
opacity: t * BACKDROP_OPACITY,
|
|
78
|
+
pointerEvents: t > 0.02 ? 'auto' : 'none'
|
|
79
|
+
};
|
|
80
|
+
});
|
|
81
|
+
var sheetStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
|
|
82
|
+
transform: [{
|
|
83
|
+
translateY: translateY.value
|
|
84
|
+
}]
|
|
85
|
+
}));
|
|
86
|
+
var sheetContentStyle = (0, _react.useMemo)(() => ({
|
|
87
|
+
height: bottomSheetHeight
|
|
88
|
+
}), [bottomSheetHeight]);
|
|
89
|
+
return (0, _jsxRuntime.jsx)(_reactNative.Modal, {
|
|
90
|
+
visible: bottomSheetModalOpen,
|
|
91
|
+
transparent: true,
|
|
92
|
+
children: (0, _jsxRuntime.jsx)(_reactNativeGestureHandler.GestureHandlerRootView, {
|
|
93
|
+
style: styles.gestureHandlerRootView,
|
|
94
|
+
children: (0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
95
|
+
style: _reactNative.StyleSheet.absoluteFill,
|
|
96
|
+
pointerEvents: 'box-none',
|
|
97
|
+
children: [(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
98
|
+
style: [_reactNative.StyleSheet.absoluteFill, styles.backdrop, backdropStyle],
|
|
99
|
+
children: (0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
100
|
+
style: _reactNative.StyleSheet.absoluteFill,
|
|
101
|
+
onPress: _store.sheetStoreApi.closeSheet
|
|
102
|
+
})
|
|
103
|
+
}), (0, _jsxRuntime.jsx)(_reactNativeGestureHandler.GestureDetector, {
|
|
104
|
+
gesture: pan,
|
|
105
|
+
children: (0, _jsxRuntime.jsxs)(_reactNativeReanimated.default.View, {
|
|
106
|
+
style: [styles.sheet, sheetStyle],
|
|
107
|
+
children: [(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
108
|
+
style: styles.handleContainer,
|
|
109
|
+
pointerEvents: 'none',
|
|
110
|
+
children: (0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
111
|
+
style: styles.handle
|
|
112
|
+
})
|
|
113
|
+
}), (0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
114
|
+
style: [styles.content, sheetContentStyle],
|
|
115
|
+
children: (0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
116
|
+
style: styles.contentContainer,
|
|
117
|
+
children: open ? (0, _jsxRuntime.jsx)(_reactNativeGestureHandler.GestureDetector, {
|
|
118
|
+
gesture: nativeScroll,
|
|
119
|
+
children: children
|
|
120
|
+
}) : null
|
|
121
|
+
})
|
|
122
|
+
})]
|
|
123
|
+
})
|
|
124
|
+
})]
|
|
125
|
+
})
|
|
126
|
+
})
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
var styles = _reactNative.StyleSheet.create({
|
|
130
|
+
gestureHandlerRootView: {
|
|
131
|
+
flex: 1
|
|
132
|
+
},
|
|
133
|
+
backdrop: {
|
|
134
|
+
backgroundColor: '#000'
|
|
135
|
+
},
|
|
136
|
+
sheet: {
|
|
137
|
+
position: 'absolute',
|
|
138
|
+
overflow: 'hidden',
|
|
139
|
+
left: 0,
|
|
140
|
+
right: 0,
|
|
141
|
+
top: 0,
|
|
142
|
+
height: SCREEN_H,
|
|
143
|
+
transform: [{
|
|
144
|
+
translateY: SCREEN_H
|
|
145
|
+
}],
|
|
146
|
+
borderTopLeftRadius: 20,
|
|
147
|
+
borderTopRightRadius: 20,
|
|
148
|
+
backgroundColor: 'white',
|
|
149
|
+
..._reactNative.Platform.select({
|
|
150
|
+
ios: {
|
|
151
|
+
shadowColor: '#000',
|
|
152
|
+
shadowOpacity: 0.2,
|
|
153
|
+
shadowOffset: {
|
|
154
|
+
width: 0,
|
|
155
|
+
height: -4
|
|
156
|
+
},
|
|
157
|
+
shadowRadius: 12
|
|
158
|
+
},
|
|
159
|
+
android: {
|
|
160
|
+
elevation: 18
|
|
161
|
+
}
|
|
162
|
+
})
|
|
163
|
+
},
|
|
164
|
+
handleContainer: {
|
|
165
|
+
alignItems: 'center',
|
|
166
|
+
paddingVertical: 8
|
|
167
|
+
},
|
|
168
|
+
handle: {
|
|
169
|
+
width: 40,
|
|
170
|
+
height: 4,
|
|
171
|
+
borderRadius: 2,
|
|
172
|
+
backgroundColor: '#444'
|
|
173
|
+
},
|
|
174
|
+
content: {
|
|
175
|
+
flexGrow: 0
|
|
176
|
+
},
|
|
177
|
+
contentContainer: {
|
|
178
|
+
flex: 1,
|
|
179
|
+
minHeight: 0
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
//# sourceMappingURL=BottomSheet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeGestureHandler","_reactNativeReanimated","_store","_jsxRuntime","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_Dimensions$get","Dimensions","SCREEN_H","height","SPRING","duration","MAX_BOTTOM_SHEET_HEIGHT","Math","round","BACKDROP_OPACITY","BottomSheet","children","_useBottomSheetState","useBottomSheetState","open","_useState","useState","_useState2","_slicedToArray2","bottomSheetModalOpen","setBottomSheetModalOpen","maxTranslateY","translateY","useSharedValue","bottomSheetHeight","useMemo","min","bottomSheetY","useEffect","value","withTiming","finished","runOnJS","dragStartY","useRef","panRef","undefined","scrollRef","nativeScroll","Gesture","Native","withRef","pan","Pan","requireExternalGestureToFail","onBegin","current","onUpdate","next","translationY","minY","maxY","overTop","overBottom","onEnd","projected","velocityY","nearest","sheetStoreApi","closeSheet","backdropStyle","useAnimatedStyle","max","opacity","pointerEvents","sheetStyle","transform","sheetContentStyle","jsx","Modal","visible","transparent","GestureHandlerRootView","style","styles","gestureHandlerRootView","jsxs","View","StyleSheet","absoluteFill","backdrop","Pressable","onPress","GestureDetector","gesture","sheet","handleContainer","handle","content","contentContainer","create","flex","backgroundColor","position","overflow","left","right","top","borderTopLeftRadius","borderTopRightRadius","Platform","select","ios","shadowColor","shadowOpacity","shadowOffset","width","shadowRadius","android","elevation","alignItems","paddingVertical","borderRadius","flexGrow","minHeight"],"sourceRoot":"../../../../src","sources":["ai-components/components/BottomSheet.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,0BAAA,GAAAF,OAAA;AAMA,IAAAG,sBAAA,GAAAJ,uBAAA,CAAAC,OAAA;AAOA,IAAAI,MAAA,GAAAJ,OAAA;AAA8D,IAAAK,WAAA,GAAAL,OAAA;AAAA,IAAAM,YAAA;AAAA,SAAAP,wBAAAQ,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAV,uBAAA,YAAAA,CAAAQ,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,cAAAM,EAAA,IAAAd,CAAA,gBAAAc,EAAA,OAAAC,cAAA,CAAAC,IAA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AAE;IACLQ,QAAQ,EAAE,UAAU;IACpBC,QAAQ,EAAE,QAAQ;IAClBC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,GAAG,EAAE,CAAC;IACN9F,MAAM,EAAED,QAAQ;IAChBgE,SAAS,EAAE,CAAC;MAAE5C,UAAU,EAAEpB;IAAS,CAAC,CAAC;IACrCgG,mBAAmB,EAAE,EAAE;IACvBC,oBAAoB,EAAE,EAAE;IACxBP,eAAe,EAAE,OAAO;IACxB,GAAGQ,qBAAQ,CAACC,MAAM,CAAC;MACjBC,GAAG,EAAE;QACHC,WAAW,EAAE,MAAM;QACnBC,aAAa,EAAE,GAAG;QAClBC,YAAY,EAAE;UAAEC,KAAK,EAAE,CAAC;UAAEvG,MAAM,EAAE,CAAC;QAAE,CAAC;QACtCwG,YAAY,EAAE;MAChB,CAAC;MACDC,OAAO,EAAE;QAAEC,SAAS,EAAE;MAAG;IAC3B,CAAC;EACH,CAAC;EACDvB,eAAe,EAAE;IAAEwB,UAAU,EAAE,QAAQ;IAAEC,eAAe,EAAE;EAAE,CAAC;EAC7DxB,MAAM,EAAE;IAAEmB,KAAK,EAAE,EAAE;IAAEvG,MAAM,EAAE,CAAC;IAAE6G,YAAY,EAAE,CAAC;IAAEpB,eAAe,EAAE;EAAO,CAAC;EAC1EJ,OAAO,EAAE;IAAEyB,QAAQ,EAAE;EAAE,CAAC;EACxBxB,gBAAgB,EAAE;IAAEE,IAAI,EAAE,CAAC;IAAEuB,SAAS,EAAE;EAAE;AAC5C,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2
|
+
value: true
|
|
3
|
+
});
|
|
4
|
+
exports.MarkdownReactiveScrollView = void 0;
|
|
5
|
+
var _react = require("react");
|
|
6
|
+
var _reactNative = require("react-native");
|
|
7
|
+
var _reactNativeGestureHandler = require("react-native-gesture-handler");
|
|
8
|
+
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
9
|
+
var _useStableCallback = require("../internal/hooks/useStableCallback");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
var _jsxFileName = "/home/runner/work/stream-chat-react-native/stream-chat-react-native/package/src/ai-components/components/MarkdownReactiveScrollView.tsx";
|
|
12
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
13
|
+
var MarkdownReactiveScrollView = ({
|
|
14
|
+
children
|
|
15
|
+
}) => {
|
|
16
|
+
var scrollViewRef = (0, _reactNativeReanimated.useAnimatedRef)();
|
|
17
|
+
var contentWidth = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
18
|
+
var visibleContentWidth = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
19
|
+
var offsetBeforeScroll = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
20
|
+
var touchStart = (0, _reactNativeReanimated.useSharedValue)(null);
|
|
21
|
+
var panGesture = (0, _react.useMemo)(() => _reactNativeGestureHandler.Gesture.Pan().onBegin(event => {
|
|
22
|
+
touchStart.value = {
|
|
23
|
+
x: event.x,
|
|
24
|
+
y: event.y
|
|
25
|
+
};
|
|
26
|
+
}).onTouchesMove((event, state) => {
|
|
27
|
+
if (!touchStart.value || !event.changedTouches.length) {
|
|
28
|
+
state.fail();
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
var xDiff = Math.abs(event.changedTouches[0].x - touchStart.value.x);
|
|
32
|
+
var yDiff = Math.abs(event.changedTouches[0].y - touchStart.value.y);
|
|
33
|
+
var isHorizontalPanning = xDiff > yDiff;
|
|
34
|
+
if (isHorizontalPanning) {
|
|
35
|
+
state.activate();
|
|
36
|
+
} else {
|
|
37
|
+
state.fail();
|
|
38
|
+
}
|
|
39
|
+
}).onUpdate(event => {
|
|
40
|
+
var translationX = event.translationX;
|
|
41
|
+
(0, _reactNativeReanimated.scrollTo)(scrollViewRef, offsetBeforeScroll.value - translationX, 0, false);
|
|
42
|
+
}).onEnd(event => {
|
|
43
|
+
var translationX = event.translationX;
|
|
44
|
+
var velocityEffect = event.velocityX * 0.3;
|
|
45
|
+
var finalPosition = (0, _reactNativeReanimated.clamp)(offsetBeforeScroll.value - translationX - velocityEffect, 0, contentWidth.value - visibleContentWidth.value);
|
|
46
|
+
offsetBeforeScroll.value = finalPosition;
|
|
47
|
+
(0, _reactNativeReanimated.scrollTo)(scrollViewRef, finalPosition, 0, true);
|
|
48
|
+
}), [contentWidth, offsetBeforeScroll, scrollViewRef, touchStart, visibleContentWidth]);
|
|
49
|
+
var onContentSizeChange = (0, _useStableCallback.useStableCallback)(width => {
|
|
50
|
+
contentWidth.value = width;
|
|
51
|
+
});
|
|
52
|
+
var onLayout = (0, _useStableCallback.useStableCallback)(event => {
|
|
53
|
+
visibleContentWidth.value = event.nativeEvent.layout.width;
|
|
54
|
+
});
|
|
55
|
+
return (0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
56
|
+
style: styles.wrapper,
|
|
57
|
+
children: (0, _jsxRuntime.jsx)(_reactNativeGestureHandler.GestureDetector, {
|
|
58
|
+
gesture: panGesture,
|
|
59
|
+
children: (0, _jsxRuntime.jsx)(_reactNativeReanimated.default.ScrollView, {
|
|
60
|
+
contentContainerStyle: styles.contentContainer,
|
|
61
|
+
horizontal: true,
|
|
62
|
+
nestedScrollEnabled: true,
|
|
63
|
+
onContentSizeChange: onContentSizeChange,
|
|
64
|
+
onLayout: onLayout,
|
|
65
|
+
ref: scrollViewRef,
|
|
66
|
+
scrollEnabled: false,
|
|
67
|
+
children: children
|
|
68
|
+
})
|
|
69
|
+
})
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
exports.MarkdownReactiveScrollView = MarkdownReactiveScrollView;
|
|
73
|
+
var styles = _reactNative.StyleSheet.create({
|
|
74
|
+
wrapper: {
|
|
75
|
+
width: '100%'
|
|
76
|
+
},
|
|
77
|
+
contentContainer: {
|
|
78
|
+
flexGrow: 1
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
//# sourceMappingURL=MarkdownReactiveScrollView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_reactNativeGestureHandler","_reactNativeReanimated","_interopRequireWildcard","_useStableCallback","_jsxRuntime","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","MarkdownReactiveScrollView","children","scrollViewRef","useAnimatedRef","contentWidth","useSharedValue","visibleContentWidth","offsetBeforeScroll","touchStart","panGesture","useMemo","Gesture","Pan","onBegin","event","value","x","y","onTouchesMove","state","changedTouches","length","fail","xDiff","Math","abs","yDiff","isHorizontalPanning","activate","onUpdate","translationX","scrollTo","onEnd","velocityEffect","velocityX","finalPosition","clamp","onContentSizeChange","useStableCallback","width","onLayout","nativeEvent","layout","jsx","View","style","styles","wrapper","GestureDetector","gesture","ScrollView","contentContainerStyle","contentContainer","horizontal","nestedScrollEnabled","ref","scrollEnabled","exports","StyleSheet","create","flexGrow"],"sourceRoot":"../../../../src","sources":["ai-components/components/MarkdownReactiveScrollView.tsx"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,0BAAA,GAAAF,OAAA;AACA,IAAAG,sBAAA,GAAAC,uBAAA,CAAAJ,OAAA;AAEA,IAAAK,kBAAA,GAAAL,OAAA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AK;QAC1BjB,mBAAmB,EAAEA,mBAAoB;QACzCG,QAAQ,EAAEA,QAAS;QACnBe,GAAG,EAAErD,aAAc;QACnBsD,aAAa,EAAE,KAAM;QAAAvD,QAAA,EAEpBA;MAAQ,CACU;IAAC,CACP;EAAC,CACd,CAAC;AAEX,CAAC;AAACwD,OAAA,CAAAzD,0BAAA,GAAAA,0BAAA;AAEF,IAAM8C,MAAM,GAAGY,uBAAU,CAACC,MAAM,CAAC;EAC/BZ,OAAO,EAAE;IACPR,KAAK,EAAE;EACT,CAAC;EACDa,gBAAgB,EAAE;IAAEQ,QAAQ,EAAE;EAAE;AAClC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2
|
+
value: true
|
|
3
|
+
});
|
|
4
|
+
var _MarkdownReactiveScrollView = require("./MarkdownReactiveScrollView");
|
|
5
|
+
Object.keys(_MarkdownReactiveScrollView).forEach(function (key) {
|
|
6
|
+
if (key === "default" || key === "__esModule") return;
|
|
7
|
+
if (key in exports && exports[key] === _MarkdownReactiveScrollView[key]) return;
|
|
8
|
+
Object.defineProperty(exports, key, {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () {
|
|
11
|
+
return _MarkdownReactiveScrollView[key];
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
var _PerfText = require("../native/PerfText");
|
|
16
|
+
Object.keys(_PerfText).forEach(function (key) {
|
|
17
|
+
if (key === "default" || key === "__esModule") return;
|
|
18
|
+
if (key in exports && exports[key] === _PerfText[key]) return;
|
|
19
|
+
Object.defineProperty(exports, key, {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () {
|
|
22
|
+
return _PerfText[key];
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_MarkdownReactiveScrollView","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_PerfText"],"sourceRoot":"../../../../src","sources":["ai-components/components/index.ts"],"mappings":";;;AAAA,IAAAA,2BAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,2BAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,2BAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,2BAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,SAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,SAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,SAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,SAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
exports.useMessageComposerContext = exports.ComposerProvider = exports.ComposerContext = void 0;
|
|
6
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
7
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _useStableCallback = require("../internal/hooks/useStableCallback");
|
|
10
|
+
var _services = require("../services");
|
|
11
|
+
var _store = require("../store");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
var _jsxFileName = "/home/runner/work/stream-chat-react-native/stream-chat-react-native/package/src/ai-components/contexts/composer-context.tsx";
|
|
14
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
15
|
+
var ComposerContext = exports.ComposerContext = _react.default.createContext(undefined);
|
|
16
|
+
var ComposerProvider = ({
|
|
17
|
+
onSendMessage,
|
|
18
|
+
mediaPickerService: mediaPickerServiceOverride,
|
|
19
|
+
state: stateOverride,
|
|
20
|
+
children
|
|
21
|
+
}) => {
|
|
22
|
+
var _useState = (0, _react.useState)(() => mediaPickerServiceOverride != null ? mediaPickerServiceOverride : _services.MediaPickerService ? new _services.MediaPickerService() : undefined),
|
|
23
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 1),
|
|
24
|
+
mediaPickerService = _useState2[0];
|
|
25
|
+
var _useState3 = (0, _react.useState)(() => stateOverride != null ? stateOverride : (0, _store.createNewComposerStore)()),
|
|
26
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 1),
|
|
27
|
+
state = _useState4[0];
|
|
28
|
+
var setText = (0, _useStableCallback.useStableCallback)(text => state.partialNext({
|
|
29
|
+
text
|
|
30
|
+
}));
|
|
31
|
+
var clearState = (0, _useStableCallback.useStableCallback)(() => {
|
|
32
|
+
setText('');
|
|
33
|
+
mediaPickerService == null || mediaPickerService.clearAssets();
|
|
34
|
+
});
|
|
35
|
+
var sendMessage = (0, _useStableCallback.useStableCallback)((0, _asyncToGenerator2.default)(function* () {
|
|
36
|
+
var _state$getLatestValue = state.getLatestValue(),
|
|
37
|
+
text = _state$getLatestValue.text,
|
|
38
|
+
custom = _state$getLatestValue.custom;
|
|
39
|
+
var data = {
|
|
40
|
+
text,
|
|
41
|
+
attachments: mediaPickerService == null ? void 0 : mediaPickerService.state.getLatestValue().assets,
|
|
42
|
+
custom
|
|
43
|
+
};
|
|
44
|
+
clearState();
|
|
45
|
+
yield onSendMessage(data);
|
|
46
|
+
}));
|
|
47
|
+
var contextValue = (0, _react.useMemo)(() => ({
|
|
48
|
+
mediaPickerService,
|
|
49
|
+
state,
|
|
50
|
+
setText,
|
|
51
|
+
sendMessage,
|
|
52
|
+
clearState
|
|
53
|
+
}), [state, mediaPickerService, setText, sendMessage, clearState]);
|
|
54
|
+
return (0, _jsxRuntime.jsx)(ComposerContext.Provider, {
|
|
55
|
+
value: contextValue,
|
|
56
|
+
children: children
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
exports.ComposerProvider = ComposerProvider;
|
|
60
|
+
var useMessageComposerContext = () => {
|
|
61
|
+
var value = _react.default.useContext(ComposerContext);
|
|
62
|
+
if (value === undefined) {
|
|
63
|
+
throw new Error('The useMessageComposerContext hook was called outside of the ComposerContext provider.');
|
|
64
|
+
}
|
|
65
|
+
return value;
|
|
66
|
+
};
|
|
67
|
+
exports.useMessageComposerContext = useMessageComposerContext;
|
|
68
|
+
//# sourceMappingURL=composer-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_useStableCallback","_services","_store","_jsxRuntime","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ComposerContext","exports","React","createContext","undefined","ComposerProvider","onSendMessage","mediaPickerService","mediaPickerServiceOverride","state","stateOverride","children","_useState","useState","MediaPickerService","_useState2","_slicedToArray2","_useState3","createNewComposerStore","_useState4","setText","useStableCallback","text","partialNext","clearState","clearAssets","sendMessage","_asyncToGenerator2","_state$getLatestValue","getLatestValue","custom","data","attachments","assets","contextValue","useMemo","jsx","Provider","value","useMessageComposerContext","useContext","Error"],"sourceRoot":"../../../../src","sources":["ai-components/contexts/composer-context.tsx"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAIA,IAAAC,kBAAA,GAAAD,OAAA;AAEA,IAAAE,SAAA,GAAAF,OAAA;AAEA,IAAAG,MAAA,GAAAH,OAAA;AAAsE,IAAAI,WAAA,GAAAJ,OAAA;AAAA,IAAAK,YAAA;AAAA,SAAAN,wBAAAO,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAT,uBAAA,YAAAA,CAAAO,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,cAAAM,EAAA,IAAAd,CAAA,gBAAAc,EAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,EAAA,OAAAP,CAAA,IAAAD,CAAA,GAAAW,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CA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,aAAY;IAChD,IAAAsC,qBAAA,GAAyBnB,KAAK,CAACoB,cAAc,CAAC,CAAC;MAAvCP,IAAI,GAAAM,qBAAA,CAAJN,IAAI;MAAEQ,MAAM,GAAAF,qBAAA,CAANE,MAAM;IAEpB,IAAMC,IAAI,GAAG;MACXT,IAAI;MACJU,WAAW,EAAEzB,kBAAkB,oBAAlBA,kBAAkB,CAAEE,KAAK,CAACoB,cAAc,CAAC,CAAC,CAACI,MAAM;MAC9DH;IACF,CAAC;IAEDN,UAAU,CAAC,CAAC;IAEZ,MAAMlB,aAAa,CAACyB,IAAI,CAAC;EAC3B,CAAC,EAAC;EAEF,IAAMG,YAAY,GAAG,IAAAC,cAAO,EAC1B,OAAO;IAAE5B,kBAAkB;IAAEE,KAAK;IAAEW,OAAO;IAAEM,WAAW;IAAEF;EAAW,CAAC,CAAC,EACvE,CAACf,KAAK,EAAEF,kBAAkB,EAAEa,OAAO,EAAEM,WAAW,EAAEF,UAAU,CAC9D,CAAC;EAED,OAAO,IAAA9C,WAAA,CAAA0D,GAAA,EAACpC,eAAe,CAACqC,QAAQ;IAACC,KAAK,EAAEJ,YAAa;IAAAvB,QAAA,EAAEA;EAAQ,CAA2B,CAAC;AAC7F,CAAC;AAACV,OAAA,CAAAI,gBAAA,GAAAA,gBAAA;AAEK,IAAMkC,yBAAyB,GAAGA,CAAA,KAAM;EAC7C,IAAMD,KAAK,GAAGpC,cAAK,CAACsC,UAAU,CAACxC,eAAe,CAAC;EAC/C,IAAIsC,KAAK,KAAKlC,SAAS,EAAE;IACvB,MAAM,IAAIqC,KAAK,CACb,wFACF,CAAC;EACH;EAEA,OAAOH,KAAK;AACd,CAAC;AAACrC,OAAA,CAAAsC,yBAAA,GAAAA,yBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2
|
+
value: true
|
|
3
|
+
});
|
|
4
|
+
var _composerContext = require("./composer-context");
|
|
5
|
+
Object.keys(_composerContext).forEach(function (key) {
|
|
6
|
+
if (key === "default" || key === "__esModule") return;
|
|
7
|
+
if (key in exports && exports[key] === _composerContext[key]) return;
|
|
8
|
+
Object.defineProperty(exports, key, {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () {
|
|
11
|
+
return _composerContext[key];
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
var _themeContext = require("./theme-context");
|
|
16
|
+
Object.keys(_themeContext).forEach(function (key) {
|
|
17
|
+
if (key === "default" || key === "__esModule") return;
|
|
18
|
+
if (key in exports && exports[key] === _themeContext[key]) return;
|
|
19
|
+
Object.defineProperty(exports, key, {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () {
|
|
22
|
+
return _themeContext[key];
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_composerContext","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_themeContext"],"sourceRoot":"../../../../src","sources":["ai-components/contexts/index.ts"],"mappings":";;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,gBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,gBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,gBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,aAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,aAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,aAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,aAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
exports.useTheme = exports.mergeThemes = exports.ThemeContext = exports.StreamTheme = void 0;
|
|
6
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
7
|
+
var _merge = _interopRequireDefault(require("lodash/merge"));
|
|
8
|
+
var _theme = require("../theme");
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
var _jsxFileName = "/home/runner/work/stream-chat-react-native/stream-chat-react-native/package/src/ai-components/contexts/theme-context.tsx";
|
|
11
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
12
|
+
var mergeThemes = params => {
|
|
13
|
+
var style = params.style,
|
|
14
|
+
theme = params.theme;
|
|
15
|
+
var finalTheme = !theme || Object.keys(theme).length === 0 ? JSON.parse(JSON.stringify(_theme.defaultTheme)) : JSON.parse(JSON.stringify(theme));
|
|
16
|
+
if (style) {
|
|
17
|
+
(0, _merge.default)(finalTheme, style);
|
|
18
|
+
}
|
|
19
|
+
return finalTheme;
|
|
20
|
+
};
|
|
21
|
+
exports.mergeThemes = mergeThemes;
|
|
22
|
+
var ThemeContext = exports.ThemeContext = (0, _react.createContext)(undefined);
|
|
23
|
+
var StreamTheme = props => {
|
|
24
|
+
var children = props.children,
|
|
25
|
+
mergedStyle = props.mergedStyle,
|
|
26
|
+
style = props.style,
|
|
27
|
+
theme = props.theme;
|
|
28
|
+
var modifiedTheme = (0, _react.useMemo)(() => {
|
|
29
|
+
if (mergedStyle) {
|
|
30
|
+
return mergedStyle;
|
|
31
|
+
}
|
|
32
|
+
return mergeThemes({
|
|
33
|
+
style,
|
|
34
|
+
theme
|
|
35
|
+
});
|
|
36
|
+
}, [mergedStyle, style, theme]);
|
|
37
|
+
return (0, _jsxRuntime.jsx)(ThemeContext.Provider, {
|
|
38
|
+
value: modifiedTheme,
|
|
39
|
+
children: children
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
exports.StreamTheme = StreamTheme;
|
|
43
|
+
var useTheme = () => {
|
|
44
|
+
var theme = (0, _react.useContext)(ThemeContext);
|
|
45
|
+
if (theme === undefined) {
|
|
46
|
+
throw new Error('The useTheme hook was called outside the StreamTheme Provider.');
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
theme
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
exports.useTheme = useTheme;
|
|
53
|
+
//# sourceMappingURL=theme-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_merge","_interopRequireDefault","_theme","_jsxRuntime","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","mergeThemes","params","style","theme","finalTheme","keys","length","JSON","parse","stringify","defaultTheme","merge","exports","ThemeContext","createContext","undefined","StreamTheme","props","children","mergedStyle","modifiedTheme","useMemo","jsx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