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,148 @@
|
|
|
1
|
+
import { Image, Platform } from 'react-native';
|
|
2
|
+
|
|
3
|
+
import type { ImagePickerAsset } from 'expo-image-picker';
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
AbstractMediaPickerService,
|
|
7
|
+
type MediaAsset,
|
|
8
|
+
type PickMediaOpts,
|
|
9
|
+
} from './AbstractMediaPickerService';
|
|
10
|
+
|
|
11
|
+
let internalService = undefined;
|
|
12
|
+
|
|
13
|
+
try {
|
|
14
|
+
internalService = require('expo-image-picker');
|
|
15
|
+
} catch (_error) {
|
|
16
|
+
/* do nothing */
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
type Size = {
|
|
20
|
+
height?: number;
|
|
21
|
+
width?: number;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
class ExpoMediaPickerService extends AbstractMediaPickerService {
|
|
25
|
+
pickMedia = async ({ maxNumberOfFiles = 3 }: PickMediaOpts = {}) => {
|
|
26
|
+
try {
|
|
27
|
+
let permissionGranted = true;
|
|
28
|
+
if (Platform.OS === 'ios') {
|
|
29
|
+
const permissionCheck = await internalService!.getMediaLibraryPermissionsAsync();
|
|
30
|
+
const canRequest = permissionCheck.canAskAgain;
|
|
31
|
+
permissionGranted = permissionCheck.granted;
|
|
32
|
+
if (!permissionGranted) {
|
|
33
|
+
if (canRequest) {
|
|
34
|
+
const response = await internalService!.requestMediaLibraryPermissionsAsync();
|
|
35
|
+
permissionGranted = response.granted;
|
|
36
|
+
} else {
|
|
37
|
+
return { askToOpenSettings: true, cancelled: true };
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
if (permissionGranted) {
|
|
42
|
+
const result = await internalService!.launchImageLibraryAsync({
|
|
43
|
+
allowsMultipleSelection: true,
|
|
44
|
+
mediaTypes: 'images',
|
|
45
|
+
preferredAssetRepresentationMode: 'current',
|
|
46
|
+
selectionLimit: maxNumberOfFiles,
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
const canceled = result.canceled;
|
|
50
|
+
|
|
51
|
+
if (!canceled) {
|
|
52
|
+
const assets = result.assets.map((asset: ImagePickerAsset) => ({
|
|
53
|
+
...asset,
|
|
54
|
+
name: asset.fileName,
|
|
55
|
+
size: asset.fileSize,
|
|
56
|
+
type: asset.mimeType,
|
|
57
|
+
uri: asset.uri,
|
|
58
|
+
}));
|
|
59
|
+
this.appendAssets(assets);
|
|
60
|
+
return { assets, cancelled: false };
|
|
61
|
+
} else {
|
|
62
|
+
return { cancelled: true };
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return { cancelled: true };
|
|
66
|
+
} catch (error) {
|
|
67
|
+
console.log('Error while picking image', error);
|
|
68
|
+
return { cancelled: true };
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
takeMedia = async ({ compressionQuality = 1 }) => {
|
|
73
|
+
try {
|
|
74
|
+
const permissionCheck = await internalService!.getCameraPermissionsAsync();
|
|
75
|
+
const canRequest = permissionCheck.canAskAgain;
|
|
76
|
+
let permissionGranted = permissionCheck.granted;
|
|
77
|
+
if (!permissionGranted) {
|
|
78
|
+
if (canRequest) {
|
|
79
|
+
const response = await internalService!.requestCameraPermissionsAsync();
|
|
80
|
+
permissionGranted = response.granted;
|
|
81
|
+
} else {
|
|
82
|
+
return { askToOpenSettings: true, cancelled: true };
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (permissionGranted) {
|
|
87
|
+
const result = await internalService!.launchCameraAsync({
|
|
88
|
+
mediaTypes: 'images',
|
|
89
|
+
quality: Math.min(Math.max(0, compressionQuality), 1),
|
|
90
|
+
});
|
|
91
|
+
if (!result || !result.assets || !result.assets.length || result.canceled) {
|
|
92
|
+
return { cancelled: true };
|
|
93
|
+
}
|
|
94
|
+
// since we only support single photo upload for now we will only be focusing on 0'th element.
|
|
95
|
+
const photo = result.assets[0];
|
|
96
|
+
if (!photo) {
|
|
97
|
+
return { cancelled: true };
|
|
98
|
+
}
|
|
99
|
+
if (photo && photo.mimeType.includes('image') && photo.height && photo.width && photo.uri) {
|
|
100
|
+
let size: Size = {};
|
|
101
|
+
if (Platform.OS === 'android') {
|
|
102
|
+
const getSize = (): Promise<Size> =>
|
|
103
|
+
new Promise((resolve) => {
|
|
104
|
+
Image.getSize(photo.uri, (width, height) => {
|
|
105
|
+
resolve({ height, width });
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
try {
|
|
110
|
+
const { height, width } = await getSize();
|
|
111
|
+
size.height = height;
|
|
112
|
+
size.width = width;
|
|
113
|
+
} catch (e) {
|
|
114
|
+
console.warn('Error get image size of picture caputred from camera ', e);
|
|
115
|
+
}
|
|
116
|
+
} else {
|
|
117
|
+
size = {
|
|
118
|
+
height: photo.height,
|
|
119
|
+
width: photo.width,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
const clearFilter = new RegExp('[.:]', 'g');
|
|
123
|
+
const date = new Date().toISOString().replace(clearFilter, '_');
|
|
124
|
+
const asset: MediaAsset = {
|
|
125
|
+
name: 'image_' + date + '.' + photo.uri.split('.').pop(),
|
|
126
|
+
size: photo.fileSize,
|
|
127
|
+
type: photo.mimeType,
|
|
128
|
+
uri: photo.uri,
|
|
129
|
+
height: size.height!,
|
|
130
|
+
width: size.width!,
|
|
131
|
+
};
|
|
132
|
+
this.appendAssets([asset]);
|
|
133
|
+
return {
|
|
134
|
+
cancelled: false,
|
|
135
|
+
asset,
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
} catch (error) {
|
|
140
|
+
console.log(error);
|
|
141
|
+
}
|
|
142
|
+
return { cancelled: true };
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
const MediaPickerService = internalService ? ExpoMediaPickerService : undefined;
|
|
147
|
+
|
|
148
|
+
export { MediaPickerService };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useStateStore } from '@stream-io/state-store/react-bindings';
|
|
2
|
+
|
|
3
|
+
import type { AbstractMediaPickerService } from '../AbstractMediaPickerService';
|
|
4
|
+
import { type MediaPickerState } from '../AbstractMediaPickerService';
|
|
5
|
+
|
|
6
|
+
export const selector = (nextState: MediaPickerState) => ({
|
|
7
|
+
attachments: nextState.assets,
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export const useMediaPickerState = ({
|
|
11
|
+
service,
|
|
12
|
+
}: {
|
|
13
|
+
service: AbstractMediaPickerService | undefined;
|
|
14
|
+
}) => useStateStore(service?.state, selector);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// The image picker libraries are optional peer dependencies (`react-native-image-picker` for React
|
|
2
|
+
// Native CLI apps, `expo-image-picker` for Expo apps) and are not installed in this package. Only
|
|
3
|
+
// the asset shapes the media picker services read are declared here.
|
|
4
|
+
|
|
5
|
+
declare module 'react-native-image-picker' {
|
|
6
|
+
export type Asset = {
|
|
7
|
+
fileName?: string;
|
|
8
|
+
fileSize?: number;
|
|
9
|
+
height?: number;
|
|
10
|
+
type?: string;
|
|
11
|
+
uri?: string;
|
|
12
|
+
width?: number;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare module 'expo-image-picker' {
|
|
17
|
+
export type ImagePickerAsset = {
|
|
18
|
+
fileName?: string | null;
|
|
19
|
+
fileSize?: number;
|
|
20
|
+
height: number;
|
|
21
|
+
mimeType?: string;
|
|
22
|
+
uri: string;
|
|
23
|
+
width: number;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { AppState, Image, PermissionsAndroid, Platform } from 'react-native';
|
|
2
|
+
import type { Asset } from 'react-native-image-picker';
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
AbstractMediaPickerService,
|
|
6
|
+
type MediaAsset,
|
|
7
|
+
type PickMediaOpts,
|
|
8
|
+
} from './AbstractMediaPickerService';
|
|
9
|
+
|
|
10
|
+
let internalService = undefined;
|
|
11
|
+
|
|
12
|
+
try {
|
|
13
|
+
internalService = require('react-native-image-picker');
|
|
14
|
+
} catch (_error) {
|
|
15
|
+
/* do nothing */
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
class RNCLIMediaPickerService extends AbstractMediaPickerService {
|
|
19
|
+
pickMedia = async ({ maxNumberOfFiles = 3 }: PickMediaOpts = {}) => {
|
|
20
|
+
try {
|
|
21
|
+
const result = await internalService!.launchImageLibrary({
|
|
22
|
+
assetRepresentationMode: 'current',
|
|
23
|
+
mediaType: 'photo',
|
|
24
|
+
selectionLimit: maxNumberOfFiles,
|
|
25
|
+
});
|
|
26
|
+
const canceled = result.didCancel;
|
|
27
|
+
const errorCode = result.errorCode;
|
|
28
|
+
|
|
29
|
+
if (Platform.OS === 'ios' && errorCode === 'permission') {
|
|
30
|
+
return { askToOpenSettings: true, cancelled: true };
|
|
31
|
+
}
|
|
32
|
+
if (!canceled) {
|
|
33
|
+
const assets = result.assets.map((asset: Asset) => ({
|
|
34
|
+
...asset,
|
|
35
|
+
name: asset.fileName,
|
|
36
|
+
size: asset.fileSize,
|
|
37
|
+
type: asset.type,
|
|
38
|
+
uri: asset.uri,
|
|
39
|
+
}));
|
|
40
|
+
this.appendAssets(assets);
|
|
41
|
+
return { assets, cancelled: false };
|
|
42
|
+
} else {
|
|
43
|
+
return { cancelled: true };
|
|
44
|
+
}
|
|
45
|
+
} catch (error) {
|
|
46
|
+
console.log('Error picking image: ', error);
|
|
47
|
+
return { cancelled: true };
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
takeMedia = async ({ compressionQuality = Platform.OS === 'ios' ? 0.8 : 1 }) => {
|
|
52
|
+
if (Platform.OS === 'android') {
|
|
53
|
+
const cameraPermissions = await PermissionsAndroid.check(
|
|
54
|
+
PermissionsAndroid.PERMISSIONS.CAMERA,
|
|
55
|
+
);
|
|
56
|
+
if (!cameraPermissions) {
|
|
57
|
+
const androidPermissionStatus = await PermissionsAndroid.request(
|
|
58
|
+
PermissionsAndroid.PERMISSIONS.CAMERA,
|
|
59
|
+
);
|
|
60
|
+
if (androidPermissionStatus === PermissionsAndroid.RESULTS.DENIED) {
|
|
61
|
+
return { cancelled: true };
|
|
62
|
+
} else if (androidPermissionStatus === PermissionsAndroid.RESULTS.NEVER_ASK_AGAIN) {
|
|
63
|
+
return { askToOpenSettings: true, cancelled: true };
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
try {
|
|
68
|
+
const result = await internalService!.launchCamera({
|
|
69
|
+
mediaType: 'photo',
|
|
70
|
+
quality: Math.min(Math.max(0, compressionQuality), 1),
|
|
71
|
+
});
|
|
72
|
+
if (!result || !result.assets || !result.assets.length || result.didCancel) {
|
|
73
|
+
return {
|
|
74
|
+
cancelled: true,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
const asset = result.assets[0];
|
|
78
|
+
if (!asset) {
|
|
79
|
+
return {
|
|
80
|
+
cancelled: true,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
if (asset.height && asset.width && asset.uri) {
|
|
84
|
+
let size: { height?: number; width?: number } = {};
|
|
85
|
+
if (Platform.OS === 'android') {
|
|
86
|
+
// Height and width returned by ImagePicker are incorrect on Android.
|
|
87
|
+
const getSize = (): Promise<{ height: number; width: number }> =>
|
|
88
|
+
new Promise((resolve) => {
|
|
89
|
+
Image.getSize(asset.uri, (width, height) => {
|
|
90
|
+
resolve({ height, width });
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
try {
|
|
95
|
+
const { height, width } = await getSize();
|
|
96
|
+
size.height = height;
|
|
97
|
+
size.width = width;
|
|
98
|
+
} catch (e) {
|
|
99
|
+
// do nothing
|
|
100
|
+
console.warn('Error while getting image size of picture captured from camera ', e);
|
|
101
|
+
}
|
|
102
|
+
} else {
|
|
103
|
+
size = {
|
|
104
|
+
height: asset.height,
|
|
105
|
+
width: asset.width,
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
const clearFilter = new RegExp('[.:]', 'g');
|
|
109
|
+
const date = new Date().toISOString().replace(clearFilter, '_');
|
|
110
|
+
const localAsset: MediaAsset = {
|
|
111
|
+
name: 'image_' + date + '.' + asset.uri.split('.').pop(),
|
|
112
|
+
size: asset.fileSize,
|
|
113
|
+
type: asset.type,
|
|
114
|
+
uri: asset.uri,
|
|
115
|
+
...size,
|
|
116
|
+
};
|
|
117
|
+
this.appendAssets([localAsset]);
|
|
118
|
+
return {
|
|
119
|
+
cancelled: false,
|
|
120
|
+
asset: localAsset,
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
} catch (e: unknown) {
|
|
124
|
+
if (e instanceof Error) {
|
|
125
|
+
// on iOS: if it was in inactive state, then the user had just denied the permissions
|
|
126
|
+
if (Platform.OS === 'ios' && AppState.currentState === 'active') {
|
|
127
|
+
const cameraPermissionDeniedMsg = 'User did not grant camera permission.';
|
|
128
|
+
// Open settings when the user did not allow camera permissions
|
|
129
|
+
if (e.message === cameraPermissionDeniedMsg) {
|
|
130
|
+
return { askToOpenSettings: true, cancelled: true };
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return { cancelled: true };
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
const MediaPickerService = internalService ? RNCLIMediaPickerService : undefined;
|
|
141
|
+
|
|
142
|
+
export { MediaPickerService };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Keyboard } from 'react-native';
|
|
2
|
+
|
|
3
|
+
import { StateStore } from '@stream-io/state-store';
|
|
4
|
+
|
|
5
|
+
export type BottomSheetState = {
|
|
6
|
+
open: boolean;
|
|
7
|
+
height: number;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const DEFAULT_STATE: BottomSheetState = {
|
|
11
|
+
open: false,
|
|
12
|
+
height: Number.MAX_SAFE_INTEGER,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const sheetStore = new StateStore<BottomSheetState>(DEFAULT_STATE);
|
|
16
|
+
|
|
17
|
+
const openSheet = () => {
|
|
18
|
+
Keyboard.dismiss();
|
|
19
|
+
sheetStore.partialNext({ open: true });
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const closeSheet = () => sheetStore.partialNext(DEFAULT_STATE);
|
|
23
|
+
|
|
24
|
+
const setHeight = (height: number) => sheetStore.partialNext({ height });
|
|
25
|
+
|
|
26
|
+
export const sheetStoreApi = {
|
|
27
|
+
openSheet,
|
|
28
|
+
closeSheet,
|
|
29
|
+
setHeight,
|
|
30
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useStateStore } from '@stream-io/state-store/react-bindings';
|
|
2
|
+
|
|
3
|
+
import { type BottomSheetState, sheetStore } from './store';
|
|
4
|
+
|
|
5
|
+
const selector = ({ open, height }: BottomSheetState) => ({
|
|
6
|
+
open,
|
|
7
|
+
height,
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export const useBottomSheetState = () => useStateStore(sheetStore, selector);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { StateStore } from '@stream-io/state-store';
|
|
2
|
+
|
|
3
|
+
export type ComposerState = {
|
|
4
|
+
text: string;
|
|
5
|
+
custom?: Record<string, unknown>;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const DEFAULT_STATE: ComposerState = {
|
|
9
|
+
text: '',
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const createNewComposerStore = () => new StateStore<ComposerState>(DEFAULT_STATE);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useStateStore } from '@stream-io/state-store/react-bindings';
|
|
2
|
+
|
|
3
|
+
import { type ComposerState } from './store';
|
|
4
|
+
|
|
5
|
+
import { useMessageComposerContext } from '../../contexts';
|
|
6
|
+
|
|
7
|
+
const selector = ({ text }: ComposerState) => ({
|
|
8
|
+
hasText: !!text && text.length > 0,
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export const useComposerHasText = () => {
|
|
12
|
+
const { state } = useMessageComposerContext();
|
|
13
|
+
return useStateStore(state, selector);
|
|
14
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useStateStore } from '@stream-io/state-store/react-bindings';
|
|
2
|
+
|
|
3
|
+
import { type ComposerState } from './store';
|
|
4
|
+
|
|
5
|
+
import { useMessageComposerContext } from '../../contexts';
|
|
6
|
+
|
|
7
|
+
const selector = ({ text }: ComposerState) => ({
|
|
8
|
+
text,
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export const useComposerText = () => {
|
|
12
|
+
const { state } = useMessageComposerContext();
|
|
13
|
+
return useStateStore(state, selector);
|
|
14
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { StateStore } from '@stream-io/state-store';
|
|
2
|
+
|
|
3
|
+
import type { DictationError, DictationStateValue } from '../../native-specs/NativeAIDictation';
|
|
4
|
+
|
|
5
|
+
export type DictationStoreState = {
|
|
6
|
+
state: DictationStateValue;
|
|
7
|
+
transcript: string;
|
|
8
|
+
isRecording: boolean;
|
|
9
|
+
error?: DictationError | null;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const DEFAULT_STATE: DictationStoreState = {
|
|
13
|
+
state: 'idle',
|
|
14
|
+
transcript: '',
|
|
15
|
+
isRecording: false,
|
|
16
|
+
error: null,
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const dictationStore = new StateStore<DictationStoreState>(DEFAULT_STATE);
|
|
20
|
+
|
|
21
|
+
const reset = () => dictationStore.next(DEFAULT_STATE);
|
|
22
|
+
|
|
23
|
+
export const dictationStoreApi = { reset };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useStateStore } from '@stream-io/state-store/react-bindings';
|
|
2
|
+
|
|
3
|
+
import { dictationStore, type DictationStoreState } from './store';
|
|
4
|
+
|
|
5
|
+
const selector = ({ state, isRecording, error }: DictationStoreState) => ({
|
|
6
|
+
state,
|
|
7
|
+
isRecording,
|
|
8
|
+
error,
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export const useDictationState = () => useStateStore(dictationStore, selector);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { useStateStore } from '@stream-io/state-store/react-bindings';
|
|
2
|
+
|
|
3
|
+
import { dictationStore, type DictationStoreState } from './store';
|
|
4
|
+
|
|
5
|
+
const selector = ({ transcript }: DictationStoreState) => ({
|
|
6
|
+
transcript,
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export const useDictationTranscript = () => useStateStore(dictationStore, selector);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// bottom sheet
|
|
2
|
+
export * from './bottom-sheet/store';
|
|
3
|
+
export * from './bottom-sheet/useBottomSheetState';
|
|
4
|
+
|
|
5
|
+
// message composer
|
|
6
|
+
export * from './composer/store';
|
|
7
|
+
export * from './composer/useComposerHasText';
|
|
8
|
+
export * from './composer/useComposerText';
|
|
9
|
+
|
|
10
|
+
// dictation
|
|
11
|
+
export * from './dictation/store';
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import React, { type PropsWithChildren, useMemo } from 'react';
|
|
2
|
+
import { Platform, type ProcessedColorValue } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import './prism-config';
|
|
5
|
+
|
|
6
|
+
// Imported by file: Metro does not tree-shake, so the package index (every highlighter variant,
|
|
7
|
+
// including the async ones) and the style indexes (every bundled theme) would all be bundled.
|
|
8
|
+
import SyntaxHighlighterHljs from 'react-syntax-highlighter/dist/esm/default-highlight';
|
|
9
|
+
import SyntaxHighlighterPrism from 'react-syntax-highlighter/dist/esm/prism';
|
|
10
|
+
import defaultStyle from 'react-syntax-highlighter/dist/esm/styles/hljs/default-style';
|
|
11
|
+
import prismDefaultStyle from 'react-syntax-highlighter/dist/esm/styles/prism/prism';
|
|
12
|
+
|
|
13
|
+
import type { NativeSyntaxHighlighterProps, SyntaxHighlighterStylesheet } from './types';
|
|
14
|
+
import { DEFAULT_FONT_SIZE, generateNewStylesheet, nativeRenderer } from './utils';
|
|
15
|
+
|
|
16
|
+
import { MarkdownReactiveScrollView } from '../components';
|
|
17
|
+
|
|
18
|
+
export type ColorRange = {
|
|
19
|
+
start: number;
|
|
20
|
+
end: number;
|
|
21
|
+
color: ProcessedColorValue;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const SyntaxHighlighter = ({
|
|
25
|
+
fontFamily = Platform.OS === 'ios' ? 'Courier' : 'Monospace',
|
|
26
|
+
fontSize = DEFAULT_FONT_SIZE,
|
|
27
|
+
children,
|
|
28
|
+
highlighter = 'highlightjs',
|
|
29
|
+
style = highlighter === 'prism' ? prismDefaultStyle : defaultStyle,
|
|
30
|
+
PreTag = MarkdownReactiveScrollView,
|
|
31
|
+
CodeTag = MarkdownReactiveScrollView,
|
|
32
|
+
...rest
|
|
33
|
+
}: PropsWithChildren<NativeSyntaxHighlighterProps>) => {
|
|
34
|
+
const { transformedStyle, defaultColor } = useMemo(
|
|
35
|
+
() =>
|
|
36
|
+
generateNewStylesheet({
|
|
37
|
+
stylesheet: style,
|
|
38
|
+
highlighter,
|
|
39
|
+
}),
|
|
40
|
+
[highlighter, style],
|
|
41
|
+
);
|
|
42
|
+
const renderer = useMemo(
|
|
43
|
+
() =>
|
|
44
|
+
nativeRenderer({
|
|
45
|
+
defaultColor: defaultColor as string,
|
|
46
|
+
fontFamily,
|
|
47
|
+
fontSize,
|
|
48
|
+
}),
|
|
49
|
+
[defaultColor, fontFamily, fontSize],
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
const Highlighter = highlighter === 'prism' ? SyntaxHighlighterPrism : SyntaxHighlighterHljs;
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<Highlighter
|
|
56
|
+
PreTag={PreTag}
|
|
57
|
+
CodeTag={CodeTag}
|
|
58
|
+
{...rest}
|
|
59
|
+
style={transformedStyle as SyntaxHighlighterStylesheet}
|
|
60
|
+
horizontal={true}
|
|
61
|
+
renderer={renderer}
|
|
62
|
+
>
|
|
63
|
+
{children}
|
|
64
|
+
</Highlighter>
|
|
65
|
+
);
|
|
66
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { PerfText } from '../../components';
|
|
4
|
+
import { flattenRowsToTextAndColorRanges } from '../utils';
|
|
5
|
+
|
|
6
|
+
export const AndroidNativeRenderer = ({
|
|
7
|
+
rows,
|
|
8
|
+
stylesheet,
|
|
9
|
+
defaultColor,
|
|
10
|
+
fontFamily,
|
|
11
|
+
fontSize,
|
|
12
|
+
lineHeight = 17,
|
|
13
|
+
}: {
|
|
14
|
+
rows: rendererNode[];
|
|
15
|
+
stylesheet: rendererProps['stylesheet'];
|
|
16
|
+
defaultColor: string;
|
|
17
|
+
fontFamily?: string;
|
|
18
|
+
fontSize: number;
|
|
19
|
+
lineHeight: number;
|
|
20
|
+
}) => {
|
|
21
|
+
const { text, ranges } = flattenRowsToTextAndColorRanges(rows, {
|
|
22
|
+
stylesheet,
|
|
23
|
+
defaultColor,
|
|
24
|
+
fontFamily,
|
|
25
|
+
fontSize,
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
return <PerfText text={text} ranges={ranges} lineHeight={lineHeight} fontSize={fontSize} />;
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AndroidNativeRenderer';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This sub-library is a port/took inspiration from https://github.com/conorhastings/react-native-syntax-highlighter.
|
|
3
|
+
* We create our own since we don't want the version of https://github.com/react-syntax-highlighter/react-syntax-highlighter
|
|
4
|
+
* to be pinned to version 6 but rather use whatever we see fit.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export * from './SyntaxHighlighter';
|
|
8
|
+
export * from './prism-config';
|
|
9
|
+
export * from './utils';
|
|
10
|
+
|
|
11
|
+
export * from './types';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { TextStyle } from 'react-native';
|
|
3
|
+
import type { SyntaxHighlighterProps } from 'react-syntax-highlighter';
|
|
4
|
+
|
|
5
|
+
export type RNStyle = TextStyle;
|
|
6
|
+
export type RNSheet = Record<string, RNStyle>;
|
|
7
|
+
|
|
8
|
+
export type SyntaxHighlighterStylesheet = NonNullable<NativeSyntaxHighlighterProps['style']>;
|
|
9
|
+
|
|
10
|
+
export type ExtraSyntaxHighlighterProps = {
|
|
11
|
+
fontFamily?: string;
|
|
12
|
+
fontSize?: number;
|
|
13
|
+
highlighter?: 'highlightjs' | 'prism';
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type NativeSyntaxHighlighterProps = SyntaxHighlighterProps & ExtraSyntaxHighlighterProps;
|
|
17
|
+
|
|
18
|
+
export type CSSP = React.CSSProperties;
|
|
19
|
+
|
|
20
|
+
/** Options for unit conversion */
|
|
21
|
+
export type ConvertOpts = {
|
|
22
|
+
/** base for `em` (defaults to 16) */
|
|
23
|
+
baseFontSize?: number;
|
|
24
|
+
/** root base for `rem` (defaults to baseFontSize) */
|
|
25
|
+
rootFontSize?: number;
|
|
26
|
+
};
|