@samparkchat/sampark-web-chat 0.0.2 → 0.0.4

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.
Files changed (29) hide show
  1. package/package.json +1 -1
  2. package/sampark/sampark-chat/components/Actions/GroupMessageActions.d.ts +1 -0
  3. package/sampark/sampark-chat/components/Actions/GroupMessageActions.js +56 -31
  4. package/sampark/sampark-chat/components/Actions/MessageActions.d.ts +2 -1
  5. package/sampark/sampark-chat/components/Actions/MessageActions.js +161 -158
  6. package/sampark/sampark-chat/components/AttachmentFileSharing.js +2 -1
  7. package/sampark/sampark-chat/components/Headers/ChatHeader.d.ts +1 -0
  8. package/sampark/sampark-chat/components/Headers/ChatHeader.js +4 -4
  9. package/sampark/sampark-chat/components/Headers/GroupChatHeader.d.ts +1 -0
  10. package/sampark/sampark-chat/components/Headers/GroupChatHeader.js +3 -1
  11. package/sampark/sampark-chat/components/Headers/SearchHeader.d.ts +8 -0
  12. package/sampark/sampark-chat/components/Headers/SearchHeader.js +57 -0
  13. package/sampark/sampark-chat/components/ThreadConversation.d.ts +50 -0
  14. package/sampark/sampark-chat/components/ThreadConversation.js +293 -0
  15. package/sampark/sampark-chat/components/lists/ViewParticipents.d.ts +1 -0
  16. package/sampark/sampark-chat/components/lists/ViewParticipents.js +9 -5
  17. package/sampark/sampark-chat/index.d.ts +5 -0
  18. package/sampark/sampark-chat/index.js +5 -5
  19. package/sampark/sampark-chat/screens/PeerChatScreen.js +191 -172
  20. package/sampark/sampark-chat/screens/SamparkChatProvider.d.ts +1 -1
  21. package/sampark/sampark-chat/screens/SamparkchatScreen.d.ts +1 -1
  22. package/sampark/sampark-chat/screens/SamparkchatScreen.js +1 -1
  23. package/sampark/sampark-chat/screens/groupChatScreen.js +110 -107
  24. package/sampark/sampark-chat/theme/colors.d.ts +1 -0
  25. package/sampark/sampark-chat/theme/colors.js +1 -0
  26. package/sampark/sampark-chat/theme/fonts.d.ts +12 -0
  27. package/sampark/sampark-chat/theme/fonts.js +12 -1
  28. package/sampark/sampark-chat/theme/icons.d.ts +70 -0
  29. package/sampark/sampark-chat/theme/icons.js +16 -1
@@ -20,6 +20,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
20
20
  };
21
21
  import React, { useEffect, useRef, useState } from "react";
22
22
  import GroupChatHeader from "../components/Headers/GroupChatHeader";
23
+ import SearchHeader from "../components/Headers/SearchHeader";
23
24
  import { getProfilePicById, getUserNameById, getInitials, unifiedToEmoji } from '../services/Common';
24
25
  import { getTimeFromTimestamp, getChatDateDisplay } from '../services/DateFormat';
25
26
  import EmojiPicker from 'emoji-picker-react';
@@ -28,6 +29,8 @@ import ReactionModal from "../components/models/ReactionModal";
28
29
  import MentionList from "../components/MentionList";
29
30
  import AttachmentGroupFileSharing from "../components/AttachmentGroupFileSharing";
30
31
  import colors from "../theme/colors";
