stream-chat-react 12.13.0 → 12.14.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 (37) hide show
  1. package/README.md +27 -30
  2. package/dist/components/Channel/Channel.d.ts +1 -1
  3. package/dist/components/Channel/Channel.js +6 -4
  4. package/dist/components/Chat/hooks/useChat.js +2 -1
  5. package/dist/components/Message/MessageBlocked.d.ts +2 -0
  6. package/dist/components/Message/MessageBlocked.js +16 -0
  7. package/dist/components/Message/MessageSimple.js +6 -2
  8. package/dist/components/Message/utils.d.ts +1 -0
  9. package/dist/components/Message/utils.js +3 -0
  10. package/dist/context/ComponentContext.d.ts +2 -0
  11. package/dist/css/v2/emoji-mart.css +1 -1
  12. package/dist/css/v2/index.css +1 -3
  13. package/dist/css/v2/index.layout.css +1 -3
  14. package/dist/experimental/index.browser.cjs.map +2 -2
  15. package/dist/experimental/index.node.cjs.map +2 -2
  16. package/dist/i18n/Streami18n.d.ts +1 -0
  17. package/dist/i18n/de.json +1 -0
  18. package/dist/i18n/en.json +1 -0
  19. package/dist/i18n/es.json +1 -0
  20. package/dist/i18n/fr.json +1 -0
  21. package/dist/i18n/hi.json +1 -0
  22. package/dist/i18n/it.json +1 -0
  23. package/dist/i18n/ja.json +1 -0
  24. package/dist/i18n/ko.json +1 -0
  25. package/dist/i18n/nl.json +1 -0
  26. package/dist/i18n/pt.json +1 -0
  27. package/dist/i18n/ru.json +1 -0
  28. package/dist/i18n/tr.json +1 -0
  29. package/dist/index.browser.cjs +1099 -1052
  30. package/dist/index.browser.cjs.map +4 -4
  31. package/dist/index.node.cjs +1013 -965
  32. package/dist/index.node.cjs.map +4 -4
  33. package/dist/scss/v2/Channel/Channel-layout.scss +2 -1
  34. package/dist/scss/v2/Message/Message-layout.scss +8 -0
  35. package/dist/scss/v2/Message/Message-theme.scss +29 -0
  36. package/dist/scss/v2/vendor/react-image-gallery.scss +3 -1
  37. package/package.json +8 -11
@@ -65,8 +65,9 @@
65
65
  }
66
66
 
