stream-chat-react 10.0.0-theming-v2.3 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/browser.full-bundle.js +216 -202
  2. package/dist/browser.full-bundle.js.map +1 -1
  3. package/dist/browser.full-bundle.min.js +3 -3
  4. package/dist/browser.full-bundle.min.js.map +1 -1
  5. package/dist/components/Attachment/AttachmentActions.d.ts.map +1 -1
  6. package/dist/components/Attachment/AttachmentActions.js +1 -1
  7. package/dist/components/Attachment/AttachmentContainer.js +2 -2
  8. package/dist/components/Channel/Channel.d.ts.map +1 -1
  9. package/dist/components/Channel/Channel.js +6 -1
  10. package/dist/components/ChannelList/ChannelList.d.ts +3 -9
  11. package/dist/components/ChannelList/ChannelList.d.ts.map +1 -1
  12. package/dist/components/ChannelList/ChannelList.js +24 -26
  13. package/dist/components/ChannelSearch/ChannelSearch.d.ts +6 -3
  14. package/dist/components/ChannelSearch/ChannelSearch.d.ts.map +1 -1
  15. package/dist/components/ChannelSearch/ChannelSearch.js +19 -2
  16. package/dist/components/ChannelSearch/SearchBar.js +1 -1
  17. package/dist/components/ChannelSearch/SearchInput.d.ts +3 -1
  18. package/dist/components/ChannelSearch/SearchInput.d.ts.map +1 -1
  19. package/dist/components/ChannelSearch/SearchInput.js +2 -2
  20. package/dist/components/ChannelSearch/SearchResults.js +1 -2
  21. package/dist/components/ChannelSearch/hooks/useChannelSearch.d.ts +9 -7
  22. package/dist/components/ChannelSearch/hooks/useChannelSearch.d.ts.map +1 -1
  23. package/dist/components/ChannelSearch/hooks/useChannelSearch.js +23 -29
  24. package/dist/components/MessageActions/MessageActionsBox.js +1 -1
  25. package/dist/components/MessageInput/CooldownTimer.d.ts +7 -0
  26. package/dist/components/MessageInput/CooldownTimer.d.ts.map +1 -0
  27. package/dist/components/MessageInput/CooldownTimer.js +17 -0
  28. package/dist/components/MessageInput/MessageInputFlat.d.ts.map +1 -1
  29. package/dist/components/MessageInput/MessageInputFlat.js +1 -1
  30. package/dist/components/MessageInput/MessageInputSmall.d.ts.map +1 -1
  31. package/dist/components/MessageInput/MessageInputSmall.js +1 -1
  32. package/dist/components/MessageInput/hooks/useCooldownTimer.d.ts +0 -5
  33. package/dist/components/MessageInput/hooks/useCooldownTimer.d.ts.map +1 -1
  34. package/dist/components/MessageInput/hooks/useCooldownTimer.js +1 -17
  35. package/dist/components/MessageInput/index.d.ts +1 -0
  36. package/dist/components/MessageInput/index.d.ts.map +1 -1
  37. package/dist/components/MessageInput/index.js +1 -0
  38. package/dist/context/ChannelStateContext.d.ts +1 -1
  39. package/dist/context/ComponentContext.d.ts +1 -1
  40. package/dist/context/ComponentContext.d.ts.map +1 -1
  41. package/dist/css/index.css +1 -1
  42. package/dist/css/index.css.map +1 -1
  43. package/dist/css/v2/index.css +1 -1
  44. package/dist/css/v2/index.css.map +1 -1
  45. package/dist/css/v2/index.layout.css +1 -1
  46. package/dist/css/v2/index.layout.css.map +1 -1
  47. package/dist/index.cjs.js +214 -200
  48. package/dist/index.cjs.js.map +1 -1
  49. package/dist/scss/Attachment.scss +45 -2
  50. package/dist/scss/Gallery.scss +12 -6
  51. package/dist/scss/Message.scss +2 -1
  52. package/dist/scss/v2/AttachmentList/AttachmentList-layout.scss +72 -46
  53. package/dist/scss/v2/Autocomplete/Autocomplete-layout.scss +2 -0
  54. package/dist/version.d.ts +1 -1
  55. package/dist/version.d.ts.map +1 -1
  56. package/dist/version.js +1 -1
  57. package/package.json +4 -4
@@ -2,8 +2,10 @@
2
2
  max-width: 450px;
3
3
  }
4
4
 
5
+ $video-width: 300px;
6
+
5
7
  .str-chat__message-attachment--video:not(.str-chat__message-attachment--card) {
6
- width: 300px;
8
+ width: $video-width;
7
9
  }
