stream-chat-react-native-core 9.9.4 → 9.10.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/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,152 @@
|
|
|
1
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
exports.getLocalRules = void 0;
|
|
6
|
+
var _simpleMarkdown = _interopRequireDefault(require("@khanacademy/simple-markdown"));
|
|
7
|
+
var _components = require("./components");
|
|
8
|
+
var LINK_INSIDE = '(?:\\[(?:\\\\.|[^\\\\\\[\\]])*\\]|\\\\.|[^\\[\\]\\\\])*';
|
|
9
|
+
var LINK_HREF_AND_TITLE = '\\s*<?([^\\s>]*?)>?\\s*' + '(?:' + '\\\\"((?:\\\\.|[^"\\\\])*)\\\\"' + "|\\\\'((?:\\\\.|[^'\\\\])*)\\\\'" + '|\\(((?:\\\\.|[^)\\\\])*)\\)' + ')?\\s*';
|
|
10
|
+
var LINK_REGEX = new RegExp('^\\[(' + LINK_INSIDE + ')\\]\\(' + LINK_HREF_AND_TITLE + '\\)');
|
|
11
|
+
var getLocalRules = (styles, opts = {}) => {
|
|
12
|
+
var onLink = opts.onLink,
|
|
13
|
+
paragraphNumberOfLines = opts.paragraphNumberOfLines;
|
|
14
|
+
var openLinkHandler = target => {
|
|
15
|
+
if (onLink) {
|
|
16
|
+
Promise.resolve(onLink(target)).catch(error => {
|
|
17
|
+
var msg = error && typeof error === 'object' && 'toString' in error ? String(error) : 'Unknown error';
|
|
18
|
+
console.log('There has been a problem with this action. ' + msg);
|
|
19
|
+
throw error;
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
var parseInline = function (parse, content, state) {
|
|
24
|
+
var isCurrentlyInline = state.inline || false;
|
|
25
|
+
state.inline = true;
|
|
26
|
+
var result = parse(content, state);
|
|
27
|
+
state.inline = isCurrentlyInline;
|
|
28
|
+
return result;
|
|
29
|
+
};
|
|
30
|
+
var parseCaptureInline = (capture, parse, state) => {
|
|
31
|
+
return {
|
|
32
|
+
content: parseInline(parse, capture[2], state)
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
var parseFence = capture => {
|
|
36
|
+
var lang = (capture[2] || '').trim() || undefined;
|
|
37
|
+
var content = capture[3] || '';
|
|
38
|
+
if (!lang) {
|
|
39
|
+
var nl = content.indexOf('\n');
|
|
40
|
+
var firstLine = (nl === -1 ? content : content.slice(0, nl)).trim();
|
|
41
|
+
if (/^[A-Za-z0-9_+.-]+$/.test(firstLine)) {
|
|
42
|
+
lang = firstLine;
|
|
43
|
+
content = nl === -1 ? '' : content.slice(nl + 1);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
content = content.replace(/\n+$/, '');
|
|
47
|
+
return {
|
|
48
|
+
type: 'codeBlock',
|
|
49
|
+
lang,
|
|
50
|
+
content
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
var enrichedRenderFunction = (render, options = {}) => (node, output, {
|
|
54
|
+
...state
|
|
55
|
+
}) => render({
|
|
56
|
+
node,
|
|
57
|
+
output,
|
|
58
|
+
state,
|
|
59
|
+
styles,
|
|
60
|
+
...options
|
|
61
|
+
});
|
|
62
|
+
return {
|
|
63
|
+
autolink: {
|
|
64
|
+
react: enrichedRenderFunction(_components.renderAutolink, {
|
|
65
|
+
onLink: openLinkHandler
|
|
66
|
+
})
|
|
67
|
+
},
|
|
68
|
+
blockQuote: {
|
|
69
|
+
react: enrichedRenderFunction(_components.renderBlockQuote)
|
|
70
|
+
},
|
|
71
|
+
br: {
|
|
72
|
+
react: enrichedRenderFunction(_components.renderLineBreak)
|
|
73
|
+
},
|
|
74
|
+
codeBlock: {
|
|
75
|
+
react: enrichedRenderFunction(_components.renderCodeBlock)
|
|
76
|
+
},
|
|
77
|
+
fence: {
|
|
78
|
+
match: _simpleMarkdown.default.blockRegex(/^ {0,3}(`{3,}|~{3,})[ \t]*(\S+)?[ \t]*\r?\n([\s\S]*?)\r?\n?(?: {0,3})\1[ \t]*(?:\r?\n+|$)/),
|
|
79
|
+
parse: parseFence
|
|
80
|
+
},
|
|
81
|
+
del: {
|
|
82
|
+
react: enrichedRenderFunction(_components.renderStrikethrough)
|
|
83
|
+
},
|
|
84
|
+
em: {
|
|
85
|
+
react: enrichedRenderFunction(_components.renderEmphasis)
|
|
86
|
+
},
|
|
87
|
+
heading: {
|
|
88
|
+
match: _simpleMarkdown.default.blockRegex(/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n *)+/),
|
|
89
|
+
react: enrichedRenderFunction(_components.renderHeading)
|
|
90
|
+
},
|
|
91
|
+
hr: {
|
|
92
|
+
react: enrichedRenderFunction(_components.renderHorizontalRule)
|
|
93
|
+
},
|
|
94
|
+
image: {
|
|
95
|
+
match: () => null
|
|
96
|
+
},
|
|
97
|
+
inlineCode: {
|
|
98
|
+
parse: parseCaptureInline,
|
|
99
|
+
react: enrichedRenderFunction(_components.renderInlineCode)
|
|
100
|
+
},
|
|
101
|
+
link: {
|
|
102
|
+
match: _simpleMarkdown.default.inlineRegex(LINK_REGEX),
|
|
103
|
+
react: enrichedRenderFunction(_components.renderLink, {
|
|
104
|
+
onLink: openLinkHandler
|
|
105
|
+
})
|
|
106
|
+
},
|
|
107
|
+
list: {
|
|
108
|
+
react: enrichedRenderFunction(_components.renderList)
|
|
109
|
+
},
|
|
110
|
+
mailto: {
|
|
111
|
+
react: enrichedRenderFunction(_components.renderMailto, {
|
|
112
|
+
onLink: openLinkHandler
|
|
113
|
+
})
|
|
114
|
+
},
|
|
115
|
+
newline: {
|
|
116
|
+
react: enrichedRenderFunction(_components.renderNewLine)
|
|
117
|
+
},
|
|
118
|
+
paragraph: {
|
|
119
|
+
react: enrichedRenderFunction(_components.renderParagraph, {
|
|
120
|
+
paragraphNumberOfLines
|
|
121
|
+
})
|
|
122
|
+
},
|
|
123
|
+
strong: {
|
|
124
|
+
react: enrichedRenderFunction(_components.renderBold)
|
|
125
|
+
},
|
|
126
|
+
sublist: {
|
|
127
|
+
react: enrichedRenderFunction(_components.renderList)
|
|
128
|
+
},
|
|
129
|
+
table: {
|
|
130
|
+
react: enrichedRenderFunction(_components.renderTable)
|
|
131
|
+
},
|
|
132
|
+
text: {
|
|
133
|
+
react: enrichedRenderFunction(_components.renderText)
|
|
134
|
+
},
|
|
135
|
+
u: {
|
|
136
|
+
match: () => null
|
|
137
|
+
},
|
|
138
|
+
url: {
|
|
139
|
+
react: enrichedRenderFunction(_components.renderUrl, {
|
|
140
|
+
onLink: openLinkHandler
|
|
141
|
+
})
|
|
142
|
+
},
|
|
143
|
+
reflink: {
|
|
144
|
+
match: () => null
|
|
145
|
+
},
|
|
146
|
+
refimage: {
|
|
147
|
+
match: () => null
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
exports.getLocalRules = getLocalRules;
|
|
152
|
+
//# sourceMappingURL=rules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_simpleMarkdown","_interopRequireDefault","require","_components","LINK_INSIDE","LINK_HREF_AND_TITLE","LINK_REGEX","RegExp","getLocalRules","styles","opts","onLink","paragraphNumberOfLines","openLinkHandler","target","Promise","resolve","catch","error","msg","String","console","log","parseInline","parse","content","state","isCurrentlyInline","inline","result","parseCaptureInline","capture","parseFence","lang","trim","undefined","nl","indexOf","firstLine","slice","test","replace","type","enrichedRenderFunction","render","options","node","output","autolink","react","renderAutolink","blockQuote","renderBlockQuote","br","renderLineBreak","codeBlock","renderCodeBlock","fence","match","SimpleMarkdown","blockRegex","del","renderStrikethrough","em","renderEmphasis","heading","renderHeading","hr","renderHorizontalRule","image","inlineCode","renderInlineCode","link","inlineRegex","renderLink","list","renderList","mailto","renderMailto","newline","renderNewLine","paragraph","renderParagraph","strong","renderBold","sublist","table","renderTable","text","renderText","u","url","renderUrl","reflink","refimage","exports"],"sourceRoot":"../../../../src","sources":["ai-components/markdown/rules.ts"],"mappings":";;;;;AAWA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AA4BA,IAAME,WAAW,GAAG,yDAAyD;AAK7E,IAAMC,mBAAmB,GACvB,yBAAyB,GACzB,KAAK,GACL,iCAAiC,GACjC,kCAAkC,GAClC,8BAA8B,GAC9B,QAAQ;AAEV,IAAMC,UAAU,GAAG,IAAIC,MAAM,CAAC,OAAO,GAAGH,WAAW,GAAG,SAAS,GAAGC,mBAAmB,GAAG,KAAK,CAAC;AAEvF,IAAMG,aAAa,GAAGA,CAC3BC,MAAqB,EACrBC,IAAqB,GAAG,CAAC,CAAC,KACO;EACjC,IAAQC,MAAM,GAA6BD,IAAI,CAAvCC,MAAM;IAAEC,sBAAsB,GAAKF,IAAI,CAA/BE,sBAAsB;EACtC,IAAMC,eAAe,GAAIC,MAAc,IAAK;IAC1C,IAAIH,MAAM,EAAE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1C,CAAC;IACDC,CAAC,EAAE;MAEDhC,KAAK,EAAEA,CAAA,KAAM;IACf,CAAC;IACDiC,GAAG,EAAE;MACH1C,KAAK,EAAEN,sBAAsB,CAACiD,qBAAS,EAAE;QACvCjF,MAAM,EAAEE;MACV,CAAC;IACH,CAAC;IAEDgF,OAAO,EAAE;MAAEnC,KAAK,EAAEA,CAAA,KAAM;IAAK,CAAC;IAC9BoC,QAAQ,EAAE;MAAEpC,KAAK,EAAEA,CAAA,KAAM;IAAK;EAChC,CAAC;AACH,CAAC;AAACqC,OAAA,CAAAvF,aAAA,GAAAA,aAAA","ignoreList":[]}
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2
|
+
value: true
|
|
3
|
+
});
|
|
4
|
+
exports.getLocalStyles = void 0;
|
|
5
|
+
var _reactNative = require("react-native");
|
|
6
|
+
var getLocalStyles = ({
|
|
7
|
+
theme
|
|
8
|
+
}) => {
|
|
9
|
+
var colors = theme.colors;
|
|
10
|
+
return _reactNative.StyleSheet.create({
|
|
11
|
+
autolink: {
|
|
12
|
+
color: colors.accent_blue
|
|
13
|
+
},
|
|
14
|
+
bgImage: {
|
|
15
|
+
bottom: 0,
|
|
16
|
+
flex: 1,
|
|
17
|
+
left: 0,
|
|
18
|
+
position: 'absolute',
|
|
19
|
+
right: 0,
|
|
20
|
+
top: 0
|
|
21
|
+
},
|
|
22
|
+
bgImageView: {
|
|
23
|
+
flex: 1,
|
|
24
|
+
overflow: 'hidden'
|
|
25
|
+
},
|
|
26
|
+
blockQuoteSection: {
|
|
27
|
+
flexDirection: 'row',
|
|
28
|
+
padding: 8
|
|
29
|
+
},
|
|
30
|
+
blockQuoteSectionBar: {
|
|
31
|
+
backgroundColor: colors.grey_gainsboro,
|
|
32
|
+
height: null,
|
|
33
|
+
marginRight: 8,
|
|
34
|
+
width: 2
|
|
35
|
+
},
|
|
36
|
+
blockQuoteText: {
|
|
37
|
+
color: colors.grey_dark
|
|
38
|
+
},
|
|
39
|
+
codeBlock: {
|
|
40
|
+
backgroundColor: colors.code_block,
|
|
41
|
+
fontFamily: _reactNative.Platform.OS === 'ios' ? 'Courier' : 'Monospace',
|
|
42
|
+
fontWeight: '500',
|
|
43
|
+
color: colors.black,
|
|
44
|
+
paddingLeft: 8,
|
|
45
|
+
lineHeight: 14
|
|
46
|
+
},
|
|
47
|
+
codeBlockWrapper: {
|
|
48
|
+
backgroundColor: colors.code_block,
|
|
49
|
+
borderRadius: 8,
|
|
50
|
+
marginVertical: 8,
|
|
51
|
+
padding: 12
|
|
52
|
+
},
|
|
53
|
+
codeBlockContainer: {
|
|
54
|
+
flexDirection: 'row'
|
|
55
|
+
},
|
|
56
|
+
codeBlockLineNumberGutter: {
|
|
57
|
+
flexDirection: 'column',
|
|
58
|
+
color: colors.black
|
|
59
|
+
},
|
|
60
|
+
codeBlockLineNumberCell: {
|
|
61
|
+
fontFamily: _reactNative.Platform.OS === 'ios' ? 'Courier' : 'Monospace',
|
|
62
|
+
color: colors.grey,
|
|
63
|
+
paddingVertical: 1,
|
|
64
|
+
fontSize: 12
|
|
65
|
+
},
|
|
66
|
+
codeBlockHeaderContainer: {
|
|
67
|
+
flexDirection: 'row',
|
|
68
|
+
justifyContent: 'space-between',
|
|
69
|
+
marginBottom: 8
|
|
70
|
+
},
|
|
71
|
+
codeBlockHeaderTitle: {
|
|
72
|
+
fontSize: 12,
|
|
73
|
+
color: colors.grey,
|
|
74
|
+
fontFamily: _reactNative.Platform.OS === 'ios' ? 'Courier' : 'Monospace'
|
|
75
|
+
},
|
|
76
|
+
del: {
|
|
77
|
+
textDecorationLine: 'line-through',
|
|
78
|
+
textDecorationStyle: 'solid'
|
|
79
|
+
},
|
|
80
|
+
em: {
|
|
81
|
+
fontStyle: 'italic'
|
|
82
|
+
},
|
|
83
|
+
heading: {
|
|
84
|
+
fontWeight: '200'
|
|
85
|
+
},
|
|
86
|
+
heading1: {
|
|
87
|
+
fontSize: 32
|
|
88
|
+
},
|
|
89
|
+
heading2: {
|
|
90
|
+
fontSize: 24
|
|
91
|
+
},
|
|
92
|
+
heading3: {
|
|
93
|
+
fontSize: 18
|
|
94
|
+
},
|
|
95
|
+
heading4: {
|
|
96
|
+
fontSize: 16
|
|
97
|
+
},
|
|
98
|
+
heading5: {
|
|
99
|
+
fontSize: 13
|
|
100
|
+
},
|
|
101
|
+
heading6: {
|
|
102
|
+
fontSize: 11
|
|
103
|
+
},
|
|
104
|
+
hr: {
|
|
105
|
+
backgroundColor: colors.grey_gainsboro,
|
|
106
|
+
height: 1
|
|
107
|
+
},
|
|
108
|
+
image: {
|
|
109
|
+
alignSelf: 'center',
|
|
110
|
+
height: 200,
|
|
111
|
+
resizeMode: 'contain',
|
|
112
|
+
width: _reactNative.Dimensions.get('window').width - 30
|
|
113
|
+
},
|
|
114
|
+
imageBox: {
|
|
115
|
+
flex: 1,
|
|
116
|
+
resizeMode: 'cover'
|
|
117
|
+
},
|
|
118
|
+
inlineCode: {
|
|
119
|
+
backgroundColor: colors.white_smoke,
|
|
120
|
+
borderColor: colors.grey_gainsboro,
|
|
121
|
+
borderRadius: 3,
|
|
122
|
+
borderWidth: 1,
|
|
123
|
+
color: colors.accent_red,
|
|
124
|
+
fontFamily: _reactNative.Platform.OS === 'ios' ? 'Courier' : 'Monospace',
|
|
125
|
+
fontWeight: '500',
|
|
126
|
+
fontSize: 13,
|
|
127
|
+
padding: 3,
|
|
128
|
+
paddingHorizontal: 5
|
|
129
|
+
},
|
|
130
|
+
list: {
|
|
131
|
+
marginBottom: 8,
|
|
132
|
+
marginTop: 8
|
|
133
|
+
},
|
|
134
|
+
listItem: {
|
|
135
|
+
flexDirection: 'row'
|
|
136
|
+
},
|
|
137
|
+
listItemBullet: {
|
|
138
|
+
fontSize: 20,
|
|
139
|
+
lineHeight: 20
|
|
140
|
+
},
|
|
141
|
+
listItemNumber: {
|
|
142
|
+
fontWeight: '500'
|
|
143
|
+
},
|
|
144
|
+
listItemText: {
|
|
145
|
+
flex: 0
|
|
146
|
+
},
|
|
147
|
+
listRow: {
|
|
148
|
+
flexDirection: 'row'
|
|
149
|
+
},
|
|
150
|
+
mentions: {
|
|
151
|
+
color: colors.accent_blue,
|
|
152
|
+
fontWeight: '700'
|
|
153
|
+
},
|
|
154
|
+
noMargin: {
|
|
155
|
+
marginBottom: 0,
|
|
156
|
+
marginTop: 0
|
|
157
|
+
},
|
|
158
|
+
paragraph: {
|
|
159
|
+
alignItems: 'flex-start',
|
|
160
|
+
flexDirection: 'row',
|
|
161
|
+
flexWrap: 'wrap',
|
|
162
|
+
justifyContent: 'flex-start',
|
|
163
|
+
marginBottom: 8,
|
|
164
|
+
marginTop: 8
|
|
165
|
+
},
|
|
166
|
+
paragraphCenter: {
|
|
167
|
+
alignItems: 'flex-start',
|
|
168
|
+
flexDirection: 'row',
|
|
169
|
+
flexWrap: 'wrap',
|
|
170
|
+
justifyContent: 'center',
|
|
171
|
+
marginBottom: 8,
|
|
172
|
+
marginTop: 8,
|
|
173
|
+
textAlign: 'center'
|
|
174
|
+
},
|
|
175
|
+
paragraphWithImage: {
|
|
176
|
+
alignItems: 'flex-start',
|
|
177
|
+
flex: 1,
|
|
178
|
+
justifyContent: 'flex-start',
|
|
179
|
+
marginBottom: 8,
|
|
180
|
+
marginTop: 8
|
|
181
|
+
},
|
|
182
|
+
strong: {
|
|
183
|
+
fontWeight: 'bold'
|
|
184
|
+
},
|
|
185
|
+
sublist: {
|
|
186
|
+
paddingLeft: 10,
|
|
187
|
+
width: _reactNative.Dimensions.get('window').width - 60
|
|
188
|
+
},
|
|
189
|
+
table: {
|
|
190
|
+
borderColor: colors.grey_dark,
|
|
191
|
+
borderRadius: 3,
|
|
192
|
+
borderWidth: 1,
|
|
193
|
+
flex: 1,
|
|
194
|
+
flexDirection: 'row',
|
|
195
|
+
marginVertical: 8
|
|
196
|
+
},
|
|
197
|
+
tableHeader: {
|
|
198
|
+
backgroundColor: colors.grey,
|
|
199
|
+
flexDirection: 'row',
|
|
200
|
+
justifyContent: 'space-around'
|
|
201
|
+
},
|
|
202
|
+
tableHeaderCell: {
|
|
203
|
+
color: colors.white,
|
|
204
|
+
fontWeight: '500',
|
|
205
|
+
padding: 5
|
|
206
|
+
},
|
|
207
|
+
tableRow: {
|
|
208
|
+
alignItems: 'center',
|
|
209
|
+
borderColor: colors.grey_dark,
|
|
210
|
+
flexDirection: 'row',
|
|
211
|
+
justifyContent: 'space-around'
|
|
212
|
+
},
|
|
213
|
+
tableRowCell: {
|
|
214
|
+
borderColor: colors.grey_dark,
|
|
215
|
+
flex: 1,
|
|
216
|
+
padding: 5
|
|
217
|
+
},
|
|
218
|
+
tableRowLast: {
|
|
219
|
+
borderColor: 'transparent'
|
|
220
|
+
},
|
|
221
|
+
text: {
|
|
222
|
+
color: colors.black
|
|
223
|
+
},
|
|
224
|
+
textRow: {
|
|
225
|
+
flexDirection: 'row'
|
|
226
|
+
},
|
|
227
|
+
u: {
|
|
228
|
+
borderBottomWidth: 1,
|
|
229
|
+
borderColor: colors.grey_dark
|
|
230
|
+
},
|
|
231
|
+
url: {
|
|
232
|
+
color: colors.accent_blue
|
|
233
|
+
},
|
|
234
|
+
view: {
|
|
235
|
+
alignSelf: 'stretch'
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
};
|
|
239
|
+
exports.getLocalStyles = getLocalStyles;
|
|
240
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","getLocalStyles","theme","colors","StyleSheet","create","autolink","color","accent_blue","bgImage","bottom","flex","left","position","right","top","bgImageView","overflow","blockQuoteSection","flexDirection","padding","blockQuoteSectionBar","backgroundColor","grey_gainsboro","height","marginRight","width","blockQuoteText","grey_dark","codeBlock","code_block","fontFamily","Platform","OS","fontWeight","black","paddingLeft","lineHeight","codeBlockWrapper","borderRadius","marginVertical","codeBlockContainer","codeBlockLineNumberGutter","codeBlockLineNumberCell","grey","paddingVertical","fontSize","codeBlockHeaderContainer","justifyContent","marginBottom","codeBlockHeaderTitle","del","textDecorationLine","textDecorationStyle","em","fontStyle","heading","heading1","heading2","heading3","heading4","heading5","heading6","hr","image","alignSelf","resizeMode","Dimensions","get","imageBox","inlineCode","white_smoke","borderColor","borderWidth","accent_red","paddingHorizontal","list","marginTop","listItem","listItemBullet","listItemNumber","listItemText","listRow","mentions","noMargin","paragraph","alignItems","flexWrap","paragraphCenter","textAlign","paragraphWithImage","strong","sublist","table","tableHeader","tableHeaderCell","white","tableRow","tableRowCell","tableRowLast","text","textRow","u","borderBottomWidth","url","view","exports"],"sourceRoot":"../../../../src","sources":["ai-components/markdown/styles.ts"],"mappings":";;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIO,IAAMC,cAAc,GAAGA,CAAC;EAAEC;AAAwB,CAAC,KAAK;EAC7D,IAAMC,MAAM,GAAGD,KAAK,CAACC,MAAM;EAE3B,OAAOC,uBAAU,CAACC,MAAM,CAAC;IACvBC,QAAQ,EAAE;MACRC,KAAK,EAAEJ,MAAM,CAACK;IAChB,CAAC;IACDC,OAAO,EAAE;MACPC,MAAM,EAAE,CAAC;MACTC,IAAI,EAAE,CAAC;MACPC,IAAI,EAAE,CAAC;MACPC,QAAQ,EAAE,UAAU;MACpBC,KAAK,EAAE,CAAC;MACRC,GAAG,EAAE;IACP,CAAC;IACDC,WAAW,EAAE;MACXL,IAAI,EAAE,CAAC;MACPM,QAAQ,EAAE;IACZ,CAAC;IACDC,iBAAiB,EAAE;MACjBC,aAAa,EAAE,KAAK;MACpBC,OAAO,EAAE;IACX,CAAC;IACDC,oBAAoB,EAAE;MACpBC,eAAe,EAAEnB,MAAM,CAACoB,cAAc;MACtCC,MAAM,EAAE,IAAI;MACZC,WAAW,EAAE,CAAC;MACdC,KAAK,EAAE;IACT,CAAC;IACDC,cAAc,EAAE;MACdpB,KAAK,EAAEJ,MAAM,CAACyB;IAChB,CAAC;IACDC,SAAS,EAAE;MACTP,eAAe,EAAEnB,MAAM,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yC,IAAI;MAC5BzB,aAAa,EAAE,KAAK;MACpB6B,cAAc,EAAE;IAClB,CAAC;IACD+C,eAAe,EAAE;MACfxF,KAAK,EAAEJ,MAAM,CAAC6F,KAAK;MACnB9D,UAAU,EAAE,KAAK;MACjBd,OAAO,EAAE;IACX,CAAC;IACD6E,QAAQ,EAAE;MACRX,UAAU,EAAE,QAAQ;MACpBd,WAAW,EAAErE,MAAM,CAACyB,SAAS;MAC7BT,aAAa,EAAE,KAAK;MACpB6B,cAAc,EAAE;IAClB,CAAC;IACDkD,YAAY,EAAE;MACZ1B,WAAW,EAAErE,MAAM,CAACyB,SAAS;MAC7BjB,IAAI,EAAE,CAAC;MACPS,OAAO,EAAE;IACX,CAAC;IACD+E,YAAY,EAAE;MACZ3B,WAAW,EAAE;IACf,CAAC;IACD4B,IAAI,EAAE;MACJ7F,KAAK,EAAEJ,MAAM,CAACgC;IAChB,CAAC;IACDkE,OAAO,EAAE;MACPlF,aAAa,EAAE;IACjB,CAAC;IACDmF,CAAC,EAAE;MACDC,iBAAiB,EAAE,CAAC;MACpB/B,WAAW,EAAErE,MAAM,CAACyB;IACtB,CAAC;IACD4E,GAAG,EAAE;MACHjG,KAAK,EAAEJ,MAAM,CAACK;IAChB,CAAC;IACDiG,IAAI,EAAE;MACJxC,SAAS,EAAE;IACb;EACF,CAAC,CAAC;AACJ,CAAC;AAACyC,OAAA,CAAAzG,cAAA,GAAAA,cAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["ai-components/markdown/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
exports.escapeRegExp = escapeRegExp;
|
|
6
|
+
exports.parseLinksFromText = exports.generateMarkdownText = void 0;
|
|
7
|
+
var _linkifyjs = require("linkifyjs");
|
|
8
|
+
var _truncate = _interopRequireDefault(require("lodash/truncate"));
|
|
9
|
+
function _createForOfIteratorHelperLoose(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: !0 } : { done: !1, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
11
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
12
|
+
function escapeRegExp(text) {
|
|
13
|
+
return text.replace(/[-[\]{}()*+?.,/\\^$|#]/g, '\\$&');
|
|
14
|
+
}
|
|
15
|
+
var removeMarkdownLinksFromText = input => input.replace(/\[.*\]\(.*\)/g, '');
|
|
16
|
+
var removeUserNamesWithEmailFromText = input => input.replace(/@(\w+(\.\w+)?)(@\w+\.\w+)/g, '');
|
|
17
|
+
var parseLinksFromText = input => {
|
|
18
|
+
if (!input) {
|
|
19
|
+
return [];
|
|
20
|
+
}
|
|
21
|
+
var strippedInput = [removeMarkdownLinksFromText, removeUserNamesWithEmailFromText].reduce((acc, fn) => fn(acc), input);
|
|
22
|
+
var links = (0, _linkifyjs.find)(strippedInput, 'url');
|
|
23
|
+
var emails = (0, _linkifyjs.find)(strippedInput, 'email');
|
|
24
|
+
var result = [...links, ...emails].map(({
|
|
25
|
+
href,
|
|
26
|
+
value
|
|
27
|
+
}) => {
|
|
28
|
+
var hrefWithProtocol = href;
|
|
29
|
+
var pattern = new RegExp(/^(mailto:|tel:|sms:|\S+:\/\/)/);
|
|
30
|
+
if (!pattern.test(hrefWithProtocol)) {
|
|
31
|
+
hrefWithProtocol = 'http://' + hrefWithProtocol;
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
raw: value,
|
|
35
|
+
url: hrefWithProtocol
|
|
36
|
+
};
|
|
37
|
+
});
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
exports.parseLinksFromText = parseLinksFromText;
|
|
41
|
+
var generateMarkdownText = text => {
|
|
42
|
+
if (!text) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
var resultText = text;
|
|
46
|
+
var linkInfos = parseLinksFromText(resultText);
|
|
47
|
+
for (var _iterator = _createForOfIteratorHelperLoose(linkInfos), _step; !(_step = _iterator()).done;) {
|
|
48
|
+
var linkInfo = _step.value;
|
|
49
|
+
var displayLink = (0, _truncate.default)(linkInfo.raw, {
|
|
50
|
+
length: 200,
|
|
51
|
+
omission: '...'
|
|
52
|
+
});
|
|
53
|
+
var normalRegEx = new RegExp(escapeRegExp(linkInfo.raw), 'g');
|
|
54
|
+
var markdown = `[${displayLink}](${linkInfo.url})`;
|
|
55
|
+
resultText = resultText.replace(normalRegEx, markdown);
|
|
56
|
+
var mentionsRegex = new RegExp(`@\\[${escapeRegExp(displayLink)}\\]\\(${escapeRegExp(linkInfo.url)}\\)`, 'g');
|
|
57
|
+
resultText = resultText.replace(mentionsRegex, `@${displayLink}`);
|
|
58
|
+
}
|
|
59
|
+
var LIST_START_RE = /^[ \t]*(?:> ?)*?(?:[*+-]|\d+\.)(?: |\t)(?:\[(?: |x|X)\] )?/;
|
|
60
|
+
resultText = resultText.replace(/(```[\s\S]*?```|`[^`]*?`)|\n([ \t]{2,})/g, (match, code, spaces, offset, full) => {
|
|
61
|
+
if (code) return code;
|
|
62
|
+
var after = full.slice(offset + match.length);
|
|
63
|
+
return LIST_START_RE.test(after) ? `\n${spaces}` : '\n';
|
|
64
|
+
});
|
|
65
|
+
resultText = resultText.replace(/\n```/g, '\n\n```\n');
|
|
66
|
+
var codeBlockCounts = (resultText.match(/```/g) || []).length;
|
|
67
|
+
if (codeBlockCounts % 2 > 0) {
|
|
68
|
+
resultText += '```';
|
|
69
|
+
}
|
|
70
|
+
return resultText;
|
|
71
|
+
};
|
|
72
|
+
exports.generateMarkdownText = generateMarkdownText;
|
|
73
|
+
//# sourceMappingURL=generate-markdown-text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_linkifyjs","require","_truncate","_interopRequireDefault","_createForOfIteratorHelperLoose","r","e","t","Symbol","iterator","call","next","bind","Array","isArray","_unsupportedIterableToArray","length","o","done","value","TypeError","a","_arrayLikeToArray","toString","slice","constructor","name","from","test","n","escapeRegExp","text","replace","removeMarkdownLinksFromText","input","removeUserNamesWithEmailFromText","parseLinksFromText","strippedInput","reduce","acc","fn","links","find","emails","result","map","href","hrefWithProtocol","pattern","RegExp","raw","url","exports","generateMarkdownText","resultText","linkInfos","_iterator","_step","linkInfo","displayLink","truncate","omission","normalRegEx","markdown","mentionsRegex","LIST_START_RE","match","code","spaces","offset","full","after","codeBlockCounts"],"sourceRoot":"../../../../../src","sources":["ai-components/markdown/utils/generate-markdown-text.ts"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAuC,SAAAG,gCAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,yBAAAC,MAAA,IAAAH,CAAA,CAAAG,MAAA,CAAAC,QAAA,KAAAJ,CAAA,oBAAAE,CAAA,UAAAA,CAAA,GAAAA,CAAA,CAAAG,IAAA,CAAAL,CAAA,GAAAM,IAAA,CAAAC,IAAA,CAAAL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AAW,CAAC;EAEtD,IAAMwC,eAAe,GAAG,CAAClB,UAAU,CAACY,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,EAAElD,MAAM;EAC/D,IAAIwD,eAAe,GAAG,CAAC,GAAG,CAAC,EAAE;IAC3BlB,UAAU,IAAI,KAAK;EACrB;EAEA,OAAOA,UAAU;AACnB,CAAC;AAACF,OAAA,CAAAC,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2
|
+
value: true
|
|
3
|
+
});
|
|
4
|
+
var _generateMarkdownText = require("./generate-markdown-text");
|
|
5
|
+
Object.keys(_generateMarkdownText).forEach(function (key) {
|
|
6
|
+
if (key === "default" || key === "__esModule") return;
|
|
7
|
+
if (key in exports && exports[key] === _generateMarkdownText[key]) return;
|
|
8
|
+
Object.defineProperty(exports, key, {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () {
|
|
11
|
+
return _generateMarkdownText[key];
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_generateMarkdownText","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sourceRoot":"../../../../../src","sources":["ai-components/markdown/utils/index.ts"],"mappings":";;;AAAA,IAAAA,qBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,qBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,qBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,qBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2
|
+
value: true
|
|
3
|
+
});
|
|
4
|
+
exports.ActionButton = void 0;
|
|
5
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
6
|
+
var _reactNative = require("react-native");
|
|
7
|
+
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
8
|
+
var _reactBindings = require("@stream-io/state-store/react-bindings");
|
|
9
|
+
var _SpeechToTextButton = require("./SpeechToTextButton");
|
|
10
|
+
var _contexts = require("../contexts");
|
|
11
|
+
var _CircleStop = require("../internal/icons/CircleStop");
|
|
12
|
+
var _SendUp = require("../internal/icons/SendUp");
|
|
13
|
+
var _store = require("../store");
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
var _jsxFileName = "/home/runner/work/stream-chat-react-native/stream-chat-react-native/package/src/ai-components/message-composer/ActionButton.tsx";
|
|
16
|
+
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); }
|
|
17
|
+
var selector = ({
|
|
18
|
+
isRecording
|
|
19
|
+
}) => ({
|
|
20
|
+
isRecording
|
|
21
|
+
});
|
|
22
|
+
var ActionButton = ({
|
|
23
|
+
isGenerating,
|
|
24
|
+
stopGenerating
|
|
25
|
+
}) => {
|
|
26
|
+
var _useComposerHasText = (0, _store.useComposerHasText)(),
|
|
27
|
+
hasText = _useComposerHasText.hasText;
|
|
28
|
+
var _useStateStore = (0, _reactBindings.useStateStore)(_store.dictationStore, selector),
|
|
29
|
+
isRecording = _useStateStore.isRecording;
|
|
30
|
+
var _useMessageComposerCo = (0, _contexts.useMessageComposerContext)(),
|
|
31
|
+
sendMessage = _useMessageComposerCo.sendMessage;
|
|
32
|
+
var _useTheme = (0, _contexts.useTheme)(),
|
|
33
|
+
_useTheme$theme = _useTheme.theme,
|
|
34
|
+
_useTheme$theme$color = _useTheme$theme.colors,
|
|
35
|
+
black = _useTheme$theme$color.black,
|
|
36
|
+
white = _useTheme$theme$color.white,
|
|
37
|
+
_useTheme$theme$compo = _useTheme$theme.composer,
|
|
38
|
+
iconButton = _useTheme$theme$compo.iconButton,
|
|
39
|
+
stopGeneratingIcon = _useTheme$theme$compo.stopGeneratingIcon,
|
|
40
|
+
sendIcon = _useTheme$theme$compo.sendIcon;
|
|
41
|
+
var styles = useStyles();
|
|
42
|
+
if (isGenerating) {
|
|
43
|
+
return (0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
44
|
+
entering: _reactNativeReanimated.ZoomIn.duration(250),
|
|
45
|
+
exiting: _reactNativeReanimated.ZoomOut.duration(250),
|
|
46
|
+
children: (0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
47
|
+
style: [styles.iconButton, iconButton],
|
|
48
|
+
onPress: stopGenerating,
|
|
49
|
+
children: (0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
50
|
+
style: [styles.stopGeneratingIcon, stopGeneratingIcon],
|
|
51
|
+
children: (0, _jsxRuntime.jsx)(_CircleStop.CircleStop, {
|
|
52
|
+
fill: black,
|
|
53
|
+
size: 32
|
|
54
|
+
})
|
|
55
|
+
})
|
|
56
|
+
})
|
|
57
|
+
}, 'stop-generating');
|
|
58
|
+
}
|
|
59
|
+
return hasText && !isRecording ? (0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
60
|
+
entering: _reactNativeReanimated.ZoomIn.duration(250),
|
|
61
|
+
exiting: _reactNativeReanimated.ZoomOut.duration(250),
|
|
62
|
+
children: (0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
63
|
+
style: [styles.iconButton, iconButton],
|
|
64
|
+
onPress: sendMessage,
|
|
65
|
+
children: (0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
66
|
+
style: [styles.sendIcon, sendIcon],
|
|
67
|
+
children: (0, _jsxRuntime.jsx)(_SendUp.SendUp, {
|
|
68
|
+
pathFill: white,
|
|
69
|
+
size: 24
|
|
70
|
+
})
|
|
71
|
+
})
|
|
72
|
+
})
|
|
73
|
+
}, 'send-button') : (0, _jsxRuntime.jsx)(_SpeechToTextButton.SpeechToTextButton, {});
|
|
74
|
+
};
|
|
75
|
+
exports.ActionButton = ActionButton;
|
|
76
|
+
var useStyles = () => {
|
|
77
|
+
var _useTheme2 = (0, _contexts.useTheme)(),
|
|
78
|
+
theme = _useTheme2.theme;
|
|
79
|
+
return (0, _react.useMemo)(() => _reactNative.StyleSheet.create({
|
|
80
|
+
micIcon: {
|
|
81
|
+
width: 32,
|
|
82
|
+
height: 32,
|
|
83
|
+
justifyContent: 'center',
|
|
84
|
+
alignItems: 'center'
|
|
85
|
+
},
|
|
86
|
+
sendIcon: {
|
|
87
|
+
width: 32,
|
|
88
|
+
height: 32,
|
|
89
|
+
backgroundColor: theme.colors.black,
|
|
90
|
+
borderRadius: 16
|
|
91
|
+
},
|
|
92
|
+
stopGeneratingIcon: {
|
|
93
|
+
width: 32,
|
|
94
|
+
height: 32,
|
|
95
|
+
backgroundColor: theme.colors.transparent,
|
|
96
|
+
borderRadius: 16
|
|
97
|
+
},
|
|
98
|
+
iconButton: {
|
|
99
|
+
justifyContent: 'center',
|
|
100
|
+
alignItems: 'center'
|
|
101
|
+
}
|
|
102
|
+
}), [theme]);
|
|
103
|
+
};
|
|
104
|
+
//# sourceMappingURL=ActionButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_reactBindings","_SpeechToTextButton","_contexts","_CircleStop","_SendUp","_store","_jsxRuntime","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","selector","isRecording","ActionButton","isGenerating","stopGenerating","_useComposerHasText","useComposerHasText","hasText","_useStateStore","useStateStore","dictationStore","_useMessageComposerCo","useMessageComposerContext","sendMessage","_useTheme","useTheme","_useTheme$theme","theme","_useTheme$theme$color","colors","black","white","_useTheme$theme$compo","composer","iconButton","stopGeneratingIcon","sendIcon","styles","useStyles","jsx","View","entering","ZoomIn","duration","exiting","ZoomOut","children","Pressable","style","onPress","CircleStop","fill","size","SendUp","pathFill","SpeechToTextButton","exports","_useTheme2","useMemo","StyleSheet","create","micIcon","width","height","justifyContent","alignItems","backgroundColor","borderRadius","transparent"],"sourceRoot":"../../../../src","sources":["ai-components/message-composer/ActionButton.tsx"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAH,uBAAA,CAAAC,OAAA;AAEA,IAAAG,cAAA,GAAAH,OAAA;AAIA,IAAAI,mBAAA,GAAAJ,OAAA;AAEA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AAAwF,IAAAS,WAAA,GAAAT,OAAA;AAAA,IAAAU,YAAA;AAAA,SAAAX,wBAAAY,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAd,uBAAA,YAAAA,CAAAY,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,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