@webinex/chatify 1.0.0-alpha07 → 1.0.0-rc1

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 (78) hide show
  1. package/dist/cjs/index.js +1 -1
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/core/action.d.ts +4 -1
  4. package/dist/cjs/types/core/models.d.ts +2 -2
  5. package/dist/cjs/types/ui/Chatify.d.ts +6 -4
  6. package/dist/cjs/types/ui/Icon.d.ts +7 -0
  7. package/dist/cjs/types/ui/Message.d.ts +1 -1
  8. package/dist/cjs/types/ui/SendingMessage.d.ts +1 -1
  9. package/dist/cjs/types/ui/index.d.ts +1 -0
  10. package/dist/cjs/types/ui/localizer.d.ts +4 -0
  11. package/dist/css/chatify.css +56 -60
  12. package/dist/esm/index.js +1 -1
  13. package/dist/esm/index.js.map +1 -1
  14. package/dist/esm/types/core/action.d.ts +4 -1
  15. package/dist/esm/types/core/models.d.ts +2 -2
  16. package/dist/esm/types/ui/Chatify.d.ts +6 -4
  17. package/dist/esm/types/ui/Icon.d.ts +7 -0
  18. package/dist/esm/types/ui/Message.d.ts +1 -1
  19. package/dist/esm/types/ui/SendingMessage.d.ts +1 -1
  20. package/dist/esm/types/ui/index.d.ts +1 -0
  21. package/dist/esm/types/ui/localizer.d.ts +4 -0
  22. package/dist/index.d.ts +23 -8
  23. package/package.json +90 -90
  24. package/src/ChatifyContext.tsx +41 -41
  25. package/src/core/action.tsx +319 -282
  26. package/src/core/client.ts +137 -137
  27. package/src/core/index.ts +14 -14
  28. package/src/core/models.tsx +75 -75
  29. package/src/core/reducer.tsx +86 -86
  30. package/src/core/state.ts +38 -38
  31. package/src/core/useAccounts.tsx +11 -11
  32. package/src/core/useAddChat.tsx +12 -12
  33. package/src/core/useAddMember.tsx +12 -12
  34. package/src/core/useAddMessage.tsx +40 -40
  35. package/src/core/useChat.tsx +12 -12
  36. package/src/core/useChatList.tsx +10 -10
  37. package/src/core/useLoadMore.tsx +42 -42
  38. package/src/core/useMessages.tsx +23 -23
  39. package/src/core/useMutation.tsx +48 -48
  40. package/src/core/useQuery.tsx +45 -45
  41. package/src/core/useReadMonitor.tsx +31 -31
  42. package/src/core/useRemoveMember.tsx +12 -12
  43. package/src/core/useSignalRMonitor.tsx +52 -49
  44. package/src/index.ts +3 -3
  45. package/src/ui/AddChat.tsx +55 -55
  46. package/src/ui/AddChatButton.tsx +19 -19
  47. package/src/ui/Aside.tsx +41 -41
  48. package/src/ui/Avatar.tsx +18 -18
  49. package/src/ui/Chat.tsx +26 -26
  50. package/src/ui/ChatBody.tsx +43 -43
  51. package/src/ui/ChatHeader.tsx +33 -33
  52. package/src/ui/ChatHeaderMembers.tsx +30 -30
  53. package/src/ui/ChatHeaderSettingsButton.tsx +26 -26
  54. package/src/ui/ChatListItem.tsx +101 -101
  55. package/src/ui/ChatName.tsx +15 -15
  56. package/src/ui/ChatSettings.tsx +59 -59
  57. package/src/ui/Chatify.tsx +104 -102
  58. package/src/ui/Footer.tsx +7 -7
  59. package/src/ui/Header.tsx +14 -14
  60. package/src/ui/Icon.tsx +21 -0
  61. package/src/ui/InputForm.tsx +51 -48
  62. package/src/ui/LoadMore.tsx +40 -40
  63. package/src/ui/Main.tsx +16 -16
  64. package/src/ui/Message.tsx +118 -118
  65. package/src/ui/MessageSkeleton.tsx +19 -19
  66. package/src/ui/SendingMessage.tsx +50 -50
  67. package/src/ui/SystemMessage.tsx +30 -26
  68. package/src/ui/index.ts +11 -10
  69. package/src/ui/localizer.tsx +68 -58
  70. package/src/ui/styles/aside.scss +94 -94
  71. package/src/ui/styles/index.scss +248 -252
  72. package/src/ui/styles/keyframes.scss +14 -14
  73. package/src/ui/styles/mixins.scss +20 -20
  74. package/src/ui/styles/variables.scss +10 -10
  75. package/src/util/customize.tsx +45 -45
  76. package/src/util/index.ts +3 -3
  77. package/src/util/uniqBy.tsx +17 -17
  78. package/src/util/uniqId.tsx +3 -3