32
+ import ThreadConversation from "../components/ThreadConversation";
33
+ import fonts from '../theme/fonts';
31
34
  var GroupChatScreen = function (_a) {
32
35
  var participantsList = _a.participantsList, viewParticipants = _a.viewParticipants, userMessages = _a.userMessages, userJoinedGroupStatus = _a.userJoinedGroupStatus, setShowGroupOptionBottomSheet = _a.setShowGroupOptionBottomSheet, setShowParticipantsList = _a.setShowParticipantsList, handleGroupBackPress = _a.handleGroupBackPress, groupName = _a.groupName, setShowHideParticipantScreen = _a.setShowHideParticipantScreen, setViewParticipantsList = _a.setViewParticipantsList, userMessage = _a.userMessage, setUserMessage = _a.setUserMessage, handleSendPress = _a.handleSendPress, showInputFeild = _a.showInputFeild, userName = _a.userName, roomId = _a.roomId, client = _a.client, userId = _a.userId, GrouponlineUsers = _a.GrouponlineUsers, onHeaderClick = _a.onHeaderClick, handleVideoCall = _a.handleVideoCall, handleAudioCall = _a.handleAudioCall, rejoinGroupCall = _a.rejoinGroupCall, showJoinGroupCallBtn = _a.showJoinGroupCallBtn, _b = _a.showVideoCall, showVideoCall = _b === void 0 ? false : _b;
33
36
  var _c = useState(0), scrollPosition = _c[0], setScrollPosition = _c[1];
@@ -55,6 +58,9 @@ var GroupChatScreen = function (_a) {
55
58
  var _v = useState([]), mentionedUsers = _v[0], setMentionedUsers = _v[1];
56
59
  var _w = useState(false), showThreadPanel = _w[0], setShowThreadPanel = _w[1];
57
60
  var _x = useState(null), threadMessageId = _x[0], setThreadMessageId = _x[1];
61
+ var _y = useState(false), showImageModal = _y[0], setShowImageModal = _y[1];
62
+ var _z = useState(''), selectedImageUrl = _z[0], setSelectedImageUrl = _z[1];
63
+ var _0 = useState(false), showSearchPanel = _0[0], setShowSearchPanel = _0[1];
58
64
  console.log("group online users", GrouponlineUsers);
59
65
  var normalizeMessages = function (arr) {
60
66
  return (arr !== null && arr !== void 0 ? arr : []).map(function (m, i) {
@@ -94,7 +100,10 @@ var GroupChatScreen = function (_a) {
94
100
  maxHeight: '300px',
95
101
  objectFit: 'cover',
96
102
  cursor: 'pointer'
97
- }, onClick: function () { return window.open(fullImageUrl, '_blank'); }, onError: function (e) { e.currentTarget.style.display = 'none'; } }),
103
+ }, onClick: function () {
104
+ setSelectedImageUrl(fullImageUrl);
105
+ setShowImageModal(true);
106
+ }, onError: function (e) { e.currentTarget.style.display = 'none'; } }),
98
107
  React.createElement("div", { style: {
99
108
  padding: '8px',
100
109
  fontSize: '12px',
@@ -578,7 +587,7 @@ var GroupChatScreen = function (_a) {
578
587
  React.createElement("div", { style: styles.mainContainer, className: "group-chat-container" },
579
588
  React.createElement("div", { style: styles.container },
580
589
  React.createElement("div", { style: styles.headerContainer(scrollPosition) },
581
- React.createElement(GroupChatHeader, { userJoinedGroupStatus: userJoinedGroupStatus, setShowGroupOptionBottomSheet: setShowGroupOptionBottomSheet, setShowParticipantsList: setShowParticipantsList, onClick: handleGroupBackPress, headingStyle: styles.headingStyle, showBackButton: true, mainHeading: groupName, setShowHideParticipantScreen: setShowHideParticipantScreen, setViewParticipantsList: setViewParticipantsList, onHeaderClick: onHeaderClick, handleVideoCall: handleVideoCall, handleAudioCall: handleAudioCall, rejoinGroupCall: rejoinGroupCall, showJoinGroupCallBtn: showJoinGroupCallBtn, showVideoCall: showVideoCall })),
590
+ React.createElement(GroupChatHeader, { userJoinedGroupStatus: userJoinedGroupStatus, setShowGroupOptionBottomSheet: setShowGroupOptionBottomSheet, setShowParticipantsList: setShowParticipantsList, onClick: handleGroupBackPress, headingStyle: styles.headingStyle, showBackButton: true, mainHeading: groupName, setShowHideParticipantScreen: setShowHideParticipantScreen, setViewParticipantsList: setViewParticipantsList, onHeaderClick: onHeaderClick, onSearch: function () { return setShowSearchPanel(true); }, handleVideoCall: handleVideoCall, handleAudioCall: handleAudioCall, rejoinGroupCall: rejoinGroupCall, showJoinGroupCallBtn: showJoinGroupCallBtn, showVideoCall: showVideoCall })),
582
591
  userJoinedGroupStatus === "Active" && typingUser && (React.createElement("div", { style: styles.typingIndicator },
583
592
  React.createElement("span", null, "".concat(typingUser, " is typing...")))),
584
593
  React.createElement("div", { style: styles.scrollContainer, className: "scroll-container", onScroll: handleScroll, ref: scrollViewRef },
@@ -600,6 +609,32 @@ var GroupChatScreen = function (_a) {
600
609
  var _a;
601
610
  var globalIndex = messages.findIndex(function (m) { return m.messageId === item.messageId; });
602
611
  var groups = groupReactions(item.reactions, userId);
612
+ var actionsElement = (React.createElement(GroupMessageActions, { showEmojiPicker: activeEmojiPickerMsgIdx === globalIndex, showMenu: activeMenuMsgIdx === globalIndex, onEmojiClick: function () {
613
+ if (!item.reply)
614
+ setActiveEmojiPickerMsgIdx(globalIndex);
615
+ }, onMenuClick: function () {
616
+ setActiveMenuMsgIdx(function (prev) { return (prev === globalIndex ? null : globalIndex); });
617
+ setActiveEmojiPickerMsgIdx(null);
618
+ }, onEmojiSelect: function (data) {
619
+ var _a;
620
+ if (data === null || data === void 0 ? void 0 : data.emojiId) {
621
+ console.log("Selected emoji:", data.emojiId, "type:", data.emojiType);
622
+ toggleReaction(globalIndex, data.emojiId, (_a = data.emojiType) !== null && _a !== void 0 ? _a : "unknown");
623
+ }
624
+ setActiveEmojiPickerMsgIdx(null);
625
+ }, onCloseEmojiPicker: function () { return setActiveEmojiPickerMsgIdx(null); }, onCloseMenu: function () { return setActiveMenuMsgIdx(null); }, message: item.message, position: item.user === userId ? 'left' : 'right', canEdit: item.user === userId, onEditClick: function () { return startInlineEdit(globalIndex); }, onReplyClick: function () {
626
+ var rt = {
627
+ messageId: item.messageId,
628
+ userId: item.user,
629
+ text: item.message,
630
+ };
631
+ setReplyTarget(rt);
632
+ setThreadMessageId(item.messageId);
633
+ setShowThreadPanel(true);
634
+ setTimeout(function () {
635
+ scrollToMessage(item.messageId);
636
+ }, 120);
637
+ }, inline: true }));
603
638
  return (React.createElement("div", { className: "message-container", key: item.messageId || index, "data-message-id": item.messageId, style: __assign(__assign({}, styles.messageContainer), (item.reply ? styles.replyContainer : {})) },
604
639
  !item.reply && (React.createElement("div", { style: { position: 'relative' } },
605
640
  getProfilePicById(allParticipantsList, item.user) ? (React.createElement("img", { src: getProfilePicById(allParticipantsList, item.user), alt: "Profile", style: styles.avatar, onError: function (e) {
@@ -622,11 +657,14 @@ var GroupChatScreen = function (_a) {
622
657
  right: '14px',
623
658
  border: '2px solid white'
624
659
  } })))),
660
+ item.user === userId ? actionsElement : null,
625
661
  React.createElement("div", { style: __assign(__assign({}, styles.messageContent), (item.reply ? styles.replyMessageContent : {})) },
626
- React.createElement("div", { style: styles.personName }, getUserNameById(allParticipantsList, item.user)),
627
- React.createElement("div", { style: styles.message }, item.messageType === 'file' && item.fileInfo
628
- ? renderFileMessage(item.fileInfo)
629
- : renderMessageWithMentions(item.message, userId)),
662
+ React.createElement("div", { style: { display: 'flex', flexDirection: 'column' } },
663
+ item.user !== userId && (React.createElement("div", { style: styles.personNameOutside }, getUserNameById(allParticipantsList, item.user))),
664
+ React.createElement("div", { style: styles.messageContentInner },
665
+ React.createElement("div", { style: styles.message }, item.messageType === 'file' && item.fileInfo
666
+ ? renderFileMessage(item.fileInfo)
667
+ : renderMessageWithMentions(item.message, userId)))),
630
668
  React.createElement("div", { style: styles.messageFooter },
631
669
  React.createElement("span", { style: __assign(__assign({}, styles.time), { display: 'flex', alignItems: 'center', gap: '4px' }) },
632
670
  item.is_edited && (React.createElement("span", { style: {
@@ -669,7 +707,7 @@ var GroupChatScreen = function (_a) {
669
707
  justifyContent: item.reply ? 'flex-end' : 'flex-start',
670
708
  flexWrap: 'wrap'
671
709
  } },
672
- gSorted.slice(0, SHOW).map(function (g) { return (React.createElement("button", { key: g.id, onClick: function (e) { e.stopPropagation(); handleChipClick(g.id, g.type, g.mine); }, title: g.type, style: chipStyle(!!g.mine) },
710
+ gSorted.slice(0, SHOW).map(function (g) { return (React.createElement("button", { key: g.id, onClick: function (e) { e.stopPropagation(); handleChipClick(g.id, g.type, g.mine); }, "aria-label": g.type ? "".concat(g.type, " reaction") : 'reaction', style: chipStyle(!!g.mine) },
673
711
  React.createElement("span", { style: { fontSize: 14 } }, unifiedToEmoji(g.id)),
674
712
  React.createElement("span", null, g.count))); }),
675
713
  uniqueCount > SHOW && (React.createElement("button", { onClick: function () { return openReactionModal(globalIndex, 'all'); }, style: {
@@ -684,9 +722,10 @@ var GroupChatScreen = function (_a) {
684
722
  lineHeight: 1.2,
685
723
  cursor: 'pointer',
686
724
  boxShadow: '0 1px 2px rgba(0,0,0,0.06)'
687
- }, "aria-label": "More reactions", title: "More" }, "+"))));
725
+ }, "aria-label": "More reactions" }, "+"))));
688
726
  })(),
689
727
  item.reply && (React.createElement("span", { style: styles.tickMark }, item.status === 'sent' ? '✓' : ''))),
728
+ item.user !== userId ? actionsElement : null,
690
729
  (function () {
691
730
  var replies = repliesMap.get(item.messageId);
692
731
  var count = (replies === null || replies === void 0 ? void 0 : replies.length) || 0;
@@ -718,33 +757,6 @@ var GroupChatScreen = function (_a) {
718
757
  " ",
719
758
  count === 1 ? 'Reply' : 'Replies'))));
720
759
  })()),
721
- React.createElement("div", { className: "chat-message-icons", style: __assign(__assign({ position: 'absolute', top: '40%' }, (item.reply ? { right: 70 } : { left: 120 })), { display: 'flex', gap: 5, opacity: 0, pointerEvents: 'none' }) },
722
- React.createElement(GroupMessageActions, { showEmojiPicker: activeEmojiPickerMsgIdx === globalIndex, showMenu: activeMenuMsgIdx === globalIndex, onEmojiClick: function () {
723
- if (!item.reply)
724
- setActiveEmojiPickerMsgIdx(globalIndex);
725
- }, onMenuClick: function () {
726
- setActiveMenuMsgIdx(function (prev) { return (prev === globalIndex ? null : globalIndex); });
727
- setActiveEmojiPickerMsgIdx(null);
728
- }, onEmojiSelect: function (data) {
729
- var _a;
730
- if (data === null || data === void 0 ? void 0 : data.emojiId) {
731
- console.log("Selected emoji:", data.emojiId, "type:", data.emojiType);
732
- toggleReaction(globalIndex, data.emojiId, (_a = data.emojiType) !== null && _a !== void 0 ? _a : "unknown");
733
- }
734
- setActiveEmojiPickerMsgIdx(null);
735
- }, onCloseEmojiPicker: function () { return setActiveEmojiPickerMsgIdx(null); }, onCloseMenu: function () { return setActiveMenuMsgIdx(null); }, message: item.message, position: item.reply ? 'left' : 'right', canEdit: !!item.reply, onEditClick: function () { return startInlineEdit(globalIndex); }, onReplyClick: function () {
736
- var rt = {
737
- messageId: item.messageId,
738
- userId: item.user,
739
- text: item.message,
740
- };
741
- setReplyTarget(rt);
742
- setThreadMessageId(item.messageId);
743
- setShowThreadPanel(true);
744
- setTimeout(function () {
745
- scrollToMessage(item.messageId);
746
- }, 120);
747
- } })),
748
760
  reactionModal.open && reactionModal.msgIdx !== null && (React.createElement(ReactionModal, { open: reactionModal.open, onClose: closeReactionModal, reactions: (_a = messages[reactionModal.msgIdx]) === null || _a === void 0 ? void 0 : _a.reactions, participants: allParticipantsList, currentUserId: userId, tab: reactionModal.tab, onTabChange: function (t) { return setReactionModal(function (s) { return (__assign(__assign({}, s), { tab: t })); }); } }))));
749
761
  }))); }))),
