stream-chat 10.1.1 → 10.2.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.
@@ -1669,7 +1669,7 @@ var parseVersion = (raw) => {
1669
1669
  };
1670
1670
  var readInjectedVersion = () => {
1671
1671
  try {
1672
- return "10.1.1";
1672
+ return "10.2.0";
1673
1673
  } catch {
1674
1674
  return void 0;
1675
1675
  }
@@ -5250,6 +5250,11 @@ var BasePaginator = class {
5250
5250
  cursor: this.config.initialCursor,
5251
5251
  offset: this.config.initialOffset ?? 0
5252
5252
  });
5253
+ this.state.addPreprocessor((next) => {
5254
+ if (!next.isLoading && next.loadingDirection !== void 0) {
5255
+ next.loadingDirection = void 0;
5256
+ }
5257
+ });
5253
5258
  this.rebuildStatePublishThrottles(this.config.stateThrottleMs);
5254
5259
  this.intervalViews = new import_state_store8.StateStore({
5255
5260
  logicalHead: [],
@@ -5296,6 +5301,10 @@ var BasePaginator = class {
5296
5301
  get isLoading() {
5297
5302
  return this.state.getLatestValue().isLoading;
5298
5303
  }
5304
+ /** See {@link PaginatorState.loadingDirection}. */
5305
+ get loadingDirection() {
5306
+ return this.state.getLatestValue().loadingDirection;
5307
+ }
5299
5308
  /**
5300
5309
  * True once a query has run or a non-empty interval was loaded without one (`setItems`, or a
5301
5310
  * subclass calling `recordLoadedIntervalQueryShape`). Cleared by `resetState`.
@@ -5325,6 +5334,7 @@ var BasePaginator = class {
5325
5334
  hasMoreHead: true,
5326
5335
  hasMoreTail: true,
5327
5336
  isLoading: false,
5337
+ loadingDirection: void 0,
5328
5338
  items: void 0,
5329
5339
  lastQueryError: void 0,
5330
5340
  cursor: this.config.initialCursor,
@@ -7119,7 +7129,11 @@ var BasePaginator = class {
7119
7129
  })();
7120
7130
  }
7121
7131
  } else if (!silent) {
7122
- this.state.partialNext({ isLoading: true });
7132
+ const loadsAtEdge = !isFirstPage && !forcedQueryShape;
7133
+ this.state.partialNext({
7134
+ isLoading: true,
7135
+ loadingDirection: loadsAtEdge ? direction : void 0
7136
+ });
7123
7137
  }
7124
7138
  const isAtCallersShape = !!forcedQueryShape;
7125
7139
  const continuesOwnCursor = !isFirstPage && !isAtCallersShape;
@@ -9683,6 +9697,15 @@ var MessageIntervalPaginator = class extends BasePaginator {
9683
9697
  offlineDb.hardDeleteMessages({ ids }).catch(() => {
9684
9698
  });
9685
9699
  }
9700
+ /**
9701
+ * Also drops the focus signal of an earlier jump. Whatever claims the active interval decides what
9702
+ * is shown, so the earlier target must not be scrolled to or highlighted there. A jump claims
9703
+ * before it emits its own signal, so it keeps that one.
9704
+ */
9705
+ claimActiveInterval() {
9706
+ this.clearMessageFocusSignal();
9707
+ return super.claimActiveInterval();
9708
+ }
9686
9709
  clearStateAndCache() {
9687
9710
  this.resetState();
9688
9711
  this._itemIndex.clear();