stream-chat-react 13.0.0 → 13.0.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.
@@ -20474,7 +20474,7 @@ module.exports = __toCommonJS(src_exports);
20474
20474
 
20475
20475
  // src/components/Attachment/Attachment.tsx
20476
20476
  var import_react254 = __toESM(require("react"));
20477
- var import_stream_chat10 = require("stream-chat");
20477
+ var import_stream_chat11 = require("stream-chat");
20478
20478
 
20479
20479
  // src/components/Attachment/AttachmentContainer.tsx
20480
20480
  var import_react253 = __toESM(require("react"));
@@ -44172,7 +44172,7 @@ var PollOptionWithLatestVotes = ({
44172
44172
  // src/components/Poll/PollActions/PollResults/PollResults.tsx
44173
44173
  var pollStateSelector10 = (nextValue) => ({
44174
44174
  name: nextValue.name,
44175
- options: nextValue.options,
44175
+ options: [...nextValue.options],
44176
44176
  vote_counts_by_option: nextValue.vote_counts_by_option
44177
44177
  });
44178
44178
  var PollResults = ({ close }) => {
@@ -44441,9 +44441,15 @@ var MultipleAnswersField = () => {
44441
44441
  pollComposer.handleFieldBlur("max_votes_allowed");
44442
44442
  },
44443
44443
  onChange: (e) => {
44444
- pollComposer.updateFields({
44445
- max_votes_allowed: e.target.value
44446
- });
44444
+ const nativeFieldValidation = !e.target.validity.valid ? {
44445
+ max_votes_allowed: t("Only numbers are allowed")
44446
+ } : void 0;
44447
+ pollComposer.updateFields(
44448
+ {
44449
+ max_votes_allowed: !nativeFieldValidation ? e.target.value : pollComposer.max_votes_allowed
44450
+ },
44451
+ nativeFieldValidation
44452
+ );
44447
44453
  },
44448
44454
  placeholder: t("Maximum number of votes (from 2 to 10)"),
44449
44455
  type: "number",
@@ -45510,6 +45516,7 @@ var de_default = {
45510
45516
  "Nobody will be able to vote in this poll anymore.": "Niemand kann mehr in dieser Umfrage abstimmen.",
45511
45517
  "Nothing yet...": "Noch nichts...",
45512
45518
  Ok: "Ok",
45519
+ "Only numbers are allowed": "Nur Zahlen sind erlaubt",
45513
45520
  "Open emoji picker": "Emoji-Auswahl \xF6ffnen",
45514
45521
  "Option already exists": "Option existiert bereits",
45515
45522
  Options: "Optionen",
@@ -45722,6 +45729,7 @@ var en_default = {
45722
45729
  "Nobody will be able to vote in this poll anymore.": "Nobody will be able to vote in this poll anymore.",
45723
45730
  "Nothing yet...": "Nothing yet...",
45724
45731
  Ok: "Ok",
45732
+ "Only numbers are allowed": "Only numbers are allowed",
45725
45733
  "Open emoji picker": "Open emoji picker",
45726
45734
  "Option already exists": "Option already exists",
45727
45735
  Options: "Options",
@@ -45924,6 +45932,7 @@ var es_default = {
45924
45932
  "Nobody will be able to vote in this poll anymore.": "Nadie podr\xE1 votar en esta encuesta.",
45925
45933
  "Nothing yet...": "Nada a\xFAn...",
45926
45934
  Ok: "Ok",
45935
+ "Only numbers are allowed": "Solo se permiten n\xFAmeros",
45927
45936
  "Open emoji picker": "Abrir el selector de emojis",
45928
45937
  "Option already exists": "La opci\xF3n ya existe",
45929
45938
  Options: "Opciones",
@@ -46144,6 +46153,7 @@ var fr_default = {
46144
46153
  "Nobody will be able to vote in this poll anymore.": "Personne ne pourra plus voter dans ce sondage.",
46145
46154
  "Nothing yet...": "Rien pour l'instant...",
46146
46155
  Ok: "D'accord",
46156
+ "Only numbers are allowed": "Seuls les chiffres sont autoris\xE9s",
46147
46157
  "Open emoji picker": "Ouvrir le s\xE9lecteur d'\xE9mojis",
46148
46158
  "Option already exists": "L'option existe d\xE9j\xE0",
46149
46159
  Options: "Options",
@@ -46365,6 +46375,7 @@ var hi_default = {
46365
46375
  "Nobody will be able to vote in this poll anymore.": "\u0905\u092C \u0915\u094B\u0908 \u092D\u0940 \u0907\u0938 \u092E\u0924\u0926\u093E\u0928 \u092E\u0947\u0902 \u092E\u0924\u0926\u093E\u0928 \u0928\u0939\u0940\u0902 \u0915\u0930 \u0938\u0915\u0947\u0917\u093E\u0964",
46366
46376
  "Nothing yet...": "\u0915\u094B\u0908 \u092E\u0948\u0938\u0947\u091C \u0928\u0939\u0940\u0902 \u0939\u0948",
46367
46377
  Ok: "\u0920\u0940\u0915 \u0939\u0948",
46378
+ "Only numbers are allowed": "\u0915\u0947\u0935\u0932 \u0938\u0902\u0916\u094D\u092F\u093E\u090F\u0901 \u0905\u0928\u0941\u092E\u0924 \u0939\u0948\u0902",
46368
46379
  "Open emoji picker": "\u0907\u092E\u094B\u091C\u0940 \u092A\u093F\u0915\u0930 \u0916\u094B\u0932\u093F\u092F\u0947",
46369
46380
  "Option already exists": "\u0935\u093F\u0915\u0932\u094D\u092A \u092A\u0939\u0932\u0947 \u0938\u0947 \u092E\u094C\u091C\u0942\u0926 \u0939\u0948",
46370
46381
  Options: "\u0935\u093F\u0915\u0932\u094D\u092A",
@@ -46577,6 +46588,7 @@ var it_default = {
46577
46588
  "Nobody will be able to vote in this poll anymore.": "Nessuno potr\xE0 pi\xF9 votare in questo sondaggio.",
46578
46589
  "Nothing yet...": "Ancora niente...",
46579
46590
  Ok: "Ok",
46591
+ "Only numbers are allowed": "Sono consentiti solo numeri",
46580
46592
  "Open emoji picker": "Apri il selettore di emoji",
46581
46593
  "Option already exists": "L'opzione esiste gi\xE0",
46582
46594
  Options: "Opzioni",
@@ -46797,6 +46809,7 @@ var ja_default = {
46797
46809
  "Nobody will be able to vote in this poll anymore.": "\u3053\u306E\u6295\u7968\u3067\u306F\u3001\u8AB0\u3082\u6295\u7968\u3067\u304D\u306A\u304F\u306A\u308A\u307E\u3059\u3002",
46798
46810
  "Nothing yet...": "\u307E\u3060\u4F55\u3082\u3042\u308A\u307E\u305B\u3093...",
46799
46811
  Ok: "OK",
46812
+ "Only numbers are allowed": "\u6570\u5B57\u306E\u307F\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u3059",
46800
46813
  "Open emoji picker": "\u7D75\u6587\u5B57\u30D4\u30C3\u30AB\u30FC\u3092\u958B\u304F",
46801
46814
  "Option already exists": "\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u65E2\u306B\u5B58\u5728\u3057\u307E\u3059",
46802
46815
  Options: "\u30AA\u30D7\u30B7\u30E7\u30F3",
@@ -47003,7 +47016,8 @@ var ko_default = {
47003
47016
  "Nobody will be able to vote in this poll anymore.": "\uC774 \uD22C\uD45C\uC5D0 \uB354 \uC774\uC0C1 \uC544\uBB34\uB3C4 \uD22C\uD45C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",
47004
47017
  "Nothing yet...": "\uC544\uC9C1 \uC544\uBB34\uAC83\uB3C4...",
47005
47018
  Ok: "\uD655\uC778",
47006
- "Open emoji picker": "\uC774\uBAA8\uD2F0\uCF58 \uC120\uD0DD\uAE30 \uC5F4\uAE30",
47019
+ "Only numbers are allowed": "\uC22B\uC790\uB9CC \uC785\uB825 \uAC00\uB2A5\uD569\uB2C8\uB2E4",
47020
+ "Open emoji picker": "\uC774\uBAA8\uC9C0 \uC120\uD0DD\uAE30 \uC5F4\uAE30",
47007
47021
  "Option already exists": "\uC635\uC158\uC774 \uC774\uBBF8 \uC874\uC7AC\uD569\uB2C8\uB2E4",
47008
47022
  Options: "\uC635\uC158",
47009
47023
  "People matching": "\uC77C\uCE58\uD558\uB294 \uC0AC\uB78C",
@@ -47209,7 +47223,8 @@ var nl_default = {
47209
47223
  "Nobody will be able to vote in this poll anymore.": "Niemand kan meer stemmen in deze peiling.",
47210
47224
  "Nothing yet...": "Nog niets ...",
47211
47225
  Ok: "Ok\xE9",
47212
- "Open emoji picker": "Open emojipicker",
47226
+ "Only numbers are allowed": "Alleen nummers zijn toegestaan",
47227
+ "Open emoji picker": "Emoji-kiezer openen",
47213
47228
  "Option already exists": "Optie bestaat al",
47214
47229
  Options: "Opties",
47215
47230
  "People matching": "Mensen die matchen",
@@ -47421,6 +47436,7 @@ var pt_default = {
47421
47436
  "Nobody will be able to vote in this poll anymore.": "Ningu\xE9m mais poder\xE1 votar nesta pesquisa.",
47422
47437
  "Nothing yet...": "Nada ainda...",
47423
47438
  Ok: "Ok",
47439
+ "Only numbers are allowed": "Apenas n\xFAmeros s\xE3o permitidos",
47424
47440
  "Open emoji picker": "Abrir seletor de emoji",
47425
47441
  "Option already exists": "Op\xE7\xE3o j\xE1 existe",
47426
47442
  Options: "Op\xE7\xF5es",
@@ -47641,6 +47657,7 @@ var ru_default = {
47641
47657
  "Nobody will be able to vote in this poll anymore.": "\u041D\u0438\u043A\u0442\u043E \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435 \u0441\u043C\u043E\u0436\u0435\u0442 \u0433\u043E\u043B\u043E\u0441\u043E\u0432\u0430\u0442\u044C \u0432 \u044D\u0442\u043E\u043C \u043E\u043F\u0440\u043E\u0441\u0435.",
47642
47658
  "Nothing yet...": "\u041F\u043E\u043A\u0430 \u043D\u0438\u0447\u0435\u0433\u043E \u043D\u0435\u0442...",
47643
47659
  Ok: "\u041E\u043A",
47660
+ "Only numbers are allowed": "\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u044B \u0442\u043E\u043B\u044C\u043A\u043E \u0446\u0438\u0444\u0440\u044B",
47644
47661
  "Open emoji picker": "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432\u044B\u0431\u043E\u0440 \u0441\u043C\u0430\u0439\u043B\u043E\u0432",
47645
47662
  "Option already exists": "\u0412\u0430\u0440\u0438\u0430\u043D\u0442 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442",
47646
47663
  Options: "\u0412\u0430\u0440\u0438\u0430\u043D\u0442\u044B",
@@ -47869,6 +47886,7 @@ var tr_default = {
47869
47886
  "Nobody will be able to vote in this poll anymore.": "Art\u0131k bu ankette kimse oy kullanamayacak.",
47870
47887
  "Nothing yet...": "\u015Eimdilik hi\xE7bir \u015Fey...",
47871
47888
  Ok: "Tamam",
47889
+ "Only numbers are allowed": "Sadece say\u0131lar kullan\u0131labilir",
47872
47890
  "Open emoji picker": "Emoji klavyesini a\xE7",
47873
47891
  "Option already exists": "Se\xE7enek zaten mevcut",
47874
47892
  Options: "Se\xE7enekler",
@@ -51331,7 +51349,7 @@ var AttachmentSelector = ({
51331
51349
 
51332
51350
  // src/components/MessageInput/AttachmentPreviewList/AttachmentPreviewList.tsx
51333
51351
  var import_react227 = __toESM(require("react"));
51334
- var import_stream_chat8 = require("stream-chat");
51352
+ var import_stream_chat9 = require("stream-chat");
51335
51353
 
51336
51354
  // src/components/MessageInput/AttachmentPreviewList/UnsupportedAttachmentPreview.tsx
51337
51355
  var import_react210 = __toESM(require("react"));
@@ -52490,6 +52508,23 @@ var useTextareaRef = (props) => {
52490
52508
 
52491
52509
  // src/components/MessageInput/hooks/useSubmitHandler.ts
52492
52510
  var import_react224 = require("react");
52511
+ var import_stream_chat8 = require("stream-chat");
52512
+ var takeStateSnapshot = (messageComposer) => {
52513
+ const textComposerState = messageComposer.textComposer.state.getLatestValue();
52514
+ const attachmentManagerState = messageComposer.attachmentManager.state.getLatestValue();
52515
+ const linkPreviewsManagerState = messageComposer.linkPreviewsManager.state.getLatestValue();
52516
+ const pollComposerState = messageComposer.pollComposer.state.getLatestValue();
52517
+ const customDataManagerState = messageComposer.customDataManager.state.getLatestValue();
52518
+ const state = messageComposer.state.getLatestValue();
52519
+ return () => {
52520
+ messageComposer.state.next(state);
52521
+ messageComposer.textComposer.state.next(textComposerState);
52522
+ messageComposer.attachmentManager.state.next(attachmentManagerState);
52523
+ messageComposer.linkPreviewsManager.state.next(linkPreviewsManagerState);
52524
+ messageComposer.pollComposer.state.next(pollComposerState);
52525
+ messageComposer.customDataManager.state.next(customDataManagerState);
52526
+ };
52527
+ };
52493
52528
  var useSubmitHandler = (props) => {
52494
52529
  const { clearEditingState, overrideSubmitHandler } = props;
52495
52530
  const { addNotification, editMessage, sendMessage } = useChannelActionContext("useSubmitHandler");
@@ -52509,7 +52544,17 @@ var useSubmitHandler = (props) => {
52509
52544
  addNotification(t("Edit message request failed"), "error");
52510
52545
  }
52511
52546
  } else {
52547
+ const restoreComposerStateSnapshot = takeStateSnapshot(messageComposer);
52512
52548
  try {
52549
+ const sentPollMessage = !!message.poll_id;
52550
+ if (sentPollMessage) {
52551
+ messageComposer.state.partialNext({
52552
+ id: import_stream_chat8.MessageComposer.generateId(),
52553
+ pollId: null
52554
+ });
52555
+ } else {
52556
+ messageComposer.clear();
52557
+ }
52513
52558
  if (overrideSubmitHandler) {
52514
52559
  await overrideSubmitHandler({
52515
52560
  cid: messageComposer.channel.cid,
@@ -52520,10 +52565,10 @@ var useSubmitHandler = (props) => {
52520
52565
  } else {
52521
52566
  await sendMessage({ localMessage, message, options: sendOptions });
52522
52567
  }
52523
- messageComposer.clear();
52524
52568
  if (messageComposer.config.text.publishTypingEvents)
52525
52569
  await messageComposer.channel.stopTyping();
52526
52570
  } catch (err) {
52571
+ restoreComposerStateSnapshot();
52527
52572
  addNotification(t("Send message request failed"), "error");
52528
52573
  }
52529
52574
  }
@@ -52684,8 +52729,8 @@ var AttachmentPreviewList = ({
52684
52729
  "data-testid": "attachment-list-scroll-container"
52685
52730
  },
52686
52731
  attachments.map((attachment) => {
52687
- if ((0, import_stream_chat8.isScrapedContent)(attachment)) return null;
52688
- if ((0, import_stream_chat8.isLocalVoiceRecordingAttachment)(attachment)) {
52732
+ if ((0, import_stream_chat9.isScrapedContent)(attachment)) return null;
52733
+ if ((0, import_stream_chat9.isLocalVoiceRecordingAttachment)(attachment)) {
52689
52734
  return /* @__PURE__ */ import_react227.default.createElement(
52690
52735
  VoiceRecordingPreview2,
52691
52736
  {
@@ -52695,7 +52740,7 @@ var AttachmentPreviewList = ({
52695
52740
  removeAttachments: messageComposer.attachmentManager.removeAttachments
52696
52741
  }
52697
52742
  );
52698
- } else if ((0, import_stream_chat8.isLocalAudioAttachment)(attachment)) {
52743
+ } else if ((0, import_stream_chat9.isLocalAudioAttachment)(attachment)) {
52699
52744
  return /* @__PURE__ */ import_react227.default.createElement(
52700
52745
  AudioAttachmentPreview,
52701
52746
  {
@@ -52705,7 +52750,7 @@ var AttachmentPreviewList = ({
52705
52750
  removeAttachments: messageComposer.attachmentManager.removeAttachments
52706
52751
  }
52707
52752
  );
52708
- } else if ((0, import_stream_chat8.isLocalVideoAttachment)(attachment)) {
52753
+ } else if ((0, import_stream_chat9.isLocalVideoAttachment)(attachment)) {
52709
52754
  return /* @__PURE__ */ import_react227.default.createElement(
52710
52755
  VideoAttachmentPreview,
52711
52756
  {
@@ -52715,7 +52760,7 @@ var AttachmentPreviewList = ({
52715
52760
  removeAttachments: messageComposer.attachmentManager.removeAttachments
52716
52761
  }
52717
52762
  );
52718
- } else if ((0, import_stream_chat8.isLocalImageAttachment)(attachment)) {
52763
+ } else if ((0, import_stream_chat9.isLocalImageAttachment)(attachment)) {
52719
52764
  return /* @__PURE__ */ import_react227.default.createElement(
52720
52765
  ImageAttachmentPreview2,
52721
52766
  {
@@ -52725,7 +52770,7 @@ var AttachmentPreviewList = ({
52725
52770
  removeAttachments: messageComposer.attachmentManager.removeAttachments
52726
52771
  }
52727
52772
  );
52728
- } else if ((0, import_stream_chat8.isLocalFileAttachment)(attachment)) {
52773
+ } else if ((0, import_stream_chat9.isLocalFileAttachment)(attachment)) {
52729
52774
  return /* @__PURE__ */ import_react227.default.createElement(
52730
52775
  FileAttachmentPreview2,
52731
52776
  {
@@ -52735,7 +52780,7 @@ var AttachmentPreviewList = ({
52735
52780
  removeAttachments: messageComposer.attachmentManager.removeAttachments
52736
52781
  }
52737
52782
  );
52738
- } else if ((0, import_stream_chat8.isLocalAttachment)(attachment)) {
52783
+ } else if ((0, import_stream_chat9.isLocalAttachment)(attachment)) {
52739
52784
  return /* @__PURE__ */ import_react227.default.createElement(
52740
52785
  UnsupportedAttachmentPreview2,
52741
52786
  {
@@ -52905,10 +52950,10 @@ var QuotedMessagePreview = ({
52905
52950
  // src/components/MessageInput/LinkPreviewList.tsx
52906
52951
  var import_clsx57 = __toESM(require("clsx"));
52907
52952
  var import_react233 = __toESM(require("react"));
52908
- var import_stream_chat9 = require("stream-chat");
52953
+ var import_stream_chat10 = require("stream-chat");
52909
52954
  var linkPreviewsManagerStateSelector = (state) => ({
52910
52955
  linkPreviews: Array.from(state.previews.values()).filter(
52911
- (preview) => import_stream_chat9.LinkPreviewsManager.previewIsLoaded(preview) || import_stream_chat9.LinkPreviewsManager.previewIsLoading(preview)
52956
+ (preview) => import_stream_chat10.LinkPreviewsManager.previewIsLoaded(preview) || import_stream_chat10.LinkPreviewsManager.previewIsLoading(preview)
52912
52957
  )
52913
52958
  });
52914
52959
  var messageComposerStateSelector = (state) => ({
@@ -52933,13 +52978,13 @@ var LinkPreviewCard = ({ linkPreview }) => {
52933
52978
  const { linkPreviewsManager } = useMessageComposer();
52934
52979
  const { handleEnter, handleLeave, tooltipVisible } = useEnterLeaveHandlers();
52935
52980
  const [referenceElement, setReferenceElement] = (0, import_react233.useState)(null);
52936
- if (!import_stream_chat9.LinkPreviewsManager.previewIsLoaded(linkPreview) && !import_stream_chat9.LinkPreviewsManager.previewIsLoading(linkPreview))
52981
+ if (!import_stream_chat10.LinkPreviewsManager.previewIsLoaded(linkPreview) && !import_stream_chat10.LinkPreviewsManager.previewIsLoading(linkPreview))
52937
52982
  return null;
52938
52983
  return /* @__PURE__ */ import_react233.default.createElement(
52939
52984
  "div",
52940
52985
  {
52941
52986
  className: (0, import_clsx57.default)("str-chat__link-preview-card", {
52942
- "str-chat__link-preview-card--loading": import_stream_chat9.LinkPreviewsManager.previewIsLoading(linkPreview)
52987
+ "str-chat__link-preview-card--loading": import_stream_chat10.LinkPreviewsManager.previewIsLoading(linkPreview)
52943
52988
  }),
52944
52989
  "data-testid": "link-preview-card"
52945
52990
  },
@@ -53168,7 +53213,7 @@ var TextareaComposer = ({
53168
53213
  closeSuggestionsOnClickOutside,
53169
53214
  containerClassName,
53170
53215
  listClassName,
53171
- maxRows: maxRowsProp = 1,
53216
+ maxRows: maxRowsProp,
53172
53217
  minRows: minRowsProp,
53173
53218
  onBlur,
53174
53219
  onChange,
@@ -53191,7 +53236,7 @@ var TextareaComposer = ({
53191
53236
  shouldSubmit: shouldSubmitContext,
53192
53237
  textareaRef
53193
53238
  } = useMessageInputContext();
53194
- const maxRows = maxRowsProp ?? maxRowsContext;
53239
+ const maxRows = maxRowsProp ?? maxRowsContext ?? 1;
53195
53240
  const minRows = minRowsProp ?? minRowsContext;
53196
53241
  const placeholder = placeholderProp ?? additionalTextareaProps?.placeholder;
53197
53242
  const shouldSubmit = shouldSubmitProp ?? shouldSubmitContext ?? defaultShouldSubmit;
@@ -53235,13 +53280,11 @@ var TextareaComposer = ({
53235
53280
  onKeyDown(event);
53236
53281
  return;
53237
53282
  }
53238
- if (event.key === "Enter") {
53239
- event.preventDefault();
53240
- }
53241
53283
  if (textComposer.suggestions && textComposer.suggestions.searchSource.items?.length) {
53242
53284
  if (event.key === "Escape") return textComposer.closeSuggestions();
53243
53285
  const loadedItems = textComposer.suggestions.searchSource.items;
53244
53286
  if (event.key === "Enter") {
53287
+ event.preventDefault();
53245
53288
  textComposer.handleSelect(loadedItems[focusedItemIndex]);
53246
53289
  }
53247
53290
  if (event.key === "ArrowUp") {
@@ -54247,9 +54290,9 @@ var renderGroupedAttachments = ({
54247
54290
  ...rest
54248
54291
  }) => {
54249
54292
  const uploadedImages = attachments.filter(
54250
- (attachment) => (0, import_stream_chat10.isImageAttachment)(attachment)
54293
+ (attachment) => (0, import_stream_chat11.isImageAttachment)(attachment)
54251
54294
  );
54252
- const containers = attachments.filter((attachment) => !(0, import_stream_chat10.isImageAttachment)(attachment)).reduce(
54295
+ const containers = attachments.filter((attachment) => !(0, import_stream_chat11.isImageAttachment)(attachment)).reduce(
54253
54296
  (typeMap, attachment) => {
54254
54297
  const attachmentType = getAttachmentType(attachment);
54255
54298
  const Container = CONTAINER_MAP[attachmentType];
@@ -54301,15 +54344,15 @@ var renderGroupedAttachments = ({
54301
54344
  return containers;
54302
54345
  };
54303
54346
  var getAttachmentType = (attachment) => {
54304
- if ((0, import_stream_chat10.isScrapedContent)(attachment)) {
54347
+ if ((0, import_stream_chat11.isScrapedContent)(attachment)) {
54305
54348
  return "card";
54306
- } else if ((0, import_stream_chat10.isVideoAttachment)(attachment, SUPPORTED_VIDEO_FORMATS)) {
54349
+ } else if ((0, import_stream_chat11.isVideoAttachment)(attachment, SUPPORTED_VIDEO_FORMATS)) {
54307
54350
  return "media";
54308
- } else if ((0, import_stream_chat10.isAudioAttachment)(attachment)) {
54351
+ } else if ((0, import_stream_chat11.isAudioAttachment)(attachment)) {
54309
54352
  return "audio";
54310
- } else if ((0, import_stream_chat10.isVoiceRecordingAttachment)(attachment)) {
54353
+ } else if ((0, import_stream_chat11.isVoiceRecordingAttachment)(attachment)) {
54311
54354
  return "voiceRecording";
54312
- } else if ((0, import_stream_chat10.isFileAttachment)(attachment, SUPPORTED_VIDEO_FORMATS)) {
54355
+ } else if ((0, import_stream_chat11.isFileAttachment)(attachment, SUPPORTED_VIDEO_FORMATS)) {
54313
54356
  return "file";
54314
54357
  }
54315
54358
  return "unsupported";
@@ -54321,7 +54364,7 @@ var import_clsx66 = __toESM(require("clsx"));
54321
54364
  var import_lodash20 = __toESM(require("lodash.debounce"));
54322
54365
  var import_lodash21 = __toESM(require("lodash.defaultsdeep"));
54323
54366
  var import_lodash22 = __toESM(require("lodash.throttle"));
54324
- var import_stream_chat11 = require("stream-chat");
54367
+ var import_stream_chat12 = require("stream-chat");
54325
54368
 
54326
54369
  // src/components/Channel/channelState.ts
54327
54370
  var makeChannelReducer = () => (state, action) => {
@@ -55474,7 +55517,7 @@ var ChannelInner = (props) => {
55474
55517
  });
55475
55518
  await doSendMessage({
55476
55519
  localMessage,
55477
- message: (0, import_stream_chat11.localMessageToNewMessagePayload)(localMessage)
55520
+ message: (0, import_stream_chat12.localMessageToNewMessagePayload)(localMessage)
55478
55521
  });
55479
55522
  };
55480
55523
  const removeMessage = (message) => {
@@ -55786,7 +55829,7 @@ var ChannelHeader = (props) => {
55786
55829
 
55787
55830
  // src/components/Chat/Chat.tsx
55788
55831
  var import_react266 = __toESM(require("react"));
55789
- var import_stream_chat12 = require("stream-chat");
55832
+ var import_stream_chat13 = require("stream-chat");
55790
55833
 
55791
55834
  // src/components/Chat/hooks/useChat.ts
55792
55835
  var import_react263 = require("react");
@@ -55818,7 +55861,7 @@ var useChat = ({
55818
55861
  };
55819
55862
  (0, import_react263.useEffect)(() => {
55820
55863
  if (!client) return;
55821
- const version = "13.0.0";
55864
+ const version = "13.0.1";
55822
55865
  const userAgent = client.getUserAgent();
55823
55866
  if (!userAgent.includes("stream-chat-react")) {
55824
55867
  client.setUserAgent(`stream-chat-react-${version}-${userAgent}`);
@@ -55982,11 +56025,11 @@ var Chat = (props) => {
55982
56025
  } = useChat({ client, defaultLanguage, i18nInstance, initialNavOpen });
55983
56026
  const channelsQueryState = useChannelsQueryState();
55984
56027
  const searchController = (0, import_react266.useMemo)(
55985
- () => customChannelSearchController ?? new import_stream_chat12.SearchController({
56028
+ () => customChannelSearchController ?? new import_stream_chat13.SearchController({
55986
56029
  sources: [
55987
- new import_stream_chat12.ChannelSearchSource(client),
55988
- new import_stream_chat12.UserSearchSource(client),
55989
- new import_stream_chat12.MessageSearchSource(client)
56030
+ new import_stream_chat13.ChannelSearchSource(client),
56031
+ new import_stream_chat13.UserSearchSource(client),
56032
+ new import_stream_chat13.MessageSearchSource(client)
55990
56033
  ]
55991
56034
  }),
55992
56035
  [client, customChannelSearchController]
@@ -56014,7 +56057,7 @@ var Chat = (props) => {
56014
56057
 
56015
56058
  // src/components/Chat/hooks/useCreateChatClient.ts
56016
56059
  var import_react267 = require("react");
56017
- var import_stream_chat13 = require("stream-chat");
56060
+ var import_stream_chat14 = require("stream-chat");
56018
56061
  var useCreateChatClient = ({
56019
56062
  apiKey,
56020
56063
  options,
@@ -56028,7 +56071,7 @@ var useCreateChatClient = ({
56028
56071
  }
56029
56072
  const [cachedOptions] = (0, import_react267.useState)(options);
56030
56073
  (0, import_react267.useEffect)(() => {
56031
- const client = new import_stream_chat13.StreamChat(apiKey, void 0, cachedOptions);
56074
+ const client = new import_stream_chat14.StreamChat(apiKey, void 0, cachedOptions);
56032
56075
  let didUserConnectInterrupt = false;
56033
56076
  const connectionPromise = client.connectUser(cachedUserData, tokenOrProvider).then(() => {
56034
56077
  if (!didUserConnectInterrupt) setChatClient(client);