67
67
  .str-chat__loading-channel-message-list {
68
- @include utils.message-list-spacing;
68
+ /* stylelint-disable */
69
69
  height: 100%;
70
+ @include utils.message-list-spacing;
70
71
 
71
72
  .str-chat__loading-channel-message {
72
73
  display: flex;
@@ -120,6 +120,10 @@
120
120
  grid-template-areas: 'message';
121
121
  }
122
122
 
123
+ &.str-chat__message--blocked {
124
+ grid-template-areas: 'message';
125
+ }
126
+
123
127
  &.str-chat__message--system {
124
128
  grid-template-areas: 'message';
125
129
  grid-template-columns: auto;
@@ -260,6 +264,10 @@
260
264
  @include chat-bubble-spacing;
261
265
  }
262
266
 
267
+ .str-chat__message--blocked-inner {
268
+ @include chat-bubble-spacing;
269
+ }
270
+
263
271
  .str-chat__quoted-message-bubble {
264
272
  @include chat-bubble-spacing;
265
273
  display: flex;
@@ -118,6 +118,30 @@
118
118
  /* Box shadow applied to a deleted message */
119
119
  --str-chat__deleted-message-box-shadow: none;
120
120
 
121
+ /* The border radius used for the borders of a deleted message */
122
+ --str-chat__blocked-message-border-radius: var(--str-chat__border-radius-md);
123
+
124
+ /* The text/icon of a deleted message */
125
+ --str-chat__blocked-message-color: var(--str-chat__text-low-emphasis-color);
126
+
127
+ /* The background of a deleted message */
128
+ --str-chat__blocked-message-background-color: var(--str-chat__secondary-surface-color);
129
+
130
+ /* Top border of a deleted message */
131
+ --str-chat__blocked-message-border-block-start: none;
132
+
133
+ /* Bottom border of a deleted message */
134
+ --str-chat__blocked-message-border-block-end: none;
135
+
136
+ /* Left (right in RTL layout) border of a deleted message */
137
+ --str-chat__blocked-message-border-inline-start: none;
138
+
139
+ /* Right (left in RTL layout) border of a deleted message */
140
+ --str-chat__blocked-message-border-inline-end: none;
141
+
142
+ /* Box shadow applied to a deleted message */
143
+ --str-chat__blocked-message-box-shadow: none;
144
+
121
145
  /* The border radius used for the borders of a system message */
122
146
  --str-chat__system-message-border-radius: 0;
123
147
 
@@ -214,6 +238,11 @@
214
238
  font: var(--str-chat__body2-text);
215
239
  }
216
240
 
241
+ .str-chat__message--blocked-inner {
242
+ @include utils.component-layer-overrides('blocked-message');
243
+ font: var(--str-chat__body2-text);
244
+ }
245
+
217
246
  &.str-chat__message--me .str-chat__message-bubble {
218
247
  color: var(--str-chat__own-message-bubble-color);
219
248
  background-color: var(--str-chat__own-message-bubble-background-color);
@@ -1,3 +1,5 @@
1
+ @use "sass:color";
2
+
1
3
  $ig-small-screen: 768px !default;
2
4
  $ig-xsmall-screen: 480px !default;
3
5
  $ig-white: #fff !default;
@@ -5,7 +7,7 @@ $ig-black: #000 !default;
5
7
  $ig-blue: #337ab7 !default;
6
8
  $ig-background-black: rgba(0, 0, 0, 0.4) !default;
7
9
  $ig-transparent: rgba(0, 0, 0, 0) !default;
8
- $ig-shadow: 0 2px 2px lighten($ig-black, 10%);
10
+ $ig-shadow: 0 2px 2px color.adjust($ig-black, $lightness: 10%);
9
11
 
10
12
  @mixin vendor-prefix($name, $value) {
11
13
  @each $vendor in ('-webkit-', '-moz-', '-ms-', '-o-', '') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stream-chat-react",
3
- "version": "12.13.0",
3
+ "version": "12.14.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/",
@@ -184,10 +184,9 @@
184
184
  "@eslint/js": "^9.16.0",
185
185
  "@ladle/react": "^0.16.0",
186
186
  "@playwright/test": "^1.42.1",
187
- "@semantic-release/changelog": "^6.0.2",
188
- "@semantic-release/exec": "^6.0.3",
187
+ "@semantic-release/changelog": "^6.0.3",
189
188
  "@semantic-release/git": "^10.0.1",
190
- "@stream-io/stream-chat-css": "^5.7.1",
189
+ "@stream-io/stream-chat-css": "^5.8.0",
191
190
  "@testing-library/dom": "^10.4.0",
192
191
  "@testing-library/jest-dom": "^6.6.3",
193
192
  "@testing-library/react": "^16.2.0",
@@ -215,12 +214,11 @@
215
214
  "babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
216
215
  "codecov": "^3.8.1",
217
216
  "concurrently": "^8.2.2",
218
- "conventional-changelog-conventionalcommits": "^7.0.2",
217
+ "conventional-changelog-conventionalcommits": "^8.0.0",
219
218
  "core-js": "^3.6.5",
220
219
  "dotenv": "^8.6.0",
221
220
  "emoji-mart": "^5.5.2",
222
221
  "esbuild": "^0.23.1",
223
- "esbuild-plugin-replace": "^1.4.0",
224
222
  "eslint": "^9.16.0",
225
223
  "eslint-plugin-import": "^2.31.0",
226
224
  "eslint-plugin-jest": "^28.11.0",
@@ -237,10 +235,10 @@
237
235
  "jsdom": "^24.1.1",
238
236
  "lint-staged": "^15.2.1",
239
237
  "moment-timezone": "^0.5.43",
240
- "prettier": "^3.4.2",
238
+ "prettier": "^3.5.3",
241
239
  "react": "^19.0.0",
242
240
  "react-dom": "^19.0.0",
243
- "semantic-release": "^19.0.5",
241
+ "semantic-release": "^24.2.3",
244
242
  "stream-chat": "^8.55.0",
245
243
  "ts-jest": "^29.2.5",
246
244
  "typescript": "^5.4.5",
@@ -255,7 +253,7 @@
255
253
  "lint-fix": "yarn prettier-fix && yarn eslint-fix",
256
254
  "eslint": "eslint --max-warnings 0",
257
255
  "eslint-fix": "eslint --fix",
258
- "prettier": "prettier 'src/**/*.{js,ts,jsx,tsx,md,json}' .prettierrc babel.config.js eslint.config.mjs",
256
+ "prettier": "prettier '**/*.{js,mjs,ts,mts,jsx,tsx,md,json,yml}'",
259
257
  "prettier-fix": "yarn prettier --write",
260
258
  "fix-staged": "lint-staged --config .lintstagedrc.fix.json --concurrent 1",
261
259
  "start": "tsc --watch --sourceMap --declarationMap",
@@ -270,8 +268,7 @@
270
268
  "e2e": "playwright test",
271
269
  "e2e-fixtures": "node e2e/fixtures/fixtures.mjs",
272
270
  "e2e-container": "./e2e/scripts/run_in_container.sh",
273
- "docs:copy-css-docs": "scripts/merge-stream-chat-css-docs.sh node_modules/@stream-io/stream-chat-css/docs",
274
- "docs:run": "yarn docs:copy-css-docs && stream-chat-docusaurus -s"
271
+ "prepack": "yarn build"
275
272
  },
276
273
  "resolutions": {
277
274
  "ast-types": "^0.14.0",