750
762
  userJoinedGroupStatus === "Left" && (React.createElement("div", { style: styles.bottomCenterMessage },
@@ -753,7 +765,7 @@ var GroupChatScreen = function (_a) {
753
765
  React.createElement("span", { style: styles.bottomMessageText },
754
766
  userName,
755
767
  " was removed from the group by the admin."))),
756
- React.createElement("style", null, "\n .message-container:hover .chat-message-icons {\n opacity: 1 !important;\n pointer-events: auto !important;\n }\n "),
768
+ React.createElement("style", null, "\n .message-container:hover .chat-message-icons {\n opacity: 1 !important;\n pointer-events: auto !important;\n transform: translateX(0) !important;\n }\n "),
757
769
  showInputFeild && userJoinedGroupStatus === "Active" && (React.createElement("div", { style: __assign(__assign({}, styles.inputBackground), { position: 'relative' }) },
758
770
  isEditing && (React.createElement("div", { style: {
759
771
  background: '#f1f1f1',
@@ -844,64 +856,43 @@ var GroupChatScreen = function (_a) {
844
856
  }, onClick: (userMessage === null || userMessage === void 0 ? void 0 : userMessage.trim()) ? (isEditing ? saveInlineEdit : handleSendMessage) : function () { }, disabled: !(userMessage === null || userMessage === void 0 ? void 0 : userMessage.trim()) },
845
857
  React.createElement("i", { className: "fas fa-paper-plane" }))))),
846
858
  React.createElement(MentionList, { users: viewParticipants, onUserSelect: handleMentionSelect, position: mentionPosition, searchTerm: mentionSearchTerm, visible: showMentionList, onlineUsers: GrouponlineUsers })))),