@@ -1,94 +1,94 @@
1
- .wxchtf-aside {
2
- flex: none;
3
- width: 300px;
4
- border-right: $border;
5
- display: flex;
6
- flex-flow: column nowrap;
7
-
8
- .wxchtf-chats.ant-menu {
9
- flex: 1 1 auto;
10
- height: 100px;
11
- overflow-y: auto;
12
-
13
- @include scrollbar();
14
-
15
- .ant-menu-item {
16
- padding: 0;
17
- height: unset;
18
- margin: 0;
19
- width: 100%;
20
- border-radius: 0;
21
- line-height: 1.5;
22
- border-top: $border;
23
-
24
- &:first-child {
25
- border-top: none;
26
- }
27
-
28
- &.ant-menu-item-selected .wxchtf-chat-name {
29
- font-weight: 600;
30
- }
31
-
32
- .wxchtf-chat {
33
- padding: 0.5rem 1rem;
34
- position: relative;
35
-
36
- &.--unread {
37
- .wxchtf-chat-last {
38
- font-weight: bold;
39
- }
40
- }
41
-
42
- .wxchtf-chat-name {
43
- font-weight: bold;
44
- display: inline-block;
45
- }
46
-
47
- .wxchtf-unread-count {
48
- display: inline-block;
49
- padding: 0.2rem;
50
- min-width: 1rem;
51
- height: 1.2rem;
52
- line-height: 0.7rem;
53
- margin-left: 0.5rem;
54
- border-radius: 50%;
55
- text-align: center;
56
- font-size: 0.7rem;
57
- background: $unreadCountBackground;
58
- }
59
-
60
- .wxchtf-chat-last {
61
- $size: 25px;
62
-
63
- font-style: italic;
64
- opacity: 0.75;
65
- overflow: hidden;
66
- text-overflow: ellipsis;
67
- white-space: nowrap;
68
- line-height: $size;
69
-
70
- .wxchtf-chat-last-author {
71
- display: inline-block;
72
- margin-right: 0.5rem;
73
-
74
- .ant-avatar {
75
- display: inline-block;
76
- border: none;
77
- margin-right: 5px;
78
-
79
- @include avatarSize($size);
80
- }
81
-
82
- &::after {
83
- content: ':';
84
- }
85
- }
86
-
87
- .wxchtf-chat-last-message {
88
- display: inline;
89
- }
90
- }
91
- }
92
- }
93
- }
94
- }
1
+ .wxchtf-aside {
2
+ flex: none;
3
+ width: 300px;
4
+ border-right: $border;
5
+ display: flex;
6
+ flex-flow: column nowrap;
7
+
8
+ .wxchtf-chats.ant-menu {
9
+ flex: 1 1 auto;
10
+ height: 100px;
11
+ overflow-y: auto;
12
+
13
+ @include scrollbar();
14
+
15
+ .ant-menu-item {
16
+ padding: 0;
17
+ height: unset;
18
+ margin: 0;
19
+ width: 100%;
20
+ border-radius: 0;
21
+ line-height: 1.5;
22
+ border-top: $border;
23
+
24
+ &:first-child {
25
+ border-top: none;
26
+ }
27
+
28
+ &.ant-menu-item-selected .wxchtf-chat-name {
29
+ font-weight: 600;
30
+ }
31
+
32
+ .wxchtf-chat {
33
+ padding: 0.5rem 1rem;
34
+ position: relative;
35
+
36
+ &.--unread {
37
+ .wxchtf-chat-last {
38
+ font-weight: bold;
39
+ }
40
+ }
41
+
42
+ .wxchtf-chat-name {
43
+ font-weight: bold;
44
+ display: inline-block;
45
+ }
46
+
47
+ .wxchtf-unread-count {
48
+ display: inline-block;
49
+ padding: 0.2rem;
50
+ min-width: 1rem;
51
+ height: 1.2rem;
52
+ line-height: 0.7rem;
53
+ margin-left: 0.5rem;
54
+ border-radius: 50%;
55
+ text-align: center;
56
+ font-size: 0.7rem;
57
+ background: $unreadCountBackground;
58
+ }
59
+
60
+ .wxchtf-chat-last {
61
+ $size: 25px;
62
+
63
+ font-style: italic;
64
+ opacity: 0.75;
65
+ overflow: hidden;
66
+ text-overflow: ellipsis;
67
+ white-space: nowrap;
68
+ line-height: $size;
69
+
70
+ .wxchtf-chat-last-author {
71
+ display: inline-block;
72
+ margin-right: 0.5rem;
73
+
74
+ .ant-avatar {
75
+ display: inline-block;
76
+ border: none;
77
+ margin-right: 5px;
78
+
79
+ @include avatarSize($size);
80
+ }
81
+
82
+ &::after {
83
+ content: ':';
84
+ }
85
+ }
86
+
87
+ .wxchtf-chat-last-message {
88
+ display: inline;
89
+ }
90
+ }
91
+ }
92
+ }
93
+ }
94
+ }