stream-chat 9.32.0 → 9.34.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.
@@ -4120,11 +4120,20 @@ var defaultPollFieldBlurEventValidators = {
4120
4120
  }
4121
4121
  };
4122
4122
  var isTargetedOptionTextUpdate = (value) => !Array.isArray(value) && typeof value?.index === "number" && typeof value?.text === "string";
4123
+ var clampMaxVotesAllowed = (value) => {
4124
+ if (value === "" || value == null) return "";
4125
+ const num = typeof value === "string" ? parseInt(value, 10) : Number(value);
4126
+ if (!Number.isInteger(num) || Number.isNaN(num)) return "";
4127
+ return String(Math.min(10, Math.max(2, num)));
4128
+ };
4123
4129
  var pollCompositionStateProcessors = {
4124
4130
  enforce_unique_vote: ({ value }) => ({
4125
4131
  enforce_unique_vote: value,
4126
4132
  max_votes_allowed: ""
4127
4133
  }),
4134
+ max_votes_allowed: ({ value }) => ({
4135
+ max_votes_allowed: clampMaxVotesAllowed(value)
4136
+ }),
4128
4137
  options: ({ value, data }) => {
4129
4138
  if (Array.isArray(value)) {
4130
4139
  return {
@@ -11908,7 +11917,6 @@ var DEFAULT_CHANNEL_MANAGER_OPTIONS = {
11908
11917
  lockChannelOrder: false
11909
11918
  };
11910
11919
  var DEFAULT_CHANNEL_MANAGER_PAGINATION_OPTIONS = {
11911
- limit: 10,
11912
11920
  offset: 0
11913
11921
  };
11914
11922
  var ChannelManager = class extends WithSubscriptions {
@@ -11982,7 +11990,7 @@ var ChannelManager = class extends WithSubscriptions {
11982
11990
  channels,
11983
11991
  pagination: {
11984
11992
  ...pagination,
11985
- hasNext: (channels?.length ?? 0) >= limit,
11993
+ hasNext: (channels?.length ?? 0) >= (limit ?? 1),
11986
11994
  isLoading: false,
11987
11995
  options: newOptions
11988
11996
  },
@@ -12107,7 +12115,7 @@ var ChannelManager = class extends WithSubscriptions {
12107
12115
  channels: uniqBy([...channels || [], ...nextChannels], "cid"),
12108
12116
  pagination: {
12109
12117
  ...pagination,
12110
- hasNext: (nextChannels?.length ?? 0) >= limit,
12118
+ hasNext: (nextChannels?.length ?? 0) >= (limit ?? 1),
12111
12119
  isLoading: false,
12112
12120
  isLoadingNext: false,
12113
12121
  options: newOptions
@@ -15103,7 +15111,7 @@ var StreamChat = class _StreamChat {
15103
15111
  if (this.userAgent) {
15104
15112
  return this.userAgent;
15105
15113
  }
15106
- const version = "9.32.0";
15114
+ const version = "9.34.0";
15107
15115
  const clientBundle = "browser-cjs";
15108
15116
  let userAgentString = "";
15109
15117
  if (this.sdkIdentifier) {