847
- showThreadPanel && threadMessageId && (React.createElement("div", { style: {
848
- position: 'absolute',
849
- right: 0,
859
+ React.createElement(ThreadConversation, { showThreadPanel: showThreadPanel, threadMessageId: threadMessageId, messages: messages, repliesMap: repliesMap, userId: userId, userName: userName, allParticipantsList: allParticipantsList, getUserNameById: getUserNameById, onCloseThread: function () {
860
+ setShowThreadPanel(false);
861
+ setThreadMessageId(null);
862
+ }, setReplyTarget: setReplyTarget }),
863
+ showImageModal && (React.createElement("div", { style: {
864
+ position: 'fixed',
850
865
  top: 0,
851
- height: '100%',
852
- width: 360,
853
- maxWidth: '40%',
854
- background: '#ffffff',
855
- borderLeft: '1px solid #e6e6e6',
856
- zIndex: 1100,
857
- boxShadow: '-6px 0 24px rgba(0,0,0,0.06)',
866
+ left: 0,
867
+ width: '100vw',
868
+ height: '100vh',
869
+ backgroundColor: 'rgba(0,0,0,0.8)',
858
870
  display: 'flex',
859
- flexDirection: 'column'
860
- } },
861
- React.createElement("div", { style: {
862
- padding: '12px 14px',
863
- borderBottom: '1px solid #f1f1f1',
864
- display: 'flex',
865
- alignItems: 'center',
866
- justifyContent: 'space-between'
867
- } },
868
- React.createElement("div", null,
869
- React.createElement("div", { style: { fontSize: 16, fontWeight: 700 } }, "Thread"),
870
- React.createElement("div", { style: { fontSize: 12, color: '#777' } }, "Replies to message")),
871
- React.createElement("button", { onClick: function () {
872
- setShowThreadPanel(false);
873
- setThreadMessageId(null);
874
- setReplyTarget(null);
875
- }, style: { background: 'transparent', border: 'none', cursor: 'pointer', fontSize: 18 }, "aria-label": "Close thread" }, "\u2715")),
876
- React.createElement("div", { style: { padding: 12, overflowY: 'auto', flex: 1 } },
877
- (function () {
878
- var original = messages.find(function (m) { return m.messageId === threadMessageId; });
879
- if (!original)
880
- return React.createElement("div", { style: { color: '#999' } }, "Original message not found");
881
- return (React.createElement("div", { style: {
882
- padding: 10,
883
- borderRadius: 10,
884
- background: '#f7f9fc',
885
- marginBottom: 12
886
- } },
887
- React.createElement("div", { style: { fontSize: 13, fontWeight: 700, marginBottom: 6 } }, getUserNameById(allParticipantsList, original.user)),
888
- React.createElement("div", { style: { fontSize: 14, color: '#333' } }, original.message),
889
- React.createElement("div", { style: { fontSize: 12, color: '#888', marginTop: 8 } }, getTimeFromTimestamp && getTimeFromTimestamp(original.time))));
890
- })(),
891
- (repliesMap.get(threadMessageId) || []).map(function (replyMsg) { return (React.createElement("div", { key: replyMsg.messageId, style: { marginBottom: 10 } },
892
- React.createElement("div", { style: {
893
- padding: '8px 10px',
894
- borderRadius: 10,
895
- background: replyMsg.reply ? '#007bff' : '#ffffff',
896
- color: replyMsg.reply ? '#fff' : '#333',
897
- boxShadow: '0 1px 2px rgba(0,0,0,0.04)'
898
- } },
899
- React.createElement("div", { style: { fontSize: 13, fontWeight: 700, marginBottom: 4 } }, getUserNameById(allParticipantsList, replyMsg.user)),
900
- React.createElement("div", { style: { fontSize: 14 } }, replyMsg.message),
901
- React.createElement("div", { style: { fontSize: 11, color: '#777', marginTop: 6 } },
902
- getTimeFromTimestamp && getTimeFromTimestamp(replyMsg.time),
903
- replyMsg.is_edited && React.createElement("span", { style: { marginLeft: 8, fontStyle: 'italic' } }, "edited"))))); }),
904
- (repliesMap.get(threadMessageId) || []).length === 0 && (React.createElement("div", { style: { color: '#777', marginTop: 12 } }, "No replies yet")))))));
871
+ alignItems: 'center',
872
+ justifyContent: 'center',
873
+ zIndex: 10000,
874
+ cursor: 'pointer'
875
+ }, onClick: function () { return setShowImageModal(false); } },
876
+ React.createElement("img", { src: selectedImageUrl, alt: "Full screen image", style: {
877
+ maxWidth: '90vw',
878
+ maxHeight: '90vh',
879
+ objectFit: 'contain'
880
+ }, onClick: function (e) { return e.stopPropagation(); } }),
881
+ React.createElement("button", { style: {
882
+ position: 'absolute',
883
+ top: '20px',
884
+ right: '20px',
885
+ backgroundColor: 'rgba(0,0,0,0.5)',
886
+ color: 'white',
887
+ border: 'none',
888
+ borderRadius: '50%',
889
+ width: '40px',
890
+ height: '40px',
891
+ cursor: 'pointer',
892
+ fontSize: '20px'
893
+ }, onClick: function () { return setShowImageModal(false); } }, "\u00D7"))),
894
+ showSearchPanel && (React.createElement("div", null,
895
+ React.createElement(SearchHeader, { onClose: function () { return setShowSearchPanel(false); }, context: "group", onSearch: function (q) { console.log('Group search query:', q); } })))));
905
896
  };
