@cometchat/chat-uikit-react-native 5.3.10 → 5.4.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/android/src/main/java/com/reactnativecometchatuikit/CometChatClipboardModule.kt +52 -0
- package/android/src/main/java/com/reactnativecometchatuikit/CometchatUiKitPackage.java +1 -0
- package/android/src/main/java/com/reactnativecometchatuikit/FileManager.java +95 -8
- package/android/src/main/java/com/reactnativecometchatuikit/RichTextEditorView.kt +300 -7
- package/android/src/main/java/com/reactnativecometchatuikit/RichTextEditorViewManager.kt +2 -1
- package/android/src/main/java/com/reactnativecometchatuikit/SoundPlayer.java +85 -47
- package/ios/CometChatClipboardModule.m +11 -0
- package/ios/CometChatClipboardModule.swift +41 -0
- package/ios/FileManager.m +201 -39
- package/ios/RichTextEditorView.swift +367 -8
- package/ios/RichTextEditorViewManager.m +1 -0
- package/ios/SoundPlayer.m +18 -6
- package/package.json +10 -7
- package/react-native-cometchat-ui-kit.podspec +1 -0
- package/src/CometChatCompactMessageComposer/CometChatCompactMessageComposer.tsx +692 -107
- package/src/CometChatConversations/CometChatConversations.tsx +19 -6
- package/src/CometChatMessageComposer/CometChatMessageComposer.tsx +649 -49
- package/src/CometChatMessageHeader/CometChatMessageHeader.tsx +23 -4
- package/src/CometChatMessageList/CometChatMessageList.tsx +463 -54
- package/src/CometChatMessageList/SEARCH_NAV_SLOWNESS_FINDINGS_AND_FIX.md +313 -0
- package/src/CometChatMessageList/components/MessageListItem.tsx +30 -17
- package/src/CometChatMessageList/style.ts +33 -5
- package/src/CometChatRichTextEditor/RichTextEditorViewNativeComponent.ts +13 -0
- package/src/CometChatRichTextEditor/index.tsx +25 -0
- package/src/CometChatSearch/CometChatSearch.tsx +296 -154
- package/src/calls/CallingExtension.tsx +19 -13
- package/src/extensions/LinkPreview/LinkPreviewBubble.tsx +20 -1
- package/src/extensions/ThumbnailGeneration/ThumbnailGenerationDecorator.tsx +20 -9
- package/src/index.ts +39 -0
- package/src/shared/CometChatUiKit/CometChatUIKit.ts +40 -34
- package/src/shared/base/Types.ts +3 -0
- package/src/shared/constants/UIKitConstants.ts +15 -1
- package/src/shared/formatters/CometChatRichTextFormatter/index.tsx +3 -2
- package/src/shared/framework/DataSource.ts +14 -4
- package/src/shared/framework/DataSourceDecorator.tsx +17 -8
- package/src/shared/framework/MessageDataSource.tsx +307 -60
- package/src/shared/helper/useToast.tsx +29 -0
- package/src/shared/icons/components/audio-file-type.tsx +11 -22
- package/src/shared/icons/components/document-file-type.tsx +11 -24
- package/src/shared/icons/components/image-file-type.tsx +12 -21
- package/src/shared/icons/components/link-file-type.tsx +25 -0
- package/src/shared/icons/components/pdf-file-type.tsx +11 -22
- package/src/shared/icons/components/presentation-file-type.tsx +11 -24
- package/src/shared/icons/components/spreadsheet-file-type.tsx +11 -24
- package/src/shared/icons/components/text-file-type.tsx +11 -21
- package/src/shared/icons/components/unknown-file-type.tsx +21 -25
- package/src/shared/icons/components/video-file-type.tsx +11 -24
- package/src/shared/icons/components/zip-file-type.tsx +11 -24
- package/src/shared/icons/icon-mapping.tsx +2 -0
- package/src/shared/index.ts +28 -0
- package/src/shared/modals/AttachmentPickerConfiguration.ts +13 -0
- package/src/shared/modals/SelectedAttachment.ts +65 -0
- package/src/shared/modals/UploadState.ts +10 -0
- package/src/shared/modals/index.ts +4 -0
- package/src/shared/resources/CometChatLocalizeNew/resources/de/translation.json +42 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/en/translation.json +42 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/es/translation.json +43 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/fr/translation.json +43 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/hi/translation.json +43 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/hu/translation.json +43 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/it/translation.json +43 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/ja/translation.json +43 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/ko/translation.json +43 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/lt/translation.json +43 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/ms/translation.json +43 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/nl/translation.json +43 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/pt/translation.json +43 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/ru/translation.json +43 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/sv/translation.json +43 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/tr/translation.json +43 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/zh/translation.json +43 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/zh-tw/translation.json +43 -2
- package/src/shared/services/UploadQueueService.ts +145 -0
- package/src/shared/services/index.ts +2 -0
- package/src/shared/utils/CometChatMessagePreview/CometChatMessagePreview.tsx +44 -19
- package/src/shared/utils/MessageUtils.tsx +13 -4
- package/src/shared/utils/attachmentLimits.ts +156 -0
- package/src/shared/utils/audioPlaybackCoordinator.ts +28 -0
- package/src/shared/utils/batchMediaContext.tsx +30 -0
- package/src/shared/utils/conversationUtils.ts +26 -4
- package/src/shared/utils/elementType.tsx +38 -0
- package/src/shared/utils/groupAttachments.ts +93 -0
- package/src/shared/utils/index.ts +8 -0
- package/src/shared/utils/openMultiFileChooser.ts +123 -0
- package/src/shared/utils/partitionAttachmentsByKind.ts +44 -0
- package/src/shared/views/ClipboardPasteHandler/ClipboardPasteHandler.ts +28 -0
- package/src/shared/views/ClipboardPasteHandler/NativeCometChatClipboardModule.ts +16 -0
- package/src/shared/views/ClipboardPasteHandler/index.ts +2 -0
- package/src/shared/views/CometChatActionSheet/CometChatActionSheet.tsx +1 -0
- package/src/shared/views/CometChatAttachmentPreview/CometChatAttachmentPreview.style.ts +32 -0
- package/src/shared/views/CometChatAttachmentPreview/CometChatAttachmentPreview.tsx +90 -0
- package/src/shared/views/CometChatAttachmentPreview/CometChatAttachmentPreviewItem.tsx +276 -0
- package/src/shared/views/CometChatAttachmentPreview/CometChatAttachmentTile.tsx +827 -0
- package/src/shared/views/CometChatAttachmentPreview/CometChatAttachmentTray.tsx +110 -0
- package/src/shared/views/CometChatAttachmentPreview/StagedVideoDurationProbe.tsx +53 -0
- package/src/shared/views/CometChatAttachmentPreview/index.ts +8 -0
- package/src/shared/views/CometChatAttachmentViewer/CometChatAttachmentViewer.tsx +305 -0
- package/src/shared/views/CometChatAttachmentViewer/index.ts +2 -0
- package/src/shared/views/CometChatAudioBubble/CometChatAudioBubble.tsx +71 -74
- package/src/shared/views/CometChatAudiosBubble/CometChatAudiosBubble.tsx +587 -0
- package/src/shared/views/CometChatAudiosBubble/index.ts +2 -0
- package/src/shared/views/CometChatBottomSheet/CometChatBottomSheet.tsx +31 -20
- package/src/shared/views/CometChatCaptionText/CometChatCaptionText.tsx +182 -0
- package/src/shared/views/CometChatCaptionText/index.ts +2 -0
- package/src/shared/views/CometChatComposerErrorBanner.tsx +83 -0
- package/src/shared/views/CometChatConversationStarter/CometChatConversationStarter.tsx +141 -0
- package/src/shared/views/CometChatConversationStarter/index.ts +2 -0
- package/src/shared/views/CometChatConversationSummary/CometChatConversationSummary.tsx +155 -0
- package/src/shared/views/CometChatConversationSummary/index.ts +2 -0
- package/src/shared/views/CometChatFileBubble/style.ts +6 -4
- package/src/shared/views/CometChatFilesBubble/CometChatFilesBubble.tsx +316 -0
- package/src/shared/views/CometChatFilesBubble/index.ts +2 -0
- package/src/shared/views/CometChatImagesBubble/CometChatImagesBubble.tsx +323 -0
- package/src/shared/views/CometChatImagesBubble/index.ts +2 -0
- package/src/shared/views/CometChatMediaViewer/CometChatMediaViewer.tsx +425 -0
- package/src/shared/views/CometChatMediaViewer/index.ts +2 -0
- package/src/shared/views/CometChatMediaViewer/mediaViewerUtils.ts +30 -0
- package/src/shared/views/CometChatMessageBubble/CometChatMessageBubble.tsx +14 -4
- package/src/shared/views/CometChatSendButtonView/CometChatSendButtonView.tsx +1 -0
- package/src/shared/views/CometChatSmartReplies/CometChatSmartReplies.tsx +172 -0
- package/src/shared/views/CometChatSmartReplies/index.ts +2 -0
- package/src/shared/views/CometChatTextBubble/CometChatTextBubble.tsx +4 -3
- package/src/shared/views/CometChatVideoBubble/style.ts +3 -3
- package/src/shared/views/CometChatVideosBubble/CometChatVideosBubble.tsx +441 -0
- package/src/shared/views/CometChatVideosBubble/index.ts +2 -0
- package/src/shared/views/CometChatVoiceNoteBubble/CometChatVoiceNoteBubble.tsx +78 -0
- package/src/shared/views/CometChatVoiceNoteBubble/index.ts +2 -0
- package/src/shared/views/index.ts +37 -1
- package/src/theme/CometChatThemeHelper.ts +8 -0
- package/src/theme/default/color/dark.ts +9 -0
- package/src/theme/default/color/light.ts +10 -0
- package/src/theme/type.ts +73 -0
|
@@ -38,6 +38,7 @@ const alertColors = {
|
|
|
38
38
|
const staticColors = {
|
|
39
39
|
staticBlack: "#141414",
|
|
40
40
|
staticWhite: "#FFFFFF",
|
|
41
|
+
staticWhite35: "rgba(255, 255, 255, 0.35)", // staticWhite @ 35% (color-mix(staticWhite 35%, transparent))
|
|
41
42
|
};
|
|
42
43
|
|
|
43
44
|
const overlayColors = {
|
|
@@ -95,6 +96,7 @@ export const defaultColorLight = {
|
|
|
95
96
|
sendBubbleLink: staticColors.staticWhite,
|
|
96
97
|
sendBubbleTimestamp: staticColors.staticWhite,
|
|
97
98
|
sendBubbleIcon: staticColors.staticWhite,
|
|
99
|
+
sendBubbleTrack: staticColors.staticWhite35, // unfilled seek-bar track on the send bubble
|
|
98
100
|
|
|
99
101
|
receiveBubbleBackground: neutralColors.neutral300,
|
|
100
102
|
receiveBubbleText: neutralColors.neutral900,
|
|
@@ -109,6 +111,14 @@ export const defaultColorLight = {
|
|
|
109
111
|
previewCodeBlockBackground: overlayColors.overlayCodeBlock,
|
|
110
112
|
// Reply preview code block border
|
|
111
113
|
previewCodeBlockBorder: overlayColors.overlayCodeBlockBorder,
|
|
114
|
+
|
|
115
|
+
// Media overlays — dark scrims that sit ON TOP of image/video content, so they stay dark in BOTH
|
|
116
|
+
// themes (a light scrim over media reads wrong). Tokenized here so every media/attachment surface
|
|
117
|
+
// pulls the same values instead of hardcoding them per component.
|
|
118
|
+
mediaScrim: "#0D0D0D", // opaque fill behind a video cell / poster
|
|
119
|
+
mediaOverlay: "rgba(0, 0, 0, 0.6)", // play-button circle, "+N" overflow scrim, batch-count overlay
|
|
120
|
+
mediaDurationChip: "rgba(0, 0, 0, 0.72)", // duration pill (darker for text legibility)
|
|
121
|
+
mediaErrorOverlay: "rgba(0, 0, 0, 0.45)", // dim for an errored media tile
|
|
112
122
|
};
|
|
113
123
|
type EachColorValue<T extends typeof defaultColorLight> = {
|
|
114
124
|
[P in keyof T]: ColorValue;
|
package/src/theme/type.ts
CHANGED
|
@@ -330,6 +330,79 @@ export interface CometChatTheme {
|
|
|
330
330
|
downloadIconStyle: ImageStyle;
|
|
331
331
|
dateReceiptContainerStyle: ViewStyle;
|
|
332
332
|
};
|
|
333
|
+
// ── Multiple-attachment (§7 fan-out) bubbles — theme override surfaces, same pattern as
|
|
334
|
+
// avatarStyle/badgeStyle: a developer sets these on the theme and each bubble applies them
|
|
335
|
+
// over its tokenized defaults via deepMerge(theme.x, compTheme.x, style). All optional. ──
|
|
336
|
+
audiosBubbleStyles?: {
|
|
337
|
+
containerStyle?: ViewStyle;
|
|
338
|
+
cardStyle?: ViewStyle;
|
|
339
|
+
playButtonStyle?: ViewStyle;
|
|
340
|
+
playIconStyle?: ImageStyle;
|
|
341
|
+
fileNameStyle?: TextStyle;
|
|
342
|
+
seekTrackStyle?: ViewStyle;
|
|
343
|
+
seekProgressStyle?: ViewStyle;
|
|
344
|
+
seekThumbStyle?: ViewStyle;
|
|
345
|
+
timeTextStyle?: TextStyle;
|
|
346
|
+
downloadIconStyle?: ImageStyle;
|
|
347
|
+
captionStyle?: TextStyle;
|
|
348
|
+
expandButtonTextStyle?: TextStyle; // "Show N more" / "Show less" toggle label — parity with fileBubbleStyles
|
|
349
|
+
};
|
|
350
|
+
mediaGridBubbleStyles?: {
|
|
351
|
+
containerStyle?: ViewStyle;
|
|
352
|
+
cellStyle?: ViewStyle;
|
|
353
|
+
playButtonStyle?: ViewStyle;
|
|
354
|
+
playIconStyle?: ImageStyle;
|
|
355
|
+
durationChipStyle?: ViewStyle;
|
|
356
|
+
durationTextStyle?: TextStyle;
|
|
357
|
+
overflowOverlayStyle?: ViewStyle;
|
|
358
|
+
overflowTextStyle?: TextStyle;
|
|
359
|
+
};
|
|
360
|
+
filesBubbleStyles?: {
|
|
361
|
+
containerStyle?: ViewStyle;
|
|
362
|
+
cardStyle?: ViewStyle;
|
|
363
|
+
fileNameStyle?: TextStyle;
|
|
364
|
+
fileSizeTextStyle?: TextStyle;
|
|
365
|
+
downloadIconStyle?: ImageStyle;
|
|
366
|
+
expandButtonTextStyle?: TextStyle;
|
|
367
|
+
captionStyle?: TextStyle;
|
|
368
|
+
};
|
|
369
|
+
voiceNoteBubbleStyles?: {
|
|
370
|
+
containerStyle?: ViewStyle;
|
|
371
|
+
captionStyle?: TextStyle;
|
|
372
|
+
playViewContainerStyle?: ViewStyle;
|
|
373
|
+
playIconStyle?: ImageStyle;
|
|
374
|
+
playIconContainerStyle?: ViewStyle;
|
|
375
|
+
waveStyle?: ViewStyle;
|
|
376
|
+
waveContainerStyle?: ViewStyle;
|
|
377
|
+
playProgressTextStyle?: TextStyle;
|
|
378
|
+
};
|
|
379
|
+
// ── Composer attachment tray/tiles (pre-send preview) — theme override surfaces, same pattern. ──
|
|
380
|
+
composerErrorBannerStyles?: {
|
|
381
|
+
containerStyle?: ViewStyle;
|
|
382
|
+
textStyle?: TextStyle;
|
|
383
|
+
closeIconStyle?: ImageStyle;
|
|
384
|
+
};
|
|
385
|
+
attachmentTrayStyles?: {
|
|
386
|
+
containerStyle?: ViewStyle;
|
|
387
|
+
progressTrackStyle?: ViewStyle;
|
|
388
|
+
progressFillStyle?: ViewStyle;
|
|
389
|
+
};
|
|
390
|
+
attachmentTileStyles?: {
|
|
391
|
+
containerStyle?: ViewStyle;
|
|
392
|
+
fileCardStyle?: ViewStyle;
|
|
393
|
+
mediaTileStyle?: ViewStyle;
|
|
394
|
+
audioCardStyle?: ViewStyle;
|
|
395
|
+
fileNameStyle?: TextStyle;
|
|
396
|
+
removeButtonStyle?: ViewStyle;
|
|
397
|
+
durationChipStyle?: ViewStyle;
|
|
398
|
+
};
|
|
399
|
+
attachmentPreviewStyles?: {
|
|
400
|
+
containerStyle?: ViewStyle;
|
|
401
|
+
};
|
|
402
|
+
attachmentPreviewItemStyles?: {
|
|
403
|
+
containerStyle?: ViewStyle;
|
|
404
|
+
removeButtonStyle?: ViewStyle;
|
|
405
|
+
};
|
|
333
406
|
collaborativeBubbleStyles?: {
|
|
334
407
|
containerStyle?: ViewStyle;
|
|
335
408
|
threadedMessageStyle?: CometChatTheme["threadedMessageStyles"];
|