@flamingo-stack/openframe-frontend-core 0.0.179 → 0.0.180

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.
@@ -5397,7 +5397,7 @@ var ChatMessageList = forwardRef22(
5397
5397
  renderEntityCard,
5398
5398
  ...props
5399
5399
  }, ref) => {
5400
- const { scrollRef, contentRef, scrollToBottom } = useStickToBottom({
5400
+ const { scrollRef, contentRef, scrollToBottom, escapedFromLock } = useStickToBottom({
5401
5401
  resize: "smooth",
5402
5402
  initial: "instant"
5403
5403
  });
@@ -5426,15 +5426,20 @@ var ChatMessageList = forwardRef22(
5426
5426
  }
5427
5427
  if (newCount > prevCount) {
5428
5428
  const isPrepend = prependRef.current.firstMessageId !== void 0 && messages[0]?.id !== prependRef.current.firstMessageId;
5429
- if (!isPrepend) {
5430
- const newSlice = messages.slice(prevCount);
5431
- const hasNewUser = newSlice.some((m) => m.role === "user");
5432
- if (hasNewUser) {
5433
- void scrollToBottom({ animation: "instant", ignoreEscapes: true });
5434
- }
5429
+ if (isPrepend) return;
5430
+ const newSlice = messages.slice(prevCount);
5431
+ const hasNewUser = newSlice.some((m) => m.role === "user");
5432
+ if (hasNewUser) {
5433
+ void scrollToBottom({ animation: "instant", ignoreEscapes: true });
5434
+ return;
5435
5435
  }
5436
+ void scrollToBottom({ animation: "instant", ignoreEscapes: true });
5437
+ return;
5438
+ }
5439
+ if (!escapedFromLock) {
5440
+ void scrollToBottom({ animation: "smooth" });
5436
5441
  }
5437
- }, [autoScroll, messages, dialogId, scrollToBottom, scrollEl]);
5442
+ }, [autoScroll, messages, dialogId, scrollToBottom, scrollEl, escapedFromLock]);
5438
5443
  useLayoutEffect2(() => {
5439
5444
  const el = scrollEl;
5440
5445
  if (!el) {
@@ -33716,4 +33721,4 @@ export {
33716
33721
  TMCG_SOCIAL_PLATFORMS,
33717
33722
  assets
33718
33723
  };
33719
- //# sourceMappingURL=chunk-ZMQP3UZJ.js.map
33724
+ //# sourceMappingURL=chunk-DV2GT7RI.js.map