8
10
 
9
11
  .str-chat__player-wrapper {
@@ -19,6 +21,24 @@
19
21
  }
20
22
  }
21
23
 
24
+ .str-chat__message-attachment-dynamic-size {
25
+ $max-height: 300px;
26
+
27
+ max-height: $max-height;
28
+
29
+ .str-chat__player-wrapper {
30
+ padding-top: 0;
31
+ position: static;
32
+
33
+ .str-chat__video-angular {
34
+ position: static;
35
+ // CDN resize requires to have max-height/height and max-width set on this element
36
+ max-height: $max-height;
37
+ max-width: $video-width;
38
+ }
39
+ }
40
+ }
41
+
22
42
  /* border radius for attachments */
23
43
  .str-chat__message .str-chat__player-wrapper .react-player {
24
44
  border-radius: var(--border-radius) var(--border-radius) var(--border-radius) 0;
@@ -176,7 +196,6 @@
176
196
  height: inherit;
177
197
  width: auto;
178
198
  max-height: inherit;
179
- max-width: 100%;
180
199
  display: block;
181
200
  object-fit: cover;
182
201
  overflow: hidden;
@@ -204,6 +223,30 @@
204
223
  }
205
224
  }
206
225
 
226
+ .str-chat__message-attachment:not(.str-chat__message-attachment-dynamic-size) {
227
+ .str-chat__message-attachment--image {
228
+ img {
229
+ max-width: 100%;
230
+ }
231
+ }
232
+ }
233
+
234
+ .str-chat__message-attachment-dynamic-size {
235
+ &.str-chat__message-attachment--svg-image {
236
+ img {
237
+ object-fit: contain;
238
+ }
239
+ }
240
+
241
+ &.str-chat__message-attachment--image {
242
+ width: auto;
243
+ display: flex;
244
+ justify-content: center;
245
+ align-items: center;
246
+ overflow: hidden;
247
+ }
248
+ }
249
+
207
250
  .str-chat__message-attachment-card__giphy-logo {
208
251
  height: 20px;
209
252
  width: auto;
@@ -1,3 +1,5 @@
1
+ $image-size: 150px;
2
+
1
3
  .str-chat__gallery {
2
4
  display: inline-flex;
3
5
  flex-wrap: wrap;
@@ -6,8 +8,8 @@
6
8
 
7
9
  &-image {
8
10
  /* flex: 1; x */
9
- width: 150px;
10
- height: 150px;
11
+ width: $image-size;
12
+ height: $image-size;
11
13
  background: var(--white);
12
14
  margin-bottom: 1px;
13
15
  margin-right: 1px;
@@ -23,7 +25,9 @@
23
25
 
24
26
  img {
25
27
  width: inherit;
28
+ // CDN resize requires max-height/height and max-width to be set on this element
26
29
  height: inherit;
30
+ max-width: $image-size;
27
31
  object-fit: cover;
28
32
  }
29
33
  }
@@ -46,14 +50,16 @@
46
50
  margin: 4px 0;
47
51
 
48
52
  &-image {
49
- width: 150px;
50
- height: 150px;
53
+ width: $image-size;
54
+ height: $image-size;
51
55
  }
52
56
 
53
57
  &-placeholder {
54
58
  position: relative;
55
- width: 150px;
56
- height: 150px;
59
+ width: $image-size;
60
+ // CDN resize requires max-height/height and max-width to be set on this element
61
+ max-width: $image-size;
62
+ height: $image-size;
57
63
  color: var(--white);
58
64
  display: flex;
59
65
  align-items: center;
@@ -531,7 +531,8 @@
531
531
  &-attachment {
532
532
  &--img {
533
533
  width: 100%;
534
- max-width: 480px;
534
+ // CDN resize requires max-width to be set on this element
535
+ max-width: inherit;
535
536
  display: block;
536
537
  height: inherit;
537
538
  object-fit: cover;
@@ -4,7 +4,7 @@
4
4
  /* The margin applied to every attachment in the attachment list */
5
5
  --str-chat__attachment-margin: var(--str-chat__spacing-0_5);
6
6
 
7
- /* The maximum allowed width of attachments */
7
+ /* The maximum allowed width and height of attachments, in case of gallery images this is the maximum size of the whole gallery (not just for a single image inside the gallery). In case of Angular, there are some [constraints](https://getstream.io/chat/docs/sdk/angular/components/AttachmentListComponent/#maximum-size) for the acceptable values you can provide for this variable. */
8
8
  --str-chat__attachment-max-width: unset;
9
9
 
10
10
  /* The height of scraped images, the default value is optimized for 1.91:1 aspect ratio */
@@ -16,8 +16,8 @@
16
16
  /* The height of GIFs */
17
17
  --str-chat__gif-height: calc(var(--str-chat__spacing-px) * 200);
18
18
 
19
- /* The height of videos */
20
- --str-chat__video-height: calc(var(--str-chat__spacing-px) * 300);
19
+ /* The height of videos, the default value is the mase as `--str-chat__attachment-max-width`. In Angular SDK this is the maximum height, the video can be smaller based on the aspect ratio */
20
+ --str-chat__video-height: unset;
21
21
  }
22
22
 
23
23
  .str-chat__attachment-list {
@@ -25,6 +25,8 @@
25
25
  var(--str-chat__message-max-width) - calc(2 * var(--str-chat__attachment-margin))
26
26
  );
27
27
 
28
+ --str-chat__video-height: var(--str-chat__attachment-max-width);
29
+
28
30
  --str-chat__scraped-image-height: calc(var(--str-chat__attachment-max-width) * calc(1 / 1.91));
29
31
 
30
32
  --str-chat__scraped-video-height: calc(var(--str-chat__attachment-max-width) * calc(9 / 16));
@@ -102,6 +104,7 @@
102
104
  // Images uploaded from files
103
105
  .str-chat__message-attachment--image:not(.str-chat__message-attachment--card) {
104
106
  img {
107
+ // CDN resize requires max-width and height/max-height to be present on this element
105
108
  max-width: var(--str-chat__attachment-max-width);
106
109
  max-height: var(--str-chat__attachment-max-width);
107
110
  object-fit: cover;
@@ -126,14 +129,25 @@
126
129
  .str-chat__video-angular {
127
130
  height: 100%;
128
131
  width: 100%;
132
+ // CDN resize requires max-width to be present on this element
133
+ max-width: var(--str-chat__attachment-max-width);
129
134
  }
130
135
  }
131
136
  }
132
137
 
133
- .str-chat__message-attachment--video:not(.str-chat__message-attachment--card) {
138
+ .str-chat__message-attachment--video:not(.str-chat__message-attachment--card):not(.str-chat__message-attachment-dynamic-size) {
134
139
  height: var(--str-chat__video-height);
135
140
  }
136
141
 
142
+ .str-chat__message-attachment--video.str-chat__message-attachment-dynamic-size:not(.str-chat__message-attachment--card) {
143
+ max-height: var(--str-chat__video-height);
144
+
145
+ .str-chat__video-angular {
146
+ // CDN resize requires max-height to be present on this element
147
+ max-height: var(--str-chat__video-height);
148
+ }
149
+ }
150
+
137
151
  .str-chat__message-attachment-card--video .str-chat__message-attachment-card--header {
138
152
  height: var(--str-chat__scraped-video-height);
139
153
  }
@@ -143,55 +157,66 @@
143
157
  margin: var(--str-chat__attachment-margin);
144
158
  }
145
159
 
146
- .str-chat__gallery {
147
- display: grid;
148
- grid-template-columns: 50% 50%;
149
- overflow: hidden;
150
- gap: var(--str-chat__spacing-0_5);
151
- max-width: var(--str-chat__attachment-max-width);
152
- height: var(--str-chat__attachment-max-width);
160
+ .str-chat__message-attachment--gallery {
161
+ $max-width: var(--str-chat__attachment-max-width);
153
162
  margin: var(--str-chat__attachment-margin);
154
163
 
155
- &.str-chat__gallery-two-rows {
156
- grid-template-rows: 50% 50%;
157
- }
158
-
159
- .str-chat__gallery-image {
160
- padding: 0;
161
- margin: 0;
162
-
163
- img {
164
- width: 100%;
165
- height: 100%;
166
- object-fit: cover;
167
- cursor: zoom-in;
164
+ .str-chat__gallery {
165
+ display: grid;
166
+ grid-template-columns: 50% 50%;
167
+ overflow: hidden;
168
+ // Safari needs this
169
+ width: fit-content;
170
+ gap: var(--str-chat__spacing-0_5);
171
+ max-width: $max-width;
172
+ // CDN resize requires height/max-height to be present on the img element, this rule ensures that
173
+ height: var(--str-chat__attachment-max-width);
174
+
175
+ &.str-chat__gallery-two-rows {
176
+ grid-template-rows: 50% 50%;
168
177
  }
169
- }
170
178
 
171
- .str-chat__gallery-placeholder {
172
- position: relative;
173
- display: flex;
174
- align-items: center;
175
- justify-content: center;
176
- background-size: cover;
177
- background-position: top left;
178
- background-repeat: no-repeat;
179
- margin: 0;
180
- cursor: zoom-in;
179
+ .str-chat__gallery-image {
180
+ padding: 0;
181
+ margin: 0;
182
+
183
+ img {
184
+ width: 100%;
185
+ height: 100%;
186
+ object-fit: cover;
187
+ cursor: zoom-in;
188
+ // CDN resize requires max-width to be present on this element
189
+ max-width: $max-width;
190
+ }
191
+ }
181
192
 
182
- p {
193
+ .str-chat__gallery-placeholder {
183
194
  position: relative;
184
- z-index: 1;
185
- }
195
+ display: flex;
196
+ align-items: center;
197
+ justify-content: center;
198
+ background-size: cover;
199
+ background-position: top left;
200
+ background-repeat: no-repeat;
201
+ margin: 0;
202
+ cursor: zoom-in;
203
+ // CDN resize requires max-width to be present on this element
204
+ max-width: $max-width;
186
205
 
187
- &::after {
188
- content: '';
189
- position: absolute;
190
- top: 0;
191
- left: 0;
192
- width: 100%;
193
- height: 100%;
194
- z-index: 0;
206
+ p {
207
+ position: relative;
208
+ z-index: 1;
209
+ }
210
+
211
+ &::after {
212
+ content: '';
213
+ position: absolute;
214
+ top: 0;
215
+ left: 0;
216
+ width: 100%;
217
+ height: 100%;
218
+ z-index: 0;
219
+ }
195
220
  }
196
221
  }
197
222
  }
@@ -203,6 +228,7 @@
203
228
 
204
229
  img {
205
230
  object-fit: contain;
231
+ // CDN resize requires max-width and height/max-height to be present on this element
206
232
  max-width: calc(var(--str-chat__attachment-max-width) - #{$padding});
207
233
  max-height: calc(var(--str-chat__attachment-max-width) - #{$padding});
208
234
  }
@@ -47,6 +47,7 @@
47
47
  column-gap: var(--str-chat__spacing-2);
48
48
 
49
49
  .str-chat__user-item--name {
50
+ @include utils.ellipsis-text;
50
51
  width: 100%;
51
52
  }
52
53
  }
@@ -57,6 +58,7 @@
57
58
  column-gap: var(--str-chat__spacing-2);
58
59
 
59
60
  .str-chat__emoji-item--name {
61
+ @include utils.ellipsis-text;
60
62
  width: 100%;
61
63
  }
62
64
  }
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const version = "10.0.0-theming-v2.3";
1
+ export declare const version = "10.0.0";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,wBAAwB,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAC"}
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export var version = '10.0.0-theming-v2.3';
1
+ export var version = '10.0.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stream-chat-react",
3
- "version": "10.0.0-theming-v2.3",
3
+ "version": "10.0.0",
4
4
  "description": "React components to create chat conversations or livestream style chat",
5
5
  "author": "GetStream",
6
6
  "homepage": "https://getstream.io/chat/",
@@ -30,7 +30,7 @@
30
30
  "dependencies": {
31
31
  "@braintree/sanitize-url": "6.0.0",
32
32
  "@popperjs/core": "^2.11.5",
33
- "@stream-io/stream-chat-css": "3.0.0-theming2.9",
33
+ "@stream-io/stream-chat-css": "3.0.0",
34
34
  "clsx": "^1.1.1",
35
35
  "dayjs": "^1.10.4",
36
36
  "emoji-mart": "3.0.1",
@@ -64,7 +64,7 @@
64
64
  "peerDependencies": {
65
65
  "react": "^18.0.0 || ^17.0.0 || ^16.8.0",
66
66
  "react-dom": "^18.0.0 || ^17.0.0 || ^16.8.0",
67
- "stream-chat": "^6.9.0"
67
+ "stream-chat": "^7.1.0"
68
68
  },
69
69
  "files": [
70
70
  "dist",
@@ -168,7 +168,7 @@
168
168
  "rollup-plugin-visualizer": "^4.2.0",
169
169
  "semantic-release": "^19.0.2",
170
170
  "semantic-release-cli": "^5.4.4",
171
- "stream-chat": "^6.9.0",
171
+ "stream-chat": "^7.1.0",
172
172
  "style-loader": "^2.0.0",
173
173
  "ts-jest": "^26.5.1",
174
174
  "tslib": "2.3.0",