906
897
  var styles = {
907
898
  container: {
@@ -974,24 +965,34 @@ var styles = {
974
965
  },
975
966
  messageContent: {
976
967
  marginLeft: '6px',
977
- padding: '6px',
978
- backgroundColor: 'white',
979
- borderRadius: '8px',
980
- maxWidth: '75%',
981
- boxShadow: '0 1px 2px rgba(0, 0, 0, 0.2)',
982
- position: 'relative'
968
+ padding: '8px 12px',
969
+ backgroundColor: colors.messageBackground,
970
+ borderRadius: '18px',
971
+ maxWidth: '66%',
972
+ boxShadow: '0 1px 3px rgba(12,28,56,0.06)',
973
+ color: '#2c2c2c',
974
+ position: 'relative',
975
+ wordWrap: 'break-word',
976
+ display: 'inline-block',
977
+ flex: '0 0 auto',
978
+ },
979
+ messageContentInner: {
980
+ padding: '0',
981
+ background: 'transparent',
982
+ maxWidth: '100%'
983
983
  },
984
984
  replyMessageContent: {
985
- backgroundColor: 'white',
985
+ backgroundColor: colors.messageBackground,
986
986
  alignSelf: 'flex-end',
987
- maxWidth: '70%',
988
- boxShadow: '0 1px 2px rgba(0, 0, 0, 0.2)',
987
+ maxWidth: '68%',
988
+ boxShadow: '0 1px 3px rgba(12,28,56,0.06)',
989
989
  marginLeft: 'auto',
990
+ borderRadius: '18px',
991
+ padding: '8px 12px',
992
+ display: 'inline-block',
993
+ flex: '0 0 auto',
990
994
  },
991
- message: {
992
- fontSize: '12px',
993
- wordWrap: 'break-word',
994
- },
995
+ message: __assign(__assign({}, fonts.messageitems), { fontSize: '12px', lineHeight: '1.35', wordWrap: 'break-word', letterSpacing: '0.08px' }),
995
996
  time: {
996
997
  marginTop: '2px',
997
998
  fontSize: '10px',
@@ -1003,9 +1004,11 @@ var styles = {
1003
1004
  },
1004
1005
  personName: {
1005
1006
  fontSize: '12px',
1006
- color: '#a4d0ff',
1007
- marginBottom: '2px',
1007
+ color: colors.blue,
1008
+ marginBottom: '6px',
1009
+ fontWeight: 600,
1008
1010
  },
1011
+ personNameOutside: __assign(__assign({}, fonts.content), { fontSize: '12px', color: colors.blue, marginBottom: '6px', fontWeight: 600, paddingLeft: 2 }),
1009
1012
  messageFooter: {
1010
1013
  display: 'flex',
1011
1014
  flexDirection: 'row',
@@ -18,6 +18,7 @@ export type ThemeColors = {
18
18
  optionHover: string;
19
19
  disabledColor: string;
20
20
  errorBorder: string;
21
+ messageBackground: string;
21
22
  };
22
23
  declare const colors: ThemeColors;
23
24
  export default colors;
@@ -18,6 +18,7 @@ var colors = {
18
18
  optionHover: '#f5f7fa',
19
19
  disabledColor: '#9CA3AF',
20
20
  errorBorder: "#e04b4b",
21
+ messageBackground: '#ececec'
21
22
  };
22
23
  colors.headerGradient = "linear-gradient(115deg, ".concat(colors.blue, " 0%, ").concat(colors.blueLight, " 100%)");
23
24
  colors.panelsCardInset = "inset 0 2px 8px rgba(255,255,255,0.5)";
@@ -15,5 +15,17 @@ declare const fonts: {
15
15
  letterSpacing: string;
16
16
  color: string;
17
17
  };
18
+ messageitems: {
19
+ fontFamily: string;
20
+ fontSize: string;
21
+ fontWeight: string;
22
+ lineHeight: string;
23
+ };
24
+ TimeText: {
25
+ fontFamily: string;
26
+ fontSize: string;
27
+ fontWeight: string;
28
+ lineHeight: string;
29
+ };
18
30
  };
19
31
  export default fonts;
@@ -1,4 +1,3 @@
1
- // src/theme/fonts.ts
2
1
  import "@fontsource/poppins/400.css";
3
2
  import "@fontsource/poppins/500.css";
4
3
  import "@fontsource/poppins/600.css";
@@ -39,6 +38,18 @@ var fonts = {
39
38
  lineHeight: "1.4",
40
39
  letterSpacing: "0.2px",
41
40
  color: colors.white,
41
+ },
42
+ messageitems: {
43
+ fontFamily: "Poppins, sans-serif",
44
+ fontSize: "12px",
45
+ fontWeight: 'normal',
46
+ lineHeight: "normal",
47
+ },
48
+ TimeText: {
49
+ fontFamily: "Poppins, sans-serif",
50
+ fontSize: "8px",
51
+ fontWeight: 'normal',
52
+ lineHeight: "normal",
42
53
  }
43
54
  };
44
55
  export default fonts;
@@ -116,6 +116,41 @@ export declare const CustomIcons: {
116
116
  color: string;
117
117
  size: string;
118
118
  };
119
+ faPlus: {
120
+ icon: import("@fortawesome/fontawesome-common-types").IconDefinition;
121
+ color: string;
122
+ size: string;
123
+ };
124
+ faMicrophone: {
125
+ icon: import("@fortawesome/fontawesome-common-types").IconDefinition;
126
+ color: string;
127
+ size: string;
128
+ };
129
+ faFaceSmile: {
130
+ icon: import("@fortawesome/fontawesome-common-types").IconDefinition;
131
+ color: string;
132
+ size: string;
133
+ };
134
+ faReply: {
135
+ icon: import("@fortawesome/fontawesome-common-types").IconDefinition;
136
+ color: string;
137
+ size: string;
138
+ };
139
+ faPenToSquare: {
140
+ icon: import("@fortawesome/fontawesome-common-types").IconDefinition;
141
+ color: string;
142
+ size: string;
143
+ };
144
+ faCopy: {
145
+ icon: import("@fortawesome/fontawesome-common-types").IconDefinition;
146
+ color: string;
147
+ size: string;
148
+ };
149
+ faCommentDots: {
150
+ icon: import("@fortawesome/fontawesome-common-types").IconDefinition;
151
+ color: string;
152
+ size: string;
153
+ };
119
154
  };
120
155
  export declare const AppIcons: {
121
156
  Peer: {
@@ -213,5 +248,40 @@ export declare const AppIcons: {
213
248
  color: string;
214
249
  size: string;
215
250
  };
251
+ faPlus: {
252
+ icon: import("@fortawesome/fontawesome-common-types").IconDefinition;
253
+ color: string;
254
+ size: string;
255
+ };
256
+ faMicrophone: {
257
+ icon: import("@fortawesome/fontawesome-common-types").IconDefinition;
258
+ color: string;
259
+ size: string;
260
+ };
261
+ faFaceSmile: {
262
+ icon: import("@fortawesome/fontawesome-common-types").IconDefinition;
263
+ color: string;
264
+ size: string;
265
+ };
266
+ faReply: {
267
+ icon: import("@fortawesome/fontawesome-common-types").IconDefinition;
268
+ color: string;
269
+ size: string;
270
+ };
271
+ faPenToSquare: {
272
+ icon: import("@fortawesome/fontawesome-common-types").IconDefinition;
273
+ color: string;
274
+ size: string;
275
+ };
276
+ faCopy: {
277
+ icon: import("@fortawesome/fontawesome-common-types").IconDefinition;
278
+ color: string;
279
+ size: string;
280
+ };
281
+ faCommentDots: {
282
+ icon: import("@fortawesome/fontawesome-common-types").IconDefinition;
283
+ color: string;
284
+ size: string;
285
+ };
216
286
  };
217
287
  export default CustomIcons;
@@ -1,4 +1,5 @@
1
- import { faUser, faUsers, faUserFriends, faPhone, faSearch, faPlusCircle, faGlobe, faUserLock, faShieldAlt, faVideo, faArrowDown, faArrowUp, faArrowLeft, faPhoneSlash, faUserPlus, faUserMinus, faSignOutAlt, faTrash, faChevronDown, faXmark, faBan, faTimes } from "@fortawesome/free-solid-svg-icons";
1
+ import { faPlus } from "@fortawesome/free-solid-svg-icons";
2
+ import { faUser, faUsers, faUserFriends, faPhone, faSearch, faPlusCircle, faGlobe, faUserLock, faShieldAlt, faVideo, faArrowDown, faArrowUp, faArrowLeft, faPhoneSlash, faUserPlus, faUserMinus, faSignOutAlt, faTrash, faChevronDown, faXmark, faBan, faTimes, faMicrophone, faFaceSmile, faReply, faPenToSquare, faCopy, faCommentDots } from "@fortawesome/free-solid-svg-icons";
2
3
  import colors from "./colors";
3
4
  export var iconPalette = {
4
5
  primary: colors.blue,
@@ -30,6 +31,13 @@ export var CustomIcons = {
30
31
  BlockUser: { icon: faBan, color: iconPalette.danger, size: "16px" },
31
32
  Cancel: { icon: faXmark, color: iconPalette.white, size: "14px" },
32
33
  BackArrow: { icon: faArrowLeft, color: iconPalette.white, size: "18px" },
34
+ faPlus: { icon: faPlus, color: iconPalette.muted, size: "16px" },
35
+ faMicrophone: { icon: faMicrophone, color: iconPalette.muted, size: "16px" },
36
+ faFaceSmile: { icon: faFaceSmile, color: iconPalette.muted, size: "16px" },
37
+ faReply: { icon: faReply, color: iconPalette.muted, size: "16px" },
38
+ faPenToSquare: { icon: faPenToSquare, color: iconPalette.muted, size: "16px" },
39
+ faCopy: { icon: faCopy, color: iconPalette.muted, size: "16px" },
40
+ faCommentDots: { icon: faCommentDots, color: iconPalette.muted, size: "16px" },
33
41
  };
34
42
  export var AppIcons = {
35
43
  Peer: CustomIcons.faUser,
@@ -51,5 +59,12 @@ export var AppIcons = {
51
59
  DeleteChat: CustomIcons.DeleteChat,
52
60
  ChevronDown: CustomIcons.ChevronDown,
53
61
  Cancel: CustomIcons.Cancel,
62
+ faPlus: CustomIcons.faPlus,
63
+ faMicrophone: CustomIcons.faMicrophone,
64
+ faFaceSmile: CustomIcons.faFaceSmile,
65
+ faReply: CustomIcons.faReply,
66
+ faPenToSquare: CustomIcons.faPenToSquare,
67
+ faCopy: CustomIcons.faCopy,
68
+ faCommentDots: CustomIcons.faCommentDots
54
69
  };
55
70
  export default CustomIcons;